mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:28:13 +00:00
LibWeb: Use cached_web_prototype() as much as possible
Unlike ensure_web_prototype<T>(), the cached version doesn't require the prototype type to be fully formed, so we can use it without including the FooPrototype.h header. It's also a bit less verbose. :^)
This commit is contained in:
parent
a85542958c
commit
ffad902c07
165 changed files with 176 additions and 325 deletions
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibWeb/Bindings/CanvasGradientPrototype.h>
|
||||
#include <LibWeb/DOM/ExceptionOr.h>
|
||||
#include <LibWeb/HTML/CanvasGradient.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
@ -44,7 +43,7 @@ CanvasGradient::CanvasGradient(HTML::Window& window, Type type)
|
|||
: PlatformObject(window.realm())
|
||||
, m_type(type)
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::CanvasGradientPrototype>("CanvasGradient"));
|
||||
set_prototype(&window.cached_web_prototype("CanvasGradient"));
|
||||
}
|
||||
|
||||
CanvasGradient::~CanvasGradient() = default;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <LibGfx/Painter.h>
|
||||
#include <LibGfx/Quad.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibWeb/Bindings/CanvasRenderingContext2DPrototype.h>
|
||||
#include <LibWeb/DOM/ExceptionOr.h>
|
||||
#include <LibWeb/HTML/CanvasRenderingContext2D.h>
|
||||
#include <LibWeb/HTML/HTMLCanvasElement.h>
|
||||
|
@ -32,7 +31,7 @@ CanvasRenderingContext2D::CanvasRenderingContext2D(HTML::Window& window, HTMLCan
|
|||
: PlatformObject(window.realm())
|
||||
, m_element(element)
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::CanvasRenderingContext2DPrototype>("CanvasRenderingContext2D"));
|
||||
set_prototype(&window.cached_web_prototype("CanvasRenderingContext2D"));
|
||||
}
|
||||
|
||||
CanvasRenderingContext2D::~CanvasRenderingContext2D() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/CloseEventPrototype.h>
|
||||
#include <LibWeb/HTML/CloseEvent.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -26,7 +25,7 @@ CloseEvent::CloseEvent(HTML::Window& window_object, FlyString const& event_name,
|
|||
, m_code(event_init.code)
|
||||
, m_reason(event_init.reason)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::CloseEventPrototype>("CloseEvent"));
|
||||
set_prototype(&window_object.cached_web_prototype("CloseEvent"));
|
||||
}
|
||||
|
||||
CloseEvent::~CloseEvent() = default;
|
||||
|
|
|
@ -21,7 +21,7 @@ DOM::ExceptionOr<JS::NonnullGCPtr<DOMParser>> DOMParser::create_with_global_obje
|
|||
DOMParser::DOMParser(HTML::Window& window)
|
||||
: PlatformObject(window.realm())
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::DOMParserPrototype>("DOMParser"));
|
||||
set_prototype(&window.cached_web_prototype("DOMParser"));
|
||||
}
|
||||
|
||||
DOMParser::~DOMParser() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <LibWeb/Bindings/DOMStringMapPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/DOMStringMap.h>
|
||||
|
@ -20,7 +19,7 @@ JS::NonnullGCPtr<DOMStringMap> DOMStringMap::create(DOM::Element& element)
|
|||
}
|
||||
|
||||
DOMStringMap::DOMStringMap(DOM::Element& element)
|
||||
: PlatformObject(element.document().window().ensure_web_prototype<Bindings::DOMStringMapPrototype>("DOMStringMap"))
|
||||
: PlatformObject(element.window().cached_web_prototype("DOMStringMap"))
|
||||
, m_associated_element(element)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/ErrorEventPrototype.h>
|
||||
#include <LibWeb/HTML/ErrorEvent.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -28,7 +27,7 @@ ErrorEvent::ErrorEvent(HTML::Window& window_object, FlyString const& event_name,
|
|||
, m_colno(event_init.colno)
|
||||
, m_error(event_init.error)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::ErrorEventPrototype>("ErrorEvent"));
|
||||
set_prototype(&window_object.cached_web_prototype("ErrorEvent"));
|
||||
}
|
||||
|
||||
ErrorEvent::~ErrorEvent() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLAnchorElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLAnchorElement::HTMLAnchorElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLAnchorElementPrototype>("HTMLAnchorElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLAnchorElement"));
|
||||
|
||||
activation_behavior = [this](auto const& event) {
|
||||
run_activation_behavior(event);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLAreaElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLAreaElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLAreaElement::HTMLAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLAreaElementPrototype>("HTMLAreaElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLAreaElement"));
|
||||
}
|
||||
|
||||
HTMLAreaElement::~HTMLAreaElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLAudioElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLAudioElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLAudioElement::HTMLAudioElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLMediaElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLAudioElementPrototype>("HTMLAudioElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLAudioElement"));
|
||||
}
|
||||
|
||||
HTMLAudioElement::~HTMLAudioElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLBRElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLBRElement.h>
|
||||
#include <LibWeb/Layout/BreakNode.h>
|
||||
|
@ -14,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLBRElement::HTMLBRElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLBRElementPrototype>("HTMLBRElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLBRElement"));
|
||||
}
|
||||
|
||||
HTMLBRElement::~HTMLBRElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLBaseElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLBaseElement.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLBaseElement::HTMLBaseElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLBaseElementPrototype>("HTMLBaseElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLBaseElement"));
|
||||
}
|
||||
|
||||
HTMLBaseElement::~HTMLBaseElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLBodyElementPrototype.h>
|
||||
#include <LibWeb/CSS/StyleProperties.h>
|
||||
#include <LibWeb/CSS/StyleValue.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
@ -16,7 +15,7 @@ namespace Web::HTML {
|
|||
HTMLBodyElement::HTMLBodyElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLBodyElementPrototype>("HTMLBodyElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLBodyElement"));
|
||||
}
|
||||
|
||||
HTMLBodyElement::~HTMLBodyElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLButtonElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLButtonElement.h>
|
||||
#include <LibWeb/HTML/HTMLFormElement.h>
|
||||
|
@ -14,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLButtonElement::HTMLButtonElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLButtonElementPrototype>("HTMLButtonElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLButtonElement"));
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element:activation-behaviour
|
||||
activation_behavior = [this](auto&) {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <AK/Checked.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/PNGWriter.h>
|
||||
#include <LibWeb/Bindings/HTMLCanvasElementPrototype.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/CanvasRenderingContext2D.h>
|
||||
|
@ -22,7 +21,7 @@ static constexpr auto max_canvas_area = 16384 * 16384;
|
|||
HTMLCanvasElement::HTMLCanvasElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&document.window().ensure_web_prototype<Bindings::HTMLCanvasElementPrototype>("HTMLCanvasElement"));
|
||||
set_prototype(&document.window().cached_web_prototype("HTMLCanvasElement"));
|
||||
}
|
||||
|
||||
HTMLCanvasElement::~HTMLCanvasElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDListElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDListElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDListElement::HTMLDListElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDListElementPrototype>("HTMLDListElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDListElement"));
|
||||
}
|
||||
|
||||
HTMLDListElement::~HTMLDListElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDataElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDataElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDataElement::HTMLDataElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDataElementPrototype>("HTMLDataElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDataElement"));
|
||||
}
|
||||
|
||||
HTMLDataElement::~HTMLDataElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDataListElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDataListElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDataListElement::HTMLDataListElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDataListElementPrototype>("HTMLDataListElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDataListElement"));
|
||||
}
|
||||
|
||||
HTMLDataListElement::~HTMLDataListElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDetailsElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDetailsElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDetailsElement::HTMLDetailsElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDetailsElementPrototype>("HTMLDetailsElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDetailsElement"));
|
||||
}
|
||||
|
||||
HTMLDetailsElement::~HTMLDetailsElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDialogElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDialogElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDialogElement::HTMLDialogElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDialogElementPrototype>("HTMLDialogElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDialogElement"));
|
||||
}
|
||||
|
||||
HTMLDialogElement::~HTMLDialogElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDirectoryElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDirectoryElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDirectoryElement::HTMLDirectoryElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDirectoryElementPrototype>("HTMLDirectoryElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDirectoryElement"));
|
||||
}
|
||||
|
||||
HTMLDirectoryElement::~HTMLDirectoryElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLDivElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLDivElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLDivElement::HTMLDivElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLDivElementPrototype>("HTMLDivElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLDivElement"));
|
||||
}
|
||||
|
||||
HTMLDivElement::~HTMLDivElement() = default;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <AK/StringBuilder.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Parser.h>
|
||||
#include <LibWeb/Bindings/HTMLElementPrototype.h>
|
||||
#include <LibWeb/DOM/DOMException.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/ExceptionOr.h>
|
||||
|
@ -33,7 +32,7 @@ HTMLElement::HTMLElement(DOM::Document& document, DOM::QualifiedName qualified_n
|
|||
: Element(document, move(qualified_name))
|
||||
, m_dataset(DOMStringMap::create(*this))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLElementPrototype>("HTMLElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLElement"));
|
||||
}
|
||||
|
||||
HTMLElement::~HTMLElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLEmbedElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLEmbedElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLEmbedElement::HTMLEmbedElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLEmbedElementPrototype>("HTMLEmbedElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLEmbedElement"));
|
||||
}
|
||||
|
||||
HTMLEmbedElement::~HTMLEmbedElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLFieldSetElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLFieldSetElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLFieldSetElement::HTMLFieldSetElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLFieldSetElementPrototype>("HTMLFieldSetElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLFieldSetElement"));
|
||||
}
|
||||
|
||||
HTMLFieldSetElement::~HTMLFieldSetElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLFontElementPrototype.h>
|
||||
#include <LibWeb/CSS/StyleProperties.h>
|
||||
#include <LibWeb/CSS/StyleValue.h>
|
||||
#include <LibWeb/HTML/HTMLFontElement.h>
|
||||
|
@ -15,7 +14,7 @@ namespace Web::HTML {
|
|||
HTMLFontElement::HTMLFontElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLFontElementPrototype>("HTMLFontElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLFontElement"));
|
||||
}
|
||||
|
||||
HTMLFontElement::~HTMLFontElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibWeb/Bindings/HTMLFormElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
|
@ -26,7 +25,7 @@ namespace Web::HTML {
|
|||
HTMLFormElement::HTMLFormElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLFormElementPrototype>("HTMLFormElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLFormElement"));
|
||||
}
|
||||
|
||||
HTMLFormElement::~HTMLFormElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLFrameElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLFrameElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLFrameElement::HTMLFrameElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLFrameElementPrototype>("HTMLFrameElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLFrameElement"));
|
||||
}
|
||||
|
||||
HTMLFrameElement::~HTMLFrameElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLFrameSetElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLFrameSetElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
@ -14,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLFrameSetElement::HTMLFrameSetElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLFrameSetElementPrototype>("HTMLFrameSetElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLFrameSetElement"));
|
||||
}
|
||||
|
||||
HTMLFrameSetElement::~HTMLFrameSetElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLHRElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLHRElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLHRElement::HTMLHRElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLHRElementPrototype>("HTMLHRElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLHRElement"));
|
||||
}
|
||||
|
||||
HTMLHRElement::~HTMLHRElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLHeadElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLHeadElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLHeadElement::HTMLHeadElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLHeadElementPrototype>("HTMLHeadElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLHeadElement"));
|
||||
}
|
||||
|
||||
HTMLHeadElement::~HTMLHeadElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLHeadingElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLHeadingElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLHeadingElement::HTMLHeadingElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLHeadingElementPrototype>("HTMLHeadingElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLHeadingElement"));
|
||||
}
|
||||
|
||||
HTMLHeadingElement::~HTMLHeadingElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLHtmlElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLHtmlElementPrototype>("HTMLHtmlElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLHtmlElement"));
|
||||
}
|
||||
|
||||
HTMLHtmlElement::~HTMLHtmlElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLIFrameElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
|
@ -17,7 +16,7 @@ namespace Web::HTML {
|
|||
HTMLIFrameElement::HTMLIFrameElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: BrowsingContextContainer(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&document.window().ensure_web_prototype<Bindings::HTMLIFrameElementPrototype>("HTMLIFrameElement"));
|
||||
set_prototype(&document.window().cached_web_prototype("HTMLIFrameElement"));
|
||||
}
|
||||
|
||||
HTMLIFrameElement::~HTMLIFrameElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibWeb/Bindings/HTMLImageElementPrototype.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
@ -23,7 +22,7 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, DOM::QualifiedName q
|
|||
: HTMLElement(document, move(qualified_name))
|
||||
, m_image_loader(*this)
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLImageElementPrototype>("HTMLImageElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLImageElement"));
|
||||
|
||||
m_image_loader.on_load = [this] {
|
||||
set_needs_style_update(true);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLInputElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
|
@ -25,7 +24,7 @@ HTMLInputElement::HTMLInputElement(DOM::Document& document, DOM::QualifiedName q
|
|||
: HTMLElement(document, move(qualified_name))
|
||||
, m_value(String::empty())
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLInputElementPrototype>("HTMLInputElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLInputElement"));
|
||||
|
||||
activation_behavior = [this](auto&) {
|
||||
// The activation behavior for input elements are these steps:
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLLIElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLLIElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLLIElement::HTMLLIElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLLIElementPrototype>("HTMLLIElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLLIElement"));
|
||||
}
|
||||
|
||||
HTMLLIElement::~HTMLLIElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLLabelElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLLabelElement.h>
|
||||
#include <LibWeb/Layout/Label.h>
|
||||
|
@ -14,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLLabelElement::HTMLLabelElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLLabelElementPrototype>("HTMLLabelElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLLabelElement"));
|
||||
}
|
||||
|
||||
HTMLLabelElement::~HTMLLabelElement() = default;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLLegendElement::HTMLLegendElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLLegendElementPrototype>("HTMLLegendElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLLegendElement"));
|
||||
}
|
||||
|
||||
HTMLLegendElement::~HTMLLegendElement() = default;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibWeb/Bindings/HTMLLinkElementPrototype.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLLinkElement.h>
|
||||
|
@ -22,7 +21,7 @@ namespace Web::HTML {
|
|||
HTMLLinkElement::HTMLLinkElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLLinkElementPrototype>("HTMLLinkElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLLinkElement"));
|
||||
}
|
||||
|
||||
HTMLLinkElement::~HTMLLinkElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLMapElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLMapElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLMapElement::HTMLMapElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLMapElementPrototype>("HTMLMapElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLMapElement"));
|
||||
}
|
||||
|
||||
HTMLMapElement::~HTMLMapElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLMarqueeElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLMarqueeElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLMarqueeElement::HTMLMarqueeElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLMarqueeElementPrototype>("HTMLMarqueeElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLMarqueeElement"));
|
||||
}
|
||||
|
||||
HTMLMarqueeElement::~HTMLMarqueeElement() = default;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLMediaElement::HTMLMediaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLMediaElementPrototype>("HTMLMediaElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLMediaElement"));
|
||||
}
|
||||
|
||||
HTMLMediaElement::~HTMLMediaElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLMenuElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLMenuElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLMenuElement::HTMLMenuElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLMenuElementPrototype>("HTMLMenuElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLMenuElement"));
|
||||
}
|
||||
|
||||
HTMLMenuElement::~HTMLMenuElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLMetaElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLMetaElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLMetaElement::HTMLMetaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLMetaElementPrototype>("HTMLMetaElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLMetaElement"));
|
||||
}
|
||||
|
||||
HTMLMetaElement::~HTMLMetaElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLMeterElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLMeterElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLMeterElement::HTMLMeterElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLMeterElementPrototype>("HTMLMeterElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLMeterElement"));
|
||||
}
|
||||
|
||||
HTMLMeterElement::~HTMLMeterElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLModElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLModElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLModElement::HTMLModElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLModElementPrototype>("HTMLModElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLModElement"));
|
||||
}
|
||||
|
||||
HTMLModElement::~HTMLModElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLOListElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLOListElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLOListElement::HTMLOListElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLOListElementPrototype>("HTMLOListElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLOListElement"));
|
||||
}
|
||||
|
||||
HTMLOListElement::~HTMLOListElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibWeb/Bindings/HTMLObjectElementPrototype.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
|
@ -20,7 +19,7 @@ namespace Web::HTML {
|
|||
HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: BrowsingContextContainer(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLObjectElementPrototype>("HTMLObjectElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLObjectElement"));
|
||||
}
|
||||
|
||||
HTMLObjectElement::~HTMLObjectElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLOptGroupElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLOptGroupElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLOptGroupElement::HTMLOptGroupElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLOptGroupElementPrototype>("HTMLOptGroupElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLOptGroupElement"));
|
||||
}
|
||||
|
||||
HTMLOptGroupElement::~HTMLOptGroupElement() = default;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibWeb/Bindings/HTMLOptionElementPrototype.h>
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/HTML/HTMLOptionElement.h>
|
||||
|
@ -20,7 +19,7 @@ namespace Web::HTML {
|
|||
HTMLOptionElement::HTMLOptionElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLOptionElementPrototype>("HTMLOptionElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLOptionElement"));
|
||||
}
|
||||
|
||||
HTMLOptionElement::~HTMLOptionElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLOptionsCollectionPrototype.h>
|
||||
#include <LibWeb/DOM/DOMException.h>
|
||||
#include <LibWeb/HTML/HTMLOptGroupElement.h>
|
||||
#include <LibWeb/HTML/HTMLOptionElement.h>
|
||||
|
@ -22,7 +21,7 @@ JS::NonnullGCPtr<HTMLOptionsCollection> HTMLOptionsCollection::create(DOM::Paren
|
|||
HTMLOptionsCollection::HTMLOptionsCollection(DOM::ParentNode& root, Function<bool(DOM::Element const&)> filter)
|
||||
: DOM::HTMLCollection(root, move(filter))
|
||||
{
|
||||
set_prototype(&root.window().ensure_web_prototype<Bindings::HTMLOptionsCollectionPrototype>("HTMLOptionsCollection"));
|
||||
set_prototype(&root.window().cached_web_prototype("HTMLOptionsCollection"));
|
||||
}
|
||||
|
||||
HTMLOptionsCollection::~HTMLOptionsCollection() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLOutputElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLOutputElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLOutputElement::HTMLOutputElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLOutputElementPrototype>("HTMLOutputElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLOutputElement"));
|
||||
}
|
||||
|
||||
HTMLOutputElement::~HTMLOutputElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLParagraphElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLParagraphElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLParagraphElement::HTMLParagraphElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLParagraphElementPrototype>("HTMLParagraphElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLParagraphElement"));
|
||||
}
|
||||
|
||||
HTMLParagraphElement::~HTMLParagraphElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLParamElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLParamElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLParamElement::HTMLParamElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLParamElementPrototype>("HTMLParamElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLParamElement"));
|
||||
}
|
||||
|
||||
HTMLParamElement::~HTMLParamElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLPictureElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLPictureElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLPictureElement::HTMLPictureElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLPictureElementPrototype>("HTMLPictureElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLPictureElement"));
|
||||
}
|
||||
|
||||
HTMLPictureElement::~HTMLPictureElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLPreElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLPreElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLPreElement::HTMLPreElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLPreElementPrototype>("HTMLPreElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLPreElement"));
|
||||
}
|
||||
|
||||
HTMLPreElement::~HTMLPreElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLProgressElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
#include <LibWeb/HTML/HTMLProgressElement.h>
|
||||
|
@ -19,7 +18,7 @@ namespace Web::HTML {
|
|||
HTMLProgressElement::HTMLProgressElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLProgressElementPrototype>("HTMLProgressElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLProgressElement"));
|
||||
}
|
||||
|
||||
HTMLProgressElement::~HTMLProgressElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLQuoteElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLQuoteElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLQuoteElement::HTMLQuoteElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLQuoteElementPrototype>("HTMLQuoteElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLQuoteElement"));
|
||||
}
|
||||
|
||||
HTMLQuoteElement::~HTMLQuoteElement() = default;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <AK/Debug.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibTextCodec/Decoder.h>
|
||||
#include <LibWeb/Bindings/HTMLScriptElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
|
@ -23,7 +22,7 @@ namespace Web::HTML {
|
|||
HTMLScriptElement::HTMLScriptElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLScriptElementPrototype>("HTMLScriptElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLScriptElement"));
|
||||
}
|
||||
|
||||
HTMLScriptElement::~HTMLScriptElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLSelectElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLFormElement.h>
|
||||
#include <LibWeb/HTML/HTMLOptGroupElement.h>
|
||||
#include <LibWeb/HTML/HTMLOptionElement.h>
|
||||
|
@ -17,7 +16,7 @@ namespace Web::HTML {
|
|||
HTMLSelectElement::HTMLSelectElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLSelectElementPrototype>("HTMLSelectElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLSelectElement"));
|
||||
}
|
||||
|
||||
HTMLSelectElement::~HTMLSelectElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLSlotElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLSlotElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLSlotElement::HTMLSlotElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLSlotElementPrototype>("HTMLSlotElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLSlotElement"));
|
||||
}
|
||||
|
||||
HTMLSlotElement::~HTMLSlotElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLSourceElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLSourceElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLSourceElement::HTMLSourceElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLSourceElementPrototype>("HTMLSourceElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLSourceElement"));
|
||||
}
|
||||
|
||||
HTMLSourceElement::~HTMLSourceElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLSpanElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLSpanElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLSpanElement::HTMLSpanElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLSpanElementPrototype>("HTMLSpanElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLSpanElement"));
|
||||
}
|
||||
|
||||
HTMLSpanElement::~HTMLSpanElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLStyleElementPrototype.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLStyleElement.h>
|
||||
|
@ -15,7 +14,7 @@ namespace Web::HTML {
|
|||
HTMLStyleElement::HTMLStyleElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLStyleElementPrototype>("HTMLStyleElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLStyleElement"));
|
||||
}
|
||||
|
||||
HTMLStyleElement::~HTMLStyleElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTableCaptionElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLTableCaptionElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLTableCaptionElement::HTMLTableCaptionElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTableCaptionElementPrototype>("HTMLTableCaptionElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTableCaptionElement"));
|
||||
}
|
||||
|
||||
HTMLTableCaptionElement::~HTMLTableCaptionElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTableCellElementPrototype.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/HTML/HTMLTableCellElement.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
|
@ -15,7 +14,7 @@ namespace Web::HTML {
|
|||
HTMLTableCellElement::HTMLTableCellElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTableCellElementPrototype>("HTMLTableCellElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTableCellElement"));
|
||||
}
|
||||
|
||||
HTMLTableCellElement::~HTMLTableCellElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTableColElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLTableColElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLTableColElement::HTMLTableColElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTableColElementPrototype>("HTMLTableColElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTableColElement"));
|
||||
}
|
||||
|
||||
HTMLTableColElement::~HTMLTableColElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTableElementPrototype.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/HTMLCollection.h>
|
||||
|
@ -21,7 +20,7 @@ namespace Web::HTML {
|
|||
HTMLTableElement::HTMLTableElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTableElementPrototype>("HTMLTableElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTableElement"));
|
||||
}
|
||||
|
||||
HTMLTableElement::~HTMLTableElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTableRowElementPrototype.h>
|
||||
#include <LibWeb/DOM/HTMLCollection.h>
|
||||
#include <LibWeb/HTML/HTMLTableCellElement.h>
|
||||
#include <LibWeb/HTML/HTMLTableElement.h>
|
||||
|
@ -17,7 +16,7 @@ namespace Web::HTML {
|
|||
HTMLTableRowElement::HTMLTableRowElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTableRowElementPrototype>("HTMLTableRowElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTableRowElement"));
|
||||
}
|
||||
|
||||
HTMLTableRowElement::~HTMLTableRowElement() = default;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTableSectionElementPrototype.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/HTMLCollection.h>
|
||||
#include <LibWeb/HTML/HTMLTableRowElement.h>
|
||||
|
@ -18,7 +17,7 @@ namespace Web::HTML {
|
|||
HTMLTableSectionElement::HTMLTableSectionElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTableSectionElementPrototype>("HTMLTableSectionElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTableSectionElement"));
|
||||
}
|
||||
|
||||
HTMLTableSectionElement::~HTMLTableSectionElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTemplateElementPrototype.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLTemplateElement.h>
|
||||
|
@ -14,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLTemplateElement::HTMLTemplateElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTemplateElementPrototype>("HTMLTemplateElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTemplateElement"));
|
||||
|
||||
m_content = heap().allocate<DOM::DocumentFragment>(realm(), appropriate_template_contents_owner_document(document));
|
||||
m_content->set_host(this);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTextAreaElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLTextAreaElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLTextAreaElement::HTMLTextAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTextAreaElementPrototype>("HTMLTextAreaElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTextAreaElement"));
|
||||
}
|
||||
|
||||
HTMLTextAreaElement::~HTMLTextAreaElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTextAreaElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLTimeElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLTimeElement::HTMLTimeElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTextAreaElementPrototype>("HTMLTextAreaElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTimeElement"));
|
||||
}
|
||||
|
||||
HTMLTimeElement::~HTMLTimeElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTitleElementPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLTitleElement.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
@ -14,7 +13,7 @@ namespace Web::HTML {
|
|||
HTMLTitleElement::HTMLTitleElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTitleElementPrototype>("HTMLTitleElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTitleElement"));
|
||||
}
|
||||
|
||||
HTMLTitleElement::~HTMLTitleElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLTrackElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLTrackElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLTrackElement::HTMLTrackElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLTrackElementPrototype>("HTMLTrackElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLTrackElement"));
|
||||
}
|
||||
|
||||
HTMLTrackElement::~HTMLTrackElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLUListElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLUListElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLUListElement::HTMLUListElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLUListElementPrototype>("HTMLUListElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLUListElement"));
|
||||
}
|
||||
|
||||
HTMLUListElement::~HTMLUListElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLUnknownElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLUnknownElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLUnknownElement::HTMLUnknownElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLUnknownElementPrototype>("HTMLUnknownElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLUnknownElement"));
|
||||
}
|
||||
|
||||
HTMLUnknownElement::~HTMLUnknownElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLVideoElementPrototype.h>
|
||||
#include <LibWeb/HTML/HTMLVideoElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -13,7 +12,7 @@ namespace Web::HTML {
|
|||
HTMLVideoElement::HTMLVideoElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLMediaElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().ensure_web_prototype<Bindings::HTMLVideoElementPrototype>("HTMLVideoElement"));
|
||||
set_prototype(&window().cached_web_prototype("HTMLVideoElement"));
|
||||
}
|
||||
|
||||
HTMLVideoElement::~HTMLVideoElement() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HistoryPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/History.h>
|
||||
|
||||
|
@ -19,7 +18,7 @@ History::History(HTML::Window& window, DOM::Document& document)
|
|||
: PlatformObject(window.realm())
|
||||
, m_associated_document(document)
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::HistoryPrototype>("History"));
|
||||
set_prototype(&window.cached_web_prototype("History"));
|
||||
}
|
||||
|
||||
History::~History() = default;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibJS/Runtime/TypedArray.h>
|
||||
#include <LibWeb/Bindings/ImageDataPrototype.h>
|
||||
#include <LibWeb/HTML/ImageData.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -38,7 +37,7 @@ ImageData::ImageData(HTML::Window& window, NonnullRefPtr<Gfx::Bitmap> bitmap, JS
|
|||
, m_bitmap(move(bitmap))
|
||||
, m_data(move(data))
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::ImageDataPrototype>("ImageData"));
|
||||
set_prototype(&window.cached_web_prototype("ImageData"));
|
||||
}
|
||||
|
||||
ImageData::~ImageData() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/MessageChannelPrototype.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/MessageChannel.h>
|
||||
#include <LibWeb/HTML/MessagePort.h>
|
||||
|
@ -20,7 +19,7 @@ JS::NonnullGCPtr<MessageChannel> MessageChannel::create_with_global_object(HTML:
|
|||
MessageChannel::MessageChannel(HTML::Window& window)
|
||||
: PlatformObject(window.realm())
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::MessageChannelPrototype>("MessageChannel"));
|
||||
set_prototype(&window.cached_web_prototype("MessageChannel"));
|
||||
|
||||
// 1. Set this's port 1 to a new MessagePort in this's relevant Realm.
|
||||
m_port1 = MessagePort::create(window);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/MessageEventPrototype.h>
|
||||
#include <LibWeb/HTML/MessageEvent.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -26,7 +25,7 @@ MessageEvent::MessageEvent(HTML::Window& window_object, FlyString const& event_n
|
|||
, m_origin(event_init.origin)
|
||||
, m_last_event_id(event_init.last_event_id)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::MessageEventPrototype>("MessageEvent"));
|
||||
set_prototype(&window_object.cached_web_prototype("MessageEvent"));
|
||||
}
|
||||
|
||||
MessageEvent::~MessageEvent() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/MessagePortPrototype.h>
|
||||
#include <LibWeb/DOM/EventDispatcher.h>
|
||||
#include <LibWeb/HTML/EventHandler.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
|
@ -22,7 +21,7 @@ JS::NonnullGCPtr<MessagePort> MessagePort::create(HTML::Window& window)
|
|||
MessagePort::MessagePort(HTML::Window& window)
|
||||
: DOM::EventTarget(window.realm())
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::MessagePortPrototype>("MessagePort"));
|
||||
set_prototype(&window.cached_web_prototype("MessagePort"));
|
||||
}
|
||||
|
||||
MessagePort::~MessagePort() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/PageTransitionEventPrototype.h>
|
||||
#include <LibWeb/HTML/PageTransitionEvent.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -24,7 +23,7 @@ PageTransitionEvent::PageTransitionEvent(HTML::Window& window_object, FlyString
|
|||
: DOM::Event(window_object, event_name, event_init)
|
||||
, m_persisted(event_init.persisted)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::PageTransitionEventPrototype>("PageTransitionEvent"));
|
||||
set_prototype(&window_object.cached_web_prototype("PageTransitionEvent"));
|
||||
}
|
||||
|
||||
PageTransitionEvent::~PageTransitionEvent() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Path2DPrototype.h>
|
||||
#include <LibWeb/HTML/Path2D.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -19,7 +18,7 @@ JS::NonnullGCPtr<Path2D> Path2D::create_with_global_object(HTML::Window& window,
|
|||
Path2D::Path2D(HTML::Window& window, Optional<Variant<JS::Handle<Path2D>, String>> const& path)
|
||||
: PlatformObject(window.realm())
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::Path2DPrototype>("Path2D"));
|
||||
set_prototype(&window.cached_web_prototype("Path2D"));
|
||||
|
||||
// 1. Let output be a new Path2D object.
|
||||
// 2. If path is not given, then return output.
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/PromiseRejectionEventPrototype.h>
|
||||
#include <LibWeb/HTML/PromiseRejectionEvent.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -25,7 +24,7 @@ PromiseRejectionEvent::PromiseRejectionEvent(HTML::Window& window_object, FlyStr
|
|||
, m_promise(const_cast<JS::Promise*>(event_init.promise.cell()))
|
||||
, m_reason(event_init.reason)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::PromiseRejectionEventPrototype>("PromiseRejectionEvent"));
|
||||
set_prototype(&window_object.cached_web_prototype("PromiseRejectionEvent"));
|
||||
}
|
||||
|
||||
PromiseRejectionEvent::~PromiseRejectionEvent() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/SubmitEventPrototype.h>
|
||||
#include <LibWeb/HTML/SubmitEvent.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -24,7 +23,7 @@ SubmitEvent::SubmitEvent(HTML::Window& window_object, FlyString const& event_nam
|
|||
: DOM::Event(window_object, event_name, event_init)
|
||||
, m_submitter(event_init.submitter)
|
||||
{
|
||||
set_prototype(&window_object.ensure_web_prototype<Bindings::SubmitEventPrototype>("SubmitEvent"));
|
||||
set_prototype(&window_object.cached_web_prototype("SubmitEvent"));
|
||||
}
|
||||
|
||||
SubmitEvent::~SubmitEvent() = default;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/TextMetricsPrototype.h>
|
||||
#include <LibWeb/HTML/TextMetrics.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -18,7 +17,7 @@ JS::NonnullGCPtr<TextMetrics> TextMetrics::create(HTML::Window& window)
|
|||
TextMetrics::TextMetrics(HTML::Window& window)
|
||||
: PlatformObject(window.realm())
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::TextMetricsPrototype>("TextMetrics"));
|
||||
set_prototype(&window.cached_web_prototype("TextMetrics"));
|
||||
}
|
||||
|
||||
TextMetrics::~TextMetrics() = default;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <LibJS/Runtime/ConsoleObject.h>
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/Bindings/WorkerPrototype.h>
|
||||
#include <LibWeb/DOM/ExceptionOr.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/HTML/Worker.h>
|
||||
|
@ -28,7 +27,7 @@ Worker::Worker(FlyString const& script_url, WorkerOptions const options, DOM::Do
|
|||
, m_interpreter_scope(*m_interpreter)
|
||||
, m_implicit_port(MessagePort::create(document.window()))
|
||||
{
|
||||
set_prototype(&document.window().ensure_web_prototype<Bindings::WorkerPrototype>("Worker"));
|
||||
set_prototype(&document.window().cached_web_prototype("Worker"));
|
||||
}
|
||||
|
||||
void Worker::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue