Bug 50547

Summary: Custom scrollbars do not support transparency
Product: WebKit Reporter: Adam M-W <adman.com>
Component: Layout and RenderingAssignee: Hajime Morrita <morrita>
Status: RESOLVED FIXED    
Severity: Normal CC: jamesr, jamie, morrita, webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Example
none
Patch
none
Patch jamesr: review+

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>