mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
LibWeb: Don't include HTML/Window.h from DOM/Element.h
This required moving HTML::ScrollOptions to its own header file.
This commit is contained in:
parent
ac0c30ce62
commit
e43027091d
6 changed files with 25 additions and 6 deletions
|
@ -19,8 +19,8 @@
|
||||||
#include <LibWeb/DOM/QualifiedName.h>
|
#include <LibWeb/DOM/QualifiedName.h>
|
||||||
#include <LibWeb/HTML/AttributeNames.h>
|
#include <LibWeb/HTML/AttributeNames.h>
|
||||||
#include <LibWeb/HTML/EventLoop/Task.h>
|
#include <LibWeb/HTML/EventLoop/Task.h>
|
||||||
|
#include <LibWeb/HTML/ScrollOptions.h>
|
||||||
#include <LibWeb/HTML/TagNames.h>
|
#include <LibWeb/HTML/TagNames.h>
|
||||||
#include <LibWeb/HTML/Window.h>
|
|
||||||
#include <LibWeb/Layout/Node.h>
|
#include <LibWeb/Layout/Node.h>
|
||||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <LibJS/Forward.h>
|
||||||
#include <LibWeb/Bindings/Forward.h>
|
#include <LibWeb/Bindings/Forward.h>
|
||||||
|
|
||||||
namespace Web {
|
namespace Web {
|
||||||
|
@ -582,6 +583,8 @@ class DOMException;
|
||||||
|
|
||||||
template<typename ValueType>
|
template<typename ValueType>
|
||||||
class ExceptionOr;
|
class ExceptionOr;
|
||||||
|
|
||||||
|
using Promise = JS::PromiseCapability;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Web::WebSockets {
|
namespace Web::WebSockets {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/GenericLexer.h>
|
#include <AK/GenericLexer.h>
|
||||||
|
#include <AK/Random.h>
|
||||||
#include <LibWeb/HTML/FormControlInfrastructure.h>
|
#include <LibWeb/HTML/FormControlInfrastructure.h>
|
||||||
#include <LibWeb/HTML/FormDataEvent.h>
|
#include <LibWeb/HTML/FormDataEvent.h>
|
||||||
#include <LibWeb/HTML/HTMLButtonElement.h>
|
#include <LibWeb/HTML/HTMLButtonElement.h>
|
||||||
|
|
18
Userland/Libraries/LibWeb/HTML/ScrollOptions.h
Normal file
18
Userland/Libraries/LibWeb/HTML/ScrollOptions.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <LibWeb/Bindings/WindowGlobalMixin.h>
|
||||||
|
|
||||||
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
// https://w3c.github.io/csswg-drafts/cssom-view/#dictdef-scrolloptions
|
||||||
|
struct ScrollOptions {
|
||||||
|
Bindings::ScrollBehavior behavior { Bindings::ScrollBehavior::Auto };
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -22,6 +22,7 @@
|
||||||
#include <LibWeb/HTML/MimeType.h>
|
#include <LibWeb/HTML/MimeType.h>
|
||||||
#include <LibWeb/HTML/Plugin.h>
|
#include <LibWeb/HTML/Plugin.h>
|
||||||
#include <LibWeb/HTML/Scripting/ImportMap.h>
|
#include <LibWeb/HTML/Scripting/ImportMap.h>
|
||||||
|
#include <LibWeb/HTML/ScrollOptions.h>
|
||||||
#include <LibWeb/HTML/WindowEventHandlers.h>
|
#include <LibWeb/HTML/WindowEventHandlers.h>
|
||||||
#include <LibWeb/HTML/WindowOrWorkerGlobalScope.h>
|
#include <LibWeb/HTML/WindowOrWorkerGlobalScope.h>
|
||||||
#include <LibWeb/RequestIdleCallback/IdleRequest.h>
|
#include <LibWeb/RequestIdleCallback/IdleRequest.h>
|
||||||
|
@ -30,11 +31,6 @@ namespace Web::HTML {
|
||||||
|
|
||||||
class IdleCallback;
|
class IdleCallback;
|
||||||
|
|
||||||
// https://w3c.github.io/csswg-drafts/cssom-view/#dictdef-scrolloptions
|
|
||||||
struct ScrollOptions {
|
|
||||||
Bindings::ScrollBehavior behavior { Bindings::ScrollBehavior::Auto };
|
|
||||||
};
|
|
||||||
|
|
||||||
// https://w3c.github.io/csswg-drafts/cssom-view/#dictdef-scrolltooptions
|
// https://w3c.github.io/csswg-drafts/cssom-view/#dictdef-scrolltooptions
|
||||||
struct ScrollToOptions : public ScrollOptions {
|
struct ScrollToOptions : public ScrollOptions {
|
||||||
Optional<double> left;
|
Optional<double> left;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <LibWeb/Bindings/Intrinsics.h>
|
||||||
#include <LibWeb/SVG/AttributeNames.h>
|
#include <LibWeb/SVG/AttributeNames.h>
|
||||||
#include <LibWeb/SVG/SVGRadialGradientElement.h>
|
#include <LibWeb/SVG/SVGRadialGradientElement.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue