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

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

Issue 2166923004: Fix Ruby visual rects in flipped blocks writing mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify and comment. 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-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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 78eca2d86f8337920eaf26036524d39d37768599..e177e4a614a95279f99087f66a8255456585e263 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2096,7 +2096,9 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect)));
}
LayoutPoint topLeft = rect.location();
- if (container->isBox()) {
+ // LayoutRubyRun is the (anonymous) block container for LayoutRuby{Base,Text}, all of which are boxes.
+ // We need to only flip once, so we leave that to LayoutRubyRun.
+ if (container->isBox() && !container->isRubyRun()) {
chrishtr 2016/07/21 17:24:54 !container->isInline() also makes this test pass,
wkorman 2016/07/26 00:38:14 I looked into how PaintLayer::updateLayerPosition
chrishtr 2016/07/26 18:02:29 Please add a TODO(wkorman) that it's not clear why
topLeft.moveBy(topLeftLocation(toLayoutBox(container)));
// If the row is the ancestor, however, add its offset back in. In effect, this passes from the joint <td> / <tr>
// coordinate space to the parent space, then back to <tr> / <td>.
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-flipped-blocks-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698