diff options
author | Moonchild <moonchild@palemoon.org> | 2020-09-16 19:39:33 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-09-16 19:39:33 +0000 |
commit | 3d6efb22dfcbe510e4335c18129c60769f2232bb (patch) | |
tree | 3ef85068d06334887dbe9a3656e26e1837d1114c /dom/base/nsDocument.cpp | |
parent | a9700abc9e3d1bf3d62fee90e3e67ca73aca7413 (diff) | |
download | uxp-3d6efb22dfcbe510e4335c18129c60769f2232bb.tar.gz |
Issue mcp-graveyard/UXP#1643 - Part 4: Hook up all the plumbing.
Diffstat (limited to 'dom/base/nsDocument.cpp')
-rw-r--r-- | dom/base/nsDocument.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 76490e6b44..5bf89f26ae 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -1681,6 +1681,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDocument) cb.NoteXPCOMChild(mql); } } + + if (tmp->mResizeObserverController) { + tmp->mResizeObserverController->Traverse(cb); + } NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_CLASS(nsDocument) @@ -1786,6 +1790,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument) } tmp->mInUnlinkOrDeletion = false; + + if (tmp->mResizeObserverController) { + tmp->mResizeObserverController->Unlink(); + } NS_IMPL_CYCLE_COLLECTION_UNLINK_END nsresult @@ -11823,6 +11831,24 @@ nsDocument::QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aRetur return nsINode::QuerySelectorAll(aSelector, aReturn); } +void +nsDocument::AddResizeObserver(ResizeObserver* aResizeObserver) +{ + if (!mResizeObserverController) { + mResizeObserverController = MakeUnique<ResizeObserverController>(this); + } + + mResizeObserverController->AddResizeObserver(aResizeObserver); +} + +void +nsDocument::ScheduleResizeObserversNotification() const +{ + if (mResizeObserverController) { + mResizeObserverController->ScheduleNotification(); + } +} + already_AddRefed<nsIDocument> nsIDocument::Constructor(const GlobalObject& aGlobal, ErrorResult& rv) |