mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Parameterize the rest of the style system on TNode.
This commit is contained in:
parent
5c749127cc
commit
c2daea2c9c
37 changed files with 149 additions and 113 deletions
|
@ -28,13 +28,14 @@ use std::sync::mpsc::Sender;
|
|||
use std::sync::{Arc, Mutex, RwLock};
|
||||
use style::context::{LocalStyleContext, StyleContext};
|
||||
use style::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
|
||||
use style::properties::ComputedValues;
|
||||
use style::selector_impl::ServoSelectorImpl;
|
||||
use style::servo::SharedStyleContext;
|
||||
use url::Url;
|
||||
use util::opts;
|
||||
|
||||
struct LocalLayoutContext {
|
||||
style_context: LocalStyleContext,
|
||||
style_context: LocalStyleContext<ComputedValues>,
|
||||
font_context: RefCell<FontContext>,
|
||||
}
|
||||
|
||||
|
@ -112,12 +113,12 @@ pub struct LayoutContext<'a> {
|
|||
cached_local_layout_context: Rc<LocalLayoutContext>,
|
||||
}
|
||||
|
||||
impl<'a> StyleContext<'a, ServoSelectorImpl> for LayoutContext<'a> {
|
||||
impl<'a> StyleContext<'a, ServoSelectorImpl, ComputedValues> for LayoutContext<'a> {
|
||||
fn shared_context(&self) -> &'a SharedStyleContext {
|
||||
&self.shared.style_context
|
||||
}
|
||||
|
||||
fn local_context(&self) -> &LocalStyleContext {
|
||||
fn local_context(&self) -> &LocalStyleContext<ComputedValues> {
|
||||
&self.cached_local_layout_context.style_context
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue