WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
88392
Remove unnecessary functions: setName() and formControlName()
https://bugs.webkit.org/show_bug.cgi?id=88392
Summary
Remove unnecessary functions: setName() and formControlName()
Kent Tamura
Reported
2012-06-05 22:26:21 PDT
Remove unnecessary functions: setName() and formControlName()
Attachments
Patch
(25.98 KB, patch)
2012-06-05 22:37 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch for landing
(26.32 KB, patch)
2012-06-05 23:43 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch 2
(28.01 KB, patch)
2012-06-10 20:27 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-06-05 22:37:20 PDT
Created
attachment 145935
[details]
Patch
Kentaro Hara
Comment 2
2012-06-05 22:50:20 PDT
Comment on
attachment 145935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145935&action=review
Test cases look OK.
> Source/WebCore/ChangeLog:8 > + 'name' IDL attributes of form-related elements should be [Reflected],
Link to the spec please.
> Source/WebCore/ChangeLog:11 > + just convert a null attribute to an empty string. Our binding code does it.
Nit: convert => converts
> Source/WebCore/html/FormAssociatedElement.cpp:226 > + return name.isNull() ? emptyAtom : name;
What happens if you just return 'name' here? I guess that the generated code will convert a null string to an empty string. Maybe I am wrong though.
Kent Tamura
Comment 3
2012-06-05 23:12:02 PDT
Comment on
attachment 145935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145935&action=review
>> Source/WebCore/ChangeLog:8 >> + 'name' IDL attributes of form-related elements should be [Reflected], > > Link to the spec please.
will do.
>> Source/WebCore/ChangeLog:11 >> + just convert a null attribute to an empty string. Our binding code does it. > > Nit: convert => converts
will fix
>> Source/WebCore/html/FormAssociatedElement.cpp:226 >> + return name.isNull() ? emptyAtom : name; > > What happens if you just return 'name' here? I guess that the generated code will convert a null string to an empty string. Maybe I am wrong though.
If so, we'll see many crashes in our code. e.g. WebCore/dom/CheckedRadioButtons.cpp assumes name() never be NULL and HashMap<StringImpl> doesn't accept NULL.
Kentaro Hara
Comment 4
2012-06-05 23:37:03 PDT
Comment on
attachment 145935
[details]
Patch Thanks for the clarification. The patch looks good to me.
Kent Tamura
Comment 5
2012-06-05 23:43:34 PDT
Created
attachment 145946
[details]
Patch for landing
Kent Tamura
Comment 6
2012-06-06 17:31:44 PDT
(In reply to
comment #5
)
> Created an attachment (id=145946) [details] > Patch for landing
I found this patch caused some regressions. Probably because of lifetime change of an AtomicString of HTMLInputElement::name().
Kent Tamura
Comment 7
2012-06-10 20:27:25 PDT
Created
attachment 146769
[details]
Patch 2
Kent Tamura
Comment 8
2012-06-10 20:29:36 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > Created an attachment (id=145946) [details] [details] > > Patch for landing > > I found this patch caused some regressions. Probably because of lifetime change of an AtomicString of HTMLInputElement::name().
There were two problems: * We still had Element::formControlName(), and some callsites of it. * HTMLInputElment has the following code: if (attribute.name() == nameAttr) { removeFromRadioButtonGroup(); m_name = attribute.value(); addToRadioButtonGroup(); HTMLInputELement::name() should return the old name value for removeFromRadioButtonGroup(), and should return the new name value for addToRadioButtonGroup(). So we can't remove m_name.
Kentaro Hara
Comment 9
2012-06-12 01:15:07 PDT
Comment on
attachment 146769
[details]
Patch 2 Looks OK to me.
Kent Tamura
Comment 10
2012-06-12 01:16:39 PDT
Comment on
attachment 146769
[details]
Patch 2 Thanks!
WebKit Review Bot
Comment 11
2012-06-12 02:10:22 PDT
Comment on
attachment 146769
[details]
Patch 2 Clearing flags on attachment: 146769 Committed
r120049
: <
http://trac.webkit.org/changeset/120049
>
WebKit Review Bot
Comment 12
2012-06-12 02:10:27 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug