mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Change experimental to servo_pref.
This commit is contained in:
parent
24c4afa8d3
commit
f4683d1718
6 changed files with 14 additions and 14 deletions
|
@ -81,7 +81,7 @@ def write(directory, filename, content):
|
|||
def write_html(properties):
|
||||
properties = dict(
|
||||
(p.name, {
|
||||
"flag": p.experimental,
|
||||
"flag": p.servo_pref,
|
||||
"shorthand": hasattr(p, "sub_properties")
|
||||
})
|
||||
for p in properties.longhands + properties.shorthands
|
||||
|
|
|
@ -146,7 +146,7 @@ def arg_to_bool(arg):
|
|||
|
||||
class Longhand(object):
|
||||
def __init__(self, style_struct, name, spec=None, animation_value_type=None, derived_from=None, keyword=None,
|
||||
predefined_type=None, custom_cascade=False, experimental=False, internal=False,
|
||||
predefined_type=None, custom_cascade=False, servo_pref=None, internal=False,
|
||||
need_index=False, custom_cascade_function=None, gecko_ffi_name=None,
|
||||
allowed_in_keyframe_block=True, cast_type='u8',
|
||||
logical=False, alias=None, extra_prefixes=None, boxed=False,
|
||||
|
@ -161,7 +161,7 @@ class Longhand(object):
|
|||
self.ident = to_rust_ident(name)
|
||||
self.camel_case = to_camel_case(self.ident)
|
||||
self.style_struct = style_struct
|
||||
self.experimental = ("layout.%s.enabled" % name) if experimental else None
|
||||
self.servo_pref = servo_pref
|
||||
self.custom_cascade = custom_cascade
|
||||
self.custom_cascade_function = custom_cascade_function if custom_cascade else None
|
||||
self.internal = internal
|
||||
|
@ -207,7 +207,7 @@ class Longhand(object):
|
|||
|
||||
|
||||
class Shorthand(object):
|
||||
def __init__(self, name, sub_properties, spec=None, experimental=False, internal=False,
|
||||
def __init__(self, name, sub_properties, spec=None, servo_pref=None, internal=False,
|
||||
allowed_in_keyframe_block=True, alias=None, extra_prefixes=None,
|
||||
allowed_in_page_rule=False, flags=None, gecko_pref_ident=None):
|
||||
self.name = name
|
||||
|
@ -217,7 +217,7 @@ class Shorthand(object):
|
|||
self.ident = to_rust_ident(name)
|
||||
self.camel_case = to_camel_case(self.ident)
|
||||
self.derived_from = None
|
||||
self.experimental = ("layout.%s.enabled" % name) if experimental else None
|
||||
self.servo_pref = servo_pref
|
||||
self.sub_properties = sub_properties
|
||||
self.internal = internal
|
||||
self.alias = alias.split() if alias else []
|
||||
|
@ -260,7 +260,7 @@ class Alias(object):
|
|||
self.camel_case = to_camel_case(self.ident)
|
||||
self.gecko_pref_ident = to_rust_ident(name)
|
||||
self.internal = original.internal
|
||||
self.experimental = original.experimental
|
||||
self.servo_pref = original.servo_pref
|
||||
self.allowed_in_page_rule = original.allowed_in_page_rule
|
||||
self.allowed_in_keyframe_block = original.allowed_in_keyframe_block
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ ${helpers.predefined_type("column-width",
|
|||
initial_specified_value="Either::Second(Auto)",
|
||||
extra_prefixes="moz",
|
||||
animation_value_type="NonNegativeLengthOrAuto",
|
||||
experimental=True,
|
||||
servo_pref="layout.column-width.enabled",
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-width")}
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ ${helpers.predefined_type("column-count",
|
|||
"PositiveIntegerOrAuto",
|
||||
"Either::Second(Auto)",
|
||||
initial_specified_value="Either::Second(Auto)",
|
||||
experimental="True",
|
||||
servo_pref="layout.column-count.enabled",
|
||||
animation_value_type="PositiveIntegerOrAuto",
|
||||
extra_prefixes="moz",
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count")}
|
||||
|
@ -29,7 +29,7 @@ ${helpers.predefined_type("column-gap",
|
|||
"length::NonNegativeLengthOrNormal",
|
||||
"Either::Second(Normal)",
|
||||
extra_prefixes="moz",
|
||||
experimental=True,
|
||||
servo_pref="layout.column-gap.enabled",
|
||||
animation_value_type="NonNegativeLengthOrNormal",
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap")}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ ${helpers.single_keyword("writing-mode",
|
|||
extra_gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
|
||||
rl=horizontal-tb rl-tb=horizontal-tb \
|
||||
tb=vertical-rl tb-rl=vertical-rl",
|
||||
experimental=True,
|
||||
servo_pref="layout.writing-mode.enabled",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode")}
|
||||
|
||||
|
|
|
@ -1293,7 +1293,7 @@ impl PropertyId {
|
|||
${id_set("INTERNAL", lambda p: p.internal)}
|
||||
|
||||
% if product == "servo":
|
||||
${id_set("EXPERIMENTAL", lambda p: p.experimental)}
|
||||
${id_set("EXPERIMENTAL", lambda p: p.servo_pref)}
|
||||
% endif
|
||||
% if product == "gecko":
|
||||
use gecko_bindings::structs::root::mozilla;
|
||||
|
@ -1321,8 +1321,8 @@ impl PropertyId {
|
|||
% if product == "servo":
|
||||
static PREF_NAME: [Option< &str>; ${len(data.longhands) + len(data.shorthands)}] = [
|
||||
% for property in data.longhands + data.shorthands:
|
||||
% if property.experimental:
|
||||
Some("${property.experimental}"),
|
||||
% if property.servo_pref:
|
||||
Some("${property.servo_pref}"),
|
||||
% else:
|
||||
None,
|
||||
% endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<%helpers:shorthand name="columns"
|
||||
sub_properties="column-width column-count"
|
||||
experimental="True"
|
||||
servo_pref="layout.columns.enabled",
|
||||
derive_serialize="True"
|
||||
extra_prefixes="moz" spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
|
||||
use properties::longhands::{column_count, column_width};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue