Auto merge of #24677 - jdm:iframe-sizing-cleanup, r=asajeffrey

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
This commit is contained in:
bors-servo 2019-11-07 07:40:29 -05:00 committed by GitHub
commit 9a518cf797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 168 additions and 153 deletions

View file

@ -70,7 +70,7 @@ impl App {
// Handle browser state.
let browser = Browser::new(window.clone());
let mut servo = Servo::new(embedder, window.clone(), device_pixels_per_px);
let mut servo = Servo::new(embedder, window.clone());
let browser_id = BrowserId::new();
servo.handle_events(vec![WindowEvent::NewBrowser(get_default_url(), browser_id)]);
servo.setup_logging();

View file

@ -211,7 +211,7 @@ pub fn init(
gl: gl.clone(),
});
let servo = Servo::new(embedder_callbacks, window_callbacks.clone(), None);
let servo = Servo::new(embedder_callbacks, window_callbacks.clone());
SERVO.with(|s| {
let mut servo_glue = ServoGlue {