mirror of
https://github.com/servo/servo.git
synced 2025-07-08 16:03:40 +01:00
stylo: Call Gecko_SetOwnerDocumentNeedsStyleFlush after setting has_dirty_descendants on a style root.
This commit is contained in:
parent
e985ad5422
commit
10994ea758
2 changed files with 6 additions and 0 deletions
|
@ -633,6 +633,10 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_UnsetNodeFlags(node: RawGeckoNodeBorrowed, flags: u32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_SetOwnerDocumentNeedsStyleFlush(element:
|
||||
RawGeckoElementBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_GetStyleContext(node: RawGeckoNodeBorrowed,
|
||||
aPseudoTagOrNull: *mut nsIAtom)
|
||||
|
|
|
@ -28,6 +28,7 @@ use style::gecko::selector_parser::{SelectorImpl, PseudoElement};
|
|||
use style::gecko::traversal::RecalcStyleOnly;
|
||||
use style::gecko::wrapper::DUMMY_BASE_URL;
|
||||
use style::gecko::wrapper::GeckoElement;
|
||||
use style::gecko_bindings::bindings;
|
||||
use style::gecko_bindings::bindings::{RawServoDeclarationBlockBorrowed, RawServoDeclarationBlockStrong};
|
||||
use style::gecko_bindings::bindings::{RawServoStyleRuleBorrowed, RawServoStyleRuleStrong};
|
||||
use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned};
|
||||
|
@ -1077,6 +1078,7 @@ unsafe fn maybe_restyle<'a>(data: &'a mut AtomicRefMut<ElementData>, element: Ge
|
|||
if curr.has_dirty_descendants() { break; }
|
||||
curr.set_dirty_descendants();
|
||||
}
|
||||
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(element.0);
|
||||
|
||||
// Ensure and return the RestyleData.
|
||||
Some(data.ensure_restyle())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue