Auto merge of #18330 - emilio:invalidation-stuff, r=bholley

stylo: Add a special case for marking something as dirty from invalidation code.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18330)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-31 14:14:15 -05:00 committed by GitHub
commit 09df9c4316
2 changed files with 7 additions and 1 deletions

View file

@ -1068,6 +1068,10 @@ extern "C" {
extern "C" {
pub fn Gecko_NoteDirtyElement(element: RawGeckoElementBorrowed);
}
extern "C" {
pub fn Gecko_NoteDirtySubtreeForInvalidation(element:
RawGeckoElementBorrowed);
}
extern "C" {
pub fn Gecko_NoteAnimationOnlyDirtyElement(element:
RawGeckoElementBorrowed);

View file

@ -1004,7 +1004,9 @@ pub extern "C" fn Servo_StyleSet_FlushStyleSheets(
if have_invalidations && doc_element.is_some() {
// The invalidation machinery propagates the bits up, but we still
// need to tell the gecko restyle root machinery about it.
unsafe { bindings::Gecko_NoteDirtyElement(doc_element.unwrap().0); }
unsafe {
bindings::Gecko_NoteDirtySubtreeForInvalidation(doc_element.unwrap().0);
}
}
}