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
1=== modified file 'src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml'
2--- src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml 2013-09-06 13:50:32 +0000
3+++ src/Ubuntu/Components/Extras/Browser/UbuntuWebView.qml 2013-09-20 14:28:00 +0000
4@@ -39,8 +39,6 @@
5 interactive: !selection.visible
6 maximumFlickVelocity: height * 5
7
8- property real scale: experimental.test.contentsScale * experimental.test.devicePixelRatio
9-
10 /**
11 * Client overridable function called before the default treatment of a
12 * valid navigation request. This function can stop the navigation request
13@@ -92,8 +90,7 @@
14 // and forward local URLs.
15 selection.mimedata.urls = data.images
16 }
17- selection.show(data.left * scale, data.top * scale,
18- data.width * scale, data.height * scale)
19+ selection.show(data.left, data.top, data.width, data.height)
20 } else if (data.event === 'newtab') {
21 newTabRequested(data.url)
22 }
23@@ -147,10 +144,11 @@
24 }
25
26 function show(x, y, width, height) {
27- rect.x = x
28- rect.y = y
29- rect.width = width
30- rect.height = height
31+ var scale = _webview.experimental.test.contentsScale * _webview.experimental.test.devicePixelRatio
32+ rect.x = x * scale + _webview.contentX
33+ rect.y = y * scale + _webview.contentY
34+ rect.width = width * scale
35+ rect.height = height * scale
36 visible = true
37 __showPopover()
38 }
39@@ -166,11 +164,11 @@
40 var message = new Object
41 message.query = 'adjustselection'
42 var rect = selection.rect
43- var scale = _webview.scale
44- message.left = rect.x / scale
45- message.right = (rect.x + rect.width) / scale
46- message.top = rect.y / scale
47- message.bottom = (rect.y + rect.height) / scale
48+ var scale = _webview.experimental.test.contentsScale * _webview.experimental.test.devicePixelRatio
49+ message.left = (rect.x - _webview.contentX) / scale
50+ message.right = (rect.x + rect.width - _webview.contentX) / scale
51+ message.top = (rect.y - _webview.contentY) / scale
52+ message.bottom = (rect.y + rect.height - _webview.contentY) / scale
53 _webview.experimental.postMessage(JSON.stringify(message))
54 }
55

Subscribers

People subscribed via source and target branches

to status/vote changes: