Open
Bug 486882
Opened 16 years ago
Updated 2 years ago
custom <scale> thumb with negative top-margin isn't fully draggable
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
NEW
People
(Reporter: Dolske, Unassigned)
References
Details
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Bug 475318 implements a custom thumb in a <scale> for the HTML5 video controls.
I'm having problems where part of the thumb is not draggable. As of Patch v.3, a click-and-drag anywhere above the bottom two pixels of the text in the thumb doesn't seem to be recognized. IIRC, earlier patches worked except for the region that extended above the control bar's <stack>, but I suppose I might be remembering wrong.
The region below the thumb is, correctly, not draggable. So the negative top-margin does seem to have shifted the thumb's draggable area upwards, but it's like the top of the draggable area wasn't shifted as well.
Reporter | ||
Comment 1•16 years ago
|
||
Did some more debugging... Setting a background color on the <slider>'s .scale-thumb reveals what size it is, and that is is picking up the width of the videocontrol's custom thumb, but not the height. Instead, it was 11 pixels tall, centered over of the bar.
Unfortunately I don't seem to be able to control the .scale-thumb's vertical size or positioning with CSS. The two things I seem to be bumping into:
* There's code in nsSliderFrame::BuildDisplayListForChildren that decides not to draw the thumb if it's too big. This makes it impossible to get the controls working like one would expect... The bar should be the only clickable area (which is 8 pixels tall), but the thumb needs to be 22 pixels tall.
* The thumb always seems to be vertically centered within the <slider>. Setting a bottom and/or (negative) top margin didn't shift it, nor did explicitly setting -moz-box-pack / -moz-box-align to non-centered values.
The patch is the best I was able to to... It increases the vertical size+offset of .scale-slider so it extends from the bottom of the bar to 4 pixels above the grey control area (same distance as the thumb should). This implicitly grows the .scale-thumb to cover the same vertical region, so the entire thumb is now draggable. But this results in an unwanted side effect: while clicking below the white scrubber bar has no effect (as expected), clicking above it now causes the thumb to jump to that position.
I was also trying to use a bottom-margin on the thumb so the draggable area only started above the scrubber bar (since most of the thumb's bottom is transparent pixels, and the overlap caused a large dead region where clicking the bar was actually clicking the thumb, and thus it wouldn't jump to the clicked position).
Might it be possible to change nsSliderFrame to allow bigger thumbs? And obey the CSS for centering (if that's the problem)?
Comment 2•16 years ago
|
||
This patch makes it so that the outline rectangle of the thumb is used instead of the box rectangle.
This is also a bit hacky, but something like this may be a possibility.
Reporter | ||
Comment 3•16 years ago
|
||
[Rolled up the partial-fix into bug 488083 to help make controls less-sucky for FF3.5 Beta 4.]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•