script: Don't use StyleSheet::update_from_str.#40024
Conversation
|
r? @Loirooriol |
|
🔨 Triggering try run (#18651736719) for Linux (WPT) |
|
Removed the newline that tidy complained about. |
|
Test results for linux-wpt from try job (#18651736719): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (25)
Stable unexpected results (5)
|
|
|
…oburns,Oriol I want to update the UrlExtraData of the stylesheet contents when cloning for uniqueness. This removes an API that servo uses but that's easily replaceable, see: servo/servo#40024 Differential Revision: https://phabricator.services.mozilla.com/D269200
…r=Oriol I want the iter_mut() methods to fix servo/servo#40024. But we can simplify this a little bit nowadays to avoid duplicating a lot of code. Differential Revision: https://phabricator.services.mozilla.com/D269226
…oburns,oriol,#style I want to update the UrlExtraData of the stylesheet contents when cloning for uniqueness. This removes an API that servo uses but that's easily replaceable, see: servo/servo#40024 Differential Revision: https://phabricator.services.mozilla.com/D269200
…r=#style,Oriol,nicoburns I want the iter_mut() methods to fix servo/servo#40024. But we can simplify this a little bit nowadays to avoid duplicating a lot of code. Differential Revision: https://phabricator.services.mozilla.com/D269226
dfff01a to
05baa1f
Compare
|
🔨 Triggering try run (#18681147575) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18681147575): Flaky unexpected result (25)
Stable unexpected results that are known to be intermittent (21)
Stable unexpected results (21)
|
|
|
|
🔨 Triggering try run (#18684348558) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18684348558): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (28)
|
|
✨ Try run (#18684348558) succeeded. |
…oburns,Oriol I want to update the UrlExtraData of the stylesheet contents when cloning for uniqueness. This removes an API that servo uses but that's easily replaceable, see: servo/servo#40024 Differential Revision: https://phabricator.services.mozilla.com/D269200
…r=Oriol I want the iter_mut() methods to fix servo/servo#40024. But we can simplify this a little bit nowadays to avoid duplicating a lot of code. Differential Revision: https://phabricator.services.mozilla.com/D269226
| impl ToMediaListKey for ServoStylesheetInDocument { | ||
| fn to_media_list_key(&self) -> MediaListKey { | ||
| self.sheet.contents.to_media_list_key() | ||
| MediaListKey::from_raw(self.sheet.as_ref() as *const _ as usize) |
There was a problem hiding this comment.
With
impl ToMediaListKey for Stylesheet {}this can just be
| MediaListKey::from_raw(self.sheet.as_ref() as *const _ as usize) | |
| self.sheet.as_ref().to_media_list_key() |
|
You also need to run |
* Bug 1995268 - Make StylesheetContents more obviously immutable. r=nicoburns,oriol,#style I want to update the UrlExtraData of the stylesheet contents when cloning for uniqueness. This removes an API that servo uses but that's easily replaceable, see: servo/servo#40024 Differential Revision: https://phabricator.services.mozilla.com/D269200 * Bug 1995304 - Simplify and clean-up stylesheet collection iteration. r=#style,Oriol,nicoburns I want the iter_mut() methods to fix servo/servo#40024. But we can simplify this a little bit nowadays to avoid duplicating a lot of code. Differential Revision: https://phabricator.services.mozilla.com/D269226 * Bug 1995525 - Tweak stylo APIs to make it easier for servo to replace the StylesheetContents without needing a whole new stylesheet. r=oriol,nicoburns,#style Put the Arc<StylesheetContents> under a Locked<T> so that Servo can replace it. Differential Revision: https://phabricator.services.mozilla.com/D269382
Done, and updated to current stylo's main branch. |
|
OK, since servo/stylo#257 and servo/stylo#258 already landed, now you can revert the changes in Cargo.toml and recompile, this should just update the Cargo.lock. And I think you will need to rebase after #40058 once it lands, because CI is broken. |
I want to remove this stylo API and this is the only consumer. Instead just parse a new style stylesheet. Signed-off-by: Emilio Cobos Álvarez <[email protected]>
I want to remove this stylo API and this is the only consumer. Instead just parse a new style stylesheet.
Shouldn't change behavior.