mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Store whether sheet being parsed is a UA stylesheet
UA stylesheets allow some things that regular stylesheets don't, for instance allowing use of "non-overridable" `@counter-style` names.
This commit is contained in:
Notes:
github-actions[bot]
2026-02-23 11:22:46 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3e9cdb2cf4e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8052 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -50,6 +50,12 @@ ParsingParams::ParsingParams(JS::Realm& realm, ParsingMode mode)
|
||||
{
|
||||
}
|
||||
|
||||
ParsingParams::ParsingParams(JS::Realm& realm, IsUAStyleSheet is_ua_style_sheet)
|
||||
: realm(realm)
|
||||
, is_ua_style_sheet(is_ua_style_sheet)
|
||||
{
|
||||
}
|
||||
|
||||
ParsingParams::ParsingParams(DOM::Document const& document, ParsingMode mode)
|
||||
: realm(const_cast<JS::Realm&>(document.realm()))
|
||||
, document(&document)
|
||||
@@ -67,6 +73,7 @@ Parser::Parser(ParsingParams const& context, Vector<Token> tokens)
|
||||
: m_document(context.document)
|
||||
, m_realm(context.realm)
|
||||
, m_parsing_mode(context.mode)
|
||||
, m_is_ua_style_sheet(context.is_ua_style_sheet)
|
||||
, m_tokens(move(tokens))
|
||||
, m_token_stream(m_tokens)
|
||||
, m_value_context(move(context.value_context))
|
||||
|
||||
Reference in New Issue
Block a user