forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSS.h
More file actions
38 lines (29 loc) · 1.08 KB
/
Copy pathCSS.h
File metadata and controls
38 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* 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 {
struct PropertyDefinition {
String name;
String syntax;
bool inherits;
Optional<String> initial_value;
};
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&, PropertyDefinition definition);
// NB: Numeric factory functions (https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory) are generated,
// see GenerateCSSNumericFactoryMethods.cpp
}