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+

Kent Tamura
Reported 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.
Attachments
Patch (2.26 KB, patch)
2011-06-14 19:14 PDT, Kent Tamura
morrita: review+
Kent Tamura
Comment 1 2011-06-14 19:14:17 PDT
Kent Tamura
Comment 2 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.
Hajime Morrita
Comment 3 2011-06-14 20:09:44 PDT
Comment on attachment 97220 [details] Patch r=me.
Dimitri Glazkov (Google)
Comment 4 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?
Kent Tamura
Comment 5 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.
Kent Tamura
Comment 6 2011-06-14 20:41:38 PDT
Note You need to log in before you can comment on or make changes to this bug.