[webkit-reviews] review granted: [Bug 211358] A URL cannot have a username/password/port if its host is null : [Attachment 398388] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 4 11:15:23 PDT 2020
Darin Adler <darin at apple.com> has granted Rob Buis <rbuis at igalia.com>'s request
for review:
Bug 211358: A URL cannot have a username/password/port if its host is null
https://bugs.webkit.org/show_bug.cgi?id=211358
Attachment 398388: Patch
https://bugs.webkit.org/attachment.cgi?id=398388&action=review
--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 398388
--> https://bugs.webkit.org/attachment.cgi?id=398388
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=398388&action=review
> Source/WTF/wtf/URL.h:169
> + WTF_EXPORT_PRIVATE bool hasEmptyHost() const;
This is not significantly more efficient than writing:
fullURL.host().isEmpty()
That’s one of the benefits of StringView. Not sure we need to add the new
function.
The name seems to imply some difference between having "no host" and "empty
host".
> Source/WebCore/html/URLDecomposition.cpp:61
> + if (fullURL.hasEmptyHost() || fullURL.cannotBeABaseURL() ||
fullURL.protocolIs("file"))
Starting to think we need a URL::protocolIsFile function. Also irritated that
there’s no concept here, like "cannot be base URL".
More information about the webkit-reviews
mailing list