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

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

Issue 2165913005: Clean up in-flow position offset for LayoutInline mapping to visual rect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index 71782d3e40ceebd5141612c58f2a19d3739b6da5..38fea136385ad37b28c2e9df045cd046af39a920 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -1078,20 +1078,14 @@ bool LayoutInline::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an
if (!container)
return true;
- LayoutPoint topLeft = rect.location();
-
if (style()->hasInFlowPosition() && layer()) {
// Apply the in-flow position offset when invalidating a rectangle. The layer
// is translated, but the layout box isn't, so we need to do this to get the
// right dirty rect. Since this is called from LayoutObject::setStyle, the relative position
// flag on the LayoutObject has been cleared, so use the one on the style().
- topLeft += layer()->offsetForInFlowPosition();
+ rect.move(layer()->offsetForInFlowPosition());
}
- // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
- // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
- rect.setLocation(topLeft);
-
LayoutBox* containerBox = container->isBox() ? toLayoutBox(container) : nullptr;
if (containerBox && !containerBox->mapScrollingContentsRectToBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRectFlags))
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698