mirror of
https://github.com/servo/servo
synced 2026-05-09 16:42:16 +02:00
Ensure that the screenshot rectangle is bounded by the width and height of the viewport. Testing: The WPT test `test_clip_huge_element_to_viewport` now passes instead of crashing. It is also fixed so that the returned screenshot size is the expected 800x600; it would otherwise be 792x600 due to the body margin. Fixes: #42530 --------- Signed-off-by: Loic Denuziere <loic@denuziere.net> Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>