Eliminate <gripper> as an independent element

RESOLVED FIXED in mozilla1.9.1a2

Status

()

Core
Widget: Win32
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: Kai Liu, Assigned: Kai Liu)

Tracking

({dev-doc-complete})

Trunk
mozilla1.9.1a2
x86
Windows XP
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

11.64 KB, patch
vlad
: review+
dbaron
: review+
Neil Deakin (not available until Aug 9)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

9 years ago
Created attachment 331877 [details] [diff] [review]
patch

Currently, scrollbar thumbs are structured such that there is a <gripper> element (which draws the small set of decorative lines) residing within the <thumb>.  I would like to get rid of <gripper> and have the gripper be drawn as a part of <thumb> instead of as a separate independent element.  I can't really see a reason for it to exist as a separate element.

1) Mac scrollbars have no grippers, and on GTK, the native theme rendering draws the gripper as a part of the thumb, and the separate <gripper> element is unused.  Windows is the only place where the gripper is handled as a separate element.  I would like to see the three platforms be consistent here, and we can do that by getting rid of <gripper> as an independent element.

2) This will allow us to properly fix bug 424694, and it would've prevented bug 439274.

3) This will make the Windows behavior more native, where the thumb can shrink below a certain size and the grip will disappear--doing that before this would not have been very feasible.

4) If a third-party theme wants the ability to customize the gripper (how many themes even bother with doing that?), they can still do so with a background image applied to the thumb.

(Vlad, you can review toolkit changes, right?  You're listed as a toolkit peer...)
Attachment #331877 - Flags: superreview?(vladimir)
Attachment #331877 - Flags: review?(vladimir)
(Assignee)

Updated

9 years ago
Attachment #331877 - Flags: review?(dbaron)
Comment on attachment 331877 [details] [diff] [review]
patch

This looks fine to me, so r=dbaron.

But I think you should get Neil Deakin, or some other XUL owner/peer, to review this as well.
Attachment #331877 - Flags: review?(dbaron) → review+
Comment on attachment 331877 [details] [diff] [review]
patch

Looks fine to me as well, but I think you need a XUL sr since you're removing a XUL element..
Attachment #331877 - Flags: superreview?(vladimir)
Attachment #331877 - Flags: review?(vladimir)
Attachment #331877 - Flags: review+
(Assignee)

Comment 3

9 years ago
Comment on attachment 331877 [details] [diff] [review]
patch

Ah, my apologies; I am not familiar with who is in charge of what.
Attachment #331877 - Flags: review?(enndeakin)
Comment on attachment 331877 [details] [diff] [review]
patch

Looks OK
Attachment #331877 - Flags: review?(enndeakin) → review+
(Assignee)

Comment 5

9 years ago
I need to remember to document this in the things-affecting-theme-developers page for 3.1 if/when this lands.
Keywords: checkin-needed, dev-doc-needed

Comment 6

9 years ago
(In reply to comment #0)
>4) If a third-party theme wants the ability to customize the gripper (how many
>themes even bother with doing that?), they can still do so with a background
>image applied to the thumb.
Since this was only implemented to support native theming, third-party themes would probably already be using a background image applied to the thumb.

(From update of attachment 331877 [details] [diff] [review])
>+  <binding id="thumb" extends="xul:button" />
Why the extra space before the /> ?
http://hg.mozilla.org/index.cgi/mozilla-central/rev/888b724a1b90
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
(Assignee)

Comment 8

9 years ago
Sorry; I haven't been around the past few weeks, so I'm just doing some catch-up right now...

(In reply to comment #6)
> Since this was only implemented to support native theming, third-party themes
> would probably already be using a background image applied to the thumb.
> 
That's a good point.  I haven't had a chance to do a complete survey of third-party themes, but after taking a random sampling, I noticed that the gripper is almost never used by third party theme authors.  The one theme that I sampled that did use the gripper did not use a textured thumb element and only used borders for the styling of the thumb.  I personally think that it's still a worthwhile tradeoff, but if people feel strongly otherwise, we could back this out.

> Why the extra space before the /> ?
> 
There is no particular reason for the space; I did not think to check what the prevalent style was with respect to a spaces before />, so mea culpa.  I do not have hg access, so if someone would like to do a spacing nit fix for this, that'd be great.
(Assignee)

Updated

9 years ago
Keywords: dev-doc-needed → dev-doc-complete
Depends on: 502292
You need to log in before you can comment on or make changes to this bug.