mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #20071 - paulrouget:typedsize, r=glennw
Use typed coordinates more Requires https://github.com/servo/servo/pull/19895 We use Size2D and Point2D across compositing, constellation and script, loosing the type of pixels we use (DevicePixel, DeviceIndepententPixel or CSSPixel) along the way, which might lead to bugs like `window.outerHeight` not taking into account the page zoom (using DeviceIndepententPixel instead of CSSPixel). This should make the situation a bit better. --- <!-- 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 we can't zoom in a test <!-- 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/20071) <!-- Reviewable:end -->
This commit is contained in:
commit
fc90e613d8
13 changed files with 151 additions and 133 deletions
|
@ -81,6 +81,7 @@ use constellation::{FromCompositorLogger, FromScriptLogger};
|
|||
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
|
||||
use constellation::content_process_sandbox_profile;
|
||||
use env_logger::Logger as EnvLogger;
|
||||
use euclid::Length;
|
||||
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
|
||||
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
|
@ -133,7 +134,7 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
|
|||
let opts = opts::get();
|
||||
|
||||
// Make sure the gl context is made current.
|
||||
window.prepare_for_composite(0, 0);
|
||||
window.prepare_for_composite(Length::new(0), Length::new(0));
|
||||
|
||||
// Get both endpoints of a special channel for communication between
|
||||
// the client window and the compositor. This channel is unique because
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue