Chromium Code Reviews| 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 0f6faf1cc016b900853aa5e6eb43268f39611657..5c10f32b78ada371619fc75abf06b19dd1327755 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
| @@ -2522,7 +2522,7 @@ int LayoutBlockFlow::lineCount(const RootInlineBox* stopRootInlineBox) const { |
| } |
| int LayoutBlockFlow::firstLineBoxBaseline() const { |
| - if (isWritingModeRoot() && !isRubyRun()) |
| + if (isWritingModeRoot() && !isRubyRun() && !isGridItem()) |
| return -1; |
| if (!childrenInline()) |
| return LayoutBlock::firstLineBoxBaseline(); |
| @@ -2531,7 +2531,9 @@ int LayoutBlockFlow::firstLineBoxBaseline() const { |
| DCHECK(fontData); |
| if (!fontData) |
| return -1; |
| - return (firstLineBox()->logicalTop() + |
| + return ((styleRef().isFlippedLinesWritingMode() |
|
mstensho (USE GERRIT)
2017/03/17 09:04:56
Maybe you could say a few words about what's going
jfernandez
2017/03/23 23:31:04
Done.
|
| + ? logicalHeight() - firstLineBox()->logicalBottom() |
| + : firstLineBox()->logicalTop()) + |
| fontData->getFontMetrics().ascent(firstRootBox()->baselineType())) |
| .toInt(); |
| } |