Bug 140560 - Paint order problem scrolling a relative-position element over a fixed-position element
Summary: Paint order problem scrolling a relative-position element over a fixed-positi...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: InRadar
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-16 12:56 PST by Alan Stearns
Modified: 2022-07-24 13:54 PDT (History)
6 users (show)

See Also:


Attachments
test file (677 bytes, text/html)
2015-01-16 12:56 PST, Alan Stearns
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Stearns 2015-01-16 12:56:42 PST
Created attachment 244792 [details]
test file

A relative-position element passing over a fixed-position element during scrolling paints in the wrong order. In the test file, the red element should always display above the yellow element. If you load the file in Safari 7 and scroll, the yellow obscures the red. If you reload the file with the scroll position set where the elements overlap, the problem is fixed. If you open or close the web inspector when the elements overlap, the problem is fixed.

Does not happen in Safari 6, Firefox or Chrome. Can't reproduce in the view on codepen.io.
Comment 1 Simon Fraser (smfr) 2015-01-16 13:04:09 PST
This happens because our compositing overlap testing isn't re-run on scrolling, and doesn't account for the fact that scrolling will "smear" the fixed thing down the page.

One way to fix this would be for the compositing overlap code to compute a "smeared" rect for the fixed thing.
Comment 2 Simon Fraser (smfr) 2015-01-16 13:08:57 PST
rdar://problem/15849697
Comment 3 Ahmad Saleem 2022-07-24 10:31:48 PDT
All browsers match in the above test case:

1) Red <div> is below yellow <div>
2) When scrolling 'red' <div> go above yellow and out of view but yellow remain fixed on the webpage.

I tested this across Chrome Canary 106, Firefox Nightly 104 and Safari 15.6 on macOS 12.5, I am not sure about the web-spec but this is what I am experiencing in all browsers.

Just wanted to share updated results. Thanks!
Comment 4 Ryosuke Niwa 2022-07-24 13:54:17 PDT
All browsers match > Config changed