Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e3b94346c519625c6ac206a57c86a5dd9add3f67
      
https://github.com/WebKit/WebKit/commit/e3b94346c519625c6ac206a57c86a5dd9add3f67
  Author: Alan Baradlay <[email protected]>
  Date:   2026-05-12 (Tue, 12 May 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/compat/webkit-box-z-index-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/compat/webkit-box-z-index.html
    M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  -----------
  [webkit-box] Allow z-index on static display:-webkit-box items
https://bugs.webkit.org/show_bug.cgi?id=314629

Reviewed by Antti Koivisto.

  <div style="display: -webkit-box;">
    <div style="z-index: 1;">...</div>
  </div>

The child should get a layer (stacking context) from z-index: 1, but it does
not. With display: flex it works correctly.

The style adjuster decides whether to honor z-index on non-positioned elements
by checking if the parent is a flex/grid container. A flex item with z-index
creates a stacking context even without position: relative/absolute. The check
used isFlexibleOrGridFormattingContextBox() which only covers modern flex
(display: flex) and grid - not the deprecated -webkit-box.

* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust):

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



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

Reply via email to