diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs
index 564a288b448..97ce0f4e5a1 100644
--- a/components/style/gecko/pseudo_element.rs
+++ b/components/style/gecko/pseudo_element.rs
@@ -83,6 +83,12 @@ impl PseudoElement {
*self == PseudoElement::FirstLetter
}
+ /// Whether this pseudo-element is ::-moz-fieldset-content.
+ #[inline]
+ pub fn is_fieldset_content(&self) -> bool {
+ *self == PseudoElement::FieldsetContent
+ }
+
/// Whether this pseudo-element is lazily-cascaded.
#[inline]
pub fn is_lazy(&self) -> bool {
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 43248e0feae..b04f03547a1 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -2668,6 +2668,9 @@ bitflags! {
/// is used by Gecko to prevent display:contents on generated
/// content.
const PROHIBIT_DISPLAY_CONTENTS = 0x10,
+
+ /// Whether we're styling the ::-moz-fieldset-content anonymous box.
+ const IS_FIELDSET_CONTENT = 0x20,
}
}
diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs
index 9b4d8a69551..72c4e675c8b 100644
--- a/components/style/style_adjuster.rs
+++ b/components/style/style_adjuster.rs
@@ -291,6 +291,31 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
self.style.mutate_box().set_display(display::inline);
}
+ /// If a