Changeset 188257 in webkit
- Timestamp:
- Aug 11, 2015 9:51:14 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r188255 r188257 1 2015-08-11 Dan Bernstein <mitz@apple.com> 2 3 Reverted r188255, because it turned out that delegates do nonot need this information. 4 5 * UIProcess/API/APIUIClient.h: 6 (API::UIClient::footerHeight): 7 (API::UIClient::drawHeader): 8 (API::UIClient::drawFooter): 9 (API::UIClient::printFrame): 10 (API::UIClient::canRunModal): 11 (API::UIClient::runModal): 12 * UIProcess/API/C/WKPage.cpp: 13 (WKPageSetPageUIClient): 14 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: 15 * UIProcess/Cocoa/UIDelegate.h: 16 * UIProcess/Cocoa/UIDelegate.mm: 17 (WebKit::UIDelegate::UIDelegate): 18 (WebKit::UIDelegate::setDelegate): 19 (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota): 20 (WebKit::UIDelegate::UIClient::printFrame): 21 (WebKit::UIDelegate::UIClient::close): 22 * UIProcess/WebPageProxy.cpp: 23 (WebKit::WebPageProxy::runOpenPanel): 24 (WebKit::WebPageProxy::printFrame): 25 (WebKit::WebPageProxy::printMainFrame): 26 (WebKit::WebPageProxy::setMediaVolume): 27 * UIProcess/WebPageProxy.h: 28 (WebKit::WebPageProxy::setShouldSendEventsSynchronously): 29 * UIProcess/WebPageProxy.messages.in: 30 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 31 (WebKit::WebChromeClient::print): 32 (WebKit::WebChromeClient::exceededDatabaseQuota): 33 1 34 2015-08-11 Dan Bernstein <mitz@apple.com> 2 35 -
trunk/Source/WebKit2/UIProcess/API/APIUIClient.h
r188255 r188257 140 140 virtual void drawHeader(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::FloatRect&) { } 141 141 virtual void drawFooter(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::FloatRect&) { } 142 virtual void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy* , bool processingUserGesture) { }142 virtual void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*) { } 143 143 144 144 virtual bool canRunModal() const { return false; } -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r188255 r188257 1731 1731 } 1732 1732 1733 virtual void printFrame(WebPageProxy* page, WebFrameProxy* frame , bool) override1733 virtual void printFrame(WebPageProxy* page, WebFrameProxy* frame) override 1734 1734 { 1735 1735 if (!m_client.printFrame) -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
r188255 r188257 49 49 - (void)_webView:(WKWebView *)webView decideWebApplicationCacheQuotaForSecurityOrigin:(WKSecurityOrigin *)securityOrigin currentQuota:(unsigned long long)currentQuota totalBytesNeeded:(unsigned long long)totalBytesNeeded decisionHandler:(void (^)(unsigned long long newQuota))decisionHandler; 50 50 51 - (void)_webView:(WKWebView *)webView printFrame:(_WKFrameHandle *)frame userInitiated:(BOOL)userInitiated WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);51 - (void)_webView:(WKWebView *)webView printFrame:(_WKFrameHandle *)frame; 52 52 53 53 - (void)_webViewClose:(WKWebView *)webView; -
trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h
r188255 r188257 69 69 virtual void exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, API::SecurityOrigin*, const WTF::String& databaseName, const WTF::String& displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentUsage, unsigned long long expectedUsage, std::function<void (unsigned long long)>) override; 70 70 virtual void reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&, uint64_t currentQuota, uint64_t totalBytesNeeded, std::function<void (unsigned long long)> completionHandler) override; 71 virtual void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy* , bool processingUserGesture) override;71 virtual void printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*) override; 72 72 #if PLATFORM(IOS) 73 73 #if HAVE(APP_LINKS) … … 95 95 bool webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded : 1; 96 96 bool webViewPrintFrame : 1; 97 bool webViewPrintFrameUserInitiated : 1;98 97 bool webViewDidClose : 1; 99 98 bool webViewClose : 1; -
trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm
r188255 r188257 42 42 #import <WebCore/URL.h> 43 43 44 @protocol WKUIDelegatePrivateDeprecated <WKUIDelegatePrivate>45 @optional46 - (void)_webView:(WKWebView *)webView printFrame:(_WKFrameHandle *)frame;47 @end48 49 44 namespace WebKit { 50 45 … … 79 74 m_delegateMethods.webViewDecideWebApplicationCacheQuotaForSecurityOriginCurrentQuotaTotalBytesNeeded = [delegate respondsToSelector:@selector(_webView:decideWebApplicationCacheQuotaForSecurityOrigin:currentQuota:totalBytesNeeded:decisionHandler:)]; 80 75 m_delegateMethods.webViewPrintFrame = [delegate respondsToSelector:@selector(_webView:printFrame:)]; 81 m_delegateMethods.webViewPrintFrameUserInitiated = [delegate respondsToSelector:@selector(_webView:printFrame:userInitiated:)];82 76 m_delegateMethods.webViewDidClose = [delegate respondsToSelector:@selector(webViewDidClose:)]; 83 77 m_delegateMethods.webViewClose = [delegate respondsToSelector:@selector(_webViewClose:)]; … … 237 231 } 238 232 239 void UIDelegate::UIClient::printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy* webFrameProxy , bool processingUserGesture)233 void UIDelegate::UIClient::printFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy* webFrameProxy) 240 234 { 241 235 ASSERT_ARG(webFrameProxy, webFrameProxy); 242 236 243 if (!m_uiDelegate.m_delegateMethods.webViewPrintFrame && !m_uiDelegate.m_delegateMethods.webViewPrintFrameUserInitiated) 244 return; 245 246 auto delegate = m_uiDelegate.m_delegate.get(); 247 if (!delegate) 248 return; 249 250 if (m_uiDelegate.m_delegateMethods.webViewPrintFrameUserInitiated) 251 [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView printFrame:wrapper(API::FrameHandle::create(webFrameProxy->frameID())) userInitiated:processingUserGesture]; 252 else 253 [(id <WKUIDelegatePrivateDeprecated>)delegate _webView:m_uiDelegate.m_webView printFrame:wrapper(API::FrameHandle::create(webFrameProxy->frameID()))]; 237 if (!m_uiDelegate.m_delegateMethods.webViewPrintFrame) 238 return; 239 240 auto delegate = m_uiDelegate.m_delegate.get(); 241 if (!delegate) 242 return; 243 244 [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView printFrame:wrapper(API::FrameHandle::create(webFrameProxy->frameID()))]; 254 245 } 255 246 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r188255 r188257 3837 3837 } 3838 3838 3839 void WebPageProxy::printFrame(uint64_t frameID , bool processingUserGesture)3839 void WebPageProxy::printFrame(uint64_t frameID) 3840 3840 { 3841 3841 ASSERT(!m_isPerformingDOMPrintOperation); … … 3845 3845 MESSAGE_CHECK(frame); 3846 3846 3847 m_uiClient->printFrame(this, frame , processingUserGesture);3847 m_uiClient->printFrame(this, frame); 3848 3848 3849 3849 endPrinting(); // Send a message synchronously while m_isPerformingDOMPrintOperation is still true. 3850 3850 m_isPerformingDOMPrintOperation = false; 3851 } 3852 3853 void WebPageProxy::printMainFrame() 3854 { 3855 printFrame(m_mainFrame->frameID()); 3851 3856 } 3852 3857 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r188255 r188257 914 914 void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; }; 915 915 916 void printMainFrame(); 917 916 918 void setMediaVolume(float); 917 919 void setMuted(bool); … … 1179 1181 void pageDidScroll(); 1180 1182 void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&); 1181 void printFrame(uint64_t frameID , bool processingUserGesture);1183 void printFrame(uint64_t frameID); 1182 1184 void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>); 1183 1185 void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, PassRefPtr<Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply>); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r188255 r188257 77 77 PageDidScroll() 78 78 RunOpenPanel(uint64_t frameID, struct WebCore::FileChooserSettings parameters) 79 PrintFrame(uint64_t frameID , bool processingUserGesture) -> ()79 PrintFrame(uint64_t frameID) -> () 80 80 RunModal() 81 81 NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r188255 r188257 681 681 syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply; 682 682 683 m_page->sendSync(Messages::WebPageProxy::PrintFrame(webFrame->frameID() , ScriptController::processingUserGesture()), Messages::WebPageProxy::PrintFrame::Reply(), std::chrono::milliseconds::max(), syncSendFlags);683 m_page->sendSync(Messages::WebPageProxy::PrintFrame(webFrame->frameID()), Messages::WebPageProxy::PrintFrame::Reply(), std::chrono::milliseconds::max(), syncSendFlags); 684 684 } 685 685 -
trunk/Tools/ChangeLog
r188255 r188257 1 2015-08-11 Dan Bernstein <mitz@apple.com> 2 3 Reverted r188255, because it turned out that delegates do nonot need this information. 4 5 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 6 * TestWebKitAPI/Tests/WebKit2Cocoa/PrintFrame.mm: Removed. 7 1 8 2015-08-11 Dan Bernstein <mitz@apple.com> 2 9 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r188255 r188257 40 40 33DC89141419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */; }; 41 41 33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */; }; 42 376481801B79CD8D00D24B97 /* PrintFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3764817D1B79CD7D00D24B97 /* PrintFrame.mm */; settings = {ASSET_TAGS = (); }; };43 42 378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */; }; 44 43 378E64791632707400B6C676 /* link-with-title.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 378E647816326FDF00B6C676 /* link-with-title.html */; }; … … 498 497 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderedImageFromDOMRange.mm; sourceTree = "<group>"; }; 499 498 3751AF7A169518F800764319 /* DOMNodeFromJSObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNodeFromJSObject.mm; sourceTree = "<group>"; }; 500 3764817D1B79CD7D00D24B97 /* PrintFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PrintFrame.mm; sourceTree = "<group>"; };501 499 3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorInDashboardRegions.mm; sourceTree = "<group>"; }; 502 500 378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest.cpp; sourceTree = "<group>"; }; … … 869 867 CEA6CF2219CCF5BD0064F5A7 /* OpenAndCloseWindow.mm */, 870 868 C95501BE19AD2FAF0049BE3E /* Preferences.mm */, 871 3764817D1B79CD7D00D24B97 /* PrintFrame.mm */,872 869 37D36F311B004DD400BAF5D9 /* ProvisionalURLChange.mm */, 873 870 37BCA61B1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm */, … … 1565 1562 7CCE7F2C1A411B1000447C4C /* PreventImageLoadWithAutoResizing.mm in Sources */, 1566 1563 7CCE7F0C1A411AE600447C4C /* PrivateBrowsingPushStateNoHistoryCallback.cpp in Sources */, 1567 376481801B79CD8D00D24B97 /* PrintFrame.mm in Sources */,1568 1564 7CCE7EC81A411A7E00447C4C /* PublicSuffix.mm in Sources */, 1569 1565 7CCE7F3E1A411B8E00447C4C /* RedBlackTree.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.