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

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

Issue 1516683002: Introducing LayoutObject::mapToVisibleRectInContainerSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix flipping logic Created 5 years 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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2d594fdfa77e4b66d9e4d8ae80838fae969316a6..dabd7069bd83106cc28cf36cb19105101051f3fb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1583,7 +1583,7 @@ LayoutRect LayoutObject::clippedOverflowRectForPaintInvalidation(const LayoutBox
return LayoutRect();
}
-void LayoutObject::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
+void LayoutObject::mapToVisibleRectInContainerSpace(const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
{
if (paintInvalidationContainer == this)
return;
@@ -1596,14 +1596,17 @@ void LayoutObject::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject*
}
if (LayoutObject* o = parent()) {
- if (o->hasOverflowClip()) {
+ if (o != paintInvalidationContainer && o->hasOverflowClip()) {
LayoutBox* boxParent = toLayoutBox(o);
- boxParent->applyCachedClipAndScrollOffsetForPaintInvalidation(rect);
+ if (o == paintInvalidationContainer)
+ boxParent->applyCachedScrollOffsetForPaintInvalidation(rect);
+ else
+ boxParent->applyCachedClipAndScrollOffsetForPaintInvalidation(rect);
if (rect.isEmpty())
return;
}
- o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
+ o->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, paintInvalidationState);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698