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.
Created attachment 114578 [details] Patch
Comment on attachment 114578 [details] Patch You should apply the scroll deltas to CCLayerTreeHostImpl::m_scrollLayer on the impl side, not the root layer.
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.
Created attachment 114583 [details] Patch
Comment on attachment 114583 [details] Patch This seems reasonable for now. Enne's approach does seem better overall.
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.
Comment on attachment 114583 [details] Patch Clearing flags on attachment: 114583 Committed r99942: <http://trac.webkit.org/changeset/99942>
All reviewed patches have been landed. Closing bug.