Add a Stylo API for reparenting a given style.

Servo side of part 4 of the fix for Gecko bug 1324619.  r=emilio
This commit is contained in:
Boris Zbarsky 2017-07-28 21:16:41 -04:00
parent 8db39f8fde
commit 7161fff1b8
6 changed files with 189 additions and 36 deletions

View file

@ -204,6 +204,15 @@ impl PerDocumentStyleDataImpl {
pub fn clear_stylist(&mut self) {
self.stylist.clear();
}
/// Returns whether visited links are enabled.
fn visited_links_enabled(&self) -> bool {
unsafe { bindings::Gecko_AreVisitedLinksEnabled() }
}
/// Returns whether visited styles are enabled.
pub fn visited_styles_enabled(&self) -> bool {
self.visited_links_enabled() && !self.is_private_browsing_enabled()
}
}
unsafe impl HasFFI for PerDocumentStyleData {