1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

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
parent 950e819ee7
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,56 @@
/*
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/HighResolutionTime/DOMHighResTimeStamp.h>
namespace Web::PerformanceTimeline {
enum class AvailableFromTimeline {
No,
Yes,
};
enum class ShouldAddEntry {
No,
Yes,
};
// https://www.w3.org/TR/performance-timeline/#dom-performanceentry
class PerformanceEntry : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(PerformanceEntry, Bindings::PlatformObject);
public:
virtual ~PerformanceEntry();
// https://www.w3.org/TR/performance-timeline/#dom-performanceentry-entrytype
virtual FlyString const& entry_type() const = 0;
String const& name() const { return m_name; }
HighResolutionTime::DOMHighResTimeStamp start_time() const { return m_start_time; }
HighResolutionTime::DOMHighResTimeStamp duration() const { return m_duration; }
// https://w3c.github.io/timing-entrytypes-registry/#dfn-should-add-entry
virtual PerformanceTimeline::ShouldAddEntry should_add_entry(Optional<PerformanceObserverInit const&> = {}) const = 0;
protected:
PerformanceEntry(JS::Realm&, String const& name, HighResolutionTime::DOMHighResTimeStamp start_time, HighResolutionTime::DOMHighResTimeStamp duration);
virtual void initialize(JS::Realm&) override;
private:
// https://www.w3.org/TR/performance-timeline/#dom-performanceentry-name
String m_name;
// https://www.w3.org/TR/performance-timeline/#dom-performanceentry-starttime
HighResolutionTime::DOMHighResTimeStamp m_start_time { 0.0 };
// https://www.w3.org/TR/performance-timeline/#dom-performanceentry-duration
HighResolutionTime::DOMHighResTimeStamp m_duration { 0.0 };
};
}