Bug 143739 - Layout Test fast/forms/listbox-visible-size.html is failing
Summary: Layout Test fast/forms/listbox-visible-size.html is failing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 143703 (view as bug list)
Depends on: 143649
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-14 16:34 PDT by Brent Fulgham
Modified: 2015-04-23 02:14 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-04-14 16:34:44 PDT
The following layout test is failing on Windows, EFL, and GTK+:

fast/forms/listbox-visible-size.html

Probable cause:

This might be related to font size, where the select does not have sufficient space to move. Alternatively, this could be related to Bug 143648.


@@ -1,4 +1,4 @@
-PASS select.scrollTop is targetTop
+FAIL select.scrollTop should be 28. Was 16.
 PASS successfullyParsed is true
Comment 1 Brent Fulgham 2015-04-14 16:40:24 PDT
Test skipped on Windows in r182818. <https://trac.webkit.org/changeset/182818>.
Comment 2 Marcos Chavarría Teijeiro (irc: chavaone) 2015-04-15 00:07:22 PDT
*** Bug 143703 has been marked as a duplicate of this bug. ***
Comment 3 Marcos Chavarría Teijeiro (irc: chavaone) 2015-04-22 02:58:27 PDT
The reason is that WebKit (at least WebKitGtk) only renders complete rows so if you want to scroll to the middle of two rows it move to the next position. 

In addition the JS code from this test is wrong IMHO:

    const targetTop = 28;
    var select;
    function scrollSelect(newTop)
    {
        var select = document.getElementById('select');
        select.scrollTop = newTop;
    }

    scrollSelect(targetTop);
    shouldBe('select.scrollTop', 'targetTop');

The select that is declared on line 2 should be undefined on the last line (but it isn't) the select on line 5 is a local variable of scrollSelect function and it should not affect to the extern value (but it does). This is the behaviour of Firefox and Chrome.