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

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

Issue 2150143002: Don't over-flip when mapping visual rects for Ruby text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework tests to use Ahem. 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 | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-text-flipped-blocks-expected.txt ('k') | 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..0a387d427d716c6b63acfbc4669905ebd674f617 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -1096,7 +1096,12 @@ bool LayoutInline::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an
if (containerBox && !containerBox->mapScrollingContentsRectToBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRectFlags))
return false;
- if (containerBox)
+ // Ruby text is implemented as an inline block containing the text and
+ // annotations (if any). The rect will already be flipped as necessary by
+ // the containing LayoutRuby{Text,Base} boxes, so we need to make sure we do
+ // not flip again for the LayoutRuby container. See also
+ // https://www.w3.org/TR/css-ruby-1/#ruby-container
+ if (containerBox && !isRuby())
containerBox->flipForWritingMode(rect);
return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFlags);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-text-flipped-blocks-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698