Merge lp:~osomon/webapps-core/remove-formFactor into lp:webapps-core

Proposed by Olivier Tilloy
Status: Merged
Merged at revision: 130
Proposed branch: lp:~osomon/webapps-core/remove-formFactor
Merge into: lp:webapps-core
Diff against target: 83 lines (+15/-19)
2 files modified
webapp-googleplus/lib/WebViewImpl.qml (+9/-3)
webapp-googleplus/webview-override.qml (+6/-16)
To merge this branch: bzr merge lp:~osomon/webapps-core/remove-formFactor
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Review via email: mp+285619@code.launchpad.net

Commit message

Remove all references to the 'formFactor' context property (it’s being removed).

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'webapp-googleplus/lib/WebViewImpl.qml'
2--- webapp-googleplus/lib/WebViewImpl.qml 2015-03-13 16:35:21 +0000
3+++ webapp-googleplus/lib/WebViewImpl.qml 2016-02-10 15:26:18 +0000
4@@ -37,7 +37,7 @@
5 confirmDialog: ConfirmDialog {}
6 promptDialog: PromptDialog {}
7 beforeUnloadDialog: BeforeUnloadDialog {}
8- filePicker: filePickerLoader.item
9+ filePicker: contentPickerLoader.item || filePickerLoader.item
10
11 onDownloadRequested: {
12 if (downloadLoader.status == Loader.Ready) {
13@@ -54,14 +54,20 @@
14 }
15
16 Loader {
17+ id: contentPickerLoader
18+ source: "ContentPickerDialog.qml"
19+ asynchronous: true
20+ }
21+
22+ Loader {
23 id: filePickerLoader
24- source: formFactor == "desktop" ? "FilePickerDialog.qml" : "ContentPickerDialog.qml"
25+ source: "FilePickerDialog.qml"
26 asynchronous: true
27 }
28
29 Loader {
30 id: downloadLoader
31- source: formFactor == "desktop" ? "" : "Downloader.qml"
32+ source: "Downloader.qml"
33 asynchronous: true
34 }
35
36
37=== modified file 'webapp-googleplus/webview-override.qml'
38--- webapp-googleplus/webview-override.qml 2015-09-21 14:43:14 +0000
39+++ webapp-googleplus/webview-override.qml 2016-02-10 15:26:18 +0000
40@@ -215,10 +215,6 @@
41 StateSaver.properties: "url"
42 StateSaver.enabled: !runningLocalApplication
43
44- function shouldOpenPopupsInDefaultBrowser() {
45- return formFactor !== "desktop";
46- }
47-
48 function isRunningAsANamedWebapp() {
49 return webview.webappName && typeof(webview.webappName) === 'string' && webview.webappName.length != 0
50 }
51@@ -326,12 +322,9 @@
52 return
53 }
54
55- if (shouldOpenPopupsInDefaultBrowser()) {
56- console.debug('Opening popup window ' + targetUrl + ' in the browser window.')
57- request.action = Oxide.NavigationRequest.ActionReject
58- openUrlExternally(targetUrl)
59- return;
60- }
61+ console.debug('Opening popup window ' + targetUrl + ' in the browser window.')
62+ request.action = Oxide.NavigationRequest.ActionReject
63+ openUrlExternally(targetUrl)
64 return
65 }
66
67@@ -455,13 +448,10 @@
68 }
69
70 onGeolocationPermissionRequested: {
71- if (formFactor == "desktop") {
72+ if (request.origin == request.embedder) {
73+ request.accept()
74+ } else {
75 requestGeolocationPermission(request)
76- } else {
77- // On devices where webapps are confined, trying to access the
78- // location service will trigger a system prompt from the trust
79- // store, so we don’t need a custom prompt.
80- request.accept()
81 }
82 }
83 }

Subscribers

People subscribed via source and target branches

to all changes: