Bug 48145

Summary: LayoutTests/fast/events/spatial-navigation/snav-multiple-select.html fails
Product: WebKit Reporter: Chang Shu <cshu>
Component: DOMAssignee: Chang Shu <cshu>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, tonikitoo, webkit.review.bot, yael
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 48134    
Bug Blocks: 46905    
Attachments:
Description Flags
fix patch
tonikitoo: review+
fix patch 2 none

Description Chang Shu 2010-10-22 11:58:24 PDT
The above test case fails when running the test case from a browser. It was working in DRT by mistake. After bug 48134 is fixed, the failure is unveiled.
Comment 1 Yael 2010-10-24 10:53:42 PDT
I think this test should be removed. The support I added for multi select is only for the case when ENABLE_NO_LISTBOX_RENDERING is defined, and we cannot test that in a layout test. 
Due to the bug in the test infrastructure, I did not catch this. (sorry about that :-).

We already have manual tests that can test multi-select with ENABLE_NO_LISTBOX_RENDERING turned on, and we already have a bug report for adding support when the flag is not turned on https://bugs.webkit.org/show_bug.cgi?id=47094 .
Comment 2 Chang Shu 2010-11-01 06:40:26 PDT
Created attachment 72502 [details]
fix patch
Comment 3 Chang Shu 2010-11-01 06:41:59 PDT
(In reply to comment #1)
> I think this test should be removed. The support I added for multi select is only for the case when ENABLE_NO_LISTBOX_RENDERING is defined, and we cannot test that in a layout test. 
> Due to the bug in the test infrastructure, I did not catch this. (sorry about that :-).
> 
> We already have manual tests that can test multi-select with ENABLE_NO_LISTBOX_RENDERING turned on, and we already have a bug report for adding support when the flag is not turned on https://bugs.webkit.org/show_bug.cgi?id=47094 .

This test can still be valid for 47094.
Comment 4 WebKit Review Bot 2010-11-01 06:43:49 PDT
Attachment 72502 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/dom/SelectElement.cpp:768:  Missing spaces around |  [whitespace/operators] [3]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Yael 2010-11-01 07:26:14 PDT
(In reply to comment #3)
> (In reply to comment #1)
> > I think this test should be removed. The support I added for multi select is only for the case when ENABLE_NO_LISTBOX_RENDERING is defined, and we cannot test that in a layout test. 
> > Due to the bug in the test infrastructure, I did not catch this. (sorry about that :-).
> > 
> > We already have manual tests that can test multi-select with ENABLE_NO_LISTBOX_RENDERING turned on, and we already have a bug report for adding support when the flag is not turned on https://bugs.webkit.org/show_bug.cgi?id=47094 .
> 
> This test can still be valid for 47094.

After this patch, can the user navigate out of the select list _without_ changing the selected item?
Comment 6 Antonio Gomes 2010-11-01 07:30:28 PDT
Comment on attachment 72502 [details]
fix patch

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

Thanks for fixing this!

> WebCore/dom/SelectElement.cpp:768
> +                if (keyIdentifier == "Left" || keyIdentifier == "Right"|| ((keyIdentifier == "Down" || keyIdentifier == "Up") && endIndex == data.activeSelectionEndIndex()))

Maybe we could have a helper method for this part

(keyIdentifier == "Down" || keyIdentifier == "Up") && endIndex == data.activeSelectionEndIndex()

just to make it clear what is going on?
Comment 7 Chang Shu 2010-11-01 07:31:58 PDT
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > I think this test should be removed. The support I added for multi select is only for the case when ENABLE_NO_LISTBOX_RENDERING is defined, and we cannot test that in a layout test. 
> > > Due to the bug in the test infrastructure, I did not catch this. (sorry about that :-).
> > > 
> > > We already have manual tests that can test multi-select with ENABLE_NO_LISTBOX_RENDERING turned on, and we already have a bug report for adding support when the flag is not turned on https://bugs.webkit.org/show_bug.cgi?id=47094 .
> > 
> > This test can still be valid for 47094.
> 
> After this patch, can the user navigate out of the select list _without_ changing the selected item?


No. A complete support will follow up and probably attach to 47094.
Comment 8 Chang Shu 2010-11-01 07:33:05 PDT
(In reply to comment #6)
> (From update of attachment 72502 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72502&action=review
> 
> Thanks for fixing this!
> 
> > WebCore/dom/SelectElement.cpp:768
> > +                if (keyIdentifier == "Left" || keyIdentifier == "Right"|| ((keyIdentifier == "Down" || keyIdentifier == "Up") && endIndex == data.activeSelectionEndIndex()))
> 
> Maybe we could have a helper method for this part
> 
> (keyIdentifier == "Down" || keyIdentifier == "Up") && endIndex == data.activeSelectionEndIndex()
> 
> just to make it clear what is going on?

Thanks for the review. I will change accordingly.
Comment 9 Chang Shu 2010-11-01 09:54:31 PDT
Created attachment 72517 [details]
fix patch 2

Fixed coding style and added comments.
Comment 10 Antonio Gomes 2010-11-01 10:18:55 PDT
Comment on attachment 72517 [details]
fix patch 2

r=me
Comment 11 WebKit Commit Bot 2010-11-01 16:03:16 PDT
The commit-queue encountered the following flaky tests while processing attachment 72517 [details]:

fast/events/platform-wheelevent-in-scrolling-div.html
fast/text/international/vertical-text-glyph-test.html

Please file bugs against the tests.  These tests were authored by aestes@apple.com and jamesr@chromium.org.  The commit-queue is continuing to process your patch.
Comment 12 WebKit Commit Bot 2010-11-01 18:56:57 PDT
Comment on attachment 72517 [details]
fix patch 2

Clearing flags on attachment: 72517

Committed r71094: <http://trac.webkit.org/changeset/71094>
Comment 13 WebKit Commit Bot 2010-11-01 18:57:03 PDT
All reviewed patches have been landed.  Closing bug.