Merge lp:~osomon/webbrowser-app/copy-image-to-clipboard into lp:webbrowser-app

Proposed by Olivier Tilloy
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
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.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
1468. By Olivier Tilloy

Bump dependency to oxide 1.17.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
1469. By Olivier Tilloy

Merge latest changes from trunk and resolve minor conflicts.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1469
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/544/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/647/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/647
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/612
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/612
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/612
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/604/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/604/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/604/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/604/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/604/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/604/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/604/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/604/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/604
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/604/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/544/rebuild

review: Needs Fixing (continuous-integration)
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.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1471
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/675/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1736
    FAILURE: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/420/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1736
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1582/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1582
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1582/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/675/rebuild

review: Needs Fixing (continuous-integration)
1472. By Olivier Tilloy

Merge the latest changes from trunk and resolve conflicts.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1472
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/717/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1912/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1913
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1752/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1752/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1752/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1752/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1752/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1752/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1752/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1752/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1752
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1752/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/717/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
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::WebContextMenu::CopyImage () at ../../oxide/shared/browser/oxide_web_context_menu.cc:84
#1 0x00007fffc5317466 in ?? () from /usr/lib/x86_64-linux-gnu/libOxideQtQuick.so.0
#2 0x00007fffc5317eb6 in ?? () from /usr/lib/x86_64-linux-gnu/libOxideQtQuick.so.0
#3 0x00007fffc531825f in ?? () from /usr/lib/x86_64-linux-gnu/libOxideQtQuick.so.0
#4 0x00007ffff71f59e9 in QQmlObjectOrGadget::metacall (this=this@entry=0x7fffffffa370, type=type@entry=QMetaObject::InvokeMetaMethod, index=index@entry=5,
    argv=argv@entry=0x7fffffffa020) at qml/qqmlpropertycache.cpp:1557
#5 0x00007ffff71840b6 in CallMethod (object=..., index=5, returnType=returnType@entry=43, argCount=argCount@entry=0, argTypes=argTypes@entry=0x0,
    engine=engine@entry=0xc73470, callArgs=0x7fffc5e28390) at jsruntime/qv4qobjectwrapper.cpp:1143
#6 0x00007ffff7185227 in CallPrecise (object=..., data=..., engine=engine@entry=0xc73470, callArgs=callArgs@entry=0x7fffc5e28390)
    at jsruntime/qv4qobjectwrapper.cpp:1380
#7 0x00007ffff7185ded in QV4::QObjectMethod::callInternal (this=<optimized out>, callData=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:1858
#8 0x00007ffff719bfea in QV4::Object::call (d=0x7fffc5e28390, this=<optimized out>) at jsruntime/qv4object_p.h:324
#9 QV4::Runtime::callProperty (engine=0xc73470, nameIndex=<optimized out>, callData=0x7fffc5e28390) at jsruntime/qv4runtime.cpp:1002
#10 0x00007fff8c0c50c2 in ?? ()
#11 0x00007fff00000002 in ?? ()
#12 0x0000000000000008 in ?? ()
#13 0x00007fffffffa5f0 in ?? ()
#14 0x0000000000000028 in ?? ()
#15 0x00007fffb62c7cb8 in oxide::WebContextMenu::Close () at ../../oxide/shared/browser/oxide_web_context_menu.cc:77
#16 0x0000000000000000 in ?? ()

It appears that copyImage() is invoked after invoking close() on the menu context.

review: Needs Fixing
1473. By Olivier Tilloy

Delay closing the context model until after the action has been executed.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1473
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/719/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1916/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1917
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1756/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1756/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1756/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1756/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1756/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1756/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1756/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1756/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1756
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1756/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/719/rebuild

review: Needs Fixing (continuous-integration)
1474. By Olivier Tilloy

Replicate previous fix for the webapp container.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1474
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/721/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1928/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1929
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1768
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1768/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1768/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1768/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1768
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1768/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1768/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1768
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1768/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1768
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1768/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1768/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1768/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/721/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 {

Subscribers

People subscribed via source and target branches

to status/vote changes: