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

Unified Diff: sky/engine/core/rendering/RenderParagraph.cpp

Issue 1200233002: Use the baseline information exposed by C++ to pipe baseline data through RenderBox. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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: sky/engine/core/rendering/RenderParagraph.cpp
diff --git a/sky/engine/core/rendering/RenderParagraph.cpp b/sky/engine/core/rendering/RenderParagraph.cpp
index cde5a014399b4afce05935ddf253905c59d74a9d..d77e06d22f6d7bbec0dc68849548daaadba5796f 100644
--- a/sky/engine/core/rendering/RenderParagraph.cpp
+++ b/sky/engine/core/rendering/RenderParagraph.cpp
@@ -1356,9 +1356,9 @@ void RenderParagraph::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth,
maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
}
-int RenderParagraph::firstLineBoxBaseline() const
+int RenderParagraph::firstLineBoxBaseline(bool autoBaseline, FontBaseline baselineType) const
{
- return firstLineBox() ? firstLineBox()->logicalTop() + style(true)->fontMetrics().ascent(firstRootBox()->baselineType()) : -1;
+ return firstLineBox() ? firstLineBox()->logicalTop() + style(true)->fontMetrics().ascent(autoBaseline ? firstRootBox()->baselineType() : baselineType) : -1;
}
int RenderParagraph::lastLineBoxBaseline(LineDirectionMode lineDirection) const

Powered by Google App Engine
This is Rietveld 408576698