Closed Bug 1865994 Opened 8 months ago Closed 8 months ago

Consider removing mNeedToUpdateResizeObservers

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

Details

Attachments

(1 file)

After bug 1807253, it's no longer used to guard the execution of nsRefreshDriver::NotifyResizeObservers.

Quoting Emilio:

I think we can remove mNeedToUpdateResizeObservers now unless I'm missing something. It's only set after reflow, and after reflow, if any change happens, we'll get to a tick to paint.
If you don't plan to do it as part of this bug, please file it and reference it from the declaration.

https://searchfox.org/mozilla-central/search?q=mNeedToUpdateResizeObservers&path=&case=false&regexp=false

I think we can remove mNeedToUpdateResizeObservers now unless I'm missing something. It's only set after reflow, and after reflow, if any change happens, we'll get to a tick to paint.
If you don't plan to do it as part of this bug, please file it and reference it from the declaration.

https://searchfox.org/mozilla-central/search?q=mNeedToUpdateResizeObservers&path=&case=false&regexp=false

IIUC EnsureResizeObserverUpdateHappens() forces a tick (the boolean only seems to be used to print tick reason in the profiler so it seems we should keep it as long as we keep the tick). In addition to PresShell::DidDoReflow(), I see it's also called from ScheduleResizeObserversNotification() in (DetermineProximityToViewportAnd)NotifyResizeObservers and ResizeObserver::Observe.

ah, yeah, I had missed that other caller. But the reflow code-path seems it could go away.

Assignee: nobody → fwang
Attachment #9365144 - Attachment description: WIP: Bug 1865994 - Do not force resize observer update after PresShell::DidDoReflow(). r=emilio → Bug 1865994 - Do not force resize observer update after PresShell::DidDoReflow(). r=emilio
Pushed by fred.wang@free.fr:
https://hg.mozilla.org/integration/autoland/rev/3cf96fcea42b
Do not force resize observer update after PresShell::DidDoReflow(). r=emilio
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: