New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark the page source as loaded only after parsing is done #15098
Conversation
Heads up! This PR modifies the following files:
|
@bors-servo try |
Mark the page source as loaded only after parsing is done <!-- 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/15098) <!-- Reviewable:end -->
@@ -1572,6 +1572,7 @@ impl Document { | |||
} | |||
|
|||
if !self.loader.borrow().is_blocked() && !self.loader.borrow().events_inhibited() { | |||
self.loader.borrow_mut().inhibit_events(); | |||
// Schedule a task to fire a "load" event (if no blocking loads have arrived in the mean time) | |||
// NOTE: we can end up executing this code more than once, in case more blocking loads arrive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is no longer true.
self.document.disarm_reflow_timeout(); | ||
self.document.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage); | ||
let window = self.document.window(); | ||
window.reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery, ReflowReason::FirstLoad); | ||
} | ||
|
||
// Step 3. | ||
// Steps 3-12 are in another castle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cute, but this neither explains what part of the spec this code implements nor where to find steps 3-12.
💔 Test failed - linux-rel-wpt |
@bors-servo try |
Mark the page source as loaded only after parsing is done <!-- 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/15098) <!-- Reviewable:end -->
💔 Test failed - linux-dev |
@bors-servo try |
Mark the page source as loaded only after parsing is done <!-- 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/15098) <!-- Reviewable:end -->
Mark the page source as loaded only after parsing is done <!-- 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/15098) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
debug!("Document loads are complete."); | ||
let win = self.window(); | ||
let msg = MainThreadScriptMsg::DocumentLoadsComplete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove this variant and the code that handles it.
@bors-servo try |
Mark the page source as loaded only after parsing is done <!-- 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/15098) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
@bors-servo: r+ |
📌 Commit 0f244d6 has been approved by |
Mark the page source as loaded only after parsing is done <!-- 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/15098) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev |
This change is