Bug 109794

Summary: [WK2][EFL] Eliminate access to WK2 C++ internals from ewk_view functions
Product: WebKit Reporter: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Component: WebKit EFLAssignee: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cdumez, gyuyoung.kim, kenneth, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107657, 107662    
Attachments:
Description Flags
patch
none
patch
none
patch v2
none
patch v3
eflews.bot: commit-queue-
patch v4 none

Mikhail Pozdnyakov
Reported 2013-02-14 01:34:00 PST
SSIA.
Attachments
patch (12.42 KB, patch)
2013-02-14 01:58 PST, Mikhail Pozdnyakov
no flags
patch (11.69 KB, patch)
2013-02-14 02:02 PST, Mikhail Pozdnyakov
no flags
patch v2 (11.41 KB, patch)
2013-02-14 04:35 PST, Mikhail Pozdnyakov
no flags
patch v3 (11.32 KB, patch)
2013-02-18 05:02 PST, Mikhail Pozdnyakov
eflews.bot: commit-queue-
patch v4 (11.29 KB, patch)
2013-02-18 05:21 PST, Mikhail Pozdnyakov
no flags
Mikhail Pozdnyakov
Comment 1 2013-02-14 01:58:56 PST
Mikhail Pozdnyakov
Comment 2 2013-02-14 02:02:40 PST
Created attachment 188293 [details] patch Removed extra line and pending space
Chris Dumez
Comment 3 2013-02-14 03:16:07 PST
Comment on attachment 188293 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=188293&action=review > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:113 > + return toImpl(viewRef)->requestExitFullScreen(); return statement in void function. > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:116 > + return 0; Ditto. > Source/WebKit2/UIProcess/API/efl/EwkView.cpp:746 > +void EwkView::feedTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers) Feels like this may be a WebView method, except for the argument types. > Source/WebKit2/UIProcess/API/efl/EwkView.cpp:748 > + page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, transformFromScene(), transformToScreen(), ecore_time_get())); Page proxy should really not be used in EwkView, which is why I think this should be on WebView side. > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:446 > + toImpl(impl->wkPage())->setPaginationMode(static_cast<WebCore::Pagination::Mode>(mode)); WKPageSetPaginationMode() ? > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:455 > + return static_cast<Ewk_Pagination_Mode>(toImpl(impl->wkPage())->paginationMode()); WKPageGetPaginationMode() ? > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:-472 > - return false; We should keep returning false if FULLSCREEN_API is disabled.
Kenneth Rohde Christiansen
Comment 4 2013-02-14 03:32:01 PST
Comment on attachment 188293 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=188293&action=review > Source/WebKit2/ChangeLog:24 > + Added feedTouchEvent() method so that: at fisrt ewk_view_feed_touch_event() first* > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:108 > + > +bool WKViewGetMainFrameInViewSourceMode(WKViewRef viewRef) > +{ > + return toImpl(viewRef)->mainFrameInViewSourceMode(); > +} Does "mainframe" add any value here? WKViewSetShowAsSource? > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:111 > + > +void WKViewRequestExitFullScreen(WKViewRef viewRef) > +{ How does this integrate with the WK C api for fullscreen?
Mikhail Pozdnyakov
Comment 5 2013-02-14 03:53:25 PST
Comment on attachment 188293 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=188293&action=review >> Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:113 >> + return toImpl(viewRef)->requestExitFullScreen(); > > return statement in void function. oops. my bad :/ >> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:746 >> +void EwkView::feedTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers) > > Feels like this may be a WebView method, except for the argument types. yeah, but this has to be solved further, together with the rest event handling. >> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:748 >> + page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, transformFromScene(), transformToScreen(), ecore_time_get())); > > Page proxy should really not be used in EwkView, which is why I think this should be on WebView side. We do not have C API for event objects so far.. >> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:446 >> + toImpl(impl->wkPage())->setPaginationMode(static_cast<WebCore::Pagination::Mode>(mode)); > > WKPageSetPaginationMode() ? I did not dare to use this as this function as WKPageSetPaginationMode is from WKPagePrivate, there is probably a reason for not exposing it. >> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:455 >> + return static_cast<Ewk_Pagination_Mode>(toImpl(impl->wkPage())->paginationMode()); > > WKPageGetPaginationMode() ? ditto. >> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:-472 >> - return false; > > We should keep returning false if FULLSCREEN_API is disabled. yeah.
Mikhail Pozdnyakov
Comment 6 2013-02-14 03:58:06 PST
> > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:108 > > + > > +bool WKViewGetMainFrameInViewSourceMode(WKViewRef viewRef) > > +{ > > + return toImpl(viewRef)->mainFrameInViewSourceMode(); > > +} > > Does "mainframe" add any value here? > > WKViewSetShowAsSource? could be WKViewGetShowsAsSource, to be consistent with WKViewGetDrawsBackground and so on.
Mikhail Pozdnyakov
Comment 7 2013-02-14 04:17:28 PST
> > > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:111 > > + > > +void WKViewRequestExitFullScreen(WKViewRef viewRef) > > +{ > > How does this integrate with the WK C api for fullscreen? Do we have C api for fullscreen? I can see only WKFullScreenClientGtk, however RequestExitFullScreen seems to be rather functionality of view I guess.
Mikhail Pozdnyakov
Comment 8 2013-02-14 04:35:16 PST
Created attachment 188319 [details] patch v2 Took comments from Chris and Kenneth into consideration.
Kenneth Rohde Christiansen
Comment 9 2013-02-15 06:34:05 PST
Comment on attachment 188319 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=188319&action=review Looks fine > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:111 > + > +void WKViewRequestExitFullScreen(WKViewRef viewRef) > +{ when does the UA/browser request to exit the fullscreen? How is this supposed to work? > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:445 > + // FIXME: move to exported C WKPage API when it appears. appears? > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:517 > + WKPageGetContentsAsMHTMLData(impl->wkPage(), false, context, ewkViewPageContentsCallback); Content* no?
Chris Dumez
Comment 10 2013-02-15 06:36:02 PST
Comment on attachment 188319 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=188319&action=review >> Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:111 >> +{ > > when does the UA/browser request to exit the fullscreen? How is this supposed to work? When the content requested full screen mode via full screen API, and we switch to full screen. If the user press "ESC" key, the browser will request to exit fullscreen using this API. You can test in our MiniBrowser.
Kenneth Rohde Christiansen
Comment 11 2013-02-15 06:37:07 PST
(In reply to comment #10) > (From update of attachment 188319 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=188319&action=review > > >> Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:111 > >> +{ > > > > when does the UA/browser request to exit the fullscreen? How is this supposed to work? > > When the content requested full screen mode via full screen API, and we switch to full screen. If the user press "ESC" key, the browser will request to exit fullscreen using this API. You can test in our MiniBrowser. As it is a request can the content actually ignore this and not exit? or is this just so that JS etc can act on exiting?
Chris Dumez
Comment 12 2013-02-15 06:45:25 PST
Comment on attachment 188319 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=188319&action=review >>>> Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:111 >>>> +{ >>> >>> when does the UA/browser request to exit the fullscreen? How is this supposed to work? >> >> When the content requested full screen mode via full screen API, and we switch to full screen. If the user press "ESC" key, the browser will request to exit fullscreen using this API. You can test in our MiniBrowser. > > As it is a request can the content actually ignore this and not exit? or is this just so that JS etc can act on exiting? To my knowledge, this is so that doc.fullscreenEnabled is updated and so that a fullscreenchange event is fired. CSS style may also change depending on fullscreen state. It is not technically a request, we should probably call it "WKViewExitFullScreen()".
Mikhail Pozdnyakov
Comment 13 2013-02-18 05:02:15 PST
Created attachment 188855 [details] patch v3 WKViewRequestExitFullScreen -> WKViewExitFullScreen
EFL EWS Bot
Comment 14 2013-02-18 05:09:07 PST
Mikhail Pozdnyakov
Comment 15 2013-02-18 05:21:26 PST
Created attachment 188858 [details] patch v4 rebased
Kenneth Rohde Christiansen
Comment 16 2013-02-18 05:29:17 PST
Comment on attachment 188858 [details] patch v4 LGTM
WebKit Review Bot
Comment 17 2013-02-19 08:49:49 PST
Comment on attachment 188858 [details] patch v4 Clearing flags on attachment: 188858 Committed r143339: <http://trac.webkit.org/changeset/143339>
WebKit Review Bot
Comment 18 2013-02-19 08:49:54 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.