Remove many explicit reflow calls (#33067)

* Remove explicit reflow for iframe content updates.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove explicit reflow for timers.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove explicit reflow for MouseEvent.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove explicit reflow for key events.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove explicit reflow for document load.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove explicit reflow for iframe load.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove unused reflow reasons.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2024-08-15 18:20:52 -04:00 committed by GitHub
parent a34920b605
commit 3cc91e655f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 27 deletions

View file

@ -164,23 +164,14 @@ enum WindowState {
#[derive(Debug, MallocSizeOf)]
pub enum ReflowReason {
CachedPageNeededReflow,
DOMContentLoaded,
DocumentLoaded,
ElementStateChanged,
FirstLoad,
FramedContentChanged,
IFrameLoadEvent,
ImageLoaded,
KeyEvent,
MissingExplicitReflow,
MouseEvent,
PendingReflow,
Query,
RefreshTick,
RequestAnimationFrame,
ScrollFromScript,
StylesheetLoaded,
Timer,
Viewport,
WindowResize,
WorkletLoaded,
@ -2320,7 +2311,6 @@ impl Window {
pub fn handle_fire_timer(&self, timer_id: TimerEventId) {
self.upcast::<GlobalScope>().fire_timer(timer_id);
self.reflow(ReflowGoal::Full, ReflowReason::Timer);
}
pub fn set_window_size(&self, size: WindowSizeData) {