Initialize iframe viewport immediately#22395
Conversation
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try=wpt |
WIP 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 - [ ] `./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
|
💔 Test failed - linux-rel-wpt |
af4cc5c to
c8fb961
Compare
|
@bors-servo try=wpt |
WIP 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 - [ ] `./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 -->
|
💔 Test failed - linux-rel-wpt |
|
Who could have foreseen that invoking layout inside of a method that can be called while the document is in an unstable state (ie. from the Node::bind_to_tree callback, which is invoked during the Node::insert algorithm) could lead to layout's head exploding? |
|
@bors-servo try=wpt |
WIP 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 - [ ] `./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 -->
|
💔 Test failed - linux-rel-css |
|
@bors-servo try=wpt |
WIP 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 - [ ] `./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 -->
|
💔 Test failed - linux-rel-css |
9bee8ea to
1655386
Compare
|
💔 Test failed - status-taskcluster |
|
@bors-servo retry |
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 -->
|
💔 Test failed - status-taskcluster |
|
@bors-servo retry |
|
💣 Failed to start rebuilding: |
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 -->
|
💔 Test failed - status-taskcluster |
|
@bors-servo retry |
|
☀️ Test successful - android-mac, arm32, arm64, linux-rel-css, linux-rel-wpt, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, magicleap, status-taskcluster |
| if tree_in_doc && !self.parser_inserted.get() { | ||
| self.prepare(); | ||
| let script = Trusted::new(self); | ||
| document_from_node(self).add_delayed_task(task!(ScriptDelayedInitialize: move || { |
There was a problem hiding this comment.
Where is it specified that scripts shouldn't be immediately prepared?
There was a problem hiding this comment.
There was a problem hiding this comment.
It still is immeditate, but it waits until the current DOM modification is complete, so no intermediate state can be observed by script or layout.
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.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is