Changeset 148769 in webkit
- Timestamp:
- Apr 19, 2013 2:06:06 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148768 r148769 1 2013-04-19 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Support the SourceMap header, X-SourceMap was deprecated 4 https://bugs.webkit.org/show_bug.cgi?id=114888 5 6 Check first for SourceMap, then fallback to X-SourceMap. Leaving in 7 support for the deprecated header because most tools and articles 8 online mention that version and have not yet updated. 9 10 Reviewed by Timothy Hatcher. 11 12 * inspector/InspectorDebuggerAgent.cpp: 13 (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): 14 * inspector/InspectorPageAgent.cpp: 15 (WebCore::InspectorPageAgent::sourceMapURLForResource): 16 1 17 2013-04-19 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r148768 r148769 633 633 String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script) 634 634 { 635 DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral("X-SourceMap"))); 635 DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral("SourceMap"))); 636 DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeaderDeprecated, (ASCIILiteral("X-SourceMap"))); 636 637 637 638 if (!script.url.isEmpty()) { … … 642 643 if (!sourceMapHeader.isEmpty()) 643 644 return sourceMapHeader; 645 646 sourceMapHeader = resource->response().httpHeaderField(sourceMapHTTPHeaderDeprecated); 647 if (!sourceMapHeader.isEmpty()) 648 return sourceMapHeader; 644 649 } 645 650 } -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r148768 r148769 271 271 String InspectorPageAgent::sourceMapURLForResource(CachedResource* cachedResource) 272 272 { 273 DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral("X-SourceMap"))); 273 DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral("SourceMap"))); 274 DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeaderDeprecated, (ASCIILiteral("X-SourceMap"))); 274 275 275 276 if (!cachedResource) … … 281 282 282 283 String sourceMapHeader = cachedResource->response().httpHeaderField(sourceMapHTTPHeader); 284 if (!sourceMapHeader.isEmpty()) 285 return sourceMapHeader; 286 287 sourceMapHeader = cachedResource->response().httpHeaderField(sourceMapHTTPHeaderDeprecated); 283 288 if (!sourceMapHeader.isEmpty()) 284 289 return sourceMapHeader;
Note: See TracChangeset
for help on using the changeset viewer.