Summary: | WebKit should claim that it can show responses for a broader range of JSON MIMETypes | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||||||||||||||||
Component: | WebKit API | Assignee: | Joseph Pecoraro <joepeck> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Normal | CC: | achristensen, ap, beidson, buildbot, commit-queue, ggaren, joepeck, rniwa, webkit-bug-importer, youennf | ||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
Attachments: |
|
Description
Joseph Pecoraro
2017-09-01 16:01:27 PDT
Modifying the whitelist of MIME Types WebKit claims to be able to show will affect WebKit clients. - Default behavior would have been to Ignore the load and would now be Use. - WebKit client's will receive a difference value for the canShowMimeType indication (WKNavigationResponse) - Safari behavior would likely have been to Download a `!canShowMimeType` indicated response and may now change to Use. In this case, since WebKit already claimed to support "application/json" I think it is safe to extend this to a broader list of JSON mime types. Does anyone actually like that Safari / WebKit sometimes ignores / downloads a JSON response instead of showing it immediately? We've had requests, specifically for "application/vnd.api+json" to show it immediately as text instead of downloading it. Created attachment 319661 [details]
[PATCH] Proposed Fix
Created attachment 319669 [details]
[PATCH] Proposed Fix
Comment on attachment 319669 [details] [PATCH] Proposed Fix Attachment 319669 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4429962 New failing tests: imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element.html Created attachment 319678 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 319669 [details] [PATCH] Proposed Fix Attachment 319669 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4429965 New failing tests: imported/w3c/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects.html imported/w3c/web-platform-tests/html/semantics/forms/historical.html imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/unload/003.html imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element.html imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-pathname-setter-question-mark.html imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_1.html http/tests/inspector/network/resource-mime-type.html Created attachment 319679 [details]
Archive of layout-test-results from ews101 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 319669 [details] [PATCH] Proposed Fix Attachment 319669 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4429989 New failing tests: imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element.html Created attachment 319681 [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.12.5
Comment on attachment 319669 [details] [PATCH] Proposed Fix Attachment 319669 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4430042 New failing tests: imported/w3c/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects.html imported/w3c/web-platform-tests/html/semantics/forms/historical.html imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/unload/003.html imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element.html imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-pathname-setter-question-mark.html imported/w3c/web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_1.html http/tests/inspector/network/resource-mime-type.html Created attachment 319683 [details]
Archive of layout-test-results from ews116 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 319669 [details]
[PATCH] Proposed Fix
Marking r- for the red EWS.
Created attachment 320057 [details]
[PATCH] Proposed Fix
Created attachment 320058 [details]
[PATCH] Proposed Fix
Comment on attachment 320058 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=320058&action=review > Tools/ChangeLog:3 > + WebKit should claim that it can show responses a broader range of JSON MIMETypes Typo: "responses *for* a broader range" Comment on attachment 320058 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=320058&action=review > Tools/ChangeLog:13 > + * TestWebKitAPI/Tests/WebCore/MIMETypeRegistry.cpp: Added. Discussing with Joseph on IRC, this change impacts behavior that's observable via API (SPI?). I think that it should be tested using API, and not by exposing an internal function. Created attachment 320227 [details]
[PATCH] Proposed Fix
Now with API tests for the change in -[WKNavigationResponse canShowMIMEType].
Comment on attachment 320227 [details] [PATCH] Proposed Fix Clearing flags on attachment: 320227 Committed r221778: <http://trac.webkit.org/changeset/221778> All reviewed patches have been landed. Closing bug. |