mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #9090 - Ms2ger:stylesheets-vec, r=SimonSapin
Don't copy the list of stylesheets in LayoutTask::handle_reflow. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9090) <!-- Reviewable:end -->
This commit is contained in:
commit
3791447de8
2 changed files with 6 additions and 7 deletions
|
@ -21,6 +21,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;
|
||||
|
@ -144,7 +145,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;
|
||||
|
@ -242,7 +243,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