Bug 1452542 part 4 - Have ENABLED_IN flags in nsCSSPropList.h match those in Servo side. r?emilio draft
authorXidorn Quan <me@upsuper.org>
Wed, 11 Apr 2018 13:46:08 +1000
changeset 784860 9267dbef13e9e9c792292af7fef8811a5817f1d4
parent 784816 d3cfadefa8481f8dd77e488a56dbd92e8d874bc9
child 784861 dd8953d0b3d0ada24f6d8064377895c17a1635ab
push id107060
push userxquan@mozilla.com
push dateThu, 19 Apr 2018 08:17:21 +0000
reviewersemilio
bugs1452542
milestone61.0a1
Bug 1452542 part 4 - Have ENABLED_IN flags in nsCSSPropList.h match those in Servo side. r?emilio MozReview-Commit-ID: 48t5u1D5rZX
layout/style/nsCSSProps.cpp
servo/components/style/properties/longhand/ui.mako.rs
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -2727,17 +2727,17 @@ nsCSSProps::kSubpropertyTable[eCSSProper
 /* static */ bool
 nsCSSProps::gPropertyEnabled[eCSSProperty_COUNT_with_aliases] = {
   // If the property has any "ENABLED_IN" flag set, it is disabled by
   // default. Note that, if a property has pref, whatever its default
   // value is, it will later be changed in nsCSSProps::AddRefTable().
   // If the property has "ENABLED_IN" flags but doesn't have a pref,
   // it is an internal property which is disabled elsewhere.
   #define IS_ENABLED_BY_DEFAULT(flags_) \
-    (!((flags_) & CSS_PROPERTY_ENABLED_MASK))
+    (!((flags_) & (CSS_PROPERTY_ENABLED_MASK | CSS_PROPERTY_PARSE_INACCESSIBLE)))
 
   #define CSS_PROP(name_, id_, method_, flags_, ...) \
     IS_ENABLED_BY_DEFAULT(flags_),
   #include "nsCSSPropList.h"
   #undef CSS_PROP
 
   #define  CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
     IS_ENABLED_BY_DEFAULT(flags_),
--- a/servo/components/style/properties/longhand/ui.mako.rs
+++ b/servo/components/style/properties/longhand/ui.mako.rs
@@ -36,37 +36,37 @@
 
 ${helpers.single_keyword("-moz-window-shadow", "none default menu tooltip sheet", products="gecko",
                          gecko_ffi_name="mWindowShadow",
                          gecko_constant_prefix="NS_STYLE_WINDOW_SHADOW",
                          animation_value_type="discrete",
                          enabled_in="chrome",
                          spec="None (Nonstandard internal property)")}
 
+// TODO(bug 1419695) This should be hidden from content.
 ${helpers.predefined_type("-moz-window-opacity", "Opacity", "1.0", products="gecko",
                           gecko_ffi_name="mWindowOpacity",
                           animation_value_type="ComputedValue",
-                          enabled_in="chrome",
                           spec="None (Nonstandard internal property)")}
 
+// TODO(bug 1419695) This should be hidden from content.
 ${helpers.predefined_type("-moz-window-transform", "Transform",
                           "generics::transform::Transform::none()",
                           products="gecko", gecko_ffi_name="mSpecifiedWindowTransform",
                           animation_value_type="ComputedValue",
-                          enabled_in="chrome",
                           spec="None (Nonstandard internal property)")}
 
+// TODO(bug 1419695) This should be hidden from content.
 ${helpers.predefined_type("-moz-window-transform-origin",
                           "TransformOrigin",
                           "computed::TransformOrigin::initial_value()",
                           animation_value_type="ComputedValue",
                           gecko_ffi_name="mWindowTransformOrigin",
                           products="gecko",
                           boxed=True,
-                          enabled_in="chrome",
                           spec="None (Nonstandard internal property)")}
 
 // TODO(emilio): Probably also should be hidden from content.
 ${helpers.predefined_type("-moz-force-broken-image-icon",
                           "MozForceBrokenImageIcon",
                           "computed::MozForceBrokenImageIcon::false_value()",
                           animation_value_type="discrete",
                           products="gecko",