mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -5,7 +5,7 @@
|
|||
// For lazy_static
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use dom::TElement;
|
||||
use dom::PresentationalHintsSynthetizer;
|
||||
use element_state::*;
|
||||
use error_reporting::{ParseErrorReporter, StdoutErrorReporter};
|
||||
use media_queries::{Device, MediaType};
|
||||
|
@ -281,7 +281,8 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
|
|||
pseudo: &Impl::PseudoElement,
|
||||
parent: &Arc<Impl::ComputedValues>)
|
||||
-> Option<Arc<Impl::ComputedValues>>
|
||||
where E: Element<Impl=Impl> + TElement {
|
||||
where E: Element<Impl=Impl> +
|
||||
PresentationalHintsSynthetizer {
|
||||
debug_assert!(Impl::pseudo_element_cascade_type(pseudo).is_lazy());
|
||||
if self.pseudos_map.get(pseudo).is_none() {
|
||||
return None;
|
||||
|
@ -358,7 +359,7 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
|
|||
pseudo_element: Option<&Impl::PseudoElement>,
|
||||
applicable_declarations: &mut V)
|
||||
-> bool
|
||||
where E: Element<Impl=Impl> + TElement,
|
||||
where E: Element<Impl=Impl> + PresentationalHintsSynthetizer,
|
||||
V: VecLike<DeclarationBlock> {
|
||||
assert!(!self.is_device_dirty);
|
||||
assert!(style_attribute.is_none() || pseudo_element.is_none(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue