style: Remove PresentationalHintsSynthesizer.

This is not really an useful abstraction, and I never knew how to spell it.
This commit is contained in:
Emilio Cobos Álvarez 2017-10-26 11:40:44 +02:00
parent a814fc578f
commit 6c796b50ec
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 48 additions and 54 deletions

View file

@ -69,7 +69,7 @@ use style::computed_values::display;
use style::context::SharedStyleContext;
use style::data::ElementData;
use style::dom::{DomChildren, LayoutIterator, NodeInfo, OpaqueNode};
use style::dom::{PresentationalHintsSynthesizer, TElement, TNode};
use style::dom::{TElement, TNode};
use style::element_state::*;
use style::font_metrics::ServoMetricsProvider;
use style::properties::{ComputedValues, PropertyDeclarationBlock};
@ -338,18 +338,6 @@ impl<'le> fmt::Debug for ServoLayoutElement<'le> {
}
}
impl<'le> PresentationalHintsSynthesizer for ServoLayoutElement<'le> {
fn synthesize_presentational_hints_for_legacy_attributes<V>(&self,
_visited_handling: VisitedHandlingMode,
hints: &mut V)
where V: Push<ApplicableDeclarationBlock>
{
unsafe {
self.element.synthesize_presentational_hints_for_legacy_attributes(hints);
}
}
}
impl<'le> TElement for ServoLayoutElement<'le> {
type ConcreteNode = ServoLayoutNode<'le>;
type TraversalChildrenIterator = DomChildren<Self::ConcreteNode>;
@ -520,6 +508,19 @@ impl<'le> TElement for ServoLayoutElement<'le> {
// FIXME(emilio): We should be able to give the right answer though!
false
}
fn synthesize_presentational_hints_for_legacy_attributes<V>(
&self,
_visited_handling: VisitedHandlingMode,
hints: &mut V,
)
where
V: Push<ApplicableDeclarationBlock>,
{
unsafe {
self.element.synthesize_presentational_hints_for_legacy_attributes(hints);
}
}
}
impl<'le> PartialEq for ServoLayoutElement<'le> {
@ -1245,10 +1246,3 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
false
}
}
impl<'le> PresentationalHintsSynthesizer for ServoThreadSafeLayoutElement<'le> {
fn synthesize_presentational_hints_for_legacy_attributes<V>(&self,
_visited_handling: VisitedHandlingMode,
_hints: &mut V)
where V: Push<ApplicableDeclarationBlock> {}
}