OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 if (url.isEmpty()) | 900 if (url.isEmpty()) |
901 return String(); | 901 return String(); |
902 Frame* frame = mainFrame(); | 902 Frame* frame = mainFrame(); |
903 if (!frame) | 903 if (!frame) |
904 return String(); | 904 return String(); |
905 CachedResource* resource = cachedResource(frame, KURL(ParsedURLString, url))
; | 905 CachedResource* resource = cachedResource(frame, KURL(ParsedURLString, url))
; |
906 if (!resource) | 906 if (!resource) |
907 return String(); | 907 return String(); |
908 String deprecatedHeaderSourceMapURL = resource->response().httpHeaderField(d
eprecatedSourceMapHttpHeader); | 908 String deprecatedHeaderSourceMapURL = resource->response().httpHeaderField(d
eprecatedSourceMapHttpHeader); |
909 if (!deprecatedHeaderSourceMapURL.isEmpty()) { | 909 if (!deprecatedHeaderSourceMapURL.isEmpty()) { |
910 m_page->console()->addMessage(NetworkMessageSource, WarningMessageLevel,
"Resource is served with deprecated header X-SourceMap, SourceMap should be use
d instead.", url, 0); | 910 // FIXME: add deprecated console message here. |
911 return deprecatedHeaderSourceMapURL; | 911 return deprecatedHeaderSourceMapURL; |
912 } | 912 } |
913 return resource->response().httpHeaderField(sourceMapHttpHeader); | 913 return resource->response().httpHeaderField(sourceMapHttpHeader); |
914 } | 914 } |
915 | 915 |
916 // static | 916 // static |
917 DocumentLoader* InspectorPageAgent::assertDocumentLoader(ErrorString* errorStrin
g, Frame* frame) | 917 DocumentLoader* InspectorPageAgent::assertDocumentLoader(ErrorString* errorStrin
g, Frame* frame) |
918 { | 918 { |
919 FrameLoader* frameLoader = frame->loader(); | 919 FrameLoader* frameLoader = frame->loader(); |
920 DocumentLoader* documentLoader = frameLoader ? frameLoader->documentLoader()
: 0; | 920 DocumentLoader* documentLoader = frameLoader ? frameLoader->documentLoader()
: 0; |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 } | 1270 } |
1271 | 1271 |
1272 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) | 1272 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) |
1273 { | 1273 { |
1274 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1274 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
1275 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; | 1275 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; |
1276 } | 1276 } |
1277 | 1277 |
1278 } // namespace WebCore | 1278 } // namespace WebCore |
1279 | 1279 |
OLD | NEW |