Closed
Bug 339343
Opened 19 years ago
Closed 19 years ago
Base64 png image in opensearch plugin doesn't show up in search box dropdown
Categories
(Firefox :: Search, defect, P1)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta1
People
(Reporter: dazzle, Assigned: Gavin)
References
()
Details
(Keywords: fixed1.8.1)
Attachments
(1 file)
|
13.30 KB,
patch
|
mconnor
:
review+
mconnor
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a2) Gecko/20060526 BonEcho/2.0a2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a2) Gecko/20060526 BonEcho/2.0a2
If I install an opensearch search plugin with a Base64 PNG image as the icon, then the icon doesn't show up in the drop down search list.
Reproducible: Always
Steps to Reproduce:
1. Goto http://www.edazzle.net/os/pluginlist.aspx?q=bbc
2. Click on 'Add BBC News and Sport'
Actual Results:
No icon displayed
Expected Results:
Icon should be displayed
| Assignee | ||
Comment 1•19 years ago
|
||
I reproduced this. There are a couple problems:
1) The auto-detection code tries <pageurl>/favicon.ico rather randomly as an icon value.
2) The search code doesn't handle failed HTTP requests all that great (it tries to use the 404 page from <http://www.edazzle.net/os/favicon.ico> as an icon)
3) The search code has no mechanism to deal with multiple icons, for example an icon specified in the addEngine call, and an icon found in the XML. The last icon wins. In this case the 404 page is often the last one since the request takes a bit of time.
I must say: I really appreciate all the testing you're doing on this OpenSearch code, Paul!
Assignee: nobody → gavin.sharp
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-firefox2?
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → Firefox 2 alpha3
Version: unspecified → 2.0 Branch
| Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Updated•19 years ago
|
Target Milestone: Firefox 2 alpha3 → Firefox 2 beta1
| Reporter | ||
Comment 2•19 years ago
|
||
No problem. :) All because I'm setting up my own opensearch search plugin repository and generation code. So I'm trying to work out bugs with my own code and those with the browser.
Off topic from this bug - is it possible to add OpenSearch plugins to Firefox Bon Echo using javascript (with IE7 it's window.external.AddSearchProvider(url)) - is there anything like this yet in Firefox and is it working?
| Assignee | ||
Comment 3•19 years ago
|
||
This patch was tested with the five engines at http://gavinsharp.com/os/ .
Attachment #223632 -
Flags: review?(mconnor)
Attachment #223632 -
Flags: approval-branch-1.8.1?(mconnor)
| Assignee | ||
Updated•19 years ago
|
Whiteboard: [patch-r?]
| Assignee | ||
Comment 4•19 years ago
|
||
(In reply to comment #2)
> Off topic from this bug - is it possible to add OpenSearch plugins to Firefox
> Bon Echo using javascript (with IE7 it's
> window.external.AddSearchProvider(url)) - is there anything like this yet in
> Firefox and is it working?
No, not yet. That's bug 337780.
| Assignee | ||
Comment 5•19 years ago
|
||
| Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 223632 [details] [diff] [review]
patch
Measure (test!) twice, cut once. This isn't quite right.
Attachment #223632 -
Attachment is obsolete: true
Attachment #223632 -
Flags: review?(mconnor)
Attachment #223632 -
Flags: approval-branch-1.8.1?(mconnor)
| Assignee | ||
Comment 7•19 years ago
|
||
Comment on attachment 223632 [details] [diff] [review]
patch
Oops, I thought this was bug 339551. This patch is fine!
Attachment #223632 -
Attachment is obsolete: false
Attachment #223632 -
Flags: review?(mconnor)
Attachment #223632 -
Flags: approval-branch-1.8.1?(mconnor)
Comment 8•19 years ago
|
||
Comment on attachment 223632 [details] [diff] [review]
patch
>- }
>+ } else
>+ this._callback(this._bytes, this._engine);
}
else
this...
instead, please.
> case "data":
> this._iconURI = uri;
>+ notifyAction(this, SEARCH_ENGINE_CHANGED);
>+ this._hasPreferredIcon = !!aIsPreferred;
> notifyAction(aEngine, SEARCH_ENGINE_CHANGED);
>+ aEngine._hasPreferredIcon = !!aIsPreferred;
zany double negations are evil. kill these, make the caller be specific.
Attachment #223632 -
Flags: review?(mconnor)
Attachment #223632 -
Flags: review+
Attachment #223632 -
Flags: approval-branch-1.8.1?(mconnor)
Attachment #223632 -
Flags: approval-branch-1.8.1+
| Assignee | ||
Comment 9•19 years ago
|
||
(In reply to comment #8)
> }
> else
> instead, please.
Checked in branch and trunk, without this nit which I discussed with mconnor on IRC.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Flags: blocking-firefox2?
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [patch-r?]
Comment 10•19 years ago
|
||
>+ const searchHrefRegex = /^https?:\/\//i;
Forgive me if I'm wrong, but shouldn't this regex also support FTP?
Comment 11•19 years ago
|
||
Should, and did in bug 342010 - lxr.mozilla.org will give you a better idea of the current state of the code than reading random month-old patches.
Comment 12•19 years ago
|
||
(In reply to comment #11)
> Should, and did in bug 342010 - lxr.mozilla.org will give you a better idea of
> the current state of the code than reading random month-old patches.
>
Ah I see. That site completely slipped my mind. :P Thank you.
You need to log in
before you can comment on or make changes to this bug.
Description
•