mirror of
https://github.com/servo/servo.git
synced 2025-08-26 23:58:20 +01:00
style: layout: Allow a lazy pseudo-element implementation in Servo.
This commit is contained in:
parent
18c1fee3c7
commit
028f9b6cd2
6 changed files with 172 additions and 57 deletions
|
@ -23,7 +23,6 @@ pub enum PseudoElement {
|
|||
// TODO: Probably a few more are missing here
|
||||
|
||||
AnonBox(AnonBoxPseudoElement),
|
||||
|
||||
}
|
||||
|
||||
// https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
|
||||
|
@ -262,8 +261,8 @@ impl SelectorImplExt for GeckoSelectorImpl {
|
|||
#[inline]
|
||||
fn each_pseudo_element<F>(mut fun: F)
|
||||
where F: FnMut(PseudoElement) {
|
||||
use self::PseudoElement::*;
|
||||
use self::AnonBoxPseudoElement::*;
|
||||
use self::PseudoElement::*;
|
||||
|
||||
fun(Before);
|
||||
fun(After);
|
||||
|
|
|
@ -32,7 +32,8 @@ use std::slice;
|
|||
use std::str::from_utf8_unchecked;
|
||||
use std::sync::Arc;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use style::dom::{OpaqueNode, TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use style::dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
||||
use style::dom::{TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use style::element_state::ElementState;
|
||||
#[allow(unused_imports)] // Used in commented-out code.
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
|
@ -339,12 +340,6 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
}
|
||||
}
|
||||
|
||||
fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, _hints: &mut V)
|
||||
where V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>
|
||||
{
|
||||
// FIXME(bholley) - Need to implement this.
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_attr<'a>(&'a self, namespace: &Namespace, name: &Atom) -> Option<&'a str> {
|
||||
unsafe {
|
||||
|
@ -360,6 +355,14 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'le> PresentationalHintsSynthetizer for GeckoElement<'le> {
|
||||
fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, _hints: &mut V)
|
||||
where V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>
|
||||
{
|
||||
// FIXME(bholley) - Need to implement this.
|
||||
}
|
||||
}
|
||||
|
||||
impl<'le> ::selectors::Element for GeckoElement<'le> {
|
||||
type Impl = GeckoSelectorImpl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue