Closed Bug 1655066 Opened 4 years ago Closed 2 months ago

Search Engine icons should be indexed by width only

Categories

(Firefox :: Search, defect, P3)

defect

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: standard8, Assigned: mbeier)

References

Details

(Whiteboard: [sng])

Attachments

(1 file)

Currently SearchEngine stores icons according to their width and height. Given that they're assumed to be the same as favicons, I think we should:

  • Throw away any icons which have a different width/height (this would only really affect broken OpenSearch configurations).
  • Store and retrieve icons by width.

Using the width would make the icon store behave similarly to nsFaviconService making us more consistent and the code simpler.

The current code has the problems that:

  • the width/height can sometimes be strings and sometimes be numbers, that causes _getIconKey to return different keys due to its use of JSON.stringify.
  • _initFromManifest currently attempts to set the size of the icon from the manifest, but sets the width/height in one place, and uses icon.size in another, which means we add an icon to the map with no size information, as that is undefined.

We should make sure we fix and add tests for those as part of this bug.

Blocks: 1655070
Assignee: nobody → hbugs
Status: NEW → ASSIGNED

The bug assignee didn't login in Bugzilla in the last 7 months.
:standard8, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: hbugs → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(standard8)
Flags: needinfo?(standard8)
No longer blocks: 795866
Depends on: 1870644
See Also: → 1871036
Whiteboard: [sng]
Assignee: nobody → mbeier
Status: NEW → ASSIGNED
Blocks: 1928410
Blocks: 1871036
See Also: 1871036
Pushed by mbeier@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/27f9666d2533 Search Engine icons should be indexed by width only. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Duplicate of this bug: 1871036
Regressions: 1934945
No longer regressions: 1934945
Regressed by: 1940533
No longer regressed by: 1940533
Regressions: 1940533
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: