mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Do not send RemoveStyleSheet message for shadow roots
This commit is contained in:
parent
3e63655018
commit
3e53962b25
2 changed files with 6 additions and 6 deletions
|
@ -4655,6 +4655,11 @@ impl StyleSheetListOwner for Dom<Document> {
|
||||||
/// Remove a stylesheet owned by `owner` from the list of document sheets.
|
/// Remove a stylesheet owned by `owner` from the list of document sheets.
|
||||||
#[allow(unrooted_must_root)] // Owner needs to be rooted already necessarily.
|
#[allow(unrooted_must_root)] // Owner needs to be rooted already necessarily.
|
||||||
fn remove_stylesheet(&self, owner: &Element, s: &Arc<Stylesheet>) {
|
fn remove_stylesheet(&self, owner: &Element, s: &Arc<Stylesheet>) {
|
||||||
|
self.window
|
||||||
|
.layout_chan()
|
||||||
|
.send(Msg::RemoveStylesheet(s.clone()))
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
self.document_or_shadow_root.remove_stylesheet(
|
self.document_or_shadow_root.remove_stylesheet(
|
||||||
owner,
|
owner,
|
||||||
s,
|
s,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::node;
|
||||||
use crate::dom::window::Window;
|
use crate::dom::window::Window;
|
||||||
use euclid::Point2D;
|
use euclid::Point2D;
|
||||||
use js::jsapi::JS_GetRuntime;
|
use js::jsapi::JS_GetRuntime;
|
||||||
use script_layout_interface::message::{Msg, NodesFromPointQueryType, QueryMsg};
|
use script_layout_interface::message::{NodesFromPointQueryType, QueryMsg};
|
||||||
use script_traits::UntrustedNodeAddress;
|
use script_traits::UntrustedNodeAddress;
|
||||||
use servo_arc::Arc;
|
use servo_arc::Arc;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -216,11 +216,6 @@ impl DocumentOrShadowRoot {
|
||||||
s: &Arc<Stylesheet>,
|
s: &Arc<Stylesheet>,
|
||||||
stylesheets: &mut StylesheetSet<StyleSheetInDocument>,
|
stylesheets: &mut StylesheetSet<StyleSheetInDocument>,
|
||||||
) {
|
) {
|
||||||
self.window
|
|
||||||
.layout_chan()
|
|
||||||
.send(Msg::RemoveStylesheet(s.clone()))
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let guard = s.shared_lock.read();
|
let guard = s.shared_lock.read();
|
||||||
|
|
||||||
// FIXME(emilio): Would be nice to remove the clone, etc.
|
// FIXME(emilio): Would be nice to remove the clone, etc.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue