[Webkit-unassigned] [Bug 96683] Add min and max input field values to Chromium API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 13 14:37:21 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=96683
Anthony Berent <aberent at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aberent at chromium.org
--- Comment #6 from Anthony Berent <aberent at chromium.org> 2012-09-13 14:37:46 PST ---
(In reply to comment #5)
> (From update of attachment 163964 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=163964&action=review
>
> > Source/WebKit/chromium/src/WebTextInputInfo.cpp:45
> > + && min == min
> > + && max == max;
>
> Missing the "other." prefix on both of these lines.
Agreed, will fix.
>
> > Source/WebKit/chromium/src/WebViewImpl.cpp:2162
> > + if (input->isNumberField()
> > + || input->isRangeControl()
> > + || input->isDateField()
> > + || input->isDateTimeField()
> > + || input->isDateTimeLocalField()
> > + || input->isMonthField()
> > + || input->isWeekField()
> > + || input->isTimeField()) {
> > + info.min = input->minimum();
> > + info.max = input->maximum();
>
> This long if statement is bad for maintenance of HTMLInputElement. We may add new types or decide not to use this style of boolean getter. Is there some reason you can’t just call minimum and maximum unconditionally?
There are comments in HTMLInputElement saying one should not call them for other types. As such it seemed the check was needed.
// Returns the minimum value for type=date, number, or range. Don't call this for other types.
double minimum() const;
// Returns the maximum value for type=date, number, or range. Don't call this for other types.
// This always returns a value which is >= minimum().
double maximum() const;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list