Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1488)

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 15425006: Revert "Remove NonCompositedContentHost" and follow-up rebaselining. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.cpp ('k') | Source/core/rendering/RenderLayerBacking.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 12f44afcb2556b501f932384610686ebd5ff24d0..ec52ed375d981dc1b4cee4efb408351df74098e4 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1522,8 +1522,13 @@ void RenderLayer::setFilterBackendNeedsRepaintingInRect(const LayoutRect& rect)
LayoutRect parentLayerRect = renderer()->localToContainerQuad(repaintQuad, parentLayer->renderer()).enclosingBoundingBox();
if (parentLayer->isComposited()) {
- parentLayer->setBackingNeedsRepaintInRect(parentLayerRect);
- return;
+ if (!parentLayer->backing()->paintsIntoWindow()) {
+ parentLayer->setBackingNeedsRepaintInRect(parentLayerRect);
+ return;
+ }
+ // If the painting goes to window, redirect the painting to the parent RenderView.
+ parentLayer = renderer()->view()->layer();
+ parentLayerRect = renderer()->localToContainerQuad(repaintQuad, parentLayer->renderer()).enclosingBoundingBox();
}
if (parentLayer->paintsWithFilters()) {
@@ -3592,7 +3597,8 @@ void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo&
// but we need to ensure that we don't cache clip rects computed with the wrong root in this case.
if (context->updatingControlTints() || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers))
paintFlags |= PaintLayerTemporaryClipRects;
- else if (!backing()->paintsIntoCompositedAncestor()
+ else if (!backing()->paintsIntoWindow()
+ && !backing()->paintsIntoCompositedAncestor()
&& !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection)) {
// If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer().
return;
@@ -5504,7 +5510,8 @@ GraphicsLayer* RenderLayer::layerForScrollCorner() const
bool RenderLayer::paintsWithTransform(PaintBehavior paintBehavior) const
{
- return transform() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());
+ bool paintsToWindow = !isComposited() || backing()->paintsIntoWindow();
+ return transform() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || paintsToWindow);
}
bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const
@@ -5760,7 +5767,14 @@ void RenderLayer::repaintIncludingDescendants()
void RenderLayer::setBackingNeedsRepaint()
{
ASSERT(isComposited());
- backing()->setContentsNeedDisplay();
+ if (backing()->paintsIntoWindow()) {
+ // If we're trying to repaint the placeholder document layer, propagate the
+ // repaint to the native view system.
+ RenderView* view = renderer()->view();
+ if (view)
+ view->repaintViewRectangle(absoluteBoundingBox());
+ } else
+ backing()->setContentsNeedDisplay();
}
void RenderLayer::setBackingNeedsRepaintInRect(const LayoutRect& r)
@@ -5768,7 +5782,7 @@ void RenderLayer::setBackingNeedsRepaintInRect(const LayoutRect& r)
// https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
// so assert but check that the layer is composited.
ASSERT(isComposited());
- if (!isComposited()) {
+ if (!isComposited() || backing()->paintsIntoWindow()) {
// If we're trying to repaint the placeholder document layer, propagate the
// repaint to the native view system.
LayoutRect absRect(r);
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.cpp ('k') | Source/core/rendering/RenderLayerBacking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698