mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 02:08:58 +00:00
LibWeb: Remove CSS::Parser::ParsingContext's default constructor
This relied on pulling the current realm from the main thread VM, which requires an execution context to be on the VM's stack. This heavily relied on the dummy execution context that is always on the stack, for example, when parsing the UA style sheets where no JavaScript is running.
This commit is contained in:
parent
54a1ec2f10
commit
f7ff1fd985
Notes:
sideshowbarker
2024-07-16 23:19:15 +09:00
Author: https://github.com/Lubrsi
Commit: f7ff1fd985
Pull-request: https://github.com/SerenityOS/serenity/pull/17669
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
12 changed files with 73 additions and 72 deletions
|
@ -99,7 +99,7 @@ DeprecatedString CSSStyleRule::selector_text() const
|
|||
void CSSStyleRule::set_selector_text(StringView selector_text)
|
||||
{
|
||||
// 1. Run the parse a group of selectors algorithm on the given value.
|
||||
auto parsed_selectors = parse_selector({}, selector_text);
|
||||
auto parsed_selectors = parse_selector(Parser::ParsingContext { realm() }, selector_text);
|
||||
|
||||
// 2. If the algorithm returns a non-null value replace the associated group of selectors with the returned value.
|
||||
if (parsed_selectors.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue