Bug 50547 - Custom scrollbars do not support transparency
Summary: Custom scrollbars do not support transparency
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Hajime Morrita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-05 22:52 PST by Adam M-W
Modified: 2012-03-01 18:40 PST (History)
4 users (show)

See Also:


Attachments
Example (223 bytes, text/html)
2010-12-05 22:52 PST, Adam M-W
no flags Details
Patch (6.77 KB, patch)
2012-03-01 00:44 PST, Hajime Morrita
no flags Details | Formatted Diff | Diff
Patch (8.91 KB, patch)
2012-03-01 02:46 PST, Hajime Morrita
jamesr: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam M-W 2010-12-05 22:52:07 PST
Created attachment 75645 [details]
Example

When specifying a custom scrollbar and setting the background to transparent, graphical glitches occur as the page is not rendered behind the scrollbar and hence is either black or whatever was there in the last graphical update.

Could transparent mean either: 
1) match the background color of the root (html) element
or 
2) (preferred) have an option to overlay the scrollbars onto the content (e.g. the width of the page is not reduced by the scrollbar, and therefore transparent will result in the page showing through)
Comment 1 Hajime Morrita 2012-03-01 00:44:50 PST
Created attachment 129655 [details]
Patch
Comment 2 Hajime Morrita 2012-03-01 02:46:13 PST
Created attachment 129673 [details]
Patch
Comment 3 Hajime Morrita 2012-03-01 02:51:41 PST
Hi James, could you take a look? 
Painting with base color might be less than the best. 
But showing glitches is obviously worse.
Comment 4 James Robinson 2012-03-01 13:24:46 PST
Comment on attachment 129673 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=129673&action=review

This is only for the root scrollbars, right? Subframe scrollbars should be fine.

I think background color is the right choice here.

> LayoutTests/fast/frames/transparent-scrollbar.html:31
> +            window.layoutTestController.display();

i think this would be better as a dumpAsText(true) test to retain the pixel output but suppress the render tree. the render tree isn't helpful
Comment 5 Hajime Morrita 2012-03-01 18:07:19 PST
Hi James, thanks for taking a look!

(In reply to comment #4)
> (From update of attachment 129673 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=129673&action=review
> 
> This is only for the root scrollbars, right? Subframe scrollbars should be fine.

Yes. Subframes has a background which is its parent frame.

> 
> I think background color is the right choice here.
> 
> > LayoutTests/fast/frames/transparent-scrollbar.html:31
> > +            window.layoutTestController.display();
> 
> i think this would be better as a dumpAsText(true) test to retain the pixel output but suppress the render tree. the render tree isn't helpful

Right. I'll fix this before landing.
Comment 6 Hajime Morrita 2012-03-01 18:40:02 PST
Committed r109483: <http://trac.webkit.org/changeset/109483>