RESOLVED FIXED 72893
[Qt][WK2] Add (experimental) viewport attributes view to MiniBrowser/qt
https://bugs.webkit.org/show_bug.cgi?id=72893
Summary [Qt][WK2] Add (experimental) viewport attributes view to MiniBrowser/qt
Michael Brüning
Reported 2011-11-21 09:15:23 PST
It has been requested to be able to view the viewport attributes in the Qt version of MiniBrowser. This should be implemented using the experimental extensions of QQuickWebView.
Attachments
Proposed patch (22.10 KB, patch)
2011-11-22 01:59 PST, Michael Brüning
vestbo: review-
webkit.review.bot: commit-queue-
Updated proposed patch (22.73 KB, patch)
2011-11-22 08:54 PST, Michael Brüning
vestbo: review+
Updated proposed patch (23.19 KB, patch)
2011-11-24 02:39 PST, Michael Brüning
vestbo: review+
vestbo: commit-queue-
Updated proposed patch. (23.07 KB, patch)
2011-11-24 04:15 PST, Michael Brüning
vestbo: review+
webkit.review.bot: commit-queue-
Updated patch. (26.49 KB, patch)
2011-11-24 08:28 PST, Michael Brüning
vestbo: review+
webkit.review.bot: commit-queue-
Updated patch after js fix. (28.56 KB, patch)
2011-12-09 08:43 PST, Michael Brüning
no flags
Updated patch (29.61 KB, patch)
2011-12-13 07:52 PST, Michael Brüning
no flags
Updated patch. (29.51 KB, patch)
2011-12-14 02:14 PST, Michael Brüning
no flags
Patch rebased to current HEAD. (29.38 KB, patch)
2011-12-15 03:37 PST, Michael Brüning
no flags
Michael Brüning
Comment 1 2011-11-22 01:59:20 PST
Created attachment 116191 [details] Proposed patch
Michael Brüning
Comment 2 2011-11-22 02:39:21 PST
Adding Tor Arne as he has been working with the experimental extensions.
WebKit Review Bot
Comment 3 2011-11-22 02:47:22 PST
Comment on attachment 116191 [details] Proposed patch Attachment 116191 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10569048 New failing tests: css2.1/20110323/abspos-containing-block-initial-004b.htm fast/repaint/scroll-fixed-reflected-layer.html fast/repaint/fixed-scale.html fast/replaced/width100percent-textarea.html http/tests/inspector/network-preflight-options.html fast/repaint/fixed-tranformed.html css2.1/20110323/abspos-containing-block-initial-004d.htm fast/repaint/fixed-table-overflow-zindex.html
Tor Arne Vestbø
Comment 4 2011-11-22 04:04:38 PST
Comment on attachment 116191 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=116191&action=review > Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h:168 > + Q_PROPERTY(QWebViewportAttributes* attributes READ attributes CONSTANT FINAL) I think viewportAttributes is better, since attributes is a bit too generic. > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:60 > + viewportAttributesItem.initialScale = webView.experimental.attributes.initialScale > + viewportAttributesItem.minimumScale = webView.experimental.attributes.minimumScale > + viewportAttributesItem.maximumScale = webView.experimental.attributes.maximumScale > + > + viewportAttributesItem.isScalable = webView.experimental.attributes.isScalable > + viewportAttributesItem.layoutWidth = webView.experimental.attributes.layoutWidth > + viewportAttributesItem.layoutHeight = webView.experimental.attributes.layoutHeight > + } Why are you not using bindings for these? > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:242 > + onHeightChanged: updateViewportAttributes() > + onWidthChanged: updateViewportAttributes() > + onLoadSucceeded: updateViewportAttributes() The viewport attributes themselves should change in response to these events, and the bindings then updated. > Tools/MiniBrowser/qt/qml/ViewportAttributesItem.qml:5 > + color: "#000000" black > Tools/MiniBrowser/qt/qml/ViewportAttributesItem.qml:19 > + color: "#ffffff" white > Tools/MiniBrowser/qt/qml/ViewportAttributesItem.qml:25 > + color: "#ffffff" white > Tools/MiniBrowser/qt/qml/ViewportAttributesItem.qml:31 > + color: "#ffffff" style
Michael Brüning
Comment 5 2011-11-22 08:54:16 PST
Created attachment 116234 [details] Updated proposed patch
Tor Arne Vestbø
Comment 6 2011-11-23 03:23:50 PST
Comment on attachment 116234 [details] Updated proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=116234&action=review lgtm, a few fixups before landing please > ChangeLog:9 > + attributes, which contains the viewport scalability and layout viewportAttributes > Source/WebKit/qt/ChangeLog:9 > + attributes, which contains the viewport scalability and layout viewportAttributes > Source/WebKit2/ChangeLog:9 > + attributes, which contains the viewport scalability and layout viewportAttributes > Tools/ChangeLog:9 > + attributes, which contains the viewport scalability and layout viewportAttributes > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:37 > + property alias viewportattributesitem: viewportAttributesItem normal lower-case+title-case naming apply (i see that the webview variable does not follow this, it should)
Michael Brüning
Comment 7 2011-11-23 04:24:16 PST
(In reply to comment #6) > (From update of attachment 116234 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=116234&action=review > > lgtm, a few fixups before landing please > > > ChangeLog:9 > > + attributes, which contains the viewport scalability and layout > > viewportAttributes > > > Source/WebKit/qt/ChangeLog:9 > > + attributes, which contains the viewport scalability and layout > > viewportAttributes > > > Source/WebKit2/ChangeLog:9 > > + attributes, which contains the viewport scalability and layout > > viewportAttributes > > > Tools/ChangeLog:9 > > + attributes, which contains the viewport scalability and layout > > viewportAttributes > > > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:37 > > + property alias viewportattributesitem: viewportAttributesItem > > normal lower-case+title-case naming apply (i see that the webview variable does not follow this, it should) Thanks for the review, will put in the comments...
Michael Brüning
Comment 8 2011-11-24 02:39:12 PST
Created attachment 116491 [details] Updated proposed patch Added a comment about the use of the "webview" property workaround for the experimental extension. Changed layout of info page.
Tor Arne Vestbø
Comment 9 2011-11-24 03:32:57 PST
Comment on attachment 116491 [details] Updated proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=116491&action=review r=me, with comments > ChangeLog:6 > + Reviewed by Tor Arne Vestbo. ø > Source/WebKit/qt/ChangeLog:6 > + Reviewed by Tor Arne Vestbo. ø > Source/WebKit2/ChangeLog:6 > + Reviewed by Tor Arne Vestbo. ø > Tools/ChangeLog:6 > + Reviewed by Tor Arne Vestbo. ø > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:-189 > - Don't include this hunk
Michael Brüning
Comment 10 2011-11-24 04:15:02 PST
Created attachment 116495 [details] Updated proposed patch. Put in the "ø"'s and "ü"'s at the appropriate places. Inserted accidentally removed blank line.
WebKit Review Bot
Comment 11 2011-11-24 04:41:02 PST
Comment on attachment 116495 [details] Updated proposed patch. Rejecting attachment 116495 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 Last 500 characters of output: cripts/webkitpy/common/system/executive.py", line 420, in run_command close_fds=self._should_close_fds()) File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/common/system/executive.py", line 476, in popen return subprocess.Popen(*args, **kwargs) File "/usr/lib/python2.6/subprocess.py", line 623, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings Full output: http://queues.webkit.org/results/10618280
Kenneth Rohde Christiansen
Comment 12 2011-11-24 04:45:36 PST
Comment on attachment 116495 [details] Updated proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=116495&action=review > Source/WebKit2/UIProcess/API/qt/qwebviewportattributes.cpp:40 > +qreal QWebViewportAttributes::initialScale() const > +{ > + return m_initialScale; > +} What about currentScale? Isnt that pretty useful for debugging? > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:240 > + // the issue is resovled. spelling error. Bug url?
Michael Brüning
Comment 13 2011-11-24 04:57:17 PST
(In reply to comment #12) > (From update of attachment 116495 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=116495&action=review > > > Source/WebKit2/UIProcess/API/qt/qwebviewportattributes.cpp:40 > > +qreal QWebViewportAttributes::initialScale() const > > +{ > > + return m_initialScale; > > +} > > What about currentScale? Isnt that pretty useful for debugging? > True. Will add it. > > Tools/MiniBrowser/qt/qml/BrowserWindow.qml:240 > > + // the issue is resovled. > > spelling error. Bug url? Not clear where the bug is at the moment, so no bug to add yet.
Michael Brüning
Comment 14 2011-11-24 08:28:49 PST
Created attachment 116517 [details] Updated patch. Renamed viewportAttributes to viewportInfo (also in the cpp part), added currentScale, devicePixelRatio and contentsWidth and contentsHeight properties.
Tor Arne Vestbø
Comment 15 2011-11-24 08:37:46 PST
(In reply to comment #14) > Created an attachment (id=116517) [details] > Updated patch. > > Renamed viewportAttributes to viewportInfo (also in the cpp part), added currentScale, devicePixelRatio and contentsWidth and contentsHeight properties. Sorry to keep nitpicking, but it should be contentWidth and contentHeight :/ (not plural)
Michael Brüning
Comment 16 2011-11-24 08:52:16 PST
(In reply to comment #15) > (In reply to comment #14) > > Created an attachment (id=116517) [details] [details] > > Updated patch. > > > > Renamed viewportAttributes to viewportInfo (also in the cpp part), added currentScale, devicePixelRatio and contentsWidth and contentsHeight properties. > > Sorry to keep nitpicking, but it should be contentWidth and contentHeight :/ (not plural) As discussed in #qtwebkit, the size that is referred to in the properties is the contentsSize, so plural matches the wording in the QQuickWebView handlers...
WebKit Review Bot
Comment 17 2011-11-25 02:41:09 PST
Comment on attachment 116517 [details] Updated patch. Rejecting attachment 116517 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 Last 500 characters of output: cripts/webkitpy/common/system/executive.py", line 420, in run_command close_fds=self._should_close_fds()) File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/common/system/executive.py", line 476, in popen return subprocess.Popen(*args, **kwargs) File "/usr/lib/python2.6/subprocess.py", line 623, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings Full output: http://queues.webkit.org/results/10644579
Michael Brüning
Comment 18 2011-12-09 08:43:55 PST
Created attachment 118584 [details] Updated patch after js fix. Updated patch because the qml extended type fix has been released. Added missing update of contentsSize in viewportInfo if the event was received during a page transition. To achieve that, I moved the implementation PostTransitionState::apply from qquickwebview_p_p.h to qquickwebview.cpp.
Kenneth Rohde Christiansen
Comment 19 2011-12-10 07:35:02 PST
Comment on attachment 118584 [details] Updated patch after js fix. View in context: https://bugs.webkit.org/attachment.cgi?id=118584&action=review why r? when it is already reviewed? > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:210 > + q->m_experimental->viewportInfo()->setCurrentScale(static_cast<qreal>(scale)); Why are all these value "copied" and not queried? ie queries from the interaction engine.
Michael Brüning
Comment 20 2011-12-13 07:52:30 PST
Created attachment 119018 [details] Updated patch Removed the caching of viewport constraint data in QWebViewportInfo and made it use the QQuickWebViewPrivate data instead. Added layoutSize as a member of QtViewportInteractionEngine::Constraints in order to not cache it in QWebViewportInfo. Changed layoutWidth and layoutHeight to layoutSize and contentsWidth/contentsHeight to contentsSize.
Kenneth Rohde Christiansen
Comment 21 2011-12-13 08:06:00 PST
Comment on attachment 119018 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=119018&action=review > Source/WebKit2/ChangeLog:6 > + > + Reviewed by Tor Arne Vestbø. I guess such a big change requires you to null this line > Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp:52 > + if (!m_webViewPrivate->interactionEngine) > + return -1.0; it would be 1.0 actually :-) > Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp:60 > + if (!m_webViewPrivate->interactionEngine) > + return -1.0; I guess it would be 1.0 :-) as well > Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp:68 > + if (!m_webViewPrivate->interactionEngine) > + return -1.0; same here
Michael Brüning
Comment 22 2011-12-14 02:14:57 PST
Created attachment 119181 [details] Updated patch. Moved the values that depend on the interactionEngine to be QVariants
Kenneth Rohde Christiansen
Comment 23 2011-12-14 04:32:47 PST
Comment on attachment 119181 [details] Updated patch. View in context: https://bugs.webkit.org/attachment.cgi?id=119181&action=review > Source/WebKit2/UIProcess/API/qt/qwebviewportinfo_p.h:39 > + Q_PROPERTY(QSize contentsSize READ contentsSize NOTIFY contentsSizeUpdated) I miss contentsPosition :-)
WebKit Review Bot
Comment 24 2011-12-14 05:23:06 PST
Comment on attachment 119181 [details] Updated patch. Rejecting attachment 119181 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: UIProcess/qt/QtViewportInteractionEngine.h patching file Source/qtwebkit-export.map patching file Tools/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Tools/MiniBrowser/qt/MiniBrowser.pro patching file Tools/MiniBrowser/qt/MiniBrowser.qrc patching file Tools/MiniBrowser/qt/qml/BrowserWindow.qml patching file Tools/MiniBrowser/qt/qml/ViewportInfoItem.qml Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Kenneth Rohde Christia..." exit_code: 1 Full output: http://queues.webkit.org/results/10871232
Michael Brüning
Comment 25 2011-12-15 03:37:08 PST
Created attachment 119408 [details] Patch rebased to current HEAD. Commit queue seems to have been unable to apply die to merge conflicts. Rebased patch locally and uploaded that version.
Kenneth Rohde Christiansen
Comment 26 2011-12-15 03:50:31 PST
Comment on attachment 119408 [details] Patch rebased to current HEAD. You should have filled in my name and set cq? but now let me r+ and cq+
WebKit Review Bot
Comment 27 2011-12-15 04:38:58 PST
Comment on attachment 119408 [details] Patch rebased to current HEAD. Clearing flags on attachment: 119408 Committed r102922: <http://trac.webkit.org/changeset/102922>
Michael Brüning
Comment 28 2011-12-16 03:40:24 PST
Comment on attachment 119181 [details] Updated patch. Clearing flags from obsolete patch.
Michael Brüning
Comment 29 2011-12-16 03:41:06 PST
Marked Resolved Fixed as the patch has been landed via cq...
Note You need to log in before you can comment on or make changes to this bug.