Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bfee0acbeffd57ba6f6c09cd9cb81e3c09487858
      
https://github.com/WebKit/WebKit/commit/bfee0acbeffd57ba6f6c09cd9cb81e3c09487858
  Author: Antti Koivisto <[email protected]>
  Date:   2026-04-23 (Thu, 23 Apr 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-sibling-insertion-removal-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-side-effect-expected.txt
    M Source/WebCore/dom/ContainerNode.h
    M Source/WebCore/dom/Node.h
    M Source/WebCore/dom/NodeInlines.h

  Log Message:
  -----------
  [:has()] Sibling invalidation failures because NodeStyleFlag bitfield 
overflows
https://bugs.webkit.org/show_bug.cgi?id=313138
rdar://175433733

Reviewed by Alan Baradlay.

StyleBitfields::m_flags had 13 bits but NodeStyleFlag enum had 14 values.
This caused AffectedByHasWithAdjacentSiblingRelationship relation bit get lost.

* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-sibling-insertion-removal-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-side-effect-expected.txt:
* Source/WebCore/dom/ContainerNode.h:
(WebCore::ContainerNode::directChildNeedsStyleRecalc const):
(WebCore::ContainerNode::setDirectChildNeedsStyleRecalc):
* Source/WebCore/dom/Node.h:
(WebCore::Node::childNeedsStyleRecalc const):
(WebCore::Node::setChildNeedsStyleRecalc):
(WebCore::Node::StyleBitfields::clearDescendantsNeedStyleResolution):

Fix by moving DescendantNeedsStyleResolution and 
DirectChildNeedsStyleResolution bits to NodeFlags enum shrinking NodeStyleFlag.

* Source/WebCore/dom/NodeInlines.h:
(WebCore::Node::clearChildNeedsStyleRecalc):

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



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

Reply via email to