WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
195388
[macOS] Fixed elements can flicker on a page that is busy doing layout
https://bugs.webkit.org/show_bug.cgi?id=195388
Summary
[macOS] Fixed elements can flicker on a page that is busy doing layout
Simon Fraser (smfr)
Reported
2019-03-06 16:57:54 PST
Created
attachment 363817
[details]
Testcase Fixed bars can flicker to incorrect positions on a page that is busy doing layout.
Attachments
Testcase
(18.59 KB, text/html)
2019-03-06 16:57 PST
,
Simon Fraser (smfr)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2019-03-06 17:00:33 PST
Seen on macOS, reproduces in shipping Safari. I think what's happening is that the main thread can be busy running JS etc, allowing a commit on the main thread with a very stale position for the fixed layer. Meanwhile, the scrolling thread has moved ahead, and is continually pushing the layer to its correct position. The fix is to allow the scrolling tree to have the final say on layer positions, so post-flush, traverse the scrolling tree on the main thread and have it set positions based on the scrolling thread's scroll position.
Simon Fraser (smfr)
Comment 2
2019-03-07 23:21:34 PST
Still not sure what's happening here. I have verified that the state of the layer tree as set by the scrolling thread is always correct (logging CALayer positions). We may have a race between main thread commits setting layer positions, and the scrolling tree doing so. We don't really have any protection against CACommit racing.
Simon Fraser (smfr)
Comment 3
2019-03-08 08:47:02 PST
Does not reproduce with UI-side compositing and some applyScrollingTreeLayerPositions() work, so does seem to be caused by CACommit racing. I saw in traces that CACommits in main thread and scrolling thread are overlapping.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug