mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Better debugging for stylesheets and URLs.
Bug: 1470145 Reviewed-by: xidorn MozReview-Commit-ID: FIcz2K1ZYX0
This commit is contained in:
parent
46e572a497
commit
f564b32b75
6 changed files with 63 additions and 28 deletions
|
@ -17,14 +17,25 @@ use media_queries::{Device, MediaList};
|
|||
use properties::ComputedValues;
|
||||
use selector_parser::SnapshotMap;
|
||||
use servo_arc::Arc;
|
||||
use std::fmt;
|
||||
use shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
|
||||
use stylesheets::{CssRule, Origin, StylesheetContents, StylesheetInDocument};
|
||||
use stylist::Stylist;
|
||||
|
||||
/// Little wrapper to a Gecko style sheet.
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
#[derive(Eq, PartialEq)]
|
||||
pub struct GeckoStyleSheet(*const DomStyleSheet);
|
||||
|
||||
impl fmt::Debug for GeckoStyleSheet {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
let contents = self.contents();
|
||||
formatter.debug_struct("GeckoStyleSheet")
|
||||
.field("origin", &contents.origin)
|
||||
.field("url_data", &*contents.url_data.read())
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl ToMediaListKey for ::gecko::data::GeckoStyleSheet {
|
||||
fn to_media_list_key(&self) -> MediaListKey {
|
||||
use std::mem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue