[webkit-changes] [WebKit/WebKit] 9a4b1c: Allow variable references in matched declarations ...
Antti Koivisto
noreply at github.com
Thu Jul 6 14:54:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9a4b1ca51d28ed9775715a5a26a5282328d81475
https://github.com/WebKit/WebKit/commit/9a4b1ca51d28ed9775715a5a26a5282328d81475
Author: Antti Koivisto <antti at apple.com>
Date: 2023-07-06 (Thu, 06 Jul 2023)
Changed paths:
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleBuilder.cpp
M Source/WebCore/style/StyleBuilder.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
Allow variable references in matched declarations cache
https://bugs.webkit.org/show_bug.cgi?id=258914
rdar://111836629
Reviewed by Simon Fraser.
Currently variable references disallow matched declarations cache.
To allow them we need to apply any variable references if inherited variables change.
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::inheritedCustomPropertiesEqual const):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addMatchedProperties):
Allow variable references.
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::addMatch):
Add a bit that allows applying variable references.
Use OptionSet for included properties to allow combinations.
(WebCore::Style::PropertyCascade::shouldApplyAfterAnimation):
* Source/WebCore/style/PropertyCascade.h:
(WebCore::Style::PropertyCascade::allProperties):
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::Builder):
* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):
If inherited variables changed apply the variable references too.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::applyCascadeAfterAnimation):
Canonical link: https://commits.webkit.org/265827@main
More information about the webkit-changes
mailing list