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

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

Issue 1540443003: Fix LayoutObject::mapToVisibleRectInContainerSpace() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 9f80ca593c47a33958f8c9eb025376c01f79dac5..309195b11d1ef3a8eb86e71cbc4db473c21ab66d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1369,7 +1369,7 @@ inline void LayoutObject::invalidateSelectionIfNeeded(const LayoutBoxModelObject
// Composited scrolling should not be included in the bounds and position tracking, because the graphics layer backing the scroller
// does not move on scroll.
if (paintInvalidationContainer.usesCompositedScrolling() && &paintInvalidationContainer != this) {
- LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrolledContentOffset());
+ LayoutSize inverseOffset= LayoutSize(toLayoutBox(&paintInvalidationContainer)->scrolledContentOffset());
chrishtr 2015/12/18 01:58:07 space before =
Xianzhu 2015/12/18 18:28:24 An incomplete cleanup of debug code. Reverted.
newSelectionRect.move(inverseOffset);
}
@@ -1601,16 +1601,11 @@ void LayoutObject::mapToVisibleRectInContainerSpace(const LayoutBoxModelObject*
}
if (LayoutObject* o = parent()) {
- if (o != paintInvalidationContainer && o->hasOverflowClip()) {
szager1 2015/12/18 17:30:51 Doh! Thanks for fixing this.
- LayoutBox* boxParent = toLayoutBox(o);
- if (o == paintInvalidationContainer)
- boxParent->applyCachedScrollOffsetForPaintInvalidation(rect);
- else
- boxParent->applyCachedClipAndScrollOffsetForPaintInvalidation(rect);
+ if (o->hasOverflowClip()) {
+ toLayoutBox(o)->applyCachedClipAndScrollOffsetForPaintInvalidationIfNeeded(paintInvalidationContainer, rect);
if (rect.isEmpty())
return;
}
-
o->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, paintInvalidationState);
}
}

Powered by Google App Engine
This is Rietveld 408576698