Repository navigation
Conversation
|
Critic review: https://critic.hoppipolla.co.uk/r/2898 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
r? @hsivonen |
There was a problem hiding this comment.
Can this cause the load event either for the image or for the document to fire synchronously? If yes, that's bad. Events that can fire asynchronously should always fire asynchronously. Otherwise, you get weirdness/bugs like those that can be seen in Gecko around file: URLs (whose channels exhibit sync behavior) when code has usually been tested with http: URLs (whose channels exhibit async behavior).
There was a problem hiding this comment.
No; this causes an event to be posted to the script task event queue that could cause the load event handler to be invokved. In general, however, we're going to shake out the synchronous parts of Servo after #4057 merges, since that will enable us to hold on to DOM references in asynchronous runnables.
|
Does Servo have If Servo doesn't have these, I suggest implementing these sooner than later. When I tried to make Gecko's |
|
There's |
I mean a load associated with a navigation away from a given Gecko's handling of this period of time is very broken if you dig deeply into it, but it's OK enough that most of the time no one needs to care about the brokenness. Still, the brokenness results in not being able to assert or otherwise 100% reason about Once the next My thinking is that there should be an object representing the state of the navigation that contains an enum that progresses monotonically and the later stages of the enum map to When a link has been clicked but the next (Gecko doesn't have this, and I so wish it had this.) |
|
That's a super explanation; thanks! |
…s the script task when the queue is empty. Replace the current DOM load event with DOMContentLoaded and dispatch the real load event based on the DocumentLoader's notification.
|
I'll rebase this and work on addressing Henri's suggestions at some point. Until then, no need to keep this open. |
This implements a simple load-tracking system and tracks stylesheet loads as an example of how it fits together. This is a simplified and rebased version of #3714; I do not believe that the main thrust of hsivonen's comments (related to tracking navigation in browsing contexts) affect this part of the work. r? @Ms2ger <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5804) <!-- Reviewable:end -->
Improves on the state of the art for #1416. Images, XHR, stylesheets, and scripts now block the document load event from firing, and DOMContentLoaded is dispatched after parsing is complete.