diff --git a/devtools/server/actors/page-style.js b/devtools/server/actors/page-style.js index 8f4b17ec5a9d..a288bac23e0a 100644 --- a/devtools/server/actors/page-style.js +++ b/devtools/server/actors/page-style.js @@ -805,8 +805,6 @@ class PageStyleActor extends Actor { return node.nodeName == "VIDEO"; case "::file-selector-button": return node.nodeName == "INPUT" && node.type == "file"; - case "::details-content": - return node.nodeName == "DETAILS"; case "::placeholder": case "::-moz-placeholder": return this._nodeIsTextfieldLike(node); diff --git a/dom/html/HTMLDetailsElement.cpp b/dom/html/HTMLDetailsElement.cpp index fe1c8382f7cf..dc020d7704a2 100644 --- a/dom/html/HTMLDetailsElement.cpp +++ b/dom/html/HTMLDetailsElement.cpp @@ -149,9 +149,6 @@ void HTMLDetailsElement::SetupShadowTree() { if (NS_WARN_IF(!slot)) { return; } - if (StaticPrefs::layout_css_details_content_enabled()) { - slot->SetPseudoElementType(PseudoStyleType::detailsContent); - } sr->AppendChildTo(slot, kNotify, IgnoreErrors()); } } diff --git a/layout/inspector/tests/test_getCSSPseudoElementNames.html b/layout/inspector/tests/test_getCSSPseudoElementNames.html index fb96ddb2be28..87c80f46a3a6 100644 --- a/layout/inspector/tests/test_getCSSPseudoElementNames.html +++ b/layout/inspector/tests/test_getCSSPseudoElementNames.html @@ -36,7 +36,6 @@ "::-moz-range-progress", "::-moz-range-thumb", "::-moz-range-track", - "::details-content", ]); let names = InspectorUtils.getCSSPseudoElementNames(); diff --git a/layout/style/nsCSSPseudoElementList.h b/layout/style/nsCSSPseudoElementList.h index 57427275eb3e..2bb9d3bcf52f 100644 --- a/layout/style/nsCSSPseudoElementList.h +++ b/layout/style/nsCSSPseudoElementList.h @@ -120,8 +120,3 @@ CSS_PSEUDO_ELEMENT(sliderThumb, ":slider-thumb", CSS_PSEUDO_ELEMENT(sliderFill, ":slider-fill", CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE | CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME) - -// The content in a
element that is shown when the element is open. -CSS_PSEUDO_ELEMENT(detailsContent, ":details-content", - CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE | - CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME) diff --git a/layout/style/nsCSSPseudoElements.h b/layout/style/nsCSSPseudoElements.h index ab12a25d51bf..743ca0de73be 100644 --- a/layout/style/nsCSSPseudoElements.h +++ b/layout/style/nsCSSPseudoElements.h @@ -124,8 +124,6 @@ class nsCSSPseudoElements { case Type::sliderThumb: case Type::sliderFill: return mozilla::StaticPrefs::layout_css_modern_range_pseudos_enabled(); - case Type::detailsContent: - return mozilla::StaticPrefs::layout_css_details_content_enabled(); case Type::viewTransition: case Type::viewTransitionGroup: case Type::viewTransitionImagePair: diff --git a/layout/style/res/details.css b/layout/style/res/details.css index fd94d1c0bfad..2bf1d0886780 100644 --- a/layout/style/res/details.css +++ b/layout/style/res/details.css @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* The slot:not([name]) don't match once ::details-content is enabled, and should be removed */ slot:not([name]) { display: block; content-visibility: hidden; diff --git a/layout/style/res/html.css b/layout/style/res/html.css index 75c2bcb7c186..9ca4548aa1b4 100644 --- a/layout/style/res/html.css +++ b/layout/style/res/html.css @@ -703,6 +703,9 @@ iframe:fullscreen { * * Note that these rules need to be duplicated in details.css for the anonymous * summary, which wouldn't match otherwise. + * + * The spec here says something different, see + * https://github.com/whatwg/html/issues/8610 */ details > summary:first-of-type { display: list-item; @@ -713,14 +716,6 @@ details[open] > summary:first-of-type { list-style-type: disclosure-open; } -details::details-content { - display: block; - content-visibility: hidden; -} -details[open]::details-content { - content-visibility: revert; -} - /* media elements */ video { object-fit: contain; diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 995393796cf4..2d39a7928186 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -10444,13 +10444,6 @@ value: false mirror: always -# Is support for the ::details-content pseudo-element enabled? -- name: layout.css.details-content.enabled - type: RelaxedAtomicBool - value: false - mirror: always - rust: true - # Is 'content:none' supported on (non-pseudo) elements? - name: layout.css.element-content-none.enabled type: RelaxedAtomicBool diff --git a/servo/components/style/gecko/pseudo_element.rs b/servo/components/style/gecko/pseudo_element.rs index fc7ac7cef7ea..dec93ae51290 100644 --- a/servo/components/style/gecko/pseudo_element.rs +++ b/servo/components/style/gecko/pseudo_element.rs @@ -39,8 +39,7 @@ impl ::selectors::parser::PseudoElement for PseudoElement { Self::After | Self::Marker | Self::Placeholder | - Self::FileSelectorButton | - Self::DetailsContent + Self::FileSelectorButton ) } @@ -194,7 +193,7 @@ impl PseudoElement { /// Whether this pseudo-element is "part-like", which means that it inherits from its regular /// flat tree parent, which might not be the originating element. pub fn is_part_like(&self) -> bool { - self.is_named_view_transition() || *self == PseudoElement::DetailsContent + self.is_named_view_transition() } /// The count we contribute to the specificity from this pseudo-element. @@ -227,9 +226,6 @@ impl PseudoElement { Self::SliderFill | Self::SliderTrack | Self::SliderThumb => { pref!("layout.css.modern-range-pseudos.enabled") }, - Self::DetailsContent => { - pref!("layout.css.details-content.enabled") - }, Self::ViewTransition | Self::ViewTransitionGroup(..) | Self::ViewTransitionImagePair(..) | diff --git a/servo/components/style/style_adjuster.rs b/servo/components/style/style_adjuster.rs index 99bb4949119c..d73753dde850 100644 --- a/servo/components/style/style_adjuster.rs +++ b/servo/components/style/style_adjuster.rs @@ -554,7 +554,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { // FIXME(emilio): ::before and ::after should support display: contents, // see bug 1418138. - // FIXME(bug 1954140): Element-backed pseudo elements should support display: contents. if self.style.pseudo.is_some() { self.style.mutate_box().set_display(Display::Inline); return; diff --git a/servo/components/style/style_resolver.rs b/servo/components/style/style_resolver.rs index 8b55e154de66..33265d588495 100644 --- a/servo/components/style/style_resolver.rs +++ b/servo/components/style/style_resolver.rs @@ -296,7 +296,6 @@ where let mut pseudo_styles = EagerPseudoStyles::default(); - // FIXME(bug 1954142): This should account for element-backed pseudo elements. if !self.element.is_pseudo_element() { let layout_parent_style_for_pseudo = layout_parent_style_for_pseudo(&primary_style, layout_parent_style); diff --git a/testing/web-platform/meta/html/rendering/the-details-element/__dir__.ini b/testing/web-platform/meta/html/rendering/the-details-element/__dir__.ini index 65d629caed9c..57fd9cef6d91 100644 --- a/testing/web-platform/meta/html/rendering/the-details-element/__dir__.ini +++ b/testing/web-platform/meta/html/rendering/the-details-element/__dir__.ini @@ -1,2 +1,2 @@ -prefs: [layout.details.force-block-layout:false,layout.css.details-content.enabled:true] +prefs: [layout.details.force-block-layout:false] leak-threshold: [default:51200] diff --git a/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-001.html.ini b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-001.html.ini new file mode 100644 index 000000000000..9096d743875b --- /dev/null +++ b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-001.html.ini @@ -0,0 +1,2 @@ +[details-pseudo-elements-001.html] + expected: FAIL diff --git a/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-002.html.ini b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-002.html.ini new file mode 100644 index 000000000000..29476194e408 --- /dev/null +++ b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-002.html.ini @@ -0,0 +1,2 @@ +[details-pseudo-elements-002.html] + expected: FAIL diff --git a/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-003.html.ini b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-003.html.ini new file mode 100644 index 000000000000..7ba56cc1ea22 --- /dev/null +++ b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-003.html.ini @@ -0,0 +1,2 @@ +[details-pseudo-elements-003.html] + expected: FAIL diff --git a/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-006.html.ini b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-006.html.ini new file mode 100644 index 000000000000..79e18b7d6cd4 --- /dev/null +++ b/testing/web-platform/meta/html/rendering/the-details-element/details-pseudo-elements-006.html.ini @@ -0,0 +1,3 @@ +[details-pseudo-elements-006.html] + [::details-content matches :hover when mouse pointer is over it] + expected: FAIL diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py index e060f6cd2009..00c40546e2ae 100644 --- a/xpcom/ds/StaticAtoms.py +++ b/xpcom/ds/StaticAtoms.py @@ -2542,7 +2542,6 @@ STATIC_ATOMS = [ PseudoElementAtom("PseudoElement_sliderTrack", ":slider-track"), PseudoElementAtom("PseudoElement_sliderThumb", ":slider-thumb"), PseudoElementAtom("PseudoElement_sliderFill", ":slider-fill"), - PseudoElementAtom("PseudoElement_detailsContent", ":details-content"), # CSS anonymous boxes -- these must appear in the same order as # in nsCSSAnonBoxList.h NonInheritingAnonBoxAtom("AnonBox_oofPlaceholder", ":-moz-oof-placeholder"),