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/css/CSSCanvasValue.cpp

Issue 181823002: Have Document::getCSSCanvasElement() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | Source/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCanvasValue.cpp
diff --git a/Source/core/css/CSSCanvasValue.cpp b/Source/core/css/CSSCanvasValue.cpp
index 20c8d1dc1058b9319336785f414848babbc431ea..1514eaceb2c04880d0c2938a951faecdc97e2491 100644
--- a/Source/core/css/CSSCanvasValue.cpp
+++ b/Source/core/css/CSSCanvasValue.cpp
@@ -77,9 +77,7 @@ IntSize CSSCanvasValue::fixedSize(const RenderObject* renderer)
HTMLCanvasElement* CSSCanvasValue::element(Document* document)
{
if (!m_element) {
- m_element = document->getCSSCanvasElement(m_name);
- if (!m_element)
- return 0;
+ m_element = &document->getCSSCanvasElement(m_name);
m_element->addObserver(&m_canvasObserver);
}
return m_element;
« no previous file with comments | « no previous file | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698