Bug 161618

Summary: Implement relative file URLs and begin implementing character encoding in URLParser
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, darin, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews105 for mac-yosemite-wk2
none
Archive of layout-test-results from ews101 for mac-yosemite
none
Archive of layout-test-results from ews117 for mac-yosemite
none
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2
none
Patch
none
Patch thorton: review+

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