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
47405
Refactor HTMLInputElement: Move typeMismatch(), valueMissing(), isRequiredFormControl(), and recalcWillValidate()
https://bugs.webkit.org/show_bug.cgi?id=47405
Summary
Refactor HTMLInputElement: Move typeMismatch(), valueMissing(), isRequiredFor...
Kent Tamura
Reported
2010-10-08 03:38:55 PDT
Refactor HTMLInputElement: Move Move typeMismatch(), valueMissing(), isRequiredFormControl(), and recalcWillValidate()
Attachments
Patch
(38.67 KB, patch)
2010-10-08 03:46 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2010-10-08 03:46:58 PDT
Created
attachment 70221
[details]
Patch
Dimitri Glazkov (Google)
Comment 2
2010-10-08 09:52:18 PDT
Comment on
attachment 70221
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=70221&action=review
This looks better and better. I am very happy with this design.
> WebCore/html/HTMLInputElement.cpp:2020 > + return m_inputType->supportsValidation() && HTMLFormControlElementWithState::recalcWillValidate();
OMG, This is so much easier to understand.
> WebCore/html/NumberInputType.h:48 > + virtual bool typeMismatchForCandidate(const String&) const; > + virtual bool typeMismatchForCurrentValue() const;
I wonder if out of these two, there's just one virtual function, typeMismatchFor(const String&), and HTMLInputType::typeMismatch() just calls it?
Kent Tamura
Comment 3
2010-10-09 04:51:03 PDT
Thank you for reviewing a large patch.
> > WebCore/html/NumberInputType.h:48 > > + virtual bool typeMismatchForCandidate(const String&) const; > > + virtual bool typeMismatchForCurrentValue() const; > > I wonder if out of these two, there's just one virtual function, typeMismatchFor(const String&), and HTMLInputType::typeMismatch() just calls it?
Shorten the names sounds good. I change them to typeMismatchFor(const String&) and typeMismatch(). Unfortunately typeMismatchFor(HTMLInputElement::value()) and typeMismatch() have different behaviors in some types.
Kent Tamura
Comment 4
2010-10-09 06:30:39 PDT
Landed as
r69445
.
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