mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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
This commit is contained in:
parent
aca09436b7
commit
c88f2ffe24
1 changed files with 9 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue