Merge lp:~osomon/webbrowser-app/copy-image-to-clipboard into lp:webbrowser-app
- copy-image-to-clipboard
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 1560 | ||||
Proposed branch: | lp:~osomon/webbrowser-app/copy-image-to-clipboard | ||||
Merge into: | lp:webbrowser-app | ||||
Diff against target: |
156 lines (+32/-14) 6 files modified
debian/control (+2/-2) src/app/webbrowser/Browser.qml (+1/-1) src/app/webbrowser/ContextMenuMobile.qml (+10/-2) src/app/webbrowser/TabComponent.qml (+4/-3) src/app/webcontainer/ContextMenuMobile.qml (+10/-2) src/app/webcontainer/WebappWebview.qml (+5/-4) |
||||
To merge this branch: | bzr merge lp:~osomon/webbrowser-app/copy-image-to-clipboard | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
system-apps-ci-bot | continuous-integration | Needs Fixing | |
Olivier Tilloy | Needs Fixing | ||
Review via email: mp+295692@code.launchpad.net |
Commit message
Use new API in oxide 1.17 to copy image to clipboard.
Description of the change
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
- 1468. By Olivier Tilloy
-
Bump dependency to oxide 1.17.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1468
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 1469. By Olivier Tilloy
-
Merge latest changes from trunk and resolve minor conflicts.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1469
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 1470. By Olivier Tilloy
-
Merge the latest changes from trunk, and resolve a minor conflict.
- 1471. By Olivier Tilloy
-
Revert import statements to 1.15: 1.17 isn’t exported as such as there haven’t been any new APIs since 1.15.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1471
https:/
Executed test runs:
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 1472. By Olivier Tilloy
-
Merge the latest changes from trunk and resolve conflicts.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1472
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Olivier Tilloy (osomon) wrote : | # |
In narrow layout, copying an image from the context menu crashes oxide.
Here is the stack trace:
#0 0x00007fffb62c7d7d in oxide::
#1 0x00007fffc5317466 in ?? () from /usr/lib/
#2 0x00007fffc5317eb6 in ?? () from /usr/lib/
#3 0x00007fffc531825f in ?? () from /usr/lib/
#4 0x00007ffff71f59e9 in QQmlObjectOrGad
argv=
#5 0x00007ffff71840b6 in CallMethod (object=..., index=5, returnType=
engine=
#6 0x00007ffff7185227 in CallPrecise (object=..., data=..., engine=
at jsruntime/
#7 0x00007ffff7185ded in QV4::QObjectMet
#8 0x00007ffff719bfea in QV4::Object::call (d=0x7fffc5e28390, this=<optimized out>) at jsruntime/
#9 QV4::Runtime:
#10 0x00007fff8c0c50c2 in ?? ()
#11 0x00007fff00000002 in ?? ()
#12 0x0000000000000008 in ?? ()
#13 0x00007fffffffa5f0 in ?? ()
#14 0x0000000000000028 in ?? ()
#15 0x00007fffb62c7cb8 in oxide::
#16 0x0000000000000000 in ?? ()
It appears that copyImage() is invoked after invoking close() on the menu context.
- 1473. By Olivier Tilloy
-
Delay closing the context model until after the action has been executed.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1473
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 1474. By Olivier Tilloy
-
Replicate previous fix for the webapp container.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1474
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2016-08-29 16:34:14 +0000 |
3 | +++ debian/control 2016-11-03 14:21:51 +0000 |
4 | @@ -45,7 +45,7 @@ |
5 | Depends: ${misc:Depends}, |
6 | ${shlibs:Depends}, |
7 | fonts-liberation, |
8 | - liboxideqt-qmlplugin (>= 1.15), |
9 | + liboxideqt-qmlplugin (>= 1.17), |
10 | libqt5sql5-sqlite, |
11 | qml-module-qt-labs-folderlistmodel, |
12 | qml-module-qt-labs-settings, |
13 | @@ -70,7 +70,7 @@ |
14 | Depends: ${misc:Depends}, |
15 | ${shlibs:Depends}, |
16 | fonts-liberation, |
17 | - liboxideqt-qmlplugin (>= 1.8), |
18 | + liboxideqt-qmlplugin (>= 1.17), |
19 | libqt5sql5-sqlite, |
20 | qml-module-qtquick2 (>= 5.4), |
21 | qml-module-qtquick-window2 (>= 5.3), |
22 | |
23 | === modified file 'src/app/webbrowser/Browser.qml' |
24 | --- src/app/webbrowser/Browser.qml 2016-10-11 16:16:40 +0000 |
25 | +++ src/app/webbrowser/Browser.qml 2016-11-03 14:21:51 +0000 |
26 | @@ -19,10 +19,10 @@ |
27 | import QtQuick 2.4 |
28 | import QtQuick.Window 2.2 |
29 | import Qt.labs.settings 1.0 |
30 | -import Ubuntu.Web 0.2 |
31 | import com.canonical.Oxide 1.15 as Oxide |
32 | import Ubuntu.Components 1.3 |
33 | import Ubuntu.Components.Popups 1.3 |
34 | +import Ubuntu.Web 0.2 |
35 | import Unity.InputInfo 0.1 |
36 | import webbrowserapp.private 0.1 |
37 | import webbrowsercommon.private 0.1 |
38 | |
39 | === modified file 'src/app/webbrowser/ContextMenuMobile.qml' |
40 | --- src/app/webbrowser/ContextMenuMobile.qml 2016-09-19 12:08:03 +0000 |
41 | +++ src/app/webbrowser/ContextMenuMobile.qml 2016-11-03 14:21:51 +0000 |
42 | @@ -23,6 +23,8 @@ |
43 | import com.canonical.Oxide 1.8 as Oxide |
44 | |
45 | Popups.Dialog { |
46 | + id: contextMenu |
47 | + |
48 | property QtObject contextModel: model |
49 | property ActionList actions: null |
50 | |
51 | @@ -119,7 +121,7 @@ |
52 | } |
53 | } |
54 | |
55 | - onTriggered: contextModel.close() |
56 | + onTriggered: contextMenu.hide() |
57 | } |
58 | } |
59 | |
60 | @@ -138,7 +140,13 @@ |
61 | fontSize: "x-small" |
62 | text: i18n.tr("Cancel") |
63 | } |
64 | - onTriggered: contextModel.close() |
65 | + onTriggered: contextMenu.hide() |
66 | + } |
67 | + |
68 | + onVisibleChanged: { |
69 | + if (!visible) { |
70 | + contextModel.close() |
71 | + } |
72 | } |
73 | |
74 | // adjust default dialog visuals to custom requirements for the context menu |
75 | |
76 | === modified file 'src/app/webbrowser/TabComponent.qml' |
77 | --- src/app/webbrowser/TabComponent.qml 2016-10-11 16:17:11 +0000 |
78 | +++ src/app/webbrowser/TabComponent.qml 2016-11-03 14:21:51 +0000 |
79 | @@ -135,9 +135,10 @@ |
80 | Actions.CopyImage { |
81 | objectName: "CopyImageContextualAction" |
82 | enabled: contextModel && |
83 | - (contextModel.mediaType === Oxide.WebView.MediaTypeImage) && |
84 | - contextModel.srcUrl.toString() |
85 | - onTriggered: Clipboard.push(["text/plain", contextModel.srcUrl.toString()]) |
86 | + ((contextModel.mediaType === Oxide.WebView.MediaTypeImage) || |
87 | + (contextModel.mediaType === Oxide.WebView.MediaTypeCanvas)) && |
88 | + contextModel.hasImageContents |
89 | + onTriggered: contextModel.copyImage() |
90 | } |
91 | Actions.SaveImage { |
92 | objectName: "SaveImageContextualAction" |
93 | |
94 | === modified file 'src/app/webcontainer/ContextMenuMobile.qml' |
95 | --- src/app/webcontainer/ContextMenuMobile.qml 2016-09-19 12:08:03 +0000 |
96 | +++ src/app/webcontainer/ContextMenuMobile.qml 2016-11-03 14:21:51 +0000 |
97 | @@ -23,6 +23,8 @@ |
98 | import com.canonical.Oxide 1.8 as Oxide |
99 | |
100 | Popups.Dialog { |
101 | + id: contextMenu |
102 | + |
103 | property QtObject contextModel: model |
104 | property ActionList actions: null |
105 | |
106 | @@ -121,7 +123,7 @@ |
107 | } |
108 | } |
109 | |
110 | - onTriggered: contextModel.close() |
111 | + onTriggered: contextMenu.hide() |
112 | } |
113 | } |
114 | |
115 | @@ -140,7 +142,13 @@ |
116 | fontSize: "x-small" |
117 | text: i18n.tr("Cancel") |
118 | } |
119 | - onTriggered: contextModel.close() |
120 | + onTriggered: contextMenu.hide() |
121 | + } |
122 | + |
123 | + onVisibleChanged: { |
124 | + if (!visible) { |
125 | + contextModel.close() |
126 | + } |
127 | } |
128 | |
129 | // adjust default dialog visuals to custom requirements for the context menu |
130 | |
131 | === modified file 'src/app/webcontainer/WebappWebview.qml' |
132 | --- src/app/webcontainer/WebappWebview.qml 2016-03-16 15:17:34 +0000 |
133 | +++ src/app/webcontainer/WebappWebview.qml 2016-11-03 14:21:51 +0000 |
134 | @@ -17,7 +17,7 @@ |
135 | */ |
136 | |
137 | import QtQuick 2.4 |
138 | -import com.canonical.Oxide 1.8 as Oxide |
139 | +import com.canonical.Oxide 1.15 as Oxide |
140 | import Ubuntu.Components 1.3 |
141 | import Ubuntu.Components.Popups 1.3 |
142 | import Ubuntu.Web 0.2 |
143 | @@ -64,9 +64,10 @@ |
144 | } |
145 | Actions.CopyImage { |
146 | enabled: contextModel && |
147 | - (contextModel.mediaType === Oxide.WebView.MediaTypeImage) && |
148 | - contextModel.srcUrl.toString() |
149 | - onTriggered: Clipboard.push(["text/plain", contextModel.srcUrl.toString()]) |
150 | + ((contextModel.mediaType === Oxide.WebView.MediaTypeImage) || |
151 | + (contextModel.mediaType === Oxide.WebView.MediaTypeCanvas)) && |
152 | + contextModel.hasImageContents |
153 | + onTriggered: contextModel.copyImage() |
154 | objectName: "CopyImageContextualAction" |
155 | } |
156 | Actions.SaveImage { |
FAILED: Continuous integration, rev:1467 /jenkins. canonical. com/system- apps/job/ lp-webbrowser- app-ci/ 504/ /jenkins. canonical. com/system- apps/job/ build/506/ console /jenkins. canonical. com/system- apps/job/ build-0- fetch/506 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= vivid+overlay/ 498/console /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= xenial/ 498/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-webbrowser- app-ci/ 504/rebuild
https:/