Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1961f4c243df1223b330a9af9d21e4e04b2d1bf6
      
https://github.com/WebKit/WebKit/commit/1961f4c243df1223b330a9af9d21e4e04b2d1bf6
  Author: Antti Koivisto <[email protected]>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    A LayoutTests/fast/selectors/empty-rule-invalidation-expected.html
    A LayoutTests/fast/selectors/empty-rule-invalidation.html
    M Source/WebCore/style/RuleFeature.cpp

  Log Message:
  -----------
  REGRESSION(302297@main): Dark mode is broken in Wikipedia
https://bugs.webkit.org/show_bug.cgi?id=307593
rdar://169362651

Reviewed by Matthieu Dubet.

Wikipedia has an empty CSS rule

html.skin-theme-clientpref-night {
}

and then further non-empty rules with the same selector. We would pick the 
first rule to our invalidation ruleset
and proceed to dedupe other rules to it. However ElementRuleCollector ignores 
empty rules and no invalidation happens.

Test: fast/selectors/empty-rule-invalidation.html
* LayoutTests/fast/selectors/empty-rule-invalidation-expected.html: Added.
* LayoutTests/fast/selectors/empty-rule-invalidation.html: Added.
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::collectFeatures):

Don't collect features from empty rules. They can never affect style and don't 
need invalidation.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to