diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index e363ffe592e..421ecbd3d79 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -316,6 +316,10 @@ set(SOURCES FileAPI/FileList.cpp FileAPI/FileReader.cpp FileAPI/FileReaderSync.cpp + Geolocation/Geolocation.cpp + Geolocation/GeolocationCoordinates.cpp + Geolocation/GeolocationPosition.cpp + Geolocation/GeolocationPositionError.cpp Geometry/DOMMatrix.cpp Geometry/DOMMatrixReadOnly.cpp Geometry/DOMPoint.cpp diff --git a/Libraries/LibWeb/Forward.h b/Libraries/LibWeb/Forward.h index 95ca057165b..5185e433ca6 100644 --- a/Libraries/LibWeb/Forward.h +++ b/Libraries/LibWeb/Forward.h @@ -460,6 +460,15 @@ class FileList; } +namespace Web::Geolocation { + +class Geolocation; +class GeolocationCoordinates; +class GeolocationPosition; +class GeolocationPositionError; + +} + namespace Web::Geometry { class DOMMatrix; diff --git a/Libraries/LibWeb/Geolocation/Geolocation.cpp b/Libraries/LibWeb/Geolocation/Geolocation.cpp new file mode 100644 index 00000000000..ed4aeea3842 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/Geolocation.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +namespace Web::Geolocation { + +GC_DEFINE_ALLOCATOR(Geolocation); + +Geolocation::Geolocation(JS::Realm& realm) + : PlatformObject(realm) +{ +} + +void Geolocation::initialize(JS::Realm& realm) +{ + WEB_SET_PROTOTYPE_FOR_INTERFACE(Geolocation); + Base::initialize(realm); +} + +// https://w3c.github.io/geolocation/#dom-geolocation-getcurrentposition +void Geolocation::get_current_position([[maybe_unused]] GC::Ref success_callback, + [[maybe_unused]] GC::Ptr error_callback, [[maybe_unused]] Optional options) +{ + // FIXME: 1. If this's relevant global object's associated Document is not fully active: + { + // FIXME: 1. Call back with error errorCallback and POSITION_UNAVAILABLE. + + // FIXME: 2. Terminate this algorithm. + } + + // FIXME: 2. Request a position passing this, successCallback, errorCallback, and options. + dbgln("FIXME: Geolocation::get_current_position() not implemented yet"); +} + +// https://w3c.github.io/geolocation/#watchposition-method +WebIDL::Long Geolocation::watch_position([[maybe_unused]] GC::Ref success_callback, + [[maybe_unused]] GC::Ptr error_callback, [[maybe_unused]] Optional options) +{ + // FIXME: 1. If this's relevant global object's associated Document is not fully active: + { + // FIXME: 1. Call back with error passing errorCallback and POSITION_UNAVAILABLE. + + // FIXME: 2. Return 0. + } + + // FIXME: 2. Let watchId be an implementation-defined unsigned long that is greater than zero. + + // FIXME: 3. Append watchId to this's [[watchIDs]]. + + // FIXME: 4. Request a position passing this, successCallback, errorCallback, options, and watchId. + + // FIXME: 5. Return watchId. + dbgln("FIXME: Geolocation::watch_position() not implemented yet"); + return 0; +} + +// https://w3c.github.io/geolocation/#clearwatch-method +void Geolocation::clear_watch([[maybe_unused]] WebIDL::Long watch_id) +{ + // FIXME: 1. Remove watchId from this's [[watchIDs]]. + dbgln("FIXME: Geolocation::clear_watch() not implemented yet"); +} + +} diff --git a/Libraries/LibWeb/Geolocation/Geolocation.h b/Libraries/LibWeb/Geolocation/Geolocation.h new file mode 100644 index 00000000000..e8c764662b7 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/Geolocation.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +namespace Web::Geolocation { + +// https://w3c.github.io/geolocation/#dom-positionoptions +struct PositionOptions { + bool enable_high_accuracy { false }; + WebIDL::UnsignedLong timeout { 0xFFFFFFFF }; + WebIDL::UnsignedLong maximum_age { 0 }; +}; +// https://w3c.github.io/geolocation/#geolocation_interface +class Geolocation : public Bindings::PlatformObject { + WEB_PLATFORM_OBJECT(Geolocation, Bindings::PlatformObject); + GC_DECLARE_ALLOCATOR(Geolocation); + +public: + void get_current_position(GC::Ref, GC::Ptr, Optional); + WebIDL::Long watch_position(GC::Ref, GC::Ptr, Optional); + void clear_watch(WebIDL::Long); + +private: + Geolocation(JS::Realm&); + + virtual void initialize(JS::Realm&) override; +}; + +} diff --git a/Libraries/LibWeb/Geolocation/Geolocation.idl b/Libraries/LibWeb/Geolocation/Geolocation.idl new file mode 100644 index 00000000000..4716d9dd83c --- /dev/null +++ b/Libraries/LibWeb/Geolocation/Geolocation.idl @@ -0,0 +1,30 @@ +// https://w3c.github.io/geolocation/#geolocation_interface +[Exposed=Window] +interface Geolocation { + undefined getCurrentPosition ( + PositionCallback successCallback, + optional PositionErrorCallback? errorCallback = null, + optional PositionOptions options = {}, + ); + + long watchPosition ( + PositionCallback successCallback, + optional PositionErrorCallback? errorCallback = null, + optional PositionOptions options = {}, + ); + + undefined clearWatch (long watchId); +}; + +// https://w3c.github.io/geolocation/#dom-positionoptions +dictionary PositionOptions { + boolean enableHighAccuracy = false; + [Clamp] unsigned long timeout = 0xFFFFFFFF; + [Clamp] unsigned long maximumAge = 0; +}; + +callback PositionCallback = undefined ( + GeolocationPosition position); + +callback PositionErrorCallback = undefined ( + GeolocationPositionError positionError); diff --git a/Libraries/LibWeb/Geolocation/GeolocationCoordinates.cpp b/Libraries/LibWeb/Geolocation/GeolocationCoordinates.cpp new file mode 100644 index 00000000000..1f4e4ff58f7 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationCoordinates.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +namespace Web::Geolocation { + +GC_DEFINE_ALLOCATOR(GeolocationCoordinates); + +GeolocationCoordinates::GeolocationCoordinates(JS::Realm& realm) + : PlatformObject(realm) +{ +} + +void GeolocationCoordinates::initialize(JS::Realm& realm) +{ + WEB_SET_PROTOTYPE_FOR_INTERFACE(GeolocationCoordinates); + Base::initialize(realm); +} + +} diff --git a/Libraries/LibWeb/Geolocation/GeolocationCoordinates.h b/Libraries/LibWeb/Geolocation/GeolocationCoordinates.h new file mode 100644 index 00000000000..a9b0e51b78d --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationCoordinates.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include + +namespace Web::Geolocation { + +// https://w3c.github.io/geolocation/#coordinates_interface +class GeolocationCoordinates : public Bindings::PlatformObject { + WEB_PLATFORM_OBJECT(GeolocationCoordinates, Bindings::PlatformObject); + GC_DECLARE_ALLOCATOR(GeolocationCoordinates); + +public: + double accuracy() const { return m_accuracy; } + double latitude() const { return m_latitude; } + double longitude() const { return m_longitude; } + Optional altitude() const { return m_altitude; } + Optional altitude_accuracy() const { return m_altitude_accuracy; } + Optional heading() const { return m_heading; } + Optional speed() const { return m_speed; } + +private: + GeolocationCoordinates(JS::Realm&); + + virtual void initialize(JS::Realm&) override; + + double m_accuracy { 0.0 }; + double m_latitude { 0.0 }; + double m_longitude { 0.0 }; + Optional m_altitude; + Optional m_altitude_accuracy; + Optional m_heading; + Optional m_speed; +}; + +} diff --git a/Libraries/LibWeb/Geolocation/GeolocationCoordinates.idl b/Libraries/LibWeb/Geolocation/GeolocationCoordinates.idl new file mode 100644 index 00000000000..9d273d59c46 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationCoordinates.idl @@ -0,0 +1,12 @@ +// https://w3c.github.io/geolocation/#coordinates_interface +[Exposed=Window, SecureContext] +interface GeolocationCoordinates { + readonly attribute double accuracy; + readonly attribute double latitude; + readonly attribute double longitude; + readonly attribute double? altitude; + readonly attribute double? altitudeAccuracy; + readonly attribute double? heading; + readonly attribute double? speed; + [Default] object toJSON(); +}; diff --git a/Libraries/LibWeb/Geolocation/GeolocationPosition.cpp b/Libraries/LibWeb/Geolocation/GeolocationPosition.cpp new file mode 100644 index 00000000000..f54536af53b --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationPosition.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +namespace Web::Geolocation { + +GC_DEFINE_ALLOCATOR(GeolocationPosition); + +GeolocationPosition::GeolocationPosition(JS::Realm& realm, GC::Ref coords, HighResolutionTime::EpochTimeStamp timestamp) + : PlatformObject(realm) + , m_coords(coords) + , m_timestamp(timestamp) +{ +} + +void GeolocationPosition::initialize(JS::Realm& realm) +{ + WEB_SET_PROTOTYPE_FOR_INTERFACE(GeolocationPosition); + Base::initialize(realm); +} + +void GeolocationPosition::visit_edges(Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_coords); +} + +} diff --git a/Libraries/LibWeb/Geolocation/GeolocationPosition.h b/Libraries/LibWeb/Geolocation/GeolocationPosition.h new file mode 100644 index 00000000000..583dd35c3c6 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationPosition.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include +#include + +namespace Web::Geolocation { + +// https://w3c.github.io/geolocation/#dom-geolocationposition +class GeolocationPosition : public Bindings::PlatformObject { + WEB_PLATFORM_OBJECT(GeolocationPosition, Bindings::PlatformObject); + GC_DECLARE_ALLOCATOR(GeolocationPosition); + +public: + GC::Ref coords() const { return m_coords; } + HighResolutionTime::EpochTimeStamp timestamp() const { return m_timestamp; } + +private: + GeolocationPosition(JS::Realm&, GC::Ref, HighResolutionTime::EpochTimeStamp); + + virtual void initialize(JS::Realm&) override; + virtual void visit_edges(Visitor&) override; + + GC::Ref m_coords; + HighResolutionTime::EpochTimeStamp m_timestamp; +}; + +} diff --git a/Libraries/LibWeb/Geolocation/GeolocationPosition.idl b/Libraries/LibWeb/Geolocation/GeolocationPosition.idl new file mode 100644 index 00000000000..18352efeb32 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationPosition.idl @@ -0,0 +1,10 @@ +#import +#import + +// https://w3c.github.io/geolocation/#position_interface +[Exposed=Window, SecureContext] +interface GeolocationPosition { + readonly attribute GeolocationCoordinates coords; + readonly attribute EpochTimeStamp timestamp; + [Default] object toJSON(); +}; diff --git a/Libraries/LibWeb/Geolocation/GeolocationPositionError.cpp b/Libraries/LibWeb/Geolocation/GeolocationPositionError.cpp new file mode 100644 index 00000000000..ebd76d83e3c --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationPositionError.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +namespace Web::Geolocation { + +GC_DEFINE_ALLOCATOR(GeolocationPositionError); + +GeolocationPositionError::GeolocationPositionError(JS::Realm& realm, ErrorCode code, String message) + : PlatformObject(realm) + , m_code(code) + , m_message(move(message)) +{ +} + +void GeolocationPositionError::initialize(JS::Realm& realm) +{ + WEB_SET_PROTOTYPE_FOR_INTERFACE(GeolocationPositionError); + Base::initialize(realm); +} + +} diff --git a/Libraries/LibWeb/Geolocation/GeolocationPositionError.h b/Libraries/LibWeb/Geolocation/GeolocationPositionError.h new file mode 100644 index 00000000000..fe39fc32575 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationPositionError.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +namespace Web::Geolocation { + +// https://w3c.github.io/geolocation/#dom-geolocationpositionerror +class GeolocationPositionError : public Bindings::PlatformObject { + WEB_PLATFORM_OBJECT(GeolocationPositionError, Bindings::PlatformObject); + GC_DECLARE_ALLOCATOR(GeolocationPositionError); + +public: + enum class ErrorCode : WebIDL::UnsignedShort { + PermissionDenied = 1, + PositionUnavailable = 2, + Timeout = 3, + }; + + ErrorCode code() const { return m_code; } + String message() const { return m_message; } + +private: + GeolocationPositionError(JS::Realm&, ErrorCode, String); + + virtual void initialize(JS::Realm&) override; + + ErrorCode m_code { 0 }; + String m_message; +}; + +} diff --git a/Libraries/LibWeb/Geolocation/GeolocationPositionError.idl b/Libraries/LibWeb/Geolocation/GeolocationPositionError.idl new file mode 100644 index 00000000000..588cda96b28 --- /dev/null +++ b/Libraries/LibWeb/Geolocation/GeolocationPositionError.idl @@ -0,0 +1,9 @@ +// https://w3c.github.io/geolocation/#dom-geolocationpositionerror +[Exposed=Window] +interface GeolocationPositionError { + const unsigned short PERMISSION_DENIED = 1; + const unsigned short POSITION_UNAVAILABLE = 2; + const unsigned short TIMEOUT = 3; + readonly attribute unsigned short code; + readonly attribute DOMString message; +}; diff --git a/Libraries/LibWeb/HTML/Navigator.cpp b/Libraries/LibWeb/HTML/Navigator.cpp index 13baee0b749..d8299ed7c39 100644 --- a/Libraries/LibWeb/HTML/Navigator.cpp +++ b/Libraries/LibWeb/HTML/Navigator.cpp @@ -2,6 +2,7 @@ * Copyright (c) 2022, Andrew Kaster * Copyright (c) 2022, Linus Groh * Copyright (c) 2024, Jamie Mansfield + * Copyright (c) 2025, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ @@ -12,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -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 Navigator::clipboard() return *m_clipboard; } +GC::Ref Navigator::geolocation() +{ + if (!m_geolocation) + m_geolocation = realm().create(realm()); + return *m_geolocation; +} + GC::Ref Navigator::user_activation() { if (!m_user_activation) diff --git a/Libraries/LibWeb/HTML/Navigator.h b/Libraries/LibWeb/HTML/Navigator.h index a046e5cd4b0..921fc0a44f9 100644 --- a/Libraries/LibWeb/HTML/Navigator.h +++ b/Libraries/LibWeb/HTML/Navigator.h @@ -53,6 +53,7 @@ public: [[nodiscard]] GC::Ref mime_types(); [[nodiscard]] GC::Ref plugins(); [[nodiscard]] GC::Ref clipboard(); + [[nodiscard]] GC::Ref geolocation(); [[nodiscard]] GC::Ref user_activation(); [[nodiscard]] GC::Ref credentials(); @@ -83,6 +84,9 @@ private: // https://w3c.github.io/clipboard-apis/#dom-navigator-clipboard GC::Ptr m_clipboard; + // https://w3c.github.io/geolocation/#navigator_interface + GC::Ptr m_geolocation; + // https://html.spec.whatwg.org/multipage/interaction.html#dom-navigator-useractivation GC::Ptr m_user_activation; diff --git a/Libraries/LibWeb/HTML/Navigator.idl b/Libraries/LibWeb/HTML/Navigator.idl index 6f6d75e084e..f46274f1b28 100644 --- a/Libraries/LibWeb/HTML/Navigator.idl +++ b/Libraries/LibWeb/HTML/Navigator.idl @@ -1,5 +1,6 @@ #import #import +#import #import #import #import @@ -21,6 +22,9 @@ interface Navigator { // https://w3c.github.io/clipboard-apis/#navigator-interface [SecureContext, SameObject] readonly attribute Clipboard clipboard; + // https://w3c.github.io/geolocation/#navigator_interface + [SameObject] readonly attribute Geolocation geolocation; + // https://w3c.github.io/pointerevents/#extensions-to-the-navigator-interface readonly attribute long maxTouchPoints; diff --git a/Libraries/LibWeb/idl_files.cmake b/Libraries/LibWeb/idl_files.cmake index b24ec81493d..d80d98593ee 100644 --- a/Libraries/LibWeb/idl_files.cmake +++ b/Libraries/LibWeb/idl_files.cmake @@ -104,6 +104,10 @@ libweb_js_bindings(FileAPI/File) libweb_js_bindings(FileAPI/FileList) libweb_js_bindings(FileAPI/FileReader) libweb_js_bindings(FileAPI/FileReaderSync) +libweb_js_bindings(Geolocation/Geolocation) +libweb_js_bindings(Geolocation/GeolocationCoordinates) +libweb_js_bindings(Geolocation/GeolocationPosition) +libweb_js_bindings(Geolocation/GeolocationPositionError) libweb_js_bindings(Geometry/DOMMatrix) libweb_js_bindings(Geometry/DOMMatrixReadOnly) libweb_js_bindings(Geometry/DOMPoint) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index 51c0be7fe49..0ff4905bd86 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -4724,6 +4724,7 @@ using namespace Web::EntriesAPI; using namespace Web::EventTiming; using namespace Web::Fetch; using namespace Web::FileAPI; +using namespace Web::Geolocation; using namespace Web::Geometry; using namespace Web::HighResolutionTime; using namespace Web::HTML; diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/Namespaces.h b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/Namespaces.h index d460969bfda..90327ac77f8 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/Namespaces.h +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/Namespaces.h @@ -23,6 +23,7 @@ static constexpr Array libweb_interface_namespaces = { "Encoding"sv, "Fetch"sv, "FileAPI"sv, + "Geolocation"sv, "Geometry"sv, "HTML"sv, "HighResolutionTime"sv, diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn index 0d6428c6b1a..4046f22a028 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn @@ -341,6 +341,7 @@ shared_library("LibWeb") { "EventTiming", "Fetch", "FileAPI", + "Geolocation", "Geometry", "HTML", "HighResolutionTime", diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/Geolocation/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWeb/Geolocation/BUILD.gn new file mode 100644 index 00000000000..1c406b804d1 --- /dev/null +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/Geolocation/BUILD.gn @@ -0,0 +1,10 @@ +source_set("Geolocation") { + configs += [ "//Userland/Libraries/LibWeb:configs" ] + deps = [ "//Userland/Libraries/LibWeb:all_generated" ] + sources = [ + "Geolocation.cpp", + "GeolocationCoordinates.cpp", + "GeolocationPosition.cpp", + "GeolocationPositionError.cpp", + ] +} diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni b/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni index 988a00992f0..e82f32e9952 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni @@ -105,6 +105,10 @@ standard_idl_files = [ "//Userland/Libraries/LibWeb/FileAPI/File.idl", "//Userland/Libraries/LibWeb/FileAPI/FileList.idl", "//Userland/Libraries/LibWeb/FileAPI/FileReader.idl", + "//Userland/Libraries/LibWeb/Geolocation/Geolocation.idl", + "//Userland/Libraries/LibWeb/Geolocation/GeolocationCoordinates.idl", + "//Userland/Libraries/LibWeb/Geolocation/GeolocationPosition.idl", + "//Userland/Libraries/LibWeb/Geolocation/GeolocationPositionError.idl", "//Userland/Libraries/LibWeb/Geometry/DOMMatrix.idl", "//Userland/Libraries/LibWeb/Geometry/DOMMatrixReadOnly.idl", "//Userland/Libraries/LibWeb/Geometry/DOMPoint.idl", diff --git a/Tests/LibWeb/Text/expected/all-window-properties.txt b/Tests/LibWeb/Text/expected/all-window-properties.txt index 1a18cdce95c..c1b25342da4 100644 --- a/Tests/LibWeb/Text/expected/all-window-properties.txt +++ b/Tests/LibWeb/Text/expected/all-window-properties.txt @@ -137,6 +137,10 @@ FormData FormDataEvent Function GainNode +Geolocation +GeolocationCoordinates +GeolocationPosition +GeolocationPositionError HTMLAllCollection HTMLAnchorElement HTMLAreaElement diff --git a/Tests/LibWeb/Text/expected/wpt-import/geolocation/idlharness.https.window.txt b/Tests/LibWeb/Text/expected/wpt-import/geolocation/idlharness.https.window.txt index c2ca49f66dd..6894049f545 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/geolocation/idlharness.https.window.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/geolocation/idlharness.https.window.txt @@ -2,8 +2,7 @@ Harness status: OK Found 68 tests -13 Pass -55 Fail +68 Pass Pass idl_test setup Pass idl_test validation Pass Partial interface Navigator: original interface defined @@ -17,58 +16,58 @@ Pass Navigator includes NavigatorContentUtils: member names are unique Pass Navigator includes NavigatorCookies: member names are unique Pass Navigator includes NavigatorPlugins: member names are unique Pass Navigator includes NavigatorConcurrentHardware: member names are unique -Fail Geolocation interface: existence and properties of interface object -Fail Geolocation interface object length -Fail Geolocation interface object name -Fail Geolocation interface: existence and properties of interface prototype object -Fail Geolocation interface: existence and properties of interface prototype object's "constructor" property -Fail Geolocation interface: existence and properties of interface prototype object's @@unscopables property -Fail Geolocation interface: operation getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) -Fail Geolocation interface: operation watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) -Fail Geolocation interface: operation clearWatch(long) -Fail Geolocation must be primary interface of navigator.geolocation -Fail Stringification of navigator.geolocation -Fail Geolocation interface: navigator.geolocation must inherit property "getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)" with the proper type -Fail Geolocation interface: calling getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) on navigator.geolocation with too few arguments must throw TypeError -Fail Geolocation interface: navigator.geolocation must inherit property "watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)" with the proper type -Fail Geolocation interface: calling watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) on navigator.geolocation with too few arguments must throw TypeError -Fail Geolocation interface: navigator.geolocation must inherit property "clearWatch(long)" with the proper type -Fail Geolocation interface: calling clearWatch(long) on navigator.geolocation with too few arguments must throw TypeError -Fail GeolocationPosition interface: existence and properties of interface object -Fail GeolocationPosition interface object length -Fail GeolocationPosition interface object name -Fail GeolocationPosition interface: existence and properties of interface prototype object -Fail GeolocationPosition interface: existence and properties of interface prototype object's "constructor" property -Fail GeolocationPosition interface: existence and properties of interface prototype object's @@unscopables property -Fail GeolocationPosition interface: attribute coords -Fail GeolocationPosition interface: attribute timestamp -Fail GeolocationPosition interface: operation toJSON() -Fail GeolocationCoordinates interface: existence and properties of interface object -Fail GeolocationCoordinates interface object length -Fail GeolocationCoordinates interface object name -Fail GeolocationCoordinates interface: existence and properties of interface prototype object -Fail GeolocationCoordinates interface: existence and properties of interface prototype object's "constructor" property -Fail GeolocationCoordinates interface: existence and properties of interface prototype object's @@unscopables property -Fail GeolocationCoordinates interface: attribute accuracy -Fail GeolocationCoordinates interface: attribute latitude -Fail GeolocationCoordinates interface: attribute longitude -Fail GeolocationCoordinates interface: attribute altitude -Fail GeolocationCoordinates interface: attribute altitudeAccuracy -Fail GeolocationCoordinates interface: attribute heading -Fail GeolocationCoordinates interface: attribute speed -Fail GeolocationCoordinates interface: operation toJSON() -Fail GeolocationPositionError interface: existence and properties of interface object -Fail GeolocationPositionError interface object length -Fail GeolocationPositionError interface object name -Fail GeolocationPositionError interface: existence and properties of interface prototype object -Fail GeolocationPositionError interface: existence and properties of interface prototype object's "constructor" property -Fail GeolocationPositionError interface: existence and properties of interface prototype object's @@unscopables property -Fail GeolocationPositionError interface: constant PERMISSION_DENIED on interface object -Fail GeolocationPositionError interface: constant PERMISSION_DENIED on interface prototype object -Fail GeolocationPositionError interface: constant POSITION_UNAVAILABLE on interface object -Fail GeolocationPositionError interface: constant POSITION_UNAVAILABLE on interface prototype object -Fail GeolocationPositionError interface: constant TIMEOUT on interface object -Fail GeolocationPositionError interface: constant TIMEOUT on interface prototype object -Fail GeolocationPositionError interface: attribute code -Fail GeolocationPositionError interface: attribute message -Fail Navigator interface: attribute geolocation \ No newline at end of file +Pass Geolocation interface: existence and properties of interface object +Pass Geolocation interface object length +Pass Geolocation interface object name +Pass Geolocation interface: existence and properties of interface prototype object +Pass Geolocation interface: existence and properties of interface prototype object's "constructor" property +Pass Geolocation interface: existence and properties of interface prototype object's @@unscopables property +Pass Geolocation interface: operation getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) +Pass Geolocation interface: operation watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) +Pass Geolocation interface: operation clearWatch(long) +Pass Geolocation must be primary interface of navigator.geolocation +Pass Stringification of navigator.geolocation +Pass Geolocation interface: navigator.geolocation must inherit property "getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)" with the proper type +Pass Geolocation interface: calling getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) on navigator.geolocation with too few arguments must throw TypeError +Pass Geolocation interface: navigator.geolocation must inherit property "watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)" with the proper type +Pass Geolocation interface: calling watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) on navigator.geolocation with too few arguments must throw TypeError +Pass Geolocation interface: navigator.geolocation must inherit property "clearWatch(long)" with the proper type +Pass Geolocation interface: calling clearWatch(long) on navigator.geolocation with too few arguments must throw TypeError +Pass GeolocationPosition interface: existence and properties of interface object +Pass GeolocationPosition interface object length +Pass GeolocationPosition interface object name +Pass GeolocationPosition interface: existence and properties of interface prototype object +Pass GeolocationPosition interface: existence and properties of interface prototype object's "constructor" property +Pass GeolocationPosition interface: existence and properties of interface prototype object's @@unscopables property +Pass GeolocationPosition interface: attribute coords +Pass GeolocationPosition interface: attribute timestamp +Pass GeolocationPosition interface: operation toJSON() +Pass GeolocationCoordinates interface: existence and properties of interface object +Pass GeolocationCoordinates interface object length +Pass GeolocationCoordinates interface object name +Pass GeolocationCoordinates interface: existence and properties of interface prototype object +Pass GeolocationCoordinates interface: existence and properties of interface prototype object's "constructor" property +Pass GeolocationCoordinates interface: existence and properties of interface prototype object's @@unscopables property +Pass GeolocationCoordinates interface: attribute accuracy +Pass GeolocationCoordinates interface: attribute latitude +Pass GeolocationCoordinates interface: attribute longitude +Pass GeolocationCoordinates interface: attribute altitude +Pass GeolocationCoordinates interface: attribute altitudeAccuracy +Pass GeolocationCoordinates interface: attribute heading +Pass GeolocationCoordinates interface: attribute speed +Pass GeolocationCoordinates interface: operation toJSON() +Pass GeolocationPositionError interface: existence and properties of interface object +Pass GeolocationPositionError interface object length +Pass GeolocationPositionError interface object name +Pass GeolocationPositionError interface: existence and properties of interface prototype object +Pass GeolocationPositionError interface: existence and properties of interface prototype object's "constructor" property +Pass GeolocationPositionError interface: existence and properties of interface prototype object's @@unscopables property +Pass GeolocationPositionError interface: constant PERMISSION_DENIED on interface object +Pass GeolocationPositionError interface: constant PERMISSION_DENIED on interface prototype object +Pass GeolocationPositionError interface: constant POSITION_UNAVAILABLE on interface object +Pass GeolocationPositionError interface: constant POSITION_UNAVAILABLE on interface prototype object +Pass GeolocationPositionError interface: constant TIMEOUT on interface object +Pass GeolocationPositionError interface: constant TIMEOUT on interface prototype object +Pass GeolocationPositionError interface: attribute code +Pass GeolocationPositionError interface: attribute message +Pass Navigator interface: attribute geolocation \ No newline at end of file