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

Side by Side Diff: Source/core/svg/SVGMatrix.h

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGLocatable.cpp ('k') | Source/core/svg/SVGPaint.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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return static_cast<SVGMatrix>(copy); 103 return static_cast<SVGMatrix>(copy);
104 } 104 }
105 105
106 SVGMatrix inverse(ExceptionState& es) const 106 SVGMatrix inverse(ExceptionState& es) const
107 { 107 {
108 AffineTransform transform = AffineTransform::inverse(); 108 AffineTransform transform = AffineTransform::inverse();
109 if (!isInvertible()) { 109 if (!isInvertible()) {
110 // FIXME: This used to have a more specific error message: 110 // FIXME: This used to have a more specific error message:
111 // "An attempt was made to invert a matrix that is not invertible." 111 // "An attempt was made to invert a matrix that is not invertible."
112 // When switching to SVG2 style exceptions we lost this information. 112 // When switching to SVG2 style exceptions we lost this information.
113 es.throwDOMException(InvalidStateError); 113 es.throwUninformativeAndGenericDOMException(InvalidStateError);
114 } 114 }
115 115
116 return transform; 116 return transform;
117 } 117 }
118 118
119 SVGMatrix rotateFromVector(double x, double y, ExceptionState& es) 119 SVGMatrix rotateFromVector(double x, double y, ExceptionState& es)
120 { 120 {
121 if (!x || !y) 121 if (!x || !y)
122 es.throwDOMException(InvalidAccessError); 122 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
123 123
124 AffineTransform copy = *this; 124 AffineTransform copy = *this;
125 copy.rotateFromVector(x, y); 125 copy.rotateFromVector(x, y);
126 return static_cast<SVGMatrix>(copy); 126 return static_cast<SVGMatrix>(copy);
127 } 127 }
128 128
129 }; 129 };
130 130
131 } // namespace WebCore 131 } // namespace WebCore
132 132
133 #endif 133 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLocatable.cpp ('k') | Source/core/svg/SVGPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698