Merge lp://staging/~osomon/oxide/zoomFactor into lp://staging/~oxide-developers/oxide/oxide.trunk

Proposed by Olivier Tilloy
Status: Merged
Merged at revision: 1445
Proposed branch: lp://staging/~osomon/oxide/zoomFactor
Merge into: lp://staging/~oxide-developers/oxide/oxide.trunk
Diff against target: 476 lines (+242/-4)
12 files modified
qt/core/browser/oxide_qt_web_view.cc (+28/-1)
qt/core/browser/oxide_qt_web_view.h (+10/-0)
qt/core/glue/oxide_qt_web_view_proxy.cc (+11/-0)
qt/core/glue/oxide_qt_web_view_proxy.h (+5/-0)
qt/core/glue/oxide_qt_web_view_proxy_client.h (+2/-0)
qt/qmlplugin/oxide.qmltypes (+6/-1)
qt/qmlplugin/oxide_qml_plugin.cc (+1/-0)
qt/quick/api/oxideqquickwebview.cc (+48/-1)
qt/quick/api/oxideqquickwebview.h (+11/-1)
qt/quick/api/oxideqquickwebview_p.h (+1/-0)
qt/tests/qmltests/api/tst_WebView_zoomFactor.html (+5/-0)
qt/tests/qmltests/api/tst_WebView_zoomFactor.qml (+114/-0)
To merge this branch: bzr merge lp://staging/~osomon/oxide/zoomFactor
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+289932@code.staging.launchpad.net

Commit message

Add a WebView.zoomFactor property to the QML API.

To post a comment you must log in.
1392. By Olivier Tilloy

Merge the latest changes from trunk and resolve a minor conflict.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, I've added a few comments inline.

One other thing that will need fixing - changing the zoom factor in one webview will also set the zoom in other webviews that are displaying a site from the same host, but the current implementation won't fire OxideQQuickWebView::zoomFactorChanged() in those other webviews.

content::HostZoomMap has a mechanism for adding zoom change callbacks which can probably help here. As Oxide only ever has a single storage partition per BrowserContext, the HostZoomMap associated with a WebContents won't ever change during its lifetime, which probably makes this a bit easier.

review: Needs Fixing
1393. By Olivier Tilloy

Change private include for public one.

1394. By Olivier Tilloy

Add the zoom factor to the construct properties so that it can be initialized correctly if assigned while the webview is being instantiated.

1395. By Olivier Tilloy

Bound check when setting the zoom factor, and display a warning if requesting an invalid value.

1396. By Olivier Tilloy

Make minimumZoomFactor and maximumZoomFactor static methods of oxide::qt::WebViewProxy.

1397. By Olivier Tilloy

Do not allow setting the zoom factor during construction, as it is a per-host value.

1398. By Olivier Tilloy

Monitor zoom factor changes in all webviews.

Revision history for this message
Olivier Tilloy (osomon) wrote :

All comments have been addressed now, and unit tests added.

Revision history for this message
Chris Coulson (chrisccoulson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches