mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
LibWeb: Rename URL platform object to DOMURL
Along with putting functions in the URL namespace into a DOMURL namespace. This is done as LibWeb is in an awkward situation where it needs two URL classes. AK::URL is the general purpose URL class which is all that is needed in 95% of cases. URL in the Web namespace is needed predominantly for interfacing with the javascript interfaces. Because of two URLs in the same namespace, AK::URL has had to be used throughout LibWeb. If we move AK::URL into a URL namespace, this becomes more painful - where ::URL::URL is required to specify the constructor (and something like ::URL::create_with_url_or_path in other places). To fix this problem - rename the class in LibWeb implementing the URL IDL interface to DOMURL, along with moving the other Web URL related classes into this DOMURL folder. One could argue that this name also makes the situation a little more clear in LibWeb for why these two URL classes need be used in the first place.
This commit is contained in:
parent
1b6346ee1c
commit
f9e5b43b7a
Notes:
sideshowbarker
2024-07-17 07:11:12 +09:00
Author: https://github.com/shannonbooth
Commit: f9e5b43b7a
Pull-request: https://github.com/SerenityOS/serenity/pull/23152
Reviewed-by: https://github.com/awesomekling ✅
30 changed files with 125 additions and 125 deletions
|
@ -4,10 +4,10 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/DOMURL/DOMURL.h>
|
||||
#include <LibWeb/Fetch/Fetching/Checks.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
|
||||
#include <LibWeb/URL/URL.h>
|
||||
|
||||
namespace Web::Fetch::Fetching {
|
||||
|
||||
|
@ -70,7 +70,7 @@ ErrorOr<bool> tao_check(Infrastructure::Request const& request, Infrastructure::
|
|||
// information, but the container document would not.
|
||||
if (request.mode() == Infrastructure::Request::Mode::Navigate
|
||||
&& request.origin().has<HTML::Origin>()
|
||||
&& !URL::url_origin(request.current_url()).is_same_origin(request.origin().get<HTML::Origin>())) {
|
||||
&& !DOMURL::url_origin(request.current_url()).is_same_origin(request.origin().get<HTML::Origin>())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue