https://bugs.webkit.org/show_bug.cgi?id=192525
<rdar://problem/
46569636>
Reviewed by Jon Lee.
The HTML specification says we should use text/javascript for
JavaScript files:
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
Source/WebCore:
* loader/cache/CachedScript.cpp: Replace application/javascript with text/javascript.
(WebCore::CachedScript::CachedScript):
* platform/network/ios/WebCoreURLResponseIOS.mm: Ditto.
(WebCore::createExtensionToMIMETypeMap):
* platform/network/mac/WebCoreURLResponse.mm: Ditto.
(WebCore::createExtensionToMIMETypeMap):
Source/WebInspectorUI:
* UserInterface/Base/MIMETypeUtilities.js:
(WI.mimeTypeForFileExtension):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype._attemptToDetermineMIMEType):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239037
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2018-12-10 Dean Jackson <dino@apple.com>
+ Use text/javascript as recommended by the HTML specification
+ https://bugs.webkit.org/show_bug.cgi?id=192525
+ <rdar://problem/46569636>
+
+ Reviewed by Jon Lee.
+
+ The HTML specification says we should use text/javascript for
+ JavaScript files:
+ https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
+
+ * loader/cache/CachedScript.cpp: Replace application/javascript with text/javascript.
+ (WebCore::CachedScript::CachedScript):
+ * platform/network/ios/WebCoreURLResponseIOS.mm: Ditto.
+ (WebCore::createExtensionToMIMETypeMap):
+ * platform/network/mac/WebCoreURLResponse.mm: Ditto.
+ (WebCore::createExtensionToMIMETypeMap):
+
+2018-12-10 Dean Jackson <dino@apple.com>
+
[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>
CachedScript::CachedScript(CachedResourceRequest&& request, PAL::SessionID sessionID)
: CachedResource(WTFMove(request), Type::Script, sessionID)
- , m_decoder(TextResourceDecoder::create("application/javascript"_s, request.charset()))
+ , m_decoder(TextResourceDecoder::create("text/javascript"_s, request.charset()))
{
}
};
CFStringRef values[] = {
- CFSTR("application/javascript")
+ CFSTR("text/javascript")
};
ASSERT(sizeof(keys) == sizeof(values));
CFSTR("application/x-troff-me"),
CFSTR("model/mesh"),
CFSTR("application/vnd.mif"),
- CFSTR("application/javascript"),
+ CFSTR("text/javascript"),
CFSTR("video/x-sgi-movie"),
CFSTR("audio/mpeg"),
CFSTR("audio/mpeg"),
+2018-12-10 Dean Jackson <dino@apple.com>
+
+ Use text/javascript as recommended by the HTML specification
+ https://bugs.webkit.org/show_bug.cgi?id=192525
+ <rdar://problem/46569636>
+
+ Reviewed by Jon Lee.
+
+ The HTML specification says we should use text/javascript for
+ JavaScript files:
+ https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
+
+ * UserInterface/Base/MIMETypeUtilities.js:
+ (WI.mimeTypeForFileExtension):
+ * UserInterface/Views/TextEditor.js:
+ (WI.TextEditor.prototype._attemptToDetermineMIMEType):
+
2018-12-06 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
"xml": "text/xml",
// Script types.
- "js": "application/javascript",
- "mjs": "application/javascript",
+ "js": "text/javascript",
+ "mjs": "text/javascript",
"json": "application/json",
"clj": "text/x-clojure",
"coffee": "text/x-coffeescript",
if (!formattedText)
return;
- this.mimeType = "application/javascript";
+ this.mimeType = "text/javascript";
if (Date.now() - startTime < 100)
this.updateFormattedState(true);