Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b60e500ed5c0964ce4ef22c7f1a55187cf6a9c5
      
https://github.com/WebKit/WebKit/commit/2b60e500ed5c0964ce4ef22c7f1a55187cf6a9c5
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-03-18 (Wed, 18 Mar 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp

  Log Message:
  -----------
  Fix display:contents text wrapper teardown causing select button text reorder
https://bugs.webkit.org/show_bug.cgi?id=310104

Reviewed by Antti Koivisto.

The select shadow root slot element for the button element has an inert
attribute applied. This means that the button element inherits
effectiveInert: true.

(The button element itself has all: unset and display: contents.)

createInheritedDisplayContentsStyleIfNeeded() ends up returning
non-null because the button element is compared with the select element
which has a different effectiveInert.

This is why "Hello " in
imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-text.html
gets wrapped for display: contents style inheritance.

Before this patch this would always result in a teardown of the wrapper
every style recalc. This teardown also destroys the anonymous flex item
wrapper. The recreation of that causes the text to move to a different
position. So you end up with "option 1 Hello" instead of
"Hello option 1".

This also means that there might be further issues here, but I've not
been able to find a test that uncovers them.

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



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

Reply via email to