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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.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/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index 8c03bf0b40723c038aa57e0855363408a36e1509..aeccb6ceb4c45b4e08eecaa0b338cad7114955e3 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -198,7 +198,7 @@ void PaintInvalidator::updatePaintingLayer(const LayoutObject& object,
toLayoutBoxModelObject(object).hasSelfPaintingLayer()) {
context.paintingLayer = toLayoutBoxModelObject(object).layer();
} else if (object.isColumnSpanAll() ||
- (object.isFloating() && !object.parent()->isLayoutBlock())) {
+ object.isFloatingWithNonContainingBlockParent()) {
// See LayoutObject::paintingLayer() for the special-cases of floating under
// inline and multicolumn.
context.paintingLayer = object.paintingLayer();
@@ -284,8 +284,7 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
undoFrameViewContentClipAndScroll.emplace(
*toLayoutView(object).frameView(), context);
- } else if (object.isFloating() && !object.parent()->isLayoutBlock()) {
- // See LayoutObject::paintingLayer() for specialty of floating objects.
+ } else if (object.isFloatingWithNonContainingBlockParent()) {
context.paintInvalidationContainer =
&object.containerForPaintInvalidation();
} else if (object.styleRef().isStacked() &&

Powered by Google App Engine
This is Rietveld 408576698