WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94473
Clicking input type=range with padding or border sets wrong value
https://bugs.webkit.org/show_bug.cgi?id=94473
Summary
Clicking input type=range with padding or border sets wrong value
Keishi Hattori
Reported
2012-08-20 05:48:21 PDT
Clicking input type=range with padding or border sets wrong value.
Attachments
Patch
(6.61 KB, patch)
2012-08-20 06:19 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(6.80 KB, patch)
2012-08-20 20:15 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Keishi Hattori
Comment 1
2012-08-20 06:19:04 PDT
Created
attachment 159409
[details]
Patch
Kent Tamura
Comment 2
2012-08-20 19:08:21 PDT
Comment on
attachment 159409
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=159409&action=review
> Source/WebCore/html/shadow/SliderThumbElement.cpp:273 > trackSize = input->renderBox()->contentHeight() - renderBox()->height();
Need to change to trackElement->renderBox()->contentHeight()?
> Source/WebCore/html/shadow/SliderThumbElement.cpp:274 > + position = offset.y() - renderBox()->height() / 2 - trackBoundingBox.y() + inputBoundingBox.y();
Doesn't - (input->renderBox()->borderTop() + input->renderBox()->paddingTop()) work? If it works, we can remove trackBoundingBox and inputBoundingBox.
Keishi Hattori
Comment 3
2012-08-20 19:30:16 PDT
Comment on
attachment 159409
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=159409&action=review
>> Source/WebCore/html/shadow/SliderThumbElement.cpp:274 >> + position = offset.y() - renderBox()->height() / 2 - trackBoundingBox.y() + inputBoundingBox.y(); > > Doesn't - (input->renderBox()->borderTop() + input->renderBox()->paddingTop()) work? If it works, we can remove trackBoundingBox and inputBoundingBox.
I think that will work for all cases where user is styling the input element, but using trackBoundingBox will be more robust to styling pseudo elements. (e.g. adding margin to the track element or adding ::before to slider container element)
Keishi Hattori
Comment 4
2012-08-20 20:15:18 PDT
Created
attachment 159602
[details]
Patch
Kent Tamura
Comment 5
2012-08-20 20:16:10 PDT
Comment on
attachment 159602
[details]
Patch ok
WebKit Review Bot
Comment 6
2012-08-20 21:27:43 PDT
Comment on
attachment 159602
[details]
Patch Clearing flags on attachment: 159602 Committed
r126132
: <
http://trac.webkit.org/changeset/126132
>
WebKit Review Bot
Comment 7
2012-08-20 21:27:46 PDT
All reviewed patches have been landed. Closing bug.
Zan Dobersek
Comment 8
2012-08-21 00:51:44 PDT
The test introduced in the reviewed patch has been failing on all non-Chromium ports:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20-%20webkit.org&tests=fast%2Fforms%2Frange%2Frange-hit-test-with-padding.html
How is this test expected to behave on ports that have Shadom DOM or subpixel layout or perhaps both disabled?
Keishi Hattori
Comment 9
2012-08-21 05:40:37 PDT
(In reply to
comment #8
)
> The test introduced in the reviewed patch has been failing on all non-Chromium ports: >
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20-%20webkit.org&tests=fast%2Fforms%2Frange%2Frange-hit-test-with-padding.html
> > How is this test expected to behave on ports that have Shadom DOM or subpixel layout or perhaps both disabled?
Ports without subpixel layout won't match up exactly. I will be changing the test in
Bug 94585
. Please rebaseline when it lands. I don't know of any ports that support <input type=range> but don't have Shadow DOM.
Keishi Hattori
Comment 10
2012-08-21 06:12:30 PDT
Bug 94585
is in the commit queue. I was able to change the test in a way that you won't need to rebaseline.
Keishi Hattori
Comment 11
2012-08-21 06:39:57 PDT
> I don't know of any ports that support <input type=range> but don't have Shadow DOM.
I misunderstood. This patch has nothing to do with the Shadow DOM flag.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug