Merge lp:~osomon/webbrowser-app/selection-zoomed into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 322
Merged at revision: 327
Proposed branch: lp:~osomon/webbrowser-app/selection-zoomed
Merge into: lp:webbrowser-app
Diff against target: 54 lines (+11/-13)
1 file modified
src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml (+11/-13)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/selection-zoomed
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Bill Filler (community) Approve
Review via email: mp+186808@code.launchpad.net

Commit message

Fix the selection rectangle size and position when zoomed and scrolled.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

Working pretty well but seeing a few issues

1) not always getting the correct popover when press and hold on a link. Sometimes I get the standard "Share, Save, Copy" link when I'm expecting the open link popover. Easy to reproduce by doing a google search for someone ("i.e. Bill Filler"). For example, one of the results says "Bill Filler in Launchpad". If I press and hold on "Bill Filler" at the start of the link I get the share popover, but if I press and hold over the "in Launchpad" part of the link I get the correct open link popup.

2) Copy Link URL does not seem to work. After invoking it from the menu I try to paste into notes-app and doesn't work. I am able to copy/paste text into notes, just not a link. Wasn't sure how else to test.

3) not sure how to reproduce but got browser into a state that it would not popup any menus on long press. Looked like it was trying to display it (the link was highlighted) but nothing was displayed.

Revision history for this message
Bill Filler (bfiller) wrote :

oops, comments on wrong MR, sorry

Revision history for this message
Bill Filler (bfiller) wrote :

seems to work well, approving

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml'
--- src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml 2013-09-06 13:50:32 +0000
+++ src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml 2013-09-20 14:28:00 +0000
@@ -39,8 +39,6 @@
39 interactive: !selection.visible39 interactive: !selection.visible
40 maximumFlickVelocity: height * 540 maximumFlickVelocity: height * 5
4141
42 property real scale: experimental.test.contentsScale * experimental.test.devicePixelRatio
43
44 /**42 /**
45 * Client overridable function called before the default treatment of a43 * Client overridable function called before the default treatment of a
46 * valid navigation request. This function can stop the navigation request44 * valid navigation request. This function can stop the navigation request
@@ -92,8 +90,7 @@
92 // and forward local URLs.90 // and forward local URLs.
93 selection.mimedata.urls = data.images91 selection.mimedata.urls = data.images
94 }92 }
95 selection.show(data.left * scale, data.top * scale,93 selection.show(data.left, data.top, data.width, data.height)
96 data.width * scale, data.height * scale)
97 } else if (data.event === 'newtab') {94 } else if (data.event === 'newtab') {
98 newTabRequested(data.url)95 newTabRequested(data.url)
99 }96 }
@@ -147,10 +144,11 @@
147 }144 }
148145
149 function show(x, y, width, height) {146 function show(x, y, width, height) {
150 rect.x = x147 var scale = _webview.experimental.test.contentsScale * _webview.experimental.test.devicePixelRatio
151 rect.y = y148 rect.x = x * scale + _webview.contentX
152 rect.width = width149 rect.y = y * scale + _webview.contentY
153 rect.height = height150 rect.width = width * scale
151 rect.height = height * scale
154 visible = true152 visible = true
155 __showPopover()153 __showPopover()
156 }154 }
@@ -166,11 +164,11 @@
166 var message = new Object164 var message = new Object
167 message.query = 'adjustselection'165 message.query = 'adjustselection'
168 var rect = selection.rect166 var rect = selection.rect
169 var scale = _webview.scale167 var scale = _webview.experimental.test.contentsScale * _webview.experimental.test.devicePixelRatio
170 message.left = rect.x / scale168 message.left = (rect.x - _webview.contentX) / scale
171 message.right = (rect.x + rect.width) / scale169 message.right = (rect.x + rect.width - _webview.contentX) / scale
172 message.top = rect.y / scale170 message.top = (rect.y - _webview.contentY) / scale
173 message.bottom = (rect.y + rect.height) / scale171 message.bottom = (rect.y + rect.height - _webview.contentY) / scale
174 _webview.experimental.postMessage(JSON.stringify(message))172 _webview.experimental.postMessage(JSON.stringify(message))
175 }173 }
176174

Subscribers

People subscribed via source and target branches

to status/vote changes: