mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
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:
parent
8db39f8fde
commit
7161fff1b8
6 changed files with 189 additions and 36 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue