mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Set the dirty flag of DeclarationBlock when the DeclarationBlock is modified and clear the flag when it's resyled.
This commit is contained in:
parent
011a7adf56
commit
636c47da29
3 changed files with 16 additions and 0 deletions
|
@ -43,6 +43,7 @@ use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
|
|||
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
||||
use gecko_bindings::bindings::Gecko_IsSignificantChild;
|
||||
use gecko_bindings::bindings::Gecko_MatchStringArgPseudo;
|
||||
use gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
|
||||
use gecko_bindings::bindings::Gecko_UpdateAnimations;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode};
|
||||
|
@ -628,6 +629,14 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
declarations.map_or(None, |s| s.as_arc_opt())
|
||||
}
|
||||
|
||||
fn unset_dirty_style_attribute(&self) {
|
||||
if !self.may_have_style_attribute() {
|
||||
return;
|
||||
}
|
||||
|
||||
unsafe { Gecko_UnsetDirtyStyleAttr(self.0) };
|
||||
}
|
||||
|
||||
fn get_smil_override(&self) -> Option<&Arc<Locked<PropertyDeclarationBlock>>> {
|
||||
let declarations = unsafe { Gecko_GetSMILOverrideDeclarationBlock(self.0) };
|
||||
declarations.map(|s| s.as_arc_opt()).unwrap_or(None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue