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

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: Rename to visibleRectInContainerSpace 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..8429548007c6a95b6bcddbcd4ddff1b32e1bd6ce 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::visibleRectInContainerSpace(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->visibleRectInContainerSpace(paintInvalidationContainer, rect, paintInvalidationState);
}
}

Powered by Google App Engine
This is Rietveld 408576698