diff options
Diffstat (limited to 'Userland/Libraries/LibWeb')
16 files changed, 127 insertions, 127 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp index ec1e3cd395..0cc5e3a063 100644 --- a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp +++ b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp @@ -31,7 +31,7 @@ void CSSNamespace::initialize(JS::GlobalObject& global_object) } // https://www.w3.org/TR/cssom-1/#dom-css-escape -JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::escape) +JS_DEFINE_OLD_NATIVE_FUNCTION(CSSNamespace::escape) { if (!vm.argument_count()) { vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::BadArgCountAtLeastOne, "CSS.escape"); @@ -44,7 +44,7 @@ JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::escape) } // https://www.w3.org/TR/css-conditional-3/#dom-css-supports -JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::supports) +JS_DEFINE_OLD_NATIVE_FUNCTION(CSSNamespace::supports) { if (!vm.argument_count()) { vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::BadArgCountAtLeastOne, "CSS.supports"); diff --git a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h index 2791c54580..2a0942448a 100644 --- a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h +++ b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h @@ -21,8 +21,8 @@ public: virtual ~CSSNamespace() override; private: - JS_DECLARE_NATIVE_FUNCTION(escape); - JS_DECLARE_NATIVE_FUNCTION(supports); + JS_DECLARE_OLD_NATIVE_FUNCTION(escape); + JS_DECLARE_OLD_NATIVE_FUNCTION(supports); }; } diff --git a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp index f44f7f5bfd..ef7b41ad63 100644 --- a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp +++ b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp @@ -44,13 +44,13 @@ LocationObject::~LocationObject() { } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::href_getter) { auto& window = static_cast<WindowObject&>(global_object); return JS::js_string(vm, window.impl().associated_document().url().to_string()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_setter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::href_setter) { auto& window = static_cast<WindowObject&>(global_object); auto new_href = TRY_OR_DISCARD(vm.argument(0).to_string(global_object)); @@ -63,26 +63,26 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_setter) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::pathname_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::pathname_getter) { auto& window = static_cast<WindowObject&>(global_object); return JS::js_string(vm, window.impl().associated_document().url().path()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::hostname_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::hostname_getter) { auto& window = static_cast<WindowObject&>(global_object); return JS::js_string(vm, window.impl().associated_document().url().host()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::host_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::host_getter) { auto& window = static_cast<WindowObject&>(global_object); auto url = window.impl().associated_document().url(); return JS::js_string(vm, String::formatted("{}:{}", url.host(), url.port_or_default())); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::hash_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::hash_getter) { auto& window = static_cast<WindowObject&>(global_object); auto fragment = window.impl().associated_document().url().fragment(); @@ -94,7 +94,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::hash_getter) return JS::js_string(vm, builder.to_string()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::search_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::search_getter) { auto& window = static_cast<WindowObject&>(global_object); auto query = window.impl().associated_document().url().query(); @@ -106,7 +106,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::search_getter) return JS::js_string(vm, builder.to_string()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::protocol_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::protocol_getter) { auto& window = static_cast<WindowObject&>(global_object); StringBuilder builder; @@ -115,20 +115,20 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::protocol_getter) return JS::js_string(vm, builder.to_string()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::port_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::port_getter) { auto& window = static_cast<WindowObject&>(global_object); return JS::Value(window.impl().associated_document().url().port_or_default()); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::reload) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::reload) { auto& window = static_cast<WindowObject&>(global_object); window.impl().did_call_location_reload({}); return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(LocationObject::replace) +JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::replace) { auto& window = static_cast<WindowObject&>(global_object); auto url = TRY_OR_DISCARD(vm.argument(0).to_string(global_object)); diff --git a/Userland/Libraries/LibWeb/Bindings/LocationObject.h b/Userland/Libraries/LibWeb/Bindings/LocationObject.h index e89d82b22e..980f65cd47 100644 --- a/Userland/Libraries/LibWeb/Bindings/LocationObject.h +++ b/Userland/Libraries/LibWeb/Bindings/LocationObject.h @@ -29,19 +29,19 @@ public: // but we don't have the infrastructure in place to implement them yet. private: - JS_DECLARE_NATIVE_FUNCTION(reload); - JS_DECLARE_NATIVE_FUNCTION(replace); - - JS_DECLARE_NATIVE_FUNCTION(href_getter); - JS_DECLARE_NATIVE_FUNCTION(href_setter); - - JS_DECLARE_NATIVE_FUNCTION(host_getter); - JS_DECLARE_NATIVE_FUNCTION(hostname_getter); - JS_DECLARE_NATIVE_FUNCTION(pathname_getter); - JS_DECLARE_NATIVE_FUNCTION(hash_getter); - JS_DECLARE_NATIVE_FUNCTION(search_getter); - JS_DECLARE_NATIVE_FUNCTION(protocol_getter); - JS_DECLARE_NATIVE_FUNCTION(port_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(reload); + JS_DECLARE_OLD_NATIVE_FUNCTION(replace); + + JS_DECLARE_OLD_NATIVE_FUNCTION(href_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(href_setter); + + JS_DECLARE_OLD_NATIVE_FUNCTION(host_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(hostname_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(pathname_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(hash_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(search_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(protocol_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(port_getter); }; } diff --git a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp index 057dd0000c..bc494d07a0 100644 --- a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp +++ b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp @@ -44,12 +44,12 @@ NavigatorObject::~NavigatorObject() { } -JS_DEFINE_NATIVE_FUNCTION(NavigatorObject::user_agent_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(NavigatorObject::user_agent_getter) { return JS::js_string(vm, ResourceLoader::the().user_agent()); } -JS_DEFINE_NATIVE_FUNCTION(NavigatorObject::cookie_enabled_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(NavigatorObject::cookie_enabled_getter) { // No way of disabling cookies right now :^) return JS::Value(true); diff --git a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h index 3125d35a40..807483b2d3 100644 --- a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h +++ b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h @@ -21,8 +21,8 @@ public: virtual ~NavigatorObject() override; private: - JS_DECLARE_NATIVE_FUNCTION(user_agent_getter); - JS_DECLARE_NATIVE_FUNCTION(cookie_enabled_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(user_agent_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(cookie_enabled_getter); }; } diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp index 24b670ea1d..a7dff7685a 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp @@ -179,7 +179,7 @@ static DOM::Window* impl_from(JS::VM& vm, JS::GlobalObject& global_object) return &static_cast<WindowObject*>(this_object)->impl(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::alert) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::alert) { // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#simple-dialogs // Note: This method is defined using two overloads, instead of using an optional argument, @@ -195,7 +195,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::alert) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::confirm) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::confirm) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -206,7 +206,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::confirm) return JS::Value(impl->confirm(message)); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::prompt) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::prompt) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -224,7 +224,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::prompt) } // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval -JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_interval) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::set_interval) { // FIXME: Ideally this would share more code with setTimeout() using the "timer initialization steps" // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps @@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_interval) } // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout -JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_timeout) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::set_timeout) { // FIXME: Ideally this would share more code with setInterval() using the "timer initialization steps" // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps @@ -297,7 +297,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_timeout) return JS::Value(timer_id); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_timeout) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::clear_timeout) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -311,7 +311,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_timeout) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_interval) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::clear_interval) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -325,7 +325,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_interval) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::request_animation_frame) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::request_animation_frame) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -342,7 +342,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::request_animation_frame) return JS::Value(impl->request_animation_frame(*static_cast<JS::FunctionObject*>(callback_object))); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::cancel_animation_frame) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::cancel_animation_frame) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -356,7 +356,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::cancel_animation_frame) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::queue_microtask) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::queue_microtask) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -375,7 +375,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::queue_microtask) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::atob) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::atob) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -393,7 +393,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::atob) return JS::js_string(vm, decoder->to_utf8(decoded)); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::btoa) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -419,7 +419,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa) } // https://html.spec.whatwg.org/multipage/browsers.html#dom-top -JS_DEFINE_NATIVE_FUNCTION(WindowObject::top_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::top_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -435,7 +435,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::top_getter) } // https://html.spec.whatwg.org/multipage/browsers.html#dom-parent -JS_DEFINE_NATIVE_FUNCTION(WindowObject::parent_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::parent_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -454,7 +454,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::parent_getter) return impl->wrapper(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::document_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::document_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -462,7 +462,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::document_getter) return wrap(global_object, impl->associated_document()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::performance_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::performance_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -470,7 +470,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::performance_getter) return wrap(global_object, impl->performance()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -478,7 +478,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_getter) return wrap(global_object, impl->screen()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::event_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::event_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -488,12 +488,12 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::event_getter) return wrap(global_object, const_cast<DOM::Event&>(*impl->current_event())); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::event_setter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::event_setter) { REPLACEABLE_PROPERTY_SETTER(WindowObject, event); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::crypto_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::crypto_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -501,7 +501,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::crypto_getter) return wrap(global_object, impl->crypto()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_width_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::inner_width_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -509,7 +509,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_width_getter) return JS::Value(impl->inner_width()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_height_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::inner_height_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -517,7 +517,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_height_getter) return JS::Value(impl->inner_height()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::device_pixel_ratio_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::device_pixel_ratio_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -525,7 +525,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::device_pixel_ratio_getter) return JS::Value(impl->device_pixel_ratio()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_computed_style) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::get_computed_style) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -539,7 +539,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_computed_style) return wrap(global_object, impl->get_computed_style(static_cast<ElementWrapper*>(object)->impl())); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_selection) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::get_selection) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -550,7 +550,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_selection) return wrap(global_object, *selection); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::match_media) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::match_media) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -560,7 +560,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::match_media) } // https://www.w3.org/TR/cssom-view/#dom-window-scrollx -JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_x_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll_x_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -569,7 +569,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_x_getter) } // https://www.w3.org/TR/cssom-view/#dom-window-scrolly -JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_y_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll_y_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -591,7 +591,7 @@ static void perform_a_scroll(Page& page, double x, double y, ScrollBehavior) } // https://www.w3.org/TR/cssom-view/#dom-window-scroll -JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -645,7 +645,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll) } // https://www.w3.org/TR/cssom-view/#dom-window-scrollby -JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_by) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll_by) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -696,7 +696,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_by) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::history_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::history_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -704,7 +704,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::history_getter) return wrap(global_object, impl->associated_document().history()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_left_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_left_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -712,7 +712,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_left_getter) return JS::Value(impl->screen_x()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_top_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_top_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -720,7 +720,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_top_getter) return JS::Value(impl->screen_y()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_x_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_x_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -728,7 +728,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_x_getter) return JS::Value(impl->screen_x()); } -JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_y_getter) { auto* impl = impl_from(vm, global_object); if (!impl) @@ -737,7 +737,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter) } #define __ENUMERATE(attribute, event_name) \ - JS_DEFINE_NATIVE_FUNCTION(WindowObject::attribute##_getter) \ + JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::attribute##_getter) \ { \ auto* impl = impl_from(vm, global_object); \ if (!impl) \ @@ -747,7 +747,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter) return JS::js_null(); \ return retval.callback.cell(); \ } \ - JS_DEFINE_NATIVE_FUNCTION(WindowObject::attribute##_setter) \ + JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::attribute##_setter) \ { \ auto* impl = impl_from(vm, global_object); \ if (!impl) \ diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h index c86a89de5e..89fddf8bd4 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h @@ -66,57 +66,57 @@ public: private: virtual void visit_edges(Visitor&) override; - JS_DECLARE_NATIVE_FUNCTION(top_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(top_getter); - JS_DECLARE_NATIVE_FUNCTION(document_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(document_getter); - JS_DECLARE_NATIVE_FUNCTION(performance_getter); - JS_DECLARE_NATIVE_FUNCTION(history_getter); - JS_DECLARE_NATIVE_FUNCTION(screen_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(performance_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(history_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(screen_getter); - JS_DECLARE_NATIVE_FUNCTION(event_getter); - JS_DECLARE_NATIVE_FUNCTION(event_setter); + JS_DECLARE_OLD_NATIVE_FUNCTION(event_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(event_setter); - JS_DECLARE_NATIVE_FUNCTION(inner_width_getter); - JS_DECLARE_NATIVE_FUNCTION(inner_height_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(inner_width_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(inner_height_getter); - JS_DECLARE_NATIVE_FUNCTION(parent_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(parent_getter); - JS_DECLARE_NATIVE_FUNCTION(device_pixel_ratio_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(device_pixel_ratio_getter); - JS_DECLARE_NATIVE_FUNCTION(scroll_x_getter); - JS_DECLARE_NATIVE_FUNCTION(scroll_y_getter); - JS_DECLARE_NATIVE_FUNCTION(scroll); - JS_DECLARE_NATIVE_FUNCTION(scroll_by); + JS_DECLARE_OLD_NATIVE_FUNCTION(scroll_x_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(scroll_y_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(scroll); + JS_DECLARE_OLD_NATIVE_FUNCTION(scroll_by); - JS_DECLARE_NATIVE_FUNCTION(screen_x_getter); - JS_DECLARE_NATIVE_FUNCTION(screen_y_getter); - JS_DECLARE_NATIVE_FUNCTION(screen_left_getter); - JS_DECLARE_NATIVE_FUNCTION(screen_top_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(screen_x_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(screen_y_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(screen_left_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(screen_top_getter); - JS_DECLARE_NATIVE_FUNCTION(alert); - JS_DECLARE_NATIVE_FUNCTION(confirm); - JS_DECLARE_NATIVE_FUNCTION(prompt); - JS_DECLARE_NATIVE_FUNCTION(set_interval); - JS_DECLARE_NATIVE_FUNCTION(set_timeout); - JS_DECLARE_NATIVE_FUNCTION(clear_interval); - JS_DECLARE_NATIVE_FUNCTION(clear_timeout); - JS_DECLARE_NATIVE_FUNCTION(request_animation_frame); - JS_DECLARE_NATIVE_FUNCTION(cancel_animation_frame); - JS_DECLARE_NATIVE_FUNCTION(atob); - JS_DECLARE_NATIVE_FUNCTION(btoa); + JS_DECLARE_OLD_NATIVE_FUNCTION(alert); + JS_DECLARE_OLD_NATIVE_FUNCTION(confirm); + JS_DECLARE_OLD_NATIVE_FUNCTION(prompt); + JS_DECLARE_OLD_NATIVE_FUNCTION(set_interval); + JS_DECLARE_OLD_NATIVE_FUNCTION(set_timeout); + JS_DECLARE_OLD_NATIVE_FUNCTION(clear_interval); + JS_DECLARE_OLD_NATIVE_FUNCTION(clear_timeout); + JS_DECLARE_OLD_NATIVE_FUNCTION(request_animation_frame); + JS_DECLARE_OLD_NATIVE_FUNCTION(cancel_animation_frame); + JS_DECLARE_OLD_NATIVE_FUNCTION(atob); + JS_DECLARE_OLD_NATIVE_FUNCTION(btoa); - JS_DECLARE_NATIVE_FUNCTION(get_computed_style); - JS_DECLARE_NATIVE_FUNCTION(match_media); - JS_DECLARE_NATIVE_FUNCTION(get_selection); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_computed_style); + JS_DECLARE_OLD_NATIVE_FUNCTION(match_media); + JS_DECLARE_OLD_NATIVE_FUNCTION(get_selection); - JS_DECLARE_NATIVE_FUNCTION(queue_microtask); + JS_DECLARE_OLD_NATIVE_FUNCTION(queue_microtask); - JS_DECLARE_NATIVE_FUNCTION(crypto_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(crypto_getter); -#define __ENUMERATE(attribute, event_name) \ - JS_DECLARE_NATIVE_FUNCTION(attribute##_getter); \ - JS_DECLARE_NATIVE_FUNCTION(attribute##_setter); +#define __ENUMERATE(attribute, event_name) \ + JS_DECLARE_OLD_NATIVE_FUNCTION(attribute##_getter); \ + JS_DECLARE_OLD_NATIVE_FUNCTION(attribute##_setter); ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE); #undef __ENUMERATE diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp index 1db0997d0f..0d2f71f6af 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp @@ -16,7 +16,7 @@ void WebAssemblyInstancePrototype::initialize(JS::GlobalObject& global_object) define_native_accessor("exports", exports_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter) { auto this_value = vm.this_value(global_object); auto* this_object = TRY_OR_DISCARD(this_value.to_object(global_object)); diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h index fff25310e1..4417787135 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h @@ -25,7 +25,7 @@ public: virtual void initialize(JS::GlobalObject&) override; private: - JS_DECLARE_NATIVE_FUNCTION(exports_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(exports_getter); static JS::Handle<WebAssemblyInstancePrototype> s_instance; }; diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp index bc4020ce7a..ec85d245bd 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp @@ -17,7 +17,7 @@ void WebAssemblyMemoryPrototype::initialize(JS::GlobalObject& global_object) define_native_function("grow", grow, 1, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow) { auto page_count = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object)); auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object)); @@ -40,7 +40,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow) return JS::Value(static_cast<u32>(previous_size)); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::buffer_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::buffer_getter) { auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object)); if (!is<WebAssemblyMemoryObject>(this_object)) { diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h index 74fd7b0322..00f54c8692 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h @@ -27,8 +27,8 @@ public: virtual void initialize(JS::GlobalObject&) override; private: - JS_DECLARE_NATIVE_FUNCTION(grow); - JS_DECLARE_NATIVE_FUNCTION(buffer_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(grow); + JS_DECLARE_OLD_NATIVE_FUNCTION(buffer_getter); }; } diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp index 51e21fbdde..1c4b72c4c2 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp @@ -87,7 +87,7 @@ void WebAssemblyObject::visit_edges(Visitor& visitor) } } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::validate) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::validate) { // FIXME: Implement this once module validation is implemented in LibWasm. dbgln("Hit WebAssemblyObject::validate() stub!"); @@ -127,7 +127,7 @@ Result<size_t, JS::Value> parse_module(JS::GlobalObject& global_object, JS::Obje return WebAssemblyObject::s_compiled_modules.size() - 1; } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::compile) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::compile) { // FIXME: This shouldn't block! auto buffer_or_error = vm.argument(0).to_object(global_object); @@ -308,7 +308,7 @@ Result<size_t, JS::Value> WebAssemblyObject::instantiate_module(Wasm::Module con return s_instantiated_modules.size() - 1; } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::instantiate) { // FIXME: This shouldn't block! auto buffer_or_error = vm.argument(0).to_object(global_object); diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h index 2c0eae4349..4bc959472f 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h @@ -60,9 +60,9 @@ public: static Wasm::AbstractMachine s_abstract_machine; private: - JS_DECLARE_NATIVE_FUNCTION(validate); - JS_DECLARE_NATIVE_FUNCTION(compile); - JS_DECLARE_NATIVE_FUNCTION(instantiate); + JS_DECLARE_OLD_NATIVE_FUNCTION(validate); + JS_DECLARE_OLD_NATIVE_FUNCTION(compile); + JS_DECLARE_OLD_NATIVE_FUNCTION(instantiate); }; class WebAssemblyMemoryObject final : public JS::Object { diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp index 7493579e2e..ffc0d8b3d8 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp @@ -19,7 +19,7 @@ void WebAssemblyTablePrototype::initialize(JS::GlobalObject& global_object) define_native_function("set", set, 1, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::grow) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::grow) { auto delta = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object)); @@ -56,7 +56,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::grow) return JS::Value(static_cast<u32>(initial_size)); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::get) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::get) { auto index = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object)); @@ -84,7 +84,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::get) return to_js_value(wasm_value, global_object); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::set) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::set) { auto index = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object)); @@ -121,7 +121,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::set) return JS::js_undefined(); } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::length_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::length_getter) { auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object)); if (!is<WebAssemblyTableObject>(this_object)) { diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h index e3075c63ae..9e034e70c0 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h @@ -27,10 +27,10 @@ public: virtual void initialize(JS::GlobalObject& global_object) override; private: - JS_DECLARE_NATIVE_FUNCTION(grow); - JS_DECLARE_NATIVE_FUNCTION(get); - JS_DECLARE_NATIVE_FUNCTION(set); - JS_DECLARE_NATIVE_FUNCTION(length_getter); + JS_DECLARE_OLD_NATIVE_FUNCTION(grow); + JS_DECLARE_OLD_NATIVE_FUNCTION(get); + JS_DECLARE_OLD_NATIVE_FUNCTION(set); + JS_DECLARE_OLD_NATIVE_FUNCTION(length_getter); }; } |