D23151: Implement Web Share API through Purpose

2019-09-18 Thread Kai Uwe Broulik
This revision was automatically updated to reflect the committed changes. Closed by commit R856:9c16dbae9f6c: Implement Web Share API through Purpose (authored by broulik). REPOSITORY R856 Plasma Browser Integration CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23151?vs=66236=66363

D23151: Implement Web Share API through Purpose

2019-09-16 Thread Kai Uwe Broulik
broulik updated this revision to Diff 66236. REPOSITORY R856 Plasma Browser Integration CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23151?vs=65650=66236 REVISION DETAIL https://phabricator.kde.org/D23151 AFFECTED FILES CMakeLists.txt extension/_locales/en/messages.json

D23151: Implement Web Share API through Purpose

2019-09-16 Thread Carl Schwan
ognarb added a comment. I will try to find time to test it today INLINE COMMENTS > content-script.js:24 > +return '--4xxx-yxxx-'.replace(/[xy]/g, > function(c) { > +var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); > +return

D23151: Implement Web Share API through Purpose

2019-09-16 Thread Fabian Vogt
fvogt accepted this revision. fvogt added inline comments. This revision is now accepted and ready to land. INLINE COMMENTS > broulik wrote in purposeplugin.cpp:86 > `errorCode` and `errorMessage` are forwarded from the Purpose plugin, `error` > is our own. I could change `errorCode` to return

D23151: Implement Web Share API through Purpose

2019-09-08 Thread Kai Uwe Broulik
broulik updated this revision to Diff 65650. broulik added a comment. - Register navigator.share only if host supports it - Use custom event instead of `window.postMessage` - Drop unused KNotifications dependency REPOSITORY R856 Plasma Browser Integration CHANGES SINCE LAST UPDATE

D23151: Implement Web Share API through Purpose

2019-08-22 Thread Kai Uwe Broulik
broulik planned changes to this revision. broulik added a comment. It should only add the `navigator.share` stuff if the host side is supported and loaded, in case you run old host with new extension. The setting will be correctly hidden but since it is enabled by default it will still add

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Fabian Vogt
fvogt requested changes to this revision. fvogt added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > purposeplugin.cpp:122 > +urls.append(text); > +showShareMenu(shareJson, QStringLiteral("text/plain")); > +return {};

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Kai Uwe Broulik
broulik updated this revision to Diff 63809. broulik added a comment. - Reset to -1 - Use urls again REPOSITORY R856 Plasma Browser Integration CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23151?vs=63808=63809 REVISION DETAIL https://phabricator.kde.org/D23151 AFFECTED

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Kai Uwe Broulik
broulik updated this revision to Diff 63808. broulik added a comment. - Address comments REPOSITORY R856 Plasma Browser Integration CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23151?vs=63716=63808 REVISION DETAIL https://phabricator.kde.org/D23151 AFFECTED FILES

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > fvogt wrote in purposeplugin.cpp:144 > No response. IMO this should be handled in the plugin manager though, as > discussed on that diff. Yeah, I will clean that up everywhere separate of this patch as to not entangle it even further.

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > fvogt wrote in content-script.js:837 > Where is that documented? https://w3c.github.io/web-share/#security-and-privacy-considerations > 4. Security and privacy considerations > > […] > > *Due to the capabilities of the API surface,

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Fabian Vogt
fvogt requested changes to this revision. fvogt added a comment. This revision now requires changes to proceed. AFAICT this won't work on wayland and will also break the browser's native implementation once that actually exists. INLINE COMMENTS > content-script.js:22 > +// from >

D23151: Implement Web Share API through Purpose

2019-08-15 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > apol wrote in purposeplugin.cpp:127 > shouldn't this be a data: url or something like that? urls should only have > urls I was wondering the same but the email plugin does something very strange: if (url.isLocalFile()) {

D23151: Implement Web Share API through Purpose

2019-08-14 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > purposeplugin.cpp:127 > +if (!text.isEmpty()) { > +urls.append(text); > +} shouldn't this be a data: url or something like that? urls should only have urls > purposeplugin.cpp:161 > +if (!mimeType.isEmpty() &&

D23151: Implement Web Share API through Purpose

2019-08-14 Thread Kai Uwe Broulik
broulik updated this revision to Diff 63716. broulik added a comment. - Remove leftover testing code REPOSITORY R856 Plasma Browser Integration CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23151?vs=63715=63716 REVISION DETAIL https://phabricator.kde.org/D23151 AFFECTED

D23151: Implement Web Share API through Purpose

2019-08-14 Thread Kai Uwe Broulik
broulik created this revision. broulik added reviewers: Plasma, fvogt, davidedmundson, nicolasfella, apol. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. broulik requested review of this revision. REVISION SUMMARY This implements Web Share API Level 1 [1] through