mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
stylo: Remove a lot of the restyle damage related complexity.
The only reason why we had the `existing_style_for_style_damage` bit is to apply some optimizations that we don't have anymore. I still want to reintroduce a few of them, at least for the non-eager pseudo-element case... But I think I won't need this at all. This allows us to remove a fair amount of Gecko code too.
This commit is contained in:
parent
c1b196b7cb
commit
0f37b209cb
10 changed files with 76 additions and 199 deletions
|
@ -45,7 +45,6 @@ use gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations;
|
|||
use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
|
||||
use gecko_bindings::bindings::Gecko_GetSMILOverrideDeclarationBlock;
|
||||
use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
|
||||
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
||||
use gecko_bindings::bindings::Gecko_GetUnvisitedLinkAttrDeclarationBlock;
|
||||
use gecko_bindings::bindings::Gecko_GetVisitedLinkAttrDeclarationBlock;
|
||||
use gecko_bindings::bindings::Gecko_IsSignificantChild;
|
||||
|
@ -55,7 +54,7 @@ use gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
|
|||
use gecko_bindings::bindings::Gecko_UpdateAnimations;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode, RawGeckoXBLBinding};
|
||||
use gecko_bindings::structs::{nsIAtom, nsIContent, nsINode_BooleanFlag, nsStyleContext};
|
||||
use gecko_bindings::structs::{nsIAtom, nsIContent, nsINode_BooleanFlag};
|
||||
use gecko_bindings::structs::ELEMENT_HANDLED_SNAPSHOT;
|
||||
use gecko_bindings::structs::ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO;
|
||||
use gecko_bindings::structs::ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO;
|
||||
|
@ -1020,18 +1019,6 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
Gecko_ClassOrClassList)
|
||||
}
|
||||
|
||||
fn existing_style_for_restyle_damage<'a>(&'a self,
|
||||
_existing_values: &'a ComputedValues,
|
||||
pseudo: Option<&PseudoElement>)
|
||||
-> Option<&'a nsStyleContext> {
|
||||
// TODO(emilio): Migrate this to CSSPseudoElementType.
|
||||
let atom_ptr = pseudo.map_or(ptr::null_mut(), |p| p.atom().as_ptr());
|
||||
unsafe {
|
||||
let context_ptr = Gecko_GetStyleContext(self.0, atom_ptr);
|
||||
context_ptr.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
fn has_snapshot(&self) -> bool {
|
||||
self.flags() & (ELEMENT_HAS_SNAPSHOT as u32) != 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue