mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of the system, as LibCore depends on LibURL. This change has two main benefits: * Moving AK back more towards being an agnostic library that can be used between the kernel and userspace. URL has never really fit that description - and is not used in the kernel. * URL _should_ depend on LibUnicode, as it needs punnycode support. However, it's not really possible to do this inside of AK as it can't depend on any external library. This change brings us a little closer to being able to do that, but unfortunately we aren't there quite yet, as the code generators depend on LibCore.
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibGfx/Size.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/SharedImageRequest.h>
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
State state() const;
|
||||
void set_state(State);
|
||||
|
||||
URL const& current_url() const;
|
||||
void set_current_url(JS::Realm&, URL);
|
||||
URL::URL const& current_url() const;
|
||||
void set_current_url(JS::Realm&, URL::URL);
|
||||
|
||||
[[nodiscard]] JS::GCPtr<DecodedImageData> image_data() const;
|
||||
void set_image_data(JS::GCPtr<DecodedImageData>);
|
||||
@@ -73,7 +73,7 @@ private:
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#img-req-url
|
||||
// An image request's current URL is initially the empty string.
|
||||
URL m_current_url;
|
||||
URL::URL m_current_url;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#img-req-data
|
||||
JS::GCPtr<DecodedImageData> m_image_data;
|
||||
|
||||
Reference in New Issue
Block a user