mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-10 09:02:14 +02:00
Previously we were inconsistent by generating code for enum definitions but not generating code for dictionaries. With future changes to the IDL generator to expose helpers to convert to and from IDL values this produced circular depdendencies. To solve this problem, also generate the dictionary definitions in bindings headers.
32 lines
991 B
C++
32 lines
991 B
C++
/*
|
|
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <AK/StringView.h>
|
|
#include <LibJS/Forward.h>
|
|
#include <LibWeb/CSS/GeneratedCSSNumericFactoryMethods.h>
|
|
#include <LibWeb/Export.h>
|
|
#include <LibWeb/WebIDL/ExceptionOr.h>
|
|
#include <LibWeb/WebIDL/Types.h>
|
|
|
|
// https://www.w3.org/TR/cssom-1/#namespacedef-css
|
|
namespace Web::CSS {
|
|
|
|
WEB_API WebIDL::ExceptionOr<String> escape(JS::VM&, StringView identifier);
|
|
|
|
WEB_API bool supports(JS::VM&, FlyString const& property, StringView value);
|
|
WEB_API WebIDL::ExceptionOr<bool> supports(JS::VM&, StringView condition_text);
|
|
|
|
WEB_API WebIDL::ExceptionOr<void> register_property(JS::VM&, Bindings::PropertyDefinition const&);
|
|
|
|
// NB: Numeric factory functions (https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory) are generated,
|
|
// see GenerateCSSNumericFactoryMethods.cpp
|
|
|
|
}
|