Bug 69992 - The local database can't be opened
Summary: The local database can't be opened
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 20:31 PDT by Franky
Modified: 2021-08-06 10:31 PDT (History)
4 users (show)

See Also:


Attachments
index.html and jquery.js should be moved into "/home/franky/" directory. Then run the script "ewebkit-compile" to complie the main.c and then run "ebrowser" to load the index.html. (43.21 KB, application/x-gzip)
2011-10-12 20:31 PDT, Franky
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franky 2011-10-12 20:31:52 PDT
Created attachment 110798 [details]
index.html and jquery.js should be moved into "/home/franky/" directory. Then run the script "ewebkit-compile" to complie the main.c and then run "ebrowser" to load the index.html.

As shown in the attachment, this command in the file "index.html":

var db = openDatabase('db', '1.0', 'my first database', 2 * 1024 * 1024);

doesn't work. The code follow this line won't be executed as there may have an error when open the database.

In the file "main.c" you can search "@franky", that will indicate you what I've modified. 

In QWebView and google-chrome the index.html will be loaded normally. I've checked the source code of Qt, they will enable the offline storage after the storage path been set:

QWebSettings::setOfflineStoragePath(storagePath+"/Databases");
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);

For QWebView, these settings is enough to load my "idnex.html" correctly, but in EFL-Webkit, I found that there is no global setting function to enable the database storage. I use the "ewk_view_setting_local_storage_set(app->browser,enable)" to try to enable it, but seems that get no effect.

Note: the index.html should work with jquery.js and that file is also in the attachment, please don't forget to copy that into "/home/franky/", otherwise you may get confused by the result.
Comment 1 Lucas De Marchi 2011-10-13 09:16:35 PDT
I didn't have time to look at your code, but this is working for me:

http://slides.html5rocks.com/#web-sql-db


Probably there's an error in your html file. Both Firefox and Chromium shows the same output as well. Btw, DB should be enabled by default in EWebLauncher. Why are you changing it?

You could try it by just doing: ./Tools/EWebLauncher file:///your/path/index.html
Comment 2 Lucas De Marchi 2011-10-13 09:45:56 PDT
ahn... just checked your code.

It's a configuration thing. By default WebKit-EFL uses 1MB as a max quota for database and you are trying to open a database with 2MB.

See documentation of ewk_view_exceeded_database_quota().

Basically, you just have to implement the method exceeded_database_quota() returning the new quota if you would like to allow this change for that site.
Comment 3 Raphael Kubo da Costa (:rakuco) 2011-10-14 05:15:52 PDT
According to comment #2, this does not seem to be a bug after all. Please reopen if you still have problems after following the given advice.
Comment 4 Franky 2011-10-14 05:37:36 PDT
(In reply to comment #2)
> ahn... just checked your code.
> 
> It's a configuration thing. By default WebKit-EFL uses 1MB as a max quota for database and you are trying to open a database with 2MB.
> 
> See documentation of ewk_view_exceeded_database_quota().
> 
> Basically, you just have to implement the method exceeded_database_quota() returning the new quota if you would like to allow this change for that site.

Thank you! After change my JS code, everything is ok now. Sorry for bother, it shouldn't be reported as a bug.