WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
76039
Rename HTMLInputElement::setDefaultName to setInitialName
https://bugs.webkit.org/show_bug.cgi?id=76039
Summary
Rename HTMLInputElement::setDefaultName to setInitialName
Kent Tamura
Reported
2012-01-11 01:13:34 PST
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.
Attachments
Patch
(6.02 KB, patch)
2012-01-11 01:46 PST
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-01-11 01:26:55 PST
> 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.
Kent Tamura
Comment 2
2012-01-11 01:46:17 PST
Created
attachment 121994
[details]
Patch
Darin Adler
Comment 3
2012-01-11 10:15:18 PST
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.
WebKit Review Bot
Comment 4
2012-01-11 14:36:10 PST
Comment on
attachment 121994
[details]
Patch Clearing flags on attachment: 121994 Committed
r104747
: <
http://trac.webkit.org/changeset/104747
>
WebKit Review Bot
Comment 5
2012-01-11 14:36:15 PST
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