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 605c990b65b93b50879aac549a6e53232b9cc04a..fc1446abecc59b746bc5761f1020c06e3db02e65 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
| @@ -2490,7 +2490,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(); |
| @@ -2500,7 +2500,11 @@ int LayoutBlockFlow::firstLineBoxBaseline() const { |
| if (!fontData) |
| return -1; |
| return (firstLineBox()->logicalTop() + |
| - fontData->getFontMetrics().ascent(firstRootBox()->baselineType())) |
| + (firstLineBox()->isHorizontal() |
| + ? fontData->getFontMetrics().ascent( |
| + firstRootBox()->baselineType()) |
| + : fontData->getFontMetrics().descent( |
| + firstRootBox()->baselineType()))) |
|
kojii
2016/11/15 04:21:15
My intuition tells me that using descent is only c
jfernandez
2016/11/16 11:51:24
Yes, you are totally right. using descent only mak
kojii
2016/11/16 17:18:06
Thank you for doing the extensive research, and so
jfernandez
2016/11/16 18:50:07
I understand, I think we can still implement some
|
| .toInt(); |
| } |
| return -1; |