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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp

Issue 2611233003: When setting needsRepaint, don't stop at non-stacking composited PaintLayers. (Closed)
Patch Set: none Created 3 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/layout/compositing/GraphicsLayerUpdater.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp b/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp
index ccec84d0159bc2911b6e9e14816ae9aff9a11378..855f5175449b065ce7e74c8c996b20c9eca7369b 100644
--- a/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp
@@ -28,6 +28,7 @@
#include "core/html/HTMLMediaElement.h"
#include "core/inspector/InspectorTraceEvents.h"
+#include "core/layout/LayoutBlock.h"
#include "core/layout/compositing/CompositedLayerMapping.h"
#include "core/layout/compositing/PaintLayerCompositor.h"
#include "core/paint/PaintLayer.h"
@@ -53,6 +54,11 @@ class GraphicsLayerUpdater::UpdateContext {
}
const PaintLayer* compositingContainer(const PaintLayer& layer) const {
+ // TODO(chrishtr) this is not very performant for floats, but they should
+ // be uncommon enough, and SPv2 will remove this code.
+ if (layer.layoutObject()->isFloating() && layer.layoutObject()->parent() &&
+ !layer.layoutObject()->parent()->isLayoutBlockFlow())
+ return layer.layoutObject()->containingBlock()->enclosingLayer();
return layer.stackingNode()->isStacked() ? m_compositingStackingContext
: m_compositingAncestor;
}

Powered by Google App Engine
This is Rietveld 408576698