Changeset 148397 in webkit
- Timestamp:
- Apr 14, 2013 8:46:33 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148396 r148397 1 2013-04-14 Andreas Kling <akling@apple.com> 2 3 Move parseDeclaration() and clear() to MutableStylePropertySet. 4 <http://webkit.org/b/114583> 5 6 Reviewed by Anders Carlsson. 7 8 ...and remove ASSERT(isMutable()) from the function bodies. 9 10 * svg/SVGFontFaceElement.cpp: 11 (WebCore::SVGFontFaceElement::removedFrom): 12 13 Use clear() directly instead of taking an empty string through the CSS parser. 14 15 * css/StylePropertySet.cpp: 16 (WebCore::MutableStylePropertySet::parseDeclaration): 17 (WebCore::MutableStylePropertySet::clear): 18 * css/StylePropertySet.h: 19 (StylePropertySet): 20 (MutableStylePropertySet): 21 * dom/StyledElement.cpp: 22 (WebCore::StyledElement::setInlineStyleFromString): 23 1 24 2013-04-14 Andreas Kling <akling@apple.com> 2 25 -
trunk/Source/WebCore/css/StylePropertySet.cpp
r148396 r148397 746 746 } 747 747 748 void StylePropertySet::parseDeclaration(const String& styleDeclaration, StyleSheetContents* contextStyleSheet) 749 { 750 ASSERT(isMutable()); 751 748 void MutableStylePropertySet::parseDeclaration(const String& styleDeclaration, StyleSheetContents* contextStyleSheet) 749 { 752 750 mutablePropertyVector().clear(); 753 751 … … 1104 1102 }; 1105 1103 1106 void StylePropertySet::clear() 1107 { 1108 ASSERT(isMutable()); 1104 void MutableStylePropertySet::clear() 1105 { 1109 1106 mutablePropertyVector().clear(); 1110 1107 } -
trunk/Source/WebCore/css/StylePropertySet.h
r148396 r148397 120 120 void removePrefixedOrUnprefixedProperty(CSSPropertyID); 121 121 122 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* contextStyleSheet);123 124 122 void addParsedProperties(const Vector<CSSProperty>&); 125 123 void addParsedProperty(const CSSProperty&); 126 124 127 void clear();128 125 PassRefPtr<StylePropertySet> copyBlockProperties() const; 129 126 void removeBlockProperties(); … … 235 232 MutableStylePropertySet(const StylePropertySet&); 236 233 234 void clear(); 235 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* contextStyleSheet); 236 237 237 CSSStyleDeclaration* ensureCSSStyleDeclaration(); 238 238 CSSStyleDeclaration* ensureInlineCSSStyleDeclaration(const StyledElement* parentElement); -
trunk/Source/WebCore/dom/StyledElement.cpp
r148395 r148397 194 194 if (!inlineStyle) 195 195 inlineStyle = CSSParser::parseInlineStyleDeclaration(newStyleString, this); 196 else 197 inlineStyle->parseDeclaration(newStyleString, document()->elementSheet()->contents()); 196 else { 197 ASSERT(inlineStyle->isMutable()); 198 static_pointer_cast<MutableStylePropertySet>(inlineStyle)->parseDeclaration(newStyleString, document()->elementSheet()->contents()); 199 } 198 200 } 199 201 -
trunk/Source/WebCore/svg/SVGFontFaceElement.cpp
r148395 r148397 340 340 m_fontElement = 0; 341 341 document()->accessSVGExtensions()->unregisterSVGFontFaceElement(this); 342 m_fontFaceRule->mutableProperties()-> parseDeclaration(emptyString(), 0);342 m_fontFaceRule->mutableProperties()->clear(); 343 343 344 344 document()->styleResolverChanged(DeferRecalcStyle);
Note: See TracChangeset
for help on using the changeset viewer.