mirror of
https://github.com/servo/servo.git
synced 2025-08-26 23:58:20 +01:00
style: Fix pseudo-element restyling.
This commit is contained in:
parent
1c322f35a6
commit
a36762a9a2
5 changed files with 85 additions and 44 deletions
|
@ -44,7 +44,7 @@ use style::dom::{TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
|||
use style::element_state::ElementState;
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::gecko_glue::ArcHelpers;
|
||||
use style::gecko_selector_impl::{GeckoSelectorImpl, NonTSPseudoClass};
|
||||
use style::gecko_selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::{ComputedValues, parse_style_attribute};
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
||||
|
@ -312,13 +312,21 @@ impl<'ln> TNode for GeckoNode<'ln> {
|
|||
}
|
||||
|
||||
fn existing_style_for_restyle_damage<'a>(&'a self,
|
||||
current_cv: Option<&'a Arc<ComputedValues>>)
|
||||
current_cv: Option<&'a Arc<ComputedValues>>,
|
||||
pseudo: Option<&PseudoElement>)
|
||||
-> Option<&'a nsStyleContext> {
|
||||
if current_cv.is_none() {
|
||||
// Don't bother in doing an ffi call to get null back.
|
||||
return None;
|
||||
}
|
||||
|
||||
if pseudo.is_some() {
|
||||
// FIXME(emilio): This makes us reconstruct frame for pseudos every
|
||||
// restyle, add a FFI call to get the style context associated with
|
||||
// a PE.
|
||||
return None;
|
||||
}
|
||||
|
||||
unsafe {
|
||||
let context_ptr = Gecko_GetStyleContext(self.node);
|
||||
context_ptr.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue