[webkit-reviews] review granted: [Bug 3526] Add javascript dynamically to head or body fails. : [Attachment 2397] Better patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Thu Jun 16 14:40:10 PDT 2005


Darin Adler <darin at apple.com> has granted Anders Carlsson <andersca at mac.com>'s
request for review:
Bug 3526: Add javascript dynamically to head or body fails.
http://bugzilla.opendarwin.org/show_bug.cgi?id=3526

Attachment 2397: Better patch
http://bugzilla.opendarwin.org/attachment.cgi?id=2397&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
I think this is good. Two ideas to make it even better:

1) Put the NodeImpl *n declaration inside the for statement in
HTMLScriptElementImpl::text.

2) HTMLScriptElementImpl::childrenChanged could check firstChild() instead of
childNodeCount(), since that's faster (maybe we should have a hasChildren()).

3) HTMLScriptElementImpl::setText should do isTextNode instead of nodeType() ==
TEXT_NODE.

Otherwise, super-great!

(I also mentioned to Anders on IRC that we need this text/setText change for
title elements.)

r=me



More information about the webkit-reviews mailing list