Bug 62685

Summary: REGRESSION(r88757): [Chromium] Vertical position of media slider thumb is wrong.
Product: WebKit Reporter: Kent Tamura <tkent>
Component: Layout and RenderingAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, morrita
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
Bug Depends on: 52920    
Bug Blocks:    
Attachments:
Description Flags
Patch morrita: review+

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>