mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibWeb: Remove unecessary dependence on Window from CSS classes
These classes only needed Window to get at its realm. Pass a realm directly to construct CSS classes.
This commit is contained in:
parent
8de7e49a56
commit
a2ccb00e1d
37 changed files with 159 additions and 146 deletions
|
@ -5,15 +5,16 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/CSSConditionRulePrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/CSS/CSSConditionRule.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSConditionRule::CSSConditionRule(HTML::Window& window_object, CSSRuleList& rules)
|
||||
: CSSGroupingRule(window_object, rules)
|
||||
CSSConditionRule::CSSConditionRule(JS::Realm& realm, CSSRuleList& rules)
|
||||
: CSSGroupingRule(realm, rules)
|
||||
{
|
||||
set_prototype(&window_object.cached_web_prototype("CSSConditionRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSConditionRulePrototype>(realm, "CSSConditionRule"));
|
||||
}
|
||||
|
||||
void CSSConditionRule::for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue