RESOLVED FIXED Bug 110877
[WK2][EFL] Encapsulate view states set-up within WebView
https://bugs.webkit.org/show_bug.cgi?id=110877
Summary [WK2][EFL] Encapsulate view states set-up within WebView
Mikhail Pozdnyakov
Reported 2013-02-26 06:05:41 PST
SSIA. Outcome: 1) Reduces usage of EwkView inside WebView class. 2) Reduces direct usage of WebPageProxy inside EwkView class.
Attachments
patch (8.54 KB, patch)
2013-02-26 06:19 PST, Mikhail Pozdnyakov
no flags
patch v2 (8.52 KB, patch)
2013-03-13 07:37 PDT, Mikhail Pozdnyakov
benjamin: review-
patch v3 (8.73 KB, patch)
2013-04-03 14:02 PDT, Mikhail Pozdnyakov
benjamin: review+
webkit.review.bot: commit-queue-
Mikhail Pozdnyakov
Comment 1 2013-02-26 06:19:08 PST
Kenneth Rohde Christiansen
Comment 2 2013-02-26 06:37:41 PST
Comment on attachment 190270 [details] patch LGTM, but are you sure the initial state is correct? any way to test it? Focus issues are hard to debug, so we better be certain
Mikhail Pozdnyakov
Comment 3 2013-03-13 07:35:24 PDT
(In reply to comment #2) > (From update of attachment 190270 [details]) > LGTM, but are you sure the initial state is correct? any way to test it? Focus issues are hard to debug, so we better be certain Initial states are set by evas callbacks while evas object creation, so the values will be certain anyway. However think, both isFocused and isVisible are better to be set to 'false' initially indeed.
Mikhail Pozdnyakov
Comment 4 2013-03-13 07:37:42 PDT
Created attachment 192920 [details] patch v2 Changed initial values.
Kenneth Rohde Christiansen
Comment 5 2013-03-20 04:47:19 PDT
Ping owner review/sign off.
Benjamin Poulain
Comment 6 2013-03-25 13:59:56 PDT
Comment on attachment 192920 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=192920&action=review > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:66 > +void WKViewSetFocused(WKViewRef viewRef, bool flag) Not a fan of "flag" for the argument name. > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:76 > +void WKViewSetVisible(WKViewRef viewRef, bool flag) Ditto. SetIsVisible maybe? > Source/WebKit2/UIProcess/efl/WebView.cpp:95 > +void WebView::setFocused(bool focused) > +{ > + if (m_focused == focused) > + return; > + > + m_focused = focused; > + m_page->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive); > +} setFocused(false) call viewStateDidChange(WebPageProxy::ViewIsFocused)??? > Source/WebKit2/UIProcess/efl/WebView.cpp:104 > +void WebView::setVisible(bool visible) > +{ > + if (m_visible == visible) > + return; > + > + m_visible = visible; > + m_page->viewStateDidChange(WebPageProxy::ViewIsVisible); > +} You duplicate states between WebPageProxy and WebView. This is a really bad idea. > Source/WebKit2/UIProcess/efl/WebView.cpp:305 > bool WebView::isViewFocused() > { > - return m_ewkView->isFocused(); > + return isFocused(); > } > > bool WebView::isViewVisible() > { > - return m_ewkView->isVisible(); > + return isVisible(); > } Why don't you get rid of those APIs?
Mikhail Pozdnyakov
Comment 7 2013-03-26 01:54:19 PDT
(In reply to comment #6) > (From update of attachment 192920 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=192920&action=review > > > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:66 > > +void WKViewSetFocused(WKViewRef viewRef, bool flag) > > Not a fan of "flag" for the argument name. > > > Source/WebKit2/UIProcess/API/C/efl/WKView.cpp:76 > > +void WKViewSetVisible(WKViewRef viewRef, bool flag) > > Ditto. > > SetIsVisible maybe? agree, SetIsVisible is better. > > > Source/WebKit2/UIProcess/efl/WebView.cpp:95 > > +void WebView::setFocused(bool focused) > > +{ > > + if (m_focused == focused) > > + return; > > + > > + m_focused = focused; > > + m_page->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive); > > +} > > setFocused(false) call viewStateDidChange(WebPageProxy::ViewIsFocused)??? right, this code is in page proxy is invoked: if (flags & ViewIsFocused) m_process->send(Messages::WebPage::SetFocused(m_pageClient->isViewFocused()), m_pageID); so it just makes page proxy to query state from page client (web view itself). > > > Source/WebKit2/UIProcess/efl/WebView.cpp:104 > > +void WebView::setVisible(bool visible) > > +{ > > + if (m_visible == visible) > > + return; > > + > > + m_visible = visible; > > + m_page->viewStateDidChange(WebPageProxy::ViewIsVisible); > > +} > > You duplicate states between WebPageProxy and WebView. This is a really bad idea. there is no duplication, as page client is supposed to hold the state. > > > Source/WebKit2/UIProcess/efl/WebView.cpp:305 > > bool WebView::isViewFocused() > > { > > - return m_ewkView->isFocused(); > > + return isFocused(); > > } > > > > bool WebView::isViewVisible() > > { > > - return m_ewkView->isVisible(); > > + return isVisible(); > > } > > Why don't you get rid of those APIs? mm.. isViewVisible and isViewFocused are mandatory things to have for page client.
Mikhail Pozdnyakov
Comment 8 2013-04-03 14:02:58 PDT
Created attachment 196406 [details] patch v3 Changed API setter function names.
WebKit Review Bot
Comment 9 2013-04-04 14:14:48 PDT
Comment on attachment 196406 [details] patch v3 Rejecting attachment 196406 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 196406, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue Last 500 characters of output: ebView.cpp Hunk #2 succeeded at 104 with fuzz 1 (offset 7 lines). Hunk #3 succeeded at 321 (offset 13 lines). patching file Source/WebKit2/UIProcess/efl/WebView.h Hunk #1 succeeded at 60 with fuzz 2 (offset 3 lines). Hunk #2 FAILED at 186. 1 out of 2 hunks FAILED -- saving rejects to file Source/WebKit2/UIProcess/efl/WebView.h.rej Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', '--force', '--reviewer', 'Benjamin Poulain']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue Full output: http://webkit-commit-queue.appspot.com/results/17460137
Mikhail Pozdnyakov
Comment 10 2013-04-05 01:18:58 PDT
Note You need to log in before you can comment on or make changes to this bug.