mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +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
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e43027091d Pull-request: https://github.com/SerenityOS/serenity/pull/18718 Reviewed-by: https://github.com/gmta ✅
|
@ -19,8 +19,8 @@
|
|||
#include <LibWeb/DOM/QualifiedName.h>
|
||||
#include <LibWeb/HTML/AttributeNames.h>
|
||||
#include <LibWeb/HTML/EventLoop/Task.h>
|
||||
#include <LibWeb/HTML/ScrollOptions.h>
|
||||
#include <LibWeb/HTML/TagNames.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/Bindings/Forward.h>
|
||||
|
||||
namespace Web {
|
||||
|
@ -582,6 +583,8 @@ class DOMException;
|
|||
|
||||
template<typename ValueType>
|
||||
class ExceptionOr;
|
||||
|
||||
using Promise = JS::PromiseCapability;
|
||||
}
|
||||
|
||||
namespace Web::WebSockets {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/GenericLexer.h>
|
||||
#include <AK/Random.h>
|
||||
#include <LibWeb/HTML/FormControlInfrastructure.h>
|
||||
#include <LibWeb/HTML/FormDataEvent.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/Plugin.h>
|
||||
#include <LibWeb/HTML/Scripting/ImportMap.h>
|
||||
#include <LibWeb/HTML/ScrollOptions.h>
|
||||
#include <LibWeb/HTML/WindowEventHandlers.h>
|
||||
#include <LibWeb/HTML/WindowOrWorkerGlobalScope.h>
|
||||
#include <LibWeb/RequestIdleCallback/IdleRequest.h>
|
||||
|
@ -30,11 +31,6 @@ namespace Web::HTML {
|
|||
|
||||
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
|
||||
struct ScrollToOptions : public ScrollOptions {
|
||||
Optional<double> left;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/SVG/AttributeNames.h>
|
||||
#include <LibWeb/SVG/SVGRadialGradientElement.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue