If the height of the <input> is smaller than the height of the thumb, we should center the thumb position vertically.
Created attachment 97220 [details] Patch
(In reply to comment #1) > Created an attachment (id=97220) [details] > Patch This will fix 12 tests listed in test_expectations.txt.
Comment on attachment 97220 [details] Patch r=me.
Comment on attachment 97220 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=97220&action=review > Source/WebCore/rendering/RenderSlider.cpp:106 > + thumbBox->setY(thumbBox->y() - (heightDiff / 2) - borderTop()); What about padding, or margins?
Comment on attachment 97220 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=97220&action=review >> Source/WebCore/rendering/RenderSlider.cpp:106 >> + thumbBox->setY(thumbBox->y() - (heightDiff / 2) - borderTop()); > > What about padding, or margins? Oh, it's a good point. We should take account of padding, and margin is ignorable. Well, I have just realized we'd like to center the thumb for the *content* of the <input>, not the border-box. So, int heightDiff = thumbBox->height() - contentHeight(); if (heightDiff > 0) thumbBox->setY(thumbBox->y() - (heightDiff / 2)); is the correct code. I'll land the patch with this fix.
Committed r88901: <http://trac.webkit.org/changeset/88901>