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

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

Issue 1407633003: [css-grid] Implementation of Baseline Self-Alignment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch rebased and applied several refactoring and code clean up. Created 3 years, 11 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
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 57a5aa11f641632a5b678a064782f06370c959f0..4301af8b41fae899b9e1ac5fb1d0121622ff8c74 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()
+ ? logicalHeight() - firstLineBox()->logicalBottom()
+ : firstLineBox()->logicalTop()) +
svillar 2017/01/19 09:41:25 I don't fully understand this change but it does r
jfernandez 2017/01/19 16:31:48 I can add more tests, indeed, since this line fixe
fontData->getFontMetrics().ascent(firstRootBox()->baselineType()))
.toInt();
}

Powered by Google App Engine
This is Rietveld 408576698