mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Don't copy the list of stylesheets in LayoutTask::handle_reflow.
It would be nice to avoid exposing the fact that these are stored in an Arc to the selector matching code.
This commit is contained in:
parent
3f407ea3d6
commit
828392b41c
2 changed files with 6 additions and 7 deletions
|
@ -18,6 +18,7 @@ use selectors::parser::PseudoElement;
|
|||
use selectors::states::*;
|
||||
use smallvec::VecLike;
|
||||
use std::process;
|
||||
use std::sync::Arc;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use stylesheets::{CSSRuleIteratorExt, Origin, Stylesheet};
|
||||
use url::Url;
|
||||
|
@ -141,7 +142,7 @@ impl Stylist {
|
|||
stylist
|
||||
}
|
||||
|
||||
pub fn update(&mut self, doc_stylesheets: &[&Stylesheet],
|
||||
pub fn update(&mut self, doc_stylesheets: &[Arc<Stylesheet>],
|
||||
stylesheets_changed: bool) -> bool {
|
||||
if !(self.is_device_dirty || stylesheets_changed) {
|
||||
return false;
|
||||
|
@ -239,7 +240,7 @@ impl Stylist {
|
|||
self.state_deps.compute_hint(element, snapshot, current_state)
|
||||
}
|
||||
|
||||
pub fn set_device(&mut self, mut device: Device, stylesheets: &[&Stylesheet]) {
|
||||
pub fn set_device(&mut self, mut device: Device, stylesheets: &[Arc<Stylesheet>]) {
|
||||
let cascaded_rule = stylesheets.iter()
|
||||
.flat_map(|s| s.effective_rules(&self.device).viewport())
|
||||
.cascade();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue