style: Read visited links pref directly. draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 17 Nov 2017 14:48:17 +0800
changeset 699454 301b33e1bf4b6b6eb7c514660078634442f359a1
parent 699453 0549c9222d29f40a06422afb98db5f5dfd344b92
child 699474 034905f86cd2c1fa4d68780bd09364122a7b6f00
push id89575
push userbmo:cam@mcc.id.au
push dateFri, 17 Nov 2017 06:55:55 +0000
milestone59.0a1
style: Read visited links pref directly. MozReview-Commit-ID: EsPJHxobsAL
servo/components/style/gecko/data.rs
--- a/servo/components/style/gecko/data.rs
+++ b/servo/components/style/gecko/data.rs
@@ -4,17 +4,17 @@
 
 //! Data needed to style a Gecko document.
 
 use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
 use dom::TElement;
 use gecko_bindings::bindings::{self, RawServoStyleSet};
 use gecko_bindings::structs::{RawGeckoPresContextOwned, ServoStyleSetSizes, ServoStyleSheet};
 use gecko_bindings::structs::{StyleSheetInfo, ServoStyleSheetInner};
-use gecko_bindings::structs::nsIDocument;
+use gecko_bindings::structs::{self, nsIDocument};
 use gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
 use invalidation::media_queries::{MediaListKey, ToMediaListKey};
 use malloc_size_of::MallocSizeOfOps;
 use media_queries::{Device, MediaList};
 use properties::ComputedValues;
 use servo_arc::Arc;
 use shared_lock::{Locked, StylesheetGuards, SharedRwLockReadGuard};
 use stylesheets::{StylesheetContents, StylesheetInDocument};
@@ -173,17 +173,17 @@ impl PerDocumentStyleDataImpl {
 
     /// Get the default computed values for this document.
     pub fn default_computed_values(&self) -> &Arc<ComputedValues> {
         self.stylist.device().default_computed_values_arc()
     }
 
     /// Returns whether visited links are enabled.
     fn visited_links_enabled(&self) -> bool {
-        unsafe { bindings::Gecko_AreVisitedLinksEnabled() }
+        unsafe { structs::StylePrefs_sVisitedLinksEnabled }
     }
     /// Returns whether visited styles are enabled.
     pub fn visited_styles_enabled(&self) -> bool {
         self.visited_links_enabled() && !self.is_private_browsing_enabled()
     }
 
     /// Measure heap usage.
     pub fn add_size_of(&self, ops: &mut MallocSizeOfOps, sizes: &mut ServoStyleSetSizes) {