-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
script: Ensure notify_invalidations()
is always called when modifying stylesheets
#38530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script: Ensure notify_invalidations()
is always called when modifying stylesheets
#38530
Conversation
🔨 Triggering try run (#16824714233) for Linux (WPT) |
Test results for linux-wpt from try job (#16824714233): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (25)
Stable unexpected results (1)
|
|
c7d5dc3
to
763fa74
Compare
components/script/dom/medialist.rs
Outdated
|
||
/// <https://drafts.csswg.org/cssom/#dom-medialist-mediatext> | ||
fn SetMediaText(&self, value: DOMString) { | ||
let _rules_modification_scope = RulesModificationScope::new(&self.parent_stylesheet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really work? I thought in Rust you can't control when an object is released, which is fully determined by the compiler...
All works in this PR have been moved into another PR: #38540 |
Because everyone was discussing it on another PR, I simply closed this PR. Indeed, this PR can be independent. |
Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
763fa74
to
3a077bb
Compare
notify_invalidations()
is always called when modifying stylesheets
…ng stylesheets (servo#38530) This change supplements the missing stylesheet invalidation notifications to fix some bugs that the modification of stylesheet does not take effect. Additionally, this PR add a RAII thing to mark the modification scope of stylesheet rules, which will facilitate to add extra logic before the modification happens. Fixes: there is relevant issue servo#38211 , but it can't be fixed by this PR. Testing: This fixes some subtests in `/css/cssom/CSSStyleSheet-constructable.html`. Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
This change supplements the missing stylesheet invalidation notifications to fix some bugs that the modification of stylesheet does not take effect. Additionally, this PR add a RAII thing to mark the modification scope of stylesheet rules, which will facilitate to add extra logic before the modification happens.
Fixes: there is relevant issue #38211 , but it can't be fixed by this PR.
Testing: This fixes some subtests in
/css/cssom/CSSStyleSheet-constructable.html
.