Closed
Bug 805325
Opened 12 years ago
Closed 12 years ago
On about:home, searchEngineLogo alt-text is the string "undefined"
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
VERIFIED
FIXED
Firefox 19
Tracking | Status | |
---|---|---|
firefox17 | --- | unaffected |
firefox18 | + | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
(Keywords: regression, Whiteboard: [about-home])
Attachments
(1 file, 2 obsolete files)
2.58 KB,
patch
|
dholbert
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
When I visit about:home, the Google logo to the left of the search-box sometimes doesn't render right away, and we show the alt text. The alt text is "undefined". This text is a bit unsettling to see on your home-page. You can also see this if you visit about:home, right-click the google logo, pick "Inspect Element", and click the "markup" button to show the underlying HTML version of the DOM tree. It looks like this: <img xmlns="http://www.w3.org/1999/xhtml" id="searchEngineLogo" src="data:image/png;base64,[snipping out the giant data URI]" alt="undefined" />
Assignee | ||
Comment 1•12 years ago
|
||
The place where we set logoElt.alt is here: > 141 let logoElt = document.getElementById("searchEngineLogo"); > 142 logoElt.src = searchEngineInfo.image; > [...] > 147 logoElt.alt = searchEngineInfo.name; https://mxr.mozilla.org/mozilla-central/source/browser/base/content/abouthome/aboutHome.js#141 ...so searchEngineInfo.name is probably undefined.
Assignee | ||
Comment 2•12 years ago
|
||
Yeah, it's defined at the top of this file: > 7 const SEARCH_ENGINES = { > 8 "Google": { > 9 image: "[data URI]", [...] > 71 , params: "source=hp&channel=np" > 72 } No "name" field there, hence searchEngineInfo.name is undefined. https://mxr.mozilla.org/mozilla-central/source/browser/base/content/abouthome/aboutHome.js#7
Assignee | ||
Comment 3•12 years ago
|
||
I think we just want to use "searchEngineName" (the index that we use into SEARCH_ENGINES -- "Google" as defined on line 8, quoted in comment 2).
Assignee | ||
Comment 4•12 years ago
|
||
(Looks like this was a regression from bug 749477, which added this use of ".name" on an entry from SEARCH_ENGINES: https://hg.mozilla.org/mozilla-central/rev/08c90c0d3f55#l1.89 whereas previously we were using ".name" on something else)
Blocks: 749477
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #674967 -
Flags: review?(mak77)
Assignee | ||
Comment 6•12 years ago
|
||
(Confirmed locally that this fixes the alt text, w/ Inspect Element, and also by clearing image cache, reloading, and watching the alt text flash before the image loads.)
Assignee | ||
Comment 7•12 years ago
|
||
Here's the fix again, with a testcase added to browser_aboutHome.js. Verified locally that the testcase's final check[1] fails without the fix, and passes after I apply the fix. [1] isnot(altText, "undefined", ...)
Attachment #674967 -
Attachment is obsolete: true
Attachment #674967 -
Flags: review?(mak77)
Attachment #674984 -
Flags: review?(mak77)
Assignee | ||
Comment 8•12 years ago
|
||
Verified that Firefox 17 is unaffected. (using Inspect Element on about:home) So, this is a new bug in Firefox 18, which is currently in Aurora channel. Once this lands on trunk, I think we should take this on Aurora as well -- it's a low-risk fix, and we might as well avoid shipping this bug to our Beta & Release users.
Comment 9•12 years ago
|
||
Comment on attachment 674984 [details] [diff] [review] fix w/ test Review of attachment 674984 [details] [diff] [review]: ----------------------------------------------------------------- OOps, thank you! ::: browser/base/content/test/browser_aboutHome.js @@ +78,5 @@ > + > + let searchEngineLogoElt = doc.getElementById("searchEngineLogo"); > + ok(searchEngineLogoElt, "Found search engine logo"); > + > + var altText = searchEngineLogoElt.alt; nit: let
Attachment #674984 -
Flags: review?(mak77) → review+
Updated•12 years ago
|
Keywords: regression
Updated•12 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: [about-home]
Assignee | ||
Comment 10•12 years ago
|
||
Fixed that & landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/a46d4906eee8 I'll request Aurora approval once this has cycled on tbpl.
Attachment #674984 -
Attachment is obsolete: true
Attachment #675110 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Flags: in-testsuite+
Assignee | ||
Updated•12 years ago
|
Attachment #675110 -
Attachment description: fix w/ test & review-comment addressed → fix w/ test & review-comment addressed [r=mak]
Assignee | ||
Comment 11•12 years ago
|
||
Comment on attachment 675110 [details] [diff] [review] fix w/ test & review-comment addressed [r=mak] [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 749477 User impact if declined: Incorrect/broken alt text ("undefined") on search-engine logo <img> element, on about:home Testing completed (on m-c, etc.): Verified the fix locally, landed on m-c (and patch includes automated test to verify that it's fixed there) Risk to taking this patch (and alternatives if risky): Negligible. String or UUID changes made by this patch: None.
Attachment #675110 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a46d4906eee8
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Updated•12 years ago
|
Attachment #675110 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 13•12 years ago
|
||
Pushed to Aurora: http://hg.mozilla.org/releases/mozilla-aurora/rev/563d482eada9
Comment 14•12 years ago
|
||
Verified fixed for FF 18.b4 Windows 7 x63 and Ubuntu x86, using Inspect Element on about:home. Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0(20121212073002) Mozilla/5.0 (X11; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0(20121212073002)
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•