mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +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
39
Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp
Normal file
39
Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchTimingInfo.h>
|
||||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(FetchTimingInfo);
|
||||
|
||||
FetchTimingInfo::FetchTimingInfo() = default;
|
||||
|
||||
JS::NonnullGCPtr<FetchTimingInfo> FetchTimingInfo::create(JS::VM& vm)
|
||||
{
|
||||
return vm.heap().allocate_without_realm<FetchTimingInfo>();
|
||||
}
|
||||
|
||||
void FetchTimingInfo::visit_edges(JS::Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_final_connection_timing_info);
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info
|
||||
JS::NonnullGCPtr<FetchTimingInfo> create_opaque_timing_info(JS::VM& vm, FetchTimingInfo const& timing_info)
|
||||
{
|
||||
// To create an opaque timing info, given a fetch timing info timingInfo, return a new fetch timing info whose
|
||||
// start time and post-redirect start time are timingInfo’s start time.
|
||||
auto new_timing_info = FetchTimingInfo::create(vm);
|
||||
new_timing_info->set_start_time(timing_info.start_time());
|
||||
new_timing_info->set_post_redirect_start_time(timing_info.start_time());
|
||||
return new_timing_info;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue