-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Separate script and layout messages, issue #8843 #8958
Conversation
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @larsbergstrom (or someone else) soon. |
☔ The latest upstream changes (presumably #8979) made this pull request unmergeable. Please resolve the merge conflicts. |
r? @KiChjang |
@@ -306,6 +307,13 @@ impl JSTraceable for ConstellationChan<ScriptMsg> { | |||
} | |||
} | |||
|
|||
impl JSTraceable for ConstellationChan<LayoutMsg> { |
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.
I think we should just use no_jsmanaged_fields!
on ConstellationChan<T>
?
@bors-servo delegate=KiChjang Looks good to me (modulo nits) at a glance; Keith can do a more thorough review |
✌️ @KiChjang can now approve this pull request |
-S-awaiting-review -S-needs-rebase +S-needs-code-changes Great job so far! I've left comments in places where care must be taken when dealing with passing messages to the constellation. The most important idea here is to recognize that the script objects should only send Secondly, both script and layout objects should never need to know what kind of messages (i.e. Reviewed 11 of 19 files at r1, 8 of 8 files at r2. components/compositing/constellation.rs, line 102 [r2] (raw file): components/compositing/pipeline.rs, line 85 [r2] (raw file): components/script/dom/document.rs, line 1163 [r2] (raw file): components/script/dom/window.rs, line 199 [r2] (raw file): components/script/layout_interface.rs, line 21 [r2] (raw file): components/script/lib.rs, line 51 [r2] (raw file): components/script_traits/lib.rs, line 262 [r2] (raw file): Comments from the review on Reviewable.io |
☔ The latest upstream changes (presumably #8612) made this pull request unmergeable. Please resolve the merge conflicts. |
-S-awaiting-review -S-needs-rebase +S-needs-code-changes Reviewed 13 of 16 files at r3. components/layout/layout_task.rs, line 692 [r3] (raw file): components/script/layout_interface.rs, line 259 [r3] (raw file): components/script/script_task.rs, line 1203 [r3] (raw file): Comments from the review on Reviewable.io |
-S-awaiting-review @bors-servo r+ Thanks for doing this! Reviewed 5 of 11 files at r4. Comments from the review on Reviewable.io |
📌 Commit 655268d has been approved by |
Separate script and layout messages, issue #8843 Separated layout-specific messages to the constellation out from the `ScriptMsg` enum into a `LayoutMsg` enum within `script_traits/script_msg.rs`, addresses [#8843](#8843). I initially tried to move `LayoutMsg` into `layout_traits/lib.rs`, but this introduced a cyclic dependency: `layout_traits` depends on `script_traits` for the `LayoutTaskFactory` implementation, and `script_traits/script_task.rs` now depends on `LayoutMsg` for new layout channels in `InitialScriptState` and `ScriptTask`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8958) <!-- Reviewable:end -->
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt |
Separated layout-specific messages to the constellation out from the
ScriptMsg
enum into aLayoutMsg
enum withinscript_traits/script_msg.rs
, addresses #8843.I initially tried to move
LayoutMsg
intolayout_traits/lib.rs
, but this introduced a cyclic dependency:layout_traits
depends onscript_traits
for theLayoutTaskFactory
implementation, andscript_traits/script_task.rs
now depends onLayoutMsg
for new layout channels inInitialScriptState
andScriptTask
.