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

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

Issue 1817693002: Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-idle-callback
Patch Set: Rebase onto origin/master Created 4 years, 9 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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index f7fefe576aff17d0c7013f36525d5b7ed36552cc..a2441c65c93fe9c324e11a2e5a0d5704a2f0f173 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1638,28 +1638,25 @@ LayoutRect LayoutObject::clippedOverflowRectForPaintInvalidation(const LayoutBox
return LayoutRect();
}
-void LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
+bool LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState, VisibleRectFlags visibleRectFlags) const
chrishtr 2016/03/24 21:18:43 "When this method is called, the coordinate space
szager1 2016/03/24 21:52:28 Done.
{
if (ancestor == this)
- return;
+ return true;
- if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ancestor)) {
- paintInvalidationState->mapObjectRectToAncestor(*this, ancestor, rect);
- return;
- }
+ if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ancestor))
+ return paintInvalidationState->mapObjectRectToAncestor(*this, ancestor, rect, visibleRectFlags);
if (LayoutObject* parent = this->parent()) {
if (parent->hasOverflowClip()) {
LayoutBox* parentBox = toLayoutBox(parent);
parentBox->mapScrollingContentsRectToBoxSpace(rect);
- if (parent != ancestor)
- parentBox->applyOverflowClip(rect);
- if (rect.isEmpty())
- return;
+ if (parent != ancestor && !parentBox->applyOverflowClip(rect, visibleRectFlags))
+ return false;
}
- parent->mapToVisibleRectInAncestorSpace(ancestor, rect, nullptr);
+ return parent->mapToVisibleRectInAncestorSpace(ancestor, rect, nullptr, visibleRectFlags);
}
+ return true;
}
void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*)

Powered by Google App Engine
This is Rietveld 408576698