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

Unified Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2650873002: Refactor PaintLayer location and offset calculation especially for floats (Closed)
Patch Set: - 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/PaintInvalidationState.cpp
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index 4e53b1713158fbef980c3cca954ebf42ed36c961..6ba4b70bf1d7789ab23e74629e59e1d1209df7a3 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -133,9 +133,7 @@ PaintInvalidationState::PaintInvalidationState(
// paintInvalidationContainer.
m_paintInvalidationContainerForStackedContents =
m_paintInvalidationContainer;
- } else if (currentObject.isFloating() &&
- !currentObject.parent()->isLayoutBlock()) {
- // See LayoutObject::paintingLayer() for specialty of floating objects.
+ } else if (currentObject.isFloatingWithNonContainingBlockParent()) {
m_paintInvalidationContainer =
&currentObject.containerForPaintInvalidation();
m_cachedOffsetsEnabled = false;
@@ -230,8 +228,7 @@ PaintLayer& PaintInvalidationState::childPaintingLayer(
return *toLayoutBoxModelObject(child).layer();
// See LayoutObject::paintingLayer() for the special-cases of floating under
// inline and multicolumn.
- if (child.isColumnSpanAll() ||
- (child.isFloating() && !m_currentObject.isLayoutBlock()))
+ if (child.isColumnSpanAll() || child.isFloatingWithNonContainingBlockParent())
return *child.paintingLayer();
return m_paintingLayer;
}

Powered by Google App Engine
This is Rietveld 408576698