#if !PLATFORM(CHROMIUM)
// FIXME: This needs a real implementation; this is a temporary solution for testing.
const unsigned long long defaultQuota = 5 * 1024 * 1024;
+#if ENABLE(TIZEN_SQL_DATABASE)
+ SecurityOrigin* origin = m_scriptExecutionContext->securityOrigin();
+ DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(name, origin);
+ unsigned long long currentQuota = DatabaseTracker::tracker().quotaForOrigin(origin);
+ unsigned long long requirement = currentQuota + details.expectedUsage();
+
+ if (requirement <= defaultQuota)
+ DatabaseTracker::tracker().setQuota(origin, requirement);
+ else
+ DatabaseTracker::tracker().setQuota(origin, defaultQuota);
+#else
DatabaseTracker::tracker().setQuota(m_scriptExecutionContext->securityOrigin(), defaultQuota);
#endif
+#endif
}
} // namespace WebCore
// Since we're imminently opening a database within this context's origin, make sure this origin is being tracked by the QuotaTracker
// by fetching its current usage now.
+#if ENABLE(TIZEN_SQL_DATABASE)
+ usageForOriginNoLock(origin);
+#else
unsigned long long usage = usageForOriginNoLock(origin);
+#endif
// If a database already exists, ignore the passed-in estimated size and say it's OK.
if (hasEntryForDatabase(origin, name))
return true;
// If the database will fit, allow its creation.
+#if ENABLE(TIZEN_SQL_DATABASE)
+ unsigned long long originQuota = quotaForOriginNoLock(origin);
+ requirement = originQuota + max(1UL, estimatedSize);
+ if (requirement < originQuota) {
+ doneCreatingDatabase(origin, name);
+ return false; // If the estimated size is so big it causes an overflow, don't allow creation.
+ }
+#else
requirement = usage + max(1UL, estimatedSize);
if (requirement < usage) {
doneCreatingDatabase(origin, name);
}
if (requirement <= quotaForOriginNoLock(origin))
return true;
+#endif
// Give the chrome client a chance to increase the quota.
// Temporarily make the details of the proposed database available, so the client can get at them.
bool SQLTransactionClient::didExceedQuota(AbstractDatabase* database)
{
+#if ENABLE(TIZEN_SQL_DATABASE)
+ return false;
+#else
ASSERT(database->scriptExecutionContext()->isContextThread());
unsigned long long currentQuota = DatabaseTracker::tracker().quotaForOrigin(database->securityOrigin());
database->databaseContext()->databaseExceededQuota(database->stringIdentifier());
unsigned long long newQuota = DatabaseTracker::tracker().quotaForOrigin(database->securityOrigin());
return (newQuota > currentQuota);
+#endif
}
}
{
(object->*function)(args.argument1, args.argument2, args.argument3, delayedReply);
}
+
+template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename R>
+void callMemberFunction(const Arguments4<P1, P2, P3,P4>& args, PassRefPtr<R> delayedReply, C* object, MF function)
+{
+ (object->*function)(args.argument1, args.argument2, args.argument3, args.argument4, delayedReply);
+}
// ENDIF
// Dispatch functions with connection parameter.
typedef WKRect (*WKPageGetWindowFrameCallback)(WKPageRef page, const void *clientInfo);
typedef void (*WKPageSetWindowFrameCallback)(WKPageRef page, WKRect frame, const void *clientInfo);
typedef bool (*WKPageRunBeforeUnloadConfirmPanelCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
-typedef unsigned long long (*WKPageExceededDatabaseQuotaCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void *clientInfo);
+// #if ENABLE(TIZEN_SQL_DATABASE)
+typedef bool (*WKPageExceededDatabaseQuotaCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKStringRef displayName, unsigned long long expectedUsage, const void *clientInfo);
+// #else
+// typedef unsigned long long (*WKPageExceededDatabaseQuotaCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void *clientInfo);
+// #endif
//#if OS(TIZEN)
typedef bool (*WKPageRunOpenPanelCallback)(WKPageRef page, WKFrameRef frame, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener, const void* clientInfo);
//#else
toImpl(page)->replyExceededIndexedDatabaseQuota(allow);
#endif
}
+
+void WKPageReplyExceededDatabaseQuota(WKPageRef page, bool allow)
+{
+#if ENABLE(TIZEN_SQL_DATABASE)
+ toImpl(page)->replyExceededDatabaseQuota(allow);
+#endif
+}
WK_EXPORT void WKPageReplyExceededIndexedDatabaseQuota(WKPageRef page, bool allow);
//#endif
+// #if ENABLE(TIZEN_SQL_DATABASE)
+WK_EXPORT void WKPageReplyExceededDatabaseQuota(WKPageRef page, bool allow);
+// #endif
#ifdef __cplusplus
}
#endif
, notifications(0)
, notificationPermissionRequests(0)
#endif
-#if ENABLE(TIZEN_SQL_DATABASE)
- , exceededDatabaseQuota(0)
-#endif
#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
, popupPicker(0)
#endif
ewkNotificationDeletePermissionRequestList(notificationPermissionRequests);
#endif
-#if ENABLE(TIZEN_SQL_DATABASE)
- if (exceededDatabaseQuota)
- ewkContextDeleteExceededQuota(exceededDatabaseQuota);
-#endif
-
#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
if (compositionAnimator)
ecore_animator_del(compositionAnimator);
#if ENABLE(TIZEN_INDEXED_DATABASE)
Ewk_View_Exceeded_Indexed_Database_Quota_Callback exceededIndexedDatabaseQuotaCallback;
#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+ Ewk_View_Exceeded_Database_Quota_Callback exceededDatabaseQuotaCallback;
+#endif
};
Evas_Object* ewkView;
Eina_List* notificationPermissionRequests;
#endif
-#if ENABLE(TIZEN_SQL_DATABASE)
- Ewk_Context_Exceeded_Quota* exceededDatabaseQuota;
-#endif
-
#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
Ewk_Popup_Picker* popupPicker;
#endif
#if ENABLE(TIZEN_INDEXED_DATABASE)
OwnPtr<Ewk_View_Callback_Context> exceededIndexedDatabaseQuotaContext;
#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+ OwnPtr<Ewk_View_Callback_Context> exceededDatabaseQuotaContext;
+#endif
Ewk_Security_Origin* exceededQuotaOrigin;
bool isWaitingForExceededQuotaPopupReply;
#endif // #if OS(TIZEN)
}
#if ENABLE(TIZEN_SQL_DATABASE)
-unsigned long long ewkViewExceededDatabaseQuota(Evas_Object* ewkView, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage)
+bool ewkViewExceededDatabaseQuota(Evas_Object* ewkView, WKSecurityOriginRef origin, WKStringRef databaseName, unsigned long long expectedUsage)
{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, currentQuota);
- EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, currentQuota);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- TIZEN_LOGI("database,quota,exceeded");
- uint64_t defaultQuota = ewkContextGetDatabaseQuota(impl->context.get());
- if (defaultQuota >= expectedUsage + currentQuota)
- return defaultQuota;
+ if (!impl->exceededDatabaseQuotaContext || !impl->exceededDatabaseQuotaContext->exceededDatabaseQuotaCallback)
+ return false;
- if (impl->exceededDatabaseQuota)
- ewkContextDeleteExceededQuota(impl->exceededDatabaseQuota);
- impl->exceededDatabaseQuota = ewkContextCreateExceededQuota(origin, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
- evas_object_smart_callback_call(ewkView, "database,quota,exceeded", impl->exceededDatabaseQuota);
+ TIZEN_LOGI("No error in prameter. Request to display user confirm popup. expectedUsage(%llu)", expectedUsage);
+ impl->isWaitingForExceededQuotaPopupReply = true;
+ if (impl->exceededQuotaOrigin)
+ deleteSecurityOrigin(impl->exceededQuotaOrigin);
+ impl->exceededQuotaOrigin = createSecurityOrigin(origin);
- return ewkContextGetNewQuotaForExceededQuota(impl->context.get(), impl->exceededDatabaseQuota);
+ int length = WKStringGetMaximumUTF8CStringSize(databaseName);
+ OwnArrayPtr<char> databaseNameBuffer = adoptArrayPtr(new char[length]);
+ WKStringGetUTF8CString(databaseName, databaseNameBuffer.get(), length);
+
+ return impl->exceededDatabaseQuotaContext->exceededDatabaseQuotaCallback(ewkView, impl->exceededQuotaOrigin, databaseNameBuffer.get(), expectedUsage, impl->exceededDatabaseQuotaContext->userData) == EINA_TRUE;
}
#endif
return true;
}
+
+void ewk_view_exceeded_database_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Database_Quota_Callback callback, void* userData)
+{
+#if ENABLE(TIZEN_SQL_DATABASE)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+ if (!impl->exceededDatabaseQuotaContext)
+ impl->exceededDatabaseQuotaContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
+ impl->exceededDatabaseQuotaContext->exceededDatabaseQuotaCallback = callback;
+ impl->exceededDatabaseQuotaContext->userData = userData;
+#else
+ UNUSED_PARAM(ewkView);
+ UNUSED_PARAM(callback);
+ UNUSED_PARAM(userData);
+#endif
+}
+
+void ewk_view_exceeded_database_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
+{
+#if ENABLE(TIZEN_SQL_DATABASE)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+ TIZEN_LOGI("allow %d", allow);
+ WKPageReplyExceededDatabaseQuota(toAPI(impl->page()), allow == EINA_TRUE);
+ if (impl->exceededQuotaOrigin)
+ deleteSecurityOrigin(impl->exceededQuotaOrigin);
+ impl->exceededQuotaOrigin = 0;
+ impl->isWaitingForExceededQuotaPopupReply = false;
+#else
+ UNUSED_PARAM(ewkView);
+ UNUSED_PARAM(allow);
+#endif
+}
EAPI void ewk_view_exceeded_indexed_database_quota_reply(Evas_Object* o, Eina_Bool allow);
//#endif
+// #if ENABLE(TIZEN_SQL_DATABASE)
+typedef Eina_Bool (*Ewk_View_Exceeded_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, const char* database_name, unsigned long long expectedQuota, void* user_data);
+EAPI void ewk_view_exceeded_database_quota_callback_set(Evas_Object* o, Ewk_View_Exceeded_Database_Quota_Callback callback, void* user_data);
+EAPI void ewk_view_exceeded_database_quota_reply(Evas_Object* o, Eina_Bool allow);
+// #endif
+
/**
* Gets the Ewk_Settings of this view.
*
void ewkViewFrameRendered(Evas_Object* ewkView);
#if ENABLE(TIZEN_SQL_DATABASE)
-unsigned long long ewkViewExceededDatabaseQuota(Evas_Object* ewkView, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
+bool ewkViewExceededDatabaseQuota(Evas_Object* ewkView, WKSecurityOriginRef origin, WKStringRef displayName, unsigned long long expectedUsage);
Ewk_Context_Exceeded_Quota* ewkContextCreateExceededQuota(WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
void ewkContextDeleteExceededQuota(Ewk_Context_Exceeded_Quota* exceededQuota);
unsigned long long ewkContextGetNewQuotaForExceededQuota(Ewk_Context* context, Ewk_Context_Exceeded_Quota* exceededQuota);
m_loaderClient.didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
}
+#if ENABLE(TIZEN_SQL_DATABASE)
+void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& displayName, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> allowExceed)
+{
+ WebFrameProxy* frame = process()->webFrame(frameID);
+ MESSAGE_CHECK(frame);
+
+ // Since exceededDatabaseQuota() can spin a nested run loop we need to turn off the responsiveness timer.
+ process()->responsivenessTimer()->stop();
+
+ m_exceededDatabaseQuotaReply = allowExceed;
+ RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
+#endif
+
+ if (!m_uiClient.exceededDatabaseQuota(this, frame, origin.get(), displayName, expectedUsage))
+ replyExceededDatabaseQuota(false);
+}
+#else
void WebPageProxy::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, uint64_t& newQuota)
{
WebFrameProxy* frame = process()->webFrame(frameID);
newQuota = m_uiClient.exceededDatabaseQuota(this, frame, origin.get(), databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
}
+#endif
void WebPageProxy::requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier)
{
void replyExceededIndexedDatabaseQuota(bool allow);
#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+ void replyExceededDatabaseQuota(bool allow);
+#endif
+
private:
WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
void pageDidScroll();
void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
void printFrame(uint64_t frameID);
+#if ENABLE(TIZEN_SQL_DATABASE)
+ void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& displayName, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>);
+#else
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, uint64_t& newQuota);
+#endif
#if ENABLE(TIZEN_APPLICATION_CACHE)
void requestApplicationCachePermission(uint64_t frameID, const String& originIdentifier, PassRefPtr<Messages::WebPageProxy::RequestApplicationCachePermission::DelayedReply>);
#endif
#if ENABLE(TIZEN_APPLICATION_CACHE)
RefPtr<Messages::WebPageProxy::RequestApplicationCachePermission::DelayedReply> m_applicationCacheReply;
#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+ RefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> m_exceededDatabaseQuotaReply;
+#endif
#endif
#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
# Database messages
+#if ENABLE(TIZEN_SQL_DATABASE)
+ ExceededDatabaseQuota(uint64_t frameID, WTF::String originIdentifier, WTF::String databaseDisplayName, uint64_t expectedUsage) -> (bool allowExceed) Delayed
+#endif
+#if !ENABLE(TIZEN_SQL_DATABASE)
ExceededDatabaseQuota(uint64_t frameID, WTF::String originIdentifier, WTF::String databaseName, WTF::String databaseDisplayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage) -> (uint64_t newQuota)
+#endif
#if ENABLE(TIZEN_APPLICATION_CACHE)
RequestApplicationCachePermission(uint64_t frameID, WTF::String originIdentifier) -> (bool allow) Delayed
m_client.pageDidScroll(toAPI(page), m_client.clientInfo);
}
+#if ENABLE(TIZEN_SQL_DATABASE)
+bool WebUIClient::exceededDatabaseQuota(WebPageProxy* page, WebFrameProxy* frame, WebSecurityOrigin* origin, const String& databaseDisplayName, unsigned long long expectedUsage)
+{
+#if ENABLE(TIZEN_WEBKIT2_EFL_WTR)
+ return false;
+#endif
+ if (!m_client.exceededDatabaseQuota)
+ return false;
+
+ return m_client.exceededDatabaseQuota(toAPI(page), toAPI(frame), toAPI(origin), toAPI(databaseDisplayName.impl()), expectedUsage, m_client.clientInfo);
+}
+#else
unsigned long long WebUIClient::exceededDatabaseQuota(WebPageProxy* page, WebFrameProxy* frame, WebSecurityOrigin* origin, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage)
{
if (!m_client.exceededDatabaseQuota)
return m_client.exceededDatabaseQuota(toAPI(page), toAPI(frame), toAPI(origin), toAPI(databaseName.impl()), toAPI(databaseDisplayName.impl()), currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, m_client.clientInfo);
}
+#endif
bool WebUIClient::runOpenPanel(WebPageProxy* page, WebFrameProxy* frame, WebOpenPanelParameters* parameters, WebOpenPanelResultListenerProxy* listener)
{
void didDraw(WebPageProxy*);
void pageDidScroll(WebPageProxy*);
+#if ENABLE(TIZEN_SQL_DATABASE)
+ bool exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, const String& databaseDisplayName, unsigned long long expectedUsage);
+#else
unsigned long long exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
+#endif
bool runOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*);
bool decidePolicyForGeolocationPermissionRequest(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, GeolocationPermissionRequestProxy*);
#if ENABLE(SQL_DATABASE)
#if ENABLE(TIZEN_SQL_DATABASE)
-unsigned long long PageUIClientEfl::exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void* clientInfo)
+bool PageUIClientEfl::exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef origin, WKStringRef displayName, unsigned long long expectedUsage, const void *clientInfo)
{
- return ewkViewExceededDatabaseQuota(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), origin, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
+ return ewkViewExceededDatabaseQuota(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), origin, displayName, expectedUsage);
}
#else
unsigned long long PageUIClientEfl::exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void* clientInfo)
static void hideColorPicker(WKPageRef, const void*);
#endif
#if ENABLE(SQL_DATABASE)
+#if ENABLE(TIZEN_SQL_DATABASE)
+ static bool exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, unsigned long long, const void *);
+#else
static unsigned long long exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, WKStringRef, unsigned long long currentQuota, unsigned long long, unsigned long long, unsigned long long, const void*);
#endif
+#endif
static void focus(WKPageRef, const void*);
static void unfocus(WKPageRef, const void*);
static void takeFocus(WKPageRef, WKFocusDirection, const void*);
}
#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+void WebPageProxy::replyExceededDatabaseQuota(bool allow)
+{
+ if (!m_exceededDatabaseQuotaReply) {
+ TIZEN_LOGE("m_exceededDatabaseQuotaReply does not exist");
+ return;
+ }
+
+ m_exceededDatabaseQuotaReply->send(allow);
+ m_exceededDatabaseQuotaReply = nullptr;
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+ process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
+#endif
+}
+#endif
+
#endif // #if OS(TIZEN)
void WebPageProxy::handleInputMethodKeydown(bool& handled)
uint64_t currentQuota = DatabaseTracker::tracker().quotaForOrigin(origin);
uint64_t currentOriginUsage = DatabaseTracker::tracker().usageForOrigin(origin);
uint64_t newQuota = 0;
+#if ENABLE(TIZEN_SQL_DATABASE)
+ const uint64_t defaultQuota = 5 * 1024 * 1024;
+ uint64_t requirement = currentQuota + details.expectedUsage();
+ if (requirement <= defaultQuota)
+ newQuota = requirement;
+ else {
+ unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
+ bool allowExceed = false;
+ WebProcess::shared().connection()->sendSync(
+ Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), details.displayName(), details.expectedUsage()),
+ Messages::WebPageProxy::ExceededDatabaseQuota::Reply(allowExceed), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags);
+ if (allowExceed)
+ newQuota = currentQuota + details.expectedUsage();
+ else
+ newQuota = currentQuota;
+ }
+#else
WebProcess::shared().connection()->sendSync(
Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), databaseName, details.displayName(), currentQuota, currentOriginUsage, details.currentUsage(), details.expectedUsage()),
Messages::WebPageProxy::ExceededDatabaseQuota::Reply(newQuota), m_page->pageID());
+#endif
DatabaseTracker::tracker().setQuota(origin, newQuota);
}
return testController->beforeUnloadReturnValue();
}
+#if ENABLE(TIZEN_SQL_DATABASE)
+static bool exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, unsigned long long, const void*)
+{
+ return true;
+}
+#else
static unsigned long long exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, WKStringRef, unsigned long long, unsigned long long, unsigned long long, unsigned long long, const void*)
{
static const unsigned long long defaultQuota = 5 * 1024 * 1024;
return defaultQuota;
}
-
+#endif
void TestController::runModal(WKPageRef page, const void* clientInfo)
{