mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Add pipeline information to CSS error reporting.
This commit is contained in:
parent
6032f8225b
commit
fc81276c8e
27 changed files with 103 additions and 29 deletions
|
@ -89,6 +89,7 @@ use net_traits::ControlMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
|||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::{AsyncResponseTarget, PendingAsyncLoad};
|
||||
use num::ToPrimitive;
|
||||
use script_task::CSSError;
|
||||
use script_task::{MainThreadScriptMsg, Runnable};
|
||||
use script_traits::{ScriptMsg as ConstellationMsg, TouchEventType, TouchId, UntrustedNodeAddress};
|
||||
use std::ascii::AsciiExt;
|
||||
|
@ -203,6 +204,8 @@ pub struct Document {
|
|||
dom_content_loaded_event_start: Cell<u64>,
|
||||
dom_content_loaded_event_end: Cell<u64>,
|
||||
dom_complete: Cell<u64>,
|
||||
/// Vector to store CSS errors
|
||||
css_errors_store: DOMRefCell<Vec<CSSError>>,
|
||||
}
|
||||
|
||||
impl PartialEq for Document {
|
||||
|
@ -294,6 +297,10 @@ impl Document {
|
|||
self.is_html_document
|
||||
}
|
||||
|
||||
pub fn report_css_error(&self, css_error: CSSError) {
|
||||
self.css_errors_store.borrow_mut().push(css_error);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#fully-active
|
||||
pub fn is_fully_active(&self) -> bool {
|
||||
let browsing_context = self.window.browsing_context();
|
||||
|
@ -1495,6 +1502,7 @@ impl Document {
|
|||
dom_content_loaded_event_start: Cell::new(Default::default()),
|
||||
dom_content_loaded_event_end: Cell::new(Default::default()),
|
||||
dom_complete: Cell::new(Default::default()),
|
||||
css_errors_store: DOMRefCell::new(vec![]),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue