Closed Bug 474470 Opened 17 years ago Closed 16 years ago

Unable to add a search plug-in with window.external.AddSearchProvider()

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(fennec1.0+)

VERIFIED FIXED
fennec1.0
Tracking Status
fennec 1.0+ ---

People

(Reporter: stas, Assigned: Gavin)

References

Details

Attachments

(2 files)

When you click on a link that is supposed to trigger the window.external.AddSearchProvider() method, nothing happens in Fennec. I tested on my Mac, alpha2, build from 20081222. Screenshots and a test case follow.
Looks like browser/components/sidebar will need to be bundled with Fennec.
Indeed, we don't support the window.sidebar or window.external DOM interfaces, since they're implemented in a Firefox-specific file: browser/components/sidebar/src/nsSidebar.js We should probably take this opportunity to move these to core code, which should be easy enough.
(In reply to comment #3) > browser/components/sidebar/src/nsSidebar.js > > We should probably take this opportunity to move these to core code, which > should be easy enough. After looking at the implementation, I see some UI code that might be inconsistent with Fennec. The interfaces are already in core code. Overall, the impl code isn't too bad for Fennec.
Some parts of it are app-specific, yeah, but that shouldn't be too hard to split out. We can just fix this in Fennec for now if that's much quicker, but I think it's a good idea to fix it properly at some point anyways.
tracking-fennec: --- → ?
what is involved here/the overall impact?
It's a web content API. Some websites have a button or link "Add a search provider" and this API allows it to work. Just a different way of adding a search provider. Should be easy to add the code. Simply copy the function from Firefox nsSidebar.js
(In reply to comment #3) > We should probably take this opportunity to move these to core code, which > should be easy enough. yeah, if this is straightforward, we should do that
tracking-fennec: ? → 1.0+
Depends on: 518929
Assignee: nobody → gavin.sharp
That a screenshot of what happen when I try to install a search engine on AMO Mobile. I want Fennec to be Mozilla based please! :)
Bug 518929 is the right fix, but we probably can't get that in on 1.9.2 at this point. I suppose we have to just copy nsSidebar.js to fennec, and modify it to stub out the microsummary methods. http://mxr.mozilla.org/mozilla-central/source/browser/components/sidebar/src/nsSidebar.js
Attached patch patchSplinter Review
Largely copied from nsSidebar.js in m-c, with some cleanup and the microsummary/panel methods stubbed out (we don't have a microsummary service, and the panel methods are largely unused on the actual web so not worth implementing IMO). One problem is that the search service handles the prompting, and it includes a "use the search engine now" checkbox which isn't actually useful in our situation (we don't have a "selected engine"). I think I'll fix that by adding a pref we can set to avoid showing that...
Attachment #414042 - Flags: review?(mark.finkle)
Attachment #414042 - Flags: review?(mark.finkle) → review+
(In reply to comment #11) > One problem is that the search service handles the prompting, and it includes a > "use the search engine now" checkbox which isn't actually useful in our > situation (we don't have a "selected engine"). I think I'll fix that by adding > a pref we can set to avoid showing that... File a new bug? or just add to this patch?
(In reply to comment #12) > File a new bug? or just add to this patch? Needs a change to the search service - I filed bug 530533.
Depends on: 530533
Status: NEW → RESOLVED
Closed: 16 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → Post-B5
Filed bug 530846 about the prompt checkbox, and bug 530847 about removing this code some day.
No longer depends on: 518929, 530533
verified FIXED on builds: Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2b4pre) Gecko/20091125 Firefox/3.6b4pre Fennec/1.0b6pre and Mozilla/5.0 (X11; U; Linux armv6l; Nokia N8xx; en-US; rv:1.9.3a1pre) Gecko/20091125 Firefox/3.7a1pre Fennec/1.0b5
Status: RESOLVED → VERIFIED
Flags: in-litmus?
Flags: in-litmus? → in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: