mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-20 14:17:30 +09:00
Issue #1592 - Part 1a: Prevent crashing if a slot element was selected via DOM Inspector
This commit is contained in:
parent
f09d2bba0f
commit
0232bcdfa4
1 changed files with 7 additions and 2 deletions
|
|
@ -3839,8 +3839,13 @@ RestyleManager::ComputeAndProcessStyleChange(nsStyleContext* aNewContext,
|
||||||
MOZ_ASSERT(mReframingStyleContexts, "should have rsc");
|
MOZ_ASSERT(mReframingStyleContexts, "should have rsc");
|
||||||
MOZ_ASSERT(aNewContext->StyleDisplay()->mDisplay == StyleDisplay::Contents);
|
MOZ_ASSERT(aNewContext->StyleDisplay()->mDisplay == StyleDisplay::Contents);
|
||||||
nsIFrame* frame = GetNearestAncestorFrame(aElement);
|
nsIFrame* frame = GetNearestAncestorFrame(aElement);
|
||||||
MOZ_ASSERT(frame, "display:contents node in map although it's a "
|
// Return early if we don't have a frame.
|
||||||
|
if (!frame) {
|
||||||
|
NS_ASSERTION(frame,
|
||||||
|
"display:contents node in map although it's a "
|
||||||
"display:none descendant?");
|
"display:none descendant?");
|
||||||
|
return;
|
||||||
|
}
|
||||||
TreeMatchContext treeMatchContext(true,
|
TreeMatchContext treeMatchContext(true,
|
||||||
nsRuleWalker::eRelevantLinkUnvisited,
|
nsRuleWalker::eRelevantLinkUnvisited,
|
||||||
frame->PresContext()->Document());
|
frame->PresContext()->Document());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue