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

Unified Diff: sky/engine/core/dom/Element.cpp

Issue 1208483002: Expose baseline information in the Sky API. (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/engine/core/dom/Element.h ('k') | sky/engine/core/dom/Element.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.cpp
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
index 87247d115f99de7b1a70e7162c48c4e1803320e3..efd0e1cc39237cb3303828820735d863225ce0a8 100644
--- a/sky/engine/core/dom/Element.cpp
+++ b/sky/engine/core/dom/Element.cpp
@@ -972,6 +972,20 @@ void Element::setMaxContentWidth(double width)
return box->setMaxPreferredLogicalWidth(width);
}
+double Element::alphabeticBaseline() const
+{
+ if (RenderBox* box = renderBox())
+ return box->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOfInteriorLineBoxes);
+ return 0;
+}
+
+double Element::ideographicBaseline() const
+{
+ if (RenderBox* box = renderBox())
+ return box->baselinePosition(IdeographicBaseline, true, HorizontalLine, PositionOfInteriorLineBoxes);
+ return 0;
+}
+
void Element::setNeedsLayout()
{
if (RenderBox* box = renderBox())
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698