style: layout: Allow a lazy pseudo-element implementation in Servo.

This commit is contained in:
Emilio Cobos Álvarez 2016-05-03 18:50:25 +02:00
parent 18c1fee3c7
commit 028f9b6cd2
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 172 additions and 57 deletions

View file

@ -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;