| Summary: | Convert position:sticky to position:static upon copy and paste | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||
| Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | jonlee, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Myles C. Maxfield
2014-02-18 11:09:57 PST
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? |