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

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

Issue 2523573003: Use logicalBottom when computing baselines in vertical-lr inline-blocks (Closed)
Patch Set: Platform baselines for the new layout test. Created 4 years 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/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index c642ec88a47a0df38f3b2fdb82a4712b5ca6d786..c16d18566bae582741c66c5fa2c4a98ae709705a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -2563,7 +2563,11 @@ int LayoutBlockFlow::inlineBlockBaseline(
DCHECK(fontData);
if (!fontData)
return -1;
- return (lastLineBox()->logicalTop() +
+ // InlineFlowBox::placeBoxesInBlockDirection will flip lines in
+ // case of verticalLR mode, so we can assume verticalRL for now.
+ return ((style()->isFlippedLinesWritingMode()
mstensho (USE GERRIT) 2016/12/02 11:38:03 This expression now became very complex. Maybe you
jfernandez 2016/12/05 23:57:28 Acknowledged.
+ ? logicalHeight() - lastLineBox()->logicalBottom()
+ : lastLineBox()->logicalTop()) +
fontData->getFontMetrics().ascent(lastRootBox()->baselineType()))
.toInt();
}

Powered by Google App Engine
This is Rietveld 408576698