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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return static_cast<SVGMatrix>(copy); 104 return static_cast<SVGMatrix>(copy);
105 } 105 }
106 106
107 SVGMatrix inverse(ExceptionCode& ec) const 107 SVGMatrix inverse(ExceptionCode& ec) const
108 { 108 {
109 AffineTransform transform = AffineTransform::inverse(); 109 AffineTransform transform = AffineTransform::inverse();
110 if (!isInvertible()) { 110 if (!isInvertible()) {
111 // FIXME: This used to have a more specific error message: 111 // FIXME: This used to have a more specific error message:
112 // "An attempt was made to invert a matrix that is not invertible." 112 // "An attempt was made to invert a matrix that is not invertible."
113 // When switching to SVG2 style exceptions we lost this information. 113 // When switching to SVG2 style exceptions we lost this information.
114 ec = INVALID_STATE_ERR; 114 ec = InvalidStateError;
115 } 115 }
116 116
117 return transform; 117 return transform;
118 } 118 }
119 119
120 SVGMatrix rotateFromVector(double x, double y, ExceptionCode& ec) 120 SVGMatrix rotateFromVector(double x, double y, ExceptionCode& ec)
121 { 121 {
122 if (!x || !y) 122 if (!x || !y)
123 ec = INVALID_ACCESS_ERR; 123 ec = InvalidAccessError;
124 124
125 AffineTransform copy = *this; 125 AffineTransform copy = *this;
126 copy.rotateFromVector(x, y); 126 copy.rotateFromVector(x, y);
127 return static_cast<SVGMatrix>(copy); 127 return static_cast<SVGMatrix>(copy);
128 } 128 }
129 129
130 }; 130 };
131 131
132 } // namespace WebCore 132 } // namespace WebCore
133 133
134 #endif 134 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLocatable.cpp ('k') | Source/core/svg/properties/SVGTransformListPropertyTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698