stylo: Call Gecko_SetOwnerDocumentNeedsStyleFlush after setting has_dirty_descendants on a style root.

This commit is contained in:
Cameron McCormack 2017-02-10 10:20:42 +08:00
parent e985ad5422
commit 10994ea758
2 changed files with 6 additions and 0 deletions

View file

@ -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)

View file

@ -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())