Closed
Bug 725213
Opened 13 years ago
Closed 13 years ago
Add search engines from text input fields
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(firefox18 verified)
VERIFIED
FIXED
Firefox 13
Tracking | Status | |
---|---|---|
firefox18 | --- | verified |
People
(Reporter: bnicholson, Assigned: bnicholson)
References
Details
Attachments
(3 files, 2 obsolete files)
4.84 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
526.92 KB,
image/png
|
madhava
:
review+
|
Details |
6.88 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Currently, the only way to add a search engine to the AwesomeScreen is by installing a search add-on. We can make search engines much easier to install by allowing users to turn any input box into a search engine.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #595327 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 2•13 years ago
|
||
This patch allows a user to add a search engine from any text input field's context menu.
Example:
- Navigate to https://bugzilla.mozilla.org
- Long press on the search box
- Name the engine "Bugzilla"
- Type a bug number in the AwesomeScreen search
- Click Bugzilla
Attachment #595328 -
Flags: review?(mark.finkle)
Comment 3•13 years ago
|
||
Let's get a build to Madhava to try out.
Updated•13 years ago
|
Attachment #595327 -
Flags: review?(mark.finkle) → review+
Comment 4•13 years ago
|
||
Comment on attachment 595328 [details] [diff] [review]
(2/2) add search engines from text input
If you had the favicon in browser.js, you could do all of this in JS. You could use a promptservice prompt dialog to get the name.
I don't like the back-n-forth between JS and Java for this. I'd like to see if we could find a way to keep this in JS. We could use JS sqlite query on the browser.db IMAGES table to find the favicon for this page.
Attachment #595328 -
Flags: review?(mark.finkle) → review-
Updated•13 years ago
|
Priority: -- → P3
Assignee | ||
Comment 5•13 years ago
|
||
giving r? to madhava to confirm design shown in screenshots
Attachment #604854 -
Flags: review?(madhava)
Updated•13 years ago
|
Attachment #604854 -
Flags: review?(madhava) → review+
Assignee | ||
Comment 6•13 years ago
|
||
moved favicon/prompt logic to js
Attachment #595328 -
Attachment is obsolete: true
Attachment #605227 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 7•13 years ago
|
||
minor change that removes the searchEngines.defaultName string and instead uses the hostname of the document URL (when there is no page title)
Attachment #605227 -
Attachment is obsolete: true
Attachment #605227 -
Flags: review?(mark.finkle)
Attachment #605252 -
Flags: review?(mark.finkle)
Comment 8•13 years ago
|
||
Comment on attachment 605252 [details] [diff] [review]
(2/2) add search engines from text input v3
>diff --git a/mobile/android/base/AwesomeBarTabs.java b/mobile/android/base/AwesomeBarTabs.java
>- if (drawable != null)
>- faviconView.setImageDrawable(drawable);
>+ faviconView.setImageDrawable(drawable);
Why are we dropping the check? getDrawableFromDataURI still can return null, right?
>diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js
>+ addEngine: function addEngine(aElement) {
>+ Services.search.addEngineWithDetails(name, favicon, null, null, method, formURL);
>+ let engine = Services.search.getEngineByName(name);
>+ engine.wrappedJSObject._queryCharset = charset;
Is the _queryCharset ever saved by the search engine? I suppose it has to be saved to work.
r+ but leave the null check unless you can explain why it's not needed.
Attachment #605252 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f48345d39a26
https://hg.mozilla.org/mozilla-central/rev/4434a5371bbc
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Comment 11•12 years ago
|
||
Add Search Engine option was added on the latest Nightly build. Closing bug as verified fixed on:
Firefox 18.0a1 (2012-09-19)
Device: Galaxy Note
OS: Android 4.0.4
Status: RESOLVED → VERIFIED
status-firefox18:
--- → verified
Comment 12•9 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #8)
> >diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js
>
> >+ addEngine: function addEngine(aElement) {
>
> >+ Services.search.addEngineWithDetails(name, favicon, null, null, method, formURL);
> >+ let engine = Services.search.getEngineByName(name);
> >+ engine.wrappedJSObject._queryCharset = charset;
>
> Is the _queryCharset ever saved by the search engine? I suppose it has to be
> saved to work.
Relying on wrappedJSObject to access private properties of the engine isn't clean. In the future when something is missing, please consider extending the idl interface.
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•