[webkit-changes] [WebKit/WebKit] f34766: [CSS] StyleRuleWithNesting is a StyleRule (through...
Matthieu Dubet
noreply at github.com
Fri Jun 9 11:41:38 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f347660f0196893c4a9f7cab0beb4ed732da00fd
https://github.com/WebKit/WebKit/commit/f347660f0196893c4a9f7cab0beb4ed732da00fd
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-06-09 (Fri, 09 Jun 2023)
Changed paths:
A LayoutTests/fast/css/rule-selector-nesting-overflow-expected.txt
A LayoutTests/fast/css/rule-selector-nesting-overflow.html
M Source/WebCore/css/CSSGroupingRule.cpp
M Source/WebCore/css/CSSStyleRule.cpp
M Source/WebCore/css/StyleRule.h
M Source/WebCore/css/StyleSheetContents.cpp
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/style/RuleFeature.h
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h
M Source/WebCore/style/StyleInvalidator.cpp
M Source/WebCore/style/StyleScopeRuleSets.cpp
Log Message:
-----------
[CSS] StyleRuleWithNesting is a StyleRule (through inheritance)
https://bugs.webkit.org/show_bug.cgi?id=256693
rdar://109254000
Reviewed by Antti Koivisto.
StyleRuleWithNesting should be treated like a StyleRule
in the codebase.
* LayoutTests/fast/css/rule-selector-nesting-overflow-expected.txt: Added.
* LayoutTests/fast/css/rule-selector-nesting-overflow.html: Added.
* Source/WebCore/css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::insertRule):
* Source/WebCore/css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::insertRule):
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleBase::isStyleRule const):
(isType):
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
(WebCore::traverseRulesInVector):
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
* Source/WebCore/style/RuleFeature.h:
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::RuleSetBuilder):
(WebCore::Style::m_shouldResolveNesting):
Invalidation selectors assume that the RuleSet doesn't mutate.
We need to be careful not to resolve the nesting selector more than once.
(WebCore::Style::RuleSetBuilder::addStyleRule):
* Source/WebCore/style/RuleSetBuilder.h:
* Source/WebCore/style/StyleInvalidator.cpp:
(WebCore::Style::shouldDirtyAllStyle):
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::updateActiveStyleSheets):
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):
Canonical link: https://commits.webkit.org/265028@main
More information about the webkit-changes
mailing list