Everywhere: Hoist the Libraries folder to the top-level

This commit is contained in:
Timothy Flynn 2024-11-09 12:25:08 -05:00 committed by Andreas Kling
commit 93712b24bf
Notes: github-actions[bot] 2024-11-10 11:51:52 +00:00
4547 changed files with 104 additions and 113 deletions

View file

@ -0,0 +1,41 @@
/*
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/Bindings/ResizeObserverPrototype.h>
#include <LibWeb/ResizeObserver/ResizeObserverSize.h>
namespace Web::ResizeObserver {
// https://drafts.csswg.org/resize-observer-1/#resize-observation-interface
class ResizeObservation : public JS::Cell {
JS_CELL(ResizeObservation, JS::Cell);
JS_DECLARE_ALLOCATOR(ResizeObservation);
public:
static WebIDL::ExceptionOr<JS::NonnullGCPtr<ResizeObservation>> create(JS::Realm&, DOM::Element&, Bindings::ResizeObserverBoxOptions);
bool is_active();
JS::NonnullGCPtr<DOM::Element> target() const { return m_target; }
Bindings::ResizeObserverBoxOptions observed_box() const { return m_observed_box; }
Vector<JS::NonnullGCPtr<ResizeObserverSize>>& last_reported_sizes() { return m_last_reported_sizes; }
explicit ResizeObservation(JS::Realm& realm, DOM::Element& target, Bindings::ResizeObserverBoxOptions observed_box);
private:
virtual void visit_edges(JS::Cell::Visitor&) override;
JS::NonnullGCPtr<JS::Realm> m_realm;
JS::NonnullGCPtr<DOM::Element> m_target;
Bindings::ResizeObserverBoxOptions m_observed_box;
Vector<JS::NonnullGCPtr<ResizeObserverSize>> m_last_reported_sizes;
};
}