Summary: | REGRESSION(r88757): [Chromium] Vertical position of media slider thumb is wrong. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kent Tamura <tkent> | ||||
Component: | Layout and Rendering | Assignee: | 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
Kent Tamura
2011-06-14 17:52:21 PDT
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> |