WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
194184
Async overflow scroll is jumpy on macOS if the main thread is busy
https://bugs.webkit.org/show_bug.cgi?id=194184
Summary
Async overflow scroll is jumpy on macOS if the main thread is busy
Simon Fraser (smfr)
Reported
2019-02-01 19:23:13 PST
Created
attachment 360950
[details]
Testcase Main thread and scrolling thread seem to be fighting over scroll positions.
Attachments
Testcase
(5.72 KB, text/html)
2019-02-01 19:23 PST
,
Simon Fraser (smfr)
no flags
Details
Patch
(25.28 KB, patch)
2019-02-01 22:10 PST
,
Simon Fraser (smfr)
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2019-02-01 20:05:31 PST
While we're scrolling on the scrolling thread, we post back to the main thread via AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll(), which triggers RendderLayer::scrollTo() and then does a compositing update, and that update slams a stale scroll position onto the graphics layer.
Radar WebKit Bug Importer
Comment 2
2019-02-01 20:06:05 PST
<
rdar://problem/47758655
>
Simon Fraser (smfr)
Comment 3
2019-02-01 20:07:23 PST
iOS avoids this with: if (m_owningLayer.isInUserScroll()) { // If scrolling is happening externally, we don't want to touch the layer bounds origin here because that will cause jitter. m_scrollingLayer->syncBoundsOrigin(scrollOffset); m_owningLayer.setRequiresScrollBoundsOriginUpdate(true); } else {
Simon Fraser (smfr)
Comment 4
2019-02-01 22:10:20 PST
Created
attachment 360963
[details]
Patch
Antti Koivisto
Comment 5
2019-02-01 23:03:33 PST
Comment on
attachment 360963
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=360963&action=review
> Source/WebCore/ChangeLog:3 > + Async overflow scroll is jumpy if the main thread is busy
"on Mac"
> Source/WebCore/rendering/RenderLayerBacking.cpp:1759 > - m_scrollingContentsLayer->setPaintingPhase(paintPhase); > - m_scrollingLayer->addChild(*m_scrollingContentsLayer); > + m_scrolledContentsLayer->setPaintingPhase(paintPhase); > + m_scrollingLayer->addChild(*m_scrolledContentsLayer);
Could have also renamed m_scrollingLayer -> m_scrollContainerLayer
Simon Fraser (smfr)
Comment 6
2019-02-01 23:30:38 PST
I can do that in a followup if rs=you.
Antti Koivisto
Comment 7
2019-02-01 23:35:39 PST
(In reply to Simon Fraser (smfr) from
comment #6
)
> I can do that in a followup if rs=you.
rs=me
Simon Fraser (smfr)
Comment 8
2019-02-02 11:18:42 PST
https://trac.webkit.org/changeset/240897/webkit
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