mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Add ability to clear and rebuild individual origins.
This commit is contained in:
parent
72107eb838
commit
f3a7adfcc7
2 changed files with 72 additions and 12 deletions
|
@ -17,7 +17,7 @@ use properties::ComputedValues;
|
|||
use servo_arc::Arc;
|
||||
use shared_lock::{Locked, StylesheetGuards, SharedRwLockReadGuard};
|
||||
use stylesheet_set::StylesheetSet;
|
||||
use stylesheets::{PerOrigin, StylesheetContents, StylesheetInDocument};
|
||||
use stylesheets::{Origin, PerOrigin, StylesheetContents, StylesheetInDocument};
|
||||
use stylist::{ExtraStyleData, Stylist};
|
||||
|
||||
/// Little wrapper to a Gecko style sheet.
|
||||
|
@ -193,6 +193,11 @@ impl PerDocumentStyleDataImpl {
|
|||
self.stylist.clear();
|
||||
}
|
||||
|
||||
/// Clear the stylist's data for the specified origin.
|
||||
pub fn clear_stylist_origin(&mut self, origin: &Origin) {
|
||||
self.stylist.clear_origin(origin);
|
||||
}
|
||||
|
||||
/// Returns whether visited links are enabled.
|
||||
fn visited_links_enabled(&self) -> bool {
|
||||
unsafe { bindings::Gecko_AreVisitedLinksEnabled() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue