Struct style::parser::ParserContext [] [src]

pub struct ParserContext<'a> {
    pub stylesheet_origin: Origin,
    pub url_data: &'a UrlExtraData,
    pub rule_type: Option<CssRuleType>,
    pub parsing_mode: ParsingMode,
    pub quirks_mode: QuirksMode,
    pub namespaces: Option<&'a Namespaces>,
}

The data that the parser needs from outside in order to parse a stylesheet.

Fields

The Origin of the stylesheet, whether it's a user, author or user-agent stylesheet.

The extra data we need for resolving url values.

The current rule type, if any.

The mode to use when parsing.

The quirks mode of this stylesheet.

The currently active namespaces.

Methods

impl<'a> ParserContext<'a>
[src]

[src]

Create a parser context.

[src]

Create a parser context for on-the-fly parsing in CSSOM

[src]

Create a parser context based on a previous context, but with a modified rule type.

[src]

Get the rule type, which assumes that one is available.

[src]

Record a CSS parse error with this context’s error reporting.

[src]

Returns whether chrome-only rules should be parsed.