Bug 158988 - Solve the confusion around blankURL() and isBlankURL() in URL
Summary: Solve the confusion around blankURL() and isBlankURL() in URL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-21 09:45 PDT by John Wilander
Modified: 2018-10-12 12:21 PDT (History)
6 users (show)

See Also:


Attachments
Patch (21.28 KB, patch)
2018-10-09 15:44 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (21.48 KB, patch)
2018-10-10 08:36 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2016-06-21 09:45:48 PDT
These two functions in URL are causing confusion:

const URL& blankURL()
{
    static NeverDestroyed<URL> staticBlankURL(ParsedURLString, "about:blank");
    return staticBlankURL;
}

bool URL::isBlankURL() const
{
    return protocolIs("about");
}

We should consolidate into one notion of a blank URL and make sure callers get what they are expecting. This might require a new isAboutURL() function or similar.
Comment 1 Rob Buis 2018-10-09 15:44:32 PDT
Created attachment 351920 [details]
Patch
Comment 2 Rob Buis 2018-10-10 08:36:37 PDT
Created attachment 351963 [details]
Patch
Comment 3 John Wilander 2018-10-10 11:05:12 PDT
Comment on attachment 351963 [details]
Patch

Looks good to me.
Comment 4 John Wilander 2018-10-10 11:06:43 PDT
CCing Dan Bates and Alex Christensen since Dan had opinions one about:blank previously and Alex wrote most of our URL logic.
Comment 5 Alex Christensen 2018-10-12 11:52:02 PDT
Comment on attachment 351963 [details]
Patch

renaming will make it so we don't introduce more problems.
Comment 6 WebKit Commit Bot 2018-10-12 12:20:17 PDT
Comment on attachment 351963 [details]
Patch

Clearing flags on attachment: 351963

Committed r237073: <https://trac.webkit.org/changeset/237073>
Comment 7 WebKit Commit Bot 2018-10-12 12:20:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-10-12 12:21:22 PDT
<rdar://problem/45233696>