Bug 1719405 - Modify the no-browsers-inside-deck assertion for Thunderbird. r=hiro

Thunderbird's tabpanels element has a different ID from that of Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D119247
This commit is contained in:
Geoff Lankow 2021-07-07 04:53:09 +00:00
parent d5fa6014e8
commit a83ebb2b21

View File

@ -219,11 +219,16 @@ nsDeckFrame::DoXULLayout(nsBoxLayoutState& aState) {
// <deck> and <tabpanels> other than our browser's tab shouldn't have any
// <browser> or <iframe> to avoid running into troubles with Fission.
MOZ_ASSERT((mContent->IsXULElement(nsGkAtoms::tabpanels) &&
mContent->AsElement()->AttrValueIs(
kNameSpaceID_None, nsGkAtoms::id, u"tabbrowser-tabpanels"_ns,
eCaseMatters)) ||
!HasPossiblyRemoteContents());
MOZ_ASSERT(
(mContent->IsXULElement(nsGkAtoms::tabpanels) &&
mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::id,
#ifdef MOZ_THUNDERBIRD
u"tabpanelcontainer"_ns,
#else
u"tabbrowser-tabpanels"_ns,
#endif
eCaseMatters)) ||
!HasPossiblyRemoteContents());
// run though each child. Hide all but the selected one
nsIFrame* box = nsIFrame::GetChildXULBox(this);