RESOLVED FIXED Bug 53791
HTMLOutputElement::childrenChanged() should call its base class childrenChanged()
https://bugs.webkit.org/show_bug.cgi?id=53791
Summary HTMLOutputElement::childrenChanged() should call its base class childrenChang...
Yael
Reported 2011-02-04 10:59:11 PST
While working on the bug https://bugs.webkit.org/show_bug.cgi?id=50916, I noticed that this is the only element that is not calling its base class childrenChanged(). Adding code to Element::childrenChanged() will not have the desired effect on HTMLOutputElement.
Attachments
Patch (1.88 KB, patch)
2011-02-05 07:59 PST, Kenichi Ishibashi
no flags
Patch V2 (4.80 KB, patch)
2011-02-06 17:56 PST, Kenichi Ishibashi
no flags
Kenichi Ishibashi
Comment 1 2011-02-05 07:59:53 PST
Andreas Kling
Comment 2 2011-02-05 10:03:43 PST
Comment on attachment 81361 [details] Patch r=me
Yael
Comment 3 2011-02-05 12:13:04 PST
This modification actually does change behavior :) If you run the following without this change, the second alert will show 2 instead of 1. <!DOCTYPE html> <html> <head> <script> window.onload=function(){ if (window.layoutTestController) layoutTestController.dumpAsText(); var list = document.getElementsByTagName("span"); var el = document.getElementById("result"); alert("The number of spans before removal is " + list.length); document.getElementById("parentOutput").removeChild(document.getElementById("first")); alert("The number of spans after removal is " + list.length); } </script> </head> <body> <output id="parentOutput"><span class="first" id="first"></span><span class="second" id="second"></span></output> <br> Test that a live list is updated after the child of an HTMLOutputElement was removed. <br> <div id="result"></div> </body> </html>
Andreas Kling
Comment 4 2011-02-06 05:15:26 PST
Comment on attachment 81361 [details] Patch @Yael: Ah, beautiful! Let's add a test for it.
Kenichi Ishibashi
Comment 5 2011-02-06 17:56:56 PST
Created attachment 81436 [details] Patch V2
Kenichi Ishibashi
Comment 6 2011-02-06 18:00:44 PST
(In reply to comment #5) > Created an attachment (id=81436) [details] > Patch V2 Thank you guys for review and correcting my misunderstanding. I've added a test. Thanks!
Kenichi Ishibashi
Comment 7 2011-02-07 16:07:27 PST
Comment on attachment 81436 [details] Patch V2 Thank you for review. Could someone cq+?
WebKit Commit Bot
Comment 8 2011-02-07 22:31:13 PST
Comment on attachment 81436 [details] Patch V2 Clearing flags on attachment: 81436 Committed r77902: <http://trac.webkit.org/changeset/77902>
WebKit Commit Bot
Comment 9 2011-02-07 22:31:16 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.