Ensure all iframes are sized correctly at creation
Following in the path of #22395, these commits serve several purposes:
* prevent layout instability early during iframe loads caused by a succession of resize events
* reduce the complexity of determining what actual DPI and initial window size values are being used at startup
* ensure that all documents have a correct initial viewport size at creation
These changes fix problems that were exposed by the changes in #24462 but are independent of that PR.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
Print an error if Glutin port needs to manage a new tab
When a tab needs to be created because the user clicks on a link with a `target=…` attribute, the Glutin port just ignores it, creating weird behaviors.
We should at least print an error.
The angle and disable-vsync options were declared as global options but
only used in the Glutin embedding for desktop builds. Moving them to
the Glutin embedding code makes them easier to update.
Partially fixes#23009
Removed opts::get() access for the two glutin specific options: angle
and disable-vsync. This is the first step in a refactoring to separate
these two options from the global options.
Support `--features vslatestinstalled`
<!-- Please describe your changes on the following line: -->
Matches https://github.com/servo/rust-mozjs/pull/477.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#24331
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24344)
<!-- Reviewable:end -->
Clean up gating and order of getting display/glcontext from glutin
This patch simply simplify the OS gating for getting display and gl
context from glutin since it is only used for a linux, mac and not
UWP-based windows.
Also, in linux tries to fetch the wayland display and don't rely
on EGLDisplay because it might bring problems in servo/media.
Nonetheless it is required to compile render-unix in servo-media
with feature 'gl-wayland'
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no functional changes, just clean ups
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24310)
<!-- Reviewable:end -->
This patch simply simplify the OS gating for getting display and gl
context from glutin since it is only used for a linux, mac and not
UWP-based windows.
Also, in linux tries to fetch the wayland display and don't rely
on EGLDisplay because it might bring problems in servo/media.
Nonetheless it is required to compile render-unix in servo-media
with feature 'gl-wayland'
Glutin new window shares gl bindings
<!-- Please describe your changes on the following line: -->
At the moment when the glutin port creates a new window which shares GL objects, it creates new GL bindings rather than sharting the existing ones. This PR fixes that.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it's an efficiency improvement
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24253)
<!-- Reviewable:end -->
Fixes:
```rust
error: the type `android_injected_glue::ffi::android_app` does not permit zero-initialization
--> ports/libsimpleservo/jniapi/src/lib.rs:511:46
|
511 | let mut app: ffi::android_app = unsafe { std::mem::zeroed() };
| ^^^^^^^^^^^^^^^^^^
| |
| this code causes undefined behavior when executed
| help: use `MaybeUninit<T>` instead
|
= note: `-D invalid-value` implied by `-D warnings`
note: Function pointers must be non-null (in this struct field)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/android_injected_glue-0.2.3/src/ffi.rs:23:5
|
23 | pub onAppCmd: extern fn(*mut android_app, i32),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
```