WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 182325
Align with Fetch on data: URLs
https://bugs.webkit.org/show_bug.cgi?id=182325
Summary
Align with Fetch on data: URLs
Anne van Kesteren
Reported
2018-01-31 01:09:13 PST
See
https://fetch.spec.whatwg.org/#data-urls
. Tests have been reviewed and landed as well:
https://github.com/w3c/web-platform-tests/pull/6890
.
Attachments
Patch
(3.45 KB, patch)
2018-12-01 08:47 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-sierra
(2.53 MB, application/zip)
2018-12-01 09:49 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews106 for mac-sierra-wk2
(3.03 MB, application/zip)
2018-12-01 09:59 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews115 for mac-sierra
(1.97 MB, application/zip)
2018-12-01 10:40 PST
,
EWS Watchlist
no flags
Details
Patch
(4.45 KB, patch)
2018-12-01 11:59 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(8.99 KB, patch)
2018-12-02 04:21 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2
(2.62 MB, application/zip)
2018-12-02 15:05 PST
,
EWS Watchlist
no flags
Details
Patch
(9.01 KB, patch)
2018-12-02 23:42 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2
(2.60 MB, application/zip)
2018-12-03 14:00 PST
,
EWS Watchlist
no flags
Details
Patch
(9.05 KB, patch)
2018-12-04 09:15 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.22 KB, patch)
2018-12-05 00:21 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(18.07 KB, patch)
2019-01-24 12:35 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(36.78 KB, patch)
2019-01-25 02:48 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-highsierra
(2.44 MB, application/zip)
2019-01-25 03:49 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews107 for mac-highsierra-wk2
(2.60 MB, application/zip)
2019-01-25 04:02 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews117 for mac-highsierra
(2.21 MB, application/zip)
2019-01-25 04:16 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews123 for ios-simulator-wk2
(2.41 MB, application/zip)
2019-01-25 04:46 PST
,
EWS Watchlist
no flags
Details
Patch
(39.29 KB, patch)
2019-01-26 08:20 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(31.17 KB, patch)
2019-01-28 13:22 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(33.18 KB, patch)
2019-01-28 13:32 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(33.18 KB, patch)
2019-01-28 13:40 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(33.54 KB, patch)
2019-01-29 14:10 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(12.03 KB, patch)
2019-02-12 08:51 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews112 for mac-highsierra
(2.09 MB, application/zip)
2019-02-12 10:37 PST
,
EWS Watchlist
no flags
Details
Patch
(12.21 KB, patch)
2019-02-12 14:26 PST
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(14)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2018-12-01 08:47:07 PST
Created
attachment 356308
[details]
Patch
EWS Watchlist
Comment 2
2018-12-01 09:49:28 PST
Comment on
attachment 356308
[details]
Patch
Attachment 356308
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/10230910
New failing tests: imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.any.worker.html
EWS Watchlist
Comment 3
2018-12-01 09:49:30 PST
Created
attachment 356310
[details]
Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 4
2018-12-01 09:59:46 PST
Comment on
attachment 356308
[details]
Patch
Attachment 356308
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/10230926
New failing tests: imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.any.worker.html
EWS Watchlist
Comment 5
2018-12-01 09:59:48 PST
Created
attachment 356312
[details]
Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 6
2018-12-01 10:40:12 PST
Comment on
attachment 356308
[details]
Patch
Attachment 356308
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/10231064
New failing tests: imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.any.worker.html
EWS Watchlist
Comment 7
2018-12-01 10:40:14 PST
Created
attachment 356314
[details]
Archive of layout-test-results from ews115 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-sierra Platform: Mac OS X 10.12.6
Rob Buis
Comment 8
2018-12-01 11:59:55 PST
Created
attachment 356319
[details]
Patch
Rob Buis
Comment 9
2018-12-02 04:21:36 PST
Created
attachment 356335
[details]
Patch
Rob Buis
Comment 10
2018-12-02 13:19:27 PST
Comment on
attachment 356335
[details]
Patch I think this is an obvious first step, but to make real progress
bug 180526
needs to be improved/fixed, in order to do even better handling data URLs.
EWS Watchlist
Comment 11
2018-12-02 15:05:41 PST
Comment on
attachment 356335
[details]
Patch
Attachment 356335
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/10242062
New failing tests: imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html
EWS Watchlist
Comment 12
2018-12-02 15:05:43 PST
Created
attachment 356348
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Rob Buis
Comment 13
2018-12-02 23:42:03 PST
Created
attachment 356359
[details]
Patch
EWS Watchlist
Comment 14
2018-12-03 14:00:10 PST
Comment on
attachment 356359
[details]
Patch
Attachment 356359
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/10252148
New failing tests: imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html
EWS Watchlist
Comment 15
2018-12-03 14:00:12 PST
Created
attachment 356404
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Rob Buis
Comment 16
2018-12-04 09:15:57 PST
Created
attachment 356504
[details]
Patch
Rob Buis
Comment 17
2018-12-05 00:12:30 PST
Comment on
attachment 356504
[details]
Patch Need to fix Changelog first.
Rob Buis
Comment 18
2018-12-05 00:21:51 PST
Created
attachment 356588
[details]
Patch
WebKit Commit Bot
Comment 19
2018-12-05 01:26:35 PST
Comment on
attachment 356588
[details]
Patch Clearing flags on attachment: 356588 Committed
r238890
: <
https://trac.webkit.org/changeset/238890
>
WebKit Commit Bot
Comment 20
2018-12-05 01:26:36 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 21
2018-12-05 01:27:38 PST
<
rdar://problem/46480987
>
Rob Buis
Comment 22
2018-12-05 02:22:01 PST
Reopening since there is more that needs fixing.
Rob Buis
Comment 23
2019-01-24 12:35:54 PST
Created
attachment 360026
[details]
Patch
Alex Christensen
Comment 24
2019-01-24 12:41:29 PST
Comment on
attachment 360026
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=360026&action=review
> Source/WebCore/platform/network/DataURLDecoder.cpp:53 > + if (!isValidContentType(mediaType)) > + return { "text/plain"_s, "US-ASCII"_s, "text/plain;charset=US-ASCII"_s, nullptr }; > + ParsedContentType parsedContentType(mediaType);
This seems to parse the content type twice. Could we make a ParsedContentType::isValid instead?
Rob Buis
Comment 25
2019-01-24 12:44:47 PST
Hi Alex, yeah I realized the same thing. It is on my list, not sure if I should do it before or after this patch?
Alex Christensen
Comment 26
2019-01-24 12:46:00 PST
(In reply to Rob Buis from
comment #25
)
> Hi Alex, yeah I realized the same thing. It is on my list, not sure if I > should do it before or after this patch?
Before or with this patch.
Alex Christensen
Comment 27
2019-01-24 12:46:42 PST
Alternatively, you could make a static create function that returns Optional< ParsedContentType>
Rob Buis
Comment 28
2019-01-24 12:49:08 PST
(In reply to Alex Christensen from
comment #27
)
> Alternatively, you could make a static create function that returns > Optional< ParsedContentType>
I think that is less explicit, so I personally would prefer isValid. Anyway I'll make a patch tomorrow and we can always decide during review.
Rob Buis
Comment 29
2019-01-25 02:48:07 PST
Created
attachment 360096
[details]
Patch
EWS Watchlist
Comment 30
2019-01-25 03:49:27 PST
Comment on
attachment 360096
[details]
Patch
Attachment 360096
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/10884973
New failing tests: imported/w3c/web-platform-tests/xhr/overridemimetype-blob.html
EWS Watchlist
Comment 31
2019-01-25 03:49:29 PST
Created
attachment 360101
[details]
Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 32
2019-01-25 04:01:59 PST
Comment on
attachment 360096
[details]
Patch
Attachment 360096
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/10885063
New failing tests: imported/w3c/web-platform-tests/xhr/overridemimetype-blob.html
EWS Watchlist
Comment 33
2019-01-25 04:02:01 PST
Created
attachment 360102
[details]
Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 34
2019-01-25 04:16:10 PST
Comment on
attachment 360096
[details]
Patch
Attachment 360096
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/10884935
New failing tests: imported/w3c/web-platform-tests/xhr/overridemimetype-blob.html
EWS Watchlist
Comment 35
2019-01-25 04:16:12 PST
Created
attachment 360104
[details]
Archive of layout-test-results from ews117 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 36
2019-01-25 04:45:58 PST
Comment on
attachment 360096
[details]
Patch
Attachment 360096
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/10885195
New failing tests: imported/w3c/web-platform-tests/xhr/overridemimetype-blob.html
EWS Watchlist
Comment 37
2019-01-25 04:46:00 PST
Created
attachment 360106
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Rob Buis
Comment 38
2019-01-26 08:20:08 PST
Created
attachment 360239
[details]
Patch
Frédéric Wang (:fredw)
Comment 39
2019-01-28 06:51:03 PST
Is it ready for review?
Alex Christensen
Comment 40
2019-01-28 11:25:35 PST
Comment on
attachment 360239
[details]
Patch What do the getters return if m_isValid is false? I think I prefer making a function that returns an Optional<ParsedContentType> rather than adding a bool and assuming all future users of this class will remember to check it. An Optional makes it syntactically required to check.
Rob Buis
Comment 41
2019-01-28 13:22:50 PST
Created
attachment 360365
[details]
Patch
Rob Buis
Comment 42
2019-01-28 13:32:35 PST
Created
attachment 360367
[details]
Patch
Rob Buis
Comment 43
2019-01-28 13:40:53 PST
Created
attachment 360370
[details]
Patch
Rob Buis
Comment 44
2019-01-28 14:06:32 PST
(In reply to Alex Christensen from
comment #40
)
> Comment on
attachment 360239
[details]
> Patch > > What do the getters return if m_isValid is false? I think I prefer making a > function that returns an Optional<ParsedContentType> rather than adding a > bool and assuming all future users of this class will remember to check it. > An Optional makes it syntactically required to check.
Fair enough, I now went with this approach in my latest patch.
Alex Christensen
Comment 45
2019-01-29 12:22:36 PST
Comment on
attachment 360370
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=360370&action=review
r=me
> Source/WebCore/platform/network/ParsedContentType.cpp:188 > + if (m_contentType.contains('\r') || m_contentType.contains('\n'))
These two checks could be done in one pass. Use this function in WTFString.h: size_t find(CodeUnitMatchFunction matchFunction, unsigned start = 0)
> Source/WebCore/platform/network/ParsedContentType.cpp:289 > + return parsedContentType;
I think this might unnecessarily copy parsedContentType and WTFMove(parsedContentType) might not, but I could be wrong. Please double check.
Rob Buis
Comment 46
2019-01-29 14:10:21 PST
Created
attachment 360499
[details]
Patch
Rob Buis
Comment 47
2019-01-29 23:31:30 PST
(In reply to Alex Christensen from
comment #45
)
> Comment on
attachment 360370
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=360370&action=review
> > r=me > > > Source/WebCore/platform/network/ParsedContentType.cpp:188 > > + if (m_contentType.contains('\r') || m_contentType.contains('\n')) > > These two checks could be done in one pass. Use this function in WTFString.h: > size_t find(CodeUnitMatchFunction matchFunction, unsigned start = 0)
Done.
> > Source/WebCore/platform/network/ParsedContentType.cpp:289 > > + return parsedContentType; > > I think this might unnecessarily copy parsedContentType and > WTFMove(parsedContentType) might not, but I could be wrong. Please double > check.
I checked, copy constructor was called indeed, so I added a move constructor and used WTFMove.
WebKit Commit Bot
Comment 48
2019-01-29 23:58:54 PST
Comment on
attachment 360499
[details]
Patch Clearing flags on attachment: 360499 Committed
r240706
: <
https://trac.webkit.org/changeset/240706
>
WebKit Commit Bot
Comment 49
2019-01-29 23:58:56 PST
All reviewed patches have been landed. Closing bug.
Rob Buis
Comment 50
2019-02-12 08:51:22 PST
Reopening to attach new patch.
Rob Buis
Comment 51
2019-02-12 08:51:25 PST
Created
attachment 361798
[details]
Patch
EWS Watchlist
Comment 52
2019-02-12 10:37:25 PST
Comment on
attachment 361798
[details]
Patch
Attachment 361798
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/11123220
New failing tests: http/tests/inspector/network/resource-initiatorNode.html
EWS Watchlist
Comment 53
2019-02-12 10:37:28 PST
Created
attachment 361806
[details]
Archive of layout-test-results from ews112 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-highsierra Platform: Mac OS X 10.13.6
Rob Buis
Comment 54
2019-02-12 14:26:47 PST
Created
attachment 361842
[details]
Patch
WebKit Commit Bot
Comment 55
2019-02-12 17:34:01 PST
Comment on
attachment 361842
[details]
Patch Clearing flags on attachment: 361842 Committed
r241333
: <
https://trac.webkit.org/changeset/241333
>
WebKit Commit Bot
Comment 56
2019-02-12 17:34:03 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug