Bug 166840 - [Win] The test fast/forms/validation-message-maxLength.html is failing.
Summary: [Win] The test fast/forms/validation-message-maxLength.html is failing.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-09 06:34 PST by Per Arne Vollan
Modified: 2017-01-10 14:15 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.39 KB, patch)
2017-01-09 06:42 PST, Per Arne Vollan
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2017-01-09 06:34:25 PST
The test diff contains this line:

'FAIL input.validationMessage should be Use no more than one character. Was Use no more than 1 characters.'
Comment 1 Per Arne Vollan 2017-01-09 06:42:25 PST
Created attachment 298351 [details]
Patch
Comment 2 Alex Christensen 2017-01-09 09:20:16 PST
Why is it only failing on windows? Where is the "one" coming from right now? It seems like we shouldn't make a special case for 1
Comment 3 Alexey Proskuryakov 2017-01-09 09:39:54 PST
I don't think that his change is right.

1. Special casing 1 is only correct for some languages; other languages have different rules for plurals.

ICU has support for this, although we haven't used it in WebKit directly yet: <http://userguide.icu-project.org/formatparse/messages>.

2. Chris told me that form validation is not enabled on Windows anyway.
Comment 4 Chris Dumez 2017-01-09 09:42:19 PST
Comment on attachment 298351 [details]
Patch

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

> Source/WebCore/platform/LocalizedStrings.cpp:1153
> +    if (maxLength == 1)

This is exactly what we tried to avoid on Mac:
see https://bugs.webkit.org/show_bug.cgi?id=166712.
Comment 5 Chris Dumez 2017-01-09 09:43:46 PST
(In reply to comment #3)
> I don't think that his change is right.
> 
> 1. Special casing 1 is only correct for some languages; other languages have
> different rules for plurals.
> 
> ICU has support for this, although we haven't used it in WebKit directly
> yet: <http://userguide.icu-project.org/formatparse/messages>.
> 
> 2. Chris told me that form validation is not enabled on Windows anyway.

The form validation *UI* is not supported on Windows. However, you can still access the localized validation strings on Windows via input.validationMessage in JS, as demonstrated in the test.
Comment 6 Per Arne Vollan 2017-01-10 05:21:39 PST
(In reply to comment #5)
> (In reply to comment #3)
> > I don't think that his change is right.
> > 
> > 1. Special casing 1 is only correct for some languages; other languages have
> > different rules for plurals.
> > 
> > ICU has support for this, although we haven't used it in WebKit directly
> > yet: <http://userguide.icu-project.org/formatparse/messages>.
> > 
> > 2. Chris told me that form validation is not enabled on Windows anyway.
> 
> The form validation *UI* is not supported on Windows. However, you can still
> access the localized validation strings on Windows via
> input.validationMessage in JS, as demonstrated in the test.

Ok, thanks for reviewing, guys :) I'll update the test expectations instead.
Comment 7 Alexey Proskuryakov 2017-01-10 14:15:55 PST
Longer term, we should probably look into having/using stringsdict on Windows too.