Summary: | Small refactoring for input value sanitization | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kent Tamura <tkent> | ||||||
Component: | Forms | Assignee: | Kent Tamura <tkent> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Minor | CC: | darin, joepeck | ||||||
Priority: | P3 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Kent Tamura
2010-07-22 00:14:43 PDT
Created attachment 62266 [details]
Patch
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? (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? (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? (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()? (In reply to comment #5) > Well, "almost all" means HTMLInputElement::isTextField() for now. So the name should sanitizeValueforTextField()? Yes. As you say, for now. Created attachment 62271 [details]
Patch 2
Comment on attachment 62271 [details] Patch 2 Clearing flags on attachment: 62271 Committed r63879: <http://trac.webkit.org/changeset/63879> All reviewed patches have been landed. Closing bug. |