|
|
|
Lines 119-134
use style::logical_geometry::LogicalPoin
|
Link Here
|
|---|
|
| 119 |
use style::media_queries::{Device, MediaType}; |
119 |
use style::media_queries::{Device, MediaType}; |
| 120 |
use style::parser::ParserContextExtraData; |
120 |
use style::parser::ParserContextExtraData; |
| 121 |
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION, STORE_OVERFLOW}; |
121 |
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION, STORE_OVERFLOW}; |
| 122 |
use style::stylesheets::{Origin, Stylesheet, UserAgentStylesheets}; |
122 |
use style::stylesheets::{Origin, Stylesheet, UserAgentStylesheets}; |
| 123 |
use style::stylist::Stylist; |
123 |
use style::stylist::Stylist; |
| 124 |
use style::thread_state; |
124 |
use style::thread_state; |
| 125 |
use style::timer::Timer; |
125 |
use style::timer::Timer; |
| 126 |
use style::traversal::DomTraversal; |
126 |
use style::traversal::DomTraversal; |
|
|
127 |
use style::properties::ComputedValues; |
| 127 |
|
128 |
|
| 128 |
/// Information needed by the layout thread. |
129 |
/// Information needed by the layout thread. |
| 129 |
pub struct LayoutThread { |
130 |
pub struct LayoutThread { |
| 130 |
/// The ID of the pipeline that we belong to. |
131 |
/// The ID of the pipeline that we belong to. |
| 131 |
id: PipelineId, |
132 |
id: PipelineId, |
| 132 |
|
133 |
|
| 133 |
/// The URL of the pipeline that we belong to. |
134 |
/// The URL of the pipeline that we belong to. |
| 134 |
url: ServoUrl, |
135 |
url: ServoUrl, |
|
|
| 522 |
stylist: rw_data.stylist.clone(), |
523 |
stylist: rw_data.stylist.clone(), |
| 523 |
goal: goal, |
524 |
goal: goal, |
| 524 |
running_animations: self.running_animations.clone(), |
525 |
running_animations: self.running_animations.clone(), |
| 525 |
expired_animations: self.expired_animations.clone(), |
526 |
expired_animations: self.expired_animations.clone(), |
| 526 |
error_reporter: self.error_reporter.clone(), |
527 |
error_reporter: self.error_reporter.clone(), |
| 527 |
local_context_creation_data: Mutex::new(thread_local_style_context_creation_data), |
528 |
local_context_creation_data: Mutex::new(thread_local_style_context_creation_data), |
| 528 |
timer: self.timer.clone(), |
529 |
timer: self.timer.clone(), |
| 529 |
quirks_mode: self.quirks_mode.unwrap(), |
530 |
quirks_mode: self.quirks_mode.unwrap(), |
|
|
531 |
// FIXME(bz): This isn't really right, but it's no more wrong |
| 532 |
// than what we used to do. See |
| 533 |
// https://github.com/servo/servo/issues/14773 for fixing it |
| 534 |
// properly. |
| 535 |
default_computed_values: Arc::new(ComputedValues::initial_values().clone()), |
| 530 |
}, |
536 |
}, |
| 531 |
image_cache_thread: Mutex::new(self.image_cache_thread.clone()), |
537 |
image_cache_thread: Mutex::new(self.image_cache_thread.clone()), |
| 532 |
image_cache_sender: Mutex::new(self.image_cache_sender.clone()), |
538 |
image_cache_sender: Mutex::new(self.image_cache_sender.clone()), |
| 533 |
font_cache_thread: Mutex::new(self.font_cache_thread.clone()), |
539 |
font_cache_thread: Mutex::new(self.font_cache_thread.clone()), |
| 534 |
webrender_image_cache: self.webrender_image_cache.clone(), |
540 |
webrender_image_cache: self.webrender_image_cache.clone(), |
| 535 |
} |
541 |
} |
| 536 |
} |
542 |
} |
| 537 |
|
543 |
|