mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
AK: Port URL username/password from DeprecatedString to String
And for cases that just need to check whether the password/username is empty, add a raw_{password,username} helper to avoid any allocation.
This commit is contained in:
parent
6b29dc3e46
commit
55a01e72ca
Notes:
sideshowbarker
2024-07-17 11:33:34 +09:00
Author: https://github.com/shannonbooth
Commit: 55a01e72ca
Pull-request: https://github.com/SerenityOS/serenity/pull/20510
Reviewed-by: https://github.com/ADKaster ✅
11 changed files with 44 additions and 39 deletions
|
@ -215,8 +215,8 @@ static bool url_matches_about_blank(AK::URL const& url)
|
|||
// A URL matches about:blank if its scheme is "about", its path contains a single string "blank", its username and password are the empty string, and its host is null.
|
||||
return url.scheme() == "about"sv
|
||||
&& url.serialize_path() == "blank"sv
|
||||
&& url.username().is_empty()
|
||||
&& url.password().is_empty()
|
||||
&& url.raw_username().is_empty()
|
||||
&& url.raw_password().is_empty()
|
||||
&& url.host().has<Empty>();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue