Bug 116657

Summary: [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, lucas.de.marchi, rakuco
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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.