Changeset 228249 in webkit


Ignore:
Timestamp:
Feb 7, 2018 4:11:54 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

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:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228248 r228249  
     12018-02-07  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Remove unused CSSParserContext in CSSParser::parseInlineStyleDeclaration
     4        https://bugs.webkit.org/show_bug.cgi?id=182587
     5
     6        Reviewed by Simon Fraser.
     7
     8        Removed the code. There is no need to create an unused CSSParserContext in CSSParser.
     9
     10        * css/parser/CSSParser.cpp:
     11        (WebCore::CSSParser::parseInlineStyleDeclaration):
     12        * css/parser/CSSParser.h:
     13        * css/parser/CSSParserImpl.cpp:
     14        (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
     15        * css/parser/CSSParserImpl.h:
     16
    1172018-02-07  Ross Kirsling  <ross.kirsling@sony.com>
    218
  • trunk/Source/WebCore/css/parser/CSSParser.cpp

    r227577 r228249  
    223223}
    224224
    225 Ref<ImmutableStyleProperties> CSSParser::parseInlineStyleDeclaration(const String& string, Element* element)
    226 {
    227     CSSParserContext context(element->document());
    228     context.mode = strictToCSSParserMode(element->isHTMLElement() && !element->document().inQuirksMode());
     225Ref<ImmutableStyleProperties> CSSParser::parseInlineStyleDeclaration(const String& string, const Element* element)
     226{
    229227    return CSSParserImpl::parseInlineStyleDeclaration(string, element);
    230228}
  • trunk/Source/WebCore/css/parser/CSSParser.h

    r216902 r228249  
    7272
    7373    WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties&, const String&);
    74     static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
     74    static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, const Element*);
    7575
    7676    void parseSelector(const String&, CSSSelectorList&);
  • trunk/Source/WebCore/css/parser/CSSParserImpl.cpp

    r225650 r228249  
    156156}
    157157
    158 Ref<ImmutableStyleProperties> CSSParserImpl::parseInlineStyleDeclaration(const String& string, Element* element)
     158Ref<ImmutableStyleProperties> CSSParserImpl::parseInlineStyleDeclaration(const String& string, const Element* element)
    159159{
    160160    CSSParserContext context(element->document());
  • trunk/Source/WebCore/css/parser/CSSParserImpl.h

    r222259 r228249  
    8686    static CSSParser::ParseResult parseValue(MutableStyleProperties*, CSSPropertyID, const String&, bool important, const CSSParserContext&);
    8787    static CSSParser::ParseResult parseCustomPropertyValue(MutableStyleProperties*, const AtomicString& propertyName, const String&, bool important, const CSSParserContext&);
    88     static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
     88    static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, const Element*);
    8989    static bool parseDeclarationList(MutableStyleProperties*, const String&, const CSSParserContext&);
    9090    static RefPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext&, StyleSheetContents*, AllowedRulesType);
Note: See TracChangeset for help on using the changeset viewer.