Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Unified Diff: Source/core/css/CSSParser.cpp

Issue 16020007: CSSParser should return ImmutableStylePropertySets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser.cpp
diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp
index 1d0e02b697fe9d15043465fc5064d9d140b8e6ce..6789b2c9af16930e97e3b9a0546d7e600d43ab38 100644
--- a/Source/core/css/CSSParser.cpp
+++ b/Source/core/css/CSSParser.cpp
@@ -1298,7 +1298,7 @@ void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorLis
m_selectorListForParseSelector = 0;
}
-PassRefPtr<StylePropertySet> CSSParser::parseInlineStyleDeclaration(const String& string, Element* element)
+PassRefPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDeclaration(const String& string, Element* element)
{
Document* document = element->document();
CSSParserContext context = document->elementSheet()->contents()->parserContext();
@@ -1306,7 +1306,7 @@ PassRefPtr<StylePropertySet> CSSParser::parseInlineStyleDeclaration(const String
return CSSParser(context, UseCounter::getFrom(document)).parseDeclaration(string, document->elementSheet()->contents());
}
-PassRefPtr<StylePropertySet> CSSParser::parseDeclaration(const String& string, StyleSheetContents* contextStyleSheet)
+PassRefPtr<ImmutableStylePropertySet> CSSParser::parseDeclaration(const String& string, StyleSheetContents* contextStyleSheet)
{
setStyleSheet(contextStyleSheet);
@@ -1317,7 +1317,7 @@ PassRefPtr<StylePropertySet> CSSParser::parseDeclaration(const String& string, S
if (m_hasFontFaceOnlyValues)
deleteFontFaceOnlyValues();
- RefPtr<StylePropertySet> style = createStylePropertySet();
+ RefPtr<ImmutableStylePropertySet> style = createStylePropertySet();
clearProperties();
return style.release();
}
@@ -1392,7 +1392,7 @@ static inline void filterProperties(bool important, const CSSParser::ParsedPrope
}
}
-PassRefPtr<StylePropertySet> CSSParser::createStylePropertySet()
+PassRefPtr<ImmutableStylePropertySet> CSSParser::createStylePropertySet()
{
BitArray<numCSSProperties> seenProperties;
size_t unusedEntries = m_parsedProperties.size();
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698