OLD | NEW |
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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 return; | 670 return; |
671 realizeSaves(); | 671 realizeSaves(); |
672 modifiableState().m_globalComposite = op; | 672 modifiableState().m_globalComposite = op; |
673 modifiableState().m_globalBlend = blendMode; | 673 modifiableState().m_globalBlend = blendMode; |
674 GraphicsContext* c = drawingContext(); | 674 GraphicsContext* c = drawingContext(); |
675 if (!c) | 675 if (!c) |
676 return; | 676 return; |
677 c->setCompositeOperation(op, blendMode); | 677 c->setCompositeOperation(op, blendMode); |
678 } | 678 } |
679 | 679 |
680 void CanvasRenderingContext2D::setCurrentTransform(PassRefPtr<SVGMatrixTearOff>
passMatrixTearOff, ExceptionState& exceptionState) | 680 void CanvasRenderingContext2D::setCurrentTransform(PassRefPtr<SVGMatrixTearOff>
passMatrixTearOff) |
681 { | 681 { |
682 RefPtr<SVGMatrixTearOff> matrixTearOff = passMatrixTearOff; | 682 RefPtr<SVGMatrixTearOff> matrixTearOff = passMatrixTearOff; |
683 | |
684 // FIXME: bindings should do null checking and throw: http://crbug.com/32151
8 | |
685 if (!matrixTearOff) { | |
686 exceptionState.throwTypeError("currentTransform only accepts a SVGMatrix
."); | |
687 return; | |
688 } | |
689 | |
690 const AffineTransform& transform = matrixTearOff->value(); | 683 const AffineTransform& transform = matrixTearOff->value(); |
691 setTransform(transform.a(), transform.b(), transform.c(), transform.d(), tra
nsform.e(), transform.f()); | 684 setTransform(transform.a(), transform.b(), transform.c(), transform.d(), tra
nsform.e(), transform.f()); |
692 } | 685 } |
693 | 686 |
694 void CanvasRenderingContext2D::scale(float sx, float sy) | 687 void CanvasRenderingContext2D::scale(float sx, float sy) |
695 { | 688 { |
696 GraphicsContext* c = drawingContext(); | 689 GraphicsContext* c = drawingContext(); |
697 if (!c) | 690 if (!c) |
698 return; | 691 return; |
699 if (!state().m_invertibleCTM) | 692 if (!state().m_invertibleCTM) |
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2441 c->setAlphaAsFloat(1.0); | 2434 c->setAlphaAsFloat(1.0); |
2442 c->clearShadow(); | 2435 c->clearShadow(); |
2443 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); | 2436 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); |
2444 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2437 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
2445 c->restore(); | 2438 c->restore(); |
2446 | 2439 |
2447 didDraw(dirtyRect); | 2440 didDraw(dirtyRect); |
2448 } | 2441 } |
2449 | 2442 |
2450 } // namespace WebCore | 2443 } // namespace WebCore |
OLD | NEW |