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

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: Get advantage of recomputing the intrinsic size to solve the issues with orthogonal flows. Created 3 years, 10 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 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();
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/BaselineAlignment.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698