mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 20:16:02 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
41
Libraries/LibWeb/ResizeObserver/ResizeObservation.h
Normal file
41
Libraries/LibWeb/ResizeObserver/ResizeObservation.h
Normal 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;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue