summaryrefslogtreecommitdiffstats
path: root/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp')
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 92b95b6..c51befb 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -34,6 +34,7 @@
#include "ChromeClientEfl.h"
#if ENABLE(DATABASE)
+#include "DatabaseDetails.h"
#include "DatabaseTracker.h"
#endif
#include "EWebKit.h"
@@ -188,6 +189,16 @@ bool ChromeClientEfl::menubarVisible()
return visible;
}
+void ChromeClientEfl::createSelectPopup(PopupMenuClient* client, int selected, const IntRect& rect)
+{
+ ewk_view_popup_new(m_view, client, selected, rect);
+}
+
+bool ChromeClientEfl::destroySelectPopup()
+{
+ return ewk_view_popup_destroy(m_view);
+}
+
void ChromeClientEfl::setResizable(bool)
{
notImplemented();
@@ -345,12 +356,21 @@ void ChromeClientEfl::reachedMaxAppCacheSize(int64_t spaceNeeded)
#if ENABLE(DATABASE)
void ChromeClientEfl::exceededDatabaseQuota(Frame* frame, const String& databaseName)
{
- uint64_t quota = ewk_settings_web_database_default_quota_get();
+ uint64_t quota;
+ SecurityOrigin* origin = frame->document()->securityOrigin();
+
+ DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(databaseName, origin);
+ quota = ewk_view_exceeded_database_quota(m_view,
+ kit(frame), databaseName.utf8().data(),
+ details.currentUsage(), details.expectedUsage());
- if (!DatabaseTracker::tracker().hasEntryForOrigin(frame->document()->securityOrigin()))
- DatabaseTracker::tracker().setQuota(frame->document()->securityOrigin(), quota);
+ /* if client did not set quota, and database is being created now, the
+ * default quota is applied
+ */
+ if (!quota && !DatabaseTracker::tracker().hasEntryForOrigin(origin))
+ quota = ewk_settings_web_database_default_quota_get();
- ewk_view_exceeded_database_quota(m_view, kit(frame), databaseName.utf8().data());
+ DatabaseTracker::tracker().setQuota(origin, quota);
}
#endif