Use nullptr in HTMLCanvasElement

https://bugs.webkit.org/show_bug.cgi?id=127388

Reviewed by Gyuyoung Kim.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::drawingContext):
(WebCore::HTMLCanvasElement::existingDrawingContext):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 31ea78fd
2014-01-21 Jae Hyun Park <jae.park@company100.net>
Use nullptr in HTMLCanvasElement
https://bugs.webkit.org/show_bug.cgi?id=127388
Reviewed by Gyuyoung Kim.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::drawingContext):
(WebCore::HTMLCanvasElement::existingDrawingContext):
2014-01-21 László Langó <llango.u-szeged@partner.samsung.com>
Assertion failure in Range::nodeWillBeRemoved
......@@ -224,7 +224,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas
if (is3dType(type)) {
if (m_context && !m_context->is3d())
return 0;
return nullptr;
if (!m_context) {
Page* page = document().page();
if (page && !document().url().isLocalFile()) {
......@@ -625,13 +625,13 @@ void HTMLCanvasElement::createImageBuffer() const
GraphicsContext* HTMLCanvasElement::drawingContext() const
{
return buffer() ? m_imageBuffer->context() : 0;
return buffer() ? m_imageBuffer->context() : nullptr;
}
GraphicsContext* HTMLCanvasElement::existingDrawingContext() const
{
if (!m_hasCreatedImageBuffer)
return 0;
return nullptr;
return drawingContext();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment