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

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

Issue 237063002: Add StrictTypeChecking to CRC2D.{drawFocusIfNeeded,drawCustomFocusRing} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 a0807a878501ba7dbf78ad80b7d9f2cee8a31d97..15416fab4e632f86bd4bd37840c2bc16ebc767fa 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -2368,11 +2368,12 @@ bool CanvasRenderingContext2D::drawCustomFocusRing(Element* element)
bool CanvasRenderingContext2D::focusRingCallIsValid(const Path& path, Element* element)
{
+ ASSERT(element);
if (!state().m_invertibleCTM)
return false;
if (path.isEmpty())
return false;
- if (!element || !element->isDescendantOf(canvas()))
+ if (!element->isDescendantOf(canvas()))
return false;
return true;

Powered by Google App Engine
This is Rietveld 408576698