aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-14 09:23:05 -0800
committerGitHub <noreply@github.com>2017-01-14 09:23:05 -0800
commit4c401e47dc6ed36a40ccd0bcf85cb8697397f71f (patch)
tree0d04c8515c396e8d101f3bfb83fa2392c12c161e
parent7eb811b837545c295506c25207c891126b6db0ff (diff)
parent05728839f1bf64c4e5afbea2bba32347abd22c8f (diff)
downloadservo-4c401e47dc6ed36a40ccd0bcf85cb8697397f71f.tar.gz
servo-4c401e47dc6ed36a40ccd0bcf85cb8697397f71f.zip
Auto merge of #14999 - Manishearth:stylo-prefs, r=heycam
stylo: Hook property parsing into Gecko prefs r=heycam, https://bugzilla.mozilla.org/show_bug.cgi?id=1297322 This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14999) <!-- Reviewable:end --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14999) <!-- Reviewable:end -->
-rw-r--r--components/style/build_gecko.rs4
-rw-r--r--components/style/gecko_bindings/bindings.rs3
-rw-r--r--components/style/gecko_bindings/structs_debug.rs372
-rw-r--r--components/style/gecko_bindings/structs_release.rs372
-rw-r--r--components/style/properties/properties.mako.rs94
5 files changed, 820 insertions, 25 deletions
diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs
index 0420b498a73..6a524f6ddc0 100644
--- a/components/style/build_gecko.rs
+++ b/components/style/build_gecko.rs
@@ -226,6 +226,7 @@ mod bindings {
..CodegenConfig::nothing()
})
.header(add_include("nsStyleStruct.h"))
+ .include(add_include("mozilla/ServoPropPrefList.h"))
.header(add_include("mozilla/StyleAnimationValue.h"))
.include(add_include("gfxFontConstants.h"))
.include(add_include("nsThemeConstants.h"))
@@ -251,7 +252,8 @@ mod bindings {
"NS_STYLE_.*",
"NS_RADIUS_.*",
"BORDER_COLOR_.*",
- "BORDER_STYLE_.*"
+ "BORDER_STYLE_.*",
+ "mozilla::SERVO_PREF_.*",
];
let whitelist = [
"RawGecko.*",
diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs
index b5c454db594..2f8a6aa9c34 100644
--- a/components/style/gecko_bindings/bindings.rs
+++ b/components/style/gecko_bindings/bindings.rs
@@ -757,6 +757,9 @@ extern "C" {
*mut nsCSSValueSharedList);
}
extern "C" {
+ pub fn Gecko_PropertyId_IsPrefEnabled(id: nsCSSPropertyID) -> bool;
+}
+extern "C" {
pub fn Gecko_Construct_Default_nsStyleFont(ptr: *mut nsStyleFont,
pres_context:
RawGeckoPresContextBorrowed);
diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs
index daf706f3353..19635b1e959 100644
--- a/components/style/gecko_bindings/structs_debug.rs
+++ b/components/style/gecko_bindings/structs_debug.rs
@@ -1052,6 +1052,378 @@ pub mod root {
pub mod mozilla {
#[allow(unused_imports)]
use self::super::super::root;
+ pub const SERVO_PREF_ENABLED_align_content: bool = false;
+ pub const SERVO_PREF_ENABLED_align_items: bool = false;
+ pub const SERVO_PREF_ENABLED_align_self: bool = false;
+ pub const SERVO_PREF_ENABLED_all: bool = true;
+ pub const SERVO_PREF_ENABLED_animation: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_delay: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_direction: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_duration: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_fill_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_iteration_count: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_name: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_play_state: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_timing_function: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_appearance: bool = false;
+ pub const SERVO_PREF_ENABLED_backface_visibility: bool = false;
+ pub const SERVO_PREF_ENABLED_background: bool = false;
+ pub const SERVO_PREF_ENABLED_background_attachment: bool = false;
+ pub const SERVO_PREF_ENABLED_background_blend_mode: bool = true;
+ pub const SERVO_PREF_ENABLED_background_clip: bool = false;
+ pub const SERVO_PREF_ENABLED_background_color: bool = false;
+ pub const SERVO_PREF_ENABLED_background_image: bool = false;
+ pub const SERVO_PREF_ENABLED_background_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_background_position: bool = false;
+ pub const SERVO_PREF_ENABLED_background_position_x: bool = false;
+ pub const SERVO_PREF_ENABLED_background_position_y: bool = false;
+ pub const SERVO_PREF_ENABLED_background_repeat: bool = false;
+ pub const SERVO_PREF_ENABLED_background_size: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_binding: bool = false;
+ pub const SERVO_PREF_ENABLED_block_size: bool = false;
+ pub const SERVO_PREF_ENABLED_border: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_bottom_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_left_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_right_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_collapse: bool = false;
+ pub const SERVO_PREF_ENABLED_border_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_outset: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_repeat: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_slice: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_source: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_left_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_right_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_spacing: bool = false;
+ pub const SERVO_PREF_ENABLED_border_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_top_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_left_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_right_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_width: bool = false;
+ pub const SERVO_PREF_ENABLED_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_align: bool = false;
+ pub const SERVO_PREF_ENABLED_box_decoration_break: bool = true;
+ pub const SERVO_PREF_ENABLED__moz_box_direction: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_flex: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_ordinal_group: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_orient: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_pack: bool = false;
+ pub const SERVO_PREF_ENABLED_box_shadow: bool = false;
+ pub const SERVO_PREF_ENABLED_box_sizing: bool = false;
+ pub const SERVO_PREF_ENABLED_caption_side: bool = false;
+ pub const SERVO_PREF_ENABLED_caret_color: bool = false;
+ pub const SERVO_PREF_ENABLED_clear: bool = false;
+ pub const SERVO_PREF_ENABLED_clip: bool = false;
+ pub const SERVO_PREF_ENABLED_clip_path: bool = false;
+ pub const SERVO_PREF_ENABLED_clip_rule: bool = false;
+ pub const SERVO_PREF_ENABLED_color: bool = false;
+ pub const SERVO_PREF_ENABLED_color_adjust: bool = true;
+ pub const SERVO_PREF_ENABLED_color_interpolation: bool = false;
+ pub const SERVO_PREF_ENABLED_color_interpolation_filters: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_column_count: bool = false;
+ pub const SERVO_PREF_ENABLED_column_fill: bool = false;
+ pub const SERVO_PREF_ENABLED_column_gap: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule_color: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule_style: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule_width: bool = false;
+ pub const SERVO_PREF_ENABLED_column_width: bool = false;
+ pub const SERVO_PREF_ENABLED_columns: bool = false;
+ pub const SERVO_PREF_ENABLED_contain: bool = true;
+ pub const SERVO_PREF_ENABLED_content: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_control_character_visibility: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_counter_increment: bool = false;
+ pub const SERVO_PREF_ENABLED_counter_reset: bool = false;
+ pub const SERVO_PREF_ENABLED_cursor: bool = false;
+ pub const SERVO_PREF_ENABLED_direction: bool = false;
+ pub const SERVO_PREF_ENABLED_display: bool = false;
+ pub const SERVO_PREF_ENABLED_dominant_baseline: bool = false;
+ pub const SERVO_PREF_ENABLED_empty_cells: bool = false;
+ pub const SERVO_PREF_ENABLED_fill: bool = false;
+ pub const SERVO_PREF_ENABLED_fill_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_fill_rule: bool = false;
+ pub const SERVO_PREF_ENABLED_filter: bool = false;
+ pub const SERVO_PREF_ENABLED_flex: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_basis: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_direction: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_flow: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_grow: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_shrink: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_wrap: bool = false;
+ pub const SERVO_PREF_ENABLED_float_: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_float_edge: bool = false;
+ pub const SERVO_PREF_ENABLED_flood_color: bool = false;
+ pub const SERVO_PREF_ENABLED_flood_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_font: bool = false;
+ pub const SERVO_PREF_ENABLED_font_family: bool = false;
+ pub const SERVO_PREF_ENABLED_font_feature_settings: bool = false;
+ pub const SERVO_PREF_ENABLED_font_kerning: bool = false;
+ pub const SERVO_PREF_ENABLED_font_language_override: bool = false;
+ pub const SERVO_PREF_ENABLED_font_size: bool = false;
+ pub const SERVO_PREF_ENABLED_font_size_adjust: bool = false;
+ pub const SERVO_PREF_ENABLED_font_stretch: bool = false;
+ pub const SERVO_PREF_ENABLED_font_style: bool = false;
+ pub const SERVO_PREF_ENABLED_font_synthesis: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_alternates: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_caps: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_east_asian: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_ligatures: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_numeric: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_position: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variation_settings: bool = true;
+ pub const SERVO_PREF_ENABLED_font_weight: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_force_broken_image_icon: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_grid: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_area: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_auto_columns: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_auto_flow: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_auto_rows: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column_end: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column_gap: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column_start: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_gap: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row_end: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row_gap: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row_start: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template_areas: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template_columns: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template_rows: bool = true;
+ pub const SERVO_PREF_ENABLED_height: bool = false;
+ pub const SERVO_PREF_ENABLED_hyphens: bool = false;
+ pub const SERVO_PREF_ENABLED_initial_letter: bool = true;
+ pub const SERVO_PREF_ENABLED_image_orientation: bool = true;
+ pub const SERVO_PREF_ENABLED__moz_image_region: bool = false;
+ pub const SERVO_PREF_ENABLED_image_rendering: bool = false;
+ pub const SERVO_PREF_ENABLED_ime_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_inline_size: bool = false;
+ pub const SERVO_PREF_ENABLED_isolation: bool = true;
+ pub const SERVO_PREF_ENABLED_justify_content: bool = false;
+ pub const SERVO_PREF_ENABLED_justify_items: bool = false;
+ pub const SERVO_PREF_ENABLED_justify_self: bool = false;
+ pub const SERVO_PREF_ENABLED__x_lang: bool = false;
+ pub const SERVO_PREF_ENABLED_left: bool = false;
+ pub const SERVO_PREF_ENABLED_letter_spacing: bool = false;
+ pub const SERVO_PREF_ENABLED_lighting_color: bool = false;
+ pub const SERVO_PREF_ENABLED_line_height: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style_image: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style_position: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style_type: bool = false;
+ pub const SERVO_PREF_ENABLED_margin: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_left: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_right: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_top: bool = false;
+ pub const SERVO_PREF_ENABLED_marker: bool = false;
+ pub const SERVO_PREF_ENABLED_marker_end: bool = false;
+ pub const SERVO_PREF_ENABLED_marker_mid: bool = false;
+ pub const SERVO_PREF_ENABLED_marker_start: bool = false;
+ pub const SERVO_PREF_ENABLED_mask: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_clip: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_composite: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_image: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_position: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_position_x: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_position_y: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_repeat: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_size: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_type: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_math_display: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_math_variant: bool = false;
+ pub const SERVO_PREF_ENABLED_max_block_size: bool = false;
+ pub const SERVO_PREF_ENABLED_max_height: bool = false;
+ pub const SERVO_PREF_ENABLED_max_inline_size: bool = false;
+ pub const SERVO_PREF_ENABLED_max_width: bool = false;
+ pub const SERVO_PREF_ENABLED_min_block_size: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_min_font_size_ratio: bool = false;
+ pub const SERVO_PREF_ENABLED_min_height: bool = false;
+ pub const SERVO_PREF_ENABLED_min_inline_size: bool = false;
+ pub const SERVO_PREF_ENABLED_min_width: bool = false;
+ pub const SERVO_PREF_ENABLED_mix_blend_mode: bool = true;
+ pub const SERVO_PREF_ENABLED_object_fit: bool = true;
+ pub const SERVO_PREF_ENABLED_object_position: bool = true;
+ pub const SERVO_PREF_ENABLED_offset_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_offset_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_offset_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_offset_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_order: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_orient: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_osx_font_smoothing: bool = true;
+ pub const SERVO_PREF_ENABLED_outline: bool = false;
+ pub const SERVO_PREF_ENABLED_outline_color: bool = false;
+ pub const SERVO_PREF_ENABLED_outline_offset: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_bottomleft: bool =
+ false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_bottomright: bool =
+ false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_topleft: bool =
+ false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_topright: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_outline_style: bool = false;
+ pub const SERVO_PREF_ENABLED_outline_width: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow_clip_box: bool = true;
+ pub const SERVO_PREF_ENABLED_overflow_x: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow_y: bool = false;
+ pub const SERVO_PREF_ENABLED_padding: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_left: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_right: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_top: bool = false;
+ pub const SERVO_PREF_ENABLED_page_break_after: bool = false;
+ pub const SERVO_PREF_ENABLED_page_break_before: bool = false;
+ pub const SERVO_PREF_ENABLED_page_break_inside: bool = false;
+ pub const SERVO_PREF_ENABLED_paint_order: bool = true;
+ pub const SERVO_PREF_ENABLED_perspective: bool = false;
+ pub const SERVO_PREF_ENABLED_perspective_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_place_content: bool = false;
+ pub const SERVO_PREF_ENABLED_place_items: bool = false;
+ pub const SERVO_PREF_ENABLED_place_self: bool = false;
+ pub const SERVO_PREF_ENABLED_pointer_events: bool = false;
+ pub const SERVO_PREF_ENABLED_position: bool = false;
+ pub const SERVO_PREF_ENABLED_quotes: bool = false;
+ pub const SERVO_PREF_ENABLED_resize: bool = false;
+ pub const SERVO_PREF_ENABLED_right: bool = false;
+ pub const SERVO_PREF_ENABLED_ruby_align: bool = false;
+ pub const SERVO_PREF_ENABLED_ruby_position: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_script_level: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_script_min_size: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_script_size_multiplier: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_scroll_behavior: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_coordinate: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_destination: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_points_x: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_points_y: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_type: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_type_x: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_type_y: bool = true;
+ pub const SERVO_PREF_ENABLED_shape_outside: bool = true;
+ pub const SERVO_PREF_ENABLED_shape_rendering: bool = false;
+ pub const SERVO_PREF_ENABLED__x_span: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_stack_sizing: bool = false;
+ pub const SERVO_PREF_ENABLED_stop_color: bool = false;
+ pub const SERVO_PREF_ENABLED_stop_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_dasharray: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_dashoffset: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_linecap: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_linejoin: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_miterlimit: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_width: bool = false;
+ pub const SERVO_PREF_ENABLED__x_system_font: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_tab_size: bool = false;
+ pub const SERVO_PREF_ENABLED_table_layout: bool = false;
+ pub const SERVO_PREF_ENABLED_text_align: bool = false;
+ pub const SERVO_PREF_ENABLED_text_align_last: bool = false;
+ pub const SERVO_PREF_ENABLED_text_anchor: bool = false;
+ pub const SERVO_PREF_ENABLED_text_combine_upright: bool = true;
+ pub const SERVO_PREF_ENABLED_text_decoration: bool = false;
+ pub const SERVO_PREF_ENABLED_text_decoration_color: bool = false;
+ pub const SERVO_PREF_ENABLED_text_decoration_line: bool = false;
+ pub const SERVO_PREF_ENABLED_text_decoration_style: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis_color: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis_position: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis_style: bool = false;
+ pub const SERVO_PREF_ENABLED__webkit_text_fill_color: bool = true;
+ pub const SERVO_PREF_ENABLED_text_indent: bool = false;
+ pub const SERVO_PREF_ENABLED_text_orientation: bool = false;
+ pub const SERVO_PREF_ENABLED_text_overflow: bool = false;
+ pub const SERVO_PREF_ENABLED_text_rendering: bool = false;
+ pub const SERVO_PREF_ENABLED_text_shadow: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_text_size_adjust: bool = false;
+ pub const SERVO_PREF_ENABLED__webkit_text_stroke: bool = true;
+ pub const SERVO_PREF_ENABLED__webkit_text_stroke_color: bool = true;
+ pub const SERVO_PREF_ENABLED__webkit_text_stroke_width: bool = true;
+ pub const SERVO_PREF_ENABLED_text_transform: bool = false;
+ pub const SERVO_PREF_ENABLED__x_text_zoom: bool = false;
+ pub const SERVO_PREF_ENABLED_top: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_top_layer: bool = false;
+ pub const SERVO_PREF_ENABLED_touch_action: bool = true;
+ pub const SERVO_PREF_ENABLED_transform: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_transform: bool = true;
+ pub const SERVO_PREF_ENABLED_transform_box: bool = true;
+ pub const SERVO_PREF_ENABLED_transform_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_transform_style: bool = false;
+ pub const SERVO_PREF_ENABLED_transition: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_delay: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_duration: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_property: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_timing_function: bool = false;
+ pub const SERVO_PREF_ENABLED_unicode_bidi: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_focus: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_input: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_modify: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_select: bool = false;
+ pub const SERVO_PREF_ENABLED_vector_effect: bool = false;
+ pub const SERVO_PREF_ENABLED_vertical_align: bool = false;
+ pub const SERVO_PREF_ENABLED_visibility: bool = false;
+ pub const SERVO_PREF_ENABLED_white_space: bool = false;
+ pub const SERVO_PREF_ENABLED_width: bool = false;
+ pub const SERVO_PREF_ENABLED_will_change: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_window_dragging: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_window_shadow: bool = false;
+ pub const SERVO_PREF_ENABLED_word_break: bool = false;
+ pub const SERVO_PREF_ENABLED_word_spacing: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow_wrap: bool = false;
+ pub const SERVO_PREF_ENABLED_writing_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_z_index: bool = false;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct fallible_t {
diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs
index 95030a8f8dd..2d7be3d7210 100644
--- a/components/style/gecko_bindings/structs_release.rs
+++ b/components/style/gecko_bindings/structs_release.rs
@@ -1048,6 +1048,378 @@ pub mod root {
pub mod mozilla {
#[allow(unused_imports)]
use self::super::super::root;
+ pub const SERVO_PREF_ENABLED_align_content: bool = false;
+ pub const SERVO_PREF_ENABLED_align_items: bool = false;
+ pub const SERVO_PREF_ENABLED_align_self: bool = false;
+ pub const SERVO_PREF_ENABLED_all: bool = true;
+ pub const SERVO_PREF_ENABLED_animation: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_delay: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_direction: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_duration: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_fill_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_iteration_count: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_name: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_play_state: bool = false;
+ pub const SERVO_PREF_ENABLED_animation_timing_function: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_appearance: bool = false;
+ pub const SERVO_PREF_ENABLED_backface_visibility: bool = false;
+ pub const SERVO_PREF_ENABLED_background: bool = false;
+ pub const SERVO_PREF_ENABLED_background_attachment: bool = false;
+ pub const SERVO_PREF_ENABLED_background_blend_mode: bool = true;
+ pub const SERVO_PREF_ENABLED_background_clip: bool = false;
+ pub const SERVO_PREF_ENABLED_background_color: bool = false;
+ pub const SERVO_PREF_ENABLED_background_image: bool = false;
+ pub const SERVO_PREF_ENABLED_background_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_background_position: bool = false;
+ pub const SERVO_PREF_ENABLED_background_position_x: bool = false;
+ pub const SERVO_PREF_ENABLED_background_position_y: bool = false;
+ pub const SERVO_PREF_ENABLED_background_repeat: bool = false;
+ pub const SERVO_PREF_ENABLED_background_size: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_binding: bool = false;
+ pub const SERVO_PREF_ENABLED_block_size: bool = false;
+ pub const SERVO_PREF_ENABLED_border: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_end_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_block_start_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_bottom_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_left_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_right_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_bottom_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_collapse: bool = false;
+ pub const SERVO_PREF_ENABLED_border_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_outset: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_repeat: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_slice: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_source: bool = false;
+ pub const SERVO_PREF_ENABLED_border_image_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_end_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start_color: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_inline_start_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_left_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_left_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_right_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_right_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_spacing: bool = false;
+ pub const SERVO_PREF_ENABLED_border_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_color: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_border_top_colors: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_left_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_right_radius: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_style: bool = false;
+ pub const SERVO_PREF_ENABLED_border_top_width: bool = false;
+ pub const SERVO_PREF_ENABLED_border_width: bool = false;
+ pub const SERVO_PREF_ENABLED_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_align: bool = false;
+ pub const SERVO_PREF_ENABLED_box_decoration_break: bool = true;
+ pub const SERVO_PREF_ENABLED__moz_box_direction: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_flex: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_ordinal_group: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_orient: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_box_pack: bool = false;
+ pub const SERVO_PREF_ENABLED_box_shadow: bool = false;
+ pub const SERVO_PREF_ENABLED_box_sizing: bool = false;
+ pub const SERVO_PREF_ENABLED_caption_side: bool = false;
+ pub const SERVO_PREF_ENABLED_caret_color: bool = false;
+ pub const SERVO_PREF_ENABLED_clear: bool = false;
+ pub const SERVO_PREF_ENABLED_clip: bool = false;
+ pub const SERVO_PREF_ENABLED_clip_path: bool = false;
+ pub const SERVO_PREF_ENABLED_clip_rule: bool = false;
+ pub const SERVO_PREF_ENABLED_color: bool = false;
+ pub const SERVO_PREF_ENABLED_color_adjust: bool = true;
+ pub const SERVO_PREF_ENABLED_color_interpolation: bool = false;
+ pub const SERVO_PREF_ENABLED_color_interpolation_filters: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_column_count: bool = false;
+ pub const SERVO_PREF_ENABLED_column_fill: bool = false;
+ pub const SERVO_PREF_ENABLED_column_gap: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule_color: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule_style: bool = false;
+ pub const SERVO_PREF_ENABLED_column_rule_width: bool = false;
+ pub const SERVO_PREF_ENABLED_column_width: bool = false;
+ pub const SERVO_PREF_ENABLED_columns: bool = false;
+ pub const SERVO_PREF_ENABLED_contain: bool = true;
+ pub const SERVO_PREF_ENABLED_content: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_control_character_visibility: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_counter_increment: bool = false;
+ pub const SERVO_PREF_ENABLED_counter_reset: bool = false;
+ pub const SERVO_PREF_ENABLED_cursor: bool = false;
+ pub const SERVO_PREF_ENABLED_direction: bool = false;
+ pub const SERVO_PREF_ENABLED_display: bool = false;
+ pub const SERVO_PREF_ENABLED_dominant_baseline: bool = false;
+ pub const SERVO_PREF_ENABLED_empty_cells: bool = false;
+ pub const SERVO_PREF_ENABLED_fill: bool = false;
+ pub const SERVO_PREF_ENABLED_fill_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_fill_rule: bool = false;
+ pub const SERVO_PREF_ENABLED_filter: bool = false;
+ pub const SERVO_PREF_ENABLED_flex: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_basis: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_direction: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_flow: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_grow: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_shrink: bool = false;
+ pub const SERVO_PREF_ENABLED_flex_wrap: bool = false;
+ pub const SERVO_PREF_ENABLED_float_: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_float_edge: bool = false;
+ pub const SERVO_PREF_ENABLED_flood_color: bool = false;
+ pub const SERVO_PREF_ENABLED_flood_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_font: bool = false;
+ pub const SERVO_PREF_ENABLED_font_family: bool = false;
+ pub const SERVO_PREF_ENABLED_font_feature_settings: bool = false;
+ pub const SERVO_PREF_ENABLED_font_kerning: bool = false;
+ pub const SERVO_PREF_ENABLED_font_language_override: bool = false;
+ pub const SERVO_PREF_ENABLED_font_size: bool = false;
+ pub const SERVO_PREF_ENABLED_font_size_adjust: bool = false;
+ pub const SERVO_PREF_ENABLED_font_stretch: bool = false;
+ pub const SERVO_PREF_ENABLED_font_style: bool = false;
+ pub const SERVO_PREF_ENABLED_font_synthesis: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_alternates: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_caps: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_east_asian: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_ligatures: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_numeric: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variant_position: bool = false;
+ pub const SERVO_PREF_ENABLED_font_variation_settings: bool = true;
+ pub const SERVO_PREF_ENABLED_font_weight: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_force_broken_image_icon: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_grid: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_area: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_auto_columns: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_auto_flow: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_auto_rows: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column_end: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column_gap: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_column_start: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_gap: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row_end: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row_gap: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_row_start: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template_areas: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template_columns: bool = true;
+ pub const SERVO_PREF_ENABLED_grid_template_rows: bool = true;
+ pub const SERVO_PREF_ENABLED_height: bool = false;
+ pub const SERVO_PREF_ENABLED_hyphens: bool = false;
+ pub const SERVO_PREF_ENABLED_initial_letter: bool = true;
+ pub const SERVO_PREF_ENABLED_image_orientation: bool = true;
+ pub const SERVO_PREF_ENABLED__moz_image_region: bool = false;
+ pub const SERVO_PREF_ENABLED_image_rendering: bool = false;
+ pub const SERVO_PREF_ENABLED_ime_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_inline_size: bool = false;
+ pub const SERVO_PREF_ENABLED_isolation: bool = true;
+ pub const SERVO_PREF_ENABLED_justify_content: bool = false;
+ pub const SERVO_PREF_ENABLED_justify_items: bool = false;
+ pub const SERVO_PREF_ENABLED_justify_self: bool = false;
+ pub const SERVO_PREF_ENABLED__x_lang: bool = false;
+ pub const SERVO_PREF_ENABLED_left: bool = false;
+ pub const SERVO_PREF_ENABLED_letter_spacing: bool = false;
+ pub const SERVO_PREF_ENABLED_lighting_color: bool = false;
+ pub const SERVO_PREF_ENABLED_line_height: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style_image: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style_position: bool = false;
+ pub const SERVO_PREF_ENABLED_list_style_type: bool = false;
+ pub const SERVO_PREF_ENABLED_margin: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_left: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_right: bool = false;
+ pub const SERVO_PREF_ENABLED_margin_top: bool = false;
+ pub const SERVO_PREF_ENABLED_marker: bool = false;
+ pub const SERVO_PREF_ENABLED_marker_end: bool = false;
+ pub const SERVO_PREF_ENABLED_marker_mid: bool = false;
+ pub const SERVO_PREF_ENABLED_marker_start: bool = false;
+ pub const SERVO_PREF_ENABLED_mask: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_clip: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_composite: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_image: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_position: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_position_x: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_position_y: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_repeat: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_size: bool = false;
+ pub const SERVO_PREF_ENABLED_mask_type: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_math_display: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_math_variant: bool = false;
+ pub const SERVO_PREF_ENABLED_max_block_size: bool = false;
+ pub const SERVO_PREF_ENABLED_max_height: bool = false;
+ pub const SERVO_PREF_ENABLED_max_inline_size: bool = false;
+ pub const SERVO_PREF_ENABLED_max_width: bool = false;
+ pub const SERVO_PREF_ENABLED_min_block_size: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_min_font_size_ratio: bool = false;
+ pub const SERVO_PREF_ENABLED_min_height: bool = false;
+ pub const SERVO_PREF_ENABLED_min_inline_size: bool = false;
+ pub const SERVO_PREF_ENABLED_min_width: bool = false;
+ pub const SERVO_PREF_ENABLED_mix_blend_mode: bool = true;
+ pub const SERVO_PREF_ENABLED_object_fit: bool = true;
+ pub const SERVO_PREF_ENABLED_object_position: bool = true;
+ pub const SERVO_PREF_ENABLED_offset_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_offset_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_offset_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_offset_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_order: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_orient: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_osx_font_smoothing: bool = true;
+ pub const SERVO_PREF_ENABLED_outline: bool = false;
+ pub const SERVO_PREF_ENABLED_outline_color: bool = false;
+ pub const SERVO_PREF_ENABLED_outline_offset: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_bottomleft: bool =
+ false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_bottomright: bool =
+ false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_topleft: bool =
+ false;
+ pub const SERVO_PREF_ENABLED__moz_outline_radius_topright: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_outline_style: bool = false;
+ pub const SERVO_PREF_ENABLED_outline_width: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow_clip_box: bool = true;
+ pub const SERVO_PREF_ENABLED_overflow_x: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow_y: bool = false;
+ pub const SERVO_PREF_ENABLED_padding: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_block_end: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_block_start: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_bottom: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_inline_end: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_inline_start: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_left: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_right: bool = false;
+ pub const SERVO_PREF_ENABLED_padding_top: bool = false;
+ pub const SERVO_PREF_ENABLED_page_break_after: bool = false;
+ pub const SERVO_PREF_ENABLED_page_break_before: bool = false;
+ pub const SERVO_PREF_ENABLED_page_break_inside: bool = false;
+ pub const SERVO_PREF_ENABLED_paint_order: bool = true;
+ pub const SERVO_PREF_ENABLED_perspective: bool = false;
+ pub const SERVO_PREF_ENABLED_perspective_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_place_content: bool = false;
+ pub const SERVO_PREF_ENABLED_place_items: bool = false;
+ pub const SERVO_PREF_ENABLED_place_self: bool = false;
+ pub const SERVO_PREF_ENABLED_pointer_events: bool = false;
+ pub const SERVO_PREF_ENABLED_position: bool = false;
+ pub const SERVO_PREF_ENABLED_quotes: bool = false;
+ pub const SERVO_PREF_ENABLED_resize: bool = false;
+ pub const SERVO_PREF_ENABLED_right: bool = false;
+ pub const SERVO_PREF_ENABLED_ruby_align: bool = false;
+ pub const SERVO_PREF_ENABLED_ruby_position: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_script_level: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_script_min_size: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_script_size_multiplier: bool =
+ false;
+ pub const SERVO_PREF_ENABLED_scroll_behavior: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_coordinate: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_destination: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_points_x: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_points_y: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_type: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_type_x: bool = true;
+ pub const SERVO_PREF_ENABLED_scroll_snap_type_y: bool = true;
+ pub const SERVO_PREF_ENABLED_shape_outside: bool = true;
+ pub const SERVO_PREF_ENABLED_shape_rendering: bool = false;
+ pub const SERVO_PREF_ENABLED__x_span: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_stack_sizing: bool = false;
+ pub const SERVO_PREF_ENABLED_stop_color: bool = false;
+ pub const SERVO_PREF_ENABLED_stop_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_dasharray: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_dashoffset: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_linecap: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_linejoin: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_miterlimit: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_opacity: bool = false;
+ pub const SERVO_PREF_ENABLED_stroke_width: bool = false;
+ pub const SERVO_PREF_ENABLED__x_system_font: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_tab_size: bool = false;
+ pub const SERVO_PREF_ENABLED_table_layout: bool = false;
+ pub const SERVO_PREF_ENABLED_text_align: bool = false;
+ pub const SERVO_PREF_ENABLED_text_align_last: bool = false;
+ pub const SERVO_PREF_ENABLED_text_anchor: bool = false;
+ pub const SERVO_PREF_ENABLED_text_combine_upright: bool = true;
+ pub const SERVO_PREF_ENABLED_text_decoration: bool = false;
+ pub const SERVO_PREF_ENABLED_text_decoration_color: bool = false;
+ pub const SERVO_PREF_ENABLED_text_decoration_line: bool = false;
+ pub const SERVO_PREF_ENABLED_text_decoration_style: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis_color: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis_position: bool = false;
+ pub const SERVO_PREF_ENABLED_text_emphasis_style: bool = false;
+ pub const SERVO_PREF_ENABLED__webkit_text_fill_color: bool = true;
+ pub const SERVO_PREF_ENABLED_text_indent: bool = false;
+ pub const SERVO_PREF_ENABLED_text_orientation: bool = false;
+ pub const SERVO_PREF_ENABLED_text_overflow: bool = false;
+ pub const SERVO_PREF_ENABLED_text_rendering: bool = false;
+ pub const SERVO_PREF_ENABLED_text_shadow: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_text_size_adjust: bool = false;
+ pub const SERVO_PREF_ENABLED__webkit_text_stroke: bool = true;
+ pub const SERVO_PREF_ENABLED__webkit_text_stroke_color: bool = true;
+ pub const SERVO_PREF_ENABLED__webkit_text_stroke_width: bool = true;
+ pub const SERVO_PREF_ENABLED_text_transform: bool = false;
+ pub const SERVO_PREF_ENABLED__x_text_zoom: bool = false;
+ pub const SERVO_PREF_ENABLED_top: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_top_layer: bool = false;
+ pub const SERVO_PREF_ENABLED_touch_action: bool = true;
+ pub const SERVO_PREF_ENABLED_transform: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_transform: bool = true;
+ pub const SERVO_PREF_ENABLED_transform_box: bool = true;
+ pub const SERVO_PREF_ENABLED_transform_origin: bool = false;
+ pub const SERVO_PREF_ENABLED_transform_style: bool = false;
+ pub const SERVO_PREF_ENABLED_transition: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_delay: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_duration: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_property: bool = false;
+ pub const SERVO_PREF_ENABLED_transition_timing_function: bool = false;
+ pub const SERVO_PREF_ENABLED_unicode_bidi: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_focus: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_input: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_modify: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_user_select: bool = false;
+ pub const SERVO_PREF_ENABLED_vector_effect: bool = false;
+ pub const SERVO_PREF_ENABLED_vertical_align: bool = false;
+ pub const SERVO_PREF_ENABLED_visibility: bool = false;
+ pub const SERVO_PREF_ENABLED_white_space: bool = false;
+ pub const SERVO_PREF_ENABLED_width: bool = false;
+ pub const SERVO_PREF_ENABLED_will_change: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_window_dragging: bool = false;
+ pub const SERVO_PREF_ENABLED__moz_window_shadow: bool = false;
+ pub const SERVO_PREF_ENABLED_word_break: bool = false;
+ pub const SERVO_PREF_ENABLED_word_spacing: bool = false;
+ pub const SERVO_PREF_ENABLED_overflow_wrap: bool = false;
+ pub const SERVO_PREF_ENABLED_writing_mode: bool = false;
+ pub const SERVO_PREF_ENABLED_z_index: bool = false;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct fallible_t {
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 66cd5d3ae56..3661d03a39c 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -24,7 +24,8 @@ use error_reporting::ParseErrorReporter;
use euclid::size::Size2D;
use computed_values;
use font_metrics::FontMetricsProvider;
-#[cfg(feature = "gecko")] use gecko_bindings::structs::nsCSSPropertyID;
+#[cfg(feature = "gecko")] use gecko_bindings::bindings;
+#[cfg(feature = "gecko")] use gecko_bindings::structs::{self, nsCSSPropertyID};
#[cfg(feature = "servo")] use logical_geometry::{LogicalMargin, PhysicalSide};
use logical_geometry::WritingMode;
use parser::{Parse, ParserContext, ParserContextExtraData};
@@ -734,7 +735,16 @@ enum StaticId {
Shorthand(ShorthandId),
}
include!(concat!(env!("OUT_DIR"), "/static_ids.rs"));
-
+<%
+ def alias_to_nscsspropertyid(alias):
+ if alias == "word-wrap":
+ return "nsCSSPropertyID_eCSSPropertyAlias_WordWrap"
+ return "nsCSSPropertyID::eCSSPropertyAlias_%s" % to_camel_case(alias)
+ def to_nscsspropertyid(ident):
+ if ident == "float":
+ ident = "float_"
+ return "nsCSSPropertyID::eCSSProperty_%s" % ident
+%>
impl PropertyId {
/// Returns a given property from the string `s`.
///
@@ -757,16 +767,6 @@ impl PropertyId {
#[allow(non_upper_case_globals)]
pub fn from_nscsspropertyid(id: nsCSSPropertyID) -> Result<Self, ()> {
use gecko_bindings::structs::*;
- <%
- def alias_to_nscsspropertyid(alias):
- if alias == "word-wrap":
- return "nsCSSPropertyID_eCSSPropertyAlias_WordWrap"
- return "nsCSSPropertyID::eCSSPropertyAlias_%s" % to_camel_case(alias)
- def to_nscsspropertyid(ident):
- if ident == "float":
- ident = "float_"
- return "nsCSSPropertyID::eCSSProperty_%s" % ident
- %>
match id {
% for property in data.longhands:
${to_nscsspropertyid(property.ident)} => {
@@ -792,6 +792,31 @@ impl PropertyId {
}
}
+ /// Returns a property id from Gecko's nsCSSPropertyID.
+ #[cfg(feature = "gecko")]
+ #[allow(non_upper_case_globals)]
+ pub fn to_nscsspropertyid(&self) -> Result<nsCSSPropertyID, ()> {
+ use gecko_bindings::structs::*;
+
+ match *self {
+ PropertyId::Longhand(id) => match id {
+ % for property in data.longhands:
+ LonghandId::${property.camel_case} => {
+ Ok(${to_nscsspropertyid(property.ident)})
+ }
+ % endfor
+ },
+ PropertyId::Shorthand(id) => match id {
+ % for property in data.shorthands:
+ ShorthandId::${property.camel_case} => {
+ Ok(${to_nscsspropertyid(property.ident)})
+ }
+ % endfor
+ },
+ _ => Err(())
+ }
+ }
+
/// Given this property id, get it either as a shorthand or as a
/// `PropertyDeclarationId`.
pub fn as_shorthand(&self) -> Result<ShorthandId, PropertyDeclarationId> {
@@ -876,6 +901,33 @@ impl ToCss for PropertyDeclaration {
}
}
+<%def name="property_pref_check(property)">
+ % if property.experimental and product == "servo":
+ if !PREFS.get("${property.experimental}")
+ .as_boolean().unwrap_or(false) {
+ return PropertyDeclarationParseResult::ExperimentalProperty
+ }
+ % endif
+ % if product == "gecko":
+ <%
+ # gecko can't use the identifier `float`
+ # and instead uses `float_`
+ # XXXManishearth make this an attr on the property
+ # itself?
+ pref_ident = property.ident
+ if pref_ident == "float":
+ pref_ident = "float_"
+ %>
+ if structs::root::mozilla::SERVO_PREF_ENABLED_${pref_ident} {
+ let id = structs::${to_nscsspropertyid(property.ident)};
+ let enabled = unsafe { bindings::Gecko_PropertyId_IsPrefEnabled(id) };
+ if !enabled {
+ return PropertyDeclarationParseResult::ExperimentalProperty
+ }
+ }
+ % endif
+</%def>
+
impl PropertyDeclaration {
/// Given a property declaration, return the property declaration id.
pub fn id(&self) -> PropertyDeclarationId {
@@ -978,12 +1030,9 @@ impl PropertyDeclaration {
return PropertyDeclarationParseResult::UnknownProperty
}
% endif
- % if property.experimental and product == "servo":
- if !PREFS.get("${property.experimental}")
- .as_boolean().unwrap_or(false) {
- return PropertyDeclarationParseResult::ExperimentalProperty
- }
- % endif
+
+ ${property_pref_check(property)}
+
match longhands::${property.ident}::parse_declared(context, input) {
Ok(value) => {
result_list.push(PropertyDeclaration::${property.camel_case}(value));
@@ -1010,12 +1059,9 @@ impl PropertyDeclaration {
return PropertyDeclarationParseResult::UnknownProperty
}
% endif
- % if shorthand.experimental and product == "servo":
- if !PREFS.get("${shorthand.experimental}")
- .as_boolean().unwrap_or(false) {
- return PropertyDeclarationParseResult::ExperimentalProperty
- }
- % endif
+
+ ${property_pref_check(shorthand)}
+
match input.try(|i| CSSWideKeyword::parse(context, i)) {
Ok(CSSWideKeyword::InheritKeyword) => {
% for sub_property in shorthand.sub_properties: