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

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

Issue 1736893002: Update drag images to paint from the nearest self painting layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address reviewer comments Created 4 years, 10 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/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 2a34031c6b1d79a03a3b2f3a87ac1de8cee6a7d8..4ae5132c89708c12992b47244806223ba351709d 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2452,6 +2452,14 @@ void PaintLayer::updateSelfPaintingLayer()
parent()->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
}
+PaintLayer* PaintLayer::enclosingSelfPaintingLayer()
+{
+ PaintLayer* layer = this;
+ while (layer && !layer->isSelfPaintingLayer())
+ layer = layer->parent();
+ return layer;
+}
+
bool PaintLayer::hasNonEmptyChildLayoutObjects() const
{
// Some HTML can cause whitespace text nodes to have layoutObjects, like:

Powered by Google App Engine
This is Rietveld 408576698