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

Unified Diff: sky/sdk/lib/rendering/paragraph.dart

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
« no previous file with comments | « sky/sdk/lib/rendering/flex.dart ('k') | sky/sdk/lib/rendering/stack.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/paragraph.dart
diff --git a/sky/sdk/lib/rendering/paragraph.dart b/sky/sdk/lib/rendering/paragraph.dart
index 600882c40832c7795035d6a8f0b26ae900602fe0..b3afa86be6570e8d772b6afa0306aa93a36ba850 100644
--- a/sky/sdk/lib/rendering/paragraph.dart
+++ b/sky/sdk/lib/rendering/paragraph.dart
@@ -154,6 +154,16 @@ class RenderParagraph extends RenderBox {
return _getIntrinsicHeight(constraints);
}
+ double getDistanceToActualBaseline(TextBaseline baseline) {
+ assert(!needsLayout);
+ _layout(constraints);
+ sky.Element root = _layoutRoot.rootElement;
+ switch (baseline) {
+ case TextBaseline.alphabetic: return root.alphabeticBaseline;
+ case TextBaseline.ideographic: return root.ideographicBaseline;
+ }
+ }
+
void performLayout() {
_layout(constraints);
sky.Element root = _layoutRoot.rootElement;
« no previous file with comments | « sky/sdk/lib/rendering/flex.dart ('k') | sky/sdk/lib/rendering/stack.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698