mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
stylo: Stop cloning the list of stylesheets each flush.
This commit is contained in:
parent
677daaabc5
commit
25d39006b6
2 changed files with 18 additions and 9 deletions
|
@ -18,7 +18,7 @@ use std::collections::HashMap;
|
|||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use stylearc::Arc;
|
||||
use stylesheet_set::StylesheetSet;
|
||||
use stylesheets::{FontFaceRule, Origin, Stylesheet};
|
||||
use stylesheets::{FontFaceRule, Origin};
|
||||
use stylist::{ExtraStyleData, Stylist};
|
||||
|
||||
/// The container for data that a Servo-backed Gecko document needs to style
|
||||
|
@ -102,10 +102,8 @@ impl PerDocumentStyleDataImpl {
|
|||
};
|
||||
|
||||
let author_style_disabled = self.stylesheets.author_style_disabled();
|
||||
let mut stylesheets = Vec::<Arc<Stylesheet>>::new();
|
||||
self.stylesheets.flush(&mut stylesheets);
|
||||
self.stylist.clear();
|
||||
self.stylist.rebuild(stylesheets.iter(),
|
||||
self.stylist.rebuild(self.stylesheets.flush(),
|
||||
&StylesheetGuards::same(guard),
|
||||
/* ua_sheets = */ None,
|
||||
/* stylesheets_changed = */ true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue