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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 14972014: Remove an overloaded strokeRect in <canvas> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index a986d81fab5afedf2a0afc40540d2da38ef33423..f70bbb438d43c2abdfe1f5fd3e2a35a40994ec0b 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -1093,15 +1093,8 @@ void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float h
{
if (!validateRectForCanvas(x, y, width, height))
return;
- strokeRect(x, y, width, height, state().m_lineWidth);
-}
-
-void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height, float lineWidth)
-{
- if (!validateRectForCanvas(x, y, width, height))
- return;
- if (!(lineWidth >= 0))
+ if (!(state().m_lineWidth >= 0))
return;
GraphicsContext* c = drawingContext();
@@ -1118,9 +1111,9 @@ void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float h
FloatRect rect(x, y, width, height);
FloatRect boundingRect = rect;
- boundingRect.inflate(lineWidth / 2);
+ boundingRect.inflate(state().m_lineWidth / 2);
- c->strokeRect(rect, lineWidth);
+ c->strokeRect(rect, state().m_lineWidth);
didDraw(boundingRect);
}

Powered by Google App Engine
This is Rietveld 408576698