Closed Bug 1367081 Opened 3 years ago Closed 3 years ago

Hook up GeckoView prompt delegate to Fennec UI bits


(Firefox for Android :: General, enhancement)

Not set



Firefox 56
Tracking Status
firefox56 --- fixed


(Reporter: snorp, Assigned: jchen)




(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]:

Attachment #8873097 - Flags: review?(droeh) → review+
Pushed by
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
3. Include window when using Prompt.jsm; r=droeh
4. Load SelectHelper and InputWidgetHelper in PromptService.js; r=droeh
Backed out for failing test_hidden_select_option.html:

Push with failures:
Failure log:
[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
3. Include window when using Prompt.jsm; r=droeh
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).
Closed: 3 years ago
Resolution: --- → FIXED
Pushed by
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.