Bug 62685 - REGRESSION(r88757): [Chromium] Vertical position of media slider thumb is wrong.
Summary: REGRESSION(r88757): [Chromium] Vertical position of media slider thumb is wrong.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P1 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on: 52920
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-14 17:52 PDT by Kent Tamura
Modified: 2011-06-14 20:41 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.26 KB, patch)
2011-06-14 19:14 PDT, Kent Tamura
morrita: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-06-14 17:52:21 PDT
If the height of the <input> is smaller than the height of the thumb, we should center the thumb position vertically.
Comment 1 Kent Tamura 2011-06-14 19:14:17 PDT
Created attachment 97220 [details]
Patch
Comment 2 Kent Tamura 2011-06-14 19:14:55 PDT
(In reply to comment #1)
> Created an attachment (id=97220) [details]
> Patch

This will fix 12 tests listed in test_expectations.txt.
Comment 3 Hajime Morrita 2011-06-14 20:09:44 PDT
Comment on attachment 97220 [details]
Patch

r=me.
Comment 4 Dimitri Glazkov (Google) 2011-06-14 20:13:46 PDT
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 5 Kent Tamura 2011-06-14 20:37:55 PDT
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.
Comment 6 Kent Tamura 2011-06-14 20:41:38 PDT
Committed r88901: <http://trac.webkit.org/changeset/88901>