Skip to content

script: Improve spec compliance of Document::set_ready_state - #47450

Merged
mrobinson merged 1 commit into
servo:mainfrom
mrobinson:improve-spec-compliance-of-set-ready-state
Aug 23, 2026
Merged

mrobinson merged 1 commit into
servo:mainfrom
mrobinson:improve-spec-compliance-of-set-ready-state

Conversation

@mrobinson

@mrobinson mrobinson commented Aug 22, 2026 •

Copy link
Copy Markdown
Member

This changes makes some minor changes to Document::set_ready_state to
make it match the specification steps for
"update-the-current-document-readiness". Notably, because Document's
can start in the Loaded state, to match the specification that work
has to be done by the caller. This should guard against times when
set_ready_state is called more than once for the same state, which
will be useful when implementing full support for WebView::stop.

One very minor behavioral improvement: about:blank documents now do
not transition from Complete to Loading.

Testing: This causes one WPT subtest to start passing.

@mrobinson
mrobinson requested a review from gterzian as a code owner August 22, 2026 20:48
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 22, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 22, 2026
@mrobinson
mrobinson force-pushed the improve-spec-compliance-of-set-ready-state branch from d3d9509 to 11453b1 Compare August 22, 2026 22:04
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 22, 2026
@mrobinson
mrobinson enabled auto-merge August 22, 2026 22:05
@mrobinson
mrobinson force-pushed the improve-spec-compliance-of-set-ready-state branch 2 times, most recently from 245717e to dab8851 Compare August 23, 2026 08:35
This changes makes some minor changes to `Document::set_ready_state` to
make it match the specification steps for
"update-the-current-document-readiness". Notably, because `Document`'s
can start in the `Loaded` state, to match the specification that work
has to be done by the caller. This should guard against times when
`set_ready_state` is called more than once for the same state, which
will be useful when implementing full support for `WebView::stop`.

One very minor behavioral improvement: `about:blank` documents now do
not transition from `Complete` to `Loading`.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson
mrobinson force-pushed the improve-spec-compliance-of-set-ready-state branch from dab8851 to c0cbf54 Compare August 23, 2026 08:37
@mrobinson
mrobinson added this pull request to the merge queue Aug 23, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 23, 2026
Merged via the queue into servo:main with commit 19b9d21 Aug 23, 2026
33 checks passed
@mrobinson
mrobinson deleted the improve-spec-compliance-of-set-ready-state branch August 23, 2026 09:46
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 23, 2026
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 23, 2026
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 23, 2026
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 26, 2026
mrobinson pushed a commit to TimvdLippe/servo that referenced this pull request Aug 27, 2026
mrobinson pushed a commit to TimvdLippe/servo that referenced this pull request Aug 27, 2026
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…#47450)

This changes makes some minor changes to `Document::set_ready_state` to
make it match the specification steps for
"update-the-current-document-readiness". Notably, because `Document`'s
can start in the `Loaded` state, to match the specification that work
has to be done by the caller. This should guard against times when
`set_ready_state` is called more than once for the same state, which
will be useful when implementing full support for `WebView::stop`.

One very minor behavioral improvement: `about:blank` documents now do
not transition from `Complete` to `Loading`.

Testing: This causes one WPT subtest to start passing.

Signed-off-by: Martin Robinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants