mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-18 23:12:02 +00:00
LibWeb: Stub Geolocation API
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
f3c1dfb2f1
commit
22bda8e5e2
Notes:
github-actions[bot]
2025-06-21 08:01:30 +00:00
Author: https://github.com/gmta
Commit: 22bda8e5e2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5143
25 changed files with 480 additions and 57 deletions
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
|
||||
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -12,6 +13,7 @@
|
|||
#include <LibWeb/Bindings/NavigatorPrototype.h>
|
||||
#include <LibWeb/Clipboard/Clipboard.h>
|
||||
#include <LibWeb/CredentialManagement/CredentialsContainer.h>
|
||||
#include <LibWeb/Geolocation/Geolocation.h>
|
||||
#include <LibWeb/HTML/Navigator.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
@ -66,6 +68,7 @@ void Navigator::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_mime_type_array);
|
||||
visitor.visit(m_plugin_array);
|
||||
visitor.visit(m_clipboard);
|
||||
visitor.visit(m_geolocation);
|
||||
visitor.visit(m_user_activation);
|
||||
visitor.visit(m_service_worker_container);
|
||||
visitor.visit(m_media_capabilities);
|
||||
|
@ -93,6 +96,13 @@ GC::Ref<Clipboard::Clipboard> Navigator::clipboard()
|
|||
return *m_clipboard;
|
||||
}
|
||||
|
||||
GC::Ref<Geolocation::Geolocation> Navigator::geolocation()
|
||||
{
|
||||
if (!m_geolocation)
|
||||
m_geolocation = realm().create<Geolocation::Geolocation>(realm());
|
||||
return *m_geolocation;
|
||||
}
|
||||
|
||||
GC::Ref<UserActivation> Navigator::user_activation()
|
||||
{
|
||||
if (!m_user_activation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue