mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibURL: Replace use of URL::get_public_suffix
It is confusing to have both URL::Host::public_suffix and URL:get_public_suffix, both with slightly different semantics. Instead, use PublicSuffixData for cases that just want a direct match against the list, and URL::Host::public_suffix in LibWeb land as the URL spec defined AO.
This commit is contained in:
parent
e6ecafea84
commit
a2b523eeb8
Notes:
github-actions[bot]
2025-06-29 11:49:11 +00:00
Author: https://github.com/shannonbooth
Commit: a2b523eeb8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5242
Reviewed-by: https://github.com/tcl3 ✅
5 changed files with 9 additions and 13 deletions
|
@ -3845,10 +3845,10 @@ static bool is_a_registrable_domain_suffix_of_or_is_equal_to(StringView host_suf
|
|||
// * hostSuffix equals hostSuffix's public suffix; or
|
||||
// * hostSuffix, prefixed by U+002E (.), matches the end of originalHost's public suffix,
|
||||
// then return false. [URL]
|
||||
if (host_suffix_string == URL::get_public_suffix(host_suffix_string))
|
||||
if (host_suffix_string == host_suffix->public_suffix())
|
||||
return false;
|
||||
|
||||
auto original_host_public_suffix = URL::get_public_suffix(original_host_string);
|
||||
auto original_host_public_suffix = original_host.public_suffix();
|
||||
VERIFY(original_host_public_suffix.has_value());
|
||||
|
||||
if (original_host_public_suffix->ends_with_bytes(prefixed_host_suffix))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue