Title: [228657] releases/WebKitGTK/webkit-2.20/Source/WebCore
Revision
228657
Author
carlo...@webkit.org
Date
2018-02-19 04:08:31 -0800 (Mon, 19 Feb 2018)

Log Message

Merge r228249 - 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:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog (228656 => 228657)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog	2018-02-19 12:08:26 UTC (rev 228656)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog	2018-02-19 12:08:31 UTC (rev 228657)
@@ -1,3 +1,19 @@
+2018-02-07  Ryosuke Niwa  <rn...@webkit.org>
+
+        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  Youenn Fablet  <you...@apple.com>
 
         ASSERTION FAILED: m_timeOrigin in Performance::Performance()

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParser.cpp (228656 => 228657)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParser.cpp	2018-02-19 12:08:26 UTC (rev 228656)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParser.cpp	2018-02-19 12:08:31 UTC (rev 228657)
@@ -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: releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParser.h (228656 => 228657)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParser.h	2018-02-19 12:08:26 UTC (rev 228656)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParser.h	2018-02-19 12:08:31 UTC (rev 228657)
@@ -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: releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParserImpl.cpp (228656 => 228657)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParserImpl.cpp	2018-02-19 12:08:26 UTC (rev 228656)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParserImpl.cpp	2018-02-19 12:08:31 UTC (rev 228657)
@@ -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: releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParserImpl.h (228656 => 228657)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParserImpl.h	2018-02-19 12:08:26 UTC (rev 228656)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/css/parser/CSSParserImpl.h	2018-02-19 12:08:31 UTC (rev 228657)
@@ -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);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to