Closed Bug 446123 Opened 17 years ago Closed 17 years ago

Additional fixes to <pref-languages.js>, after bug 56680 and before bug 444411

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0a1

People

(Reporter: sgautherie, Assigned: sgautherie)

References

Details

Attachments

(1 file)

Per bug 56680 comment 75 (and 76).
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.2pre) Gecko/2008071502 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4) (Bare) Fixes ported from "language" patch for bug 56680 comment 61 and bug 56680 comment 62: The issue with the array(s) was that the indice got out of sync' as soon as one of the enclosing |if| was |false|. I don't know much about the |createElement*()| issue, but, from looking at bug 280692 and doing a MXR search, it looks like just what we want. NB: After this fix patch, I'll submit a separate global cleanup patch...
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #330336 - Flags: superreview?(jag)
Attachment #330336 - Flags: review?(jag)
Attachment #330336 - Attachment description: (Av1) Use |push()| and |createElementNS| → (Av1) Use |push()| and |createElementNS()|
Comment on attachment 330336 [details] [diff] [review] (Av1) Use |push()| and |createElementNS()| [Checkin: Comment (2-)3] >- var item = doc.createElement('listitem'); >+ const item = doc.createElementNS(listbox.namespaceURI, "listitem"); > > // Copy over the attributes > item.setAttribute('label', langTitle); > item.setAttribute('id', langID); > > listbox.appendChild(item); For the conversion we should ideally convert this to listbox.appendItem(langTitle, langID); but that uses the value rather than the id attribute so I'll just check in the push changes for now.
Attachment #330336 - Flags: superreview?(jag)
Attachment #330336 - Flags: superreview+
Attachment #330336 - Flags: review?(jag)
Attachment #330336 - Flags: review+
Pushed changeset a787e3677d86 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #330336 - Attachment description: (Av1) Use |push()| and |createElementNS()| → (Av1) Use |push()| and |createElementNS()| [Checkin: Comment (2-)3]
Comment on attachment 330336 [details] [diff] [review] (Av1) Use |push()| and |createElementNS()| [Checkin: Comment (2-)3] >- var item = doc.createElement('listitem'); >+ const item = doc.createElementNS(listbox.namespaceURI, "listitem"); This part was eventually removed by http://hg.mozilla.org/comm-central/rev/5048efa447ab
(In reply to comment #2) > For the conversion we should ideally convert this to > listbox.appendItem(langTitle, langID) This was eventually removed/done in http://hg.mozilla.org/comm-central/rev/5048efa447ab too.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: