Convert position:sticky to position:static upon copy and paste
Created attachment 224524 [details] Patch
Comment on attachment 224524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224524&action=review > Source/WebCore/editing/EditingStyle.cpp:1231 > RefPtr<CSSPrimitiveValue> fixed = cssValuePool().createIdentifierValue(CSSValueFixed); > + RefPtr<CSSPrimitiveValue> absolute = cssValuePool().createIdentifierValue(CSSValueAbsolute); You should declare these before first use, to avoid making them in the early return cases.
Comment on attachment 224524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224524&action=review >> Source/WebCore/editing/EditingStyle.cpp:1231 >> + RefPtr<CSSPrimitiveValue> absolute = cssValuePool().createIdentifierValue(CSSValueAbsolute); > > You should declare these before first use, to avoid making them in the early return cases. Done.
Comment on attachment 224524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224524&action=review > Source/WebCore/ChangeLog:12 > + 2. Now that we copy position:sticky, convert that to position:fixed You say this here.... > Source/WebCore/editing/EditingStyle.cpp:1233 > + if (m_mutableStyle->propertyMatches(CSSPropertyPosition, sticky.get())) { > + m_mutableStyle->setProperty(CSSPropertyPosition, cssValuePool().createIdentifierValue(CSSValueStatic), m_mutableStyle->propertyIsImportant(CSSPropertyPosition)); ... but then change it to position:static. > Source/WebCore/editing/EditingStyle.cpp:1241 > + if (m_mutableStyle->propertyMatches(CSSPropertyPosition, absolute.get())) > + return true; Should the name of the method change now?
http://trac.webkit.org/changeset/164299 http://trac.webkit.org/changeset/164303
<rdar://problem/16156147>