[webkit-reviews] review granted: [Bug 88632] REGRESSION(r116487?): HTMLFormElement::elements['name'] is empty if the form is detached from the document tree : [Attachment 146569] patch1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 8 11:42:15 PDT 2012


Ryosuke Niwa <rniwa at webkit.org> has granted Rakesh <rakesh.kn at motorola.com>'s
request for review:
Bug 88632: REGRESSION(r116487?): HTMLFormElement::elements['name'] is empty if
the form is detached from the document tree
https://bugs.webkit.org/show_bug.cgi?id=88632

Attachment 146569: patch1
https://bugs.webkit.org/attachment.cgi?id=146569&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=146569&action=review


Please fix nits in the test before you land.

> Source/WebCore/dom/Node.cpp:2941
> +    ASSERT(hasTagName(formTag));
> +    if (!hasRareData() || !rareData()->nodeLists())
> +	   return;
> +
> +    NodeListsNodeData::RadioNodeListCache cache =
rareData()->nodeLists()->m_radioNodeListCache;
> +    for (NodeListsNodeData::RadioNodeListCache::iterator it = cache.begin();
it != cache.end(); ++it)
> +	   it->second->setRootElement(toElement(this));

It seems like we have the same problem in LabelsNodeList and others that can be
rooted at the document node.
We might want to fix them as well in a follow up patch.

>
LayoutTests/fast/forms/radionodelist-whose-form-element-detached-from-domtree.h
tml:10
> +    <input type="radio" name="type1" value="rbarrval1">

Why is the value "rbarrval1"? Can we use some other human-understandable value
instead?

>
LayoutTests/fast/forms/radionodelist-whose-form-element-detached-from-domtree.h
tml:18
> +    <input type="checkbox" name="cb" value="cbval1">

Ditto.


More information about the webkit-reviews mailing list