Bug 161618 - Implement relative file URLs and begin implementing character encoding in URLParser
Summary: Implement relative file URLs and begin implementing character encoding in URL...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-05 22:31 PDT by Alex Christensen
Modified: 2016-09-06 11:18 PDT (History)
3 users (show)

See Also:


Attachments
Patch (24.45 KB, patch)
2016-09-05 22:36 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (24.81 KB, patch)
2016-09-05 23:21 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (791.06 KB, application/zip)
2016-09-05 23:38 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (528.58 KB, application/zip)
2016-09-05 23:54 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-yosemite (334.27 KB, application/zip)
2016-09-05 23:57 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2 (403.93 KB, application/zip)
2016-09-06 00:13 PDT, Build Bot
no flags Details
Patch (24.64 KB, patch)
2016-09-06 08:45 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (24.69 KB, patch)
2016-09-06 08:48 PDT, Alex Christensen
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-09-05 22:31:07 PDT
Implement relative file urls and begin implementing character encoding in URLParser
Comment 1 Alex Christensen 2016-09-05 22:36:00 PDT
Created attachment 287995 [details]
Patch
Comment 2 Alex Christensen 2016-09-05 23:21:07 PDT
Created attachment 287997 [details]
Patch
Comment 3 Build Bot 2016-09-05 23:38:48 PDT
Comment on attachment 287997 [details]
Patch

Attachment 287997 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2015950

Number of test failures exceeded the failure limit.
Comment 4 Build Bot 2016-09-05 23:38:51 PDT
Created attachment 287998 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-09-05 23:54:32 PDT
Comment on attachment 287997 [details]
Patch

Attachment 287997 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2016011

Number of test failures exceeded the failure limit.
Comment 6 Build Bot 2016-09-05 23:54:34 PDT
Created attachment 287999 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-09-05 23:57:41 PDT
Comment on attachment 287997 [details]
Patch

Attachment 287997 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2016007

Number of test failures exceeded the failure limit.
Comment 8 Build Bot 2016-09-05 23:57:43 PDT
Created attachment 288000 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-09-06 00:13:19 PDT
Comment on attachment 287997 [details]
Patch

Attachment 287997 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2016039

Number of test failures exceeded the failure limit.
Comment 10 Build Bot 2016-09-06 00:13:22 PDT
Created attachment 288001 [details]
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-elcapitan-wk2  Platform: Mac OS X 10.11.5
Comment 11 Alex Christensen 2016-09-06 08:44:59 PDT
Comment on attachment 287997 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=287997&action=review

> Source/WebCore/platform/URLParser.cpp:1421
>  bool URLParser::enabled()
>  {
> -    return urlParserEnabled;
> +    return true;
>  }

oops. I do this locally for testing, but it's not ready yet.
Comment 12 Alex Christensen 2016-09-06 08:45:51 PDT
Created attachment 288026 [details]
Patch
Comment 13 Alex Christensen 2016-09-06 08:48:07 PDT
Created attachment 288028 [details]
Patch
Comment 14 Tim Horton 2016-09-06 11:03:33 PDT
Comment on attachment 288028 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=288028&action=review

> Source/WebCore/platform/URLParser.cpp:107
> +        if (byte < 0x21 || byte > 0x7E || byte == 0x22 || byte == 0x23 || byte == 0x3C || byte == 0x3E)

Should this get a function like the others? I kind of like that for readability.

> Source/WebCore/platform/URLParser.cpp:116
> +    static NeverDestroyed<HashMap<String, uint16_t>> defaultPorts(HashMap<String, uint16_t>({

Is this not something we already have?

> Source/WebCore/platform/URLParser.cpp:1237
> +    RELEASE_ASSERT(input.is8Bit());

Is this usually how we guard callers of characters8?

> Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp:373
> +    // Spec, Chrome, URLParser, URL::parse recognize gopher default port, FireFox does not.

lowercase second f in Firefox.
Comment 15 Alex Christensen 2016-09-06 11:07:33 PDT
> > Source/WebCore/platform/URLParser.cpp:116
> > +    static NeverDestroyed<HashMap<String, uint16_t>> defaultPorts(HashMap<String, uint16_t>({
> 
> Is this not something we already have?
We do, but it is not standards-compliant.  It has ftps (for which I will add a test) which is not in the standard and it doesn't have gopher, which is in the standard, for example.
> 
> > Source/WebCore/platform/URLParser.cpp:1237
> > +    RELEASE_ASSERT(input.is8Bit());
> 
> Is this usually how we guard callers of characters8?
I'm not sure, but this will all be replaced by more efficient algorithms to reduce String allocations.
Comment 16 Alex Christensen 2016-09-06 11:14:24 PDT
> ftps (for which I will add a test)
ftps is broken in the URLParser right now.  I'll add a FIXME comment so I don't forget to fix it later.  This patch is already big enough.
Comment 17 Alex Christensen 2016-09-06 11:18:22 PDT
http://trac.webkit.org/changeset/205493