Clicking input type=range with padding or border sets wrong value
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2012 04:27:27 +0000 (04:27 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2012 04:27:27 +0000 (04:27 +0000)
commit95a5a45420eac6359b054b5db6f86c7ae3004874
treec1e2f784be7cf744b9467437c7e8ca83d9a07988
parent043ff1118c902d74bf46fae12fcf91b7aab5876e
Clicking input type=range with padding or border sets wrong value
https://bugs.webkit.org/show_bug.cgi?id=94473

Reviewed by Kent Tamura.

Source/WebCore:

We should take the padding and border width into account when calculating the value from the mouse location.

Test: fast/forms/range/range-hit-test-with-padding.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::sliderTrackElementOf):
(WebCore):
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/SliderThumbElement.h:
(WebCore):

LayoutTests:

* fast/forms/range/range-hit-test-with-padding-expected.txt: Added.
* fast/forms/range/range-hit-test-with-padding.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/range/range-hit-test-with-padding-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/range/range-hit-test-with-padding.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h