http://bugs.webkit.org/show_bug.cgi?id=17207
Database example doesn't work (requires not-yet-released Safari)
* mac/WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage
if it's too old.
* win/WebChromeClient.cpp:
(WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage
if it's too old.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30229
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-02-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17207
+ Database example doesn't work (requires not-yet-released Safari)
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage
+ if it's too old.
+
2008-02-11 Darin Adler <darin@apple.com>
- roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
#import "WebFrameView.h"
#import "WebHTMLView.h"
#import "WebHTMLViewPrivate.h"
+#import "WebKitSystemInterface.h"
#import "WebNSURLRequestExtras.h"
#import "WebSecurityOriginPrivate.h"
#import "WebSecurityOriginInternal.h"
void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseName)
{
WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:frame->document()->securityOrigin()];
- CallUIDelegate(m_webView, @selector(webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:), kit(frame), webOrigin, (NSString *)databaseName);
+ // FIXME: remove this workaround once shipping Safari has the necessary delegate implemented.
+ if (WKAppVersionCheckLessThan(@"com.apple.Safari", -1, 3.1)) {
+ const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support.
+ [webOrigin setQuota:defaultQuota];
+ } else
+ CallUIDelegate(m_webView, @selector(webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:), kit(frame), webOrigin, (NSString *)databaseName);
[webOrigin release];
}
+2008-02-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17207
+ Database example doesn't work (requires not-yet-released Safari)
+
+ * WebChromeClient.cpp:
+ (WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage
+ if it's too old.
+
2008-02-13 Ada Chan <adachan@apple.com>
<rdar://problem/5740656> Leak in postDidAddIconNotification in WebIconDatabase
#include <WebCore/WindowFeatures.h>
#pragma warning(pop)
+#include <tchar.h>
+
using namespace WebCore;
WebChromeClient::WebChromeClient(WebView* webView)
COMPtr<IWebUIDelegatePrivate3> uiDelegatePrivate3(Query, uiDelegate);
if (uiDelegatePrivate3)
uiDelegatePrivate3->exceededDatabaseQuota(m_webView, kit(frame), origin.get(), BString(databaseIdentifier));
+ else {
+ // FIXME: remove this workaround once shipping Safari has the necessary delegate implemented.
+ TCHAR path[MAX_PATH];
+ GetModuleFileName(GetModuleHandle(TEXT("Safari.exe")), path, ARRAYSIZE(path));
+ DWORD handle;
+ DWORD versionSize = GetFileVersionInfoSize(path, &handle);
+ if (!versionSize)
+ return;
+ Vector<char> data(versionSize);
+ if (!GetFileVersionInfo(path, 0, versionSize, data.data()))
+ return;
+
+ LPCTSTR productVersion;
+ UINT productVersionLength;
+ if (!VerQueryValue(data.data(), TEXT("\\StringFileInfo\\040904b0\\ProductVersion"), (void**)&productVersion, &productVersionLength))
+ return;
+ if (_tcsncmp(TEXT("3.1"), productVersion, productVersionLength) > 0) {
+ ::MessageBox(0, TEXT("workaround"), 0, 0);
+ const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support.
+ origin->setQuota(defaultQuota);
+ }
+ }
}
}