aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-12-30 22:06:48 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-12-30 22:08:04 +0100
commit563da3a19c417c04d29da8ed65c78eeac126cfb1 (patch)
tree7bd34dd2044109eaafd07801f32af98872422efd /ports
parent446536b9c34b331f5466bfb212be8cb1faa2dee8 (diff)
downloadservo-563da3a19c417c04d29da8ed65c78eeac126cfb1.tar.gz
servo-563da3a19c417c04d29da8ed65c78eeac126cfb1.zip
style: Simplify ::-moz-fieldset-content special-casing.
The style adjuster knows about the pseudo, so there's no reason to thread that info down. There are more simplifications that can be done in followups, cleaning a bit the cascade flags too, those will come later.
Diffstat (limited to 'ports')
-rw-r--r--ports/geckolib/glue.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 0f0de25da53..71f5dd2d43b 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -1987,10 +1987,6 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null:
let pseudo = PseudoElement::from_anon_box_atom(&atom)
.expect("Not an anon box pseudo?");
- let mut cascade_flags = CascadeFlags::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP;
- if pseudo.is_fieldset_content() {
- cascade_flags.insert(CascadeFlags::IS_FIELDSET_CONTENT);
- }
let metrics = get_metrics_provider_for_product();
// If the pseudo element is PageContent, we should append the precomputed
@@ -2023,6 +2019,7 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null:
page_decls,
);
+ let cascade_flags = CascadeFlags::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP;
data.stylist.precomputed_values_for_pseudo_with_rule_node(
&guards,
&pseudo,
@@ -3639,11 +3636,8 @@ pub extern "C" fn Servo_ReparentStyle(
cascade_flags.insert(CascadeFlags::PROHIBIT_DISPLAY_CONTENTS);
}
}
- if let Some(pseudo) = pseudo.as_ref() {
+ if pseudo.is_some() {
cascade_flags.insert(CascadeFlags::PROHIBIT_DISPLAY_CONTENTS);
- if pseudo.is_fieldset_content() {
- cascade_flags.insert(CascadeFlags::IS_FIELDSET_CONTENT);
- }
}
doc_data.stylist.compute_style_with_inputs(