Bug 1343819 - (Part 3) Get computed value of line-height-step. r?xidorn draft
authorKuoE0 <kuoe0.tw@gmail.com>
Fri, 17 Feb 2017 16:26:05 +0800
changeset 553964 a380df5199df3e0f0973ee8aee5284708b53745e
parent 553963 d17554c59df51f9df24280fd57dad4bf29c49d15
child 553965 17e07d412b71ff8146a6da9ebb7db4b5f764297c
push id51848
push userbmo:kuoe0@mozilla.com
push dateFri, 31 Mar 2017 05:09:20 +0000
reviewersxidorn
bugs1343819
milestone55.0a1
Bug 1343819 - (Part 3) Get computed value of line-height-step. r?xidorn MozReview-Commit-ID: 51eK8w7aHiY
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsComputedDOMStylePropertyList.h
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -3812,16 +3812,24 @@ nsComputedDOMStyle::DoGetLineHeight()
     SetValueToCoord(val, StyleText()->mLineHeight, true,
                     nullptr, nsCSSProps::kLineHeightKTable);
   }
 
   return val.forget();
 }
 
 already_AddRefed<CSSValue>
+nsComputedDOMStyle::DoGetLineHeightStep()
+{
+  RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
+  SetValueToCoord(val, StyleText()->mLineHeightStep, false);
+  return val.forget();
+}
+
+already_AddRefed<CSSValue>
 nsComputedDOMStyle::DoGetRubyAlign()
 {
   RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
   val->SetIdent(nsCSSProps::ValueToKeywordEnum(
     StyleText()->mRubyAlign, nsCSSProps::kRubyAlignKTable));
   return val.forget();
 }
 
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -416,16 +416,17 @@ private:
   already_AddRefed<CSSValue> DoGetListStyleImage();
   already_AddRefed<CSSValue> DoGetListStylePosition();
   already_AddRefed<CSSValue> DoGetListStyleType();
   already_AddRefed<CSSValue> DoGetImageRegion();
 
   /* Text Properties */
   already_AddRefed<CSSValue> DoGetInitialLetter();
   already_AddRefed<CSSValue> DoGetLineHeight();
+  already_AddRefed<CSSValue> DoGetLineHeightStep();
   already_AddRefed<CSSValue> DoGetRubyAlign();
   already_AddRefed<CSSValue> DoGetRubyPosition();
   already_AddRefed<CSSValue> DoGetTextAlign();
   already_AddRefed<CSSValue> DoGetTextAlignLast();
   already_AddRefed<CSSValue> DoGetTextCombineUpright();
   already_AddRefed<CSSValue> DoGetTextDecoration();
   already_AddRefed<CSSValue> DoGetTextDecorationColor();
   already_AddRefed<CSSValue> DoGetTextDecorationLine();
--- a/layout/style/nsComputedDOMStylePropertyList.h
+++ b/layout/style/nsComputedDOMStylePropertyList.h
@@ -167,16 +167,17 @@ COMPUTED_STYLE_PROP(ime_mode,           
 COMPUTED_STYLE_PROP(initial_letter,                InitialLetter)
 COMPUTED_STYLE_PROP(isolation,                     Isolation)
 COMPUTED_STYLE_PROP(justify_content,               JustifyContent)
 COMPUTED_STYLE_PROP(justify_items,                 JustifyItems)
 COMPUTED_STYLE_PROP(justify_self,                  JustifySelf)
 COMPUTED_STYLE_PROP(left,                          Left)
 COMPUTED_STYLE_PROP(letter_spacing,                LetterSpacing)
 COMPUTED_STYLE_PROP(line_height,                   LineHeight)
+COMPUTED_STYLE_PROP(line_height_step,              LineHeightStep)
 //// COMPUTED_STYLE_PROP(list_style,               ListStyle)
 COMPUTED_STYLE_PROP(list_style_image,              ListStyleImage)
 COMPUTED_STYLE_PROP(list_style_position,           ListStylePosition)
 COMPUTED_STYLE_PROP(list_style_type,               ListStyleType)
 //// COMPUTED_STYLE_PROP(margin,                   Margin)
 COMPUTED_STYLE_PROP(margin_bottom,                 MarginBottomWidth)
 COMPUTED_STYLE_PROP(margin_left,                   MarginLeftWidth)
 COMPUTED_STYLE_PROP(margin_right,                  MarginRightWidth)