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

Unified Diff: third_party/WebKit/Source/core/paint/FramePainter.cpp

Issue 1610063002: Revert of Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: third_party/WebKit/Source/core/paint/FramePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/FramePainter.cpp b/third_party/WebKit/Source/core/paint/FramePainter.cpp
index 51f46d85e91cc9db3c4874725acc4c50f6541815..850393738b36dd5943d4be2aa3664223130e089b 100644
--- a/third_party/WebKit/Source/core/paint/FramePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/FramePainter.cpp
@@ -74,6 +74,8 @@
fillWithRed = false; // Transparent, don't fill with red.
else if (globalPaintFlags & GlobalPaintSelectionOnly)
fillWithRed = false; // Selections are transparent, don't fill with red.
+ else if (frameView().nodeToDraw())
+ fillWithRed = false; // Element images are transparent, don't fill with red.
else
fillWithRed = true;
@@ -108,6 +110,8 @@
ASSERT(!frameView().isPainting());
frameView().setIsPainting(true);
+ // frameView().nodeToDraw() is used to draw only one element (and its descendants)
+ LayoutObject* layoutObject = frameView().nodeToDraw() ? frameView().nodeToDraw()->layoutObject() : 0;
PaintLayer* rootLayer = layoutView->layer();
#if ENABLE(ASSERT)
@@ -120,10 +124,10 @@
float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->layoutObject()->frame());
context.setDeviceScaleFactor(deviceScaleFactor);
- layerPainter.paint(context, LayoutRect(rect), localPaintFlags);
+ layerPainter.paint(context, LayoutRect(rect), localPaintFlags, layoutObject);
if (rootLayer->containsDirtyOverlayScrollbars())
- layerPainter.paintOverlayScrollbars(context, LayoutRect(rect), localPaintFlags);
+ layerPainter.paintOverlayScrollbars(context, LayoutRect(rect), localPaintFlags, layoutObject);
frameView().setIsPainting(false);

Powered by Google App Engine
This is Rietveld 408576698