Closed Bug 1367081 Opened 3 years ago Closed 3 years ago

Hook up GeckoView prompt delegate to Fennec UI bits

Categories

(Firefox for Android :: General, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: snorp, Assigned: jchen)

References

Details

Attachments

(4 files, 1 obsolete file)

We need this both for custom tabs and PWA.
Assignee: nobody → nchen
Make PromptService and Prompt.jsm not depend as much on BrowserApp and
the main Fennec window, so it can be used from a GeckoView-based custom
tabs Activity. This approach is used because it involves a lot less work
than trying to implement a PromptDelegate for Fennec.
Attachment #8873097 - Flags: review?(droeh)
Comment on attachment 8873097 [details] [diff] [review]
Make PromptService usable from GeckoView custom tabs (v1)

Review of attachment 8873097 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8873097 - Flags: review?(droeh) → review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c77e79c09f1e
Make PromptService usable from GeckoView custom tabs; r=droeh
Include an instance of PromptService in CustomTabsActivity so that the
Activity can receive prompt events.
Attachment #8873680 - Flags: review?(droeh)
Include the window when using Prompt.jsm in JS so that the prompts can
be directed to the correct Activity.
Attachment #8873681 - Flags: review?(droeh)
Right now SelectHelper and InputWidgetHelper are loaded in browser.js,
which means they only work for GeckoApp. This patch loads them in
PromptService.js instead, which means they will work in all windows. The
patch also changes some code in SelectHelper and InputWidgetHelper that
used to assume they are running under the browser.xul chrome window.
Attachment #8873682 - Flags: review?(droeh)
Attachment #8873680 - Flags: review?(droeh) → review+
Attachment #8873681 - Flags: review?(droeh) → review+
Comment on attachment 8873682 [details] [diff] [review]
4. Load SelectHelper and InputWidgetHelper in PromptService.js (v1)

Review of attachment 8873682 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8873682 - Flags: review?(droeh) → review+
I will have to land without part 2 because that patch depends on bug 1356346. Dylan, maybe you can just merge part 2 into your patch for bug 1356346 and land that for 56?
Flags: needinfo?(droeh)
Sure, no problem.
Flags: needinfo?(droeh)
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6065144fe5b3
3. Include window when using Prompt.jsm; r=droeh
https://hg.mozilla.org/integration/mozilla-inbound/rev/949bae6eaa96
4. Load SelectHelper and InputWidgetHelper in PromptService.js; r=droeh
Backed out for failing test_hidden_select_option.html:

https://hg.mozilla.org/integration/mozilla-inbound/rev/dfd55929e842de5a2cc71adf58e5d2fe45be1a7f
https://hg.mozilla.org/integration/mozilla-inbound/rev/c685c902f89a3b7c92447a866d50f97d0f58e17f

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=6a99686b566a55298d7fe38a97717f1731aa740a&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=104178860&repo=mozilla-inbound
[task 2017-06-02T21:01:32.814561Z] 21:01:32     INFO -  7 INFO TEST-START | mobile/android/tests/browser/chrome/test_hidden_select_option.html
[task 2017-06-02T21:01:32.814650Z] 21:01:32     INFO -  8 INFO TEST-UNEXPECTED-FAIL | mobile/android/tests/browser/chrome/test_hidden_select_option.html | uncaught exception - TypeError: SelectHelper is undefined at window.onload@chrome://mochitests/content/chrome/mobile/android/tests/browser/chrome/test_hidden_select_option.html:52:11
[task 2017-06-02T21:01:32.814698Z] 21:01:32     INFO -  simpletestOnerror@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1652:11
Flags: needinfo?(nchen)
Attachment #8873682 - Attachment is obsolete: true
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/633b684d23b7
3. Include window when using Prompt.jsm; r=droeh
https://hg.mozilla.org/integration/mozilla-inbound/rev/44c1b092e6ce
4. Load SelectHelper and InputWidgetHelper in PromptService.js; r=droeh
Flags: needinfo?(nchen)
This should work now after GV custom tabs lands again (with part 2 included).
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cfff208e43b3
2. Include PromptService in CustomTabsActivity; r=droeh
Blocks: 1382724
No longer blocks: 1382724
Depends on: 1382724
Keywords: leave-open
Target Milestone: --- → Firefox 56
You need to log in before you can comment on or make changes to this bug.