style: Merge ServoStyleSheet and StyleSheet.

These are the most minimal changes I could make. More cleanups incoming.

Bug: 1457920
Reviewed-by: xidorn
MozReview-Commit-ID: AdMOA1acQIH
This commit is contained in:
Emilio Cobos Álvarez 2018-04-30 17:50:03 +02:00
parent 4f161d9339
commit 9ed48952f5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -9,7 +9,7 @@ use context::QuirksMode;
use dom::TElement;
use gecko_bindings::bindings::{self, RawServoStyleSet};
use gecko_bindings::structs::{self, RawGeckoPresContextOwned, ServoStyleSetSizes, ServoStyleSheet};
use gecko_bindings::structs::{ServoStyleSheetInner, StyleSheetInfo, nsIDocument};
use gecko_bindings::structs::{StyleSheetInfo, nsIDocument};
use gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
use invalidation::media_queries::{MediaListKey, ToMediaListKey};
use malloc_size_of::MallocSizeOfOps;
@ -54,9 +54,9 @@ impl GeckoStyleSheet {
unsafe { &*self.0 }
}
fn inner(&self) -> &ServoStyleSheetInner {
fn inner(&self) -> &StyleSheetInfo {
unsafe {
&*(self.raw()._base.mInner as *const StyleSheetInfo as *const ServoStyleSheetInner)
&*(self.raw().mInner as *const StyleSheetInfo)
}
}
@ -98,7 +98,7 @@ impl StylesheetInDocument for GeckoStyleSheet {
use std::mem;
unsafe {
let dom_media_list = self.raw()._base.mMedia.mRawPtr as *const DomMediaList;
let dom_media_list = self.raw().mMedia.mRawPtr as *const DomMediaList;
if dom_media_list.is_null() {
return None;
}