Skip to content

Commit

Permalink
Allow declaration from non-local scope in matched declarations cache
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259053
rdar://112011597

Reviewed by Ryosuke Niwa.

This allows caching of :host rules for example.

* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addMatchedProperties):

Scopes are already included in the cache key so we can just enable this.

Canonical link: https://commits.webkit.org/266030@main
  • Loading branch information
anttijk committed Jul 13, 2023
1 parent c441c1c commit fcb96b6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Source/WebCore/style/ElementRuleCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,6 @@ void ElementRuleCollector::addMatchedProperties(MatchedProperties&& matchedPrope
if (!m_result->isCacheable)
return false;

if (matchedProperties.styleScopeOrdinal != ScopeOrdinal::Element)
return false;

for (auto current : matchedProperties.properties.get()) {
// Currently the property cache only copy the non-inherited values and resolve
// the inherited ones.
Expand Down

0 comments on commit fcb96b6

Please sign in to comment.