[Webkit-unassigned] [Bug 45719] Adding "checked" radio element to DOM, isn't checked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 25 21:22:29 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=45719


Dimitri Glazkov (Google) <dglazkov at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76478|review?                     |review-
               Flag|                            |




--- Comment #6 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2011-01-25 21:22:28 PST ---
(From update of attachment 76478)
View in context: https://bugs.webkit.org/attachment.cgi?id=76478&action=review

Also needs to be rebased for after the big Source move.

> WebCore/html/HTMLInputElement.cpp:685
> +        if (renderer())

This is wrong. You can also have a NULL renderer() if you set display:none. eseidel suggested earlier that you're probably looking for inDocument: http://www.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/WebCore/dom/Node.h&l=361&exact_package=chromium

> LayoutTests/fast/forms/radio-checked-by-javascript.html:31
> +    document.write("This should be checked");

document.write? ew.

> LayoutTests/fast/forms/radio-checked-by-javascript.html:39
> +var radioElement1, radioElement2, radioElement3, radioElement4;

no need to declare this outside of the function. Could just do var el = document.getElementById('foo');

> LayoutTests/fast/forms/radio-checked-by-javascript.html:41
> +    radioElement1 = document.getElementById('radioID1');

Can you make this into a helper function that gets an element and verifies if the element is checked? This way you would have a much more elegant code.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list