Diff
Modified: trunk/Source/WebCore/ChangeLog (228248 => 228249)
--- trunk/Source/WebCore/ChangeLog 2018-02-07 23:51:28 UTC (rev 228248)
+++ trunk/Source/WebCore/ChangeLog 2018-02-08 00:11:54 UTC (rev 228249)
@@ -1,3 +1,19 @@
+2018-02-07 Ryosuke Niwa <[email protected]>
+
+ Remove unused CSSParserContext in CSSParser::parseInlineStyleDeclaration
+ https://bugs.webkit.org/show_bug.cgi?id=182587
+
+ Reviewed by Simon Fraser.
+
+ Removed the code. There is no need to create an unused CSSParserContext in CSSParser.
+
+ * css/parser/CSSParser.cpp:
+ (WebCore::CSSParser::parseInlineStyleDeclaration):
+ * css/parser/CSSParser.h:
+ * css/parser/CSSParserImpl.cpp:
+ (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
+ * css/parser/CSSParserImpl.h:
+
2018-02-07 Ross Kirsling <[email protected]>
Add missing #if ENABLE(VIDEO_TRACK) after r228201.
Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (228248 => 228249)
--- trunk/Source/WebCore/css/parser/CSSParser.cpp 2018-02-07 23:51:28 UTC (rev 228248)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp 2018-02-08 00:11:54 UTC (rev 228249)
@@ -222,10 +222,8 @@
selectorList = CSSSelectorParser::parseSelector(tokenizer.tokenRange(), m_context, nullptr);
}
-Ref<ImmutableStyleProperties> CSSParser::parseInlineStyleDeclaration(const String& string, Element* element)
+Ref<ImmutableStyleProperties> CSSParser::parseInlineStyleDeclaration(const String& string, const Element* element)
{
- CSSParserContext context(element->document());
- context.mode = strictToCSSParserMode(element->isHTMLElement() && !element->document().inQuirksMode());
return CSSParserImpl::parseInlineStyleDeclaration(string, element);
}
Modified: trunk/Source/WebCore/css/parser/CSSParser.h (228248 => 228249)
--- trunk/Source/WebCore/css/parser/CSSParser.h 2018-02-07 23:51:28 UTC (rev 228248)
+++ trunk/Source/WebCore/css/parser/CSSParser.h 2018-02-08 00:11:54 UTC (rev 228249)
@@ -71,7 +71,7 @@
static RefPtr<CSSValue> parseSingleValue(CSSPropertyID, const String&, const CSSParserContext& = strictCSSParserContext());
WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties&, const String&);
- static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
+ static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, const Element*);
void parseSelector(const String&, CSSSelectorList&);
Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.cpp (228248 => 228249)
--- trunk/Source/WebCore/css/parser/CSSParserImpl.cpp 2018-02-07 23:51:28 UTC (rev 228248)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.cpp 2018-02-08 00:11:54 UTC (rev 228249)
@@ -155,7 +155,7 @@
return result;
}
-Ref<ImmutableStyleProperties> CSSParserImpl::parseInlineStyleDeclaration(const String& string, Element* element)
+Ref<ImmutableStyleProperties> CSSParserImpl::parseInlineStyleDeclaration(const String& string, const Element* element)
{
CSSParserContext context(element->document());
context.mode = strictToCSSParserMode(element->isHTMLElement() && !element->document().inQuirksMode());
Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.h (228248 => 228249)
--- trunk/Source/WebCore/css/parser/CSSParserImpl.h 2018-02-07 23:51:28 UTC (rev 228248)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.h 2018-02-08 00:11:54 UTC (rev 228249)
@@ -85,7 +85,7 @@
static CSSParser::ParseResult parseValue(MutableStyleProperties*, CSSPropertyID, const String&, bool important, const CSSParserContext&);
static CSSParser::ParseResult parseCustomPropertyValue(MutableStyleProperties*, const AtomicString& propertyName, const String&, bool important, const CSSParserContext&);
- static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
+ static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, const Element*);
static bool parseDeclarationList(MutableStyleProperties*, const String&, const CSSParserContext&);
static RefPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext&, StyleSheetContents*, AllowedRulesType);
static void parseStyleSheet(const String&, const CSSParserContext&, StyleSheetContents*, CSSParser::RuleParsing);