Bug 1377648 - Fix HTMLSummaryElement::IsSummary() on removing the element

* Use inFlowFrame to check the target frame is summary and its parent is details
* Check summary frame instead of summary element on removing the summary

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 06:09:37 -04:00 committed by Roy Tam
commit 84d3b44b86
4 changed files with 35 additions and 12 deletions

View file

@ -129,3 +129,12 @@ DetailsFrame::AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
aElements.AppendElement(mDefaultSummary);
}
}
bool
DetailsFrame::HasMainSummaryFrame(nsIFrame* aSummaryFrame)
{
nsIFrame* firstChild =
nsPlaceholderFrame::GetRealFrameFor(mFrames.FirstChild());
return aSummaryFrame == firstChild;
}