Bug 1857073 - Remove ResizeObserverController. r=surkov,smaug

These days it's just a very thin wrapper over an nsTArray of
ResizeObservers. We also schedule notifications for resize observations
for the whole BrowsingContext tree at once, so there's no point on
individually keep track of them.

Differential Revision: https://phabricator.services.mozilla.com/D190113
This commit is contained in:
Emilio Cobos Álvarez
2023-10-05 12:11:56 +00:00
parent e92d345747
commit 061c11bc12
8 changed files with 169 additions and 384 deletions

View File

@@ -9486,19 +9486,7 @@ void PresShell::DidDoReflow(bool aInterruptible) {
}
if (!mPresContext->HasPendingInterrupt()) {
// The ResizeObserver object may exist in the outer documents (e.g. observe
// an element in the in-process iframe) or any other documents which can
// access |mDocument|, so we have to schedule the resize observers for all
// possible documents via browsing context tree.
if (RefPtr<BrowsingContext> bc = mDocument->GetBrowsingContext()) {
bc->Top()->PreOrderWalk([](BrowsingContext* aCur) {
// Use extant document because we only want to schedule the observer to
// its refresh driver and so don't need to ensure the content viewer.
if (const Document* doc = aCur->GetExtantDocument()) {
doc->ScheduleResizeObserversNotification();
}
});
}
mPresContext->RefreshDriver()->EnsureResizeObserverUpdateHappens();
}
if (StaticPrefs::layout_reflow_synthMouseMove()) {