Bug 101688 - [EFL][WK2] Add ewk_settings_offline_web_application_cache_enabled set/get API
Summary: [EFL][WK2] Add ewk_settings_offline_web_application_cache_enabled set/get API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 61838
  Show dependency treegraph
 
Reported: 2012-11-08 18:50 PST by Jiyeon Kim
Modified: 2012-11-12 04:34 PST (History)
9 users (show)

See Also:


Attachments
Patch (5.35 KB, patch)
2012-11-08 20:40 PST, Jiyeon Kim
no flags Details | Formatted Diff | Diff
Patch (5.54 KB, patch)
2012-11-12 00:48 PST, Jiyeon Kim
no flags Details | Formatted Diff | Diff
Patch (5.63 KB, patch)
2012-11-12 03:42 PST, Jiyeon Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiyeon Kim 2012-11-08 18:50:17 PST
Add ewk_settings_offline_web_application_cache_get/set API which is used for setting/getting of default offline web application cache enabled/disabled.
Comment 1 Jiyeon Kim 2012-11-08 20:40:36 PST
Created attachment 173188 [details]
Patch
Comment 2 Ryuan Choi 2012-11-10 07:47:03 PST
Comment on attachment 173188 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review

> Source/WebKit2/ChangeLog:9
> +        Add ewk_settings_offline_web_application_cache get/set APIs which are used for setting/getting of default offline web application cache enabled/disabled.
> +        And enable offline web application cache for WebKit2 EFL port

Can I know where the caches are saved ?

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:366
> + * @return @c EINA_TRUE if the encoding detector is enabled

Huk, encoding detector?
Comment 3 Chris Dumez 2012-11-10 08:10:52 PST
Comment on attachment 173188 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review

> Source/WebKit2/ChangeLog:7
> +

The following may be clearer and more correct: "Add API functions to Ewk_Settings to set / get the offline Web application cache enabled state. This setting is now enabled by default for WebKit2 EFL port."

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:353
> + * @param settings settings object to set the offline application cache

... to set the offline application cache state. "state" is missing.

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:362
> +* Returns whether the offline application cache is enabled or not.

star alignment problem?

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:367
> + *         @c EINA_FALSE if not or on failure

"if disabled" would be better than "if not" I believe.

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:189
> +

Please add a test to make sure the setting is set to true by default.
Comment 4 Jiyeon Kim 2012-11-10 17:15:10 PST
(In reply to comment #2)
> (From update of attachment 173188 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review
> 
> > Source/WebKit2/ChangeLog:9
> > +        Add ewk_settings_offline_web_application_cache get/set APIs which are used for setting/getting of default offline web application cache enabled/disabled.
> > +        And enable offline web application cache for WebKit2 EFL port
> 
> Can I know where the caches are saved ?
The application cahce default directory is homedirectory+"/WebKitEfl/Applications"
> 
> > Source/WebKit2/UIProcess/API/efl/ewk_settings.h:366
> > + * @return @c EINA_TRUE if the encoding detector is enabled
> 
> Huk, encoding detector?
It's my big mistake. I'm sorry.
Comment 5 Chris Dumez 2012-11-10 23:40:51 PST
Comment on attachment 173188 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review

>>> Source/WebKit2/ChangeLog:9
>>> +        And enable offline web application cache for WebKit2 EFL port
>> 
>> Can I know where the caches are saved ?
> 
> The application cahce default directory is homedirectory+"/WebKitEfl/Applications"

This does not sound right. We are supposed to use standard XDG paths. It is likely to be ${XDG_DATA_HOME}/WebKitEfl/Applications (otherwise, it should be fixed).
Comment 6 Chris Dumez 2012-11-10 23:49:41 PST
Comment on attachment 173188 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review

>>>> Source/WebKit2/ChangeLog:9
>>>> +        And enable offline web application cache for WebKit2 EFL port
>>> 
>>> Can I know where the caches are saved ?
>> 
>> The application cahce default directory is homedirectory+"/WebKitEfl/Applications"
> 
> This does not sound right. We are supposed to use standard XDG paths. It is likely to be ${XDG_DATA_HOME}/WebKitEfl/Applications (otherwise, it should be fixed).

Actually $XDG_CACHE_HOME instead of $XDG_DATA_HOME since it is a cache.
Comment 7 Jiyeon Kim 2012-11-11 15:56:13 PST
(In reply to comment #6)
> (From update of attachment 173188 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review
> 
> >>>> Source/WebKit2/ChangeLog:9
> >>>> +        And enable offline web application cache for WebKit2 EFL port
> >>> 
> >>> Can I know where the caches are saved ?
> >> 
> >> The application cahce default directory is homedirectory+"/WebKitEfl/Applications"
> > 
> > This does not sound right. We are supposed to use standard XDG paths. It is likely to be ${XDG_DATA_HOME}/WebKitEfl/Applications (otherwise, it should be fixed).
> 
> Actually $XDG_CACHE_HOME instead of $XDG_DATA_HOME since it is a cache.
Yes, you're right. Actual directory can get using Webcontext::applicationCacheDirectory(). This method returns String::fromUTF8(efreet_cache_home_get()) + "/WebKitEfl/Applications"
Comment 8 Gyuyoung Kim 2012-11-11 16:21:59 PST
Comment on attachment 173188 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173188&action=review

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:190
> +    ASSERT_TRUE(ewk_settings_offline_web_application_cache_enabled_set(settings, EINA_TRUE));

Use standard boolean type instead of EINA_TRUE

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:193
> +    ASSERT_TRUE(ewk_settings_offline_web_application_cache_enabled_set(settings, EINA_FALSE));

ditto.
Comment 9 Jiyeon Kim 2012-11-12 00:48:27 PST
Created attachment 173582 [details]
Patch
Comment 10 Gyuyoung Kim 2012-11-12 01:51:41 PST
Comment on attachment 173582 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173582&action=review

> Source/WebKit2/ChangeLog:9
> +        And enable offline web application cache for WebKit2 EFL port

It seems to me this description is not clear. Please re-write this more clear.
Comment 11 Jiyeon Kim 2012-11-12 03:42:58 PST
Created attachment 173609 [details]
Patch
Comment 12 WebKit Review Bot 2012-11-12 04:34:48 PST
Comment on attachment 173609 [details]
Patch

Clearing flags on attachment: 173609

Committed r134210: <http://trac.webkit.org/changeset/134210>
Comment 13 WebKit Review Bot 2012-11-12 04:34:53 PST
All reviewed patches have been landed.  Closing bug.