mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 12:27:29 +09:00
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:
parent
9b868f0298
commit
84d3b44b86
4 changed files with 35 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@ public:
|
|||
|
||||
void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
|
||||
uint32_t aFilter) override;
|
||||
// Returns true if |aSummaryFrame| is the main summary (i.e. the first child
|
||||
// of this details frame).
|
||||
// This function is used when the summary element is removed from the parent
|
||||
// details element since at that moment the summary element has been already
|
||||
// removed from the details element children.
|
||||
bool HasMainSummaryFrame(nsIFrame* aSummaryFrame);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIContent> mDefaultSummary;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue