Title: [117143] branches/safari-536-branch/Source/WebCore
Diff
Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (117142 => 117143)
--- branches/safari-536-branch/Source/WebCore/ChangeLog 2012-05-15 20:41:58 UTC (rev 117142)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog 2012-05-15 20:44:02 UTC (rev 117143)
@@ -1,5 +1,43 @@
2012-05-15 Lucas Forschler <[email protected]>
+ Merge 116711
+
+ 2012-05-10 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=86158
+ Overlay scrollbars without layers never paint in overflow regions in
+ tiled drawing mode
+ -and corresponding-
+ <rdar://problem/11289546>
+
+ Reviewed by Darin Adler.
+
+ RenderLayers paint scrollbars that do not have their own layers by
+ running a second pass through the layer tree after the layer tree has
+ painted. This ensures that the scrollbars always paint on top of
+ content. However, this mechanism was relying on
+ FrameView::paintContents() as a choke-point for all painting to
+ trigger the second painting pass. That is not a reasonable choke-point
+ in tiled drawing, so this patch adds similar code to
+ RenderLayerBacking.
+
+ Only opt into the second painting pass for scrollbars that do not have
+ their own layers.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintOverflowControls):
+
+ A layer that paints into its backing cannot return early here if it
+ has overlay scrollbars to paint.
+ (WebCore::RenderLayer::paintLayer):
+
+ This replicates code in FrameView::paintContents(). After painting the
+ owning layer, do a second pass if there are overlay scrollbars to
+ paint.
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+
+2012-05-15 Lucas Forschler <[email protected]>
+
Merge 116697
2012-05-10 Beth Dakin <[email protected]>
Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp (117142 => 117143)
--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp 2012-05-15 20:41:58 UTC (rev 117142)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp 2012-05-15 20:44:02 UTC (rev 117143)
@@ -2561,9 +2561,14 @@
// and we'll paint the scrollbars then. In the meantime, cache tx and ty so that the
// second pass doesn't need to re-enter the RenderTree to get it right.
if (hasOverlayScrollbars() && !paintingOverlayControls) {
+ m_cachedOverlayScrollbarOffset = paintOffset;
+#if USE(ACCELERATED_COMPOSITING)
+ // It's not necessary to do the second pass if the scrollbars paint into layers.
+ if ((m_hBar && layerForHorizontalScrollbar()) || (m_vBar && layerForVerticalScrollbar()))
+ return;
+#endif
RenderView* renderView = renderer()->view();
renderView->layer()->setContainsDirtyOverlayScrollbars(true);
- m_cachedOverlayScrollbarOffset = paintOffset;
renderView->frameView()->setContainsScrollableAreaWithOverlayScrollbars(true);
return;
}
@@ -2886,7 +2891,7 @@
// but we need to ensure that we don't cache clip rects computed with the wrong root in this case.
if (context->updatingControlTints() || (paintBehavior & PaintBehaviorFlattenCompositingLayers))
paintFlags |= PaintLayerTemporaryClipRects;
- else if (!backing()->paintsIntoWindow() && !backing()->paintsIntoCompositedAncestor() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection)) {
+ else if (!backing()->paintsIntoWindow() && !backing()->paintsIntoCompositedAncestor() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) && !rootLayer->containsDirtyOverlayScrollbars()) {
// If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer().
return;
}
Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (117142 => 117143)
--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-05-15 20:41:58 UTC (rev 117142)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-05-15 20:44:02 UTC (rev 117143)
@@ -1169,6 +1169,9 @@
// FIXME: GraphicsLayers need a way to split for RenderRegions.
m_owningLayer->paintLayerContents(rootLayer, context, paintDirtyRect, paintBehavior, paintingRoot, 0, 0, paintFlags);
+ if (m_owningLayer->containsDirtyOverlayScrollbars())
+ m_owningLayer->paintOverlayScrollbars(context, paintDirtyRect, paintBehavior, paintingRoot);
+
ASSERT(!m_owningLayer->m_usedTransparency);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes