script: Move navigation origin logic into a method with spec steps.#43491
Merged
jdm merged 1 commit intoservo:mainfrom Mar 21, 2026
Merged
script: Move navigation origin logic into a method with spec steps.#43491jdm merged 1 commit intoservo:mainfrom
jdm merged 1 commit intoservo:mainfrom
Conversation
Signed-off-by: Josh Matthews <[email protected]>
|
🔨 Triggering try run (#23354869516) for Linux (WPT) |
|
Test results for linux-wpt from try job (#23354869516): Flaky unexpected result (28)
Stable unexpected results that are known to be intermittent (20)
|
|
✨ Try run (#23354869516) succeeded. |
simonwuelker
approved these changes
Mar 20, 2026
Contributor
simonwuelker
left a comment
There was a problem hiding this comment.
Nice.
Every cleanup of the navigation code much appreciated (:
| impl MutableOrigin { | ||
| pub fn from_snapshot(snapshot: OriginSnapshot) -> MutableOrigin { | ||
| MutableOrigin(Rc::new((snapshot.0, RefCell::new(snapshot.1)))) | ||
| } |
Contributor
There was a problem hiding this comment.
This could be a From<OriginSnapshot> impl, but it doesn't matter much.
TimvdLippe
reviewed
Mar 20, 2026
| } | ||
|
|
||
| // Step 4. If url matches about:blank and sourceOrigin is non-null, then return sourceOrigin. | ||
| if url.as_str() == "about:blank" { |
Contributor
There was a problem hiding this comment.
Nit: url.matches_about_blank()
Member
Author
There was a problem hiding this comment.
I'll file an easy issue followup.
Gae24
pushed a commit
to Gae24/servo
that referenced
this pull request
Mar 26, 2026
…ervo#43491) This pulls one bit of navigation logic out into a method that is easier to cross-reference against the spec, and drops a bunch of custom logic that is better served by the existing LoadOrigin infrastructure. Testing: Existing WPT coverage is sufficient. Signed-off-by: Josh Matthews <[email protected]>
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.
This pulls one bit of navigation logic out into a method that is easier to cross-reference against the spec, and drops a bunch of custom logic that is better served by the existing LoadOrigin infrastructure.
Testing: Existing WPT coverage is sufficient.