Bug 43960

Summary: [Chromium] styled scroll bar on the window is painted badly
Product: WebKit Reporter: Hajime Morrita <morrita>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, hyatt
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch tkent: review+

Description Hajime Morrita 2010-08-13 02:28:29 PDT
Scrollbars for the outermost frme are painted badly  when it has incomplete CSS style.
Precicely, 
- if it has CSS style that doesn't have  background-* properties, then
- The scrollbars are NOT painted, that causes visual artifact (old paint result lasts there.)

Note that Safari doesn't suffer from this problem because it doesn't allow to customize the outermost scrollbars.

Originally from http://code.google.com/p/chromium/issues/detail?id=47946.
Comment 1 Hajime Morrita 2010-08-13 02:54:12 PDT
Created attachment 64317 [details]
Patch
Comment 2 Dimitri Glazkov (Google) 2010-08-13 09:33:18 PDT
Comment on attachment 64317 [details]
Patch

I am not sure if this is a good patch (not yet that knowledgeable about the mechanics here :), but here are a few nits:

WebCore/ChangeLog:15
 +          (WebCore::RenderObject::hasBackground):
Please use this template to outline the changes you made. For instance: "Moved most of this logic to blah".

WebCore/rendering/RenderScrollbar.cpp:144
 +  void RenderScrollbar::adjustStyle(RenderStyle* style) const
Why a separate method for this? It's only being used in one place and it's short enough to inline, I think?

WebCore/rendering/RenderScrollbar.cpp:149
 +      // causes visual artifact like non-repainted durty region.
"painted" and "dirty".
Comment 3 Hajime Morrita 2010-08-15 22:05:12 PDT
Created attachment 64464 [details]
Patch
Comment 4 Hajime Morrita 2010-08-15 22:06:41 PDT
Hi Dimitri, thank you for reviewing!
I updated the patch.

> WebCore/ChangeLog:15
>  +          (WebCore::RenderObject::hasBackground):
> Please use this template to outline the changes you made. For instance: "Moved most of this logic to blah".
OK, added some explanation. Thank you for pointing this out.

> 
> WebCore/rendering/RenderScrollbar.cpp:144
>  +  void RenderScrollbar::adjustStyle(RenderStyle* style) const
> Why a separate method for this? It's only being used in one place and it's short enough to inline, I think?
> 
Agreed and inlined.

> WebCore/rendering/RenderScrollbar.cpp:149
>  +      // causes visual artifact like non-repainted durty region.
> "painted" and "dirty".
Oops. Fixed.
Comment 5 Kent Tamura 2010-08-26 00:43:12 PDT
Comment on attachment 64464 [details]
Patch

The patch looks reasonable.  I'll set r+ tomorrow if no one objects.
Comment 6 Hajime Morrita 2010-08-30 00:45:04 PDT
Committed r66372: <http://trac.webkit.org/changeset/66372>