mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb/CSS: Parse nested declarations in insert_a_css_rule()
The spec algorithm changed at some point to support nested declarations, but I only just noticed. The subtest regression is one we were passing incorrectly.
This commit is contained in:
parent
fa8bbfa6a5
commit
3d1665cc80
Notes:
github-actions[bot]
2025-04-23 10:40:15 +00:00
Author: https://github.com/AtkinsSJ
Commit: 3d1665cc80
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4354
4 changed files with 40 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021-2024, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
|
@ -9,8 +9,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/Iterator.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
@ -55,7 +53,11 @@ public:
|
|||
virtual Optional<JS::Value> item_value(size_t index) const override;
|
||||
|
||||
WebIDL::ExceptionOr<void> remove_a_css_rule(u32 index);
|
||||
WebIDL::ExceptionOr<unsigned> insert_a_css_rule(Variant<StringView, CSSRule*>, u32 index);
|
||||
enum class Nested {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
WebIDL::ExceptionOr<unsigned> insert_a_css_rule(Variant<StringView, CSSRule*>, u32 index, Nested = Nested::No);
|
||||
|
||||
void for_each_effective_rule(TraversalOrder, Function<void(CSSRule const&)> const& callback) const;
|
||||
// Returns whether the match state of any media queries changed after evaluation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue