mirror of
https://github.com/servo/servo
synced 2026-04-27 18:07:52 +02:00
Auto merge of #22395 - jdm:initial-iframe-size, r=Manishearth
Initialize iframe viewport immediately This is probably a significant cause of unstable test results, and it finally bothered me enough to fix it. The solution isn't great for performance (a sync layout query every time a iframe is added to a document), but performance needs to follow correctness. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14364 and fix #15689 and fix #15688. - [x] There are tests for these changes <!-- 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/22395) <!-- Reviewable:end -->
This commit is contained in:
@@ -182,7 +182,7 @@ struct InProgressLoad {
|
||||
/// The opener, if this is an auxiliary.
|
||||
opener: Option<BrowsingContextId>,
|
||||
/// The current window size associated with this pipeline.
|
||||
window_size: Option<WindowSizeData>,
|
||||
window_size: WindowSizeData,
|
||||
/// Channel to the layout thread associated with this pipeline.
|
||||
layout_chan: Sender<message::Msg>,
|
||||
/// The activity level of the document (inactive, active or fully active).
|
||||
@@ -210,7 +210,7 @@ impl InProgressLoad {
|
||||
parent_info: Option<PipelineId>,
|
||||
opener: Option<BrowsingContextId>,
|
||||
layout_chan: Sender<message::Msg>,
|
||||
window_size: Option<WindowSizeData>,
|
||||
window_size: WindowSizeData,
|
||||
url: ServoUrl,
|
||||
origin: MutableOrigin,
|
||||
) -> InProgressLoad {
|
||||
@@ -1852,7 +1852,7 @@ impl ScriptThread {
|
||||
}
|
||||
let mut loads = self.incomplete_loads.borrow_mut();
|
||||
if let Some(ref mut load) = loads.iter_mut().find(|load| load.pipeline_id == id) {
|
||||
load.window_size = Some(size);
|
||||
load.window_size = size;
|
||||
return;
|
||||
}
|
||||
warn!("resize sent to nonexistent pipeline");
|
||||
|
||||
Reference in New Issue
Block a user