File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
testing/web-platform/tests/html/rendering/the-details-element Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -11257,12 +11257,14 @@ static nsIFrame* GetCorrectedParent(const nsIFrame* aFrame) {
11257
11257
}
11258
11258
11259
11259
// Prevent a NAC pseudo-element from inheriting from its NAC parent, and
11260
- // inherit from the NAC generator element instead.
11261
- if (pseudo != PseudoStyleType::NotPseudo) {
11260
+ // inherit from the NAC generator element instead. (We exclude element-backed
11261
+ // pseudos from this check, since they're not NAC.)
11262
+ if (pseudo != PseudoStyleType::NotPseudo &&
11263
+ !PseudoStyle::IsElementBackedPseudo (pseudo)) {
11262
11264
MOZ_ASSERT (aFrame->GetContent ());
11263
11265
Element* element = Element::FromNode (aFrame->GetContent ());
11264
- // Make sure to avoid doing the fixup for non-element-backed pseudos like
11265
- // ::first-line and such.
11266
+ // Make sure to only do the fixup for anonymous content pseudos (i.e. avoid
11267
+ // fixup for ::first-line and such) .
11266
11268
if (element && !element->IsRootOfNativeAnonymousSubtree () &&
11267
11269
element->GetPseudoElementType () == aFrame->Style ()->GetPseudoType ()) {
11268
11270
while (parent->GetContent () &&
Original file line number Diff line number Diff line change
1
+ < link rel ="help " href ="https://bugzilla.mozilla.org/show_bug.cgi?id=1982701 ">
2
+ < style >
3
+ * ::first-line {}
4
+ </ style >
5
+ < script >
6
+ window . addEventListener ( "DOMContentLoaded" , ( ) => {
7
+ a . showModal ( )
8
+ } )
9
+ </ script >
10
+ < dialog id ="a ">
11
+ < details >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < link rel ="help " href ="https://bugzilla.mozilla.org/show_bug.cgi?id=1982701 ">
3
+ < style >
4
+ .wrapper ::first-line { background : cyan }
5
+ </ style >
6
+ < div class ="wrapper ">
7
+ WrapperFirstLine< br >
8
+ WrapperSecondLine< br >
9
+ < dialog id ="a " open >
10
+ < details >
11
+ < summary > This is the summary</ summary >
12
+ These are the details
13
+ </ details >
14
+ </ dialog >
15
+ </ div >
You can’t perform that action at this time.
0 commit comments