Bug 1454528 - Remove trailing underscore of float ident. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Tue, 17 Apr 2018 11:07:57 +1000
changeset 783326 c64c09c02133019e105d99e1698dd3492f5e0d58
parent 783324 9dd493ca7eadf9fd1f7be42042020b55e976d95d
child 783390 df0636ef9e272e9e1a34891aa2c3e379ee0a2d33
child 783431 7184dfdc48d0b4b1d1cf4f6e2806d49a9d3b0f20
child 783569 1232ec45d9b65ef01b9203095c85f5a871a1de51
push id106672
push userxquan@mozilla.com
push dateTue, 17 Apr 2018 01:08:28 +0000
reviewersheycam
bugs1454528
milestone61.0a1
Bug 1454528 - Remove trailing underscore of float ident. r?heycam MozReview-Commit-ID: DN7rQu3adSB
dom/html/nsGenericHTMLElement.cpp
layout/style/nsCSSPropList.h
layout/style/nsComputedDOMStylePropertyList.h
servo/components/style/properties/data.py
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -1265,21 +1265,21 @@ nsGenericHTMLElement::sBackgroundColorAt
 
 void
 nsGenericHTMLElement::MapImageAlignAttributeInto(const nsMappedAttributes* aAttributes,
                                                  GenericSpecifiedValues* aData)
 {
   const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
   if (value && value->Type() == nsAttrValue::eEnum) {
     int32_t align = value->GetEnumValue();
-    if (!aData->PropertyIsSet(eCSSProperty_float_)) {
+    if (!aData->PropertyIsSet(eCSSProperty_float)) {
       if (align == NS_STYLE_TEXT_ALIGN_LEFT) {
-        aData->SetKeywordValue(eCSSProperty_float_, StyleFloat::Left);
+        aData->SetKeywordValue(eCSSProperty_float, StyleFloat::Left);
       } else if (align == NS_STYLE_TEXT_ALIGN_RIGHT) {
-        aData->SetKeywordValue(eCSSProperty_float_, StyleFloat::Right);
+        aData->SetKeywordValue(eCSSProperty_float, StyleFloat::Right);
       }
     }
     if (!aData->PropertyIsSet(eCSSProperty_vertical_align)) {
       switch (align) {
       case NS_STYLE_TEXT_ALIGN_LEFT:
       case NS_STYLE_TEXT_ALIGN_RIGHT:
         break;
       default:
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -1267,17 +1267,17 @@ CSS_PROP_(
     FlexWrap,
     0,
     "",
     VARIANT_HK,
     kFlexWrapKTable,
     eStyleAnimType_Discrete)
 CSS_PROP_(
     float,
-    float_,
+    float,
     CSS_PROP_PUBLIC_OR_PRIVATE(CssFloat, Float),
     0,
     "",
     VARIANT_HK,
     kFloatKTable,
     eStyleAnimType_Discrete)
 CSS_PROP_(
     -moz-float-edge,
--- a/layout/style/nsComputedDOMStylePropertyList.h
+++ b/layout/style/nsComputedDOMStylePropertyList.h
@@ -124,17 +124,17 @@ COMPUTED_STYLE_PROP(cursor,             
 COMPUTED_STYLE_PROP(direction,                     Direction)
 COMPUTED_STYLE_PROP(display,                       Display)
 COMPUTED_STYLE_PROP(empty_cells,                   EmptyCells)
 COMPUTED_STYLE_PROP(flex_basis,                    FlexBasis)
 COMPUTED_STYLE_PROP(flex_direction,                FlexDirection)
 COMPUTED_STYLE_PROP(flex_grow,                     FlexGrow)
 COMPUTED_STYLE_PROP(flex_shrink,                   FlexShrink)
 COMPUTED_STYLE_PROP(flex_wrap,                     FlexWrap)
-COMPUTED_STYLE_PROP(float_,                        Float)
+COMPUTED_STYLE_PROP(float,                         Float)
 //// COMPUTED_STYLE_PROP(font,                     Font)
 COMPUTED_STYLE_PROP(font_family,                   FontFamily)
 COMPUTED_STYLE_PROP(font_feature_settings,         FontFeatureSettings)
 COMPUTED_STYLE_PROP(font_kerning,                  FontKerning)
 COMPUTED_STYLE_PROP(font_language_override,        FontLanguageOverride)
 COMPUTED_STYLE_PROP(font_optical_sizing,           FontOpticalSizing)
 COMPUTED_STYLE_PROP(font_size,                     FontSize)
 COMPUTED_STYLE_PROP(font_size_adjust,              FontSizeAdjust)
--- a/servo/components/style/properties/data.py
+++ b/servo/components/style/properties/data.py
@@ -306,20 +306,17 @@ class Longhand(object):
     def animated_type(self):
         assert self.animatable
         computed = "<{} as ToComputedValue>::ComputedValue".format(self.base_type())
         if self.is_animatable_with_computed_value:
             return computed
         return "<{} as ToAnimatedValue>::AnimatedValue".format(computed)
 
     def nscsspropertyid(self):
-        ident = self.ident
-        if ident == "float":
-            ident = "float_"
-        return "nsCSSPropertyID::eCSSProperty_%s" % ident
+        return "nsCSSPropertyID::eCSSProperty_%s" % self.ident
 
 
 class Shorthand(object):
     def __init__(self, name, sub_properties, spec=None, servo_pref=None, gecko_pref=None,
                  enabled_in="content",
                  allowed_in_keyframe_block=True, alias=None, extra_prefixes=None,
                  allowed_in_page_rule=False, flags=None):
         self.name = name