The position of opaque black rect is incorrect when alpha is false.

It should be drawn using the layout rect instead of the canvas size rect.

BUG=382884

Review URL: https://codereview.chromium.org/327703005

git-svn-id: svn://svn.chromium.org/blink/trunk@176024 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6f1daa3d
......@@ -1086,3 +1086,6 @@ crbug.com/308768 http/tests/xmlhttprequest/xmlhttprequest-data-url.html [ Skip ]
crbug.com/308768 inspector/network/network-status-non-http.html [ Skip ]
crbug.com/381102 inspector/sources/debugger/debugger-step-into-custom-element-callbacks.html [ Skip ]
crbug.com/382884 fast/canvas/alpha.html [ NeedsRebaseline ]
crbug.com/382884 virtual/gpu/fast/canvas/alpha.html [ NeedsRebaseline ]
......@@ -2,6 +2,15 @@
<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
#canvas3 {
width : 100px;
height : 100px;
border : 1px solid green;
}
</style>
</head>
<body>
<canvas id="canvas1" width="8" height="8"></canvas>
......
......@@ -322,7 +322,7 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const LayoutRect& r)
} else {
// When alpha is false, we should draw to opaque black.
if (m_context && !m_context->hasAlpha())
context->fillRect(FloatRect(0, 0, width(), height()), Color(0, 0, 0));
context->fillRect(FloatRect(r), Color(0, 0, 0));
}
if (is3D())
......
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