Changeset 274230 in webkit
- Timestamp:
- Mar 10, 2021 12:43:35 PM (17 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Models/SourceMapResource.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r274229 r274230 1 2021-03-10 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Syntax highlighting for JSX is incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=217613 5 <rdar://problem/70210975> 6 7 Reviewed by BJ Burg. 8 9 Out of the box, React specifies the "js" extension for JSX files. 10 Use JSX mode for source map resources with the "js" extension. This 11 appears to match what the other browsers' developer tools do. 12 13 * UserInterface/Models/SourceMapResource.js: 14 (WI.SourceMapResource): 15 1 16 2021-03-10 Razvan Caliman <rcaliman@apple.com> 2 17 -
trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js
r262302 r274230 37 37 var inheritedMIMEType = this._sourceMap.originalSourceCode instanceof WI.Resource ? this._sourceMap.originalSourceCode.syntheticMIMEType : null; 38 38 39 var fileExtension = WI.fileExtensionForURL(url) || ""; 40 var fileExtensionMIMEType = WI.mimeTypeForFileExtension(fileExtension, true); 39 let fileExtension = WI.fileExtensionForURL(url) || ""; 40 41 // React serves JSX resources with "js" extension. 42 let fileExtensionMIMEType = fileExtension === "js" ? "text/jsx" : WI.mimeTypeForFileExtension(fileExtension, true); 41 43 42 44 // FIXME: This is a layering violation. It should use a helper function on the
Note: See TracChangeset
for help on using the changeset viewer.