Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 327703005: The position of opaque black rect is incorrect when alpha is false. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: v/g/f/c/alpha.html needs rebaseline as well Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/canvas/alpha.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCanvasElement.cpp
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 5780844c5bb9ea8df58e85c1974398f2bbe6a2e1..24e3d37f9a7633739c322c328f8b529cccc0d10e 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -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())
« no previous file with comments | « LayoutTests/fast/canvas/alpha.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698