mirror of
https://github.com/servo/servo.git
synced 2025-09-17 02:18:23 +01:00
libservo: Make Servo (and servoshell) more resilient against extreme sizes (#39204)
Make several changes which should address panics and inconsistent behavior around attempts to set extreme sizes: 1. Limit the minimum size of the `RenderingContext` to 1 pixel by 1 pixel. This should address problems where users of the API try to directly set the size to a zero or negative dimension. In addition, improve the documentation around `WebView::resize` to mention this. 2. Clamp values sent in the `WebViewDelegate::request_resize_to` method to be at least 1x1. This prevents Servo from sending nonsense values to embedders. Improve documentation in this method. 3. In servoshell: - More consistently clamp inner and outer window size values. - Clamp all resize values to the available screen size, so that large screen sizes aren't processed directly. Testing: This change fixes an existing WPT and adds two new API tests. Fixes: #36763. Fixes: #36841. Fixes: #39141. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
406eab4ec2
commit
ebfb5b1abb
9 changed files with 153 additions and 43 deletions
|
@ -1,2 +0,0 @@
|
|||
[resizeTo-negative.html]
|
||||
expected: CRASH
|
Loading…
Add table
Add a link
Reference in a new issue