RESOLVED FIXED 42807
Small refactoring for input value sanitization
https://bugs.webkit.org/show_bug.cgi?id=42807
Summary Small refactoring for input value sanitization
Kent Tamura
Reported 2010-07-22 00:14:43 PDT
Small refactoring for input value sanitization
Attachments
Patch (6.47 KB, patch)
2010-07-22 00:24 PDT, Kent Tamura
no flags
Patch 2 (6.49 KB, patch)
2010-07-22 01:03 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2010-07-22 00:24:59 PDT
Darin Adler
Comment 2 2010-07-22 00:37:04 PDT
Comment on attachment 62266 [details] Patch > + (WebCore::InputElement::sanitizeValueCommon): > + Renamed from sanitizeValue(), and call replaceEOLAndLimitLength() > + instead of sanitizeUserInputValue(). Is there any better name for this that doesn't involve the word "common"? How would you describe what this function does?
Kent Tamura
Comment 3 2010-07-22 00:46:33 PDT
(In reply to comment #2) > (From update of attachment 62266 [details]) > > + (WebCore::InputElement::sanitizeValueCommon): > > + Renamed from sanitizeValue(), and call replaceEOLAndLimitLength() > > + instead of sanitizeUserInputValue(). > > Is there any better name for this that doesn't involve the word "common"? How would you describe what this function does? Actually I didn't think "common" was the best name and didn't have other good ideas. A short description for this function would be: This is a sanitization function which is needed for almost all types of <input>. Do you have any idea?
Darin Adler
Comment 4 2010-07-22 00:49:09 PDT
(In reply to comment #3) > A short description for this function would be: > This is a sanitization function which is needed for almost all types of <input>. > > Do you have any idea? I might. What are the exceptions to "almost all" in that sentence?
Kent Tamura
Comment 5 2010-07-22 00:57:30 PDT
(In reply to comment #4) > (In reply to comment #3) > > A short description for this function would be: > > This is a sanitization function which is needed for almost all types of <input>. > > > > Do you have any idea? > > I might. > > What are the exceptions to "almost all" in that sentence? Well, "almost all" means HTMLInputElement::isTextField() for now. So the name should sanitizeValueforTextField()?
Darin Adler
Comment 6 2010-07-22 00:58:44 PDT
(In reply to comment #5) > Well, "almost all" means HTMLInputElement::isTextField() for now. So the name should sanitizeValueforTextField()? Yes. As you say, for now.
Kent Tamura
Comment 7 2010-07-22 01:03:54 PDT
Created attachment 62271 [details] Patch 2
Kent Tamura
Comment 8 2010-07-22 01:21:02 PDT
Comment on attachment 62271 [details] Patch 2 Clearing flags on attachment: 62271 Committed r63879: <http://trac.webkit.org/changeset/63879>
Kent Tamura
Comment 9 2010-07-22 01:21:10 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.