Last Comment Bug 639378 - Radio elements can't be part of the empty string group anymore
: Radio elements can't be part of the empty string group anymore
Status: RESOLVED INVALID
: regression, testcase
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Mounir Lamouri (:mounir)
:
: Andrew Overholt [:overholt]
Mentors:
data:text/html,<input type='radio' na...
Depends on: 641720
Blocks: 547165
  Show dependency treegraph
 
Reported: 2011-03-06 13:33 PST by Mounir Lamouri (:mounir)
Modified: 2013-08-11 11:47 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Make the empty string radio group valid (3.22 KB, patch)
2011-03-07 06:47 PST, Mounir Lamouri (:mounir)
no flags Details | Diff | Splinter Review
Make the empty string radio group valid (5.80 KB, patch)
2011-03-07 07:12 PST, Mounir Lamouri (:mounir)
no flags Details | Diff | Splinter Review
Make the empty string radio group valid (6.21 KB, patch)
2011-03-09 17:50 PST, Mounir Lamouri (:mounir)
jonas: review-
Details | Diff | Splinter Review

Description Mounir Lamouri (:mounir) 2011-03-06 13:33:38 PST
See URL for testcase.

In Firefox 3.6 and Opera, the first two radio's are in the same group and the last two in another group.
In Firefox 4 (nightly) and Webkit (trunk + Safari 5), all radio are in different groups.

This has been introduced by bug 583863: GetNameIfExists seems to be wrong and should be |return GetAttr(kNameSpaceID_None, nsGkAtoms::name, aName);| (which actually make the method quite useless...).
Comment 1 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-03-06 13:45:59 PST
I think you mean Bug 547165, Bug 583863 didn't change this method ...

http://hg.mozilla.org/mozilla-central/diff/40326c4f714c/content/html/content/src/nsHTMLInputElement.cpp
Comment 2 Mounir Lamouri (:mounir) 2011-03-07 06:47:43 PST
Created attachment 517415 [details] [diff] [review]
Make the empty string radio group valid
Comment 3 Mounir Lamouri (:mounir) 2011-03-07 07:12:49 PST
Created attachment 517416 [details] [diff] [review]
Make the empty string radio group valid

It's better if these groups can be invalid too...
Comment 4 Mounir Lamouri (:mounir) 2011-03-07 14:37:00 PST
FWIW, IE6 has the same behavior as Opera and Firefox 4.0 and IE 9 has the behavior of Webkit and our trunk. Now, I wonder if that's per spec but I really can't find anything...
Comment 5 Mounir Lamouri (:mounir) 2011-03-07 14:45:30 PST
(In reply to comment #4)
> FWIW, IE6 has the same behavior as Opera and Firefox 4.0 and IE 9 has the

I meant Firefox 3.6...
Comment 6 Mounir Lamouri (:mounir) 2011-03-09 17:50:33 PST
Created attachment 518251 [details] [diff] [review]
Make the empty string radio group valid

Same thing without regressing form submission...
Comment 7 Mounir Lamouri (:mounir) 2011-03-15 08:41:47 PDT
Jonas has open a bug against the specs to make our current behavior correct:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12301

The purpose of this bug might change depending on what is done with the spec bug.
Comment 8 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-03-15 10:22:29 PDT
Comment on attachment 518251 [details] [diff] [review]
Make the empty string radio group valid

I think we *should* treat <input type=radio name=""> the same as we do <input type=radio>. I.e. not put it in a group.

In all other instances an empty name is treated as no name so it's good for consistency. And it allows doing input.name = "" to remove it from any group.

I've filed a bug on this against the HTML spec.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12301

Note You need to log in before you can comment on or make changes to this bug.