Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 79a886fb157b5d67d322c97e819c6588653b5f40
      
https://github.com/WebKit/WebKit/commit/79a886fb157b5d67d322c97e819c6588653b5f40
  Author: Matthieu Dubet <[email protected]>
  Date:   2025-04-17 (Thu, 17 Apr 2025)

  Changed paths:
    M Source/WebCore/css/CSSStyleRule.cpp
    M Source/WebCore/css/CSSStyleSheet.cpp

  Log Message:
  -----------
  [CSS] Clear StyleSheetContents hasNestingRuleCache on any rule mutation
https://bugs.webkit.org/show_bug.cgi?id=291695
rdar://147446595

Reviewed by Antti Koivisto.

Currently only CSSStyleRule::insertRule() API clear the cache,
however we can also insert a first StyleRuleWithNesting directly at the
top level which will use CSSStyleSheet::insertRule() or
inside a group rule (like @media) which would go
through CSSGroupingRule::insertRule().

We already have a mechanism to deal with any rule mutation (RuleMutationScope),
let's use it to clear hasNestingRulesCache.

* Source/WebCore/css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::insertRule):
* Source/WebCore/css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):

Canonical link: https://commits.webkit.org/293824@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to