Closed
Bug 237658
Opened 21 years ago
Closed 21 years ago
In <pref-fonts.js>, "Warning: redeclaration of var dataEls"
Categories
(SeaMonkey :: Preferences, defect)
SeaMonkey
Preferences
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8alpha1
People
(Reporter: timeless, Assigned: sgautherie)
Details
Attachments
(4 obsolete files)
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040315
Warning: redeclaration of var dataEls
Source File: chrome://communicator/content/pref/pref-fonts.js
Line: 373, Column: 17
Source Code:
var dataEls = selectElement.listElement.getElementsByAttribute(
"value", selectVal );
Assignee | ||
Updated•21 years ago
|
Assignee: prefs → gautheri
Severity: trivial → minor
Keywords: helpwanted
OS: Windows 2000 → All
Hardware: PC → All
Summary: Warning: redeclaration of var dataEls Source File: chrome://communicator/content/pref/pref-fonts.js → In <pref-fonts.js>, "Warning: redeclaration of var dataEls"
Target Milestone: --- → mozilla1.8alpha
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•21 years ago
|
||
Bug fix,
plus some cleanup.
(I tried to move the modified lines to the left, as the existing code
permitted...)
Assignee | ||
Updated•21 years ago
|
Attachment #144073 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 144073 [details] [diff] [review]
(Av1) <pref-fonts.js>
'r=?':
Could you review and test it ?
Comment 3•21 years ago
|
||
Comment on attachment 144073 [details] [diff] [review]
(Av1) <pref-fonts.js>
I think I prefer the if (dataEls.length) break; logic, it's more readable. Also
is it possible to merge the two if (dataEls.length) conditions? Perhaps not.
And I still don't like it when you mess around with the indentation. Also,
seeing as you're changing it, I prefer to replace /^\s+|\s+$/ with "" instead
of that strip whitespace code.
Assignee | ||
Updated•21 years ago
|
Attachment #144073 -
Attachment is obsolete: true
Attachment #144073 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 4•21 years ago
|
||
Av1, with comment 3 suggestion(s),
except the following one which I did not understand :-(
(In reply to comment #3)
> (From update of attachment 144073 [details] [diff] [review])
> seeing as you're changing it, I prefer to replace /^\s+|\s+$/ with "" instead
> of that strip whitespace code.
Assignee | ||
Updated•21 years ago
|
Attachment #144977 -
Flags: review?(neil.parkwaycc.co.uk)
the code does:
var stripWhitespace = /^\s*(.*)\s*$/;
foo.replace(stripWhitespace, "$1"));
you could do:
foo.replace(/^\s+|\s+$/,"")
Assignee | ||
Updated•21 years ago
|
Attachment #144977 -
Attachment is obsolete: true
Attachment #144977 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Updated•21 years ago
|
Attachment #145047 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 7•21 years ago
|
||
Comment on attachment 145047 [details] [diff] [review]
(Av1c) <pref-fonts.js>
>+ if (dataEls && dataEls.length)
>+ selectedItem = dataEls[0];
bz, dataEls is the return from listElement.getElementsByAttribute so there
aren't exactly a large number of elements to scan, but is there a preferred way
to do this or will this suffice in this case?
Comment 8•21 years ago
|
||
(In reply to comment #7)
> >+ if (dataEls && dataEls.length)
> >+ selectedItem = dataEls[0];
if (dataEls && dataEls.item(0))
selectedItem = dataEls[0];
is what I'd recommend.
Assignee | ||
Updated•21 years ago
|
Attachment #145047 -
Attachment is obsolete: true
Attachment #145047 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Updated•21 years ago
|
Attachment #146099 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•21 years ago
|
Attachment #146099 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Assignee | ||
Updated•21 years ago
|
Attachment #146099 -
Flags: superreview?(jag)
Updated•21 years ago
|
Attachment #146099 -
Flags: superreview?(jag) → superreview+
Comment 10•21 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•21 years ago
|
||
Comment on attachment 146099 [details] [diff] [review]
(Av1d) <pref-fonts.js>
[Checked in: See comment 11]
(In reply to comment #10)
> Fix checked in.
(for the record)
A modified version was checked in.
Attachment #146099 -
Attachment description: (Av1d) <pref-fonts.js> → (Av1d) <pref-fonts.js>
[Checked in: See comment 11]
Attachment #146099 -
Attachment is obsolete: true
Comment 12•21 years ago
|
||
(In reply to comment #11)
>A modified version was checked in.
Merge conflicts, don't you just love them ;-)
Assignee | ||
Comment 13•21 years ago
|
||
Comment on attachment 146099 [details] [diff] [review]
(Av1d) <pref-fonts.js>
[Checked in: See comment 11]
'approval1.7=?':
Trivial U.I. code cleanup, no risk.
(already on Trunk)
Attachment #146099 -
Flags: approval1.7?
Comment 14•20 years ago
|
||
Comment on attachment 146099 [details] [diff] [review]
(Av1d) <pref-fonts.js>
[Checked in: See comment 11]
warning cleanups can happen on the trunk. there's not much user value, even if
the risk is low -- and warning cleanups have broken features in the past.
Attachment #146099 -
Flags: approval1.7? → approval1.7-
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•