[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

Attachment 398388: Patch


--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 398388
  --> https://bugs.webkit.org/attachment.cgi?id=398388

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:


That’s one of the benefits of StringView. Not sure we need to add the new

The name seems to imply some difference between having "no host" and "empty

> Source/WebCore/html/URLDecomposition.cpp:61
> +    if (fullURL.hasEmptyHost() || fullURL.cannotBeABaseURL() ||

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