Closed
Bug 424074
Opened 17 years ago
Closed 17 years ago
[Mac] Scrollbar thumb is drawn with wrong size for custom scrollbars
Categories
(Core :: Widget: Cocoa, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: mstange, Assigned: mstange)
References
(Depends on 1 open bug)
Details
(Keywords: testcase)
Attachments
(2 files, 4 obsolete files)
792 bytes,
application/vnd.mozilla.xul+xml
|
Details | |
14.66 KB,
patch
|
Details | Diff | Splinter Review |
When creating a custom scrollbar using the XUL <scrollbar> element, the size of the scrollbar's thumb can be controlled with the pageincrement attribute.
nsNativeThemeCocoa::GetScrollbarDrawInfo does not use the pageincrement attribute when setting the thumb size; it makes the assumption that pageincrement equals the scrollbar size, which luckily works for normal scrollbars. However, it makes custom scrollbars behave very strangely.
Flags: blocking1.9?
Attachment #310730 -
Flags: review?(vladimir)
Assignee | ||
Comment 1•17 years ago
|
||
Comment on attachment 310730 [details] [diff] [review]
Fix (use pageincrement attribute for thumb size)
Is pageincrement guaranteed to be present? If so, and if it has the correct value at, then this looks fine for me but get sr frm josh, please.
Assignee | ||
Comment 3•17 years ago
|
||
Comment on attachment 310730 [details] [diff] [review]
Fix (use pageincrement attribute for thumb size)
(In reply to comment #2)
> Is pageincrement guaranteed to be present?
The pageincrement attribute has a default value (10), so I think it is.
Attachment #310730 -
Flags: superreview?(joshmoz)
Comment 4•17 years ago
|
||
+'ing w/ P2. Josh, please reprioritize/minus if necessary.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Attachment #310730 -
Flags: superreview?(vladimir)
Attachment #310730 -
Flags: superreview?(joshmoz)
Attachment #310730 -
Flags: review?(vladimir)
Attachment #310730 -
Flags: review+
Comment on attachment 310730 [details] [diff] [review]
Fix (use pageincrement attribute for thumb size)
Looks fine, add a reftest? (Compare whether a scrollbar without an explicit thumb size looks different than one with.)
Attachment #310730 -
Flags: superreview?(vladimir) → superreview+
Assignee | ||
Comment 6•17 years ago
|
||
Do reftests need to be reviewed?
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 7•17 years ago
|
||
Well, I did manage to get it wrong, so maybe they should...
Attachment #311133 -
Attachment is obsolete: true
Assignee | ||
Comment 8•17 years ago
|
||
I'm thinking too much. The other testcase wasn't wrong.
But the patch is wrong. We have to take care of using the right default value ourselves. CheckIntAttr just returns 0 when the attribute isn't set.
A new patch is coming. Sorry for the inconvenience.
Keywords: checkin-needed
Assignee | ||
Comment 9•17 years ago
|
||
I've changed nsNativeTheme::CheckIntAttr to accept a default value as third parameter. Now we're matching the behavior of nsSliderFrame:
http://mxr.mozilla.org/firefox/source/layout/xul/base/src/nsSliderFrame.cpp#185
Again, sorry that I didn't investigate this issue the first time.
Attachment #310730 -
Attachment is obsolete: true
Attachment #311146 -
Flags: review?(joshmoz)
Attachment #311146 -
Flags: superreview?(vladimir)
Attachment #311146 -
Flags: review?(joshmoz)
Attachment #311146 -
Flags: review+
Comment 10•17 years ago
|
||
// These are used by nsNativeThemeGtk
Should probably just remove this comment since it is no longer true.
Attachment #311146 -
Flags: superreview?(vladimir) → superreview+
Assignee | ||
Comment 11•17 years ago
|
||
I've removed the comment and added better reftests.
The following is tested:
1. If the right default values are applied when the attributes are not set
2. If setting pageincrement to a different value changes the appearance
3. If the thumbsize is the same for the pageincrement/maxpos combinations 40/100 and 400/1000.
Attachment #311134 -
Attachment is obsolete: true
Attachment #311146 -
Attachment is obsolete: true
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 12•17 years ago
|
||
landed on trunk, thanks Markus
(In reply to comment #12)
> landed on trunk, thanks Markus
You missed crediting Markus with the patch in your checkin comment.
Comment 14•17 years ago
|
||
oops, sorry
Comment 15•17 years ago
|
||
(In reply to comment #13)
> You missed crediting Markus with the patch in your checkin comment.
Filed bug 425426 to fix the checkin comment.
Comment 16•17 years ago
|
||
verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008050621 Firefox/3.0pre and the testcase from markus
--> Verified fixed
Status: RESOLVED → VERIFIED
Keywords: testcase
You need to log in
before you can comment on or make changes to this bug.
Description
•