From 3ec38e252fc32a7e7ad8b8171cdc51907d3fc37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 1 Aug 2019 13:22:53 +0200 Subject: [PATCH] style: Remove the GetCSNeedsLayoutFlush flag, as it is unneeded now. Differential Revision: https://phabricator.services.mozilla.com/D40300 --- components/style/properties/longhands/border.mako.rs | 1 - components/style/properties/longhands/box.mako.rs | 5 +---- components/style/properties/longhands/inherited_text.mako.rs | 1 - components/style/properties/longhands/margin.mako.rs | 1 - components/style/properties/longhands/padding.mako.rs | 1 - components/style/properties/longhands/position.mako.rs | 4 ---- components/style/properties/longhands/ui.mako.rs | 2 -- components/style/properties/properties.mako.rs | 5 +---- 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/components/style/properties/longhands/border.mako.rs b/components/style/properties/longhands/border.mako.rs index 6ac01034bed..4098a94208f 100644 --- a/components/style/properties/longhands/border.mako.rs +++ b/components/style/properties/longhands/border.mako.rs @@ -58,7 +58,6 @@ animation_value_type="NonNegativeLength", logical=is_logical, logical_group="border-width", - flags="GETCS_NEEDS_LAYOUT_FLUSH", allow_quirks="No" if is_logical else "Yes", servo_restyle_damage="reflow rebuild_and_reflow_inline" )} diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index cc464740e2e..4dcc43aec23 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -339,8 +339,7 @@ ${helpers.predefined_type( servo_2020_pref="layout.2020.unimplemented", extra_prefixes=transform_extra_prefixes, animation_value_type="ComputedValue", - flags="CREATES_STACKING_CONTEXT FIXPOS_CB \ - GETCS_NEEDS_LAYOUT_FLUSH CAN_ANIMATE_ON_COMPOSITOR", + flags="CREATES_STACKING_CONTEXT FIXPOS_CB CAN_ANIMATE_ON_COMPOSITOR", spec="https://drafts.csswg.org/css-transforms/#propdef-transform", servo_restyle_damage="reflow_out_of_flow", )} @@ -552,7 +551,6 @@ ${helpers.predefined_type( boxed=True, extra_prefixes=transform_extra_prefixes, spec="https://drafts.csswg.org/css-transforms-2/#perspective-origin-property", - flags="GETCS_NEEDS_LAYOUT_FLUSH", animation_value_type="ComputedValue", servo_restyle_damage="reflow_out_of_flow" )} @@ -600,7 +598,6 @@ ${helpers.predefined_type( extra_prefixes=transform_extra_prefixes, gecko_ffi_name="mTransformOrigin", boxed=True, - flags="GETCS_NEEDS_LAYOUT_FLUSH", spec="https://drafts.csswg.org/css-transforms/#transform-origin-property", servo_restyle_damage="reflow_out_of_flow", )} diff --git a/components/style/properties/longhands/inherited_text.mako.rs b/components/style/properties/longhands/inherited_text.mako.rs index f45369c27c7..5b7108506c4 100644 --- a/components/style/properties/longhands/inherited_text.mako.rs +++ b/components/style/properties/longhands/inherited_text.mako.rs @@ -23,7 +23,6 @@ ${helpers.predefined_type( engines="gecko servo-2013 servo-2020", servo_2020_pref="layout.2020.unimplemented", animation_value_type="LineHeight", - flags="GETCS_NEEDS_LAYOUT_FLUSH", spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height", servo_restyle_damage="reflow" )} diff --git a/components/style/properties/longhands/margin.mako.rs b/components/style/properties/longhands/margin.mako.rs index 820634be995..9ec1e97504c 100644 --- a/components/style/properties/longhands/margin.mako.rs +++ b/components/style/properties/longhands/margin.mako.rs @@ -24,7 +24,6 @@ logical=side[1], logical_group="margin", spec=spec, - flags="GETCS_NEEDS_LAYOUT_FLUSH", allowed_in_page_rule=True, servo_restyle_damage="reflow" )} diff --git a/components/style/properties/longhands/padding.mako.rs b/components/style/properties/longhands/padding.mako.rs index faa3fb2867c..a91f1238979 100644 --- a/components/style/properties/longhands/padding.mako.rs +++ b/components/style/properties/longhands/padding.mako.rs @@ -23,7 +23,6 @@ logical=side[1], logical_group="padding", spec=spec, - flags="GETCS_NEEDS_LAYOUT_FLUSH", allow_quirks="No" if side[1] else "Yes", servo_restyle_damage="reflow rebuild_and_reflow_inline" )} diff --git a/components/style/properties/longhands/position.mako.rs b/components/style/properties/longhands/position.mako.rs index 9e67dfb2d80..f5d1a1d1cd0 100644 --- a/components/style/properties/longhands/position.mako.rs +++ b/components/style/properties/longhands/position.mako.rs @@ -17,7 +17,6 @@ engines="gecko servo-2013 servo-2020", servo_2020_pref="layout.2020.unimplemented", spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side, - flags="GETCS_NEEDS_LAYOUT_FLUSH", animation_value_type="ComputedValue", allow_quirks="Yes", servo_restyle_damage="reflow_out_of_flow", @@ -33,7 +32,6 @@ engines="gecko servo-2013 servo-2020", servo_2020_pref="layout.2020.unimplemented", spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side, - flags="GETCS_NEEDS_LAYOUT_FLUSH", alias="offset-%s:layout.css.offset-logical-properties.enabled" % side, animation_value_type="ComputedValue", logical=True, @@ -285,7 +283,6 @@ ${helpers.predefined_type( allow_quirks="No" if logical else "Yes", spec=spec % size, animation_value_type="Size", - flags="GETCS_NEEDS_LAYOUT_FLUSH", servo_restyle_damage="reflow", )} // min-width, min-height, min-block-size, min-inline-size @@ -379,7 +376,6 @@ ${helpers.predefined_type( engines="gecko", spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-%ss" % kind, boxed=True, - flags="GETCS_NEEDS_LAYOUT_FLUSH", animation_value_type="ComputedValue", )} diff --git a/components/style/properties/longhands/ui.mako.rs b/components/style/properties/longhands/ui.mako.rs index d59be17a27a..64702855967 100644 --- a/components/style/properties/longhands/ui.mako.rs +++ b/components/style/properties/longhands/ui.mako.rs @@ -80,7 +80,6 @@ ${helpers.predefined_type( "Transform", "generics::transform::Transform::none()", engines="gecko", - flags="GETCS_NEEDS_LAYOUT_FLUSH", animation_value_type="ComputedValue", spec="None (Nonstandard internal property)", enabled_in="chrome", @@ -94,7 +93,6 @@ ${helpers.predefined_type( animation_value_type="ComputedValue", gecko_ffi_name="mWindowTransformOrigin", boxed=True, - flags="GETCS_NEEDS_LAYOUT_FLUSH", spec="None (Nonstandard internal property)", enabled_in="chrome", )} diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index c16de38f204..72ae381f5d9 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -981,13 +981,10 @@ bitflags! { const APPLIES_TO_CUE = 1 << 6; /// This longhand property applies to ::marker. const APPLIES_TO_MARKER = 1 << 7; - /// This property's getComputedStyle implementation requires layout - /// to be flushed. - const GETCS_NEEDS_LAYOUT_FLUSH = 1 << 8; /// This property is a legacy shorthand. /// /// https://drafts.csswg.org/css-cascade/#legacy-shorthand - const IS_LEGACY_SHORTHAND = 1 << 9; + const IS_LEGACY_SHORTHAND = 1 << 8; /* The following flags are currently not used in Rust code, they * only need to be listed in corresponding properties so that