Skip to content
  • weinig's avatar
    LayoutTests: · f98f37cd
    weinig authored
            Reviewed by Darin.
    
            - test for http://bugs.webkit.org/show_bug.cgi?id=12344
              NativeListBox: item hit testing does not account for top padding and border
    
            * fast/forms/listbox-selection-2-expected.checksum: Added.
            * fast/forms/listbox-selection-2-expected.png: Added.
            * fast/forms/listbox-selection-2-expected.txt: Added.
            * fast/forms/listbox-selection-2.html: Added.
    
    WebCore:
    
            Reviewed by Darin.
    
            - fix http://bugs.webkit.org/show_bug.cgi?id=12344
              NativeListBox: item hit testing does not account for top padding and border
    
            Test: fast/forms/listbox-selection-2.html
    
            * rendering/RenderListBox.cpp:
            (WebCore::RenderListBox::numVisibleItems): Changed height() to contentHeight()
            since items are visible only in the content box.
            (WebCore::RenderListBox::listIndexAtOffset): Adjusted for vertical padding and
            borders. Changed to return -1 instead of the last item's index if the given offset
            is below the last item.
            (WebCore::RenderListBox::autoscroll): Adjusted for vertical padding and borders.
            (WebCore::RenderListBox::controlClipRect): Changed to return the content box since
            items should not spill into the padding box. This change is the reason the test
            generates pixel results.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f98f37cd