mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
parent
fda213de85
commit
c37b4d0c63
8 changed files with 115 additions and 4 deletions
|
|
@ -1062,6 +1062,25 @@ ElementForStyleContext(nsIContent* aParentContent,
|
|||
return f->GetContent()->AsElement();
|
||||
}
|
||||
|
||||
Element* frameElement = aFrame->GetContent()->AsElement();
|
||||
if (frameElement->IsNativeAnonymous() &&
|
||||
nsCSSPseudoElements::PseudoElementIsJSCreatedNAC(aPseudoType)) {
|
||||
// NAC-implemented pseudos use the closest non-NAC element as their
|
||||
// element to inherit from.
|
||||
//
|
||||
// FIXME(heycam): In theory we shouldn't need to limit this only to
|
||||
// JS-created pseudo-implementing NAC, as all pseudo-implementing
|
||||
// should use the closest non-native anonymous ancestor element as
|
||||
// its originating element. But removing that part of the condition
|
||||
// reveals some bugs in style resultion with display:contents and
|
||||
// XBL. See bug 1345809.
|
||||
Element* originatingElement =
|
||||
nsContentUtils::GetClosestNonNativeAnonymousAncestor(frameElement);
|
||||
if (originatingElement) {
|
||||
return originatingElement;
|
||||
}
|
||||
}
|
||||
|
||||
if (aParentContent) {
|
||||
return aParentContent->AsElement();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue