Changeset 73533 in webkit
- Timestamp:
- Dec 8, 2010 11:06:42 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r73532 r73533 1 2010-12-08 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Implement WebChromeClient::exceededDatabaseQuota 6 https://bugs.webkit.org/show_bug.cgi?id=50656 7 8 * WebCore.exp.in: 9 Export the symbol for SecurityOrigin::databaseIdentifier. 10 1 11 2010-12-08 Csaba Osztrogonác <ossy@webkit.org> 2 12 -
trunk/WebCore/WebCore.exp.in
r73469 r73533 1008 1008 __ZNK7WebCore14ResourceLoader11frameLoaderEv 1009 1009 __ZNK7WebCore14SecurityOrigin10canDisplayERKNS_4KURLE 1010 __ZNK7WebCore14SecurityOrigin18databaseIdentifierEv 1010 1011 __ZNK7WebCore14SecurityOrigin5equalEPKS0_ 1011 1012 __ZNK7WebCore15FocusController18focusedOrMainFrameEv -
trunk/WebKit2/ChangeLog
r73463 r73533 1 2010-12-08 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Implement WebChromeClient::exceededDatabaseQuota 6 https://bugs.webkit.org/show_bug.cgi?id=50656 7 8 The exceededDatabaseQuota call from the WebProcess to the UIProcess needs to be synchronous 9 because the new quota is checked directly after exceededDatabaseQuota returns in order to 10 determine if the new Database can be created. 11 12 Pass all of the details from the WebProcess to the UIProcess in order to inform the 13 decision in the UIProcess about the new quota. In WebKit1, these details were 14 fetched through an additional call to the API detailsForDatabase (which is infeasible in 15 WebKit2 since exceededDatabaseQuota is a synchronous call). 16 17 * Platform/CoreIPC/HandleMessage.h: 18 (CoreIPC::callMemberFunction): 19 Add a version that takes 7 parameters. 20 21 * UIProcess/API/C/WKPage.h: 22 23 * UIProcess/API/qt/qwkpage.cpp: 24 (QWKPage::QWKPage): 25 Indicate that exceededDatabaseQuota is not implemented. 26 27 * UIProcess/WebPageProxy.cpp: 28 (WebKit::WebPageProxy::exceededDatabaseQuota): 29 Call the UIClient's exceededDatabaseQuota 30 * UIProcess/WebPageProxy.h: 31 * UIProcess/WebPageProxy.messages.in: 32 33 * UIProcess/WebUIClient.cpp: 34 (WebKit::WebUIClient::exceededDatabaseQuota): 35 If the client does not implement exceededDatabaseQuota, return a the current quota. 36 * UIProcess/WebUIClient.h: 37 38 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 39 (WebKit::WebChromeClient::exceededDatabaseQuota): 40 Send a synchronous message to the UIProcess to ask for the new quota for the origin for the 41 given frame. 42 1 43 2010-12-07 Anders Carlsson <andersca@apple.com> 2 44 -
trunk/WebKit2/Platform/CoreIPC/HandleMessage.h
r72456 r73533 132 132 { 133 133 (object->*function)(args.argument1, args.argument2, args.argument3, args.argument4, replyArgs.argument1); 134 } 135 136 template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename R1> 137 void callMemberFunction(const Arguments7<P1, P2, P3, P4, P5, P6, P7>& args, Arguments1<R1>& replyArgs, C* object, MF function) 138 { 139 (object->*function)(args.argument1, args.argument2, args.argument3, args.argument4, args.argument5, args.argument6, args.argument7, replyArgs.argument1); 134 140 } 135 141 -
trunk/WebKit2/UIProcess/API/C/WKPage.h
r73412 r73533 154 154 typedef void (*WKPageDidDrawCallback)(WKPageRef page, const void *clientInfo); 155 155 typedef void (*WKPageDidScrollCallback)(WKPageRef page, const void *clientInfo); 156 typedef unsigned long long (*WKPageExceededDatabaseQuotaCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentUsage, unsigned long long expectedUsage, const void *clientInfo); 156 157 157 158 … … 181 182 WKPageDidDrawCallback didDraw; 182 183 WKPageDidScrollCallback pageDidScroll; 184 WKPageExceededDatabaseQuotaCallback exceededDatabaseQuota; 183 185 }; 184 186 typedef struct WKPageUIClient WKPageUIClient; -
trunk/WebKit2/UIProcess/API/qt/qwkpage.cpp
r73412 r73533 361 361 0, /* runBeforeUnloadConfirmPanel */ 362 362 0, /* didDraw */ 363 0 /* pageDidScroll */ 363 0, /* pageDidScroll */ 364 0 /* exceededDatabaseQuota */ 364 365 }; 365 366 WKPageSetPageUIClient(pageRef(), &uiClient); -
trunk/WebKit2/UIProcess/WebPageProxy.cpp
r73412 r73533 59 59 #include "WebProcessProxy.h" 60 60 #include "WebProtectionSpace.h" 61 #include "WebSecurityOrigin.h" 61 62 #include "WebURLRequest.h" 62 63 #include <WebCore/FloatRect.h> … … 1562 1563 } 1563 1564 1565 void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentUsage, uint64_t expectedUsage, uint64_t& newQuota) 1566 { 1567 WebFrameProxy* frame = process()->webFrame(frameID); 1568 RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::create(originIdentifier); 1569 1570 newQuota = m_uiClient.exceededDatabaseQuota(this, frame, origin.get(), databaseName, displayName, currentQuota, currentUsage, expectedUsage); 1571 } 1572 1564 1573 } // namespace WebKit -
trunk/WebKit2/UIProcess/WebPageProxy.h
r73412 r73533 328 328 void pageDidRequestScroll(const WebCore::IntSize&); 329 329 #endif 330 void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentUsage, uint64_t expectedUsage, uint64_t& newQuota); 330 331 #if PLATFORM(QT) 331 332 void didChangeContentsSize(const WebCore::IntSize&); -
trunk/WebKit2/UIProcess/WebPageProxy.messages.in
r73412 r73533 141 141 CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate) 142 142 DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID) 143 144 # Databases 145 ExceededDatabaseQuota(uint64_t frameID, WTF::String originIdentifier, WTF::String databaseName, WTF::String databaseDisplayName, uint64_t currentQuota, uint64_t currentUsage, uint64_t expectedUsage) -> (uint64_t newQuota) 143 146 } -
trunk/WebKit2/UIProcess/WebUIClient.cpp
r71746 r73533 238 238 } 239 239 240 unsigned long long WebUIClient::exceededDatabaseQuota(WebPageProxy* page, WebFrameProxy* frame, WebSecurityOrigin* origin, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentUsage, unsigned long long expectedUsage) 241 { 242 if (!m_client.exceededDatabaseQuota) 243 return currentQuota; 244 245 return m_client.exceededDatabaseQuota(toAPI(page), toAPI(frame), toAPI(origin), toAPI(databaseName.impl()), toAPI(databaseDisplayName.impl()), currentQuota, currentUsage, expectedUsage, m_client.clientInfo); 246 } 247 240 248 } // namespace WebKit -
trunk/WebKit2/UIProcess/WebUIClient.h
r71746 r73533 45 45 class WebFrameProxy; 46 46 class WebPageProxy; 47 class WebSecurityOrigin; 47 48 48 49 class WebUIClient : public APIClient<WKPageUIClient> { … … 78 79 void didDraw(WebPageProxy*); 79 80 void pageDidScroll(WebPageProxy*); 81 82 unsigned long long exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentUsage, unsigned long long expectedUsage); 80 83 }; 81 84 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r72086 r73533 44 44 #include "WebProcessProxyMessageKinds.h" 45 45 #include "WebSearchPopupMenu.h" 46 #include <WebCore/DatabaseTracker.h> 46 47 #include <WebCore/FileChooser.h> 47 48 #include <WebCore/Frame.h> … … 421 422 422 423 #if ENABLE(DATABASE) 423 void WebChromeClient::exceededDatabaseQuota(Frame*, const String& databaseName) 424 { 425 notImplemented(); 424 void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseName) 425 { 426 WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame(); 427 SecurityOrigin* origin = frame->document()->securityOrigin(); 428 429 DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(databaseName, origin); 430 unsigned long long currentQuota = DatabaseTracker::tracker().quotaForOrigin(origin); 431 unsigned long long newQuota = 0; 432 WebProcess::shared().connection()->sendSync( 433 Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), databaseName, details.displayName(), currentQuota, details.currentUsage(), details.expectedUsage()), 434 Messages::WebPageProxy::ExceededDatabaseQuota::Reply(newQuota), m_page->pageID()); 435 436 DatabaseTracker::tracker().setQuota(origin, newQuota); 426 437 } 427 438 #endif -
trunk/WebKitTools/ChangeLog
r73527 r73533 1 2010-12-08 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Implement WebChromeClient::exceededDatabaseQuota 6 https://bugs.webkit.org/show_bug.cgi?id=50656 7 8 * MiniBrowser/mac/BrowserWindowController.m: 9 (-[BrowserWindowController awakeFromNib]): 10 Indicate that exceededDatabaseQuota is not implemented. 11 * MiniBrowser/win/BrowserView.cpp: 12 (BrowserView::create): 13 Ditto. 14 * WebKitTestRunner/TestController.cpp: 15 (WTR::createOtherPage): 16 Ditto. 17 (WTR::TestController::initialize): 18 Ditto. 19 1 20 2010-12-08 Antonio Gomes <agomes@rim.com> 2 21 -
trunk/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
r73412 r73533 607 607 runBeforeUnloadConfirmPanel, 608 608 0, /* didDraw */ 609 0 /* pageDidScroll */ 609 0, /* pageDidScroll */ 610 0 /* exceededDatabaseQuota */ 610 611 }; 611 612 WKPageSetPageUIClient(_webView.pageRef, &uiClient); -
trunk/WebKitTools/MiniBrowser/win/BrowserView.cpp
r73070 r73533 119 119 0, /* runBeforeUnloadConfirmPanel */ 120 120 0, /* didDraw */ 121 0 /* pageDidScroll */ 121 0, /* pageDidScroll */ 122 0 /* exceededDatabaseQuota */ 122 123 }; 123 124 -
trunk/WebKitTools/WebKitTestRunner/TestController.cpp
r73412 r73533 136 136 0, // runBeforeUnloadConfirmPanel 137 137 0, // didDraw 138 0 // pageDidScroll 138 0, // pageDidScroll 139 0 // exceededDatabaseQuota 139 140 }; 140 141 WKPageSetPageUIClient(newPage, &otherPageUIClient); … … 238 239 0, // runBeforeUnloadConfirmPanel 239 240 0, // didDraw 240 0 // pageDidScroll 241 0, // pageDidScroll 242 0 // exceededDatabaseQuota 241 243 }; 242 244 WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);
Note: See TracChangeset
for help on using the changeset viewer.