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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user