Bug 261302 - REGRESSION (265576@main): Wrong paint order of positioned and in-flow content inside overflow:scroll
Summary: REGRESSION (265576@main): Wrong paint order of positioned and in-flow content...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL: https://xs9627.github.io/iOS17-positi...
Keywords: InRadar
: 262951 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-07 17:11 PDT by Simon Fraser (smfr)
Modified: 2024-01-02 11:17 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2023-09-07 17:11:18 PDT
https://xs9627.github.io/iOS17-position-bug/ shows a bug where the position:absolute content appears below in-flow content in Safari, inside overflow:scroll.
Comment 1 Radar WebKit Bug Importer 2023-09-07 17:23:02 PDT
<rdar://problem/115144982>
Comment 2 Simon Fraser (smfr) 2023-09-07 18:19:39 PDT
A workaround for this bug is to put `will-change: z-index;` on the container
Comment 3 Simon Fraser (smfr) 2023-09-07 18:20:50 PDT
The layer tree looks like:

(S)tacking Context/(F)orced SC/O(P)portunistic SC, (N)ormal flow only, (O)verflow clip, (A)lpha (opacity or mask), has (B)lend mode, (I)solates blending, (T)ransform-ish, (F)ilter, Fi(X)ed position, Behaves as fi(x)ed, (C)omposited, (P)rovides backing/uses (p)rovided backing/paints to (a)ncestor, (c)omposited descendant, (s)scrolling ancestor, (t)transformed ancestor
Dirty (z)-lists, Dirty (n)ormal flow lists
Traversal needs: requirements (t)raversal on descendants, (b)acking or hierarchy traversal on descendants, (r)equirements traversal on all descendants, requirements traversal on all (s)ubsequent layers, (h)ierarchy traversal on all descendants, update of paint (o)rder children
Update needs:    post-(l)ayout requirements, (g)eometry, (k)ids geometry, (c)onfig, layer conne(x)ion, (s)crolling tree
Scrolling scope: box contents

S---------C-c-- -- ------ ------ 2 2 0x112000950 (0,0) width=1220 height=1109 [SA 0x110020480] (layerID 26) {sc 2} RenderView 0x1120003d0
S-----------c-- -- ------ ------ 2 2   + 0x1120017d0 (0,0) width=1220 height=1109 [SA 0x110020780] RenderBlock 0x112001690 HTML 0x112001010
--O-------CPc-- -- ------ ------ 2 2     + 0x1120035a0 (28,28) width=400 height=400 [SA 0x110020840] (layerID 35) clipping RenderBlock (positioned) 0x112003460 DIV 0x112002f50 class='page'
-NO-------C---- -- ------ ------ 2 3       n 0x112003810 (0,0) width=400 height=400 [SA 0x110020900] (layerID 34) {sc 3} RenderBlock 0x1120036d0 DIV 0x112002fd0 class='container'
-----------p-s- -- ------ ------ 2 2     + 0x112003a80 (0,0) width=400 height=50 RenderBlock (positioned) 0x112003940 DIV 0x112003130 class='header'

so 0x112003a80 is painting into the backing of 0x1120035a0 but there is composed layer in between, which is a no-no.
Comment 4 Antti Koivisto 2023-09-08 04:14:11 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17588
Comment 5 Simon Fraser (smfr) 2023-09-14 18:22:41 PDT Comment hidden (obsolete)
Comment 6 Simon Fraser (smfr) 2023-09-14 18:52:53 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17798
Comment 7 EWS 2023-09-15 10:07:07 PDT
Committed 268028@main (416e2026cb6c): <https://commits.webkit.org/268028@main>

Reviewed commits have been landed. Closing PR #17798 and removing active labels.
Comment 8 Simon Fraser (smfr) 2023-10-10 17:29:15 PDT
*** Bug 262951 has been marked as a duplicate of this bug. ***