stylo: Honor the relevant link visited pref.

MozReview-Commit-ID: D5NiEJUpONQ
This commit is contained in:
Emilio Cobos Álvarez 2017-07-23 17:37:46 +02:00
parent 04e855c38d
commit 9b2d96f7e7
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 20 additions and 2 deletions

View file

@ -187,6 +187,13 @@ impl PerDocumentStyleDataImpl {
);
}
/// Returns whether private browsing is enabled.
pub fn is_private_browsing_enabled(&self) -> bool {
let doc =
self.stylist.device().pres_context().mDocument.raw::<nsIDocument>();
unsafe { bindings::Gecko_IsPrivateBrowsingEnabled(doc) }
}
/// Get the default computed values for this document.
pub fn default_computed_values(&self) -> &Arc<ComputedValues> {
self.stylist.device().default_computed_values_arc()