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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 commitChange(); 68 commitChange();
69 } 69 }
70 70
71 void SVGAngleTearOff::newValueSpecifiedUnits(unsigned short unitType, float valu eInSpecifiedUnits, ExceptionState& exceptionState) 71 void SVGAngleTearOff::newValueSpecifiedUnits(unsigned short unitType, float valu eInSpecifiedUnits, ExceptionState& exceptionState)
72 { 72 {
73 if (isImmutable()) { 73 if (isImmutable()) {
74 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib ute is read-only."); 74 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib ute is read-only.");
75 return; 75 return;
76 } 76 }
77 77
78 if (unitType == SVGAngle::SVG_ANGLETYPE_UNKNOWN || unitType > SVGAngle::SVG_ ANGLETYPE_GRAD) { 78 if (unitType == SVGAngle::kSvgAngletypeUnknown || unitType > SVGAngle::kSvgA ngletypeGrad) {
79 exceptionState.throwDOMException(NotSupportedError, "Cannot set value wi th unknown or invalid units (" + String::number(unitType) + ")."); 79 exceptionState.throwDOMException(NotSupportedError, "Cannot set value wi th unknown or invalid units (" + String::number(unitType) + ").");
80 return; 80 return;
81 } 81 }
82 82
83 target()->newValueSpecifiedUnits(static_cast<SVGAngle::SVGAngleType>(unitTyp e), valueInSpecifiedUnits); 83 target()->newValueSpecifiedUnits(static_cast<SVGAngle::SVGAngleType>(unitTyp e), valueInSpecifiedUnits);
84 commitChange(); 84 commitChange();
85 } 85 }
86 86
87 void SVGAngleTearOff::convertToSpecifiedUnits(unsigned short unitType, Exception State& exceptionState) 87 void SVGAngleTearOff::convertToSpecifiedUnits(unsigned short unitType, Exception State& exceptionState)
88 { 88 {
89 if (isImmutable()) { 89 if (isImmutable()) {
90 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib ute is read-only."); 90 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib ute is read-only.");
91 return; 91 return;
92 } 92 }
93 93
94 if (unitType == SVGAngle::SVG_ANGLETYPE_UNKNOWN || unitType > SVGAngle::SVG_ ANGLETYPE_GRAD) { 94 if (unitType == SVGAngle::kSvgAngletypeUnknown || unitType > SVGAngle::kSvgA ngletypeGrad) {
95 exceptionState.throwDOMException(NotSupportedError, "Cannot convert to u nknown or invalid units (" + String::number(unitType) + ")."); 95 exceptionState.throwDOMException(NotSupportedError, "Cannot convert to u nknown or invalid units (" + String::number(unitType) + ").");
96 return; 96 return;
97 } 97 }
98 98
99 if (target()->unitType() == SVGAngle::SVG_ANGLETYPE_UNKNOWN) { 99 if (target()->unitType() == SVGAngle::kSvgAngletypeUnknown) {
100 exceptionState.throwDOMException(NotSupportedError, "Cannot convert from unknown or invalid units."); 100 exceptionState.throwDOMException(NotSupportedError, "Cannot convert from unknown or invalid units.");
101 return; 101 return;
102 } 102 }
103 103
104 target()->convertToSpecifiedUnits(static_cast<SVGAngle::SVGAngleType>(unitTy pe)); 104 target()->convertToSpecifiedUnits(static_cast<SVGAngle::SVGAngleType>(unitTy pe));
105 commitChange(); 105 commitChange();
106 } 106 }
107 107
108 void SVGAngleTearOff::setValueAsString(const String& value, ExceptionState& exce ptionState) 108 void SVGAngleTearOff::setValueAsString(const String& value, ExceptionState& exce ptionState)
109 { 109 {
(...skipping 17 matching lines...) Expand all
127 127
128 commitChange(); 128 commitChange();
129 } 129 }
130 130
131 DEFINE_TRACE_WRAPPERS(SVGAngleTearOff) 131 DEFINE_TRACE_WRAPPERS(SVGAngleTearOff)
132 { 132 {
133 visitor->traceWrappers(contextElement()); 133 visitor->traceWrappers(contextElement());
134 } 134 }
135 135
136 } // namespace blink 136 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698