aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/stylesheet_set.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-05-26 17:47:32 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-05-29 20:27:38 +0200
commitf569274cca74efa20a9fc6d4a47b48fd50e29b17 (patch)
treefd5dcbbfcebaef8d275a4e1dd6ef48ca503549c5 /components/style/stylesheet_set.rs
parent39e836966edf5d9f38ac39224ef32f1601163cb6 (diff)
downloadservo-f569274cca74efa20a9fc6d4a47b48fd50e29b17.tar.gz
servo-f569274cca74efa20a9fc6d4a47b48fd50e29b17.zip
Bug 1357583: Add a bunch of logging, shortcuts, and look also at the rightmost selector while invalidating sheets. r=heycam
MozReview-Commit-ID: 2XGcOCTa7MV
Diffstat (limited to 'components/style/stylesheet_set.rs')
-rw-r--r--components/style/stylesheet_set.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs
index 93b14dbe7a4..2908d81bef4 100644
--- a/components/style/stylesheet_set.rs
+++ b/components/style/stylesheet_set.rs
@@ -78,6 +78,7 @@ impl StylesheetSet {
unique_id: u64,
guard: &SharedRwLockReadGuard)
{
+ debug!("StylesheetSet::append_stylesheet");
self.remove_stylesheet_if_present(unique_id);
self.entries.push(StylesheetSetEntry {
unique_id: unique_id,
@@ -98,6 +99,7 @@ impl StylesheetSet {
unique_id: u64,
guard: &SharedRwLockReadGuard)
{
+ debug!("StylesheetSet::prepend_stylesheet");
self.remove_stylesheet_if_present(unique_id);
self.entries.insert(0, StylesheetSetEntry {
unique_id: unique_id,
@@ -119,6 +121,7 @@ impl StylesheetSet {
before_unique_id: u64,
guard: &SharedRwLockReadGuard)
{
+ debug!("StylesheetSet::insert_stylesheet_before");
self.remove_stylesheet_if_present(unique_id);
let index = self.entries.iter().position(|x| {
x.unique_id == before_unique_id
@@ -136,6 +139,7 @@ impl StylesheetSet {
/// Remove a given stylesheet from the set.
pub fn remove_stylesheet(&mut self, unique_id: u64) {
+ debug!("StylesheetSet::remove_stylesheet");
self.remove_stylesheet_if_present(unique_id);
self.dirty = true;
// FIXME(emilio): We can do better!
@@ -144,6 +148,7 @@ impl StylesheetSet {
/// Notes that the author style has been disabled for this document.
pub fn set_author_style_disabled(&mut self, disabled: bool) {
+ debug!("StylesheetSet::set_author_style_disabled");
if self.author_style_disabled == disabled {
return;
}
@@ -164,6 +169,7 @@ impl StylesheetSet {
-> StylesheetIterator
where E: TElement,
{
+ debug!("StylesheetSet::flush");
debug_assert!(self.dirty);
self.dirty = false;