Bug 107429

Summary: INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: haraken, mifenton, morrita, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107427    
Attachments:
Description Flags
Patch
none
Patch 2 none

Description Kent Tamura 2013-01-21 00:55:39 PST
INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated
Comment 1 Kent Tamura 2013-01-21 02:01:09 PST
Created attachment 183737 [details]
Patch
Comment 2 Kentaro Hara 2013-01-21 02:26:01 PST
Comment on attachment 183737 [details]
Patch

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

> Source/WebCore/ChangeLog:20
> +        However we shoudl recalculate validity and call notifyFormStateChanged

Typo: should

> LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html:61
> +keyDown('7'); // -> 07:[--] --
> +keyDown('5'); // -> 07:[05] --
> +keyDown('6'); // -> 07:56 [--]
> +keyDown('A'); // -> 07:56 [AM]
>  shouldBeEqualToString('input.value', '07:56');
> +shouldBe('eventsCounter.input', '1');
> +shouldBe('eventsCounter.change', '1');

Sorry, would you elaborate on why the result becomes 1? (When are the events triggered?)

How about changing the test as follows to make it clear when the events are triggered?

eventCounters = {};
keyDown('7');
keyDown('5');
keyDown('6');
shouldBe('eventsCounter.input', '0');
shouldBe('eventsCounter.change', '0');
keyDown('A');
shouldBe('eventsCounter.input', '1');
shouldBe('eventsCounter.change', '1');

> LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html:122
> +shouldBe('eventsCounter.input', '1');
> +shouldBe('eventsCounter.change', '1');

Ditto.
Comment 3 Kent Tamura 2013-01-21 02:29:47 PST
Created attachment 183741 [details]
Patch 2
Comment 4 Kentaro Hara 2013-01-21 02:30:57 PST
Comment on attachment 183741 [details]
Patch 2

thanks
Comment 5 WebKit Review Bot 2013-01-21 04:51:58 PST
Comment on attachment 183741 [details]
Patch 2

Clearing flags on attachment: 183741

Committed r140324: <http://trac.webkit.org/changeset/140324>
Comment 6 WebKit Review Bot 2013-01-21 04:52:01 PST
All reviewed patches have been landed.  Closing bug.