mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make StylesheetSet an enum instead of a trait object
This commit is contained in:
parent
3e53962b25
commit
8b353ee3ce
4 changed files with 51 additions and 28 deletions
|
@ -155,7 +155,7 @@ use style::media_queries::{Device, MediaType};
|
|||
use style::selector_parser::{RestyleDamage, Snapshot};
|
||||
use style::shared_lock::SharedRwLock as StyleSharedRwLock;
|
||||
use style::str::{split_html_space_chars, str_join};
|
||||
use style::stylesheet_set::DocumentStylesheetSet;
|
||||
use style::stylesheet_set::{DocumentStylesheetSet, StylesheetSet};
|
||||
use style::stylesheets::{Origin, OriginSet, Stylesheet};
|
||||
use url::percent_encoding::percent_decode;
|
||||
use url::Host;
|
||||
|
@ -4643,9 +4643,9 @@ impl StyleSheetListOwner for Dom<Document> {
|
|||
))
|
||||
.unwrap();
|
||||
|
||||
self.document_or_shadow_root.add_stylesheet(
|
||||
DocumentOrShadowRoot::add_stylesheet(
|
||||
owner,
|
||||
stylesheets,
|
||||
StylesheetSet::Document(stylesheets),
|
||||
sheet,
|
||||
insertion_point,
|
||||
self.style_shared_lock(),
|
||||
|
@ -4660,10 +4660,10 @@ impl StyleSheetListOwner for Dom<Document> {
|
|||
.send(Msg::RemoveStylesheet(s.clone()))
|
||||
.unwrap();
|
||||
|
||||
self.document_or_shadow_root.remove_stylesheet(
|
||||
DocumentOrShadowRoot::remove_stylesheet(
|
||||
owner,
|
||||
s,
|
||||
&mut *self.stylesheets.borrow_mut(),
|
||||
StylesheetSet::Document(&mut *self.stylesheets.borrow_mut()),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue