Bug 1519193 part 4. Convert AssertNoFramesInSubtree to using ShadowIncludingTreeIterator. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D16245

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-01-12 03:20:05 +00:00
Родитель 98f992df34
Коммит 188ff78bd7
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -76,6 +76,7 @@
#include "mozilla/dom/Touch.h"
#include "mozilla/dom/TouchEvent.h"
#include "mozilla/dom/PointerEventBinding.h"
#include "mozilla/dom/ShadowIncludingTreeIterator.h"
#include "nsIObserverService.h"
#include "nsDocShell.h" // for reflow observation
#include "nsIBaseWindow.h"
@ -2879,11 +2880,9 @@ void nsIPresShell::SlotAssignmentWillChange(Element& aElement,
#ifdef DEBUG
static void AssertNoFramesInSubtree(nsIContent* aContent) {
for (nsIContent* c = aContent; c; c = c->GetNextNode(aContent)) {
for (nsINode* node : ShadowIncludingTreeIterator(*aContent)) {
nsIContent* c = nsIContent::FromNode(node);
MOZ_ASSERT(!c->GetPrimaryFrame());
if (auto* shadowRoot = c->GetShadowRoot()) {
AssertNoFramesInSubtree(shadowRoot);
}
if (auto* binding = c->GetXBLBinding()) {
if (auto* bindingWithContent = binding->GetBindingWithContent()) {
nsIContent* anonContent = bindingWithContent->GetAnonymousContent();