diff --git a/components/style/properties/cascade.rs b/components/style/properties/cascade.rs index 1e362fb1bc4..3d64dde7e2c 100644 --- a/components/style/properties/cascade.rs +++ b/components/style/properties/cascade.rs @@ -153,7 +153,7 @@ where // longhands are only allowed if they have our // restriction flag set. if let PropertyDeclarationId::Longhand(id) = declaration.id() { - if !id.flags().contains(restriction) { + if !id.flags().contains(restriction) && cascade_level.origin() != Origin::UserAgent { return None; } } diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index 0a15047038a..fd4e248534c 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -9,15 +9,12 @@ inherited=False, gecko_name="Display") %> -// We allow "display" to apply to placeholders because we need to make the -// placeholder pseudo-element an inline-block in the UA stylesheet in Gecko. ${helpers.predefined_type( "display", "Display", "computed::Display::inline()", initial_specified_value="specified::Display::inline()", animation_value_type="discrete", - flags="APPLIES_TO_PLACEHOLDER", spec="https://drafts.csswg.org/css-display/#propdef-display", servo_restyle_damage="rebuild_and_reflow", needs_context=product == "gecko" @@ -103,7 +100,6 @@ ${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box", products="gecko", enabled_in="ua", needs_context=False, - flags="APPLIES_TO_PLACEHOLDER", gecko_pref="layout.css.overflow-clip-box.enabled", animation_value_type="discrete", spec="Internal, may be standardized in the future: \ @@ -111,9 +107,6 @@ ${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box", )} % endfor -// FIXME(pcwalton, #2742): Implement scrolling for `scroll` and `auto`. -// -// We allow it to apply to placeholders for UA sheets, which set it !important. % for (axis, logical) in ALL_AXES: <% full_name = "overflow-{}".format(axis) %> ${helpers.predefined_type( @@ -123,7 +116,6 @@ ${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box", logical_group="overflow", logical=logical, animation_value_type="discrete", - flags="APPLIES_TO_PLACEHOLDER", spec="https://drafts.csswg.org/css-overflow-3/#propdef-{}".format(full_name), needs_context=False, servo_restyle_damage = "reflow", @@ -477,10 +469,6 @@ ${helpers.predefined_type( // CSS Basic User Interface Module Level 3 // http://dev.w3.org/csswg/css-ui -// -// This is APPLIES_TO_PLACEHOLDER so we can override, in the UA sheet, the -// 'resize' property we'd inherit from textarea otherwise. Basically, just -// makes the UA rules easier to write. ${helpers.predefined_type( "resize", "Resize", @@ -489,7 +477,6 @@ ${helpers.predefined_type( animation_value_type="discrete", needs_context=False, gecko_ffi_name="mResize", - flags="APPLIES_TO_PLACEHOLDER", spec="https://drafts.csswg.org/css-ui/#propdef-resize", )} diff --git a/components/style/properties/longhands/inherited_box.mako.rs b/components/style/properties/longhands/inherited_box.mako.rs index f14c485b801..94ed265defa 100644 --- a/components/style/properties/longhands/inherited_box.mako.rs +++ b/components/style/properties/longhands/inherited_box.mako.rs @@ -29,7 +29,6 @@ ${helpers.single_keyword( servo_pref="layout.writing-mode.enabled", animation_value_type="none", spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode", - flags="APPLIES_TO_CUE", servo_restyle_damage="rebuild_and_reflow", )} diff --git a/components/style/properties/longhands/inherited_text.mako.rs b/components/style/properties/longhands/inherited_text.mako.rs index 614685f38d5..8a1c604c703 100644 --- a/components/style/properties/longhands/inherited_text.mako.rs +++ b/components/style/properties/longhands/inherited_text.mako.rs @@ -78,7 +78,6 @@ ${helpers.predefined_type( "computed::OverflowWrap::Normal", animation_value_type="discrete", spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap", - flags="APPLIES_TO_CUE", alias="word-wrap", needs_context=False, servo_restyle_damage="rebuild_and_reflow", @@ -182,7 +181,6 @@ ${helpers.predefined_type( gecko_enum_prefix="StyleWhiteSpace" needs_conversion="True" animation_value_type="discrete" - // Only allowed for UA sheets, which set it !important. flags="APPLIES_TO_CUE APPLIES_TO_PLACEHOLDER" spec="https://drafts.csswg.org/css-text/#propdef-white-space" servo_restyle_damage="rebuild_and_reflow" diff --git a/components/style/properties/longhands/inherited_ui.mako.rs b/components/style/properties/longhands/inherited_ui.mako.rs index 2bdb267ffb2..477bda6839d 100644 --- a/components/style/properties/longhands/inherited_ui.mako.rs +++ b/components/style/properties/longhands/inherited_ui.mako.rs @@ -23,7 +23,6 @@ ${helpers.single_keyword( "auto none", animation_value_type="discrete", extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all", - flags="APPLIES_TO_PLACEHOLDER", spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty", )} diff --git a/components/style/properties/longhands/padding.mako.rs b/components/style/properties/longhands/padding.mako.rs index 6142bbf901e..09de317f0ac 100644 --- a/components/style/properties/longhands/padding.mako.rs +++ b/components/style/properties/longhands/padding.mako.rs @@ -6,8 +6,6 @@ <% from data import ALL_SIDES, maybe_moz_logical_alias %> <% data.new_style_struct("Padding", inherited=False) %> -// APPLIES_TO_PLACEHOLDER so we can set it in UA stylesheets. But we use a -// !important value there, so pages can't set it. % for side in ALL_SIDES: <% spec = "https://drafts.csswg.org/css-box/#propdef-padding-%s" % side[0] @@ -23,7 +21,7 @@ logical=side[1], logical_group="padding", spec=spec, - flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_PLACEHOLDER GETCS_NEEDS_LAYOUT_FLUSH", + flags="APPLIES_TO_FIRST_LETTER GETCS_NEEDS_LAYOUT_FLUSH", allow_quirks="No" if side[1] else "Yes", servo_restyle_damage="reflow rebuild_and_reflow_inline" )}