From c88f2ffe24c1c5ee47073841e500683ba887bd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 25 May 2017 19:50:03 +0200 Subject: [PATCH] Bug 1357583: Ensure we send the document element to Servo when flushing stylesheets. r=heycam We'll use it to invalidate stuff. MozReview-Commit-ID: Il3wO5JQh1Y --- ports/geckolib/glue.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 180da210779..73ea3226316 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -26,6 +26,7 @@ use style::gecko::selector_parser::PseudoElement; use style::gecko::traversal::RecalcStyleOnly; use style::gecko::wrapper::GeckoElement; use style::gecko_bindings::bindings; +use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoElementBorrowedOrNull}; use style::gecko_bindings::bindings::{RawGeckoKeyframeListBorrowed, RawGeckoKeyframeListBorrowedMut}; use style::gecko_bindings::bindings::{RawServoDeclarationBlockBorrowed, RawServoDeclarationBlockStrong}; use style::gecko_bindings::bindings::{RawServoDocumentRule, RawServoDocumentRuleBorrowed}; @@ -50,7 +51,6 @@ use style::gecko_bindings::bindings::RawGeckoAnimationPropertySegmentBorrowed; use style::gecko_bindings::bindings::RawGeckoCSSPropertyIDListBorrowed; use style::gecko_bindings::bindings::RawGeckoComputedKeyframeValuesListBorrowedMut; use style::gecko_bindings::bindings::RawGeckoComputedTimingBorrowed; -use style::gecko_bindings::bindings::RawGeckoElementBorrowed; use style::gecko_bindings::bindings::RawGeckoFontFaceRuleListBorrowedMut; use style::gecko_bindings::bindings::RawGeckoServoStyleRuleListBorrowedMut; use style::gecko_bindings::bindings::RawServoAnimationValueBorrowed; @@ -768,7 +768,10 @@ pub extern "C" fn Servo_StyleSet_RemoveStyleSheet(raw_data: RawServoStyleSetBorr } #[no_mangle] -pub extern "C" fn Servo_StyleSet_FlushStyleSheets(raw_data: RawServoStyleSetBorrowed) { +pub extern "C" fn Servo_StyleSet_FlushStyleSheets( + raw_data: RawServoStyleSetBorrowed, + doc_element: RawServoElementBorrowedOrNull) +{ let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); @@ -776,8 +779,10 @@ pub extern "C" fn Servo_StyleSet_FlushStyleSheets(raw_data: RawServoStyleSetBorr } #[no_mangle] -pub extern "C" fn Servo_StyleSet_NoteStyleSheetsChanged(raw_data: RawServoStyleSetBorrowed, - author_style_disabled: bool) { +pub extern "C" fn Servo_StyleSet_NoteStyleSheetsChanged( + raw_data: RawServoStyleSetBorrowed, + author_style_disabled: bool) +{ let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); data.stylesheets.force_dirty(); data.stylesheets.set_author_style_disabled(author_style_disabled);