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
Redesign ScriptMsg to be more specific to DOMManipulationTaskSource #9217
Conversation
ff54a69
to
9bb1a2e
Compare
r? @jdm |
pub fn dom_manipulation_task_source(&self) -> Box<TaskSource<DOMManipulationTaskMsg> + Send> { | ||
match *self { | ||
GlobalRef::Window(ref window) => window.dom_manipulation_task_source(), | ||
GlobalRef::Worker(_) => unimplemented!(), |
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 is unimplemented because I have no idea how the Worker
handles script channels.
In my own rebased PRs I've been using the |
My main objection with these changes as they stand is that the DocumentLoadsComplete and SendStorageNotification messages are now divorced from the related code, and the implementation of document loading is already complex. It may be worth reinstating the runnable concept for the DOM manipulation task source in order to accommodate this. |
4759e53
to
2c4055e
Compare
Re-added the Runnable stuff, but with a twist. I dislike the fact that we are making a generic RunnableMsg for all different kinds of tasks, so instead I have created new messages that better reflect what the purpose of each Runnable is. |
☔ The latest upstream changes (presumably #9214) made this pull request unmergeable. Please resolve the merge conflicts. |
0596b11
to
67d0b5d
Compare
86c871f
to
1c62bab
Compare
☔ The latest upstream changes (presumably #9257) made this pull request unmergeable. Please resolve the merge conflicts. |
1c62bab
to
3a3d012
Compare
☔ The latest upstream changes (presumably #9261) made this pull request unmergeable. Please resolve the merge conflicts. |
599c9cc
to
764c209
Compare
764c209
to
8f6b234
Compare
Great work! There's only one issue that still needs to be addressed, as far as I can tell. I would expect several tests in Reviewed 4 of 4 files at r3, 3 of 3 files at r4. Comments from the review on Reviewable.io |
Yeah... I'll have to figure out a way to fix that last remaining issue. |
8f6b234
to
3f2cbf0
Compare
Use DOMManipulationTaskSource whenever possible
Comments addressed. |
@bors-servo: r+ Reviewed 2 of 2 files at r5. Comments from the review on Reviewable.io |
📌 Commit 3f2cbf0 has been approved by |
Redesign ScriptMsg to be more specific to DOMManipulationTaskSource This is a large-ish PR that contains the following: * A new directory is created under `components/script/` called `task_source`, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones. * A `DOMManipulationTaskMsg` which eliminates some usage of `Runnable`s to fire events. Instead, they send event information to the `DOMManipulationTaskSource` and lets the `ScriptTask` handle all the event firing. * Re-added `fn script_chan`, since I can't think of any other way to give `Trusted` values an appropriate sender. * Rewrote step 7 of [the end](https://html.spec.whatwg.org/multipage/syntax.html#the-end) to make use of the `DOMManipulationTaskSource` Partial #7959 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9217) <!-- Reviewable:end -->
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor |
This is a large-ish PR that contains the following:
components/script/
calledtask_source
, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones.DOMManipulationTaskMsg
which eliminates some usage ofRunnable
s to fire events. Instead, they send event information to theDOMManipulationTaskSource
and lets theScriptTask
handle all the event firing.fn script_chan
, since I can't think of any other way to giveTrusted
values an appropriate sender.DOMManipulationTaskSource
Partial #7959