Closed Bug 926487 Opened 8 years ago Closed 8 years ago

Replace className comparisons with classList.contains in viewSource.js

Categories

(Toolkit :: View Source, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: jaws, Assigned: betschart.ma)

Details

(Whiteboard: [good first bug][mentor=jaws][lang=js][qa-])

Attachments

(1 file, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #926479 +++

+++ This bug was initially created as a clone of Bug #926477 +++

+++ This bug was initially created as a clone of Bug #926471 +++

See the following search for each instance of this: http://mxr.mozilla.org/mozilla-central/search?string=.className+%3D%3D&find=viewSource.js&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central

If someone adds a new className to the element, these checks will fail. They should instead be using .classList.contains().
Can this bug be assigned to me please? Thanks
Assignee: nobody → betschart.ma
Status: NEW → ASSIGNED
Marco, do you have any update on this?
Flags: needinfo?(betschart.ma)
Fixed the bug, running the tests now.
Flags: needinfo?(betschart.ma)
Wein, I updated it, but I'm not sure if i did it the right way (my first one). And I updated the bug 926477 for Rene Amrhein (waldion@hotmail.com as well.
Thanks for your feedback.
Flags: needinfo?(betschart.ma)
Marco, I don't see any attachment on this bug. Can you please upload a patch that fixes it to this bug and flag me for review? (On the Add an Attachment page you'll want to set the "review" field to "?" and then put in ":jaws" as the reviewer.)
Flags: sec-review?
Flags: needinfo?(betschart.ma)
Flags: a11y-review?
Flags: a11y-review?
Hi, I committed it again, just the bug 926487. I used mercurial queue:
hg qnew bug-926487-fix.patch
hg qrefresh -m "comment"
hg commit

Hopefully it worked. I it is not allowed to add you to the sec-review flag:

"Jared Wein [:jaws] <jaws@mozilla.com> does not have permission to set the sec-review flag. Please select a user who is a member of the nightwatch group."
To upload the patch you should click on the "Add an Attachment" link in this bug. You can then find your patch in the .hg/patches folder of your local repository. It should be named "bug-926487-fix.patch".
Flags: sec-review?
Attached patch Replace className comparisons (obsolete) — Splinter Review
Attachment #8344186 - Flags: review?(jaws)
Comment on attachment 8344186 [details] [diff] [review]
Replace className comparisons

Review of attachment 8344186 [details] [diff] [review]:
-----------------------------------------------------------------

This patch is indenting the fixed code changed in a previous commit on your local machine. You can generate a patch from a commit by running:
hg log -r revisionNumber -p > 926487.patch
where revisionNumber is the changeset revision number of the commit. The patch will be a file in your current directory named 926487.patch.
Attachment #8344186 - Flags: review?(jaws) → review-
Attached patch 926487.patch (obsolete) — Splinter Review
Revision-number:156938:30645bc7c00a
Attachment #8345300 - Flags: review?(jaws)
Attached patch 926487.patch (obsolete) — Splinter Review
Attachment #8345309 - Flags: review?(jaws)
Attached patch PatchSplinter Review
I'm sorry, I didn't do a good job of describing what should be done for this bug. Marco, can you take a look at this patch and let me know if you agree with what I have changed?
Attachment #8344186 - Attachment is obsolete: true
Attachment #8345300 - Attachment is obsolete: true
Attachment #8345309 - Attachment is obsolete: true
Attachment #8345300 - Flags: review?(jaws)
Attachment #8345309 - Flags: review?(jaws)
Attachment #8346626 - Flags: review?(bmcbride)
Attachment #8346626 - Flags: feedback?(betschart.ma)
Attachment #8346626 - Flags: review?(bmcbride) → review+
https://hg.mozilla.org/mozilla-central/rev/09c25b7e92c1
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Everything okey
Comment on attachment 8346626 [details] [diff] [review]
Patch

Thanks!
Attachment #8346626 - Flags: feedback?(betschart.ma)
Whiteboard: [good first bug][mentor=jaws][lang=js] → [good first bug][mentor=jaws][lang=js][qa-]
You need to log in before you can comment on or make changes to this bug.