Index: third_party/WebKit/Source/core/layout/line/InlineBox.h |
diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.h b/third_party/WebKit/Source/core/layout/line/InlineBox.h |
index bd77dee07414a993e7b32950273ce0f408755675..401a8567329705c704fc99c81210a5897aca730f 100644 |
--- a/third_party/WebKit/Source/core/layout/line/InlineBox.h |
+++ b/third_party/WebKit/Source/core/layout/line/InlineBox.h |
@@ -39,6 +39,24 @@ class RootInlineBox; |
enum MarkLineBoxes { kMarkLineBoxesDirty, kDontMarkLineBoxes }; |
+enum class LineVerticalPositionType { |
+ // TextTop and TextBottom are the top/bottom of the content area. |
+ // This is where 'vertical-align: text-top/text-bottom' aligns to. |
+ // This is explicitly undefined in CSS2. |
+ // https://drafts.csswg.org/css2/visudet.html#inline-non-replaced |
+ TextTop, |
+ TextBottom, |
+ // Em height as being discussed in Font Metrics API. |
+ // https://drafts.css-houdini.org/font-metrics-api-1/#fontmetrics |
+ TopOfEmHeight, |
+ BottomOfEmHeight |
+}; |
+ |
+static inline bool IsOverSide(LineVerticalPositionType type) { |
eae
2017/05/01 16:21:48
Above might be a better term than Over as over cou
kojii
2017/05/02 22:56:52
Ah, didn't know "over" could mean that. I meant th
|
+ return type == LineVerticalPositionType::TextTop || |
+ type == LineVerticalPositionType::TopOfEmHeight; |
+} |
+ |
// InlineBox represents a rectangle that occurs on a line. It corresponds to |
// some LayoutObject (i.e., it represents a portion of that LayoutObject). |
class CORE_EXPORT InlineBox : public DisplayItemClient { |