Skip to content

Implement CSSStyleSheet::replaceSync - #36586

Merged
simonwuelker merged 1 commit into
servo:mainfrom
webbeef:css_replace_sync
Apr 23, 2025
Merged

simonwuelker merged 1 commit into
servo:mainfrom
webbeef:css_replace_sync

Conversation

@webbeef

@webbeef webbeef commented Apr 17, 2025

Copy link
Copy Markdown
Contributor

Implements the replaceSync method on CSSStyleSheet

Testing: Covered by wpt tests. Expectations are updated.

@webbeef
webbeef requested a review from gterzian as a code owner April 17, 2025 14:07
@webbeef

webbeef commented Apr 17, 2025

Copy link
Copy Markdown
Contributor Author

Note: I copied a parsing function from stylo because it's private. That's not ideal, but I have no idea if making it public would be acceptable for the stylo maintainers.

Comment thread components/script/dom/cssstylesheet.rs Resolved
@webbeef
webbeef force-pushed the css_replace_sync branch 2 times, most recently from 69a706b to 87b038f Compare April 23, 2025 04:09
@webbeef
webbeef requested a review from Loirooriol April 23, 2025 04:15

@simonwuelker simonwuelker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit

Comment thread components/script/dom/cssstylesheet.rs Outdated
Ok(-1)
}

// https://drafts.csswg.org/cssom/#synchronously-replace-the-rules-of-a-cssstylesheet

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- // https://drafts.csswg.org/cssom/#synchronously-replace-the-rules-of-a-cssstylesheet
+ /// <https://drafts.csswg.org/cssom/#synchronously-replace-the-rules-of-a-cssstylesheet>

@simonwuelker
simonwuelker enabled auto-merge April 23, 2025 15:02
@simonwuelker
simonwuelker added this pull request to the merge queue Apr 23, 2025
Merged via the queue into servo:main with commit 30fdf48 Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants