Note: There are a few cases of duplicates in user autocompletion which are being worked on.

GTK2 scrollbars pixel artifacts when scrolling near bottom

VERIFIED FIXED

Status

()

Core
Widget: Gtk
VERIFIED FIXED
12 years ago
5 years ago

People

(Reporter: Sam Allen, Assigned: roc)

Tracking

({fixed1.8, polish, regression})

Trunk
x86
Linux
fixed1.8, polish, regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
On GTK themes that have a dark border on the bottom part of the scrollbar thumb,
scrolling either with the mouse, arrow keys, or scroll wheel leaves artifacts on
the scrollbar. This only occurs on either short pages or the bottom of medium
size pages. The artifacts are one-pixel tall horizontal grey lines on the
scrollbar. This occurs with the Ubuntu Human theme, and Clearlooks, but not
Glider (because is has a bottom border that is the same color as the background
of the scrollbar). The scrollbar paints itself properly when you click outside
of the window or hover the mouse over the scrollbar.

This is a serious polish regression and needs to be fixed for the next major
release.

I am CC'ing roc@ocallahan.org because I think this problem might have surfaced
with the new scrollbar stuff that landed. (I haven't verified that this is the
case yet.)

Again, to reproduce:
0. Make sure you are using an affected theme (should have dark pixel border on
the bottom of the scroller).
1. Go to a short page that takes up maybe 2 vertical viewports.
2. Scroll to the bottom of the page, and then up in the bottom half.
3. Artifacts should appear.

Comment 1

12 years ago
I see this with suite gtk2 builds (with classic theme) back to at least 12/9/2004

Updated

12 years ago
Assignee: jag → blizzard
Component: XP Toolkit/Widgets → Widget: Gtk
QA Contact: jrgmorrison → gtk
I've been digging into this bug. It looks like a couple of themes (Ximian
Industrial, Misty, maybe others ... I don't have Bluecurve here) have a problem
where we call gtk_paint_slider requesting thumb height 404 and they paint a
thumb of height 405.

I see that blizzard added code here
http://lxr.mozilla.org/mozilla/source/gfx/src/gtk/gtk2drawing.c#741
to expand the clip rect. I think this is incorrect because it allows us to draw
outside the frame, and then that doesn't get cleaned up when we need to
invalidate the frame.

I'll try to fix this by instead decreasing the requested height.
Created attachment 187190 [details] [diff] [review]
fix

I think this is the right way to fix this. We allow the clip rect to increase.
We handle that the "right way" by including the increase to the thumb frame's
overflow area --- so layout knows that this extra area will be painted by the
frame. And we have to fix nsSliderFrame to use the thumb frame's overflow area
for invalidation. This fixes the bug without changing the scrollbar appearance.
The new GetWidgetOverflow method is also a nice general mechanism that could be
useful later in other situations.
Assignee: blizzard → roc
Status: NEW → ASSIGNED
Attachment #187190 - Flags: superreview?(blizzard)
Attachment #187190 - Flags: review?(bryner)
Attachment #187190 - Flags: review?(bryner) → review+
Comment on attachment 187190 [details] [diff] [review]
fix

Seems fine to me.
Attachment #187190 - Flags: superreview?(blizzard) → superreview+
I checked this in. I'll wait for a couple of days and then submit to the branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 6

12 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050901 Firefox/1.6a1
ID:2005090120

Haven't noticed this since the patch went in. I'd say it's ready for branch.
Status: RESOLVED → VERIFIED
Comment on attachment 187190 [details] [diff] [review]
fix

I want to land this on the branch. It fixes a signficant problem with visual
garbage in some common GTK2 themes.
Attachment #187190 - Flags: approval1.8b5?
Attachment #187190 - Flags: approval1.8b4?

Comment 8

12 years ago
Roc, what's the risk here and what kinds of regressions should we keep an eye
out for after this lands?
The risk is extremely low for non-GTK2 platforms. On GTK2 any bugs would likely
be confined to weird scrollbar behaviour.

Updated

12 years ago
Attachment #187190 - Flags: approval1.8b5?
Attachment #187190 - Flags: approval1.8b4?
Attachment #187190 - Flags: approval1.8b4+

Comment 10

12 years ago
time is short for beta so if this is gonna make the branch, it needs to land ASAP.
checked into branch.
Keywords: fixed1.8

Comment 12

5 years ago
The bug seems to have resurfaced as bug 828824.
You need to log in before you can comment on or make changes to this bug.