Changeset 89727 in webkit
- Timestamp:
- Jun 24, 2011, 7:12:10 PM (14 years ago)
- Location:
- branches/safari-534-branch/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-534-branch/Source/WebKit2/ChangeLog
r89528 r89727 1 2011-06-24 Lucas Forschler <lforschler@apple.com> 2 3 Merged 89706. 4 5 2011-06-24 Anders Carlsson <andersca@apple.com> 6 7 Reviewed by Kevin Decker. 8 9 Not possible for plug-ins to override the internal PDF viewer 10 https://bugs.webkit.org/show_bug.cgi?id=63356 11 <rdar://problem/9673382> 12 13 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 14 (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): 15 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 16 Pass the entire resource response to shouldUseCustomRepresentationForResponse. 17 18 * WebProcess/WebProcess.cpp: 19 (WebKit::canPluginHandleResponse): 20 Ask for the plug-in path for a plug-in that can handle the given resource response. 21 If we fail to send the message, or if the path comes back empty, we assume that there's no plug-in 22 that can handle it. 23 24 (WebKit::WebProcess::shouldUseCustomRepresentationForResponse): 25 If the response MIME type is in the m_mimeTypesWithCustomRepresentations map, check if there's 26 a plug-in that can handle the given response. If that is the case, it should have precedence over 27 the custom representation. 28 29 * WebProcess/WebProcess.h: 30 Rename shouldUseCustomRepresentationForMIMEType to shouldUseCustomRepresentationForResponse. 31 1 32 2011-06-22 Lucas Forschler <lforschler@apple.com> 2 33 -
branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r87973 r89727 1105 1105 bool isMainFrame = webPage->mainFrame() == m_frame; 1106 1106 1107 const String& mimeType = m_frame->coreFrame()->loader()->documentLoader()->response().mimeType();1108 m_frameHasCustomRepresentation = isMainFrame && WebProcess::shared().shouldUseCustomRepresentationFor MIMEType(mimeType);1107 const ResourceResponse& response = m_frame->coreFrame()->loader()->documentLoader()->response(); 1108 m_frameHasCustomRepresentation = isMainFrame && WebProcess::shared().shouldUseCustomRepresentationForResponse(response); 1109 1109 } 1110 1110 … … 1128 1128 m_frame->coreFrame()->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize)); 1129 1129 #else 1130 const String& mimeType = m_frame->coreFrame()->loader()->documentLoader()->response().mimeType();1131 m_frameHasCustomRepresentation = isMainFrame && WebProcess::shared().shouldUseCustomRepresentationFor MIMEType(mimeType);1130 const ResourceResponse& response = m_frame->coreFrame()->loader()->documentLoader()->response(); 1131 m_frameHasCustomRepresentation = isMainFrame && WebProcess::shared().shouldUseCustomRepresentationForResponse(response); 1132 1132 1133 1133 m_frame->coreFrame()->createView(webPage->size(), backgroundColor, false, IntSize(), false); -
branches/safari-534-branch/Source/WebKit2/WebProcess/WebProcess.cpp
r87575 r89727 723 723 } 724 724 725 static bool canPluginHandleResponse(const ResourceResponse& response) 726 { 727 String pluginPath; 728 729 if (!WebProcess::shared().connection()->sendSync(Messages::WebContext::GetPluginPath(response.mimeType(), response.url().string()), Messages::WebContext::GetPluginPath::Reply(pluginPath), 0)) 730 return false; 731 732 return !pluginPath.isEmpty(); 733 } 734 735 bool WebProcess::shouldUseCustomRepresentationForResponse(const ResourceResponse& response) const 736 { 737 if (!m_mimeTypesWithCustomRepresentations.contains(response.mimeType())) 738 return false; 739 740 // If a plug-in exists that claims to support this response, it should take precedence over the custom representation. 741 return !canPluginHandleResponse(response); 742 } 743 725 744 void WebProcess::clearResourceCaches(ResourceCachesToClear resourceCachesToClear) 726 745 { -
branches/safari-534-branch/Source/WebKit2/WebProcess/WebProcess.h
r86678 r89727 55 55 class PageGroup; 56 56 class ResourceRequest; 57 class ResourceResponse; 57 58 } 58 59 … … 112 113 #endif 113 114 114 bool shouldUseCustomRepresentationFor MIMEType(const String& mimeType) const { return m_mimeTypesWithCustomRepresentations.contains(mimeType); }115 bool shouldUseCustomRepresentationForResponse(const WebCore::ResourceResponse&) const; 115 116 116 117 // Text Checking
Note:
See TracChangeset
for help on using the changeset viewer.