Changeset 148399 in webkit
- Timestamp:
- Apr 14, 2013 9:21:02 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148398 r148399 1 2013-04-14 Andreas Kling <akling@apple.com> 2 3 CSSParser should return ImmutableStylePropertySets. 4 <http://webkit.org/b/114585> 5 6 Reviewed by Anders Carlsson. 7 8 The StylePropertySets created by CSSParser were already immutable. 9 Let this be reflected in the pointer types returned. 10 11 * css/CSSParser.cpp: 12 (WebCore::CSSParser::parseInlineStyleDeclaration): 13 (WebCore::CSSParser::parseDeclaration): 14 (WebCore::CSSParser::createStylePropertySet): 15 * css/CSSParser.h: 16 (CSSParser): 17 1 18 2013-04-14 Andreas Kling <akling@apple.com> 2 19 -
trunk/Source/WebCore/css/CSSParser.cpp
r148398 r148399 1432 1432 } 1433 1433 1434 PassRefPtr< StylePropertySet> CSSParser::parseInlineStyleDeclaration(const String& string, Element* element)1434 PassRefPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDeclaration(const String& string, Element* element) 1435 1435 { 1436 1436 CSSParserContext context = element->document()->elementSheet()->contents()->parserContext(); … … 1439 1439 } 1440 1440 1441 PassRefPtr< StylePropertySet> CSSParser::parseDeclaration(const String& string, StyleSheetContents* contextStyleSheet)1441 PassRefPtr<ImmutableStylePropertySet> CSSParser::parseDeclaration(const String& string, StyleSheetContents* contextStyleSheet) 1442 1442 { 1443 1443 setStyleSheet(contextStyleSheet); … … 1450 1450 deleteFontFaceOnlyValues(); 1451 1451 1452 RefPtr< StylePropertySet> style = createStylePropertySet();1452 RefPtr<ImmutableStylePropertySet> style = createStylePropertySet(); 1453 1453 clearProperties(); 1454 1454 return style.release(); … … 1543 1543 } 1544 1544 1545 PassRefPtr< StylePropertySet> CSSParser::createStylePropertySet()1545 PassRefPtr<ImmutableStylePropertySet> CSSParser::createStylePropertySet() 1546 1546 { 1547 1547 BitArray<numCSSProperties> seenProperties; -
trunk/Source/WebCore/css/CSSParser.h
r148227 r148399 55 55 class Document; 56 56 class Element; 57 class ImmutableStylePropertySet; 57 58 class MediaQueryExp; 58 59 class MediaQuerySet; … … 98 99 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(int ident, CSSParserValue*); 99 100 bool parseDeclaration(StylePropertySet*, const String&, PassRefPtr<CSSRuleSourceData>, StyleSheetContents* contextStyleSheet); 100 static PassRefPtr< StylePropertySet> parseInlineStyleDeclaration(const String&, Element*);101 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(const String&, Element*); 101 102 PassOwnPtr<MediaQuery> parseMediaQuery(const String&); 102 103 … … 371 372 void clearProperties(); 372 373 373 PassRefPtr< StylePropertySet> createStylePropertySet();374 PassRefPtr<ImmutableStylePropertySet> createStylePropertySet(); 374 375 375 376 CSSParserContext m_context; … … 547 548 548 549 bool parseValue(StylePropertySet*, CSSPropertyID, const String&, bool important, StyleSheetContents* contextStyleSheet); 549 PassRefPtr< StylePropertySet> parseDeclaration(const String&, StyleSheetContents* contextStyleSheet);550 PassRefPtr<ImmutableStylePropertySet> parseDeclaration(const String&, StyleSheetContents* contextStyleSheet); 550 551 551 552 enum SizeParameterType {
Note: See TracChangeset
for help on using the changeset viewer.