https://bugs.webkit.org/show_bug.cgi?id=45719#c22 > In a mostly unrelated note, when looking at this I noticed a peculiarly-named public function, setDefaultName, that is called only by the HTMLIsIndexElement constructor. We should probably make that function protected. And further, it’s only safe to call that function if the object is not a checkbox, so we might want to assert that. And it’s only correct to call it on an object that doesn’t already have a name, so we might want to assert that m_name is null. And finally, this doesn’t actually work correctly if a name is added and then subsequently removed from the isindex element. That’s probably unimportant because of how rare it is to use the isindex element at all, but annoying that it’s incorrect. That’s the reason the function name is so bad: It doesn’t actually set a default name, just sets an initial name.
> this doesn’t actually work correctly if a name is added and then subsequently removed from the isindex element. I confirmed the current behavior of WebKit is compatible with IE9, Firefox, and Opera. As you wrote, setDefaultName() really sets just an initial name.
Created attachment 121994 [details] Patch
Comment on attachment 121994 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121994&action=review > Source/WebCore/html/HTMLInputElement.cpp:1305 > + ASSERT(hasTagName(isindexTag)); To me it seems like this assert goes a little overboard, but only a tiny bit, so I say, lets keep it.
Comment on attachment 121994 [details] Patch Clearing flags on attachment: 121994 Committed r104747: <http://trac.webkit.org/changeset/104747>
All reviewed patches have been landed. Closing bug.