mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Refactor style to be completely backend-independent
This commit refactors the style crate to be completely independent of the actual implementation and pseudo-elements supported. This also adds a gecko backend which introduces parsing for the anonymous box pseudo-elements[1], although there's still no way of querying them. https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
This commit is contained in:
parent
a164176876
commit
dd503dfacb
41 changed files with 767 additions and 310 deletions
|
@ -16,6 +16,7 @@ use incremental::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, RestyleDam
|
|||
use std::mem;
|
||||
use style::context::{StyleContext, ReflowGoal};
|
||||
use style::matching::MatchMethods;
|
||||
use style::selector_impl::ServoSelectorImpl;
|
||||
use style::traversal::{DomTraversalContext, STYLE_BLOOM};
|
||||
use style::traversal::{put_thread_local_bloom_filter, recalc_style_at};
|
||||
use util::opts;
|
||||
|
@ -27,7 +28,8 @@ pub struct RecalcStyleAndConstructFlows<'lc> {
|
|||
root: OpaqueNode,
|
||||
}
|
||||
|
||||
impl<'lc, 'ln, N: LayoutNode<'ln>> DomTraversalContext<'ln, N> for RecalcStyleAndConstructFlows<'lc> {
|
||||
impl<'lc, 'ln, N: LayoutNode<'ln>> DomTraversalContext<'ln, N> for RecalcStyleAndConstructFlows<'lc>
|
||||
where N::ConcreteElement: ::selectors::Element<Impl=ServoSelectorImpl> {
|
||||
type SharedContext = SharedLayoutContext;
|
||||
#[allow(unsafe_code)]
|
||||
fn new<'a>(shared: &'a Self::SharedContext, root: OpaqueNode) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue