Chromium Code Reviews| Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| index 8fb31fa2206334a4892cae55288da7a9b2a5c53e..0029572dd0df60700871b2959863b61540ae44e9 100644 |
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| @@ -1648,6 +1648,7 @@ template<class T> void CanvasRenderingContext2D::fullCanvasCompositedStroke(cons |
| PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createLinearGradient(float x0, float y0, float x1, float y1, ExceptionState& exceptionState) |
| { |
| + // FIXME: These exceptions will be thrown by generated bindings code once crbug.com/354298 is fixed. |
|
Justin Novosad
2014/04/25 14:44:29
Shouldn't we keep these comments until we are read
fs
2014/04/25 15:50:15
Yes? "Full" (==actual) support for 'unrestricted'
|
| if (!std::isfinite(x0)) |
| exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(x0, "x0")); |
| else if (!std::isfinite(y0)) |
| @@ -1666,6 +1667,8 @@ PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createLinearGradient(float |
| PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionState& exceptionState) |
| { |
| + // FIXME: These exceptions (except the IndexSizeError) will be thrown by |
| + // generated bindings code once crbug.com/354298 is fixed. |
| if (!std::isfinite(x0)) |
| exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(x0, "x0")); |
| else if (!std::isfinite(y0)) |
| @@ -1797,6 +1800,8 @@ PassRefPtrWillBeRawPtr<ImageData> CanvasRenderingContext2D::createImageData(floa |
| { |
| if (!sw || !sh) |
| exceptionState.throwDOMException(IndexSizeError, String::format("The source %s is 0.", sw ? "height" : "width")); |
| + // FIXME: These exceptions will be thrown by generated bindings code once |
| + // crbug.com/354298 is fixed. |
| else if (!std::isfinite(sw)) |
| exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(sw, "source width")); |
| else if (!std::isfinite(sh)) |
| @@ -1824,6 +1829,8 @@ PassRefPtrWillBeRawPtr<ImageData> CanvasRenderingContext2D::getImageData(float s |
| exceptionState.throwSecurityError("The canvas has been tainted by cross-origin data."); |
| else if (!sw || !sh) |
| exceptionState.throwDOMException(IndexSizeError, String::format("The source %s is 0.", sw ? "height" : "width")); |
| + // FIXME: These exceptions will be thrown by generated bindings code once |
| + // crbug.com/354298 is fixed. |
| else if (!std::isfinite(sx)) |
| exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(sx, "source X")); |
| else if (!std::isfinite(sy)) |
| @@ -1873,6 +1880,8 @@ void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, |
| void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, float dirtyX, float dirtyY, |
| float dirtyWidth, float dirtyHeight, ExceptionState& exceptionState) |
| { |
| + // FIXME: These exceptions will be thrown by generated bindings code once |
| + // crbug.com/354298 is fixed. |
| if (!std::isfinite(dx)) |
| exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(dx, "dx")); |
| else if (!std::isfinite(dy)) |