Auto merge of #19262 - heycam:visited-links-enable, r=TYLin

style: Look up Gecko visited style pref directly

Servo side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1418217 reviewed there by TYLin.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19262)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-11-17 03:12:48 -06:00 committed by GitHub
commit 7b0006ece6
3 changed files with 29 additions and 29 deletions

View file

@ -8,8 +8,7 @@ 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::{StyleSheetInfo, ServoStyleSheetInner, nsIDocument, self};
use gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
use invalidation::media_queries::{MediaListKey, ToMediaListKey};
use malloc_size_of::MallocSizeOfOps;
@ -178,7 +177,7 @@ impl PerDocumentStyleDataImpl {
/// 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 {

View file

@ -597,8 +597,6 @@ extern "C" {
pub fn Gecko_GetActiveLinkAttrDeclarationBlock ( element : RawGeckoElementBorrowed , ) -> RawServoDeclarationBlockStrongBorrowedOrNull ;
} extern "C" {
pub fn Gecko_IsPrivateBrowsingEnabled ( aDoc : * const nsIDocument , ) -> bool ;
} extern "C" {
pub fn Gecko_AreVisitedLinksEnabled ( ) -> bool ;
} extern "C" {
pub fn Gecko_GetAnimationRule ( aElementOrPseudo : RawGeckoElementBorrowed , aCascadeLevel : EffectCompositor_CascadeLevel , aAnimationValues : RawServoAnimationValueMapBorrowedMut , ) -> bool ;
} extern "C" {

File diff suppressed because one or more lines are too long