From 6d9580fef0a6b14b0955af061647f9b9f8da2329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 21 May 2023 23:37:16 +0200 Subject: [PATCH] style: Specify has_no_effect_on_gecko_scrollbars on inherited internal properties Otherwise we assert due to the styles being different from the cached ones, but it doesn't matter as these don't influence Gecko scrollbars. Differential Revision: https://phabricator.services.mozilla.com/D117147 --- components/style/properties/data.py | 5 +++-- components/style/properties/longhands/font.mako.rs | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/style/properties/data.py b/components/style/properties/data.py index 8f3c7d35269..b2ab520ad3d 100644 --- a/components/style/properties/data.py +++ b/components/style/properties/data.py @@ -340,13 +340,14 @@ class Longhand(Property): assert ( has_effect_on_gecko_scrollbars in [None, False, True] and not style_struct.inherited - or (gecko_pref is None) == (has_effect_on_gecko_scrollbars is None) + or (gecko_pref is None and enabled_in != "") + == (has_effect_on_gecko_scrollbars is None) ), ( "Property " + name + ": has_effect_on_gecko_scrollbars must be " + "specified, and must have a value of True or False, iff a " - + "property is inherited and is behind a Gecko pref" + + "property is inherited and is behind a Gecko pref or internal" ) self.need_index = need_index self.gecko_ffi_name = gecko_ffi_name or "m" + self.camel_case diff --git a/components/style/properties/longhands/font.mako.rs b/components/style/properties/longhands/font.mako.rs index e84a5574d1a..f5304355e03 100644 --- a/components/style/properties/longhands/font.mako.rs +++ b/components/style/properties/longhands/font.mako.rs @@ -213,6 +213,7 @@ ${helpers.predefined_type( initial_value="computed::XLang::get_initial_value()", animation_value_type="none", enabled_in="", + has_effect_on_gecko_scrollbars=False, spec="Internal (not web-exposed)", )} @@ -224,6 +225,7 @@ ${helpers.predefined_type( animation_value_type="none", gecko_ffi_name="mScriptSizeMultiplier", enabled_in="", + has_effect_on_gecko_scrollbars=False, spec="Internal (not web-exposed)", )} @@ -263,6 +265,7 @@ ${helpers.single_keyword( spec="Internal (not web-exposed)", animation_value_type="none", enabled_in="", + has_effect_on_gecko_scrollbars=False, needs_conversion=True, )} @@ -273,6 +276,7 @@ ${helpers.predefined_type( engines="gecko", animation_value_type="none", enabled_in="", + has_effect_on_gecko_scrollbars=False, gecko_ffi_name="mScriptMinSize", spec="Internal (not web-exposed)", )} @@ -284,6 +288,7 @@ ${helpers.predefined_type( engines="gecko", animation_value_type="none", enabled_in="", + has_effect_on_gecko_scrollbars=False, spec="Internal (not web-exposed)", )}