Bug 105652 - RenderLayerCompositor should let ScrollingCoordinator update main thread scrolling reasons after change of layers
Summary: RenderLayerCompositor should let ScrollingCoordinator update main thread scro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xianzhu Wang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-21 12:41 PST by Xianzhu Wang
Modified: 2013-01-11 10:59 PST (History)
7 users (show)

See Also:


Attachments
Patch (12.36 KB, patch)
2012-12-21 17:32 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff
Patch (26.60 KB, patch)
2013-01-08 14:35 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff
Fix mac break (27.84 KB, patch)
2013-01-08 15:37 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff
for landing (27.88 KB, patch)
2013-01-11 10:35 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2012-12-21 12:41:17 PST
On Chromium ScrollingCoordinator will force main thread scrolling if there are any viewport-constrained objects not composited. However, sometimes (e.g. when the page is loading) the main thread scrolling reasons are not updated immediately after RLC promotes some fixed position elements to composited layers. This causes slow scrolling before the main thread scrolling reasons are correctly updated.

crbug.com/167312 describes the slow scrolling case.
Comment 1 Xianzhu Wang 2012-12-21 17:32:20 PST
Created attachment 180578 [details]
Patch
Comment 2 Simon Fraser (smfr) 2013-01-02 21:37:39 PST
Comment on attachment 180578 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=180578&action=review

> Source/WebCore/rendering/RenderLayerCompositor.cpp:473
> +        if (scrollingCoordinator && m_fixedPositionLayerNotCompositedReasonMap != originalFixedPositionLayerNotCompositedReasonMap)

I don't really like m_fixedPositionLayerNotCompositedReasonMap, and the fact that you're comparing two HashMaps here.
Comment 3 Xianzhu Wang 2013-01-07 15:23:24 PST
(In reply to comment #2)
> (From update of attachment 180578 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=180578&action=review
> 
> > Source/WebCore/rendering/RenderLayerCompositor.cpp:473
> > +        if (scrollingCoordinator && m_fixedPositionLayerNotCompositedReasonMap != originalFixedPositionLayerNotCompositedReasonMap)
> 
> I don't really like m_fixedPositionLayerNotCompositedReasonMap, and the fact that you're comparing two HashMaps here.

(I thought I posted the following on last Friday, but just found I made it lost somehow)

How about moving the reason information map into individual RenderLayers or RenderLayerModelObjects as a new field?
Comment 4 Xianzhu Wang 2013-01-08 14:35:46 PST
Created attachment 181770 [details]
Patch
Comment 5 Build Bot 2013-01-08 15:17:26 PST
Comment on attachment 181770 [details]
Patch

Attachment 181770 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15758280
Comment 6 Xianzhu Wang 2013-01-08 15:37:37 PST
Created attachment 181789 [details]
Fix mac break
Comment 7 Xianzhu Wang 2013-01-10 09:32:05 PST
Simon, do you like the latest patch?
Comment 8 Xianzhu Wang 2013-01-11 09:55:16 PST
Kindly ping reviewers...
Comment 9 Simon Fraser (smfr) 2013-01-11 10:18:56 PST
Comment on attachment 181789 [details]
Fix mac break

View in context: https://bugs.webkit.org/attachment.cgi?id=181789&action=review

Nice cleanup, thanks!

> Source/WebCore/rendering/RenderLayerCompositor.cpp:636
> +        if (layerChanged)
> +            if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
> +                scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->frameView());

We put {} around multi-line conditional blocks like this.
Comment 10 Xianzhu Wang 2013-01-11 10:35:54 PST
Created attachment 182365 [details]
for landing
Comment 11 Xianzhu Wang 2013-01-11 10:36:34 PST
Comment on attachment 181789 [details]
Fix mac break

View in context: https://bugs.webkit.org/attachment.cgi?id=181789&action=review

>> Source/WebCore/rendering/RenderLayerCompositor.cpp:636
>> +                scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->frameView());
> 
> We put {} around multi-line conditional blocks like this.

Done.
Comment 12 WebKit Review Bot 2013-01-11 10:59:06 PST
Comment on attachment 182365 [details]
for landing

Clearing flags on attachment: 182365

Committed r139461: <http://trac.webkit.org/changeset/139461>
Comment 13 WebKit Review Bot 2013-01-11 10:59:11 PST
All reviewed patches have been landed.  Closing bug.