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

Unified Diff: sky/engine/core/rendering/RenderBox.h

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/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.h
diff --git a/sky/engine/core/rendering/RenderBox.h b/sky/engine/core/rendering/RenderBox.h
index 2304e9b79ef326f52692f3ae5ba6a38e106e2d5b..5d27682ba3b609eea92f782a3ac691c6e9577c6c 100644
--- a/sky/engine/core/rendering/RenderBox.h
+++ b/sky/engine/core/rendering/RenderBox.h
@@ -66,6 +66,21 @@ enum LayerType {
OverflowClipLayer,
};
+struct FontBaselineOrAuto {
+ FontBaselineOrAuto()
+ : m_auto(true)
+ , m_baseline(AlphabeticBaseline)
+ {
+ }
+ FontBaselineOrAuto(FontBaseline baseline)
+ : m_auto(false)
+ , m_baseline(baseline)
+ {
+ }
+ bool m_auto;
+ FontBaseline m_baseline;
+};
+
class RenderBox : public RenderBoxModelObject {
public:
explicit RenderBox(ContainerNode*);
@@ -429,7 +444,7 @@ public:
RenderLayer* enclosingFloatPaintingLayer() const;
- virtual int firstLineBoxBaseline() const { return -1; }
+ virtual int firstLineBoxBaseline(FontBaselineOrAuto baselineType) const { return -1; }
virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // Returns -1 if we should skip this box when computing the baseline of an inline-block.
bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBox(); }
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698