diff --git a/Libraries/LibWeb/ARIA/ARIAMixin.h b/Libraries/LibWeb/ARIA/ARIAMixin.h index 1759486c474..de3943dbacd 100644 --- a/Libraries/LibWeb/ARIA/ARIAMixin.h +++ b/Libraries/LibWeb/ARIA/ARIAMixin.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace Web::ARIA { @@ -27,7 +28,7 @@ namespace Web::ARIA { __ENUMERATE_ARIA_ATTRIBUTE(aria_labelled_by_elements, aria_labelled_by) \ __ENUMERATE_ARIA_ATTRIBUTE(aria_owns_elements, aria_owns) -class ARIAMixin { +class WEB_API ARIAMixin { public: virtual ~ARIAMixin(); diff --git a/Libraries/LibWeb/ARIA/Roles.h b/Libraries/LibWeb/ARIA/Roles.h index 8b483d9ceaf..5ebbeffea38 100644 --- a/Libraries/LibWeb/ARIA/Roles.h +++ b/Libraries/LibWeb/ARIA/Roles.h @@ -8,6 +8,7 @@ #include #include +#include namespace Web::ARIA { @@ -121,7 +122,7 @@ enum class Role { #undef __ENUMERATE_ARIA_ROLE }; -StringView role_name(Role); +WEB_API StringView role_name(Role); Optional role_from_string(StringView role_name); bool is_abstract_role(Role); diff --git a/Libraries/LibWeb/Animations/Animatable.h b/Libraries/LibWeb/Animations/Animatable.h index 1efb3446d4c..cf67e7e7fd0 100644 --- a/Libraries/LibWeb/Animations/Animatable.h +++ b/Libraries/LibWeb/Animations/Animatable.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace Web::CSS { @@ -33,7 +34,7 @@ struct GetAnimationsOptions { }; // https://drafts.csswg.org/web-animations-1/#animatable -class Animatable { +class WEB_API Animatable { public: struct TransitionAttributes { double delay; diff --git a/Libraries/LibWeb/Bindings/Intrinsics.h b/Libraries/LibWeb/Bindings/Intrinsics.h index 198aae36f3e..03feac28868 100644 --- a/Libraries/LibWeb/Bindings/Intrinsics.h +++ b/Libraries/LibWeb/Bindings/Intrinsics.h @@ -13,6 +13,7 @@ #include #include #include +#include #define WEB_SET_PROTOTYPE_FOR_INTERFACE_WITH_CUSTOM_NAME(interface_class, interface_name) \ do { \ @@ -84,7 +85,7 @@ private: GC::Ref m_realm; }; -Intrinsics& host_defined_intrinsics(JS::Realm& realm); +WEB_API Intrinsics& host_defined_intrinsics(JS::Realm& realm); template [[nodiscard]] JS::Object& ensure_web_namespace(JS::Realm& realm, FlyString const& namespace_name) diff --git a/Libraries/LibWeb/Bindings/MainThreadVM.h b/Libraries/LibWeb/Bindings/MainThreadVM.h index c082d5eab93..b172688d863 100644 --- a/Libraries/LibWeb/Bindings/MainThreadVM.h +++ b/Libraries/LibWeb/Bindings/MainThreadVM.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -33,11 +34,11 @@ struct WebEngineCustomJobCallbackData final : public JS::JobCallback::CustomData HTML::Script* active_script(); -void initialize_main_thread_vm(AgentType); -JS::VM& main_thread_vm(); +WEB_API void initialize_main_thread_vm(AgentType); +WEB_API JS::VM& main_thread_vm(); void queue_mutation_observer_microtask(DOM::Document const&); -NonnullOwnPtr create_a_new_javascript_realm(JS::VM&, Function create_global_object, Function create_global_this_value); -void invoke_custom_element_reactions(Vector>& element_queue); +WEB_API NonnullOwnPtr create_a_new_javascript_realm(JS::VM&, Function create_global_object, Function create_global_this_value); +WEB_API void invoke_custom_element_reactions(Vector>& element_queue); } diff --git a/Libraries/LibWeb/Bindings/PlatformObject.h b/Libraries/LibWeb/Bindings/PlatformObject.h index c01b86b60d9..c9bd73af23a 100644 --- a/Libraries/LibWeb/Bindings/PlatformObject.h +++ b/Libraries/LibWeb/Bindings/PlatformObject.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::Bindings { @@ -22,7 +23,7 @@ namespace Web::Bindings { } // https://webidl.spec.whatwg.org/#dfn-platform-object -class PlatformObject : public JS::Object { +class WEB_API PlatformObject : public JS::Object { JS_OBJECT(PlatformObject, JS::Object); public: diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index b21338cb423..97da4e01559 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -1066,7 +1066,7 @@ set(GENERATED_SOURCES HTML/Parser/NamedCharacterReferences.cpp ) -ladybird_lib(LibWeb web) +ladybird_lib(LibWeb web EXPLICIT_SYMBOL_EXPORT) target_link_libraries(LibWeb PRIVATE LibCore LibCompress LibCrypto LibJS LibHTTP LibGfx LibIPC LibRegex LibSyntax LibTextCodec LibUnicode LibMedia LibWasm LibXML LibIDL LibURL LibTLS LibRequests LibGC LibThreading skia ${ANGLE_TARGETS}) diff --git a/Libraries/LibWeb/CSS/CSS.h b/Libraries/LibWeb/CSS/CSS.h index 193447aecb4..2c01fb33d6b 100644 --- a/Libraries/LibWeb/CSS/CSS.h +++ b/Libraries/LibWeb/CSS/CSS.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -23,12 +24,12 @@ struct PropertyDefinition { Optional initial_value; }; -WebIDL::ExceptionOr escape(JS::VM&, StringView identifier); +WEB_API WebIDL::ExceptionOr escape(JS::VM&, StringView identifier); -bool supports(JS::VM&, StringView property, StringView value); -WebIDL::ExceptionOr supports(JS::VM&, StringView condition_text); +WEB_API bool supports(JS::VM&, StringView property, StringView value); +WEB_API WebIDL::ExceptionOr supports(JS::VM&, StringView condition_text); -WebIDL::ExceptionOr register_property(JS::VM&, PropertyDefinition definition); +WEB_API WebIDL::ExceptionOr register_property(JS::VM&, PropertyDefinition definition); GC::Ref number(JS::VM&, WebIDL::Double value); GC::Ref percent(JS::VM&, WebIDL::Double value); diff --git a/Libraries/LibWeb/CSS/CSSImportRule.h b/Libraries/LibWeb/CSS/CSSImportRule.h index a9f3abb3480..ba3c5a8b986 100644 --- a/Libraries/LibWeb/CSS/CSSImportRule.h +++ b/Libraries/LibWeb/CSS/CSSImportRule.h @@ -12,10 +12,11 @@ #include #include #include +#include namespace Web::CSS { -class CSSImportRule final +class WEB_API CSSImportRule final : public CSSRule { WEB_PLATFORM_OBJECT(CSSImportRule, CSSRule); GC_DECLARE_ALLOCATOR(CSSImportRule); diff --git a/Libraries/LibWeb/CSS/CSSRule.h b/Libraries/LibWeb/CSS/CSSRule.h index 00558307987..1096934d657 100644 --- a/Libraries/LibWeb/CSS/CSSRule.h +++ b/Libraries/LibWeb/CSS/CSSRule.h @@ -12,11 +12,12 @@ #include #include #include +#include #include namespace Web::CSS { -class CSSRule : public Bindings::PlatformObject { +class WEB_API CSSRule : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(CSSRule, Bindings::PlatformObject); public: diff --git a/Libraries/LibWeb/CSS/CSSRuleList.h b/Libraries/LibWeb/CSS/CSSRuleList.h index f2d509c05e9..89b3d2abefd 100644 --- a/Libraries/LibWeb/CSS/CSSRuleList.h +++ b/Libraries/LibWeb/CSS/CSSRuleList.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -19,7 +20,7 @@ namespace Web::CSS { // https://www.w3.org/TR/cssom/#the-cssrulelist-interface -class CSSRuleList : public Bindings::PlatformObject { +class WEB_API CSSRuleList : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(CSSRuleList, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(CSSRuleList); diff --git a/Libraries/LibWeb/CSS/CSSStyleProperties.h b/Libraries/LibWeb/CSS/CSSStyleProperties.h index b3ddd4b6878..756b2f49d78 100644 --- a/Libraries/LibWeb/CSS/CSSStyleProperties.h +++ b/Libraries/LibWeb/CSS/CSSStyleProperties.h @@ -10,11 +10,12 @@ #include #include #include +#include namespace Web::CSS { // https://drafts.csswg.org/cssom/#cssstyleproperties -class CSSStyleProperties +class WEB_API CSSStyleProperties : public CSSStyleDeclaration , public Bindings::GeneratedCSSStyleProperties { WEB_PLATFORM_OBJECT(CSSStyleProperties, CSSStyleDeclaration); diff --git a/Libraries/LibWeb/CSS/CSSStyleSheet.h b/Libraries/LibWeb/CSS/CSSStyleSheet.h index c6c92596b0b..d8c3b470391 100644 --- a/Libraries/LibWeb/CSS/CSSStyleSheet.h +++ b/Libraries/LibWeb/CSS/CSSStyleSheet.h @@ -15,6 +15,7 @@ #include #include #include +#include #include namespace Web::CSS { @@ -29,7 +30,7 @@ struct CSSStyleSheetInit { }; // https://drafts.csswg.org/cssom-1/#cssstylesheet -class CSSStyleSheet final : public StyleSheet { +class WEB_API CSSStyleSheet final : public StyleSheet { WEB_PLATFORM_OBJECT(CSSStyleSheet, StyleSheet); GC_DECLARE_ALLOCATOR(CSSStyleSheet); diff --git a/Libraries/LibWeb/CSS/ComputedProperties.h b/Libraries/LibWeb/CSS/ComputedProperties.h index 73d4130434f..5e838ab421e 100644 --- a/Libraries/LibWeb/CSS/ComputedProperties.h +++ b/Libraries/LibWeb/CSS/ComputedProperties.h @@ -21,10 +21,11 @@ #include #include #include +#include namespace Web::CSS { -class ComputedProperties final : public JS::Cell { +class WEB_API ComputedProperties final : public JS::Cell { GC_CELL(ComputedProperties, JS::Cell); GC_DECLARE_ALLOCATOR(ComputedProperties); diff --git a/Libraries/LibWeb/CSS/EdgeRect.h b/Libraries/LibWeb/CSS/EdgeRect.h index 85a8b71ac8a..0437bafc021 100644 --- a/Libraries/LibWeb/CSS/EdgeRect.h +++ b/Libraries/LibWeb/CSS/EdgeRect.h @@ -11,10 +11,11 @@ #include #include +#include namespace Web::CSS { -struct EdgeRect { +struct WEB_API EdgeRect { Length top_edge; Length right_edge; Length bottom_edge; diff --git a/Libraries/LibWeb/CSS/Length.h b/Libraries/LibWeb/CSS/Length.h index 56dfdf4905c..7ec690b08b1 100644 --- a/Libraries/LibWeb/CSS/Length.h +++ b/Libraries/LibWeb/CSS/Length.h @@ -11,12 +11,13 @@ #include #include #include +#include #include #include namespace Web::CSS { -class Length { +class WEB_API Length { public: enum class Type : u8 { // Font-relative diff --git a/Libraries/LibWeb/CSS/Parser/ComponentValue.h b/Libraries/LibWeb/CSS/Parser/ComponentValue.h index b86c96e80ab..d6128d2b4e9 100644 --- a/Libraries/LibWeb/CSS/Parser/ComponentValue.h +++ b/Libraries/LibWeb/CSS/Parser/ComponentValue.h @@ -12,11 +12,12 @@ #include #include #include +#include namespace Web::CSS::Parser { // https://drafts.csswg.org/css-syntax/#component-value -class ComponentValue { +class WEB_API ComponentValue { AK_MAKE_DEFAULT_COPYABLE(ComponentValue); AK_MAKE_DEFAULT_MOVABLE(ComponentValue); diff --git a/Libraries/LibWeb/CSS/Parser/ErrorReporter.h b/Libraries/LibWeb/CSS/Parser/ErrorReporter.h index a9a3f27987c..9fcc23165c1 100644 --- a/Libraries/LibWeb/CSS/Parser/ErrorReporter.h +++ b/Libraries/LibWeb/CSS/Parser/ErrorReporter.h @@ -9,6 +9,7 @@ #include #include #include +#include namespace Web::CSS::Parser { @@ -125,7 +126,7 @@ using ParsingError = Variant #include #include +#include namespace Web::CSS::Parser { -class SyntaxNode { +class WEB_API SyntaxNode { public: enum class NodeType : u8 { Universal, diff --git a/Libraries/LibWeb/CSS/Parser/SyntaxParsing.h b/Libraries/LibWeb/CSS/Parser/SyntaxParsing.h index ec883462f99..07f8aa12faa 100644 --- a/Libraries/LibWeb/CSS/Parser/SyntaxParsing.h +++ b/Libraries/LibWeb/CSS/Parser/SyntaxParsing.h @@ -9,11 +9,12 @@ #include #include #include +#include #include namespace Web::CSS::Parser { -OwnPtr parse_as_syntax(Vector const&); +WEB_API OwnPtr parse_as_syntax(Vector const&); NonnullRefPtr parse_with_a_syntax(ParsingParams const&, Vector const& input, SyntaxNode const& syntax, Optional const& element = {}); diff --git a/Libraries/LibWeb/CSS/Parser/Token.h b/Libraries/LibWeb/CSS/Parser/Token.h index de4c59ae39a..fe2bfcca3a8 100644 --- a/Libraries/LibWeb/CSS/Parser/Token.h +++ b/Libraries/LibWeb/CSS/Parser/Token.h @@ -9,11 +9,12 @@ #include #include +#include #include namespace Web::CSS::Parser { -class Token { +class WEB_API Token { public: enum class Type : u8 { Invalid, diff --git a/Libraries/LibWeb/CSS/Parser/Tokenizer.h b/Libraries/LibWeb/CSS/Parser/Tokenizer.h index 9682039462d..c238aab6069 100644 --- a/Libraries/LibWeb/CSS/Parser/Tokenizer.h +++ b/Libraries/LibWeb/CSS/Parser/Tokenizer.h @@ -12,6 +12,7 @@ #include #include #include +#include #include namespace Web::CSS::Parser { @@ -57,7 +58,7 @@ public: u32 third {}; }; -class Tokenizer { +class WEB_API Tokenizer { public: static Vector tokenize(StringView input, StringView encoding); diff --git a/Libraries/LibWeb/CSS/Serialize.h b/Libraries/LibWeb/CSS/Serialize.h index 56c52900574..3f1352ff950 100644 --- a/Libraries/LibWeb/CSS/Serialize.h +++ b/Libraries/LibWeb/CSS/Serialize.h @@ -13,14 +13,15 @@ #include #include #include +#include namespace Web::CSS { void escape_a_character(StringBuilder&, u32 character); void escape_a_character_as_code_point(StringBuilder&, u32 character); -void serialize_an_identifier(StringBuilder&, StringView ident); +WEB_API void serialize_an_identifier(StringBuilder&, StringView ident); void serialize_a_string(StringBuilder&, StringView string); -void serialize_a_url(StringBuilder&, StringView url); +WEB_API void serialize_a_url(StringBuilder&, StringView url); void serialize_unicode_ranges(StringBuilder&, Vector const& unicode_ranges); void serialize_a_srgb_value(StringBuilder&, Color color); void serialize_a_number(StringBuilder&, double value); diff --git a/Libraries/LibWeb/CSS/StyleComputer.h b/Libraries/LibWeb/CSS/StyleComputer.h index 9148c98e7ca..13351705e7f 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.h +++ b/Libraries/LibWeb/CSS/StyleComputer.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -126,7 +127,7 @@ struct RuleCache { class FontLoader; -class StyleComputer final : public GC::Cell { +class WEB_API StyleComputer final : public GC::Cell { GC_CELL(StyleComputer, GC::Cell); GC_DECLARE_ALLOCATOR(StyleComputer); diff --git a/Libraries/LibWeb/CSS/StyleSheet.h b/Libraries/LibWeb/CSS/StyleSheet.h index b85d97fc5e5..5b8a5d4bc95 100644 --- a/Libraries/LibWeb/CSS/StyleSheet.h +++ b/Libraries/LibWeb/CSS/StyleSheet.h @@ -9,12 +9,13 @@ #include #include +#include #include namespace Web::CSS { // https://drafts.csswg.org/cssom-1/#the-stylesheet-interface -class StyleSheet : public Bindings::PlatformObject { +class WEB_API StyleSheet : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(StyleSheet, Bindings::PlatformObject); public: diff --git a/Libraries/LibWeb/CSS/StyleSheetIdentifier.h b/Libraries/LibWeb/CSS/StyleSheetIdentifier.h index 9351505738f..eb5962b50a0 100644 --- a/Libraries/LibWeb/CSS/StyleSheetIdentifier.h +++ b/Libraries/LibWeb/CSS/StyleSheetIdentifier.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::CSS { @@ -35,9 +36,9 @@ Optional style_sheet_identifier_type_from_string(Str namespace IPC { template<> -ErrorOr encode(Encoder&, Web::CSS::StyleSheetIdentifier const&); +WEB_API ErrorOr encode(Encoder&, Web::CSS::StyleSheetIdentifier const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/CSS/StyleSheetList.h b/Libraries/LibWeb/CSS/StyleSheetList.h index 6472b0dafa1..050319fde19 100644 --- a/Libraries/LibWeb/CSS/StyleSheetList.h +++ b/Libraries/LibWeb/CSS/StyleSheetList.h @@ -10,10 +10,11 @@ #include #include +#include namespace Web::CSS { -class StyleSheetList final : public Bindings::PlatformObject { +class WEB_API StyleSheetList final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(StyleSheetList, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(StyleSheetList); diff --git a/Libraries/LibWeb/CSS/StyleValues/DisplayStyleValue.h b/Libraries/LibWeb/CSS/StyleValues/DisplayStyleValue.h index d87fcc26ed3..edbd4f32912 100644 --- a/Libraries/LibWeb/CSS/StyleValues/DisplayStyleValue.h +++ b/Libraries/LibWeb/CSS/StyleValues/DisplayStyleValue.h @@ -8,10 +8,11 @@ #include #include +#include namespace Web::CSS { -class DisplayStyleValue : public StyleValueWithDefaultOperators { +class WEB_API DisplayStyleValue : public StyleValueWithDefaultOperators { public: static ValueComparingNonnullRefPtr create(Display const&); virtual ~DisplayStyleValue() override = default; diff --git a/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.h b/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.h index 30468d78446..24929ceea81 100644 --- a/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.h +++ b/Libraries/LibWeb/CSS/StyleValues/EasingStyleValue.h @@ -12,6 +12,7 @@ #include #include +#include namespace Web::CSS { @@ -88,7 +89,7 @@ public: String to_string(SerializationMode) const; }; - struct Function : public Variant { + struct WEB_API Function : public Variant { using Variant::Variant; double evaluate_at(double input_progress, bool before_flag) const; diff --git a/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.h b/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.h index 926fcdcadcc..5439f494d08 100644 --- a/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.h +++ b/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.h @@ -11,10 +11,11 @@ #include #include +#include namespace Web::CSS { -class LengthStyleValue final : public DimensionStyleValue { +class WEB_API LengthStyleValue final : public DimensionStyleValue { public: static ValueComparingNonnullRefPtr create(Length const&); virtual ~LengthStyleValue() override = default; diff --git a/Libraries/LibWeb/CSS/StyleValues/StyleValue.h b/Libraries/LibWeb/CSS/StyleValues/StyleValue.h index 930062d659a..263d6262b83 100644 --- a/Libraries/LibWeb/CSS/StyleValues/StyleValue.h +++ b/Libraries/LibWeb/CSS/StyleValues/StyleValue.h @@ -25,6 +25,7 @@ #include #include #include +#include #include namespace Web::CSS { @@ -153,7 +154,7 @@ struct ColorResolutionContext { [[nodiscard]] static ColorResolutionContext for_layout_node_with_style(Layout::NodeWithStyle const&); }; -class StyleValue : public RefCounted { +class WEB_API StyleValue : public RefCounted { public: virtual ~StyleValue() = default; diff --git a/Libraries/LibWeb/CSS/Supports.h b/Libraries/LibWeb/CSS/Supports.h index 1f19f09e2b9..8081204a381 100644 --- a/Libraries/LibWeb/CSS/Supports.h +++ b/Libraries/LibWeb/CSS/Supports.h @@ -11,11 +11,12 @@ #include #include #include +#include namespace Web::CSS { // https://www.w3.org/TR/css-conditional-3/#at-supports -class Supports final : public RefCounted { +class WEB_API Supports final : public RefCounted { public: class Declaration final : public BooleanExpression { public: diff --git a/Libraries/LibWeb/CSS/SyntaxHighlighter/SyntaxHighlighter.h b/Libraries/LibWeb/CSS/SyntaxHighlighter/SyntaxHighlighter.h index 040067f639e..40a01355028 100644 --- a/Libraries/LibWeb/CSS/SyntaxHighlighter/SyntaxHighlighter.h +++ b/Libraries/LibWeb/CSS/SyntaxHighlighter/SyntaxHighlighter.h @@ -7,10 +7,11 @@ #pragma once #include +#include namespace Web::CSS { -class SyntaxHighlighter : public Syntax::Highlighter { +class WEB_API SyntaxHighlighter : public Syntax::Highlighter { public: SyntaxHighlighter() = default; virtual ~SyntaxHighlighter() override = default; diff --git a/Libraries/LibWeb/CSS/SystemColor.h b/Libraries/LibWeb/CSS/SystemColor.h index fe70c1300b1..7db65f896e2 100644 --- a/Libraries/LibWeb/CSS/SystemColor.h +++ b/Libraries/LibWeb/CSS/SystemColor.h @@ -8,6 +8,7 @@ #include #include +#include // https://www.w3.org/TR/css-color-4/#css-system-colors namespace Web::CSS::SystemColor { @@ -23,8 +24,8 @@ Color canvas_text(PreferredColorScheme); Color field(PreferredColorScheme); Color field_text(PreferredColorScheme); Color gray_text(PreferredColorScheme); -Color highlight(PreferredColorScheme); -Color highlight_text(PreferredColorScheme); +WEB_API Color highlight(PreferredColorScheme); +WEB_API Color highlight_text(PreferredColorScheme); Color link_text(PreferredColorScheme); Color mark(PreferredColorScheme); Color mark_text(PreferredColorScheme); diff --git a/Libraries/LibWeb/CSS/Transformation.h b/Libraries/LibWeb/CSS/Transformation.h index eb38fe61fb1..4de6cacc902 100644 --- a/Libraries/LibWeb/CSS/Transformation.h +++ b/Libraries/LibWeb/CSS/Transformation.h @@ -12,12 +12,13 @@ #include #include #include +#include namespace Web::CSS { using TransformValue = Variant; -class Transformation { +class WEB_API Transformation { public: Transformation(TransformFunction function, Vector&& values); diff --git a/Libraries/LibWeb/CSS/URL.h b/Libraries/LibWeb/CSS/URL.h index 8e2f67ee2b6..44dbc33d945 100644 --- a/Libraries/LibWeb/CSS/URL.h +++ b/Libraries/LibWeb/CSS/URL.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace Web::CSS { @@ -42,7 +43,7 @@ private: }; // https://drafts.csswg.org/css-values-4/#urls -class URL { +class WEB_API URL { public: enum class Type : u8 { Url, diff --git a/Libraries/LibWeb/Clipboard/SystemClipboard.h b/Libraries/LibWeb/Clipboard/SystemClipboard.h index 4182e919cca..5bc5248f9be 100644 --- a/Libraries/LibWeb/Clipboard/SystemClipboard.h +++ b/Libraries/LibWeb/Clipboard/SystemClipboard.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace Web::Clipboard { @@ -29,15 +30,15 @@ struct SystemClipboardItem { namespace IPC { template<> -ErrorOr encode(Encoder&, Web::Clipboard::SystemClipboardRepresentation const&); +WEB_API ErrorOr encode(Encoder&, Web::Clipboard::SystemClipboardRepresentation const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); template<> -ErrorOr encode(Encoder&, Web::Clipboard::SystemClipboardItem const&); +WEB_API ErrorOr encode(Encoder&, Web::Clipboard::SystemClipboardItem const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/Cookie/Cookie.h b/Libraries/LibWeb/Cookie/Cookie.h index 0ba2539b06e..71c5998b3cd 100644 --- a/Libraries/LibWeb/Cookie/Cookie.h +++ b/Libraries/LibWeb/Cookie/Cookie.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace Web::Cookie { @@ -25,7 +26,7 @@ enum class Source { Http, }; -struct Cookie { +struct WEB_API Cookie { String creation_time_to_string() const; String last_access_time_to_string() const; String expiry_time_to_string() const; @@ -44,20 +45,20 @@ struct Cookie { bool persistent { false }; }; -StringView same_site_to_string(SameSite same_site_mode); -SameSite same_site_from_string(StringView same_site_mode); +WEB_API StringView same_site_to_string(SameSite same_site_mode); +WEB_API SameSite same_site_from_string(StringView same_site_mode); -Optional canonicalize_domain(const URL::URL& url); -bool path_matches(StringView request_path, StringView cookie_path); +WEB_API Optional canonicalize_domain(const URL::URL& url); +WEB_API bool path_matches(StringView request_path, StringView cookie_path); } namespace IPC { template<> -ErrorOr encode(Encoder&, Web::Cookie::Cookie const&); +WEB_API ErrorOr encode(Encoder&, Web::Cookie::Cookie const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/Cookie/ParsedCookie.h b/Libraries/LibWeb/Cookie/ParsedCookie.h index c1f8f869ff3..5f24d65430c 100644 --- a/Libraries/LibWeb/Cookie/ParsedCookie.h +++ b/Libraries/LibWeb/Cookie/ParsedCookie.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace Web::Cookie { @@ -28,18 +29,18 @@ struct ParsedCookie { }; Optional parse_cookie(URL::URL const&, StringView cookie_string); -bool cookie_contains_invalid_control_character(StringView); -bool domain_matches(StringView string, StringView domain_string); -String default_path(URL::URL const&); +WEB_API bool cookie_contains_invalid_control_character(StringView); +WEB_API bool domain_matches(StringView string, StringView domain_string); +WEB_API String default_path(URL::URL const&); } namespace IPC { template<> -ErrorOr encode(Encoder&, Web::Cookie::ParsedCookie const&); +WEB_API ErrorOr encode(Encoder&, Web::Cookie::ParsedCookie const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/CookieStore/CookieStore.h b/Libraries/LibWeb/CookieStore/CookieStore.h index de6c2b75514..1f0bbf9a42e 100644 --- a/Libraries/LibWeb/CookieStore/CookieStore.h +++ b/Libraries/LibWeb/CookieStore/CookieStore.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Web::CookieStore { @@ -46,7 +47,7 @@ struct CookieStoreDeleteOptions { }; // https://cookiestore.spec.whatwg.org/#cookiestore -class CookieStore final : public DOM::EventTarget { +class WEB_API CookieStore final : public DOM::EventTarget { WEB_PLATFORM_OBJECT(CookieStore, DOM::EventTarget); GC_DECLARE_ALLOCATOR(CookieStore); diff --git a/Libraries/LibWeb/Crypto/Crypto.h b/Libraries/LibWeb/Crypto/Crypto.h index a400ceae4a2..0834d46cc77 100644 --- a/Libraries/LibWeb/Crypto/Crypto.h +++ b/Libraries/LibWeb/Crypto/Crypto.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::Crypto { @@ -36,6 +37,6 @@ private: GC::Ptr m_subtle; }; -ErrorOr generate_random_uuid(); +WEB_API ErrorOr generate_random_uuid(); } diff --git a/Libraries/LibWeb/DOM/AdoptedStyleSheets.h b/Libraries/LibWeb/DOM/AdoptedStyleSheets.h index 8015eb69c53..541ec36ea88 100644 --- a/Libraries/LibWeb/DOM/AdoptedStyleSheets.h +++ b/Libraries/LibWeb/DOM/AdoptedStyleSheets.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Web::DOM { -GC::Ref create_adopted_style_sheets_list(Node& document_or_shadow_root); +WEB_API GC::Ref create_adopted_style_sheets_list(Node& document_or_shadow_root); } diff --git a/Libraries/LibWeb/DOM/Attr.h b/Libraries/LibWeb/DOM/Attr.h index 4afc4943e90..b537e3e4aaf 100644 --- a/Libraries/LibWeb/DOM/Attr.h +++ b/Libraries/LibWeb/DOM/Attr.h @@ -9,11 +9,12 @@ #include #include #include +#include namespace Web::DOM { // https://dom.spec.whatwg.org/#attr -class Attr final : public Node { +class WEB_API Attr final : public Node { WEB_PLATFORM_OBJECT(Attr, Node); GC_DECLARE_ALLOCATOR(Attr); diff --git a/Libraries/LibWeb/DOM/CharacterData.h b/Libraries/LibWeb/DOM/CharacterData.h index 37978634d4c..bfeee5ae7de 100644 --- a/Libraries/LibWeb/DOM/CharacterData.h +++ b/Libraries/LibWeb/DOM/CharacterData.h @@ -12,11 +12,12 @@ #include #include #include +#include namespace Web::DOM { // https://dom.spec.whatwg.org/#characterdata -class CharacterData +class WEB_API CharacterData : public Node , public ChildNode , public NonDocumentTypeChildNode { diff --git a/Libraries/LibWeb/DOM/CustomEvent.h b/Libraries/LibWeb/DOM/CustomEvent.h index b6be322f6ad..74e60e05e51 100644 --- a/Libraries/LibWeb/DOM/CustomEvent.h +++ b/Libraries/LibWeb/DOM/CustomEvent.h @@ -9,6 +9,7 @@ #include #include +#include namespace Web::DOM { @@ -17,7 +18,7 @@ struct CustomEventInit : public EventInit { }; // https://dom.spec.whatwg.org/#customevent -class CustomEvent : public Event { +class WEB_API CustomEvent : public Event { WEB_PLATFORM_OBJECT(CustomEvent, Event); GC_DECLARE_ALLOCATOR(CustomEvent); diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index ad6a8b17016..d7824f6b369 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -161,7 +162,7 @@ enum class PolicyControlledFeature : u8 { FocusWithoutUserActivation, }; -class Document +class WEB_API Document : public ParentNode , public HTML::GlobalEventHandlers { WEB_PLATFORM_OBJECT(Document, ParentNode); diff --git a/Libraries/LibWeb/DOM/DocumentFragment.h b/Libraries/LibWeb/DOM/DocumentFragment.h index 4ba3f269cfd..0a4bfac531e 100644 --- a/Libraries/LibWeb/DOM/DocumentFragment.h +++ b/Libraries/LibWeb/DOM/DocumentFragment.h @@ -8,10 +8,11 @@ #include #include +#include namespace Web::DOM { -class DocumentFragment +class WEB_API DocumentFragment : public ParentNode { WEB_PLATFORM_OBJECT(DocumentFragment, ParentNode); GC_DECLARE_ALLOCATOR(DocumentFragment); diff --git a/Libraries/LibWeb/DOM/DocumentObserver.h b/Libraries/LibWeb/DOM/DocumentObserver.h index 32187d08e3d..74e3e83938d 100644 --- a/Libraries/LibWeb/DOM/DocumentObserver.h +++ b/Libraries/LibWeb/DOM/DocumentObserver.h @@ -9,13 +9,14 @@ #include #include #include +#include #include #include #include namespace Web::DOM { -class DocumentObserver final : public Bindings::PlatformObject { +class WEB_API DocumentObserver final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(DocumentObserver, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(DocumentObserver); diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h index 323571c4101..377731ca104 100644 --- a/Libraries/LibWeb/DOM/Element.h +++ b/Libraries/LibWeb/DOM/Element.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -100,7 +101,7 @@ enum class ProximityToTheViewport { NotDetermined, }; -class Element +class WEB_API Element : public ParentNode , public ChildNode , public NonDocumentTypeChildNode diff --git a/Libraries/LibWeb/DOM/ElementFactory.h b/Libraries/LibWeb/DOM/ElementFactory.h index a615caba95b..808b6464c4f 100644 --- a/Libraries/LibWeb/DOM/ElementFactory.h +++ b/Libraries/LibWeb/DOM/ElementFactory.h @@ -8,13 +8,14 @@ #include #include +#include namespace Web::DOM { -ErrorOr> valid_local_names_for_given_html_element_interface(StringView html_element_interface_name); +WEB_API ErrorOr> valid_local_names_for_given_html_element_interface(StringView html_element_interface_name); bool is_unknown_html_element(FlyString const& tag_name); // FIXME: The spec doesn't say what the default value of synchronous_custom_elements_flag should be. -WebIDL::ExceptionOr> create_element(Document&, FlyString local_name, Optional namespace_, Optional prefix = {}, Optional is = Optional {}, bool synchronous_custom_elements_flag = false); +WEB_API WebIDL::ExceptionOr> create_element(Document&, FlyString local_name, Optional namespace_, Optional prefix = {}, Optional is = Optional {}, bool synchronous_custom_elements_flag = false); } diff --git a/Libraries/LibWeb/DOM/Event.h b/Libraries/LibWeb/DOM/Event.h index 60a16076e88..3559de4e154 100644 --- a/Libraries/LibWeb/DOM/Event.h +++ b/Libraries/LibWeb/DOM/Event.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Web::DOM { @@ -19,7 +20,7 @@ struct EventInit { bool composed { false }; }; -class Event : public Bindings::PlatformObject { +class WEB_API Event : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(Event, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(Event); diff --git a/Libraries/LibWeb/DOM/EventTarget.h b/Libraries/LibWeb/DOM/EventTarget.h index b7ab5fcb21d..5793d8d423c 100644 --- a/Libraries/LibWeb/DOM/EventTarget.h +++ b/Libraries/LibWeb/DOM/EventTarget.h @@ -11,13 +11,14 @@ #include #include #include +#include #include #include #include namespace Web::DOM { -class EventTarget : public Bindings::PlatformObject { +class WEB_API EventTarget : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(EventTarget, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(EventTarget); diff --git a/Libraries/LibWeb/DOM/MutationType.h b/Libraries/LibWeb/DOM/MutationType.h index 23f0b8c62a3..993cd748f76 100644 --- a/Libraries/LibWeb/DOM/MutationType.h +++ b/Libraries/LibWeb/DOM/MutationType.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::DOM::MutationType { @@ -15,7 +16,7 @@ namespace Web::DOM::MutationType { __ENUMERATE_MUTATION_TYPE(characterData) \ __ENUMERATE_MUTATION_TYPE(childList) -#define __ENUMERATE_MUTATION_TYPE(name) extern FlyString name; +#define __ENUMERATE_MUTATION_TYPE(name) extern WEB_API FlyString name; ENUMERATE_MUTATION_TYPES #undef __ENUMERATE_MUTATION_TYPE diff --git a/Libraries/LibWeb/DOM/NamedNodeMap.h b/Libraries/LibWeb/DOM/NamedNodeMap.h index bf59c3a13db..739edbfe727 100644 --- a/Libraries/LibWeb/DOM/NamedNodeMap.h +++ b/Libraries/LibWeb/DOM/NamedNodeMap.h @@ -10,13 +10,14 @@ #pragma once #include +#include #include #include namespace Web::DOM { // https://dom.spec.whatwg.org/#interface-namednodemap -class NamedNodeMap : public Bindings::PlatformObject { +class WEB_API NamedNodeMap : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(NamedNodeMap, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(NamedNodeMap); diff --git a/Libraries/LibWeb/DOM/Node.h b/Libraries/LibWeb/DOM/Node.h index a83bbef4838..77cdf44863f 100644 --- a/Libraries/LibWeb/DOM/Node.h +++ b/Libraries/LibWeb/DOM/Node.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -138,7 +139,7 @@ enum class SetNeedsLayoutTreeUpdateReason { [[nodiscard]] StringView to_string(SetNeedsLayoutTreeUpdateReason); -class Node : public EventTarget +class WEB_API Node : public EventTarget , public TreeNode { WEB_PLATFORM_OBJECT(Node, EventTarget); diff --git a/Libraries/LibWeb/DOM/NodeList.h b/Libraries/LibWeb/DOM/NodeList.h index 5d5409e5e69..06f710c8281 100644 --- a/Libraries/LibWeb/DOM/NodeList.h +++ b/Libraries/LibWeb/DOM/NodeList.h @@ -8,11 +8,12 @@ #pragma once #include +#include namespace Web::DOM { // https://dom.spec.whatwg.org/#nodelist -class NodeList : public Bindings::PlatformObject { +class WEB_API NodeList : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(NodeList, Bindings::PlatformObject); public: diff --git a/Libraries/LibWeb/DOM/ParentNode.h b/Libraries/LibWeb/DOM/ParentNode.h index 6d44751e96a..3dd8a48a624 100644 --- a/Libraries/LibWeb/DOM/ParentNode.h +++ b/Libraries/LibWeb/DOM/ParentNode.h @@ -7,10 +7,11 @@ #pragma once #include +#include namespace Web::DOM { -class ParentNode : public Node { +class WEB_API ParentNode : public Node { WEB_PLATFORM_OBJECT(ParentNode, Node); GC_DECLARE_ALLOCATOR(ParentNode); diff --git a/Libraries/LibWeb/DOM/PseudoElement.h b/Libraries/LibWeb/DOM/PseudoElement.h index 9e977e47a0e..18383fb2cd4 100644 --- a/Libraries/LibWeb/DOM/PseudoElement.h +++ b/Libraries/LibWeb/DOM/PseudoElement.h @@ -10,13 +10,14 @@ #include #include #include +#include #include #include #include namespace Web::DOM { -class PseudoElement : public JS::Cell { +class WEB_API PseudoElement : public JS::Cell { GC_CELL(PseudoElement, JS::Cell); GC_DECLARE_ALLOCATOR(PseudoElement); diff --git a/Libraries/LibWeb/DOM/QualifiedName.h b/Libraries/LibWeb/DOM/QualifiedName.h index b933eec1383..1a064745435 100644 --- a/Libraries/LibWeb/DOM/QualifiedName.h +++ b/Libraries/LibWeb/DOM/QualifiedName.h @@ -10,10 +10,11 @@ #include #include +#include namespace Web::DOM { -class QualifiedName { +class WEB_API QualifiedName { public: QualifiedName(FlyString const& local_name, Optional const& prefix, Optional const& namespace_); @@ -25,7 +26,7 @@ public: FlyString const& as_string() const { return m_impl->as_string; } - struct Impl : public RefCounted { + struct WEB_API Impl : public RefCounted { Impl(FlyString const& local_name, Optional const& prefix, Optional const& namespace_); ~Impl(); diff --git a/Libraries/LibWeb/DOM/Range.h b/Libraries/LibWeb/DOM/Range.h index 4c6d85161f8..8114346e6ec 100644 --- a/Libraries/LibWeb/DOM/Range.h +++ b/Libraries/LibWeb/DOM/Range.h @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -25,7 +26,7 @@ enum class RelativeBoundaryPointPosition { // https://dom.spec.whatwg.org/#concept-range-bp-position RelativeBoundaryPointPosition position_of_boundary_point_relative_to_other_boundary_point(BoundaryPoint a, BoundaryPoint b); -class Range final : public AbstractRange { +class WEB_API Range final : public AbstractRange { WEB_PLATFORM_OBJECT(Range, AbstractRange); GC_DECLARE_ALLOCATOR(Range); diff --git a/Libraries/LibWeb/DOM/ShadowRoot.h b/Libraries/LibWeb/DOM/ShadowRoot.h index c2cda672d3a..472f8d5eeda 100644 --- a/Libraries/LibWeb/DOM/ShadowRoot.h +++ b/Libraries/LibWeb/DOM/ShadowRoot.h @@ -9,11 +9,12 @@ #include #include #include +#include #include namespace Web::DOM { -class ShadowRoot final : public DocumentFragment { +class WEB_API ShadowRoot final : public DocumentFragment { WEB_PLATFORM_OBJECT(ShadowRoot, DocumentFragment); GC_DECLARE_ALLOCATOR(ShadowRoot); diff --git a/Libraries/LibWeb/DOM/Slottable.h b/Libraries/LibWeb/DOM/Slottable.h index e538752740e..5fc9ae6ff3e 100644 --- a/Libraries/LibWeb/DOM/Slottable.h +++ b/Libraries/LibWeb/DOM/Slottable.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Web::DOM { @@ -18,7 +19,7 @@ namespace Web::DOM { using Slottable = Variant, GC::Ref>; // https://dom.spec.whatwg.org/#mixin-slotable -class SlottableMixin { +class WEB_API SlottableMixin { public: virtual ~SlottableMixin(); diff --git a/Libraries/LibWeb/DOM/Text.h b/Libraries/LibWeb/DOM/Text.h index 2bd7ab719f3..8988d608803 100644 --- a/Libraries/LibWeb/DOM/Text.h +++ b/Libraries/LibWeb/DOM/Text.h @@ -10,10 +10,11 @@ #include #include #include +#include namespace Web::DOM { -class Text +class WEB_API Text : public CharacterData , public SlottableMixin { WEB_PLATFORM_OBJECT(Text, CharacterData); diff --git a/Libraries/LibWeb/DOMURL/DOMURL.h b/Libraries/LibWeb/DOMURL/DOMURL.h index 922db2459a7..e4de67145c4 100644 --- a/Libraries/LibWeb/DOMURL/DOMURL.h +++ b/Libraries/LibWeb/DOMURL/DOMURL.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -93,6 +94,6 @@ private: }; // https://url.spec.whatwg.org/#concept-url-parser -Optional parse(StringView input, Optional base_url = {}, Optional encoding = {}); +WEB_API Optional parse(StringView input, Optional base_url = {}, Optional encoding = {}); } diff --git a/Libraries/LibWeb/Dump.h b/Libraries/LibWeb/Dump.h index 0b6306b55b8..bff059fbc5c 100644 --- a/Libraries/LibWeb/Dump.h +++ b/Libraries/LibWeb/Dump.h @@ -8,19 +8,20 @@ #pragma once #include +#include #include namespace Web { -void dump_tree(HTML::TraversableNavigable&); +WEB_API void dump_tree(HTML::TraversableNavigable&); void dump_tree(StringBuilder&, DOM::Node const&); -void dump_tree(DOM::Node const&); -void dump_tree(StringBuilder&, Layout::Node const&, bool show_box_model = false, bool show_cascaded_properties = false, bool colorize = false); -void dump_tree(Layout::Node const&, bool show_box_model = true, bool show_cascaded_properties = false); -void dump_tree(StringBuilder&, Painting::Paintable const&, bool colorize = false, int indent = 0); -void dump_tree(Painting::Paintable const&); +WEB_API void dump_tree(DOM::Node const&); +WEB_API void dump_tree(StringBuilder&, Layout::Node const&, bool show_box_model = false, bool show_cascaded_properties = false, bool colorize = false); +WEB_API void dump_tree(Layout::Node const&, bool show_box_model = true, bool show_cascaded_properties = false); +WEB_API void dump_tree(StringBuilder&, Painting::Paintable const&, bool colorize = false, int indent = 0); +WEB_API void dump_tree(Painting::Paintable const&); void dump_sheet(StringBuilder&, CSS::StyleSheet const&); -void dump_sheet(CSS::StyleSheet const&); +WEB_API void dump_sheet(CSS::StyleSheet const&); void dump_rule(StringBuilder&, CSS::CSSRule const&, int indent_levels = 0); void dump_rule(CSS::CSSRule const&); void dump_style_properties(StringBuilder&, CSS::CSSStyleProperties const&, int indent_levels = 0); diff --git a/Libraries/LibWeb/Fetch/BodyInit.h b/Libraries/LibWeb/Fetch/BodyInit.h index aaec167b981..e31c94c3bf7 100644 --- a/Libraries/LibWeb/Fetch/BodyInit.h +++ b/Libraries/LibWeb/Fetch/BodyInit.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Web::Fetch { @@ -17,7 +18,7 @@ namespace Web::Fetch { using BodyInit = Variant, GC::Root, GC::Root, GC::Root, GC::Root, String>; using BodyInitOrReadableBytes = Variant, GC::Root, GC::Root, GC::Root, GC::Root, String, ReadonlyBytes>; -Infrastructure::BodyWithType safely_extract_body(JS::Realm&, BodyInitOrReadableBytes const&); -WebIDL::ExceptionOr extract_body(JS::Realm&, BodyInitOrReadableBytes const&, bool keepalive = false); +WEB_API Infrastructure::BodyWithType safely_extract_body(JS::Realm&, BodyInitOrReadableBytes const&); +WEB_API WebIDL::ExceptionOr extract_body(JS::Realm&, BodyInitOrReadableBytes const&, bool keepalive = false); } diff --git a/Libraries/LibWeb/Fetch/Enums.h b/Libraries/LibWeb/Fetch/Enums.h index bb4f6022f43..8d70cc0d7a4 100644 --- a/Libraries/LibWeb/Fetch/Enums.h +++ b/Libraries/LibWeb/Fetch/Enums.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include @@ -15,7 +16,7 @@ namespace Web::Fetch { [[nodiscard]] ReferrerPolicy::ReferrerPolicy from_bindings_enum(Bindings::ReferrerPolicy); [[nodiscard]] Infrastructure::Request::Mode from_bindings_enum(Bindings::RequestMode); -[[nodiscard]] Infrastructure::Request::CredentialsMode from_bindings_enum(Bindings::RequestCredentials); +[[nodiscard]] WEB_API Infrastructure::Request::CredentialsMode from_bindings_enum(Bindings::RequestCredentials); [[nodiscard]] Infrastructure::Request::CacheMode from_bindings_enum(Bindings::RequestCache); [[nodiscard]] Infrastructure::Request::RedirectMode from_bindings_enum(Bindings::RequestRedirect); [[nodiscard]] Infrastructure::Request::Priority from_bindings_enum(Bindings::RequestPriority); diff --git a/Libraries/LibWeb/Fetch/Fetching/Fetching.h b/Libraries/LibWeb/Fetch/Fetching/Fetching.h index f6033799f18..0d5164ffae2 100644 --- a/Libraries/LibWeb/Fetch/Fetching/Fetching.h +++ b/Libraries/LibWeb/Fetch/Fetching/Fetching.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Web::Fetch::Fetching { @@ -38,7 +39,7 @@ constexpr auto keepalive_maximum_size = 64 * KiB; ENUMERATE_BOOL_PARAMS #undef __ENUMERATE_BOOL_PARAM -WebIDL::ExceptionOr> fetch(JS::Realm&, Infrastructure::Request&, Infrastructure::FetchAlgorithms const&, UseParallelQueue use_parallel_queue = UseParallelQueue::No); +WEB_API WebIDL::ExceptionOr> fetch(JS::Realm&, Infrastructure::Request&, Infrastructure::FetchAlgorithms const&, UseParallelQueue use_parallel_queue = UseParallelQueue::No); WebIDL::ExceptionOr> main_fetch(JS::Realm&, Infrastructure::FetchParams const&, Recursive recursive = Recursive::No); void populate_request_from_client(JS::Realm const&, Infrastructure::Request&); void fetch_response_handover(JS::Realm&, Infrastructure::FetchParams const&, Infrastructure::Response&); @@ -54,6 +55,6 @@ void set_sec_fetch_site_header(Infrastructure::Request&); void set_sec_fetch_user_header(Infrastructure::Request&); void append_fetch_metadata_headers_for_request(Infrastructure::Request&); -void set_http_cache_enabled(bool enabled); +WEB_API void set_http_cache_enabled(bool enabled); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h b/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h index 9c69125cb41..75a4b869c89 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h @@ -10,12 +10,13 @@ #include #include #include +#include #include namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#fetch-elsewhere-fetch -class FetchAlgorithms : public JS::Cell { +class WEB_API FetchAlgorithms : public JS::Cell { GC_CELL(FetchAlgorithms, JS::Cell); GC_DECLARE_ALLOCATOR(FetchAlgorithms); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/FetchController.h b/Libraries/LibWeb/Fetch/Infrastructure/FetchController.h index 80680098965..740d7f6990b 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/FetchController.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/FetchController.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#fetch-controller -class FetchController : public JS::Cell { +class WEB_API FetchController : public JS::Cell { GC_CELL(FetchController, JS::Cell); GC_DECLARE_ALLOCATOR(FetchController); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/FetchParams.h b/Libraries/LibWeb/Fetch/Infrastructure/FetchParams.h index 705277dece8..48f8f9e1061 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/FetchParams.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/FetchParams.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -19,7 +20,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#fetch-params -class FetchParams : public JS::Cell { +class WEB_API FetchParams : public JS::Cell { GC_CELL(FetchParams, JS::Cell); GC_DECLARE_ALLOCATOR(FetchParams); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.h b/Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.h index 14beca2a8d5..bfdf2171fe4 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.h @@ -6,12 +6,13 @@ #pragma once +#include #include namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#concept-fetch-record -class FetchRecord final : public JS::Cell { +class WEB_API FetchRecord final : public JS::Cell { GC_CELL(FetchRecord, JS::Cell); GC_DECLARE_ALLOCATOR(FetchRecord); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h b/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h index c135d49d00d..031e62180a6 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -20,7 +21,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#fetch-timing-info -class FetchTimingInfo : public JS::Cell { +class WEB_API FetchTimingInfo : public JS::Cell { GC_CELL(FetchTimingInfo, JS::Cell); GC_DECLARE_ALLOCATOR(FetchTimingInfo); @@ -132,6 +133,6 @@ private: bool m_render_blocking { false }; }; -GC::Ref create_opaque_timing_info(JS::VM&, FetchTimingInfo const& timing_info); +WEB_API GC::Ref create_opaque_timing_info(JS::VM&, FetchTimingInfo const& timing_info); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h index 9a2af944b51..1b145613c8b 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP.h @@ -9,6 +9,7 @@ #include #include +#include namespace Web::Fetch::Infrastructure { @@ -53,6 +54,6 @@ enum class RedirectTaint { CrossSite, }; -[[nodiscard]] String collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedStringExtractValue extract_value = HttpQuotedStringExtractValue::No); +[[nodiscard]] WEB_API String collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedStringExtractValue extract_value = HttpQuotedStringExtractValue::No); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h index 5f6fff2e388..737efb605c5 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#concept-body -class Body final : public JS::Cell { +class WEB_API Body final : public JS::Cell { GC_CELL(Body, JS::Cell); GC_DECLARE_ALLOCATOR(Body); @@ -76,6 +77,6 @@ struct BodyWithType { Optional type; }; -GC::Ref byte_sequence_as_body(JS::Realm&, ReadonlyBytes); +WEB_API GC::Ref byte_sequence_as_body(JS::Realm&, ReadonlyBytes); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h index 7dc9a6c5082..d28bb28e2ed 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h @@ -17,13 +17,14 @@ #include #include #include +#include #include namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#concept-header // A header is a tuple that consists of a name (a header name) and value (a header value). -struct Header { +struct WEB_API Header { ByteBuffer name; ByteBuffer value; @@ -34,7 +35,7 @@ struct Header { // https://fetch.spec.whatwg.org/#concept-header-list // A header list is a list of zero or more headers. It is initially the empty list. -class HeaderList final +class WEB_API HeaderList final : public JS::Cell , public Vector
{ GC_CELL(HeaderList, JS::Cell); @@ -75,7 +76,7 @@ struct RangeHeaderValue { struct ExtractHeaderParseFailure { }; -[[nodiscard]] StringView legacy_extract_an_encoding(Optional const& mime_type, StringView fallback_encoding); +[[nodiscard]] WEB_API StringView legacy_extract_an_encoding(Optional const& mime_type, StringView fallback_encoding); [[nodiscard]] Optional> get_decode_and_split_header_value(ReadonlyBytes); [[nodiscard]] OrderedHashTable convert_header_names_to_a_sorted_lowercase_set(Span); [[nodiscard]] bool is_header_name(ReadonlyBytes); @@ -83,8 +84,8 @@ struct ExtractHeaderParseFailure { [[nodiscard]] ByteBuffer normalize_header_value(ReadonlyBytes); [[nodiscard]] bool is_cors_safelisted_request_header(Header const&); [[nodiscard]] bool is_cors_unsafe_request_header_byte(u8); -[[nodiscard]] OrderedHashTable get_cors_unsafe_header_names(HeaderList const&); -[[nodiscard]] bool is_cors_non_wildcard_request_header_name(ReadonlyBytes); +[[nodiscard]] WEB_API OrderedHashTable get_cors_unsafe_header_names(HeaderList const&); +[[nodiscard]] WEB_API bool is_cors_non_wildcard_request_header_name(ReadonlyBytes); [[nodiscard]] bool is_privileged_no_cors_request_header_name(ReadonlyBytes); [[nodiscard]] bool is_cors_safelisted_response_header_name(ReadonlyBytes, Span); [[nodiscard]] bool is_no_cors_safelisted_request_header_name(ReadonlyBytes); @@ -93,9 +94,9 @@ struct ExtractHeaderParseFailure { [[nodiscard]] bool is_forbidden_response_header_name(ReadonlyBytes); [[nodiscard]] bool is_request_body_header_name(ReadonlyBytes); [[nodiscard]] Optional> extract_header_values(Header const&); -[[nodiscard]] Variant, ExtractHeaderParseFailure, Empty> extract_header_list_values(ReadonlyBytes, HeaderList const&); -[[nodiscard]] ByteString build_content_range(u64 const& range_start, u64 const& range_end, u64 const& full_length); -[[nodiscard]] Optional parse_single_range_header_value(ReadonlyBytes, bool); -[[nodiscard]] ByteBuffer default_user_agent_value(); +[[nodiscard]] WEB_API Variant, ExtractHeaderParseFailure, Empty> extract_header_list_values(ReadonlyBytes, HeaderList const&); +[[nodiscard]] WEB_API ByteString build_content_range(u64 const& range_start, u64 const& range_end, u64 const& full_length); +[[nodiscard]] WEB_API Optional parse_single_range_header_value(ReadonlyBytes, bool); +[[nodiscard]] WEB_API ByteBuffer default_user_agent_value(); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Methods.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Methods.h index a98fdca80c2..0d6ad2b42a3 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Methods.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Methods.h @@ -7,11 +7,12 @@ #pragma once #include +#include namespace Web::Fetch::Infrastructure { [[nodiscard]] bool is_method(ReadonlyBytes); -[[nodiscard]] bool is_cors_safelisted_method(ReadonlyBytes); +[[nodiscard]] WEB_API bool is_cors_safelisted_method(ReadonlyBytes); [[nodiscard]] bool is_forbidden_method(ReadonlyBytes); [[nodiscard]] ByteBuffer normalize_method(ReadonlyBytes); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.h index 0a83a4d1410..6ef48a7e5bf 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#concept-request -class Request final : public JS::Cell { +class WEB_API Request final : public JS::Cell { GC_CELL(Request, JS::Cell); GC_DECLARE_ALLOCATOR(Request); @@ -535,9 +536,9 @@ private: BufferPolicy m_buffer_policy { BufferPolicy::BufferResponse }; }; -StringView request_destination_to_string(Request::Destination); -StringView request_mode_to_string(Request::Mode); -FlyString initiator_type_to_string(Request::InitiatorType); +WEB_API StringView request_destination_to_string(Request::Destination); +WEB_API StringView request_mode_to_string(Request::Mode); +WEB_API FlyString initiator_type_to_string(Request::InitiatorType); Optional request_priority_from_string(StringView); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h index cc818f7d359..e4cea041fef 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -24,7 +25,7 @@ namespace Web::Fetch::Infrastructure { // https://fetch.spec.whatwg.org/#concept-response -class Response : public JS::Cell { +class WEB_API Response : public JS::Cell { GC_CELL(Response, JS::Cell); GC_DECLARE_ALLOCATOR(Response); @@ -267,7 +268,7 @@ private: }; // https://fetch.spec.whatwg.org/#concept-filtered-response-basic -class BasicFilteredResponse final : public FilteredResponse { +class WEB_API BasicFilteredResponse final : public FilteredResponse { GC_CELL(BasicFilteredResponse, FilteredResponse); GC_DECLARE_ALLOCATOR(BasicFilteredResponse); @@ -286,7 +287,7 @@ private: }; // https://fetch.spec.whatwg.org/#concept-filtered-response-cors -class CORSFilteredResponse final : public FilteredResponse { +class WEB_API CORSFilteredResponse final : public FilteredResponse { GC_CELL(CORSFilteredResponse, FilteredResponse); GC_DECLARE_ALLOCATOR(CORSFilteredResponse); @@ -305,7 +306,7 @@ private: }; // https://fetch.spec.whatwg.org/#concept-filtered-response-opaque -class OpaqueFilteredResponse final : public FilteredResponse { +class WEB_API OpaqueFilteredResponse final : public FilteredResponse { GC_CELL(OpaqueFilteredResponse, FilteredResponse); GC_DECLARE_ALLOCATOR(OpaqueFilteredResponse); @@ -330,7 +331,7 @@ private: }; // https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect -class OpaqueRedirectFilteredResponse final : public FilteredResponse { +class WEB_API OpaqueRedirectFilteredResponse final : public FilteredResponse { GC_CELL(OpaqueRedirectFilteredResponse, FilteredResponse); GC_DECLARE_ALLOCATOR(OpaqueRedirectFilteredResponse); diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Statuses.h b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Statuses.h index 22ea181628d..877a6e2dea8 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Statuses.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Statuses.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::Fetch::Infrastructure { @@ -14,8 +15,8 @@ namespace Web::Fetch::Infrastructure { // A status is an integer in the range 0 to 999, inclusive. using Status = u16; -[[nodiscard]] bool is_null_body_status(Status); -[[nodiscard]] bool is_ok_status(Status); -[[nodiscard]] bool is_redirect_status(Status); +[[nodiscard]] WEB_API bool is_null_body_status(Status); +[[nodiscard]] WEB_API bool is_ok_status(Status); +[[nodiscard]] WEB_API bool is_redirect_status(Status); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/MimeTypeBlocking.h b/Libraries/LibWeb/Fetch/Infrastructure/MimeTypeBlocking.h index df8ac3a3f33..e0a5a69ab76 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/MimeTypeBlocking.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/MimeTypeBlocking.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Web::Fetch::Infrastructure { -[[nodiscard]] RequestOrResponseBlocking should_response_to_request_be_blocked_due_to_its_mime_type(Response const&, Request const&); +[[nodiscard]] WEB_API RequestOrResponseBlocking should_response_to_request_be_blocked_due_to_its_mime_type(Response const&, Request const&); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/NetworkPartitionKey.h b/Libraries/LibWeb/Fetch/Infrastructure/NetworkPartitionKey.h index c334b525f64..577a4d009ce 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/NetworkPartitionKey.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/NetworkPartitionKey.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include namespace Web::Fetch::Infrastructure { @@ -23,7 +24,7 @@ struct NetworkPartitionKey { NetworkPartitionKey determine_the_network_partition_key(HTML::Environment const& environment); -Optional determine_the_network_partition_key(Infrastructure::Request const& request); +WEB_API Optional determine_the_network_partition_key(Infrastructure::Request const& request); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.h b/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.h index b703ca76446..d51c5ca1b98 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include #include namespace Web::Fetch::Infrastructure { [[nodiscard]] bool determine_nosniff(HeaderList const&); -[[nodiscard]] RequestOrResponseBlocking should_response_to_request_be_blocked_due_to_nosniff(Response const&, Request const&); +[[nodiscard]] WEB_API RequestOrResponseBlocking should_response_to_request_be_blocked_due_to_nosniff(Response const&, Request const&); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/PortBlocking.h b/Libraries/LibWeb/Fetch/Infrastructure/PortBlocking.h index c91bdd43ed2..9a361da4653 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/PortBlocking.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/PortBlocking.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include #include namespace Web::Fetch::Infrastructure { -[[nodiscard]] RequestOrResponseBlocking block_bad_port(Request const&); +[[nodiscard]] WEB_API RequestOrResponseBlocking block_bad_port(Request const&); [[nodiscard]] bool is_bad_port(u16); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/Task.h b/Libraries/LibWeb/Fetch/Infrastructure/Task.h index d2b6385e6e5..1254a0ecbb5 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/Task.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/Task.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -17,6 +18,6 @@ namespace Web::Fetch::Infrastructure { using TaskDestination = Variant, NonnullRefPtr>; HTML::TaskID queue_fetch_task(TaskDestination, GC::Ref>); -HTML::TaskID queue_fetch_task(GC::Ref, TaskDestination, GC::Ref>); +WEB_API HTML::TaskID queue_fetch_task(GC::Ref, TaskDestination, GC::Ref>); } diff --git a/Libraries/LibWeb/Fetch/Infrastructure/URL.cpp b/Libraries/LibWeb/Fetch/Infrastructure/URL.cpp index 998f8133a4e..762e63e3599 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/URL.cpp +++ b/Libraries/LibWeb/Fetch/Infrastructure/URL.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/Libraries/LibWeb/Fetch/Infrastructure/URL.h b/Libraries/LibWeb/Fetch/Infrastructure/URL.h index a99b5afc0b3..33ba3d60b81 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/URL.h +++ b/Libraries/LibWeb/Fetch/Infrastructure/URL.h @@ -13,6 +13,7 @@ #include #include #include +#include #include namespace Web::Fetch::Infrastructure { @@ -44,9 +45,9 @@ struct DataURL { ByteBuffer body; }; -[[nodiscard]] bool is_local_url(URL::URL const&); +[[nodiscard]] WEB_API bool is_local_url(URL::URL const&); [[nodiscard]] bool is_fetch_scheme(StringView); -[[nodiscard]] bool is_http_or_https_scheme(StringView); -ErrorOr process_data_url(URL::URL const&); +[[nodiscard]] WEB_API bool is_http_or_https_scheme(StringView); +WEB_API ErrorOr process_data_url(URL::URL const&); } diff --git a/Libraries/LibWeb/FileAPI/Blob.h b/Libraries/LibWeb/FileAPI/Blob.h index 12d93f75b71..8d90718e194 100644 --- a/Libraries/LibWeb/FileAPI/Blob.h +++ b/Libraries/LibWeb/FileAPI/Blob.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -27,7 +28,7 @@ struct BlobPropertyBag { [[nodiscard]] ErrorOr process_blob_parts(Vector const& blob_parts, Optional const& options = {}); [[nodiscard]] bool is_basic_latin(StringView view); -class Blob +class WEB_API Blob : public Bindings::PlatformObject , public Bindings::Serializable { WEB_PLATFORM_OBJECT(Blob, Bindings::PlatformObject); diff --git a/Libraries/LibWeb/FileAPI/BlobURLStore.h b/Libraries/LibWeb/FileAPI/BlobURLStore.h index 25ab68ea596..a19f076a609 100644 --- a/Libraries/LibWeb/FileAPI/BlobURLStore.h +++ b/Libraries/LibWeb/FileAPI/BlobURLStore.h @@ -31,7 +31,7 @@ ErrorOr generate_new_blob_url(); ErrorOr add_entry_to_blob_url_store(BlobURLEntry::Object); bool check_for_same_partition_blob_url_usage(URL::BlobURLEntry const&, GC::Ref); struct NavigationEnvironment { }; -Optional obtain_a_blob_object(URL::BlobURLEntry const&, Variant, NavigationEnvironment> environment); +WEB_API Optional obtain_a_blob_object(URL::BlobURLEntry const&, Variant, NavigationEnvironment> environment); void remove_entry_from_blob_url_store(URL::URL const& url); Optional resolve_a_blob_url(URL::URL const&); diff --git a/Libraries/LibWeb/FileAPI/FileList.h b/Libraries/LibWeb/FileAPI/FileList.h index 62df237d7f8..e502cbbd83b 100644 --- a/Libraries/LibWeb/FileAPI/FileList.h +++ b/Libraries/LibWeb/FileAPI/FileList.h @@ -10,12 +10,13 @@ #include #include #include +#include #include #include namespace Web::FileAPI { -class FileList +class WEB_API FileList : public Bindings::PlatformObject , public Bindings::Serializable { WEB_PLATFORM_OBJECT(FileList, Bindings::PlatformObject); diff --git a/Libraries/LibWeb/Forward.h b/Libraries/LibWeb/Forward.h index ec421f2f239..598fccc0715 100644 --- a/Libraries/LibWeb/Forward.h +++ b/Libraries/LibWeb/Forward.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace Web { @@ -1220,10 +1221,10 @@ struct FormDataEntry; namespace IPC { template<> -ErrorOr encode(Encoder&, Web::UniqueNodeID const&); +WEB_API ErrorOr encode(Encoder&, Web::UniqueNodeID const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/Geometry/DOMPoint.h b/Libraries/LibWeb/Geometry/DOMPoint.h index af6cbe8be4b..dd2325030c4 100644 --- a/Libraries/LibWeb/Geometry/DOMPoint.h +++ b/Libraries/LibWeb/Geometry/DOMPoint.h @@ -7,12 +7,13 @@ #pragma once +#include #include namespace Web::Geometry { // https://drafts.fxtf.org/geometry/#DOMPoint -class DOMPoint final : public DOMPointReadOnly { +class WEB_API DOMPoint final : public DOMPointReadOnly { WEB_PLATFORM_OBJECT(DOMPoint, DOMPointReadOnly); GC_DECLARE_ALLOCATOR(DOMPoint); diff --git a/Libraries/LibWeb/HTML/AnimationFrameCallbackDriver.h b/Libraries/LibWeb/HTML/AnimationFrameCallbackDriver.h index 65109b19a63..d6d623f3e7c 100644 --- a/Libraries/LibWeb/HTML/AnimationFrameCallbackDriver.h +++ b/Libraries/LibWeb/HTML/AnimationFrameCallbackDriver.h @@ -12,11 +12,12 @@ #include #include #include +#include #include namespace Web::HTML { -class AnimationFrameCallbackDriver final : public JS::Cell { +class WEB_API AnimationFrameCallbackDriver final : public JS::Cell { GC_CELL(AnimationFrameCallbackDriver, JS::Cell); GC_DECLARE_ALLOCATOR(AnimationFrameCallbackDriver); diff --git a/Libraries/LibWeb/HTML/AttributeNames.h b/Libraries/LibWeb/HTML/AttributeNames.h index 757d13b8a35..446c9ade1e7 100644 --- a/Libraries/LibWeb/HTML/AttributeNames.h +++ b/Libraries/LibWeb/HTML/AttributeNames.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::HTML { namespace AttributeNames { @@ -314,12 +315,12 @@ namespace AttributeNames { __ENUMERATE_HTML_ATTRIBUTE(willvalidate, "willvalidate") \ __ENUMERATE_HTML_ATTRIBUTE(wrap, "wrap") -#define __ENUMERATE_HTML_ATTRIBUTE(name, attribute) extern FlyString name; +#define __ENUMERATE_HTML_ATTRIBUTE(name, attribute) extern WEB_API FlyString name; ENUMERATE_HTML_ATTRIBUTES #undef __ENUMERATE_HTML_ATTRIBUTE } -bool is_boolean_attribute(FlyString const& attribute); +WEB_API bool is_boolean_attribute(FlyString const& attribute); } diff --git a/Libraries/LibWeb/HTML/AutocompleteElement.h b/Libraries/LibWeb/HTML/AutocompleteElement.h index aa09318fa08..548aa5b5c5b 100644 --- a/Libraries/LibWeb/HTML/AutocompleteElement.h +++ b/Libraries/LibWeb/HTML/AutocompleteElement.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace Web::HTML { @@ -19,7 +20,7 @@ private: \ return *this; \ } -class AutocompleteElement { +class WEB_API AutocompleteElement { public: enum class AutofillMantle { Anchor, diff --git a/Libraries/LibWeb/HTML/BrowsingContext.h b/Libraries/LibWeb/HTML/BrowsingContext.h index 466de1f3aa3..0e5b09f8902 100644 --- a/Libraries/LibWeb/HTML/BrowsingContext.h +++ b/Libraries/LibWeb/HTML/BrowsingContext.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -16,7 +17,7 @@ namespace Web::HTML { -class BrowsingContext final : public JS::Cell { +class WEB_API BrowsingContext final : public JS::Cell { GC_CELL(BrowsingContext, JS::Cell); GC_DECLARE_ALLOCATOR(BrowsingContext); @@ -127,7 +128,7 @@ URL::Origin determine_the_origin(Optional, SandboxingFlagSet, O SandboxingFlagSet determine_the_creation_sandboxing_flags(BrowsingContext const&, GC::Ptr embedder); // FIXME: Find a better home for these -bool url_matches_about_blank(URL::URL const& url); +WEB_API bool url_matches_about_blank(URL::URL const& url); bool url_matches_about_srcdoc(URL::URL const& url); } diff --git a/Libraries/LibWeb/HTML/CustomElements/CustomElementRegistry.h b/Libraries/LibWeb/HTML/CustomElements/CustomElementRegistry.h index c9ab78b35ca..b2afa7fb7f2 100644 --- a/Libraries/LibWeb/HTML/CustomElements/CustomElementRegistry.h +++ b/Libraries/LibWeb/HTML/CustomElements/CustomElementRegistry.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::HTML { @@ -17,7 +18,7 @@ struct ElementDefinitionOptions { }; // https://html.spec.whatwg.org/multipage/custom-elements.html#customelementregistry -class CustomElementRegistry : public Bindings::PlatformObject { +class WEB_API CustomElementRegistry : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(CustomElementRegistry, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(CustomElementRegistry); diff --git a/Libraries/LibWeb/HTML/Dates.h b/Libraries/LibWeb/HTML/Dates.h index 1fd6354e1ee..633342d1102 100644 --- a/Libraries/LibWeb/HTML/Dates.h +++ b/Libraries/LibWeb/HTML/Dates.h @@ -9,11 +9,12 @@ #include #include #include +#include #include namespace Web::HTML { -u32 week_number_of_the_last_day(u64 year); +WEB_API u32 week_number_of_the_last_day(u64 year); bool is_valid_week_string(Utf16View const& value); bool is_valid_month_string(Utf16View const& value); bool is_valid_date_string(Utf16View const& value); diff --git a/Libraries/LibWeb/HTML/DedicatedWorkerGlobalScope.h b/Libraries/LibWeb/HTML/DedicatedWorkerGlobalScope.h index 03d7d9c94b2..cc16113984b 100644 --- a/Libraries/LibWeb/HTML/DedicatedWorkerGlobalScope.h +++ b/Libraries/LibWeb/HTML/DedicatedWorkerGlobalScope.h @@ -8,11 +8,12 @@ #include #include +#include #include namespace Web::HTML { -class DedicatedWorkerGlobalScope +class WEB_API DedicatedWorkerGlobalScope : public WorkerGlobalScope , public Bindings::DedicatedWorkerGlobalScopeGlobalMixin { WEB_PLATFORM_OBJECT(DedicatedWorkerGlobalScope, WorkerGlobalScope); diff --git a/Libraries/LibWeb/HTML/EventLoop/EventLoop.h b/Libraries/LibWeb/HTML/EventLoop/EventLoop.h index edc16bfacea..14df272e813 100644 --- a/Libraries/LibWeb/HTML/EventLoop/EventLoop.h +++ b/Libraries/LibWeb/HTML/EventLoop/EventLoop.h @@ -12,12 +12,13 @@ #include #include #include +#include #include #include namespace Web::HTML { -class EventLoop : public JS::Cell { +class WEB_API EventLoop : public JS::Cell { GC_CELL(EventLoop, JS::Cell); GC_DECLARE_ALLOCATOR(EventLoop); @@ -140,10 +141,10 @@ private: GC::Ptr> m_rendering_task_function; }; -EventLoop& main_thread_event_loop(); -TaskID queue_a_task(HTML::Task::Source, GC::Ptr, GC::Ptr, GC::Ref> steps); -TaskID queue_global_task(HTML::Task::Source, JS::Object&, GC::Ref> steps); -void queue_a_microtask(DOM::Document const*, GC::Ref> steps); +WEB_API EventLoop& main_thread_event_loop(); +WEB_API TaskID queue_a_task(HTML::Task::Source, GC::Ptr, GC::Ptr, GC::Ref> steps); +WEB_API TaskID queue_global_task(HTML::Task::Source, JS::Object&, GC::Ref> steps); +WEB_API void queue_a_microtask(DOM::Document const*, GC::Ref> steps); void perform_a_microtask_checkpoint(); } diff --git a/Libraries/LibWeb/HTML/EventLoop/Task.h b/Libraries/LibWeb/HTML/EventLoop/Task.h index 83b00d7ea17..7e5032294bc 100644 --- a/Libraries/LibWeb/HTML/EventLoop/Task.h +++ b/Libraries/LibWeb/HTML/EventLoop/Task.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Web::HTML { @@ -109,14 +110,14 @@ private: GC::Ptr m_document; }; -struct UniqueTaskSource { +struct WEB_API UniqueTaskSource { UniqueTaskSource(); ~UniqueTaskSource(); Task::Source const source; }; -class ParallelQueue : public RefCounted { +class WEB_API ParallelQueue : public RefCounted { public: static NonnullRefPtr create(); TaskID enqueue(GC::Ref>); diff --git a/Libraries/LibWeb/HTML/EventNames.h b/Libraries/LibWeb/HTML/EventNames.h index b03d852dbd4..42cc33483ac 100644 --- a/Libraries/LibWeb/HTML/EventNames.h +++ b/Libraries/LibWeb/HTML/EventNames.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::HTML::EventNames { @@ -134,7 +135,7 @@ namespace Web::HTML::EventNames { __ENUMERATE_HTML_EVENT(webkitAnimationStart) \ __ENUMERATE_HTML_EVENT(webkitTransitionEnd) -#define __ENUMERATE_HTML_EVENT(name) extern FlyString name; +#define __ENUMERATE_HTML_EVENT(name) extern WEB_API FlyString name; ENUMERATE_HTML_EVENTS #undef __ENUMERATE_HTML_EVENT diff --git a/Libraries/LibWeb/HTML/FileFilter.h b/Libraries/LibWeb/HTML/FileFilter.h index 8576bc18444..e33d5d5ebc7 100644 --- a/Libraries/LibWeb/HTML/FileFilter.h +++ b/Libraries/LibWeb/HTML/FileFilter.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace Web::HTML { @@ -54,9 +55,9 @@ template<> ErrorOr decode(Decoder&); template<> -ErrorOr encode(Encoder&, Web::HTML::FileFilter const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::FileFilter const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/HTML/Focus.h b/Libraries/LibWeb/HTML/Focus.h index 5d690e39028..53e85396fc2 100644 --- a/Libraries/LibWeb/HTML/Focus.h +++ b/Libraries/LibWeb/HTML/Focus.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::HTML { @@ -19,7 +20,7 @@ enum class FocusTrigger : u8 { Other, }; -void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_target = nullptr, FocusTrigger focus_trigger = FocusTrigger::Other); -void run_unfocusing_steps(DOM::Node* old_focus_target); +WEB_API void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_target = nullptr, FocusTrigger focus_trigger = FocusTrigger::Other); +WEB_API void run_unfocusing_steps(DOM::Node* old_focus_target); } diff --git a/Libraries/LibWeb/HTML/FormAssociatedElement.h b/Libraries/LibWeb/HTML/FormAssociatedElement.h index c93df33650e..21ee1d73f20 100644 --- a/Libraries/LibWeb/HTML/FormAssociatedElement.h +++ b/Libraries/LibWeb/HTML/FormAssociatedElement.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -66,7 +67,7 @@ enum class SelectionDirection { None, }; -class FormAssociatedElement { +class WEB_API FormAssociatedElement { public: HTMLFormElement* form() { return m_form; } HTMLFormElement const* form() const { return m_form; } @@ -179,7 +180,7 @@ enum class SelectionSource { DOM, }; -class FormAssociatedTextControlElement +class WEB_API FormAssociatedTextControlElement : public FormAssociatedElement , public InputEventsTarget { public: diff --git a/Libraries/LibWeb/HTML/GlobalEventHandlers.h b/Libraries/LibWeb/HTML/GlobalEventHandlers.h index 4962eeb019f..64a3cc4332c 100644 --- a/Libraries/LibWeb/HTML/GlobalEventHandlers.h +++ b/Libraries/LibWeb/HTML/GlobalEventHandlers.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #define ENUMERATE_GLOBAL_EVENT_HANDLERS(E) \ @@ -103,7 +104,7 @@ namespace Web::HTML { -class GlobalEventHandlers { +class WEB_API GlobalEventHandlers { public: virtual ~GlobalEventHandlers(); diff --git a/Libraries/LibWeb/HTML/HTMLDataListElement.h b/Libraries/LibWeb/HTML/HTMLDataListElement.h index 1d955ddb6d6..312d275eb8f 100644 --- a/Libraries/LibWeb/HTML/HTMLDataListElement.h +++ b/Libraries/LibWeb/HTML/HTMLDataListElement.h @@ -8,11 +8,12 @@ #include #include +#include #include namespace Web::HTML { -class HTMLDataListElement final : public HTMLElement { +class WEB_API HTMLDataListElement final : public HTMLElement { WEB_PLATFORM_OBJECT(HTMLDataListElement, HTMLElement); GC_DECLARE_ALLOCATOR(HTMLDataListElement); diff --git a/Libraries/LibWeb/HTML/HTMLElement.h b/Libraries/LibWeb/HTML/HTMLElement.h index 162c3c09ee2..33f97f32db8 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.h +++ b/Libraries/LibWeb/HTML/HTMLElement.h @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -70,7 +71,7 @@ enum class IsPopover { No, }; -class HTMLElement +class WEB_API HTMLElement : public DOM::Element , public HTML::GlobalEventHandlers , public HTML::HTMLOrSVGElement { diff --git a/Libraries/LibWeb/HTML/HTMLFrameElement.h b/Libraries/LibWeb/HTML/HTMLFrameElement.h index e4328795608..f5a3cc515f2 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameElement.h @@ -6,12 +6,13 @@ #pragma once +#include #include namespace Web::HTML { // NOTE: This element is marked as obsolete, but is still listed as required by the specification. -class HTMLFrameElement final : public NavigableContainer { +class WEB_API HTMLFrameElement final : public NavigableContainer { WEB_PLATFORM_OBJECT(HTMLFrameElement, NavigableContainer); GC_DECLARE_ALLOCATOR(HTMLFrameElement); diff --git a/Libraries/LibWeb/HTML/HTMLHtmlElement.h b/Libraries/LibWeb/HTML/HTMLHtmlElement.h index b715799ecf2..e77344e6052 100644 --- a/Libraries/LibWeb/HTML/HTMLHtmlElement.h +++ b/Libraries/LibWeb/HTML/HTMLHtmlElement.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include namespace Web::HTML { -class HTMLHtmlElement final : public HTMLElement { +class WEB_API HTMLHtmlElement final : public HTMLElement { WEB_PLATFORM_OBJECT(HTMLHtmlElement, HTMLElement); GC_DECLARE_ALLOCATOR(HTMLHtmlElement); diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.h b/Libraries/LibWeb/HTML/HTMLInputElement.h index 69dde7a2b01..bad18338a0d 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.h +++ b/Libraries/LibWeb/HTML/HTMLInputElement.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -50,7 +51,7 @@ namespace Web::HTML { __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE("reset", ResetButton) \ __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE("button", Button) -class HTMLInputElement final +class WEB_API HTMLInputElement final : public HTMLElement , public FormAssociatedTextControlElement , public Layout::ImageProvider diff --git a/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Libraries/LibWeb/HTML/HTMLLinkElement.h index 8c12a30d3ab..7d4813d950a 100644 --- a/Libraries/LibWeb/HTML/HTMLLinkElement.h +++ b/Libraries/LibWeb/HTML/HTMLLinkElement.h @@ -10,6 +10,7 @@ #pragma once #include +#include #include #include #include @@ -18,7 +19,7 @@ namespace Web::HTML { -class HTMLLinkElement final +class WEB_API HTMLLinkElement final : public HTMLElement , public ResourceClient { WEB_PLATFORM_OBJECT(HTMLLinkElement, HTMLElement); diff --git a/Libraries/LibWeb/HTML/HTMLOptGroupElement.h b/Libraries/LibWeb/HTML/HTMLOptGroupElement.h index 57f3cbdc577..dfa4a0e9187 100644 --- a/Libraries/LibWeb/HTML/HTMLOptGroupElement.h +++ b/Libraries/LibWeb/HTML/HTMLOptGroupElement.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include namespace Web::HTML { -class HTMLOptGroupElement final : public HTMLElement { +class WEB_API HTMLOptGroupElement final : public HTMLElement { WEB_PLATFORM_OBJECT(HTMLOptGroupElement, HTMLElement); GC_DECLARE_ALLOCATOR(HTMLOptGroupElement); diff --git a/Libraries/LibWeb/HTML/HTMLOptionElement.h b/Libraries/LibWeb/HTML/HTMLOptionElement.h index f793c44e76e..bf6b2e10597 100644 --- a/Libraries/LibWeb/HTML/HTMLOptionElement.h +++ b/Libraries/LibWeb/HTML/HTMLOptionElement.h @@ -7,11 +7,12 @@ #pragma once +#include #include namespace Web::HTML { -class HTMLOptionElement final : public HTMLElement { +class WEB_API HTMLOptionElement final : public HTMLElement { WEB_PLATFORM_OBJECT(HTMLOptionElement, HTMLElement); GC_DECLARE_ALLOCATOR(HTMLOptionElement); diff --git a/Libraries/LibWeb/HTML/HTMLSelectElement.h b/Libraries/LibWeb/HTML/HTMLSelectElement.h index a1a55dce134..c3e0035e3a1 100644 --- a/Libraries/LibWeb/HTML/HTMLSelectElement.h +++ b/Libraries/LibWeb/HTML/HTMLSelectElement.h @@ -9,6 +9,7 @@ #pragma once +#include #include #include #include @@ -18,7 +19,7 @@ namespace Web::HTML { -class HTMLSelectElement final +class WEB_API HTMLSelectElement final : public HTMLElement , public FormAssociatedElement , public AutocompleteElement { diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h index 095d3ac4c87..cb4b02fd9fa 100644 --- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h +++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -19,7 +20,7 @@ namespace Web::HTML { -class HTMLTextAreaElement final +class WEB_API HTMLTextAreaElement final : public HTMLElement , public FormAssociatedTextControlElement , public AutocompleteElement { diff --git a/Libraries/LibWeb/HTML/MessageEvent.h b/Libraries/LibWeb/HTML/MessageEvent.h index 29cf7eb6acc..c61a72e524d 100644 --- a/Libraries/LibWeb/HTML/MessageEvent.h +++ b/Libraries/LibWeb/HTML/MessageEvent.h @@ -9,6 +9,7 @@ #include #include +#include namespace Web::HTML { @@ -23,7 +24,7 @@ struct MessageEventInit : public DOM::EventInit { Vector> ports; }; -class MessageEvent : public DOM::Event { +class WEB_API MessageEvent : public DOM::Event { WEB_PLATFORM_OBJECT(MessageEvent, DOM::Event); GC_DECLARE_ALLOCATOR(MessageEvent); diff --git a/Libraries/LibWeb/HTML/MessagePort.h b/Libraries/LibWeb/HTML/MessagePort.h index d0946fb08d1..aad9e933172 100644 --- a/Libraries/LibWeb/HTML/MessagePort.h +++ b/Libraries/LibWeb/HTML/MessagePort.h @@ -15,12 +15,13 @@ #include #include #include +#include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/web-messaging.html#message-ports -class MessagePort final +class WEB_API MessagePort final : public DOM::EventTarget , public Bindings::Transferable { WEB_PLATFORM_OBJECT(MessagePort, DOM::EventTarget); diff --git a/Libraries/LibWeb/HTML/Navigable.h b/Libraries/LibWeb/HTML/Navigable.h index 700a0d21887..827fc52daa0 100644 --- a/Libraries/LibWeb/HTML/Navigable.h +++ b/Libraries/LibWeb/HTML/Navigable.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,7 @@ struct PaintConfig { }; // https://html.spec.whatwg.org/multipage/document-sequences.html#navigable -class Navigable : public JS::Cell +class WEB_API Navigable : public JS::Cell , public Weakable { GC_CELL(Navigable, JS::Cell); GC_DECLARE_ALLOCATOR(Navigable); @@ -292,7 +293,7 @@ private: RenderingThread m_rendering_thread; }; -HashTable>& all_navigables(); +WEB_API HashTable>& all_navigables(); bool navigation_must_be_a_replace(URL::URL const& url, DOM::Document const& document); void finalize_a_cross_document_navigation(GC::Ref, HistoryHandlingBehavior, UserNavigationInvolvement, GC::Ref); diff --git a/Libraries/LibWeb/HTML/NavigableContainer.h b/Libraries/LibWeb/HTML/NavigableContainer.h index 95da4af5a2a..8ab47b64f0f 100644 --- a/Libraries/LibWeb/HTML/NavigableContainer.h +++ b/Libraries/LibWeb/HTML/NavigableContainer.h @@ -6,12 +6,13 @@ #pragma once +#include #include #include namespace Web::HTML { -class NavigableContainer : public HTMLElement { +class WEB_API NavigableContainer : public HTMLElement { WEB_PLATFORM_OBJECT(NavigableContainer, HTMLElement); public: diff --git a/Libraries/LibWeb/HTML/NavigationObserver.h b/Libraries/LibWeb/HTML/NavigationObserver.h index 2089d78847d..84144e9c1a6 100644 --- a/Libraries/LibWeb/HTML/NavigationObserver.h +++ b/Libraries/LibWeb/HTML/NavigationObserver.h @@ -9,11 +9,12 @@ #include #include #include +#include #include namespace Web::HTML { -class NavigationObserver final : public Bindings::PlatformObject { +class WEB_API NavigationObserver final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(NavigationObserver, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(NavigationObserver); diff --git a/Libraries/LibWeb/HTML/Numbers.h b/Libraries/LibWeb/HTML/Numbers.h index 74b45e70c91..3961b02c18b 100644 --- a/Libraries/LibWeb/HTML/Numbers.h +++ b/Libraries/LibWeb/HTML/Numbers.h @@ -8,23 +8,24 @@ #include #include +#include #include #include namespace Web::HTML { -Optional parse_integer(StringView string); +WEB_API Optional parse_integer(StringView string); Optional parse_integer_digits(StringView string); -Optional parse_non_negative_integer(StringView string); +WEB_API Optional parse_non_negative_integer(StringView string); Optional parse_non_negative_integer_digits(StringView string); Optional parse_floating_point_number(StringView string); Optional parse_floating_point_number(Utf16String const& string); -bool is_valid_floating_point_number(StringView string); +WEB_API bool is_valid_floating_point_number(StringView string); bool is_valid_floating_point_number(Utf16String const& string); -WebIDL::ExceptionOr convert_non_negative_integer_to_string(JS::Realm&, WebIDL::Long); +WEB_API WebIDL::ExceptionOr convert_non_negative_integer_to_string(JS::Realm&, WebIDL::Long); } diff --git a/Libraries/LibWeb/HTML/Parser/HTMLParser.h b/Libraries/LibWeb/HTML/Parser/HTMLParser.h index 8b9a23dfe33..b06421532d2 100644 --- a/Libraries/LibWeb/HTML/Parser/HTMLParser.h +++ b/Libraries/LibWeb/HTML/Parser/HTMLParser.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -51,7 +52,7 @@ namespace Web::HTML { __ENUMERATE_INSERTION_MODE(AfterAfterBody) \ __ENUMERATE_INSERTION_MODE(AfterAfterFrameset) -class HTMLParser final : public JS::Cell { +class WEB_API HTMLParser final : public JS::Cell { GC_CELL(HTMLParser, JS::Cell); GC_DECLARE_ALLOCATOR(HTMLParser); diff --git a/Libraries/LibWeb/HTML/Parser/HTMLToken.h b/Libraries/LibWeb/HTML/Parser/HTMLToken.h index 2ac4b7394fd..050b3f13d07 100644 --- a/Libraries/LibWeb/HTML/Parser/HTMLToken.h +++ b/Libraries/LibWeb/HTML/Parser/HTMLToken.h @@ -13,12 +13,13 @@ #include #include #include +#include namespace Web::HTML { class HTMLTokenizer; -class HTMLToken { +class WEB_API HTMLToken { AK_MAKE_NONCOPYABLE(HTMLToken); AK_MAKE_DEFAULT_MOVABLE(HTMLToken); diff --git a/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h b/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h index 6684d1f18e5..87fd604bd0c 100644 --- a/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h +++ b/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -100,7 +101,7 @@ namespace Web::HTML { __ENUMERATE_TOKENIZER_STATE(DecimalCharacterReference) \ __ENUMERATE_TOKENIZER_STATE(NumericCharacterReferenceEnd) -class HTMLTokenizer { +class WEB_API HTMLTokenizer { public: explicit HTMLTokenizer(); explicit HTMLTokenizer(StringView input, ByteString const& encoding); diff --git a/Libraries/LibWeb/HTML/PotentialCORSRequest.h b/Libraries/LibWeb/HTML/PotentialCORSRequest.h index 14cd8f7e82f..a36d981d1ef 100644 --- a/Libraries/LibWeb/HTML/PotentialCORSRequest.h +++ b/Libraries/LibWeb/HTML/PotentialCORSRequest.h @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -18,6 +19,6 @@ enum class SameOriginFallbackFlag { Yes, }; -[[nodiscard]] GC::Ref create_potential_CORS_request(JS::VM&, const URL::URL&, Optional, CORSSettingAttribute, SameOriginFallbackFlag = SameOriginFallbackFlag::No); +[[nodiscard]] WEB_API GC::Ref create_potential_CORS_request(JS::VM&, const URL::URL&, Optional, CORSSettingAttribute, SameOriginFallbackFlag = SameOriginFallbackFlag::No); } diff --git a/Libraries/LibWeb/HTML/Scripting/ClassicScript.h b/Libraries/LibWeb/HTML/Scripting/ClassicScript.h index 88dcb1b7fa6..b86c1f93273 100644 --- a/Libraries/LibWeb/HTML/Scripting/ClassicScript.h +++ b/Libraries/LibWeb/HTML/Scripting/ClassicScript.h @@ -7,13 +7,14 @@ #pragma once #include +#include #include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/webappapis.html#classic-script -class ClassicScript final : public Script { +class WEB_API ClassicScript final : public Script { GC_CELL(ClassicScript, Script); GC_DECLARE_ALLOCATOR(ClassicScript); diff --git a/Libraries/LibWeb/HTML/Scripting/EnvironmentSettingsSnapshot.h b/Libraries/LibWeb/HTML/Scripting/EnvironmentSettingsSnapshot.h index a3762905cf9..7c7a77050f8 100644 --- a/Libraries/LibWeb/HTML/Scripting/EnvironmentSettingsSnapshot.h +++ b/Libraries/LibWeb/HTML/Scripting/EnvironmentSettingsSnapshot.h @@ -6,13 +6,14 @@ #pragma once +#include #include #include #include namespace Web::HTML { -class EnvironmentSettingsSnapshot final +class WEB_API EnvironmentSettingsSnapshot final : public EnvironmentSettingsObject { GC_CELL(EnvironmentSettingsSnapshot, EnvironmentSettingsObject); GC_DECLARE_ALLOCATOR(EnvironmentSettingsSnapshot); diff --git a/Libraries/LibWeb/HTML/Scripting/Environments.h b/Libraries/LibWeb/HTML/Scripting/Environments.h index b2bfb12e70e..cc6dbe47d4e 100644 --- a/Libraries/LibWeb/HTML/Scripting/Environments.h +++ b/Libraries/LibWeb/HTML/Scripting/Environments.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace Web::HTML { // https://html.spec.whatwg.org/multipage/webappapis.html#environment -struct Environment : public JS::Cell { +struct WEB_API Environment : public JS::Cell { GC_CELL(Environment, JS::Cell); public: @@ -73,7 +74,7 @@ enum class RunScriptDecision { }; // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object -struct EnvironmentSettingsObject : public Environment { +struct WEB_API EnvironmentSettingsObject : public Environment { GC_CELL(EnvironmentSettingsObject, Environment); public: @@ -179,38 +180,38 @@ bool is_scripting_enabled(JS::Realm const&); bool is_scripting_disabled(JS::Realm const&); void prepare_to_run_script(JS::Realm&); void clean_up_after_running_script(JS::Realm const&); -void prepare_to_run_callback(JS::Realm&); -void clean_up_after_running_callback(JS::Realm const&); -ModuleMap& module_map_of_realm(JS::Realm&); -bool module_type_allowed(JS::Realm const&, StringView module_type); +WEB_API void prepare_to_run_callback(JS::Realm&); +WEB_API void clean_up_after_running_callback(JS::Realm const&); +WEB_API ModuleMap& module_map_of_realm(JS::Realm&); +WEB_API bool module_type_allowed(JS::Realm const&, StringView module_type); -void add_module_to_resolved_module_set(JS::Realm&, String const& serialized_base_url, String const& normalized_specifier, Optional const& as_url); +WEB_API void add_module_to_resolved_module_set(JS::Realm&, String const& serialized_base_url, String const& normalized_specifier, Optional const& as_url); EnvironmentSettingsObject& incumbent_settings_object(); -JS::Realm& incumbent_realm(); +WEB_API JS::Realm& incumbent_realm(); JS::Object& incumbent_global_object(); JS::Realm& current_principal_realm(); EnvironmentSettingsObject& principal_realm_settings_object(JS::Realm&); EnvironmentSettingsObject& current_principal_settings_object(); -JS::Realm& principal_realm(GC::Ref); -JS::Object& current_principal_global_object(); +WEB_API JS::Realm& principal_realm(GC::Ref); +WEB_API JS::Object& current_principal_global_object(); -JS::Realm& relevant_realm(JS::Object const&); +WEB_API JS::Realm& relevant_realm(JS::Object const&); JS::Realm& relevant_principal_realm(JS::Object const&); -EnvironmentSettingsObject& relevant_settings_object(JS::Object const&); +WEB_API EnvironmentSettingsObject& relevant_settings_object(JS::Object const&); EnvironmentSettingsObject& relevant_settings_object(DOM::Node const&); -EnvironmentSettingsObject& relevant_principal_settings_object(JS::Object const&); +WEB_API EnvironmentSettingsObject& relevant_principal_settings_object(JS::Object const&); -JS::Object& relevant_global_object(JS::Object const&); -JS::Object& relevant_principal_global_object(JS::Object const&); +WEB_API JS::Object& relevant_global_object(JS::Object const&); +WEB_API JS::Object& relevant_principal_global_object(JS::Object const&); JS::Realm& entry_realm(); EnvironmentSettingsObject& entry_settings_object(); JS::Object& entry_global_object(); -[[nodiscard]] bool is_secure_context(Environment const&); +[[nodiscard]] WEB_API bool is_secure_context(Environment const&); [[nodiscard]] bool is_non_secure_context(Environment const&); } diff --git a/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.h b/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.h index 29e4597711e..eeaeb685389 100644 --- a/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.h +++ b/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::HTML { @@ -16,7 +17,7 @@ enum class ErrorInPromise { }; void report_exception_to_console(JS::Value, JS::Realm&, ErrorInPromise); -void report_exception(JS::Completion const&, JS::Realm&); +WEB_API void report_exception(JS::Completion const&, JS::Realm&); template inline void report_exception(JS::ThrowCompletionOr const& result, JS::Realm& realm) diff --git a/Libraries/LibWeb/HTML/Scripting/Fetching.h b/Libraries/LibWeb/HTML/Scripting/Fetching.h index ad2252e3a08..76c158f8680 100644 --- a/Libraries/LibWeb/HTML/Scripting/Fetching.h +++ b/Libraries/LibWeb/HTML/Scripting/Fetching.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -24,8 +25,8 @@ enum class TopLevelModule { using OnFetchScriptComplete = GC::Ref)>>; using PerformTheFetchHook = GC::Ptr(GC::Ref, TopLevelModule, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction)>>; -OnFetchScriptComplete create_on_fetch_script_complete(GC::Heap& heap, Function)> function); -PerformTheFetchHook create_perform_the_fetch_hook(GC::Heap& heap, Function(GC::Ref, TopLevelModule, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction)> function); +WEB_API OnFetchScriptComplete create_on_fetch_script_complete(GC::Heap& heap, Function)> function); +WEB_API PerformTheFetchHook create_perform_the_fetch_hook(GC::Heap& heap, Function(GC::Ref, TopLevelModule, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction)> function); // https://html.spec.whatwg.org/multipage/webappapis.html#script-fetch-options struct ScriptFetchOptions { @@ -89,9 +90,9 @@ Optional resolve_url_like_module_specifier(StringView specifier, URL:: ScriptFetchOptions get_descendant_script_fetch_options(ScriptFetchOptions const& original_options, URL::URL const& url, EnvironmentSettingsObject& settings_object); String resolve_a_module_integrity_metadata(URL::URL const& url, EnvironmentSettingsObject& settings_object); WebIDL::ExceptionOr fetch_classic_script(GC::Ref, URL::URL const&, EnvironmentSettingsObject& settings_object, ScriptFetchOptions options, CORSSettingAttribute cors_setting, String character_encoding, OnFetchScriptComplete on_complete); -WebIDL::ExceptionOr fetch_classic_worker_script(URL::URL const&, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook, OnFetchScriptComplete); +WEB_API WebIDL::ExceptionOr fetch_classic_worker_script(URL::URL const&, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook, OnFetchScriptComplete); WebIDL::ExceptionOr> fetch_a_classic_worker_imported_script(URL::URL const&, HTML::EnvironmentSettingsObject&, PerformTheFetchHook = nullptr); -WebIDL::ExceptionOr fetch_module_worker_script_graph(URL::URL const&, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook, OnFetchScriptComplete); +WEB_API WebIDL::ExceptionOr fetch_module_worker_script_graph(URL::URL const&, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook, OnFetchScriptComplete); WebIDL::ExceptionOr fetch_worklet_module_worker_script_graph(URL::URL const&, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook, OnFetchScriptComplete); void fetch_external_module_script_graph(JS::Realm&, URL::URL const&, EnvironmentSettingsObject& settings_object, ScriptFetchOptions const&, OnFetchScriptComplete on_complete); void fetch_inline_module_script_graph(JS::Realm&, ByteString const& filename, ByteString const& source_text, URL::URL const& base_url, EnvironmentSettingsObject& settings_object, OnFetchScriptComplete on_complete); diff --git a/Libraries/LibWeb/HTML/Scripting/ModuleMap.h b/Libraries/LibWeb/HTML/Scripting/ModuleMap.h index c7f40435499..5889f742a34 100644 --- a/Libraries/LibWeb/HTML/Scripting/ModuleMap.h +++ b/Libraries/LibWeb/HTML/Scripting/ModuleMap.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Web::HTML { @@ -35,7 +36,7 @@ private: }; // https://html.spec.whatwg.org/multipage/webappapis.html#module-map -class ModuleMap final : public JS::Cell { +class WEB_API ModuleMap final : public JS::Cell { GC_CELL(ModuleMap, JS::Cell); GC_DECLARE_ALLOCATOR(ModuleMap); diff --git a/Libraries/LibWeb/HTML/Scripting/ModuleScript.h b/Libraries/LibWeb/HTML/Scripting/ModuleScript.h index 664b962790d..972ef4f51e9 100644 --- a/Libraries/LibWeb/HTML/Scripting/ModuleScript.h +++ b/Libraries/LibWeb/HTML/Scripting/ModuleScript.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include namespace Web::HTML { @@ -25,7 +26,7 @@ private: virtual bool is_module_script() const final { return true; } }; -class JavaScriptModuleScript final : public ModuleScript { +class WEB_API JavaScriptModuleScript final : public ModuleScript { GC_CELL(JavaScriptModuleScript, ModuleScript); GC_DECLARE_ALLOCATOR(JavaScriptModuleScript); diff --git a/Libraries/LibWeb/HTML/Scripting/Script.h b/Libraries/LibWeb/HTML/Scripting/Script.h index 4d33ec621dc..5a09bfdb30d 100644 --- a/Libraries/LibWeb/HTML/Scripting/Script.h +++ b/Libraries/LibWeb/HTML/Scripting/Script.h @@ -9,13 +9,14 @@ #include #include #include +#include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/webappapis.html#concept-script // https://whatpr.org/html/9893/webappapis.html#concept-script -class Script +class WEB_API Script : public JS::Cell , public JS::Script::HostDefined { GC_CELL(Script, JS::Cell); diff --git a/Libraries/LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h b/Libraries/LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h index 47a96cc7c17..66fa645cae8 100644 --- a/Libraries/LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h +++ b/Libraries/LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Web::HTML { @@ -39,9 +40,9 @@ struct SerializedEnvironmentSettingsObject { namespace IPC { template<> -ErrorOr encode(Encoder&, Web::HTML::SerializedEnvironmentSettingsObject const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::SerializedEnvironmentSettingsObject const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h b/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h index bccfa0ec114..0253b2938e5 100644 --- a/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h +++ b/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,6 @@ private: } }; -SimilarOriginWindowAgent& relevant_similar_origin_window_agent(JS::Object const&); +WEB_API SimilarOriginWindowAgent& relevant_similar_origin_window_agent(JS::Object const&); } diff --git a/Libraries/LibWeb/HTML/Scripting/TemporaryExecutionContext.h b/Libraries/LibWeb/HTML/Scripting/TemporaryExecutionContext.h index cdc01d15d12..3c42609ddbc 100644 --- a/Libraries/LibWeb/HTML/Scripting/TemporaryExecutionContext.h +++ b/Libraries/LibWeb/HTML/Scripting/TemporaryExecutionContext.h @@ -7,14 +7,14 @@ #pragma once #include -#include +#include namespace Web::HTML { // When JS is run from outside the context of any user script, we currently do not have a running execution context. // This results in a crash when we access VM::running_execution_context(). This is a spec issue. Until it is resolved, // this is a workaround to temporarily push an execution context. -class [[nodiscard]] TemporaryExecutionContext { +class [[nodiscard]] WEB_API TemporaryExecutionContext { public: enum class CallbacksEnabled { No, diff --git a/Libraries/LibWeb/HTML/Scripting/WorkerEnvironmentSettingsObject.h b/Libraries/LibWeb/HTML/Scripting/WorkerEnvironmentSettingsObject.h index 5b380eaa612..32e5a46f09c 100644 --- a/Libraries/LibWeb/HTML/Scripting/WorkerEnvironmentSettingsObject.h +++ b/Libraries/LibWeb/HTML/Scripting/WorkerEnvironmentSettingsObject.h @@ -8,11 +8,12 @@ #include #include +#include #include namespace Web::HTML { -class WorkerEnvironmentSettingsObject final +class WEB_API WorkerEnvironmentSettingsObject final : public EnvironmentSettingsObject { GC_CELL(WorkerEnvironmentSettingsObject, EnvironmentSettingsObject); GC_DECLARE_ALLOCATOR(WorkerEnvironmentSettingsObject); diff --git a/Libraries/LibWeb/HTML/SelectItem.h b/Libraries/LibWeb/HTML/SelectItem.h index 4ecf849839d..4be5e463939 100644 --- a/Libraries/LibWeb/HTML/SelectItem.h +++ b/Libraries/LibWeb/HTML/SelectItem.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::HTML { @@ -35,21 +36,21 @@ using SelectItem = Variant -ErrorOr encode(Encoder&, Web::HTML::SelectItemOption const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::SelectItemOption const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); template<> -ErrorOr encode(Encoder&, Web::HTML::SelectItemOptionGroup const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::SelectItemOptionGroup const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); template<> -ErrorOr encode(Encoder&, Web::HTML::SelectItemSeparator const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::SelectItemSeparator const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/HTML/SelectedFile.h b/Libraries/LibWeb/HTML/SelectedFile.h index 8d1739231d8..ede21b24bc0 100644 --- a/Libraries/LibWeb/HTML/SelectedFile.h +++ b/Libraries/LibWeb/HTML/SelectedFile.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace Web::HTML { @@ -19,7 +20,7 @@ enum class AllowMultipleFiles { Yes, }; -class SelectedFile { +class WEB_API SelectedFile { public: static ErrorOr from_file_path(ByteString const& file_path); @@ -40,9 +41,9 @@ private: namespace IPC { template<> -ErrorOr encode(Encoder&, Web::HTML::SelectedFile const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::SelectedFile const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/HTML/SessionHistoryTraversalQueue.h b/Libraries/LibWeb/HTML/SessionHistoryTraversalQueue.h index 0fb5eb5329f..a0386655401 100644 --- a/Libraries/LibWeb/HTML/SessionHistoryTraversalQueue.h +++ b/Libraries/LibWeb/HTML/SessionHistoryTraversalQueue.h @@ -13,6 +13,7 @@ #include #include #include +#include #include namespace Web::HTML { @@ -41,7 +42,7 @@ private: }; // https://html.spec.whatwg.org/multipage/document-sequences.html#tn-session-history-traversal-queue -class SessionHistoryTraversalQueue : public JS::Cell { +class WEB_API SessionHistoryTraversalQueue : public JS::Cell { GC_CELL(SessionHistoryTraversalQueue, JS::Cell); GC_DECLARE_ALLOCATOR(SessionHistoryTraversalQueue); diff --git a/Libraries/LibWeb/HTML/SharedWorkerGlobalScope.h b/Libraries/LibWeb/HTML/SharedWorkerGlobalScope.h index ba477fe6c80..c9743087e6e 100644 --- a/Libraries/LibWeb/HTML/SharedWorkerGlobalScope.h +++ b/Libraries/LibWeb/HTML/SharedWorkerGlobalScope.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Web::HTML { @@ -16,7 +17,7 @@ namespace Web::HTML { #define ENUMERATE_SHARED_WORKER_GLOBAL_SCOPE_EVENT_HANDLERS(E) \ E(onconnect, HTML::EventNames::connect) -class SharedWorkerGlobalScope +class WEB_API SharedWorkerGlobalScope : public WorkerGlobalScope , public Bindings::SharedWorkerGlobalScopeGlobalMixin { WEB_PLATFORM_OBJECT(SharedWorkerGlobalScope, WorkerGlobalScope); diff --git a/Libraries/LibWeb/HTML/Storage.h b/Libraries/LibWeb/HTML/Storage.h index 8d0eb5c4c09..9657c6b06b9 100644 --- a/Libraries/LibWeb/HTML/Storage.h +++ b/Libraries/LibWeb/HTML/Storage.h @@ -9,13 +9,14 @@ #pragma once #include +#include #include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/webstorage.html#storage-2 -class Storage : public Bindings::PlatformObject { +class WEB_API Storage : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(Storage, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(Storage); diff --git a/Libraries/LibWeb/HTML/StructuredSerialize.h b/Libraries/LibWeb/HTML/StructuredSerialize.h index d2298a112c1..d3195225c03 100644 --- a/Libraries/LibWeb/HTML/StructuredSerialize.h +++ b/Libraries/LibWeb/HTML/StructuredSerialize.h @@ -14,13 +14,14 @@ #include #include #include +#include #include #include #include namespace Web::HTML { -class TransferDataEncoder { +class WEB_API TransferDataEncoder { public: explicit TransferDataEncoder(); explicit TransferDataEncoder(IPC::MessageBuffer&&); @@ -42,7 +43,7 @@ private: IPC::Encoder m_encoder; }; -class TransferDataDecoder { +class WEB_API TransferDataDecoder { public: explicit TransferDataDecoder(SerializationRecord const&); explicit TransferDataDecoder(TransferDataEncoder&&); @@ -82,19 +83,19 @@ WebIDL::ExceptionOr structured_serialize_internal(JS::VM&, WebIDL::ExceptionOr structured_deserialize(JS::VM&, SerializationRecord const&, JS::Realm&, Optional = {}); WebIDL::ExceptionOr structured_deserialize_internal(JS::VM&, TransferDataDecoder&, JS::Realm&, DeserializationMemory&); -WebIDL::ExceptionOr structured_serialize_with_transfer(JS::VM&, JS::Value, Vector> const& transfer_list); +WEB_API WebIDL::ExceptionOr structured_serialize_with_transfer(JS::VM&, JS::Value, Vector> const& transfer_list); WebIDL::ExceptionOr structured_deserialize_with_transfer(SerializedTransferRecord&, JS::Realm&); -WebIDL::ExceptionOr structured_deserialize_with_transfer_internal(TransferDataDecoder&, JS::Realm&); +WEB_API WebIDL::ExceptionOr structured_deserialize_with_transfer_internal(TransferDataDecoder&, JS::Realm&); } namespace IPC { template<> -ErrorOr encode(Encoder&, Web::HTML::TransferDataEncoder const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::TransferDataEncoder const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); template<> ErrorOr encode(Encoder&, Web::HTML::SerializedTransferRecord const&); diff --git a/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h b/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h index 82a497f945b..95fb7082dcd 100644 --- a/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h +++ b/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::HTML { @@ -20,7 +21,7 @@ enum class AugmentedTokenKind : u32 { __Count, }; -class SyntaxHighlighter : public Syntax::Highlighter { +class WEB_API SyntaxHighlighter : public Syntax::Highlighter { public: SyntaxHighlighter() = default; virtual ~SyntaxHighlighter() override = default; diff --git a/Libraries/LibWeb/HTML/TagNames.h b/Libraries/LibWeb/HTML/TagNames.h index 56f882aaba4..aa299326f36 100644 --- a/Libraries/LibWeb/HTML/TagNames.h +++ b/Libraries/LibWeb/HTML/TagNames.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::HTML::TagNames { @@ -157,7 +158,7 @@ namespace Web::HTML::TagNames { __ENUMERATE_HTML_TAG(wbr, "wbr") \ __ENUMERATE_HTML_TAG(xmp, "xmp") -#define __ENUMERATE_HTML_TAG(name, tag) extern FlyString name; +#define __ENUMERATE_HTML_TAG(name, tag) extern WEB_API FlyString name; ENUMERATE_HTML_TAGS #undef __ENUMERATE_HTML_TAG diff --git a/Libraries/LibWeb/HTML/TraversableNavigable.h b/Libraries/LibWeb/HTML/TraversableNavigable.h index 03b246fbdc3..c36fbb8d563 100644 --- a/Libraries/LibWeb/HTML/TraversableNavigable.h +++ b/Libraries/LibWeb/HTML/TraversableNavigable.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include #include @@ -28,7 +29,7 @@ namespace Web::HTML { // https://html.spec.whatwg.org/multipage/document-sequences.html#traversable-navigable -class TraversableNavigable final : public Navigable { +class WEB_API TraversableNavigable final : public Navigable { GC_CELL(TraversableNavigable, Navigable); GC_DECLARE_ALLOCATOR(TraversableNavigable); diff --git a/Libraries/LibWeb/HTML/WebViewHints.h b/Libraries/LibWeb/HTML/WebViewHints.h index d8daea24d36..a064e0aee2f 100644 --- a/Libraries/LibWeb/HTML/WebViewHints.h +++ b/Libraries/LibWeb/HTML/WebViewHints.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -30,9 +31,9 @@ struct WebViewHints { namespace IPC { template<> -ErrorOr encode(Encoder&, Web::HTML::WebViewHints const&); +WEB_API ErrorOr encode(Encoder&, Web::HTML::WebViewHints const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/HTML/Window.h b/Libraries/LibWeb/HTML/Window.h index 05e4709f352..3d7866d27ae 100644 --- a/Libraries/LibWeb/HTML/Window.h +++ b/Libraries/LibWeb/HTML/Window.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -64,7 +65,7 @@ struct SpecifierResolution { bool specifier_is_null_or_url_like_that_is_special { false }; }; -class Window final +class WEB_API Window final : public DOM::EventTarget , public GlobalEventHandlers , public WindowEventHandlers diff --git a/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.h b/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.h index d4d0ff0ca42..874031136c4 100644 --- a/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.h +++ b/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -27,7 +28,7 @@ namespace Web::HTML { using TimerHandler = Variant, String>; // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope -class WindowOrWorkerGlobalScopeMixin { +class WEB_API WindowOrWorkerGlobalScopeMixin { public: virtual ~WindowOrWorkerGlobalScopeMixin(); diff --git a/Libraries/LibWeb/HTML/WindowProxy.h b/Libraries/LibWeb/HTML/WindowProxy.h index 7b313ab4862..3fece0c4415 100644 --- a/Libraries/LibWeb/HTML/WindowProxy.h +++ b/Libraries/LibWeb/HTML/WindowProxy.h @@ -10,11 +10,12 @@ #include #include #include +#include #include namespace Web::HTML { -class WindowProxy final : public JS::Object { +class WEB_API WindowProxy final : public JS::Object { JS_OBJECT(WindowProxy, JS::Object); GC_DECLARE_ALLOCATOR(WindowProxy); diff --git a/Libraries/LibWeb/HTML/WorkerDebugConsoleClient.h b/Libraries/LibWeb/HTML/WorkerDebugConsoleClient.h index fc11e00af67..ef95e1c9c33 100644 --- a/Libraries/LibWeb/HTML/WorkerDebugConsoleClient.h +++ b/Libraries/LibWeb/HTML/WorkerDebugConsoleClient.h @@ -9,12 +9,13 @@ #include #include #include +#include namespace Web::HTML { // NOTE: Temporary class to handle console messages from inside Workers -class WorkerDebugConsoleClient final : public JS::ConsoleClient { +class WEB_API WorkerDebugConsoleClient final : public JS::ConsoleClient { GC_CELL(WorkerDebugConsoleClient, JS::ConsoleClient); GC_DECLARE_ALLOCATOR(WorkerDebugConsoleClient); diff --git a/Libraries/LibWeb/HTML/WorkerGlobalScope.h b/Libraries/LibWeb/HTML/WorkerGlobalScope.h index d5cab471c90..df5a3302454 100644 --- a/Libraries/LibWeb/HTML/WorkerGlobalScope.h +++ b/Libraries/LibWeb/HTML/WorkerGlobalScope.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,7 @@ namespace Web::HTML { // https://html.spec.whatwg.org/multipage/workers.html#the-workerglobalscope-common-interface // WorkerGlobalScope is the base class of each real WorkerGlobalScope that will be created when the // user agent runs the run a worker algorithm. -class WorkerGlobalScope +class WEB_API WorkerGlobalScope : public DOM::EventTarget , public WindowOrWorkerGlobalScopeMixin , public UniversalGlobalScopeMixin { diff --git a/Libraries/LibWeb/HTML/WorkerLocation.h b/Libraries/LibWeb/HTML/WorkerLocation.h index 8caace9089b..87556ef05d6 100644 --- a/Libraries/LibWeb/HTML/WorkerLocation.h +++ b/Libraries/LibWeb/HTML/WorkerLocation.h @@ -7,11 +7,12 @@ #pragma once #include +#include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/workers.html#worker-locations -class WorkerLocation : public Bindings::PlatformObject { +class WEB_API WorkerLocation : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(WorkerLocation, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(WorkerLocation); diff --git a/Libraries/LibWeb/HighResolutionTime/TimeOrigin.h b/Libraries/LibWeb/HighResolutionTime/TimeOrigin.h index 9ee9c61fb13..43e5266da1c 100644 --- a/Libraries/LibWeb/HighResolutionTime/TimeOrigin.h +++ b/Libraries/LibWeb/HighResolutionTime/TimeOrigin.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include namespace Web::HighResolutionTime { @@ -18,8 +19,8 @@ DOMHighResTimeStamp coarsen_time(DOMHighResTimeStamp timestamp, bool cross_origi DOMHighResTimeStamp current_high_resolution_time(JS::Object const&); DOMHighResTimeStamp relative_high_resolution_time(DOMHighResTimeStamp, JS::Object const&); DOMHighResTimeStamp relative_high_resolution_coarsen_time(DOMHighResTimeStamp, JS::Object const&); -DOMHighResTimeStamp coarsened_shared_current_time(bool cross_origin_isolated_capability = false); +WEB_API DOMHighResTimeStamp coarsened_shared_current_time(bool cross_origin_isolated_capability = false); DOMHighResTimeStamp wall_clock_unsafe_current_time(); -DOMHighResTimeStamp unsafe_shared_current_time(); +WEB_API DOMHighResTimeStamp unsafe_shared_current_time(); } diff --git a/Libraries/LibWeb/Infra/JSON.h b/Libraries/LibWeb/Infra/JSON.h index 6eeddafb930..690f4f05f85 100644 --- a/Libraries/LibWeb/Infra/JSON.h +++ b/Libraries/LibWeb/Infra/JSON.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::Infra { @@ -24,6 +25,6 @@ WebIDL::ExceptionOr parse_json_bytes_to_javascript_value(JS::Realm&, WebIDL::ExceptionOr serialize_javascript_value_to_json_string(JS::VM&, JS::Value); WebIDL::ExceptionOr serialize_javascript_value_to_json_bytes(JS::VM&, JS::Value); String serialize_an_infra_value_to_a_json_string(JS::Realm&, JSONTopLevel const&); -ByteBuffer serialize_an_infra_value_to_json_bytes(JS::Realm&, JSONTopLevel const&); +WEB_API ByteBuffer serialize_an_infra_value_to_json_bytes(JS::Realm&, JSONTopLevel const&); } diff --git a/Libraries/LibWeb/Infra/Strings.h b/Libraries/LibWeb/Infra/Strings.h index f0caacdb95d..cadbc81f9a0 100644 --- a/Libraries/LibWeb/Infra/Strings.h +++ b/Libraries/LibWeb/Infra/Strings.h @@ -10,17 +10,18 @@ #pragma once #include +#include namespace Web::Infra { -String normalize_newlines(String const&); -Utf16String normalize_newlines(Utf16String const&); -ErrorOr strip_and_collapse_whitespace(StringView string); +WEB_API String normalize_newlines(String const&); +WEB_API Utf16String normalize_newlines(Utf16String const&); +WEB_API ErrorOr strip_and_collapse_whitespace(StringView string); Utf16String strip_and_collapse_whitespace(Utf16String const& string); -bool is_code_unit_prefix(StringView potential_prefix, StringView input); -ErrorOr convert_to_scalar_value_string(StringView string); +WEB_API bool is_code_unit_prefix(StringView potential_prefix, StringView input); +WEB_API ErrorOr convert_to_scalar_value_string(StringView string); ByteBuffer isomorphic_encode(StringView input); -String isomorphic_decode(ReadonlyBytes input); +WEB_API String isomorphic_decode(ReadonlyBytes input); bool code_unit_less_than(StringView a, StringView b); } diff --git a/Libraries/LibWeb/Internals/Internals.h b/Libraries/LibWeb/Internals/Internals.h index 274e13cd5f7..194ed083a57 100644 --- a/Libraries/LibWeb/Internals/Internals.h +++ b/Libraries/LibWeb/Internals/Internals.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -13,7 +14,7 @@ namespace Web::Internals { -class Internals final : public InternalsBase { +class WEB_API Internals final : public InternalsBase { WEB_PLATFORM_OBJECT(Internals, InternalsBase); GC_DECLARE_ALLOCATOR(Internals); diff --git a/Libraries/LibWeb/Internals/InternalsBase.h b/Libraries/LibWeb/Internals/InternalsBase.h index 192b9ed7b8e..d284e19687b 100644 --- a/Libraries/LibWeb/Internals/InternalsBase.h +++ b/Libraries/LibWeb/Internals/InternalsBase.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include namespace Web::Internals { -class InternalsBase : public Bindings::PlatformObject { +class WEB_API InternalsBase : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(InternalsBase, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(InternalsBase); diff --git a/Libraries/LibWeb/Internals/WebUI.h b/Libraries/LibWeb/Internals/WebUI.h index d1b067bc6f8..6292fe85072 100644 --- a/Libraries/LibWeb/Internals/WebUI.h +++ b/Libraries/LibWeb/Internals/WebUI.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include namespace Web::Internals { -class WebUI final : public InternalsBase { +class WEB_API WebUI final : public InternalsBase { WEB_PLATFORM_OBJECT(WebUI, InternalsBase); GC_DECLARE_ALLOCATOR(WebUI); diff --git a/Libraries/LibWeb/Layout/Box.h b/Libraries/LibWeb/Layout/Box.h index 854e14952f2..ef072864518 100644 --- a/Libraries/LibWeb/Layout/Box.h +++ b/Libraries/LibWeb/Layout/Box.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::Layout { @@ -24,7 +25,7 @@ struct IntrinsicSizes { HashMap> max_content_height; }; -class Box : public NodeWithStyleAndBoxModelMetrics { +class WEB_API Box : public NodeWithStyleAndBoxModelMetrics { GC_CELL(Box, NodeWithStyleAndBoxModelMetrics); public: diff --git a/Libraries/LibWeb/Layout/Label.h b/Libraries/LibWeb/Layout/Label.h index 5ba546938d0..f8d4628c0ee 100644 --- a/Libraries/LibWeb/Layout/Label.h +++ b/Libraries/LibWeb/Layout/Label.h @@ -6,12 +6,13 @@ #pragma once +#include #include #include namespace Web::Layout { -class Label final : public BlockContainer { +class WEB_API Label final : public BlockContainer { GC_CELL(Label, BlockContainer); GC_DECLARE_ALLOCATOR(Label); diff --git a/Libraries/LibWeb/Layout/Node.h b/Libraries/LibWeb/Layout/Node.h index 92dfb60d73a..70b38754098 100644 --- a/Libraries/LibWeb/Layout/Node.h +++ b/Libraries/LibWeb/Layout/Node.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -30,7 +31,7 @@ enum class LayoutMode { IntrinsicSizing, }; -class Node +class WEB_API Node : public JS::Cell , public TreeNode { GC_CELL(Node, JS::Cell); @@ -231,7 +232,7 @@ private: u32 m_initial_quote_nesting_level { 0 }; }; -class NodeWithStyle : public Node { +class WEB_API NodeWithStyle : public Node { GC_CELL(NodeWithStyle, Node); public: diff --git a/Libraries/LibWeb/Layout/SVGGraphicsBox.h b/Libraries/LibWeb/Layout/SVGGraphicsBox.h index 05bf851d41e..9d19619f2f6 100644 --- a/Libraries/LibWeb/Layout/SVGGraphicsBox.h +++ b/Libraries/LibWeb/Layout/SVGGraphicsBox.h @@ -6,13 +6,14 @@ #pragma once +#include #include #include #include namespace Web::Layout { -class SVGGraphicsBox : public SVGBox { +class WEB_API SVGGraphicsBox : public SVGBox { GC_CELL(SVGGraphicsBox, SVGBox); public: diff --git a/Libraries/LibWeb/Loader/ContentFilter.h b/Libraries/LibWeb/Loader/ContentFilter.h index 2786d835bf1..d1a00a95421 100644 --- a/Libraries/LibWeb/Loader/ContentFilter.h +++ b/Libraries/LibWeb/Loader/ContentFilter.h @@ -9,10 +9,11 @@ #include #include #include +#include namespace Web { -class ContentFilter { +class WEB_API ContentFilter { public: static ContentFilter& the(); diff --git a/Libraries/LibWeb/Loader/FileRequest.h b/Libraries/LibWeb/Loader/FileRequest.h index 8e7828915e6..a186aa853d3 100644 --- a/Libraries/LibWeb/Loader/FileRequest.h +++ b/Libraries/LibWeb/Loader/FileRequest.h @@ -10,10 +10,11 @@ #include #include #include +#include namespace Web { -class FileRequest { +class WEB_API FileRequest { public: FileRequest(ByteString path, ESCAPING Function)> on_file_request_finish); diff --git a/Libraries/LibWeb/Loader/GeneratedPagesLoader.h b/Libraries/LibWeb/Loader/GeneratedPagesLoader.h index db9d5994a66..aa1ee8040f3 100644 --- a/Libraries/LibWeb/Loader/GeneratedPagesLoader.h +++ b/Libraries/LibWeb/Loader/GeneratedPagesLoader.h @@ -6,13 +6,14 @@ #pragma once +#include #include #include namespace Web { -void set_browser_process_command_line(StringView command_line); -void set_browser_process_executable_path(StringView executable_path); +WEB_API void set_browser_process_command_line(StringView command_line); +WEB_API void set_browser_process_executable_path(StringView executable_path); ErrorOr load_error_page(URL::URL const&, StringView error_message); diff --git a/Libraries/LibWeb/Loader/LoadRequest.h b/Libraries/LibWeb/Loader/LoadRequest.h index 58c2125e33b..0f2bc69a447 100644 --- a/Libraries/LibWeb/Loader/LoadRequest.h +++ b/Libraries/LibWeb/Loader/LoadRequest.h @@ -11,12 +11,13 @@ #include #include #include +#include #include #include namespace Web { -class LoadRequest { +class WEB_API LoadRequest { public: LoadRequest(); diff --git a/Libraries/LibWeb/Loader/ProxyMappings.h b/Libraries/LibWeb/Loader/ProxyMappings.h index 4d03c405fee..0b9c95409bf 100644 --- a/Libraries/LibWeb/Loader/ProxyMappings.h +++ b/Libraries/LibWeb/Loader/ProxyMappings.h @@ -10,10 +10,11 @@ #include #include #include +#include namespace Web { -class ProxyMappings { +class WEB_API ProxyMappings { public: static ProxyMappings& the(); diff --git a/Libraries/LibWeb/Loader/ResourceLoader.h b/Libraries/LibWeb/Loader/ResourceLoader.h index 634280b578e..60d93603afa 100644 --- a/Libraries/LibWeb/Loader/ResourceLoader.h +++ b/Libraries/LibWeb/Loader/ResourceLoader.h @@ -13,12 +13,13 @@ #include #include #include +#include #include #include namespace Web { -class ResourceLoader : public Core::EventReceiver { +class WEB_API ResourceLoader : public Core::EventReceiver { C_OBJECT_ABSTRACT(ResourceLoader) public: static void initialize(GC::Heap&, NonnullRefPtr); diff --git a/Libraries/LibWeb/MimeSniff/MimeType.h b/Libraries/LibWeb/MimeSniff/MimeType.h index dbe411854ad..fbeb9038dda 100644 --- a/Libraries/LibWeb/MimeSniff/MimeType.h +++ b/Libraries/LibWeb/MimeSniff/MimeType.h @@ -9,6 +9,7 @@ #include #include +#include namespace Web::MimeSniff { @@ -36,7 +37,7 @@ static constexpr Array s_javascript_mime_type_essence_strings = { }; // https://mimesniff.spec.whatwg.org/#mime-type -class MimeType { +class WEB_API MimeType { public: [[nodiscard]] static MimeType create(String type, String subtype); [[nodiscard]] static Optional parse(StringView); @@ -88,6 +89,6 @@ private: String m_cached_essence; }; -String minimise_a_supported_mime_type(MimeType const&); +WEB_API String minimise_a_supported_mime_type(MimeType const&); } diff --git a/Libraries/LibWeb/MimeSniff/Resource.h b/Libraries/LibWeb/MimeSniff/Resource.h index 97ced2235ee..9b9c2bdfdc9 100644 --- a/Libraries/LibWeb/MimeSniff/Resource.h +++ b/Libraries/LibWeb/MimeSniff/Resource.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace Web::MimeSniff { @@ -30,7 +31,7 @@ struct SniffingConfiguration { }; // https://mimesniff.spec.whatwg.org/#resource -class Resource { +class WEB_API Resource { public: static Resource create(ReadonlyBytes data, SniffingConfiguration configuration = {}); static MimeType sniff(ReadonlyBytes data, SniffingConfiguration configuration = {}); diff --git a/Libraries/LibWeb/MixedContent/AbstractOperations.h b/Libraries/LibWeb/MixedContent/AbstractOperations.h index 8696dd97694..9bc027200c4 100644 --- a/Libraries/LibWeb/MixedContent/AbstractOperations.h +++ b/Libraries/LibWeb/MixedContent/AbstractOperations.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include #include namespace Web::MixedContent { -void upgrade_a_mixed_content_request_to_a_potentially_trustworthy_url_if_appropriate(Fetch::Infrastructure::Request&); +WEB_API void upgrade_a_mixed_content_request_to_a_potentially_trustworthy_url_if_appropriate(Fetch::Infrastructure::Request&); enum class ProhibitsMixedSecurityContexts { ProhibitsMixedSecurityContexts, @@ -21,8 +22,8 @@ enum class ProhibitsMixedSecurityContexts { ProhibitsMixedSecurityContexts does_settings_prohibit_mixed_security_contexts(GC::Ptr); -Fetch::Infrastructure::RequestOrResponseBlocking should_fetching_request_be_blocked_as_mixed_content(Fetch::Infrastructure::Request&); +WEB_API Fetch::Infrastructure::RequestOrResponseBlocking should_fetching_request_be_blocked_as_mixed_content(Fetch::Infrastructure::Request&); -Fetch::Infrastructure::RequestOrResponseBlocking should_response_to_request_be_blocked_as_mixed_content(Fetch::Infrastructure::Request&, GC::Ref&); +WEB_API Fetch::Infrastructure::RequestOrResponseBlocking should_response_to_request_be_blocked_as_mixed_content(Fetch::Infrastructure::Request&, GC::Ref&); } diff --git a/Libraries/LibWeb/Namespace.h b/Libraries/LibWeb/Namespace.h index 17eb9f6bb20..339e385ca40 100644 --- a/Libraries/LibWeb/Namespace.h +++ b/Libraries/LibWeb/Namespace.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::Namespace { @@ -18,7 +19,7 @@ namespace Web::Namespace { __ENUMERATE_NAMESPACE(XML, "http://www.w3.org/XML/1998/namespace") \ __ENUMERATE_NAMESPACE(XMLNS, "http://www.w3.org/2000/xmlns/") -#define __ENUMERATE_NAMESPACE(name, namespace_) extern FlyString name; +#define __ENUMERATE_NAMESPACE(name, namespace_) extern WEB_API FlyString name; ENUMERATE_NAMESPACES #undef __ENUMERATE_NAMESPACE diff --git a/Libraries/LibWeb/Page/EventHandler.h b/Libraries/LibWeb/Page/EventHandler.h index 037985609f0..7e9f94647d9 100644 --- a/Libraries/LibWeb/Page/EventHandler.h +++ b/Libraries/LibWeb/Page/EventHandler.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace Web { -class EventHandler { +class WEB_API EventHandler { public: explicit EventHandler(Badge, HTML::Navigable&); ~EventHandler(); diff --git a/Libraries/LibWeb/Page/InputEvent.h b/Libraries/LibWeb/Page/InputEvent.h index 6e3f31902ec..afb4c12f6e8 100644 --- a/Libraries/LibWeb/Page/InputEvent.h +++ b/Libraries/LibWeb/Page/InputEvent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -22,7 +23,7 @@ struct BrowserInputData { virtual ~BrowserInputData() = default; }; -struct KeyEvent { +struct WEB_API KeyEvent { enum class Type { KeyDown, KeyUp, @@ -39,7 +40,7 @@ struct KeyEvent { OwnPtr browser_data; }; -struct MouseEvent { +struct WEB_API MouseEvent { enum class Type { MouseDown, MouseUp, @@ -63,7 +64,7 @@ struct MouseEvent { OwnPtr browser_data; }; -struct DragEvent { +struct WEB_API DragEvent { enum class Type { DragStart, DragMove, @@ -97,21 +98,21 @@ struct QueuedInputEvent { namespace IPC { template<> -ErrorOr encode(Encoder&, Web::KeyEvent const&); +WEB_API ErrorOr encode(Encoder&, Web::KeyEvent const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); template<> -ErrorOr encode(Encoder&, Web::MouseEvent const&); +WEB_API ErrorOr encode(Encoder&, Web::MouseEvent const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); template<> -ErrorOr encode(Encoder&, Web::DragEvent const&); +WEB_API ErrorOr encode(Encoder&, Web::DragEvent const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/Page/Page.h b/Libraries/LibWeb/Page/Page.h index 174c60825ed..5c4903a27a0 100644 --- a/Libraries/LibWeb/Page/Page.h +++ b/Libraries/LibWeb/Page/Page.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ namespace Web { class PageClient; -class Page final : public JS::Cell { +class WEB_API Page final : public JS::Cell { GC_CELL(Page, JS::Cell); GC_DECLARE_ALLOCATOR(Page); @@ -419,9 +420,9 @@ protected: namespace IPC { template<> -ErrorOr encode(Encoder&, Web::Page::MediaContextMenu const&); +WEB_API ErrorOr encode(Encoder&, Web::Page::MediaContextMenu const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/Painting/BackgroundPainting.h b/Libraries/LibWeb/Painting/BackgroundPainting.h index 7928cccf19c..fd5bdd69850 100644 --- a/Libraries/LibWeb/Painting/BackgroundPainting.h +++ b/Libraries/LibWeb/Painting/BackgroundPainting.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include @@ -45,8 +46,8 @@ struct ResolvedBackground { Color color {}; }; -ResolvedBackground resolve_background_layers(Vector const& layers, PaintableBox const& paintable_box, Color background_color, CSSPixelRect const& border_rect, BorderRadiiData const& border_radii); +WEB_API ResolvedBackground resolve_background_layers(Vector const& layers, PaintableBox const& paintable_box, Color background_color, CSSPixelRect const& border_rect, BorderRadiiData const& border_radii); -void paint_background(DisplayListRecordingContext&, PaintableBox const&, CSS::ImageRendering, ResolvedBackground resolved_background, BorderRadiiData const&); +WEB_API void paint_background(DisplayListRecordingContext&, PaintableBox const&, CSS::ImageRendering, ResolvedBackground resolved_background, BorderRadiiData const&); } diff --git a/Libraries/LibWeb/Painting/BackingStoreManager.h b/Libraries/LibWeb/Painting/BackingStoreManager.h index ad34004b8d2..57a5053318d 100644 --- a/Libraries/LibWeb/Painting/BackingStoreManager.h +++ b/Libraries/LibWeb/Painting/BackingStoreManager.h @@ -6,11 +6,12 @@ #pragma once +#include #include namespace Web::Painting { -class BackingStoreManager : public JS::Cell { +class WEB_API BackingStoreManager : public JS::Cell { GC_CELL(BackingStoreManager, JS::Cell); GC_DECLARE_ALLOCATOR(BackingStoreManager); diff --git a/Libraries/LibWeb/Painting/BorderPainting.h b/Libraries/LibWeb/Painting/BorderPainting.h index c1df849dd63..fcfcc23c288 100644 --- a/Libraries/LibWeb/Painting/BorderPainting.h +++ b/Libraries/LibWeb/Painting/BorderPainting.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -16,10 +17,10 @@ namespace Web::Painting { // Returns OptionalNone if there is no outline to paint. -Optional borders_data_for_outline(Layout::Node const&, Color outline_color, CSS::OutlineStyle outline_style, CSSPixels outline_width); +WEB_API Optional borders_data_for_outline(Layout::Node const&, Color outline_color, CSS::OutlineStyle outline_style, CSSPixels outline_width); void paint_border(DisplayListRecorder& painter, BorderEdge edge, DevicePixelRect const& rect, CornerRadius const& radius, CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path&, bool last); -void paint_all_borders(DisplayListRecorder& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const&); +WEB_API void paint_all_borders(DisplayListRecorder& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const&); Gfx::Color border_color(BorderEdge edge, BordersDataDevicePixels const& borders_data); diff --git a/Libraries/LibWeb/Painting/BorderRadiiData.h b/Libraries/LibWeb/Painting/BorderRadiiData.h index a8cc8130f25..2826a8a18a0 100644 --- a/Libraries/LibWeb/Painting/BorderRadiiData.h +++ b/Libraries/LibWeb/Painting/BorderRadiiData.h @@ -8,6 +8,7 @@ #pragma once #include +#include namespace Web::Painting { @@ -21,7 +22,7 @@ struct CornerRadius { } }; -struct BorderRadiusData { +struct WEB_API BorderRadiusData { CSSPixels horizontal_radius { 0 }; CSSPixels vertical_radius { 0 }; diff --git a/Libraries/LibWeb/Painting/BorderRadiusCornerClipper.h b/Libraries/LibWeb/Painting/BorderRadiusCornerClipper.h index 3a42c60f5b1..1157c0c38cf 100644 --- a/Libraries/LibWeb/Painting/BorderRadiusCornerClipper.h +++ b/Libraries/LibWeb/Painting/BorderRadiusCornerClipper.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace Web::Painting { @@ -15,7 +16,7 @@ enum class CornerClip { Inside }; -struct ScopedCornerRadiusClip { +struct WEB_API ScopedCornerRadiusClip { ScopedCornerRadiusClip(DisplayListRecordingContext& context, DevicePixelRect const& border_rect, BorderRadiiData const& border_radii, CornerClip corner_clip = CornerClip::Outside, bool do_apply = true); ~ScopedCornerRadiusClip(); diff --git a/Libraries/LibWeb/Painting/BordersData.h b/Libraries/LibWeb/Painting/BordersData.h index a2e418d1152..b8e849266f3 100644 --- a/Libraries/LibWeb/Painting/BordersData.h +++ b/Libraries/LibWeb/Painting/BordersData.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Web::Painting { @@ -54,7 +55,7 @@ struct BordersDataDevicePixels { } }; -struct BordersData { +struct WEB_API BordersData { CSS::BorderData top; CSS::BorderData right; CSS::BorderData bottom; diff --git a/Libraries/LibWeb/Painting/BoxModelMetrics.h b/Libraries/LibWeb/Painting/BoxModelMetrics.h index afb1eb5b870..61e92db24aa 100644 --- a/Libraries/LibWeb/Painting/BoxModelMetrics.h +++ b/Libraries/LibWeb/Painting/BoxModelMetrics.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace Web::Painting { @@ -17,7 +18,7 @@ struct PixelBox { CSSPixels left { 0 }; }; -struct BoxModelMetrics { +struct WEB_API BoxModelMetrics { public: PixelBox margin; PixelBox padding; diff --git a/Libraries/LibWeb/Painting/ClipFrame.h b/Libraries/LibWeb/Painting/ClipFrame.h index 4b158c46f0d..93960f9e65c 100644 --- a/Libraries/LibWeb/Painting/ClipFrame.h +++ b/Libraries/LibWeb/Painting/ClipFrame.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -19,7 +20,7 @@ struct ClipRectWithScrollFrame { Optional enclosing_scroll_frame_id; }; -struct ClipFrame : public AtomicRefCounted { +struct WEB_API ClipFrame : public AtomicRefCounted { Vector const& clip_rects() const { return m_clip_rects; } void add_clip_rect(CSSPixelRect rect, BorderRadiiData radii, RefPtr enclosing_scroll_frame); diff --git a/Libraries/LibWeb/Painting/DisplayListRecorder.h b/Libraries/LibWeb/Painting/DisplayListRecorder.h index eba70803871..a9be506723d 100644 --- a/Libraries/LibWeb/Painting/DisplayListRecorder.h +++ b/Libraries/LibWeb/Painting/DisplayListRecorder.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,7 @@ struct StackingContextTransform { Gfx::FloatMatrix4x4 matrix; }; -class DisplayListRecorder { +class WEB_API DisplayListRecorder { AK_MAKE_NONCOPYABLE(DisplayListRecorder); AK_MAKE_NONMOVABLE(DisplayListRecorder); diff --git a/Libraries/LibWeb/Painting/DisplayListRecordingContext.h b/Libraries/LibWeb/Painting/DisplayListRecordingContext.h index 8c93dd86e66..700162b4b17 100644 --- a/Libraries/LibWeb/Painting/DisplayListRecordingContext.h +++ b/Libraries/LibWeb/Painting/DisplayListRecordingContext.h @@ -10,13 +10,14 @@ #include #include #include +#include #include #include #include namespace Web { -class DisplayListRecordingContext { +class WEB_API DisplayListRecordingContext { public: DisplayListRecordingContext(Painting::DisplayListRecorder& painter, Palette const& palette, double device_pixels_per_css_pixel); diff --git a/Libraries/LibWeb/Painting/Paintable.h b/Libraries/LibWeb/Painting/Paintable.h index 491ac9a6652..eed56045b8a 100644 --- a/Libraries/LibWeb/Painting/Paintable.h +++ b/Libraries/LibWeb/Painting/Paintable.h @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -48,7 +49,7 @@ enum class HitTestType { TextCursor, // Clicking past the right/bottom edge of text will still hit the text }; -class Paintable +class WEB_API Paintable : public JS::Cell , public TreeNode { GC_CELL(Paintable, JS::Cell); @@ -190,6 +191,6 @@ inline bool Paintable::fast_is() const { return is_paintable template<> inline bool Paintable::fast_is() const { return is_text_paintable(); } -Painting::BorderRadiiData normalize_border_radii_data(Layout::Node const& node, CSSPixelRect const& rect, CSS::BorderRadiusData const& top_left_radius, CSS::BorderRadiusData const& top_right_radius, CSS::BorderRadiusData const& bottom_right_radius, CSS::BorderRadiusData const& bottom_left_radius); +WEB_API Painting::BorderRadiiData normalize_border_radii_data(Layout::Node const& node, CSSPixelRect const& rect, CSS::BorderRadiusData const& top_left_radius, CSS::BorderRadiusData const& top_right_radius, CSS::BorderRadiusData const& bottom_right_radius, CSS::BorderRadiusData const& bottom_left_radius); } diff --git a/Libraries/LibWeb/Painting/PaintableBox.cpp b/Libraries/LibWeb/Painting/PaintableBox.cpp index 20e5bfc69bc..02a4a740ec9 100644 --- a/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -38,6 +38,11 @@ GC_DEFINE_ALLOCATOR(PaintableWithLines); bool g_paint_viewport_scrollbars = true; +void set_paint_viewport_scrollbars(bool const enabled) +{ + g_paint_viewport_scrollbars = enabled; +} + GC::Ref PaintableWithLines::create(Layout::BlockContainer const& block_container) { return block_container.heap().allocate(block_container); diff --git a/Libraries/LibWeb/Painting/PaintableBox.h b/Libraries/LibWeb/Painting/PaintableBox.h index 12574483247..b1bf0e1668f 100644 --- a/Libraries/LibWeb/Painting/PaintableBox.h +++ b/Libraries/LibWeb/Painting/PaintableBox.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -22,9 +23,9 @@ namespace Web::Painting { -extern bool g_paint_viewport_scrollbars; +WEB_API void set_paint_viewport_scrollbars(bool enabled); -class PaintableBox : public Paintable +class WEB_API PaintableBox : public Paintable , public Weakable { GC_CELL(PaintableBox, Paintable); diff --git a/Libraries/LibWeb/Painting/PaintableFragment.h b/Libraries/LibWeb/Painting/PaintableFragment.h index b2ae0fcf294..be20ea1067a 100644 --- a/Libraries/LibWeb/Painting/PaintableFragment.h +++ b/Libraries/LibWeb/Painting/PaintableFragment.h @@ -8,13 +8,14 @@ #include #include +#include #include #include #include namespace Web::Painting { -class PaintableFragment { +class WEB_API PaintableFragment { friend class PaintableWithLines; public: diff --git a/Libraries/LibWeb/Painting/SVGPathPaintable.h b/Libraries/LibWeb/Painting/SVGPathPaintable.h index b779a83bdd0..b4b13b752e6 100644 --- a/Libraries/LibWeb/Painting/SVGPathPaintable.h +++ b/Libraries/LibWeb/Painting/SVGPathPaintable.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include #include namespace Web::Painting { -class SVGPathPaintable final : public SVGGraphicsPaintable { +class WEB_API SVGPathPaintable final : public SVGGraphicsPaintable { GC_CELL(SVGPathPaintable, SVGGraphicsPaintable); GC_DECLARE_ALLOCATOR(SVGPathPaintable); diff --git a/Libraries/LibWeb/Painting/ShadowPainting.h b/Libraries/LibWeb/Painting/ShadowPainting.h index d68cc85a485..633535dd888 100644 --- a/Libraries/LibWeb/Painting/ShadowPainting.h +++ b/Libraries/LibWeb/Painting/ShadowPainting.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include @@ -15,13 +16,13 @@ namespace Web::Painting { -void paint_box_shadow( +WEB_API void paint_box_shadow( DisplayListRecordingContext&, CSSPixelRect const& bordered_content_rect, CSSPixelRect const& borderless_content_rect, BordersData const& borders_data, BorderRadiiData const&, Vector const&); -void paint_text_shadow(DisplayListRecordingContext&, PaintableFragment const&, Vector const&); +WEB_API void paint_text_shadow(DisplayListRecordingContext&, PaintableFragment const&, Vector const&); } diff --git a/Libraries/LibWeb/Painting/StackingContext.h b/Libraries/LibWeb/Painting/StackingContext.h index 1ca87385c2e..df1be7e9dc8 100644 --- a/Libraries/LibWeb/Painting/StackingContext.h +++ b/Libraries/LibWeb/Painting/StackingContext.h @@ -8,11 +8,12 @@ #include #include +#include #include namespace Web::Painting { -class StackingContext { +class WEB_API StackingContext { friend class ViewportPaintable; public: diff --git a/Libraries/LibWeb/Painting/TableBordersPainting.h b/Libraries/LibWeb/Painting/TableBordersPainting.h index 108dd005315..3343e24f530 100644 --- a/Libraries/LibWeb/Painting/TableBordersPainting.h +++ b/Libraries/LibWeb/Painting/TableBordersPainting.h @@ -6,8 +6,10 @@ #pragma once +#include + namespace Web::Painting { -void paint_table_borders(DisplayListRecordingContext&, PaintableBox const& table_paintable); +WEB_API void paint_table_borders(DisplayListRecordingContext&, PaintableBox const& table_paintable); } diff --git a/Libraries/LibWeb/Painting/ViewportPaintable.h b/Libraries/LibWeb/Painting/ViewportPaintable.h index dcbf2ced34c..854a64cf092 100644 --- a/Libraries/LibWeb/Painting/ViewportPaintable.h +++ b/Libraries/LibWeb/Painting/ViewportPaintable.h @@ -7,12 +7,13 @@ #pragma once +#include #include #include namespace Web::Painting { -class ViewportPaintable final : public PaintableWithLines { +class WEB_API ViewportPaintable final : public PaintableWithLines { GC_CELL(ViewportPaintable, PaintableWithLines); GC_DECLARE_ALLOCATOR(ViewportPaintable); diff --git a/Libraries/LibWeb/PermissionsPolicy/AutoplayAllowlist.h b/Libraries/LibWeb/PermissionsPolicy/AutoplayAllowlist.h index 2c2929eec0b..2bd7795dd88 100644 --- a/Libraries/LibWeb/PermissionsPolicy/AutoplayAllowlist.h +++ b/Libraries/LibWeb/PermissionsPolicy/AutoplayAllowlist.h @@ -10,12 +10,13 @@ #include #include #include +#include #include #include namespace Web::PermissionsPolicy { -class AutoplayAllowlist { +class WEB_API AutoplayAllowlist { public: static AutoplayAllowlist& the(); diff --git a/Libraries/LibWeb/PixelUnits.h b/Libraries/LibWeb/PixelUnits.h index 56029327394..d99e8155f65 100644 --- a/Libraries/LibWeb/PixelUnits.h +++ b/Libraries/LibWeb/PixelUnits.h @@ -16,6 +16,7 @@ #include #include #include +#include #include namespace Web { @@ -56,7 +57,7 @@ class CSSPixelFraction; /// CSSPixels: A position or length in CSS "reference pixels", independent of zoom or screen DPI. /// See https://www.w3.org/TR/css-values-3/#reference-pixel -class CSSPixels { +class WEB_API CSSPixels { public: static constexpr i32 fractional_bits = 6; static constexpr i32 fixed_point_denominator = 1 << fractional_bits; @@ -529,23 +530,23 @@ struct Formatter : Formatter { namespace IPC { template<> -ErrorOr encode(Encoder& encoder, Web::DevicePixels const& value); +WEB_API ErrorOr encode(Encoder& encoder, Web::DevicePixels const& value); template<> -ErrorOr decode(Decoder& decoder); +WEB_API ErrorOr decode(Decoder& decoder); template<> -ErrorOr encode(Encoder& encoder, Web::DevicePixelPoint const& value); +WEB_API ErrorOr encode(Encoder& encoder, Web::DevicePixelPoint const& value); template<> -ErrorOr decode(Decoder& decoder); +WEB_API ErrorOr decode(Decoder& decoder); template<> -ErrorOr encode(Encoder& encoder, Web::DevicePixelSize const& value); +WEB_API ErrorOr encode(Encoder& encoder, Web::DevicePixelSize const& value); template<> -ErrorOr decode(Decoder& decoder); +WEB_API ErrorOr decode(Decoder& decoder); template<> -ErrorOr encode(Encoder& encoder, Web::DevicePixelRect const& value); +WEB_API ErrorOr encode(Encoder& encoder, Web::DevicePixelRect const& value); template<> -ErrorOr decode(Decoder& decoder); +WEB_API ErrorOr decode(Decoder& decoder); } diff --git a/Libraries/LibWeb/Platform/AudioCodecPlugin.h b/Libraries/LibWeb/Platform/AudioCodecPlugin.h index 85a2a31a5f5..4863a904f14 100644 --- a/Libraries/LibWeb/Platform/AudioCodecPlugin.h +++ b/Libraries/LibWeb/Platform/AudioCodecPlugin.h @@ -12,10 +12,11 @@ #include #include #include +#include namespace Web::Platform { -class AudioCodecPlugin : public Weakable { +class WEB_API AudioCodecPlugin : public Weakable { public: using AudioCodecPluginCreator = Function>(NonnullRefPtr)>; diff --git a/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.h b/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.h index 31c2bafac2b..c416e05eb0c 100644 --- a/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.h +++ b/Libraries/LibWeb/Platform/AudioCodecPluginAgnostic.h @@ -8,11 +8,12 @@ #include #include +#include #include namespace Web::Platform { -class AudioCodecPluginAgnostic final : public AudioCodecPlugin { +class WEB_API AudioCodecPluginAgnostic final : public AudioCodecPlugin { public: static ErrorOr> create(NonnullRefPtr const&); diff --git a/Libraries/LibWeb/Platform/EventLoopPlugin.h b/Libraries/LibWeb/Platform/EventLoopPlugin.h index 4ec72a17d9c..99b8c5004b5 100644 --- a/Libraries/LibWeb/Platform/EventLoopPlugin.h +++ b/Libraries/LibWeb/Platform/EventLoopPlugin.h @@ -9,11 +9,12 @@ #include #include #include +#include #include namespace Web::Platform { -class EventLoopPlugin { +class WEB_API EventLoopPlugin { public: static EventLoopPlugin& the(); static void install(EventLoopPlugin&); diff --git a/Libraries/LibWeb/Platform/EventLoopPluginSerenity.h b/Libraries/LibWeb/Platform/EventLoopPluginSerenity.h index 0a88669a04b..945f1726029 100644 --- a/Libraries/LibWeb/Platform/EventLoopPluginSerenity.h +++ b/Libraries/LibWeb/Platform/EventLoopPluginSerenity.h @@ -6,11 +6,12 @@ #pragma once +#include #include namespace Web::Platform { -class EventLoopPluginSerenity final : public Web::Platform::EventLoopPlugin { +class WEB_API EventLoopPluginSerenity final : public Web::Platform::EventLoopPlugin { public: EventLoopPluginSerenity(); virtual ~EventLoopPluginSerenity() override; diff --git a/Libraries/LibWeb/Platform/FontPlugin.h b/Libraries/LibWeb/Platform/FontPlugin.h index 270eb6c411f..5561da06405 100644 --- a/Libraries/LibWeb/Platform/FontPlugin.h +++ b/Libraries/LibWeb/Platform/FontPlugin.h @@ -8,6 +8,7 @@ #include #include +#include namespace Web::Platform { @@ -24,7 +25,7 @@ enum class GenericFont { __Count, }; -class FontPlugin { +class WEB_API FontPlugin { public: static FontPlugin& the(); static void install(FontPlugin&); diff --git a/Libraries/LibWeb/Platform/ImageCodecPlugin.h b/Libraries/LibWeb/Platform/ImageCodecPlugin.h index 9cd680b6ec4..ba90a164b8b 100644 --- a/Libraries/LibWeb/Platform/ImageCodecPlugin.h +++ b/Libraries/LibWeb/Platform/ImageCodecPlugin.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace Web::Platform { @@ -27,7 +28,7 @@ struct DecodedImage { Gfx::ColorSpace color_space; }; -class ImageCodecPlugin { +class WEB_API ImageCodecPlugin { public: static ImageCodecPlugin& the(); static void install(ImageCodecPlugin&); diff --git a/Libraries/LibWeb/ResourceTiming/PerformanceResourceTiming.h b/Libraries/LibWeb/ResourceTiming/PerformanceResourceTiming.h index 7bc6cac944b..699d940c0af 100644 --- a/Libraries/LibWeb/ResourceTiming/PerformanceResourceTiming.h +++ b/Libraries/LibWeb/ResourceTiming/PerformanceResourceTiming.h @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -15,7 +16,7 @@ namespace Web::ResourceTiming { // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming -class PerformanceResourceTiming : public PerformanceTimeline::PerformanceEntry { +class WEB_API PerformanceResourceTiming : public PerformanceTimeline::PerformanceEntry { WEB_PLATFORM_OBJECT(PerformanceResourceTiming, PerformanceTimeline::PerformanceEntry); GC_DECLARE_ALLOCATOR(PerformanceResourceTiming); diff --git a/Libraries/LibWeb/SRI/SRI.h b/Libraries/LibWeb/SRI/SRI.h index f9e19474c12..64e16695ad4 100644 --- a/Libraries/LibWeb/SRI/SRI.h +++ b/Libraries/LibWeb/SRI/SRI.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace Web::SRI { @@ -18,8 +19,8 @@ struct Metadata { }; ErrorOr apply_algorithm_to_bytes(StringView algorithm, ByteBuffer const& bytes); -ErrorOr> parse_metadata(StringView metadata); +WEB_API ErrorOr> parse_metadata(StringView metadata); ErrorOr> get_strongest_metadata_from_set(Vector const& set); -ErrorOr do_bytes_match_metadata_list(ByteBuffer const& bytes, StringView metadata_list); +WEB_API ErrorOr do_bytes_match_metadata_list(ByteBuffer const& bytes, StringView metadata_list); } diff --git a/Libraries/LibWeb/SVG/AttributeParser.h b/Libraries/LibWeb/SVG/AttributeParser.h index 13419c5ad67..ae836c19a87 100644 --- a/Libraries/LibWeb/SVG/AttributeParser.h +++ b/Libraries/LibWeb/SVG/AttributeParser.h @@ -12,6 +12,7 @@ #include #include #include +#include #include namespace Web::SVG { @@ -86,7 +87,7 @@ enum class SpreadMethod { Reflect }; -class NumberPercentage { +class WEB_API NumberPercentage { public: NumberPercentage(float value, bool is_percentage) : m_value(is_percentage ? value / 100 : value) @@ -126,7 +127,7 @@ enum class TextAnchor { End }; -class AttributeParser final { +class WEB_API AttributeParser final { public: ~AttributeParser() = default; diff --git a/Libraries/LibWeb/SVG/SVGAnimatedString.h b/Libraries/LibWeb/SVG/SVGAnimatedString.h index eb365f7faea..31a453f8f95 100644 --- a/Libraries/LibWeb/SVG/SVGAnimatedString.h +++ b/Libraries/LibWeb/SVG/SVGAnimatedString.h @@ -8,11 +8,12 @@ #include #include +#include namespace Web::SVG { // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedString -class SVGAnimatedString final : public Bindings::PlatformObject { +class WEB_API SVGAnimatedString final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(SVGAnimatedString, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(SVGAnimatedString); diff --git a/Libraries/LibWeb/SVG/SVGElement.h b/Libraries/LibWeb/SVG/SVGElement.h index 54e98980894..781e70f583f 100644 --- a/Libraries/LibWeb/SVG/SVGElement.h +++ b/Libraries/LibWeb/SVG/SVGElement.h @@ -8,12 +8,13 @@ #include #include +#include #include #include namespace Web::SVG { -class SVGElement +class WEB_API SVGElement : public DOM::Element , public HTML::GlobalEventHandlers , public HTML::HTMLOrSVGElement { diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.h b/Libraries/LibWeb/SVG/SVGGraphicsElement.h index 6a8d4580b93..1a4d8904415 100644 --- a/Libraries/LibWeb/SVG/SVGGraphicsElement.h +++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,7 @@ struct SVGBoundingBoxOptions { bool clipped { false }; }; -class SVGGraphicsElement : public SVGElement { +class WEB_API SVGGraphicsElement : public SVGElement { WEB_PLATFORM_OBJECT(SVGGraphicsElement, SVGElement); public: diff --git a/Libraries/LibWeb/SecureContexts/AbstractOperations.h b/Libraries/LibWeb/SecureContexts/AbstractOperations.h index d5360b980c3..08ed7c208e9 100644 --- a/Libraries/LibWeb/SecureContexts/AbstractOperations.h +++ b/Libraries/LibWeb/SecureContexts/AbstractOperations.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::SecureContexts { @@ -18,6 +19,6 @@ enum class Trustworthiness { }; [[nodiscard]] Trustworthiness is_origin_potentially_trustworthy(URL::Origin const&); -[[nodiscard]] Trustworthiness is_url_potentially_trustworthy(URL::URL const&); +[[nodiscard]] WEB_API Trustworthiness is_url_potentially_trustworthy(URL::URL const&); } diff --git a/Libraries/LibWeb/Selection/Selection.h b/Libraries/LibWeb/Selection/Selection.h index 44457fff72f..0b947061962 100644 --- a/Libraries/LibWeb/Selection/Selection.h +++ b/Libraries/LibWeb/Selection/Selection.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include namespace Web::Selection { -class Selection final : public Bindings::PlatformObject { +class WEB_API Selection final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(Selection, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(Selection); diff --git a/Libraries/LibWeb/Streams/AbstractOperations.h b/Libraries/LibWeb/Streams/AbstractOperations.h index 7f17ee8c04d..f6be2fa492f 100644 --- a/Libraries/LibWeb/Streams/AbstractOperations.h +++ b/Libraries/LibWeb/Streams/AbstractOperations.h @@ -11,6 +11,7 @@ #pragma once #include +#include #include #include #include @@ -18,23 +19,23 @@ namespace Web::Streams { // 7.4. Abstract operations, https://streams.spec.whatwg.org/#qs-abstract-ops -WebIDL::ExceptionOr extract_high_water_mark(QueuingStrategy const&, double default_hwm); -GC::Ref extract_size_algorithm(JS::VM&, QueuingStrategy const&); +WEB_API WebIDL::ExceptionOr extract_high_water_mark(QueuingStrategy const&, double default_hwm); +WEB_API GC::Ref extract_size_algorithm(JS::VM&, QueuingStrategy const&); // 8.2. Transferable streams, https://streams.spec.whatwg.org/#transferrable-streams void cross_realm_transform_send_error(JS::Realm&, HTML::MessagePort&, JS::Value error); WebIDL::ExceptionOr pack_and_post_message(JS::Realm&, HTML::MessagePort&, StringView type, JS::Value value); WebIDL::ExceptionOr pack_and_post_message_handling_error(JS::Realm&, HTML::MessagePort&, StringView type, JS::Value value); -void set_up_cross_realm_transform_readable(JS::Realm&, ReadableStream&, HTML::MessagePort&); -void set_up_cross_realm_transform_writable(JS::Realm&, WritableStream&, HTML::MessagePort&); +WEB_API void set_up_cross_realm_transform_readable(JS::Realm&, ReadableStream&, HTML::MessagePort&); +WEB_API void set_up_cross_realm_transform_writable(JS::Realm&, WritableStream&, HTML::MessagePort&); // 8.3. Miscellaneous, https://streams.spec.whatwg.org/#misc-abstract-ops -bool can_transfer_array_buffer(JS::ArrayBuffer const& array_buffer); -bool is_non_negative_number(JS::Value); -WebIDL::ExceptionOr> transfer_array_buffer(JS::Realm& realm, JS::ArrayBuffer& buffer); -WebIDL::ExceptionOr clone_as_uint8_array(JS::Realm&, WebIDL::ArrayBufferView&); -WebIDL::ExceptionOr structured_clone(JS::Realm&, JS::Value value); -bool can_copy_data_block_bytes_buffer(JS::ArrayBuffer const& to_buffer, u64 to_index, JS::ArrayBuffer const& from_buffer, u64 from_index, u64 count); +WEB_API bool can_transfer_array_buffer(JS::ArrayBuffer const& array_buffer); +WEB_API bool is_non_negative_number(JS::Value); +WEB_API WebIDL::ExceptionOr> transfer_array_buffer(JS::Realm& realm, JS::ArrayBuffer& buffer); +WEB_API WebIDL::ExceptionOr clone_as_uint8_array(JS::Realm&, WebIDL::ArrayBufferView&); +WEB_API WebIDL::ExceptionOr structured_clone(JS::Realm&, JS::Value value); +WEB_API bool can_copy_data_block_bytes_buffer(JS::ArrayBuffer const& to_buffer, u64 to_index, JS::ArrayBuffer const& from_buffer, u64 from_index, u64 count); // 8.1. Queue-with-sizes, https://streams.spec.whatwg.org/#queue-with-sizes diff --git a/Libraries/LibWeb/Streams/Transformer.h b/Libraries/LibWeb/Streams/Transformer.h index 565abb9631a..050956ffd3c 100644 --- a/Libraries/LibWeb/Streams/Transformer.h +++ b/Libraries/LibWeb/Streams/Transformer.h @@ -8,12 +8,13 @@ #include #include +#include #include namespace Web::Streams { // https://streams.spec.whatwg.org/#dictdef-transformer -struct Transformer { +struct WEB_API Transformer { // https://streams.spec.whatwg.org/#dom-transformer-start GC::Root start; // https://streams.spec.whatwg.org/#dom-transformer-transform diff --git a/Libraries/LibWeb/Streams/UnderlyingSink.h b/Libraries/LibWeb/Streams/UnderlyingSink.h index 90e20bddbab..b1411252bd3 100644 --- a/Libraries/LibWeb/Streams/UnderlyingSink.h +++ b/Libraries/LibWeb/Streams/UnderlyingSink.h @@ -8,12 +8,13 @@ #include #include +#include #include namespace Web::Streams { // https://streams.spec.whatwg.org/#dictdef-underlyingsink -struct UnderlyingSink { +struct WEB_API UnderlyingSink { GC::Root start; GC::Root write; GC::Root close; diff --git a/Libraries/LibWeb/Streams/UnderlyingSource.h b/Libraries/LibWeb/Streams/UnderlyingSource.h index 36d7af54974..f316c8d87f9 100644 --- a/Libraries/LibWeb/Streams/UnderlyingSource.h +++ b/Libraries/LibWeb/Streams/UnderlyingSource.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -18,7 +19,7 @@ enum class ReadableStreamType { Bytes }; -struct UnderlyingSource { +struct WEB_API UnderlyingSource { GC::Root start; GC::Root pull; GC::Root cancel; diff --git a/Libraries/LibWeb/TreeNode.h b/Libraries/LibWeb/TreeNode.h index 91d5e3b7795..78286ef7bbc 100644 --- a/Libraries/LibWeb/TreeNode.h +++ b/Libraries/LibWeb/TreeNode.h @@ -47,7 +47,7 @@ TraversalDecision traverse_preorder(T root, Callback callback) } template -class TreeNode { +class WEB_API TreeNode { public: T* parent() { return m_parent; } T const* parent() const { return m_parent; } diff --git a/Libraries/LibWeb/UIEvents/EventNames.h b/Libraries/LibWeb/UIEvents/EventNames.h index 14fdc4d4e8c..f91f9e9ce49 100644 --- a/Libraries/LibWeb/UIEvents/EventNames.h +++ b/Libraries/LibWeb/UIEvents/EventNames.h @@ -9,6 +9,7 @@ #pragma once #include +#include namespace Web::UIEvents::EventNames { @@ -43,7 +44,7 @@ namespace Web::UIEvents::EventNames { __ENUMERATE_UI_EVENT(resize) \ __ENUMERATE_UI_EVENT(wheel) -#define __ENUMERATE_UI_EVENT(name) extern FlyString name; +#define __ENUMERATE_UI_EVENT(name) extern WEB_API FlyString name; ENUMERATE_UI_EVENTS #undef __ENUMERATE_UI_EVENT diff --git a/Libraries/LibWeb/UIEvents/MouseEvent.h b/Libraries/LibWeb/UIEvents/MouseEvent.h index f12bd0e0de7..f7f5a4cf53b 100644 --- a/Libraries/LibWeb/UIEvents/MouseEvent.h +++ b/Libraries/LibWeb/UIEvents/MouseEvent.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include @@ -25,7 +26,7 @@ struct MouseEventInit : public EventModifierInit { GC::Ptr related_target = nullptr; }; -class MouseEvent : public UIEvent { +class WEB_API MouseEvent : public UIEvent { WEB_PLATFORM_OBJECT(MouseEvent, UIEvent); GC_DECLARE_ALLOCATOR(MouseEvent); diff --git a/Libraries/LibWeb/UIEvents/UIEvent.h b/Libraries/LibWeb/UIEvents/UIEvent.h index 27446532988..42ac73138c2 100644 --- a/Libraries/LibWeb/UIEvents/UIEvent.h +++ b/Libraries/LibWeb/UIEvents/UIEvent.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::UIEvents { @@ -17,7 +18,7 @@ struct UIEventInit : public DOM::EventInit { int detail { 0 }; }; -class UIEvent : public DOM::Event { +class WEB_API UIEvent : public DOM::Event { WEB_PLATFORM_OBJECT(UIEvent, DOM::Event); GC_DECLARE_ALLOCATOR(UIEvent); diff --git a/Libraries/LibWeb/WebAssembly/WebAssembly.h b/Libraries/LibWeb/WebAssembly/WebAssembly.h index 6f89ef52769..453dab6fc42 100644 --- a/Libraries/LibWeb/WebAssembly/WebAssembly.h +++ b/Libraries/LibWeb/WebAssembly/WebAssembly.h @@ -15,21 +15,22 @@ #include #include #include +#include #include namespace Web::WebAssembly { -void visit_edges(JS::Object&, JS::Cell::Visitor&); -void finalize(JS::Object&); -void initialize(JS::Object&, JS::Realm&); +WEB_API void visit_edges(JS::Object&, JS::Cell::Visitor&); +WEB_API void finalize(JS::Object&); +WEB_API void initialize(JS::Object&, JS::Realm&); -bool validate(JS::VM&, GC::Root& bytes); -WebIDL::ExceptionOr> compile(JS::VM&, GC::Root& bytes); -WebIDL::ExceptionOr> compile_streaming(JS::VM&, GC::Root source); +WEB_API bool validate(JS::VM&, GC::Root& bytes); +WEB_API WebIDL::ExceptionOr> compile(JS::VM&, GC::Root& bytes); +WEB_API WebIDL::ExceptionOr> compile_streaming(JS::VM&, GC::Root source); -WebIDL::ExceptionOr> instantiate(JS::VM&, GC::Root& bytes, Optional>& import_object); -WebIDL::ExceptionOr> instantiate(JS::VM&, Module const& module_object, Optional>& import_object); -WebIDL::ExceptionOr> instantiate_streaming(JS::VM&, GC::Root source, Optional>& import_object); +WEB_API WebIDL::ExceptionOr> instantiate(JS::VM&, GC::Root& bytes, Optional>& import_object); +WEB_API WebIDL::ExceptionOr> instantiate(JS::VM&, Module const& module_object, Optional>& import_object); +WEB_API WebIDL::ExceptionOr> instantiate_streaming(JS::VM&, GC::Root source, Optional>& import_object); namespace Detail { @@ -122,7 +123,7 @@ extern HashMap, WebAssemblyCache> s_caches; // our implementation uses this fact in places, but for the purposes of wasm returning // *some* kind of error, named e.g. 'WebAssembly.RuntimeError', this is sufficient. #define DECLARE_WASM_NATIVE_ERROR(ClassName, FullClassName, snake_name, PrototypeName, ConstructorName) \ - class ClassName final : public JS::Error { \ + class WEB_API ClassName final : public JS::Error { \ JS_OBJECT(ClassName, Error); \ GC_DECLARE_ALLOCATOR(ClassName); \ \ diff --git a/Libraries/LibWeb/WebDriver/Actions.h b/Libraries/LibWeb/WebDriver/Actions.h index 881ba41f499..d9ea6468ceb 100644 --- a/Libraries/LibWeb/WebDriver/Actions.h +++ b/Libraries/LibWeb/WebDriver/Actions.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -23,7 +24,7 @@ namespace Web::WebDriver { // https://w3c.github.io/webdriver/#dfn-action-object -struct ActionObject { +struct WEB_API ActionObject { enum class Subtype { Pause, KeyUp, @@ -126,12 +127,12 @@ struct ActionsOptions { using OnActionsComplete = GC::Ref>; -ErrorOr>, WebDriver::Error> extract_an_action_sequence(InputState&, JsonValue const&, ActionsOptions const&); +WEB_API ErrorOr>, WebDriver::Error> extract_an_action_sequence(InputState&, JsonValue const&, ActionsOptions const&); -void wait_for_an_action_queue_token(InputState&); -GC::Ref dispatch_actions(InputState&, Vector>, HTML::BrowsingContext&, ActionsOptions, OnActionsComplete); +WEB_API void wait_for_an_action_queue_token(InputState&); +WEB_API GC::Ref dispatch_actions(InputState&, Vector>, HTML::BrowsingContext&, ActionsOptions, OnActionsComplete); ErrorOr dispatch_tick_actions(InputState&, ReadonlySpan, AK::Duration, HTML::BrowsingContext&, ActionsOptions const&); -GC::Ref dispatch_list_of_actions(InputState&, Vector, HTML::BrowsingContext&, ActionsOptions, OnActionsComplete); -GC::Ref dispatch_actions_for_a_string(Web::WebDriver::InputState&, String const& input_id, Web::WebDriver::InputSource&, StringView text, Web::HTML::BrowsingContext&, Web::WebDriver::OnActionsComplete); +WEB_API GC::Ref dispatch_list_of_actions(InputState&, Vector, HTML::BrowsingContext&, ActionsOptions, OnActionsComplete); +WEB_API GC::Ref dispatch_actions_for_a_string(Web::WebDriver::InputState&, String const& input_id, Web::WebDriver::InputSource&, StringView text, Web::HTML::BrowsingContext&, Web::WebDriver::OnActionsComplete); } diff --git a/Libraries/LibWeb/WebDriver/Capabilities.h b/Libraries/LibWeb/WebDriver/Capabilities.h index e8e4b5d8f5b..cd73aaee516 100644 --- a/Libraries/LibWeb/WebDriver/Capabilities.h +++ b/Libraries/LibWeb/WebDriver/Capabilities.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Web::WebDriver { @@ -41,14 +42,14 @@ enum class InterfaceMode { Graphical, Headless, }; -void set_default_interface_mode(InterfaceMode); +WEB_API void set_default_interface_mode(InterfaceMode); -struct LadybirdOptions { +struct WEB_API LadybirdOptions { explicit LadybirdOptions(JsonObject const& capabilities); bool headless { false }; }; -Response process_capabilities(JsonValue const& parameters, SessionFlags flags); +WEB_API Response process_capabilities(JsonValue const& parameters, SessionFlags flags); } diff --git a/Libraries/LibWeb/WebDriver/Client.h b/Libraries/LibWeb/WebDriver/Client.h index 0c5015f2ee8..b34ea19d741 100644 --- a/Libraries/LibWeb/WebDriver/Client.h +++ b/Libraries/LibWeb/WebDriver/Client.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -24,7 +25,7 @@ namespace Web::WebDriver { using Parameters = Vector; -class Client : public Core::EventReceiver { +class WEB_API Client : public Core::EventReceiver { C_OBJECT_ABSTRACT(Client); public: diff --git a/Libraries/LibWeb/WebDriver/Contexts.h b/Libraries/LibWeb/WebDriver/Contexts.h index e18416659f6..6de5c71e000 100644 --- a/Libraries/LibWeb/WebDriver/Contexts.h +++ b/Libraries/LibWeb/WebDriver/Contexts.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,6 @@ ErrorOr, WebDriver::Error> deserialize_web_frame(JS:: bool represents_a_web_window(JS::Value); ErrorOr, WebDriver::Error> deserialize_web_window(JS::Object const&); -ErrorOr ensure_browsing_context_is_open(GC::Ptr); +WEB_API ErrorOr ensure_browsing_context_is_open(GC::Ptr); } diff --git a/Libraries/LibWeb/WebDriver/ElementLocationStrategies.h b/Libraries/LibWeb/WebDriver/ElementLocationStrategies.h index 8b086724b35..28187eadd54 100644 --- a/Libraries/LibWeb/WebDriver/ElementLocationStrategies.h +++ b/Libraries/LibWeb/WebDriver/ElementLocationStrategies.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -23,7 +24,7 @@ enum class LocationStrategy { XPath, }; -Optional location_strategy_from_string(StringView type); -ErrorOr, Error> invoke_location_strategy(LocationStrategy type, DOM::ParentNode& start_node, StringView selector); +WEB_API Optional location_strategy_from_string(StringView type); +WEB_API ErrorOr, Error> invoke_location_strategy(LocationStrategy type, DOM::ParentNode& start_node, StringView selector); } diff --git a/Libraries/LibWeb/WebDriver/ElementReference.h b/Libraries/LibWeb/WebDriver/ElementReference.h index 25bf4023439..b0b967fc085 100644 --- a/Libraries/LibWeb/WebDriver/ElementReference.h +++ b/Libraries/LibWeb/WebDriver/ElementReference.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -22,40 +23,40 @@ GC::Ptr get_node(HTML::BrowsingContext const&, StringView refere String get_or_create_a_node_reference(HTML::BrowsingContext const&, Web::DOM::Node const&); bool node_reference_is_known(HTML::BrowsingContext const&, StringView reference); -String get_or_create_a_web_element_reference(HTML::BrowsingContext const&, Web::DOM::Node const& element); -JsonObject web_element_reference_object(HTML::BrowsingContext const&, Web::DOM::Node const& element); -bool represents_a_web_element(JsonValue const&); -bool represents_a_web_element(JS::Value); +WEB_API String get_or_create_a_web_element_reference(HTML::BrowsingContext const&, Web::DOM::Node const& element); +WEB_API JsonObject web_element_reference_object(HTML::BrowsingContext const&, Web::DOM::Node const& element); +WEB_API bool represents_a_web_element(JsonValue const&); +WEB_API bool represents_a_web_element(JS::Value); ErrorOr, WebDriver::Error> deserialize_web_element(Web::HTML::BrowsingContext const&, JsonObject const&); ErrorOr, WebDriver::Error> deserialize_web_element(Web::HTML::BrowsingContext const&, JS::Object const&); -String extract_web_element_reference(JsonObject const&); -ErrorOr, Web::WebDriver::Error> get_web_element_origin(Web::HTML::BrowsingContext const&, StringView origin); -ErrorOr, Web::WebDriver::Error> get_known_element(Web::HTML::BrowsingContext const&, StringView reference); +WEB_API String extract_web_element_reference(JsonObject const&); +WEB_API ErrorOr, Web::WebDriver::Error> get_web_element_origin(Web::HTML::BrowsingContext const&, StringView origin); +WEB_API ErrorOr, Web::WebDriver::Error> get_known_element(Web::HTML::BrowsingContext const&, StringView reference); bool is_element_stale(Web::DOM::Node const& element); -bool is_element_interactable(Web::HTML::BrowsingContext const&, Web::DOM::Element const&); +WEB_API bool is_element_interactable(Web::HTML::BrowsingContext const&, Web::DOM::Element const&); bool is_element_pointer_interactable(Web::HTML::BrowsingContext const&, Web::DOM::Element const&); -bool is_element_keyboard_interactable(Web::DOM::Element const&); +WEB_API bool is_element_keyboard_interactable(Web::DOM::Element const&); -bool is_element_editable(Web::DOM::Element const&); -bool is_element_mutable(Web::DOM::Element const&); -bool is_element_mutable_form_control(Web::DOM::Element const&); -bool is_element_non_typeable_form_control(Web::DOM::Element const&); +WEB_API bool is_element_editable(Web::DOM::Element const&); +WEB_API bool is_element_mutable(Web::DOM::Element const&); +WEB_API bool is_element_mutable_form_control(Web::DOM::Element const&); +WEB_API bool is_element_non_typeable_form_control(Web::DOM::Element const&); -bool is_element_in_view(ReadonlySpan> paint_tree, Web::DOM::Element&); -bool is_element_obscured(ReadonlySpan> paint_tree, Web::DOM::Element&); -GC::RootVector> pointer_interactable_tree(Web::HTML::BrowsingContext&, Web::DOM::Element&); +WEB_API bool is_element_in_view(ReadonlySpan> paint_tree, Web::DOM::Element&); +WEB_API bool is_element_obscured(ReadonlySpan> paint_tree, Web::DOM::Element&); +WEB_API GC::RootVector> pointer_interactable_tree(Web::HTML::BrowsingContext&, Web::DOM::Element&); String get_or_create_a_shadow_root_reference(HTML::BrowsingContext const&, Web::DOM::ShadowRoot const&); -JsonObject shadow_root_reference_object(HTML::BrowsingContext const&, Web::DOM::ShadowRoot const&); +WEB_API JsonObject shadow_root_reference_object(HTML::BrowsingContext const&, Web::DOM::ShadowRoot const&); bool represents_a_shadow_root(JsonValue const&); bool represents_a_shadow_root(JS::Value); ErrorOr, WebDriver::Error> deserialize_shadow_root(Web::HTML::BrowsingContext const&, JsonObject const&); ErrorOr, WebDriver::Error> deserialize_shadow_root(Web::HTML::BrowsingContext const&, JS::Object const&); -ErrorOr, Web::WebDriver::Error> get_known_shadow_root(HTML::BrowsingContext const&, StringView reference); +WEB_API ErrorOr, Web::WebDriver::Error> get_known_shadow_root(HTML::BrowsingContext const&, StringView reference); bool is_shadow_root_detached(Web::DOM::ShadowRoot const&); -String element_rendered_text(DOM::Node&); +WEB_API String element_rendered_text(DOM::Node&); CSSPixelPoint in_view_center_point(DOM::Element const& element, CSSPixelRect viewport); diff --git a/Libraries/LibWeb/WebDriver/Error.h b/Libraries/LibWeb/WebDriver/Error.h index ed8c3720008..44782440a33 100644 --- a/Libraries/LibWeb/WebDriver/Error.h +++ b/Libraries/LibWeb/WebDriver/Error.h @@ -9,6 +9,7 @@ #include #include +#include namespace Web::WebDriver { @@ -48,7 +49,7 @@ enum class ErrorCode { }; // https://w3c.github.io/webdriver/#errors -struct Error { +struct WEB_API Error { unsigned http_status; String error; String message; diff --git a/Libraries/LibWeb/WebDriver/ExecuteScript.h b/Libraries/LibWeb/WebDriver/ExecuteScript.h index 94c60ba1445..edb78b76df9 100644 --- a/Libraries/LibWeb/WebDriver/ExecuteScript.h +++ b/Libraries/LibWeb/WebDriver/ExecuteScript.h @@ -13,6 +13,7 @@ #include #include #include +#include #include namespace Web::WebDriver { @@ -24,7 +25,7 @@ struct ExecutionResult { using OnScriptComplete = GC::Function; -void execute_script(HTML::BrowsingContext const&, String body, GC::RootVector arguments, Optional const& timeout_ms, GC::Ref on_complete); -void execute_async_script(HTML::BrowsingContext const&, String body, GC::RootVector arguments, Optional const& timeout_ms, GC::Ref on_complete); +WEB_API void execute_script(HTML::BrowsingContext const&, String body, GC::RootVector arguments, Optional const& timeout_ms, GC::Ref on_complete); +WEB_API void execute_async_script(HTML::BrowsingContext const&, String body, GC::RootVector arguments, Optional const& timeout_ms, GC::Ref on_complete); } diff --git a/Libraries/LibWeb/WebDriver/HeapTimer.h b/Libraries/LibWeb/WebDriver/HeapTimer.h index 30838b41901..711be4cbb37 100644 --- a/Libraries/LibWeb/WebDriver/HeapTimer.h +++ b/Libraries/LibWeb/WebDriver/HeapTimer.h @@ -10,10 +10,11 @@ #include #include #include +#include namespace Web::WebDriver { -class HeapTimer : public JS::Cell { +class WEB_API HeapTimer : public JS::Cell { GC_CELL(HeapTimer, JS::Cell); GC_DECLARE_ALLOCATOR(HeapTimer); diff --git a/Libraries/LibWeb/WebDriver/InputSource.h b/Libraries/LibWeb/WebDriver/InputSource.h index 97a7df8d94e..699ececd24e 100644 --- a/Libraries/LibWeb/WebDriver/InputSource.h +++ b/Libraries/LibWeb/WebDriver/InputSource.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -76,9 +77,9 @@ struct GlobalKeyState { Optional input_source_type_from_string(StringView); Optional pointer_input_source_subtype_from_string(StringView); -InputSource create_input_source(InputState const&, InputSourceType, Optional); -void add_input_source(InputState&, String id, InputSource); -void remove_input_source(InputState&, StringView id); +WEB_API InputSource create_input_source(InputState const&, InputSourceType, Optional); +WEB_API void add_input_source(InputState&, String id, InputSource); +WEB_API void remove_input_source(InputState&, StringView id); Optional get_input_source(InputState&, StringView id); ErrorOr get_or_create_input_source(InputState&, InputSourceType, StringView id, Optional); diff --git a/Libraries/LibWeb/WebDriver/InputState.h b/Libraries/LibWeb/WebDriver/InputState.h index 1e5d1f1e980..a40834bd838 100644 --- a/Libraries/LibWeb/WebDriver/InputState.h +++ b/Libraries/LibWeb/WebDriver/InputState.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -29,7 +30,7 @@ struct InputState { Vector actions_queue; }; -InputState& get_input_state(HTML::BrowsingContext&); -void reset_input_state(HTML::BrowsingContext&); +WEB_API InputState& get_input_state(HTML::BrowsingContext&); +WEB_API void reset_input_state(HTML::BrowsingContext&); } diff --git a/Libraries/LibWeb/WebDriver/JSON.h b/Libraries/LibWeb/WebDriver/JSON.h index 5cf354c2611..70c5c856526 100644 --- a/Libraries/LibWeb/WebDriver/JSON.h +++ b/Libraries/LibWeb/WebDriver/JSON.h @@ -8,12 +8,13 @@ #pragma once #include +#include #include #include namespace Web::WebDriver { -Response json_clone(HTML::BrowsingContext const&, JS::Value); -ErrorOr json_deserialize(HTML::BrowsingContext const&, JsonValue const&); +WEB_API Response json_clone(HTML::BrowsingContext const&, JS::Value); +WEB_API ErrorOr json_deserialize(HTML::BrowsingContext const&, JsonValue const&); } diff --git a/Libraries/LibWeb/WebDriver/Proxy.h b/Libraries/LibWeb/WebDriver/Proxy.h index dc2e53171b9..114c0492861 100644 --- a/Libraries/LibWeb/WebDriver/Proxy.h +++ b/Libraries/LibWeb/WebDriver/Proxy.h @@ -7,13 +7,14 @@ #pragma once #include +#include #include namespace Web::WebDriver { bool has_proxy_configuration(); void set_has_proxy_configuration(bool); -void reset_has_proxy_configuration(); +WEB_API void reset_has_proxy_configuration(); ErrorOr deserialize_as_a_proxy(JsonValue const&); diff --git a/Libraries/LibWeb/WebDriver/Response.h b/Libraries/LibWeb/WebDriver/Response.h index 17d6f780e7c..3703c4272ca 100644 --- a/Libraries/LibWeb/WebDriver/Response.h +++ b/Libraries/LibWeb/WebDriver/Response.h @@ -9,13 +9,14 @@ #include #include #include +#include #include namespace Web::WebDriver { // FIXME: Ideally, this could be `using Response = ErrorOr`, but that won't be // default-constructible, which is a requirement for the generated IPC. -struct [[nodiscard]] Response { +struct [[nodiscard]] WEB_API Response { Response() = default; Response(JsonValue&&); Response(Error&&); @@ -47,9 +48,9 @@ private: namespace IPC { template<> -ErrorOr encode(Encoder&, Web::WebDriver::Response const&); +WEB_API ErrorOr encode(Encoder&, Web::WebDriver::Response const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/WebDriver/Screenshot.h b/Libraries/LibWeb/WebDriver/Screenshot.h index 7c164ffa296..bcd3b81b793 100644 --- a/Libraries/LibWeb/WebDriver/Screenshot.h +++ b/Libraries/LibWeb/WebDriver/Screenshot.h @@ -8,12 +8,13 @@ #include #include +#include #include #include namespace Web::WebDriver { -ErrorOr, WebDriver::Error> draw_bounding_box_from_the_framebuffer(HTML::BrowsingContext&, DOM::Element&, Gfx::IntRect); -Response encode_canvas_element(HTML::HTMLCanvasElement&); +WEB_API ErrorOr, WebDriver::Error> draw_bounding_box_from_the_framebuffer(HTML::BrowsingContext&, DOM::Element&, Gfx::IntRect); +WEB_API Response encode_canvas_element(HTML::HTMLCanvasElement&); } diff --git a/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.h b/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.h index 178d82fab23..a3df455fada 100644 --- a/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.h +++ b/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::WebDriver { @@ -19,8 +20,8 @@ struct TimeoutsConfiguration { Optional implicit_wait_timeout { 0 }; }; -JsonObject timeouts_object(TimeoutsConfiguration const&); +WEB_API JsonObject timeouts_object(TimeoutsConfiguration const&); ErrorOr json_deserialize_as_a_timeouts_configuration(JsonValue const&); -ErrorOr json_deserialize_as_a_timeouts_configuration_into(JsonValue const&, TimeoutsConfiguration&); +WEB_API ErrorOr json_deserialize_as_a_timeouts_configuration_into(JsonValue const&, TimeoutsConfiguration&); } diff --git a/Libraries/LibWeb/WebDriver/UserPrompt.h b/Libraries/LibWeb/WebDriver/UserPrompt.h index 89fcc18d371..3b17ee376e2 100644 --- a/Libraries/LibWeb/WebDriver/UserPrompt.h +++ b/Libraries/LibWeb/WebDriver/UserPrompt.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace Web::WebDriver { @@ -52,22 +53,22 @@ struct PromptHandlerConfiguration { // https://w3c.github.io/webdriver/#dfn-user-prompt-handler using UserPromptHandler = Optional>; -UserPromptHandler const& user_prompt_handler(); -void set_user_prompt_handler(UserPromptHandler); +WEB_API UserPromptHandler const& user_prompt_handler(); +WEB_API void set_user_prompt_handler(UserPromptHandler); Response deserialize_as_an_unhandled_prompt_behavior(JsonValue); bool check_user_prompt_handler_matches(JsonObject const&); -void update_the_user_prompt_handler(JsonObject const&); -JsonValue serialize_the_user_prompt_handler(); +WEB_API void update_the_user_prompt_handler(JsonObject const&); +WEB_API JsonValue serialize_the_user_prompt_handler(); } namespace IPC { template<> -ErrorOr encode(Encoder&, Web::WebDriver::PromptHandlerConfiguration const&); +WEB_API ErrorOr encode(Encoder&, Web::WebDriver::PromptHandlerConfiguration const&); template<> -ErrorOr decode(Decoder&); +WEB_API ErrorOr decode(Decoder&); } diff --git a/Libraries/LibWeb/WebGL/OpenGLContext.h b/Libraries/LibWeb/WebGL/OpenGLContext.h index 7a7ac5a4d5e..67fddf53113 100644 --- a/Libraries/LibWeb/WebGL/OpenGLContext.h +++ b/Libraries/LibWeb/WebGL/OpenGLContext.h @@ -8,10 +8,11 @@ #include #include +#include namespace Web::WebGL { -class OpenGLContext { +class WEB_API OpenGLContext { public: enum class WebGLVersion { WebGL1, diff --git a/Libraries/LibWeb/WebGL/WebGLObject.h b/Libraries/LibWeb/WebGL/WebGLObject.h index 9ae822d313a..8580ec8a175 100644 --- a/Libraries/LibWeb/WebGL/WebGLObject.h +++ b/Libraries/LibWeb/WebGL/WebGLObject.h @@ -9,12 +9,13 @@ #pragma once #include +#include #include #include namespace Web::WebGL { -class WebGLObject : public Bindings::PlatformObject { +class WEB_API WebGLObject : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(WebGLObject, Bindings::PlatformObject); public: diff --git a/Libraries/LibWeb/WebIDL/AbstractOperations.cpp b/Libraries/LibWeb/WebIDL/AbstractOperations.cpp index cad409def2e..5d43f3f2409 100644 --- a/Libraries/LibWeb/WebIDL/AbstractOperations.cpp +++ b/Libraries/LibWeb/WebIDL/AbstractOperations.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -538,14 +539,14 @@ JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value value, EnforceRang return x; } -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); -template JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); +template WEB_API JS::ThrowCompletionOr convert_to_int(JS::VM& vm, JS::Value, EnforceRange, Clamp); // AD-HOC: For same-object caching purposes, this can be used to compare a cached JS array of DOM::Elements with another // list. Either list can be null, in which case they are considered the same only if they are both null. diff --git a/Libraries/LibWeb/WebIDL/AbstractOperations.h b/Libraries/LibWeb/WebIDL/AbstractOperations.h index c1860ca5153..811f4e5146c 100644 --- a/Libraries/LibWeb/WebIDL/AbstractOperations.h +++ b/Libraries/LibWeb/WebIDL/AbstractOperations.h @@ -12,19 +12,20 @@ #include #include #include +#include #include namespace Web::WebIDL { bool is_buffer_source_type(JS::Value); GC::Ptr underlying_buffer_source(JS::Object& buffer_source); -ErrorOr get_buffer_source_copy(JS::Object const& buffer_source); +WEB_API ErrorOr get_buffer_source_copy(JS::Object const& buffer_source); JS::Completion call_user_object_operation(CallbackType& callback, Utf16FlyString const& operation_name, Optional this_argument, ReadonlySpan args); -JS::ThrowCompletionOr to_string(JS::VM&, JS::Value); -JS::ThrowCompletionOr to_utf16_string(JS::VM&, JS::Value); -JS::ThrowCompletionOr to_usv_string(JS::VM&, JS::Value); +WEB_API JS::ThrowCompletionOr to_string(JS::VM&, JS::Value); +WEB_API JS::ThrowCompletionOr to_utf16_string(JS::VM&, JS::Value); +WEB_API JS::ThrowCompletionOr to_usv_string(JS::VM&, JS::Value); JS::ThrowCompletionOr to_utf16_usv_string(JS::VM&, JS::Value); JS::ThrowCompletionOr to_byte_string(JS::VM&, JS::Value); @@ -33,10 +34,10 @@ enum class ExceptionBehavior { Report, Rethrow, }; -JS::Completion invoke_callback(CallbackType& callback, Optional this_argument, ExceptionBehavior exception_behavior, ReadonlySpan args); -JS::Completion invoke_callback(CallbackType& callback, Optional this_argument, ReadonlySpan args); +WEB_API JS::Completion invoke_callback(CallbackType& callback, Optional this_argument, ExceptionBehavior exception_behavior, ReadonlySpan args); +WEB_API JS::Completion invoke_callback(CallbackType& callback, Optional this_argument, ReadonlySpan args); -GC::Ref invoke_promise_callback(CallbackType& callback, Optional this_argument, ReadonlySpan args); +WEB_API GC::Ref invoke_promise_callback(CallbackType& callback, Optional this_argument, ReadonlySpan args); JS::Completion construct(CallbackType& callable, ReadonlySpan args); diff --git a/Libraries/LibWeb/WebIDL/AsyncIterator.h b/Libraries/LibWeb/WebIDL/AsyncIterator.h index ff966bdf0c1..d7bf4ce44fb 100644 --- a/Libraries/LibWeb/WebIDL/AsyncIterator.h +++ b/Libraries/LibWeb/WebIDL/AsyncIterator.h @@ -11,11 +11,12 @@ #include #include #include +#include #include namespace Web::WebIDL { -class AsyncIterator : public Bindings::PlatformObject { +class WEB_API AsyncIterator : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(AsyncIterator, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(AsyncIterator); diff --git a/Libraries/LibWeb/WebIDL/DOMException.h b/Libraries/LibWeb/WebIDL/DOMException.h index bb022db1626..cd6a74ec9e9 100644 --- a/Libraries/LibWeb/WebIDL/DOMException.h +++ b/Libraries/LibWeb/WebIDL/DOMException.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -91,7 +92,7 @@ static u16 get_legacy_code_for_name(FlyString const& name) } // https://webidl.spec.whatwg.org/#idl-DOMException -class DOMException final +class WEB_API DOMException final : public Bindings::PlatformObject , public Bindings::Serializable { WEB_PLATFORM_OBJECT(DOMException, Bindings::PlatformObject); diff --git a/Libraries/LibWeb/WebIDL/ObservableArray.h b/Libraries/LibWeb/WebIDL/ObservableArray.h index 6cea86495e3..224937addf2 100644 --- a/Libraries/LibWeb/WebIDL/ObservableArray.h +++ b/Libraries/LibWeb/WebIDL/ObservableArray.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include namespace Web::WebIDL { // https://webidl.spec.whatwg.org/#idl-observable-array -class ObservableArray final : public JS::Array { +class WEB_API ObservableArray final : public JS::Array { JS_OBJECT(ObservableArray, JS::Array); GC_DECLARE_ALLOCATOR(ObservableArray); diff --git a/Libraries/LibWeb/WebIDL/OverloadResolution.h b/Libraries/LibWeb/WebIDL/OverloadResolution.h index 14cf87383de..50a7d843e6e 100644 --- a/Libraries/LibWeb/WebIDL/OverloadResolution.h +++ b/Libraries/LibWeb/WebIDL/OverloadResolution.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace Web::WebIDL { @@ -24,6 +25,6 @@ struct ResolvedOverload { }; // https://webidl.spec.whatwg.org/#es-overloads -JS::ThrowCompletionOr resolve_overload(JS::VM&, IDL::EffectiveOverloadSet&, ReadonlySpan interface_dictionaries); +WEB_API JS::ThrowCompletionOr resolve_overload(JS::VM&, IDL::EffectiveOverloadSet&, ReadonlySpan interface_dictionaries); } diff --git a/Libraries/LibWeb/WebIDL/Promise.h b/Libraries/LibWeb/WebIDL/Promise.h index 6fdfbb49799..c85f1fddd64 100644 --- a/Libraries/LibWeb/WebIDL/Promise.h +++ b/Libraries/LibWeb/WebIDL/Promise.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -20,20 +21,20 @@ using ReactionSteps = GC::Function(JS::Value)>; // https://webidl.spec.whatwg.org/#es-promise using Promise = JS::PromiseCapability; -GC::Ref create_promise(JS::Realm&); -GC::Ref create_resolved_promise(JS::Realm&, JS::Value); -GC::Ref create_rejected_promise(JS::Realm&, JS::Value); -void resolve_promise(JS::Realm&, Promise const&, JS::Value = JS::js_undefined()); -void reject_promise(JS::Realm&, Promise const&, JS::Value); -GC::Ref react_to_promise(Promise const&, GC::Ptr on_fulfilled_callback, GC::Ptr on_rejected_callback); -GC::Ref upon_fulfillment(Promise const&, GC::Ref); -GC::Ref upon_rejection(Promise const&, GC::Ref); -void mark_promise_as_handled(Promise const&); -bool is_promise_fulfilled(Promise const&); -void wait_for_all(JS::Realm&, Vector> const& promises, Function const&)> success_steps, Function failure_steps); -GC::Ref get_promise_for_wait_for_all(JS::Realm&, Vector> const& promises); +WEB_API GC::Ref create_promise(JS::Realm&); +WEB_API GC::Ref create_resolved_promise(JS::Realm&, JS::Value); +WEB_API GC::Ref create_rejected_promise(JS::Realm&, JS::Value); +WEB_API void resolve_promise(JS::Realm&, Promise const&, JS::Value = JS::js_undefined()); +WEB_API void reject_promise(JS::Realm&, Promise const&, JS::Value); +WEB_API GC::Ref react_to_promise(Promise const&, GC::Ptr on_fulfilled_callback, GC::Ptr on_rejected_callback); +WEB_API GC::Ref upon_fulfillment(Promise const&, GC::Ref); +WEB_API GC::Ref upon_rejection(Promise const&, GC::Ref); +WEB_API void mark_promise_as_handled(Promise const&); +WEB_API bool is_promise_fulfilled(Promise const&); +WEB_API void wait_for_all(JS::Realm&, Vector> const& promises, Function const&)> success_steps, Function failure_steps); +WEB_API GC::Ref get_promise_for_wait_for_all(JS::Realm&, Vector> const& promises); // Non-spec, convenience method. -GC::Ref create_rejected_promise_from_exception(JS::Realm&, Exception); +WEB_API GC::Ref create_rejected_promise_from_exception(JS::Realm&, Exception); } diff --git a/Libraries/LibWeb/WebIDL/Tracing.h b/Libraries/LibWeb/WebIDL/Tracing.h index 9b4ed8f7e05..45d151a3890 100644 --- a/Libraries/LibWeb/WebIDL/Tracing.h +++ b/Libraries/LibWeb/WebIDL/Tracing.h @@ -7,11 +7,12 @@ #pragma once #include +#include namespace Web::WebIDL { void log_trace(JS::VM& vm, char const* function); -void set_enable_idl_tracing(bool enabled); +WEB_API void set_enable_idl_tracing(bool enabled); } diff --git a/Libraries/LibWeb/Worker/WebWorkerClient.h b/Libraries/LibWeb/Worker/WebWorkerClient.h index c2b616ae812..ecaffd5d1f2 100644 --- a/Libraries/LibWeb/Worker/WebWorkerClient.h +++ b/Libraries/LibWeb/Worker/WebWorkerClient.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include #include namespace Web::HTML { -class WebWorkerClient final +class WEB_API WebWorkerClient final : public IPC::ConnectionToServer , public WebWorkerClientEndpoint { C_OBJECT_ABSTRACT(WebWorkerClient); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSKeyword.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSKeyword.cpp index b4c342e903f..0b52357caf5 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSKeyword.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSKeyword.cpp @@ -56,6 +56,7 @@ ErrorOr generate_header_file(JsonArray& keyword_data, Core::File& file) #include #include +#include namespace Web::CSS { @@ -75,7 +76,7 @@ enum class Keyword : @keyword_underlying_type@ { generator.append(R"~~~( }; -Optional keyword_from_string(StringView); +WEB_API Optional keyword_from_string(StringView); StringView string_from_keyword(Keyword); // https://www.w3.org/TR/css-values-4/#common-keywords diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp index c22bc3f7ad1..405c39e7c81 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp @@ -166,6 +166,7 @@ ErrorOr generate_header_file(JsonObject& properties, JsonObject& logical_p #include #include #include +#include #include namespace Web::CSS { @@ -250,10 +251,10 @@ AnimationType animation_type_from_longhand_property(PropertyID); bool is_animatable_property(PropertyID); Optional property_id_from_camel_case_string(StringView); -Optional property_id_from_string(StringView); -[[nodiscard]] FlyString const& string_from_property_id(PropertyID); +WEB_API Optional property_id_from_string(StringView); +[[nodiscard]] WEB_API FlyString const& string_from_property_id(PropertyID); [[nodiscard]] FlyString const& camel_case_string_from_property_id(PropertyID); -bool is_inherited_property(PropertyID); +WEB_API bool is_inherited_property(PropertyID); NonnullRefPtr property_initial_value(PropertyID); bool property_accepts_type(PropertyID, ValueType); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp index 6455b00b0b6..0ed39b62b9f 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp @@ -59,6 +59,7 @@ ErrorOr generate_header_file(JsonObject& pseudo_elements_data, Core::File& #include #include #include +#include namespace Web::CSS { @@ -83,7 +84,7 @@ enum class PseudoElement : @pseudo_element_underlying_type@ { Optional pseudo_element_from_string(StringView); Optional aliased_pseudo_element_from_string(StringView); -StringView pseudo_element_name(PseudoElement); +WEB_API StringView pseudo_element_name(PseudoElement); bool is_has_allowed_pseudo_element(PseudoElement); bool is_pseudo_element_root(PseudoElement); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp index 4cca490f365..ee138c338d4 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp @@ -77,6 +77,7 @@ static ErrorOr generate_intrinsic_definitions(StringView output_path, Inte #include #include #include +#include #include #include #include @@ -211,7 +212,7 @@ bool Intrinsics::is_interface_exposed<@prototype_class@>(JS::Realm& realm) const gen.append(R"~~~( template<> -void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Realm& realm) +WEB_API void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Realm& realm) { auto& vm = realm.vm(); diff --git a/Services/WebContent/CMakeLists.txt b/Services/WebContent/CMakeLists.txt index 213e89caa9b..1da97b3823f 100644 --- a/Services/WebContent/CMakeLists.txt +++ b/Services/WebContent/CMakeLists.txt @@ -52,33 +52,6 @@ endif() target_link_libraries(WebContent PRIVATE webcontentservice LibURL) if(WIN32) - # FIXME: This is a hack to get around lld-link error undefined symbols in LibWeb - target_link_libraries(WebContent PRIVATE - $,INCLUDE,AbortSignal> - $,INCLUDE,AttributeNames> - $,INCLUDE,Buffers> - $,INCLUDE,CallbackType> - $,INCLUDE,DocumentObserver> - $,INCLUDE,EventNames> - $,INCLUDE,Fetching> - $,INCLUDE,HeapTimer> - $,INCLUDE,MutationType> - $,INCLUDE,Namespace> - $,INCLUDE,NavigationObserver> - $,INCLUDE,PaintableBox> - $,INCLUDE,Policy> - $,INCLUDE,PolicyContainer> - $,INCLUDE,PullIntoDescriptor> - $,INCLUDE,ReadableByteStreamController> - $,INCLUDE,ReadableStream> - $,INCLUDE,ShadowRoot> - $,INCLUDE,TagNames> - $,INCLUDE,Text> - $,INCLUDE,Tracing> - $,INCLUDE,TransformStream> - $,INCLUDE,WebUI> - $,INCLUDE,WritableStream> - ) find_package(unofficial-angle REQUIRED CONFIG) target_link_libraries(WebContent PRIVATE LibTextCodec unofficial::angle::libGLESv2) endif() diff --git a/Services/WebContent/main.cpp b/Services/WebContent/main.cpp index 74c70bc2368..0ad9dc9f823 100644 --- a/Services/WebContent/main.cpp +++ b/Services/WebContent/main.cpp @@ -156,7 +156,7 @@ ErrorOr ladybird_main(Main::Arguments arguments) Web::Fetch::Fetching::set_http_cache_enabled(true); } - Web::Painting::g_paint_viewport_scrollbars = !disable_scrollbar_painting; + Web::Painting::set_paint_viewport_scrollbars(!disable_scrollbar_painting); if (!echo_server_port_string_view.is_empty()) { if (auto maybe_echo_server_port = echo_server_port_string_view.to_number(); maybe_echo_server_port.has_value()) diff --git a/Services/WebWorker/CMakeLists.txt b/Services/WebWorker/CMakeLists.txt index 1567cd228ab..d6589415c7f 100644 --- a/Services/WebWorker/CMakeLists.txt +++ b/Services/WebWorker/CMakeLists.txt @@ -22,17 +22,6 @@ target_include_directories(WebWorker PRIVATE ${LADYBIRD_SOURCE_DIR}) target_link_libraries(WebWorker PRIVATE webworkerservice) if(WIN32) - # FIXME: This is a hack to get around lld-link error undefined symbols in LibWeb - target_link_libraries(webworkerservice PRIVATE - $,INCLUDE,CallbackType> - $,INCLUDE,DedicatedWorkerGlobalScope> - $,INCLUDE,EnvironmentSettingsSnapshot> - $,INCLUDE,EventNames> - $,INCLUDE,SharedWorkerGlobalScope> - $,INCLUDE,Tracing> - $,INCLUDE,WorkerDebugConsoleClient> - $,INCLUDE,WorkerLocation> - ) find_package(pthread REQUIRED) target_include_directories(WebWorker PRIVATE $) endif()