Commit a74aad02 authored by bdakin@apple.com's avatar bdakin@apple.com

https://bugs.webkit.org/show_bug.cgi?id=60421

Custom scrollbars nested inside an overlay scrollbar overflow region end up 
painting twice
-and corresponding-
<rdar://problem/9389072>

Reviewed by Darin Adler.

Source/WebCore: 

Be sure not to paint custom css scrollbars during the special overlay-scrollbar 
painting pass.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):

LayoutTests: 

* platform/mac/scrollbars/scrollbars-on-positioned-content-expected.png: Added.
* platform/mac/scrollbars/scrollbars-on-positioned-content-expected.txt: Added.
* scrollbars/scrollbars-on-positioned-content.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 090c78dd
2011-05-06 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=60421
Custom scrollbars nested inside an overlay scrollbar overflow region end up
painting twice
-and corresponding-
<rdar://problem/9389072>
* platform/mac/scrollbars/scrollbars-on-positioned-content-expected.png: Added.
* platform/mac/scrollbars/scrollbars-on-positioned-content-expected.txt: Added.
* scrollbars/scrollbars-on-positioned-content.html: Added.
2011-05-06 Abhishek Arya <inferno@chromium.org>
Unreviewed.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x576
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 657x18
text run at (0,0) width 657: "This test passes if the custom scrollbar paints in the corrext spot, which is at the bottom of the purple div."
layer at (8,50) size 304x550 clip at (9,51) size 287x533 scrollWidth 302 scrollHeight 1311
RenderBlock (positioned) {DIV} at (8,50) size 304x550 [border: (1px solid #FF0000)]
RenderBlock {DIV} at (1,412) size 15x900 [bgcolor=#008000]
layer at (9,51) size 302x411 backgroundClip at (9,51) size 287x411 clip at (10,52) size 286x400 outlineClip at (9,51) size 287x533 scrollWidth 500
RenderBlock {DIV} at (1,1) size 302x411 [border: (1px solid #0000FF)]
RenderBlock {DIV} at (1,1) size 500x400 [bgcolor=#800080]
<html>
<head>
<style type="text/css">
.tables
{
border: 1px solid red;
overflow-y: auto;
top: 50px;
bottom: 0px;
position: absolute;
}
.wrapper
{
border: 1px solid blue;
overflow-x: auto;
width: 300px;
}
.wrapper::-webkit-scrollbar
{
height: 9px;
}
.wrapper::-webkit-scrollbar-track
{
background-color: #E3E3E3;
}
.wrapper::-webkit-scrollbar-thumb
{
background: #CCCCCC;
border: 1px solid #ADADAD;
}
</style>
</head>
<body>
<p>This test passes if the custom scrollbar paints in the corrext spot, which is at the bottom of the purple div.</p>
<div class="tables">
<div class="wrapper">
<div style="background-color:purple; width:500px; height:400px;"></div>
</div>
<div style="background-color:green; width:15px; height:900px;"></div>
</div>
</body>
</html>
2011-05-06 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=60421
Custom scrollbars nested inside an overlay scrollbar overflow region end up
painting twice
-and corresponding-
<rdar://problem/9389072>
Be sure not to paint custom css scrollbars during the special overlay-scrollbar
painting pass.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
2011-05-06 Cary Clark <caryclark@google.com>
Reviewed by Eric Seidel.
......@@ -2251,6 +2251,10 @@ void RenderLayer::paintOverflowControls(GraphicsContext* context, int tx, int ty
return;
}
// This check is required to avoid painting custom CSS scrollbars twice.
if (paintingOverlayControls && !hasOverlayScrollbars())
return;
int offsetX = tx;
int offsetY = ty;
if (paintingOverlayControls) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment