script: Merge Window::load_url with ScriptThread::navigate#43668
Merged
jdm merged 6 commits intoservo:mainfrom Mar 27, 2026
Merged
script: Merge Window::load_url with ScriptThread::navigate#43668jdm merged 6 commits intoservo:mainfrom
jdm merged 6 commits intoservo:mainfrom
Conversation
jdm
reviewed
Mar 26, 2026
Member
jdm
left a comment
There was a problem hiding this comment.
This is great! Once it compiles, it's going to be a lot easier to see how to improve this code and make it better reflect the specification :)
f4309e3 to
2141c95
Compare
auto-merge was automatically disabled
March 26, 2026 19:37
Head branch was pushed to by a user without write access
auto-merge was automatically disabled
March 26, 2026 23:11
Head branch was pushed to by a user without write access
Both Window::load_url and ScriptThread::navigate implement parts of the same navigate algorithm from the HTML spec (https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate). ScriptThread::navigate had only one caller: Window::load_url. This merges both methods into a single navigate function in navigation.rs, which is the appropriate home for navigation logic. All previous callers of Window::load_url now call navigation::navigate directly. Fixes: servo#43494 Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
Add missing WindowMethods trait import for window.Document() and replace Trusted<GlobalScope> with Trusted<Window> to eliminate the unnecessary is::<Window>() downcast check. Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
…ript_url call Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
Remove unused Trusted import from script_thread.rs and fix needless borrow warnings in location.rs and windowproxy.rs. Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
auto-merge was automatically disabled
March 27, 2026 00:44
Head branch was pushed to by a user without write access
e034378 to
79b39aa
Compare
Contributor
Author
|
@jdm .... Found the issue,on why the Ci keeps failing..... Servo uses extra unstable rustfmt options that I wasn't running locally. now gotten that Fixed. Could you approve the workflow one more time? This should be the last one, sorry about that |
Member
|
@thebabalola In future you can use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both
Window::load_urlandScriptThread::navigateimplement parts of the same navigate algorithm from the HTML spec (https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate).ScriptThread::navigatehad only one caller:Window::load_url.This merges both methods into a single
navigatefunction innavigation.rs, which is the appropriate home for navigation logic. All previous callers ofWindow::load_urlnow callnavigation::navigatedirectly.Testing: This is a pure refactor with no behaviour changes, so no new tests are needed. Existing tests cover the navigation paths affected.
Fixes: #43494