Index: Source/core/html/HTMLCanvasElement.h |
diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h |
index a3796d8eb2fba4532621c3c96da695f6092550b4..5d5557b30e8354aaf48faf226aee6ad35a4e6f05 100644 |
--- a/Source/core/html/HTMLCanvasElement.h |
+++ b/Source/core/html/HTMLCanvasElement.h |
@@ -177,6 +177,12 @@ private: |
mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platforms that have to copy the image buffer to render (and for CSSCanvasValue). |
}; |
+inline HTMLCanvasElement* toHTMLCanvasElement(Node* node) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::canvasTag)); |
+ return static_cast<HTMLCanvasElement*>(node); |
+} |
+ |
} //namespace |
#endif |