Purge PassRefPtr from CanvasRenderingContext2D.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Feb 2015 17:52:17 +0000 (17:52 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Feb 2015 17:52:17 +0000 (17:52 +0000)
commit4dfb28514a797d279c0bd6b2fc4ae0707966873d
tree6adcda1087e3aa63aaa6ea1295121e2e5ba0af68
parent8bef794d2d5cf9b6726340b71c6aa8f83304bc2e
Purge PassRefPtr from CanvasRenderingContext2D.
<https://webkit.org/b/141749>

Reviewed by Gyuyoung Kim.

Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.

* html/TextMetrics.h:
(WebCore::TextMetrics::create): Changed create() helper to return Ref.

* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.

(WebCore::CanvasRenderingContext2D::createLinearGradient):
(WebCore::CanvasRenderingContext2D::createRadialGradient):
(WebCore::CanvasRenderingContext2D::createPattern):
(WebCore::createEmptyImageData):
(WebCore::CanvasRenderingContext2D::createImageData):
(WebCore::CanvasRenderingContext2D::getImageData):
(WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
and changed a PassRefPtr argument to RefPtr&&.

(WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/TextMetrics.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h