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
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
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
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.
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
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
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?
(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.
(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.
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
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
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
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
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.
(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.
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.
(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.
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
2018-12-01 08:47 PST, Rob Buis
2018-12-01 09:49 PST, EWS Watchlist
2018-12-01 09:59 PST, EWS Watchlist
2018-12-01 10:40 PST, EWS Watchlist
2018-12-01 11:59 PST, Rob Buis
2018-12-02 04:21 PST, Rob Buis
2018-12-02 15:05 PST, EWS Watchlist
2018-12-02 23:42 PST, Rob Buis
2018-12-03 14:00 PST, EWS Watchlist
2018-12-04 09:15 PST, Rob Buis
2018-12-05 00:21 PST, Rob Buis
2019-01-24 12:35 PST, Rob Buis
2019-01-25 02:48 PST, Rob Buis
2019-01-25 03:49 PST, EWS Watchlist
2019-01-25 04:02 PST, EWS Watchlist
2019-01-25 04:16 PST, EWS Watchlist
2019-01-25 04:46 PST, EWS Watchlist
2019-01-26 08:20 PST, Rob Buis
2019-01-28 13:22 PST, Rob Buis
2019-01-28 13:32 PST, Rob Buis
2019-01-28 13:40 PST, Rob Buis
2019-01-29 14:10 PST, Rob Buis
2019-02-12 08:51 PST, Rob Buis
2019-02-12 10:37 PST, EWS Watchlist
2019-02-12 14:26 PST, Rob Buis