Bug 49716 - Add more validation message functions
Summary: Add more validation message functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 23:26 PST by Kent Tamura
Modified: 2010-11-18 20:49 PST (History)
2 users (show)

See Also:


Attachments
Patch (23.82 KB, patch)
2010-11-17 23:32 PST, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (24.23 KB, patch)
2010-11-18 15:25 PST, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2010-11-17 23:26:56 PST
As discussed in http://codereview.chromium.org/4678006/, Chromium has a plain to reuse Firefox's messages.  Firefox has some type-specific valueMissing messages.
Comment 1 Kent Tamura 2010-11-17 23:32:36 PST
Created attachment 74208 [details]
Patch
Comment 2 Tony Chang 2010-11-18 10:11:47 PST
Comment on attachment 74208 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74208&action=review

> WebCore/html/ValidityState.cpp:46
> -    if (valueMissing())
> -        return validationMessageValueMissingText();
>      if (patternMismatch())
>          return validationMessagePatternMismatchText();

Do we need to check valueMissing before pattermMismatch?
Comment 3 Kent Tamura 2010-11-18 15:06:25 PST
Comment on attachment 74208 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74208&action=review

>> WebCore/html/ValidityState.cpp:46
>>          return validationMessagePatternMismatchText();
> 
> Do we need to check valueMissing before pattermMismatch?

Oh, good point.
If a page has <input required pattern="[0-9]{4}"> and the field is empty, we should show valueMissing message, not patternMismatch message.
Comment 4 Kent Tamura 2010-11-18 15:25:14 PST
Created attachment 74302 [details]
Patch 2
Comment 5 Kent Tamura 2010-11-18 20:48:57 PST
Comment on attachment 74302 [details]
Patch 2

Clearing flags on attachment: 74302

Committed r72363: <http://trac.webkit.org/changeset/72363>
Comment 6 Kent Tamura 2010-11-18 20:49:05 PST
All reviewed patches have been landed.  Closing bug.