From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../style/properties/longhands/list.mako.rs | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 servo/components/style/properties/longhands/list.mako.rs (limited to 'servo/components/style/properties/longhands/list.mako.rs') diff --git a/servo/components/style/properties/longhands/list.mako.rs b/servo/components/style/properties/longhands/list.mako.rs new file mode 100644 index 0000000000..51f5bf1192 --- /dev/null +++ b/servo/components/style/properties/longhands/list.mako.rs @@ -0,0 +1,75 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +<%namespace name="helpers" file="/helpers.mako.rs" /> + +<% data.new_style_struct("List", inherited=True) %> + +${helpers.single_keyword( + "list-style-position", + "outside inside", + engines="gecko servo-2013 servo-2020", + servo_2020_pref="layout.2020.unimplemented", + gecko_enum_prefix="StyleListStylePosition", + animation_value_type="discrete", + spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position", + servo_restyle_damage="rebuild_and_reflow", +)} + +// TODO(pcwalton): Implement the full set of counter styles per CSS-COUNTER-STYLES [1] 6.1: +// +// decimal-leading-zero, armenian, upper-armenian, lower-armenian, georgian, lower-roman, +// upper-roman +// +// [1]: http://dev.w3.org/csswg/css-counter-styles/ +% if engine in ["servo-2013", "servo-2020"]: + ${helpers.single_keyword( + "list-style-type", + "disc none circle square disclosure-open disclosure-closed", + extra_servo_2013_values=""" + decimal lower-alpha upper-alpha arabic-indic bengali cambodian cjk-decimal devanagari + gujarati gurmukhi kannada khmer lao malayalam mongolian myanmar oriya persian telugu + thai tibetan cjk-earthly-branch cjk-heavenly-stem lower-greek hiragana hiragana-iroha + katakana katakana-iroha + """, + engines="servo-2013 servo-2020", + animation_value_type="discrete", + spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type", + servo_restyle_damage="rebuild_and_reflow", + )} +% endif +% if engine == "gecko": + ${helpers.predefined_type( + "list-style-type", + "ListStyleType", + "computed::ListStyleType::disc()", + engines="gecko", + initial_specified_value="specified::ListStyleType::disc()", + animation_value_type="discrete", + boxed=True, + spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type", + servo_restyle_damage="rebuild_and_reflow", + )} +% endif + +${helpers.predefined_type( + "list-style-image", + "Image", + engines="gecko servo-2013 servo-2020", + initial_value="computed::Image::None", + initial_specified_value="specified::Image::None", + animation_value_type="discrete", + spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image", + servo_restyle_damage="rebuild_and_reflow", +)} + +${helpers.predefined_type( + "quotes", + "Quotes", + "computed::Quotes::get_initial_value()", + engines="gecko servo-2013", + animation_value_type="discrete", + spec="https://drafts.csswg.org/css-content/#propdef-quotes", + servo_restyle_damage="rebuild_and_reflow", +)} -- cgit v1.2.3