mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add an extra data field to ParserContext.
This will be used for passing Gecko-specific information through the CSS parser in stylo.
This commit is contained in:
parent
a636b7127e
commit
bb85f5faf0
10 changed files with 91 additions and 27 deletions
|
@ -9,6 +9,7 @@ use dom::PresentationalHintsSynthetizer;
|
|||
use element_state::*;
|
||||
use error_reporting::StdoutErrorReporter;
|
||||
use media_queries::{Device, MediaType};
|
||||
use parser::ParserContextExtraData;
|
||||
use properties::{self, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use restyle_hints::{ElementSnapshot, RestyleHint, DependencySet};
|
||||
use selector_impl::{SelectorImplExt, ServoSelectorImpl};
|
||||
|
@ -46,7 +47,8 @@ lazy_static! {
|
|||
None,
|
||||
None,
|
||||
Origin::UserAgent,
|
||||
box StdoutErrorReporter);
|
||||
box StdoutErrorReporter,
|
||||
ParserContextExtraData::default());
|
||||
stylesheets.push(ua_stylesheet);
|
||||
}
|
||||
Err(..) => {
|
||||
|
@ -57,7 +59,8 @@ lazy_static! {
|
|||
}
|
||||
for &(ref contents, ref url) in &opts::get().user_stylesheets {
|
||||
stylesheets.push(Stylesheet::from_bytes(
|
||||
&contents, url.clone(), None, None, Origin::User, box StdoutErrorReporter));
|
||||
&contents, url.clone(), None, None, Origin::User, box StdoutErrorReporter,
|
||||
ParserContextExtraData::default()));
|
||||
}
|
||||
stylesheets
|
||||
};
|
||||
|
@ -73,7 +76,8 @@ lazy_static! {
|
|||
None,
|
||||
None,
|
||||
Origin::UserAgent,
|
||||
box StdoutErrorReporter)
|
||||
box StdoutErrorReporter,
|
||||
ParserContextExtraData::default())
|
||||
},
|
||||
Err(..) => {
|
||||
error!("Stylist failed to load 'quirks-mode.css'!");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue