Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 183253003: Consistently use ExceptionState::throwTypeError(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 return; 572 return;
573 c->setCompositeOperation(op, blendMode); 573 c->setCompositeOperation(op, blendMode);
574 } 574 }
575 575
576 void CanvasRenderingContext2D::setCurrentTransform(PassRefPtr<SVGMatrixTearOff> passMatrixTearOff, ExceptionState& exceptionState) 576 void CanvasRenderingContext2D::setCurrentTransform(PassRefPtr<SVGMatrixTearOff> passMatrixTearOff, ExceptionState& exceptionState)
577 { 577 {
578 RefPtr<SVGMatrixTearOff> matrixTearOff = passMatrixTearOff; 578 RefPtr<SVGMatrixTearOff> matrixTearOff = passMatrixTearOff;
579 579
580 // FIXME: bindings should do null checking and throw: http://crbug.com/32151 8 580 // FIXME: bindings should do null checking and throw: http://crbug.com/32151 8
581 if (!matrixTearOff) { 581 if (!matrixTearOff) {
582 exceptionState.throwDOMException(TypeError, "currentTransform only accep ts a SVGMatrix."); 582 exceptionState.throwTypeError("currentTransform only accepts a SVGMatrix .");
583 return; 583 return;
584 } 584 }
585 585
586 const AffineTransform& transform = matrixTearOff->value(); 586 const AffineTransform& transform = matrixTearOff->value();
587 setTransform(transform.a(), transform.b(), transform.c(), transform.d(), tra nsform.e(), transform.f()); 587 setTransform(transform.a(), transform.b(), transform.c(), transform.d(), tra nsform.e(), transform.f());
588 } 588 }
589 589
590 void CanvasRenderingContext2D::scale(float sx, float sy) 590 void CanvasRenderingContext2D::scale(float sx, float sy)
591 { 591 {
592 GraphicsContext* c = drawingContext(); 592 GraphicsContext* c = drawingContext();
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 const int focusRingWidth = 5; 2444 const int focusRingWidth = 5;
2445 const int focusRingOutline = 0; 2445 const int focusRingOutline = 0;
2446 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); 2446 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
2447 2447
2448 c->restore(); 2448 c->restore();
2449 2449
2450 didDraw(dirtyRect); 2450 didDraw(dirtyRect);
2451 } 2451 }
2452 2452
2453 } // namespace WebCore 2453 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698