mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-27 01:38:39 +09:00
parent
fda213de85
commit
c37b4d0c63
8 changed files with 115 additions and 4 deletions
|
|
@ -5041,8 +5041,19 @@ nsCSSFrameConstructor::ResolveStyleContext(nsStyleContext* aParentStyleContext,
|
|||
aParentStyleContext);
|
||||
}
|
||||
} else {
|
||||
MOZ_ASSERT(aOriginatingElementOrNull);
|
||||
MOZ_ASSERT(aContent->IsInNativeAnonymousSubtree());
|
||||
if (!aOriginatingElementOrNull) {
|
||||
// For pseudo-implementing NAC created by JS using the ChromeOnly
|
||||
// document.createElement(..., { pseudo: ... }) API, we find the
|
||||
// originating element by lookup the tree until we find a non-NAC
|
||||
// ancestor. (These are the correct semantics for C++-generated pseudo-
|
||||
// implementing NAC as well, but for those cases we already have a
|
||||
// correct originating element passed in.)
|
||||
MOZ_ASSERT(nsCSSPseudoElements::PseudoElementIsJSCreatedNAC(pseudoType));
|
||||
aOriginatingElementOrNull =
|
||||
nsContentUtils::GetClosestNonNativeAnonymousAncestor(aContent->AsElement());
|
||||
}
|
||||
MOZ_ASSERT(aOriginatingElementOrNull);
|
||||
result = styleSet->ResolvePseudoElementStyle(aOriginatingElementOrNull,
|
||||
pseudoType,
|
||||
aParentStyleContext,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue