New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Dec 2012
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

  • Only users with EditIssue permission may comment.

Sign in to add a comment

Javascript getElementsByClassName result list no longer changes on class changes

Reported by, Mar 5 2012 Back to list

Issue description

Chrome Version       : 17.0.963.65

ALL platforms! CRITICAL Javascript change/bug

What steps will reproduce the problem?
1. Write a piece of Javascript that loops through multiple elements in getElementsByClassName NodeList
2. Change the class of those elements within the loop

What is the expected result?

The elements get removed from the list as their class changes

What happens instead?

The list is now unaltered since 17.0.963.65 (17.0.963.56 alters the list).

Code that relies on the list changing will fail now.
Labels: -Pri-2 -Area-Undefined -OS-Windows Pri-1 Area-WebKit OS-All Mstone-17
Status: Available

<html class="a">
  <title>document.getElementsByClassName(): live updating</title>
 <body class="a">
    var elms = document.getElementsByClassName("a");
    elms[1].className = "";

elms.length after class update should be 1. This is a regression on m17. Upcoming m18 release is not affected.
This layout test fast/dom/getElementsByClassName/015.html is faulty, otherwise we would  have caught this bug earlier.

cced people, do you know how much the impact of this bug is.
Labels: Merge-Approved
Status: FixUnreleased
Discussed the fix with Dimitri, it works. Merged to 963 in

Working with Jason on the release process to get this out.

Comment 6 Deleted

Trunk and m18 branches are not affected. They dont use the notifyNodeListsAttributeChanged hack. So, nothing need to be changed, and nothing needs merging to m18.
 Issue 116955  has been merged into this issue.

Comment 9 by, Aug 8 2012

Labels: -Merge-Approved
Removing Merge-Approved from past milestones.
Project Member

Comment 10 by, Oct 13 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Status: Fixed
Project Member

Comment 12 by, Mar 10 2013

Labels: -Area-WebKit -Mstone-17 Cr-Content M-17
Project Member

Comment 13 by, Mar 13 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Project Member

Comment 14 by, Apr 6 2013

Labels: -Cr-Content Cr-Blink

Sign in to add a comment