diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/style/gecko/media_queries.rs | 2 | ||||
-rw-r--r-- | components/style/gecko/wrapper.rs | 6 | ||||
-rw-r--r-- | components/style/gecko_bindings/sugar/ns_com_ptr.rs | 12 | ||||
-rw-r--r-- | components/style/stylesheets/mod.rs | 8 |
4 files changed, 7 insertions, 21 deletions
diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs index f666c930e6e..abd9f8af5e1 100644 --- a/components/style/gecko/media_queries.rs +++ b/components/style/gecko/media_queries.rs @@ -74,7 +74,7 @@ impl fmt::Debug for Device { let mut doc_uri = nsCString::new(); unsafe { bindings::Gecko_nsIURI_Debug( - (*self.document()).mDocumentURI.raw::<structs::nsIURI>(), + (*self.document()).mDocumentURI.raw(), &mut doc_uri, ) }; diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 3a1d61b019b..ac4f113c93e 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -413,7 +413,7 @@ impl<'ln> TNode for GeckoNode<'ln> { unsafe { self.0 .mFirstChild - .raw::<nsIContent>() + .raw() .as_ref() .map(GeckoNode::from_content) } @@ -428,7 +428,7 @@ impl<'ln> TNode for GeckoNode<'ln> { fn prev_sibling(&self) -> Option<Self> { unsafe { let prev_or_last = GeckoNode::from_content(self.0.mPreviousOrLastSibling.as_ref()?); - if prev_or_last.0.mNextSibling.raw::<nsIContent>().is_null() { + if prev_or_last.0.mNextSibling.raw().is_null() { return None; } Some(prev_or_last) @@ -440,7 +440,7 @@ impl<'ln> TNode for GeckoNode<'ln> { unsafe { self.0 .mNextSibling - .raw::<nsIContent>() + .raw() .as_ref() .map(GeckoNode::from_content) } diff --git a/components/style/gecko_bindings/sugar/ns_com_ptr.rs b/components/style/gecko_bindings/sugar/ns_com_ptr.rs index 10f76046476..1c54541bd80 100644 --- a/components/style/gecko_bindings/sugar/ns_com_ptr.rs +++ b/components/style/gecko_bindings/sugar/ns_com_ptr.rs @@ -6,20 +6,10 @@ use crate::gecko_bindings::structs::nsCOMPtr; -#[cfg(feature = "gecko_debug")] impl<T> nsCOMPtr<T> { /// Get this pointer as a raw pointer. #[inline] - pub fn raw<U>(&self) -> *mut T { + pub fn raw(&self) -> *mut T { self.mRawPtr } } - -#[cfg(not(feature = "gecko_debug"))] -impl nsCOMPtr { - /// Get this pointer as a raw pointer. - #[inline] - pub fn raw<T>(&self) -> *mut T { - self._base.mRawPtr as *mut _ - } -} diff --git a/components/style/stylesheets/mod.rs b/components/style/stylesheets/mod.rs index 34c8403fc7d..d2d6252ac91 100644 --- a/components/style/stylesheets/mod.rs +++ b/components/style/stylesheets/mod.rs @@ -225,15 +225,11 @@ impl fmt::Debug for UrlExtraData { .field("chrome_rules_enabled", &self.chrome_rules_enabled()) .field( "base", - &DebugURI(self.as_ref().mBaseURI.raw::<structs::nsIURI>()), + &DebugURI(self.as_ref().mBaseURI.raw()), ) .field( "referrer", - &DebugReferrerInfo( - self.as_ref() - .mReferrerInfo - .raw::<structs::nsIReferrerInfo>(), - ), + &DebugReferrerInfo(self.as_ref().mReferrerInfo.raw()), ) .finish() } |