Bug 95982 - [EFL][WK2] Add APIs to get/set the frame flattening.
Summary: [EFL][WK2] Add APIs to get/set the frame flattening.
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: Ryuan Choi
URL:
Keywords:
Depends on:
Blocks: 61838
  Show dependency treegraph
 
Reported: 2012-09-06 07:42 PDT by Ryuan Choi
Modified: 2012-10-04 19:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.73 KB, patch)
2012-10-03 22:45 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff
Patch (9.28 KB, patch)
2012-10-04 04:33 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff
Patch (9.57 KB, patch)
2012-10-04 05:37 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff
Patch (9.81 KB, patch)
2012-10-04 05:52 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryuan Choi 2012-09-06 07:42:42 PDT
Add ewk_settings_enable_frame_flattening_get/set to WebKit2/Efl API.
Comment 1 Ryuan Choi 2012-10-03 22:45:34 PDT
Created attachment 167033 [details]
Patch
Comment 2 Jinwoo Song 2012-10-03 22:56:01 PDT
Comment on attachment 167033 [details]
Patch

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

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

test case file is missing.
Comment 3 Chris Dumez 2012-10-03 23:03:53 PDT
Comment on attachment 167033 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:143
> + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure

We should document the default value for this setting.

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:147
> +EAPI Eina_Bool ewk_settings_enable_frame_flattening_set(Ewk_Settings* settings, Eina_Bool enable);

Star on wrong side

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:159
> +EAPI Eina_Bool ewk_settings_enable_frame_flattening_get(const Ewk_Settings* settings);

Star on wrong side

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

Maybe ASSERT_TRUE(settings); to be safe?

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:106
> +    ewk_view_uri_set(webView(), environment->urlForResource("frame_flattening_test.html").data());

Adding a comment to indicate that frame flattening is enabled by default here would be nice.

> Tools/MiniBrowser/efl/main.c:265
> +    Eina_Bool isFrameFlattening = 0;

= EINA_FALSE ?
Comment 4 Ryuan Choi 2012-10-04 04:33:40 PDT
Created attachment 167072 [details]
Patch
Comment 5 Ryuan Choi 2012-10-04 04:35:35 PDT
(In reply to comment #2)
> (From update of attachment 167033 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167033&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:112
> > +}
> 
> test case file is missing.

Sorry, I missed.

I added test case file.

(In reply to comment #3)
> (From update of attachment 167033 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167033&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/ewk_settings.h:143
> > + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
> 
> We should document the default value for this setting.
> 
Fixed.

> > Source/WebKit2/UIProcess/API/efl/ewk_settings.h:147
> > +EAPI Eina_Bool ewk_settings_enable_frame_flattening_set(Ewk_Settings* settings, Eina_Bool enable);
> 
> Star on wrong side
> 
> > Source/WebKit2/UIProcess/API/efl/ewk_settings.h:159
> > +EAPI Eina_Bool ewk_settings_enable_frame_flattening_get(const Ewk_Settings* settings);
> 
> Star on wrong side
> 
Fixed.

> > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:105
> > +
> 
> Maybe ASSERT_TRUE(settings); to be safe?
> 
> > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:106
> > +    ewk_view_uri_set(webView(), environment->urlForResource("frame_flattening_test.html").data());
> 
> Adding a comment to indicate that frame flattening is enabled by default here would be nice.
> 
I agree. Added.

> > Tools/MiniBrowser/efl/main.c:265
> > +    Eina_Bool isFrameFlattening = 0;
> 
> = EINA_FALSE ?
Right. fixed.

Thank you.
Comment 6 Gyuyoung Kim 2012-10-04 04:46:25 PDT
Comment on attachment 167072 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:138
> + * Eanbles/disables frame flattening.

s/Eanbles/Enables/g

> Tools/MiniBrowser/efl/main.c:64
> +            ('f', "flattening", "frame flattening.", 0),

Use NULL instead of 0

> Tools/MiniBrowser/efl/main.c:216
> +static MiniBrowser *browserCreate(const char *url, const char *engine, Eina_Bool isFrameFlattening)

isFrameFlattening -> frame_flattening ?

> Tools/MiniBrowser/efl/main.c:235
> +    ewk_settings_enable_frame_flattening_set(ewk_view_settings_get(app->browser), isFrameFlattening);

ditto.
Comment 7 Jinwoo Song 2012-10-04 04:47:57 PDT
Comment on attachment 167072 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:107
> +    // The frame flattening is disabled by default.

IMO, it is more suitable to set the frame flattening 'false' for testing the API.
This is a unit test and we do not need to assume the default.

> Tools/MiniBrowser/efl/main.c:217
>  {

'isFrameFlattening' is not EFL coding style.
Comment 8 Ryuan Choi 2012-10-04 05:37:22 PDT
Created attachment 167080 [details]
Patch
Comment 9 Ryuan Choi 2012-10-04 05:52:36 PDT
Created attachment 167085 [details]
Patch
Comment 10 Ryuan Choi 2012-10-04 05:55:56 PDT
(In reply to comment #6)
> (From update of attachment 167072 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167072&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/ewk_settings.h:138
> > + * Eanbles/disables frame flattening.
> 
> s/Eanbles/Enables/g
Fixed.

> 
> > Tools/MiniBrowser/efl/main.c:64
> > +            ('f', "flattening", "frame flattening.", 0),
> 
> Use NULL instead of 0
Fixed to EINA_FALSE

> 
> > Tools/MiniBrowser/efl/main.c:216
> > +static MiniBrowser *browserCreate(const char *url, const char *engine, Eina_Bool isFrameFlattening)
> 
> isFrameFlattening -> frame_flattening ?
Done.

> 
> > Tools/MiniBrowser/efl/main.c:235
> > +    ewk_settings_enable_frame_flattening_set(ewk_view_settings_get(app->browser), isFrameFlattening);
> 
> ditto.
Done.

(In reply to comment #7)
> (From update of attachment 167072 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167072&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:107
> > +    // The frame flattening is disabled by default.
> 
> IMO, it is more suitable to set the frame flattening 'false' for testing the API.
> This is a unit test and we do not need to assume the default.

I think that default value can be tested.
Instead, I added some ASSERT and test case which set false.

> 
> > Tools/MiniBrowser/efl/main.c:217
> >  {
> 
> 'isFrameFlattening' is not EFL coding style.
Done.
Comment 11 Chris Dumez 2012-10-04 06:51:48 PDT
Comment on attachment 167085 [details]
Patch

LGTM.
Comment 12 WebKit Review Bot 2012-10-04 19:03:56 PDT
Comment on attachment 167085 [details]
Patch

Rejecting attachment 167085 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
ks FAILED -- saving rejects to file Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp.rej
patching file Tools/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Tools/MiniBrowser/efl/main.c
Hunk #3 succeeded at 232 with fuzz 1.
Hunk #4 succeeded at 265 (offset 3 lines).
Hunk #5 succeeded at 291 (offset 3 lines).

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Gyuyoung K..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/14182211
Comment 13 Ryuan Choi 2012-10-04 19:38:15 PDT
Committed r130450: <http://trac.webkit.org/changeset/130450>