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

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

Issue 2073563002: Rework mapToVisualRectInAncestorSpace to handle flipped blocks correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't need to flip in CLM. 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
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 c2580420c02f4c091e01ae0b105f340926273b41..5ddfe61166a4b94083524cf0de949eb2af0292a4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1573,9 +1573,14 @@ bool LayoutObject::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an
return true;
chrishtr 2016/07/09 00:15:57 Adjust the comment above to specify that it's in t
wkorman 2016/07/09 01:16:08 Done.
if (LayoutObject* parent = this->parent()) {
- if (parent->isBox() && !toLayoutBox(parent)->mapScrollingContentsRectToBoxSpace(rect, parent == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRectFlags))
- return false;
-
+ if (parent->isBox()) {
+ LayoutBox* parentBox = toLayoutBox(parent);
+ if (!parentBox->mapScrollingContentsRectToBoxSpace(rect, parent == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRectFlags))
+ return false;
+ // Never flip for SVG as it handles writing modes itself.
+ if (!isSVG())
+ parentBox->flipForWritingMode(rect);
+ }
return parent->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFlags);
}
return true;

Powered by Google App Engine
This is Rietveld 408576698