Issue #1643 - Part 4: Hook up all the plumbing.

This commit is contained in:
Moonchild 2020-09-16 19:39:33 +00:00 committed by roytam1
commit 57d143dc6e
5 changed files with 46 additions and 2 deletions

View file

@ -61,7 +61,7 @@ ResizeObserver::Constructor(const GlobalObject& aGlobal,
}
RefPtr<ResizeObserver> observer = new ResizeObserver(window.forget(), aCb);
// TODO: Add the new ResizeObserver to document here in the later patch.
document->AddResizeObserver(observer);
return observer.forget();
}
@ -86,7 +86,7 @@ ResizeObserver::Observe(Element* aTarget,
// Per the spec, we need to trigger notification in event loop that
// contains ResizeObserver observe call even when resize/reflow does
// not happen.
// TODO: Implement the notification scheduling in the later patch.
aTarget->OwnerDoc()->ScheduleResizeObserversNotification();
}
}