From a06ac8116d6d5d82316f450445453171cd7add1c Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Tue, 15 Feb 2011 11:21:28 -0500 Subject: A couple of fixes for scrolling layers. Update the layer structure during compositing sync. Make sure to turn off scrolling if it changes. Since I replace the content layer with a different structure, append the children to the foreground layer so they move with the content. Remove the clipping layer in the compositor for scrollable layers. For children of scrollable layers, add back in the content scroll offset so that layers are positioned relative to 0,0. Bug: 3416512 Change-Id: I74de90aac2dcf67bd969d0b85f440343123ecab9 --- WebCore/rendering/RenderLayerBacking.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'WebCore/rendering/RenderLayerBacking.cpp') diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp index 48aa3ec..0d39f7a 100644 --- a/WebCore/rendering/RenderLayerBacking.cpp +++ b/WebCore/rendering/RenderLayerBacking.cpp @@ -1021,14 +1021,6 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext* bool selectionOnly = paintBehavior & PaintBehaviorSelectionOnly; if (shouldPaint && (paintingPhase & GraphicsLayerPaintForeground)) { -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - // Scroll to 0,0 and paint the entire contents, then scroll back the - // the original offset. - int x = m_owningLayer->scrollXOffset(); - int y = m_owningLayer->scrollYOffset(); - if (m_owningLayer->hasOverflowScroll()) - m_owningLayer->scrollToOffset(0, 0, false, false); -#endif // Set up the clip used when painting our children. setClip(context, paintDirtyRect, clipRectToApply); PaintInfo paintInfo(context, clipRectToApply, @@ -1067,10 +1059,6 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext* // Now walk the sorted list of children with positive z-indices. m_owningLayer->paintList(m_owningLayer->posZOrderList(), rootLayer, context, paintDirtyRect, paintBehavior, paintingRoot, 0, 0); -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - if (m_owningLayer->hasOverflowScroll()) - m_owningLayer->scrollToOffset(x, y, false, false); -#endif } if (shouldPaint && (paintingPhase & GraphicsLayerPaintMask)) { -- cgit v1.1