Skip to content
Permalink
Browse files
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:


Canonical link: https://commits.webkit.org/198386@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed Feb 8, 2018
1 parent 5ddb362 commit ce56816b14ccc44dea4f3400cce24fd41ca0bd2a
@@ -1,3 +1,19 @@
2018-02-07 Ryosuke Niwa <rniwa@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 Ross Kirsling <ross.kirsling@sony.com>

Add missing #if ENABLE(VIDEO_TRACK) after r228201.
@@ -222,10 +222,8 @@ void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorLis
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);
}

@@ -71,7 +71,7 @@ class CSSParser {
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&);

@@ -155,7 +155,7 @@ static Ref<ImmutableStyleProperties> createStyleProperties(ParsedPropertyVector&
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());
@@ -85,7 +85,7 @@ class CSSParserImpl {

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);

0 comments on commit ce56816

Please sign in to comment.