mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
libservo: Move size handling to RenderContext
from WindowMethods
(#35621)
This is the first step toward removing `WindowMethods`, which will gradually be integrated into the `WebView` and `WebViewDelegate`. Sizing of the `WebView` is now handled by the a size associated with a `RenderingContext`. `WebView`s will eventually just paint the entire size of their `RenderingContext`. Notes: - This is transitionary step so now there is a `WebView::resize` and a `WebView::move_resize`. The first is the future which will resize the `WebView` and its associated `RenderingContext`. The second is a function that the virtual `WebView`s that will soon be replaced by a the one-`WebView` per `WebView` model. - We do not need to call `WebView::move_resize` at as much any longer because the default size of the `WebView` is to take up the whole `RenderingContext`. - `SurfmanRenderingContext` is no longer exposed in the API, as a surfman context doesn't naturally have a size unless a surface is bound to it. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ebb19bcd60
commit
23524a5413
19 changed files with 200 additions and 312 deletions
|
@ -713,13 +713,7 @@ fn jni_coords_to_rust_coords<'local>(
|
|||
let height = get_non_null_field(env, obj, "height", "I")?
|
||||
.i()
|
||||
.map_err(|_| "height not an int")? as i32;
|
||||
let fb_width = get_non_null_field(env, obj, "fb_width", "I")?
|
||||
.i()
|
||||
.map_err(|_| "fb_width not an int")? as i32;
|
||||
let fb_height = get_non_null_field(env, obj, "fb_height", "I")?
|
||||
.i()
|
||||
.map_err(|_| "fb_height not an int")? as i32;
|
||||
Ok(Coordinates::new(x, y, width, height, fb_width, fb_height))
|
||||
Ok(Coordinates::new(x, y, width, height))
|
||||
}
|
||||
|
||||
fn get_field<'local>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue