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

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: Rebaselined layout tests. 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..07a4c18aae21d12f44900a218a193e71d9e92c83 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -2563,6 +2563,13 @@ int LayoutBlockFlow::inlineBlockBaseline(
DCHECK(fontData);
if (!fontData)
return -1;
+ // InlineFlowBox::placeBoxesInBlockDirection will flip lines in
+ // case of verticalLR mode, so we can assume verticalRL for now.
+ if (style()->isFlippedLinesWritingMode()) {
+ return (logicalHeight() - lastLineBox()->logicalBottom() +
+ fontData->getFontMetrics().ascent(lastRootBox()->baselineType()))
+ .toInt();
+ }
return (lastLineBox()->logicalTop() +
fontData->getFontMetrics().ascent(lastRootBox()->baselineType()))
.toInt();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698