Skip to content
  • tkent@chromium.org's avatar
    Spinbuttons become unclickable if right padding is large. · 508868bc
    tkent@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=56298
    
    Reviewed by NOBODY (OOPS!).
    
    Source/WebCore:
    
    An inner-spin-button is put on the right border and ignores right
    padding in RenderTextControlSingleLine::layout(), but forwardEvent()
    checks if a point is in an area just right of an internal text block.
    This inconsistency caused a bug that an inner-spin-button with large
    padding didn't receive mouse events.
    
    To fix this bug, we render spin buttons as layers, and remove manual
    event forwarding code.
    
    Test: fast/forms/input-number-large-padding.html
    
    * css/html.css: Add "position:relative" to make a spin-button a layer.
    (input::-webkit-inner-spin-button):
    (input::-webkit-outer-spin-button):
    * rendering/RenderTextControlSingleLine.cpp:
    (WebCore::RenderTextControlSingleLine::forwardEvent):
      Remove manual event forwarding code.
    
    LayoutTests:
    
    Add a test, and skip on platforms which has no inner-spin-button implementation.
    
    * fast/forms/input-number-large-padding-expected.txt: Added.
    * fast/forms/input-number-large-padding.html: Added.
    * platform/chromium/test_expectations.txt:
    * platform/mac/Skipped:
    * platform/mac/fast/forms/input-appearance-spinbutton-disabled-readonly-expected.txt:
    * platform/mac/fast/forms/input-appearance-spinbutton-expected.txt:
    * platform/mac/fast/forms/input-appearance-spinbutton-layer-expected.txt:
    * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt:
    * platform/mac/fast/forms/input-appearance-spinbutton-visibility-expected.txt:
    * platform/qt/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    508868bc