LibWeb: Remove unnecessary save/restore generated for stacking context
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Aliaksandr Kalenik 2025-07-08 23:14:15 +02:00 committed by Jelle Raaijmakers
commit bfa978c501
Notes: github-actions[bot] 2025-07-08 21:55:41 +00:00

View file

@ -296,8 +296,6 @@ void StackingContext::paint(PaintContext& context) const
VERIFY(context.display_list_recorder().m_save_nesting_level == 0); VERIFY(context.display_list_recorder().m_save_nesting_level == 0);
}); });
DisplayListRecorderStateSaver saver(context.display_list_recorder());
auto to_device_pixels_scale = float(context.device_pixels_per_css_pixel()); auto to_device_pixels_scale = float(context.device_pixels_per_css_pixel());
auto source_paintable_rect = context.enclosing_device_rect(paintable_box().absolute_paint_rect()).to_type<int>(); auto source_paintable_rect = context.enclosing_device_rect(paintable_box().absolute_paint_rect()).to_type<int>();
@ -328,7 +326,6 @@ void StackingContext::paint(PaintContext& context) const
} }
auto has_css_transform = paintable_box().has_css_transform(); auto has_css_transform = paintable_box().has_css_transform();
context.display_list_recorder().save();
if (has_css_transform) { if (has_css_transform) {
paintable_box().apply_clip_overflow_rect(context, PaintPhase::Foreground); paintable_box().apply_clip_overflow_rect(context, PaintPhase::Foreground);
} }
@ -373,7 +370,6 @@ void StackingContext::paint(PaintContext& context) const
} }
if (has_css_transform) if (has_css_transform)
paintable_box().clear_clip_overflow_rect(context, PaintPhase::Foreground); paintable_box().clear_clip_overflow_rect(context, PaintPhase::Foreground);
context.display_list_recorder().restore();
} }
TraversalDecision StackingContext::hit_test(CSSPixelPoint position, HitTestType type, Function<TraversalDecision(HitTestResult)> const& callback) const TraversalDecision StackingContext::hit_test(CSSPixelPoint position, HitTestType type, Function<TraversalDecision(HitTestResult)> const& callback) const