Ignore:
Timestamp:
May 10, 2022, 9:48:31 AM (3 years ago)
Author:
Brent Fulgham
Message:

Remove abandoned CSSDeferredParser implementation and feature flag
https://bugs.webkit.org/show_bug.cgi?id=240244

Reviewed by Antti Koivisto.

This patch rolls out the abandoned CSSDeferredParser implementation added in Bug 165743.

Source/WebCore:

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSKeyframesRule.cpp:

(WebCore::StyleRuleKeyframes::keyframes const):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex const):
(WebCore::StyleRuleKeyframes::parseDeferredRulesIfNeeded const): Deleted.

  • css/CSSKeyframesRule.h:
  • css/StyleProperties.cpp:

(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::PropertyReference::cssText const):
(WebCore::DeferredStyleProperties::create): Deleted.
(WebCore::DeferredStyleProperties::DeferredStyleProperties): Deleted.
(WebCore::DeferredStyleProperties::parseDeferredProperties): Deleted.

  • css/StyleProperties.h:

(WebCore::StylePropertiesBase::deref const):
(isType):

  • css/StyleRule.cpp:

(WebCore::StyleRule::properties const):
(WebCore::StyleRuleGroup::childRules const):
(WebCore::StyleRuleGroup::wrapperInsertRule):
(WebCore::StyleRuleGroup::wrapperRemoveRule):
(WebCore::DeferredStyleGroupRuleList::DeferredStyleGroupRuleList): Deleted.
(WebCore::DeferredStyleGroupRuleList::parseDeferredRules): Deleted.
(WebCore::DeferredStyleGroupRuleList::parseDeferredKeyframes): Deleted.
(WebCore::StyleRuleGroup::parseDeferredRulesIfNeeded const): Deleted.

  • css/StyleRule.h:

(WebCore::StyleRule::propertiesWithoutDeferredParsing const): Deleted.
(WebCore::StyleRuleGroup::childRulesWithoutDeferredParsing const): Deleted.

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):

  • css/parser/CSSDeferredParser.cpp: Removed.
  • css/parser/CSSDeferredParser.h: Removed.
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSheet):

  • css/parser/CSSParser.h:
  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):
(WebCore::add):

  • css/parser/CSSParserContext.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::CSSParserImpl):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::consumeMediaRule):
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumeLayerRule):
(WebCore::CSSParserImpl::consumeContainerRule):
(WebCore::CSSParserImpl::consumeStyleRule):
(WebCore::CSSParserImpl::createDeferredStyleProperties): Deleted.
(WebCore::CSSParserImpl::parseDeferredDeclaration): Deleted.
(WebCore::CSSParserImpl::parseDeferredRuleList): Deleted.
(WebCore::CSSParserImpl::parseDeferredKeyframeList): Deleted.
(WebCore::CSSParserImpl::adoptTokenizerEscapedStrings): Deleted.

  • css/parser/CSSParserImpl.h:

(WebCore::CSSParserImpl::tokenizer const):
(WebCore::CSSParserImpl::deferredParser const): Deleted.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):

  • style/StyleInvalidator.cpp:

(WebCore::Style::shouldDirtyAllStyle):

  • testing/Internals.cpp:

(WebCore::deferredStyleRulesCountForList): Deleted.
(WebCore::Internals::deferredStyleRulesCount): Deleted.
(WebCore::deferredGroupRulesCountForList): Deleted.
(WebCore::Internals::deferredGroupRulesCount): Deleted.
(WebCore::deferredKeyframesRulesCountForList): Deleted.
(WebCore::Internals::deferredKeyframesRulesCount): Deleted.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetDeferredCSSParserEnabled): Deleted.
(WKPreferencesGetDeferredCSSParserEnabled): Deleted.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

  • fast/css/deferred-parsing/dynamic-external-style-expected.txt: Removed.
  • fast/css/deferred-parsing/dynamic-external-style.html: Removed.
  • fast/css/deferred-parsing/dynamic-style-in-document-expected.txt: Removed.
  • fast/css/deferred-parsing/dynamic-style-in-document.html: Removed.
  • fast/css/deferred-parsing/hover-test-expected.txt: Removed.
  • fast/css/deferred-parsing/hover-test.html: Removed.
  • fast/css/deferred-parsing/keyframes-rule-expected.txt: Removed.
  • fast/css/deferred-parsing/keyframes-rule.html: Removed.
  • fast/css/deferred-parsing/media-print-expected.txt: Removed.
  • fast/css/deferred-parsing/media-print.html: Removed.
  • fast/css/deferred-parsing/nth-of-type-expected.txt: Removed.
  • fast/css/deferred-parsing/nth-of-type.html: Removed.
  • fast/css/deferred-parsing/resources/basic-sheet.css: Removed.
  • fast/css/deferred-parsing/simple-external-style-expected.txt: Removed.
  • fast/css/deferred-parsing/simple-external-style.html: Removed.
  • fast/css/deferred-parsing/simple-style-in-document-expected.txt: Removed.
  • fast/css/deferred-parsing/simple-style-in-document.html: Removed.
  • fast/css/deferred-parsing/supports-rule-expected.txt: Removed.
  • fast/css/deferred-parsing/supports-rule.html: Removed.
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSKeyframesRule.cpp

    r293292 r294007  
    11/*
    2  * Copyright (C) 2007, 2008, 2012, 2013, 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007-2022 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#include "CSSKeyframesRule.h"
    2828
    29 #include "CSSDeferredParser.h"
    3029#include "CSSKeyframeRule.h"
    3130#include "CSSParser.h"
     
    4342}
    4443
    45 StyleRuleKeyframes::StyleRuleKeyframes(const AtomString& name, std::unique_ptr<DeferredStyleGroupRuleList>&& deferredRules)
    46     : StyleRuleBase(StyleRuleType::Keyframes)
    47     , m_name(name)
    48     , m_deferredRules(WTFMove(deferredRules))
    49 {
    50    
    51 }
    52 
    5344StyleRuleKeyframes::StyleRuleKeyframes(const StyleRuleKeyframes& o)
    5445    : StyleRuleBase(o)
     
    6354}
    6455
    65 Ref<StyleRuleKeyframes> StyleRuleKeyframes::create(const AtomString& name, std::unique_ptr<DeferredStyleGroupRuleList>&& deferredRules)
    66 {
    67     return adoptRef(*new StyleRuleKeyframes(name, WTFMove(deferredRules)));
    68 }
    69 
    7056StyleRuleKeyframes::~StyleRuleKeyframes() = default;
    7157
    72 void StyleRuleKeyframes::parseDeferredRulesIfNeeded() const
    73 {
    74     if (!m_deferredRules)
    75         return;
    76 
    77     m_deferredRules->parseDeferredKeyframes(const_cast<StyleRuleKeyframes&>(*this));
    78     m_deferredRules = nullptr;
    79 }
    80 
    8158const Vector<Ref<StyleRuleKeyframe>>& StyleRuleKeyframes::keyframes() const
    8259{
    83     parseDeferredRulesIfNeeded();
    8460    return m_keyframes;
    8561}
     
    9470void StyleRuleKeyframes::wrapperAppendKeyframe(Ref<StyleRuleKeyframe>&& keyframe)
    9571{
    96     parseDeferredRulesIfNeeded();
    9772    m_keyframes.append(WTFMove(keyframe));
    9873}
     
    10075void StyleRuleKeyframes::wrapperRemoveKeyframe(unsigned index)
    10176{
    102     parseDeferredRulesIfNeeded();
    10377    m_keyframes.remove(index);
    10478}
     
    10680std::optional<size_t> StyleRuleKeyframes::findKeyframeIndex(const String& key) const
    10781{
    108     parseDeferredRulesIfNeeded();
    10982    auto keys = CSSParser::parseKeyframeKeyList(key);
    11083    if (keys.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.