Summary: | [EFL][WK2] Add APIs to get/set the frame flattening. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryuan Choi <ryuan.choi> | ||||||||||
Component: | WebKit EFL | Assignee: | Ryuan Choi <ryuan.choi> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | gyuyoung.kim, lucas.de.marchi, rakuco, webkit.review.bot | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 61838 | ||||||||||||
Attachments: |
|
Description
Ryuan Choi
2012-09-06 07:42:42 PDT
Created attachment 167033 [details]
Patch
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 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 ? Created attachment 167072 [details]
Patch
(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 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 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. Created attachment 167080 [details]
Patch
Created attachment 167085 [details]
Patch
(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 on attachment 167085 [details]
Patch
LGTM.
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 Committed r130450: <http://trac.webkit.org/changeset/130450> |