Bug 244849 - Wrong painting order of inline backgrounds when forming an stacking context.
Summary: Wrong painting order of inline backgrounds when forming an stacking context.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-09-06 10:02 PDT by Emilio Cobos Álvarez (:emilio)
Modified: 2022-09-07 14:54 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Cobos Álvarez (:emilio) 2022-09-06 10:02:21 PDT
(1) Open http://software.hixie.ch/utilities/js/live-dom-viewer/saved/10658
(2) See how the behavior is inconsistent if the <span> is an inline vs. if it's a block. It seems like WebKit fails to create a proper stacking context for the inline, or the background is painted in the wrong order.

The block behavior seems correct since z-index on the span creates a stacking context (just like opacity or other similar properties).

FWIW this caused a compat issue on Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1789039
Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1359985#c4
Comment 1 Radar WebKit Bug Importer 2022-09-07 14:54:40 PDT
<rdar://problem/99666982>