Bug 116657 - [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
Summary: [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
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: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-23 03:49 PDT by Gyuyoung Kim
Modified: 2013-05-23 05:29 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.22 KB, patch)
2013-05-23 03:57 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (3.35 KB, patch)
2013-05-23 04:35 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (3.61 KB, patch)
2013-05-23 04:43 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (3.57 KB, patch)
2013-05-23 04:45 PDT, Gyuyoung 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 Gyuyoung Kim 2013-05-23 03:49:24 PDT
WKPageGet|SetPaginationMode APIs appear on WK2 C APIs. So, we need to use them for ewk_view_pagination_mode_set|get.
Comment 1 Gyuyoung Kim 2013-05-23 03:57:23 PDT
Created attachment 202659 [details]
Patch
Comment 2 Chris Dumez 2013-05-23 04:04:49 PDT
Comment on attachment 202659 [details]
Patch

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

> Source/WebKit2/ChangeLog:8
> +        WKPageGet|SetPaginationMode APIs appear on WK2 C APIs. So, we need to use them for

"appear on" -> "is present in"

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:511
> +    WKPageSetPaginationMode(impl->wkPage(), static_cast<WebCore::Pagination::Mode>(mode));

This should really be casted to a WKPaginationMode, not a WebCore::Pagination::Mode. The COMPILE_ASSERT_MATCHING_ENUM() above need to be updated or we need a static inline function to convert one enum into another. Can you check if we can get rid of the "using namespace WebCore;" and maybe a few WebCore includes?
Comment 3 Gyuyoung Kim 2013-05-23 04:35:53 PDT
Created attachment 202661 [details]
Patch
Comment 4 Gyuyoung Kim 2013-05-23 04:37:40 PDT
(In reply to comment #2)

> This should really be casted to a WKPaginationMode, not a WebCore::Pagination::Mode. The COMPILE_ASSERT_MATCHING_ENUM() above need to be updated or we need a static inline function to convert one enum into another. Can you check if we can get rid of the "using namespace WebCore;" and maybe a few WebCore includes?

Nice catch !! I missed it. I prefer to update COMPILE_ASSERT_MATCHING_ENUM() using WKPaginationMode.
Comment 5 Gyuyoung Kim 2013-05-23 04:43:13 PDT
Created attachment 202662 [details]
Patch
Comment 6 Gyuyoung Kim 2013-05-23 04:44:20 PDT
Remove "using namespace WebCore;" as well. Thanks.
Comment 7 Gyuyoung Kim 2013-05-23 04:45:55 PDT
Created attachment 202663 [details]
Patch
Comment 8 Chris Dumez 2013-05-23 04:50:06 PDT
Comment on attachment 202663 [details]
Patch

Nice, r=me.
Comment 9 WebKit Commit Bot 2013-05-23 05:29:43 PDT
Comment on attachment 202663 [details]
Patch

Clearing flags on attachment: 202663

Committed r150581: <http://trac.webkit.org/changeset/150581>
Comment 10 WebKit Commit Bot 2013-05-23 05:29:46 PDT
All reviewed patches have been landed.  Closing bug.