RESOLVED FIXED 110753
[WK2][EFL] WebView should own view size
https://bugs.webkit.org/show_bug.cgi?id=110753
Summary [WK2][EFL] WebView should own view size
Mikhail Pozdnyakov
Reported 2013-02-25 06:36:39 PST
At the moment the view size is contained within EwkView class and WebView has to call EwkView method to know its size which is wrong.
Attachments
WIP (6.42 KB, patch)
2013-02-26 01:13 PST, Mikhail Pozdnyakov
no flags
patch (8.40 KB, patch)
2013-02-26 01:46 PST, Mikhail Pozdnyakov
no flags
patch v2 (9.06 KB, patch)
2013-03-06 01:30 PST, Mikhail Pozdnyakov
no flags
patch v3 (9.60 KB, patch)
2013-03-13 03:00 PDT, Mikhail Pozdnyakov
no flags
patch v4 (10.69 KB, patch)
2013-03-14 09:17 PDT, Mikhail Pozdnyakov
kling: review+
webkit.review.bot: commit-queue-
Mikhail Pozdnyakov
Comment 1 2013-02-26 01:13:58 PST
Mikhail Pozdnyakov
Comment 2 2013-02-26 01:46:08 PST
Kenneth Rohde Christiansen
Comment 3 2013-02-26 02:30:22 PST
Comment on attachment 190241 [details] patch LGTM
Mikhail Pozdnyakov
Comment 4 2013-03-06 01:30:24 PST
Created attachment 191685 [details] patch v2 rebased
Kenneth Rohde Christiansen
Comment 5 2013-03-06 01:33:34 PST
Comment on attachment 191685 [details] patch v2 So, I would say that these should take values in UI units (ie not physical ones) so it should be able to test this by setting setDeviceScaleFactor somehow. Can we have a unit test?
Mikhail Pozdnyakov
Comment 6 2013-03-06 01:48:41 PST
(In reply to comment #5) > (From update of attachment 191685 [details]) > So, I would say that these should take values in UI units (ie not physical ones) so it should be able to test this by setting setDeviceScaleFactor somehow. > > Can we have a unit test? I'd say layout tests would be more helpful there rather than unit tests, thing to be tested is how page is looking if device scale factor is changed.
Dongseong Hwang
Comment 7 2013-03-13 01:33:35 PDT
Comment on attachment 191685 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=191685&action=review > Source/WebKit2/UIProcess/efl/WebView.cpp:282 > + return size(); LGTM without one point. It should return the size in ui units, because WebView now deal with m_size in device units. FloatSize dipSize(m_size); dipSize.scale(1 / page()->deviceScaleFactor());
Dongseong Hwang
Comment 8 2013-03-13 01:40:12 PDT
Comment on attachment 191685 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=191685&action=review > Source/WebKit2/UIProcess/API/efl/EwkView.h:134 > + WebCore::IntSize size() const; Could you rebase to upstream? Currently, there is two methods: size() and deviceSize(). ui units and device units respectively. Your patch moves role dealing with device size to WebView. and you need to reserve carefully the behavior on each sites using either two methods.
Mikhail Pozdnyakov
Comment 9 2013-03-13 03:00:44 PDT
Created attachment 192891 [details] patch v3 Rebased. Took comments from Dongsung Huang into consideration - thanks.
Dongseong Hwang
Comment 10 2013-03-13 18:04:08 PDT
Comment on attachment 192891 [details] patch v3 View in context: https://bugs.webkit.org/attachment.cgi?id=192891&action=review LGTM. I add some comments. > Source/WebKit2/UIProcess/API/efl/EwkView.cpp:471 > IntSize EwkView::size() const I think size() and deviceSize() can be private now. > Source/WebKit2/UIProcess/API/efl/EwkView.cpp:1104 > + if (WKPageUseFixedLayout(self->wkPage())) It is not needed because WebView::setSize already call WebView::updateViewportSize(). > Source/WebKit2/UIProcess/efl/WebView.cpp:-199 > - if (m_page->useFixedLayout()) { Could you explain why this code is moved to EwkView::handleEvasObjectCalculate? Previously if there is pageViewportController, we skipped notifying to drawing area, but now the behavior is changed. > Source/WebKit2/UIProcess/efl/WebView.cpp:527 > +inline WebCore::FloatSize WebView::dipSize() const How about uiSize because we already used uiSize as a local variable in EwkView.
Mikhail Pozdnyakov
Comment 11 2013-03-14 03:57:45 PDT
Comment on attachment 192891 [details] patch v3 View in context: https://bugs.webkit.org/attachment.cgi?id=192891&action=review >> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:1104 >> + if (WKPageUseFixedLayout(self->wkPage())) > > It is not needed because WebView::setSize already call WebView::updateViewportSize(). WebView is not aware of pageViewportController(), so it is needed. >> Source/WebKit2/UIProcess/efl/WebView.cpp:-199 >> - if (m_page->useFixedLayout()) { > > Could you explain why this code is moved to EwkView::handleEvasObjectCalculate? > Previously if there is pageViewportController, we skipped notifying to drawing area, but now the behavior is changed. Well actually we notified drawing area, as viewportcontroller invokes drawingArea()->setSize(roundedIntSize(newSize), IntSize()); plus it updates its internal state. The reason for moving is fixing of API layering: WebView should not access viewport controller directly. >> Source/WebKit2/UIProcess/efl/WebView.cpp:527 >> +inline WebCore::FloatSize WebView::dipSize() const > > How about uiSize because we already used uiSize as a local variable in EwkView. mmm.. I'd say dip size is clearer (ui size might mean that page scale factor is also taken for calculation).
Mikhail Pozdnyakov
Comment 12 2013-03-14 09:17:07 PDT
Created attachment 193135 [details] patch v4 Made EwkView size getters private as was pointed out by Dongsung Huang.
Kenneth Rohde Christiansen
Comment 13 2013-03-14 13:58:25 PDT
Comment on attachment 193135 [details] patch v4 LGTM
Kenneth Rohde Christiansen
Comment 14 2013-03-20 04:50:28 PDT
Ping owner review/sign off?
WebKit Review Bot
Comment 15 2013-04-04 03:03:09 PDT
Comment on attachment 193135 [details] patch v4 Rejecting attachment 193135 [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-04', 'apply-attachment', '--no-update', '--non-interactive', 193135, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue Last 500 characters of output: ffset 12 lines). Hunk #5 succeeded at 544 (offset 20 lines). patching file Source/WebKit2/UIProcess/efl/WebView.h Hunk #1 succeeded at 57 (offset 2 lines). Hunk #2 succeeded at 92 (offset 2 lines). Hunk #3 FAILED at 98. Hunk #4 FAILED at 175. 2 out of 4 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', 'Andreas Kling']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue Full output: http://webkit-commit-queue.appspot.com/results/17418080
Mikhail Pozdnyakov
Comment 16 2013-04-04 03:46:27 PDT
Note You need to log in before you can comment on or make changes to this bug.