RESOLVED FIXED72059
[chromium] scrolling is broken with compositor thread
https://bugs.webkit.org/show_bug.cgi?id=72059
Summary [chromium] scrolling is broken with compositor thread
Hin-Chung Lam
Reported 2011-11-10 14:22:26 PST
Scrolling is currently broken because of this http://trac.webkit.org/changeset/99844 The above patch tries to subtract scroll delta after commit has completed on the main thread. However the subtraction happens on a wrong layer. It subtracts scroll delta from the root layer but instead scroll delta is coming from the scroll layer.
Attachments
Patch (7.36 KB, patch)
2011-11-10 14:44 PST, Hin-Chung Lam
no flags
Patch (2.90 KB, patch)
2011-11-10 15:01 PST, Hin-Chung Lam
no flags
Hin-Chung Lam
Comment 1 2011-11-10 14:44:32 PST
James Robinson
Comment 2 2011-11-10 14:51:03 PST
Comment on attachment 114578 [details] Patch You should apply the scroll deltas to CCLayerTreeHostImpl::m_scrollLayer on the impl side, not the root layer.
Adrienne Walker
Comment 3 2011-11-10 14:57:25 PST
There's also still the other option I suggested for the previous patch, of just storing the old scroll delta in a separate CCLayerImpl member variable that you can clear during commit without having to look up layers. In other words, during the begin frame where we were previously clearing scroll delta: layer->setSentScrollDelta(layer->sentScrollDelta() + layerScrollDelta()); layer->setScrollDelta(IntSize()); Then during commit, you could clear sentScrollDelta. And, during calculateLayersAndVisibility, you could consider scrollDelta() and sentScrollDelta() together when calculating layer positions. It's just a suggestion, but it might be a simpler approach than all of this.
Hin-Chung Lam
Comment 4 2011-11-10 15:01:35 PST
James Robinson
Comment 5 2011-11-10 15:05:23 PST
Comment on attachment 114583 [details] Patch This seems reasonable for now. Enne's approach does seem better overall.
Hin-Chung Lam
Comment 6 2011-11-10 15:07:06 PST
I've tested the patch I just uploaded. This applies the scroll delta on the scroll layer that we know. I think a simple way of doing this would be just pushing the position with respect to the container's visible rectangle.. that way there's no need to use scroll delta to position this layer.
Hin-Chung Lam
Comment 7 2011-11-11 04:16:13 PST
Comment on attachment 114583 [details] Patch Clearing flags on attachment: 114583 Committed r99942: <http://trac.webkit.org/changeset/99942>
Hin-Chung Lam
Comment 8 2011-11-11 04:16:20 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.