Changeset 282162 in webkit
- Timestamp:
- Sep 8, 2021 12:05:05 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 12 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/animations/calc-animation-test-expected.txt (added)
-
LayoutTests/animations/calc-animation-test.html (added)
-
LayoutTests/css3/calc/trig-functions-with-constants-expected.txt (added)
-
LayoutTests/css3/calc/trig-functions-with-constants.html (added)
-
LayoutTests/fast/css/calc-parsing-expected.txt (modified) (4 diffs)
-
LayoutTests/fast/css/calc-parsing.html (modified) (3 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSValueKeywords.in (modified) (1 diff)
-
Source/WebCore/css/calc/CSSCalcExpressionNodeParser.cpp (modified) (4 diffs)
-
Source/WebCore/css/calc/CSSCalcOperationNode.cpp (modified) (11 diffs)
-
Source/WebCore/css/calc/CSSCalcOperationNode.h (modified) (2 diffs)
-
Source/WebCore/css/calc/CSSCalcValue.cpp (modified) (2 diffs)
-
Source/WebCore/platform/calc/CalcExpressionOperation.cpp (modified) (2 diffs)
-
Source/WebCore/platform/calc/CalcOperator.cpp (modified) (1 diff)
-
Source/WebCore/platform/calc/CalcOperator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r282161 r282162 1 2021-09-08 Nikos Mouchtaris <nmouchtaris@apple.com> 2 3 Implement sin, cos, tan, e and pi for calc 4 https://bugs.webkit.org/show_bug.cgi?id=229507 5 6 Reviewed by Simon Fraser. 7 8 * fast/css/calc-parsing.html: 9 Added parsing tests for sin, cos, tan, e and pi. 10 11 * css3/calc/trig-functions-with-constants.html: Added. 12 Added additional tests for expected behavior of sin, cos, tan, e and pi. 13 14 * LayoutTests/animations/calc-animation-test.html: Added. 15 Added animation test for expanding width of box given a width defined using a calc expression 16 Involving sin and cos. 17 18 1 19 2021-09-08 Ayumi Kojima <ayumi_kojima@apple.com> 2 20 -
trunk/LayoutTests/fast/css/calc-parsing-expected.txt
r276262 r282162 53 53 PASS getComputedStyle(element).getPropertyValue('width') is "100px" 54 54 55 element.style["width"] = "calc(sin(90deg) * 100px)" 56 PASS 100 is 100 57 58 element.style["width"] = "calc(sin(45deg + 45deg ) * 100px)" 59 PASS 100 is 100 60 61 element.style["width"] = "calc(cos( 0 ) * 100px)" 62 PASS 100 is 100 63 64 element.style["width"] = "calc(cos( 30deg - 30deg ) * 100px)" 65 PASS 100 is 100 66 67 element.style["width"] = "calc(tan(45deg)*100px)" 68 PASS 100 is 100 69 70 element.style["width"] = "calc(tan(30deg + 15deg) * 100px)" 71 PASS 100 is 100 72 73 element.style["width"] = "calc(sin(pi/2) * 100px)" 74 PASS 100 is 100 75 76 element.style["width"] = "calc(cos(e - e) * 100px)" 77 PASS 100 is 100 78 55 79 element.style["width"] = "calc(100px, 200px)" 56 80 PASS element.style['width'] is "999px" … … 102 126 103 127 element.style["width"] = "clamp(1px,2px,2px,4px)" 128 PASS element.style['width'] is "999px" 129 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 130 131 element.style["width"] = "calc(sin(90px) * 100px)" 132 PASS element.style['width'] is "999px" 133 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 134 135 element.style["width"] = "calc(sin(30deg + 1.0471967rad, 0) * 100px)" 136 PASS element.style['width'] is "999px" 137 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 138 139 element.style["width"] = "calc(cos( 0 ,) * 100px)" 140 PASS element.style['width'] is "999px" 141 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 142 143 element.style["width"] = "calc(cos( () 30deg - 0.523599rad ) * 100px)" 144 PASS element.style['width'] is "999px" 145 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 146 147 element.style["width"] = "calc(tan(45deg ) ) * 100px)" 148 PASS element.style['width'] is "999px" 149 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 150 151 element.style["width"] = "calc(tan(30deg, + 0.261799rad) * 100px)" 152 PASS element.style['width'] is "999px" 153 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 154 155 element.style["width"] = "calc(sin(piiii/4) * 100px)" 156 PASS element.style['width'] is "999px" 157 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 158 159 element.style["width"] = "calc(sin(e e/4) * 100px)" 160 PASS element.style['width'] is "999px" 161 PASS getComputedStyle(element).getPropertyValue('width') is "999px" 162 163 element.style["width"] = "calc(sin() * 100px)" 104 164 PASS element.style['width'] is "999px" 105 165 PASS getComputedStyle(element).getPropertyValue('width') is "999px" … … 153 213 PASS getComputedStyle(element).getPropertyValue('min-width') is "clamp(100px, 0%, 1%)" 154 214 215 element.style["min-width"] = "calc(sin(90deg) * 100px)" 216 PASS 100 is 100 217 218 element.style["min-width"] = "calc(sin(45deg + 45deg ) * 100px)" 219 PASS 100 is 100 220 221 element.style["min-width"] = "calc(cos( 0 ) * 100px)" 222 PASS 100 is 100 223 224 element.style["min-width"] = "calc(cos( 30deg - 30deg ) * 100px)" 225 PASS 100 is 100 226 227 element.style["min-width"] = "calc(tan(45deg)*100px)" 228 PASS 100 is 100 229 230 element.style["min-width"] = "calc(tan(30deg + 15deg) * 100px)" 231 PASS 100 is 100 232 233 element.style["min-width"] = "calc(sin(pi/2) * 100px)" 234 PASS 100 is 100 235 236 element.style["min-width"] = "calc(cos(e - e) * 100px)" 237 PASS 100 is 100 238 155 239 element.style["min-width"] = "calc(100px, 200px)" 156 240 PASS element.style['min-width'] is "999px" … … 204 288 PASS element.style['min-width'] is "999px" 205 289 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 290 291 element.style["min-width"] = "calc(sin(90px) * 100px)" 292 PASS element.style['min-width'] is "999px" 293 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 294 295 element.style["min-width"] = "calc(sin(30deg + 1.0471967rad, 0) * 100px)" 296 PASS element.style['min-width'] is "999px" 297 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 298 299 element.style["min-width"] = "calc(cos( 0 ,) * 100px)" 300 PASS element.style['min-width'] is "999px" 301 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 302 303 element.style["min-width"] = "calc(cos( () 30deg - 0.523599rad ) * 100px)" 304 PASS element.style['min-width'] is "999px" 305 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 306 307 element.style["min-width"] = "calc(tan(45deg ) ) * 100px)" 308 PASS element.style['min-width'] is "999px" 309 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 310 311 element.style["min-width"] = "calc(tan(30deg, + 0.261799rad) * 100px)" 312 PASS element.style['min-width'] is "999px" 313 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 314 315 element.style["min-width"] = "calc(sin(piiii/4) * 100px)" 316 PASS element.style['min-width'] is "999px" 317 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 318 319 element.style["min-width"] = "calc(sin(e e/4) * 100px)" 320 PASS element.style['min-width'] is "999px" 321 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 322 323 element.style["min-width"] = "calc(sin() * 100px)" 324 PASS element.style['min-width'] is "999px" 325 PASS getComputedStyle(element).getPropertyValue('min-width') is "999px" 206 326 PASS successfullyParsed is true 207 327 -
trunk/LayoutTests/fast/css/calc-parsing.html
r276262 r282162 20 20 shouldBeEqualToString(`getComputedStyle(element).getPropertyValue('${propertyName}')`, `${computedValue}`); 21 21 } 22 23 function testValue(expression, computedValue) 24 { 25 debug(''); 26 element.style[propertyName] = '999px'; 27 evalAndLog(`element.style["${propertyName}"] = "${expression}"`); 28 var value = Math.round(getComputedStyle(element).getPropertyValue(propertyName).slice(0,-2)); 29 shouldBe(`${value}`, computedValue); 30 } 22 31 23 32 // Valid expressions. … … 34 43 testExpression('max(100px,0%)', 'max(100px, 0%)', propertyName == 'width' ? '100px' : "max(100px, 0%)"); 35 44 testExpression('clamp(100px,0%,1%)', 'clamp(100px, 0%, 1%)', propertyName == 'width' ? '100px' : "clamp(100px, 0%, 1%)"); 45 testValue('calc(sin(90deg) * 100px)', '100'); 46 testValue('calc(sin(45deg + 45deg ) * 100px)', '100'); 47 testValue('calc(cos( 0 ) * 100px)', '100'); 48 testValue('calc(cos( 30deg - 30deg ) * 100px)', '100'); 49 testValue('calc(tan(45deg)*100px)', '100'); 50 testValue('calc(tan(30deg + 15deg) * 100px)', '100'); 51 testValue('calc(sin(pi/2) * 100px)', '100'); 52 testValue('calc(cos(e - e) * 100px)', '100'); 36 53 37 54 // Non-parsing expressions. … … 49 66 testExpression('clamp((),,300px)', '999px', '999px'); 50 67 testExpression('clamp(1px,2px,2px,4px)', '999px', '999px'); 68 testExpression('calc(sin(90px) * 100px)', '999px', '999px'); 69 testExpression('calc(sin(30deg + 1.0471967rad, 0) * 100px)', '999px', '999px'); 70 testExpression('calc(cos( 0 ,) * 100px)', '999px', '999px'); 71 testExpression('calc(cos( () 30deg - 0.523599rad ) * 100px)', '999px', '999px'); 72 testExpression('calc(tan(45deg ) ) * 100px)', '999px', '999px'); 73 testExpression('calc(tan(30deg, + 0.261799rad) * 100px)', '999px', '999px'); 74 testExpression('calc(sin(piiii/4) * 100px)', '999px', '999px'); 75 testExpression('calc(sin(e e/4) * 100px)', '999px', '999px'); 76 testExpression('calc(sin() * 100px)', '999px', '999px'); 51 77 } 52 78 -
trunk/Source/WebCore/ChangeLog
r282160 r282162 1 2021-09-08 Nikos Mouchtaris <nmouchtaris@apple.com> 2 3 Implement sin, cos, tan, e and pi for calc 4 https://bugs.webkit.org/show_bug.cgi?id=229507 5 6 Reviewed by Simon Fraser. 7 8 Tests: css3/calc/simple-trig-functions.html 9 css3/calc/trig-functions-with-constants.html 10 11 Add support for sin, cos, and tan functions within calc. Also add e and pi 12 constant values within calc. 13 14 * css/CSSValueKeywords.in: 15 Add sin,cos,e and pi keywords. 16 17 * css/calc/CSSCalcExpressionNodeParser.cpp: 18 (WebCore::getConstantTable): 19 Add helper function with table mapping e and pi keywords to their 20 approximate numerical value. 21 22 (WebCore::CSSCalcExpressionNodeParser::parseCalcFunction): 23 Add handling for creation of sin,cos,tan operation nodes. 24 25 (WebCore::CSSCalcExpressionNodeParser::parseValue): 26 Add handling for creation of primitive css value when constant is parsed. 27 28 * css/calc/CSSCalcOperationNode.cpp: 29 (WebCore::determineCategory): 30 Add sin,cos,tan to switch statement. 31 32 (WebCore::functionFromOperator): 33 Add sin,cos,tan to switch statement. 34 35 (WebCore::CSSCalcOperationNode::createTrig): 36 Add function for creation of sin,cos,tan operation node. 37 38 (WebCore::CSSCalcOperationNode::combineChildren): 39 Add handling for performing sin,cos,tan function on child node. 40 41 (WebCore::CSSCalcOperationNode::simplifyNode): 42 Add handling for sin,cos,tan. 43 44 (WebCore::CSSCalcOperationNode::primitiveType const): 45 Remove assert that is no longer correct. Trig functions take can take an 46 angle and return a number, so it is no longer the case that all children 47 of a node producing a number must be numbers themself. 48 49 (WebCore::CSSCalcOperationNode::doubleValue const): 50 Convert chilren nodes that are angles to radians. 51 52 (WebCore::functionPrefixForOperator): 53 Add handling for sin,cos,tan. 54 55 (WebCore::CSSCalcOperationNode::evaluateOperator): 56 Add functionality for sin,cos,tan functions. 57 58 * css/calc/CSSCalcOperationNode.h: 59 * css/calc/CSSCalcValue.cpp: 60 (WebCore::createCSS): 61 Add handling for creation of sin,cos,tan operation nodes. 62 63 (WebCore::CSSCalcValue::isCalcFunction): 64 Add handling for sin,cos,tan. 65 66 * platform/calc/CalcExpressionOperation.cpp: 67 (WebCore::CalcExpressionOperation::evaluate const): 68 Add functionality for sin,cos,tan function. 69 70 * platform/calc/CalcOperator.cpp: 71 (WebCore::operator<<): 72 Add handling for sin,cos,tan. 73 74 * platform/calc/CalcOperator.h: 75 1 76 2021-09-08 Kimmo Kinnunen <kkinnunen@apple.com> 2 77 -
trunk/Source/WebCore/css/CSSValueKeywords.in
r282143 r282162 1352 1352 max 1353 1353 clamp 1354 sin 1355 cos 1356 e 1357 pi 1354 1358 1355 1359 from-image -
trunk/Source/WebCore/css/calc/CSSCalcExpressionNodeParser.cpp
r279358 r282162 96 96 }; 97 97 98 static const CSSCalcSymbolTable getConstantTable() 99 { 100 return { { CSSValuePi, CSSUnitType::CSS_NUMBER, piDouble }, { CSSValueE, CSSUnitType::CSS_NUMBER, std::exp(1.0) } }; 101 } 102 98 103 static ParseState checkDepthAndIndex(int depth, CSSParserTokenRange tokens) 99 104 { … … 125 130 maxArgumentCount = 3; 126 131 break; 132 case CSSValueSin: 133 case CSSValueCos: 134 case CSSValueTan: 127 135 case CSSValueCalc: 128 136 maxArgumentCount = 1; … … 167 175 result = CSSCalcOperationNode::createMinOrMaxOrClamp(CalcOperator::Clamp, WTFMove(nodes), m_destinationCategory); 168 176 break; 177 case CSSValueSin: 178 result = CSSCalcOperationNode::createTrig(CalcOperator::Sin, WTFMove(nodes)); 179 break; 180 case CSSValueCos: 181 result = CSSCalcOperationNode::createTrig(CalcOperator::Cos, WTFMove(nodes)); 182 break; 183 case CSSValueTan: 184 result = CSSCalcOperationNode::createTrig(CalcOperator::Tan, WTFMove(nodes)); 185 break; 169 186 case CSSValueWebkitCalc: 170 187 case CSSValueCalc: … … 194 211 case IdentToken: { 195 212 auto value = m_symbolTable.get(token.id()); 213 value = value ? value : getConstantTable().get(token.id()); 196 214 if (!value) 197 215 return false; -
trunk/Source/WebCore/css/calc/CSSCalcOperationNode.cpp
r278283 r282162 73 73 return CalculationCategory::Other; 74 74 return leftCategory; 75 case CalcOperator::Sin: 76 case CalcOperator::Cos: 77 case CalcOperator::Tan: 75 78 case CalcOperator::Min: 76 79 case CalcOperator::Max: … … 141 144 break; 142 145 } 143 146 case CalcOperator::Sin: 147 case CalcOperator::Cos: 148 case CalcOperator::Tan: 144 149 case CalcOperator::Min: 145 150 case CalcOperator::Max: … … 256 261 case CalcOperator::Clamp: 257 262 return CSSValueClamp; 263 case CalcOperator::Sin: 264 return CSSValueSin; 265 case CalcOperator::Cos: 266 return CSSValueCos; 267 case CalcOperator::Tan: 268 return CSSValueTan; 258 269 } 259 270 return CSSValueCalc; … … 342 353 } 343 354 355 RefPtr<CSSCalcOperationNode> CSSCalcOperationNode::createTrig(CalcOperator op, Vector<Ref<CSSCalcExpressionNode>>&& values) 356 { 357 if (values.size() != 1) 358 return nullptr; 359 360 auto childCategory = values[0]->category(); 361 if (childCategory != CalculationCategory::Number && childCategory != CalculationCategory::Angle) { 362 LOG_WITH_STREAM(Calc, stream << "Failed to create trig node because unable to determine category from " << prettyPrintNodes(values)); 363 return nullptr; 364 } 365 366 return adoptRef(new CSSCalcOperationNode(CalculationCategory::Number, op, WTFMove(values))); 367 } 368 344 369 void CSSCalcOperationNode::hoistChildrenWithOperator(CalcOperator op) 345 370 { … … 406 431 void CSSCalcOperationNode::combineChildren() 407 432 { 408 if (m_children.size() < 2) 433 if (m_children.size() < 2) { 434 if (m_children.size() == 1 && isTrigNode()) { 435 double resolvedValue = doubleValue(m_children[0]->primitiveType()); 436 auto newChild = CSSCalcPrimitiveValueNode::create(CSSPrimitiveValue::create(resolvedValue, CSSUnitType::CSS_NUMBER)); 437 438 m_children.clear(); 439 m_children.append(WTFMove(newChild)); 440 } 409 441 return; 410 442 } 443 411 444 if (shouldSortChildren()) { 412 445 // <https://drafts.csswg.org/css-values-4/#sort-a-calculations-children> … … 596 629 if (is<CSSCalcOperationNode>(rootNode)) { 597 630 auto& calcOperationNode = downcast<CSSCalcOperationNode>(rootNode.get()); 598 // Don't simplify at the root, otherwise we lose track of the operation for serialization.599 if (calcOperationNode.children().size() == 1 && depth )631 // Simplify operations with only one child node (other than root and operations that only need one node). 632 if (calcOperationNode.children().size() == 1 && depth && !calcOperationNode.isTrigNode()) 600 633 return WTFMove(calcOperationNode.children()[0]); 601 634 … … 612 645 if (calcOperationNode.isMinOrMaxNode()) 613 646 calcOperationNode.combineChildren(); 614 647 648 if (calcOperationNode.isTrigNode()) 649 calcOperationNode.combineChildren(); 650 615 651 // If only one child remains, return the child (except at the root). 616 652 auto shouldCombineParentWithOnlyChild = [](const CSSCalcOperationNode& parent, int depth) … … 677 713 switch (unitCategory) { 678 714 case CalculationCategory::Number: 679 #if ASSERT_ENABLED680 for (auto& child : m_children)681 ASSERT(child->category() == CalculationCategory::Number);682 #endif683 715 return CSSUnitType::CSS_NUMBER; 684 685 716 case CalculationCategory::Percent: { 686 717 if (m_children.isEmpty()) … … 749 780 if (allowNumbers && unitType != CSSUnitType::CSS_NUMBER && child->primitiveType() == CSSUnitType::CSS_NUMBER) 750 781 childType = CSSUnitType::CSS_NUMBER; 782 if (isTrigNode() && unitType != CSSUnitType::CSS_NUMBER) 783 childType = CSSUnitType::CSS_RAD; 751 784 return child->doubleValue(childType); 752 785 })); … … 801 834 ASSERT_NOT_REACHED(); 802 835 return ""; 836 case CalcOperator::Sin: return "sin("; 837 case CalcOperator::Cos: return "cos("; 838 case CalcOperator::Tan: return "tan("; 803 839 case CalcOperator::Min: return "min("; 804 840 case CalcOperator::Max: return "max("; … … 1005 1041 return std::max(min, std::min(value, max)); 1006 1042 } 1043 case CalcOperator::Sin: { 1044 if (children.size() != 1) 1045 return std::numeric_limits<double>::quiet_NaN(); 1046 return std::sin(children[0]); 1047 } 1048 case CalcOperator::Cos: { 1049 if (children.size() != 1) 1050 return std::numeric_limits<double>::quiet_NaN(); 1051 return std::cos(children[0]); 1052 } 1053 case CalcOperator::Tan: { 1054 if (children.size() != 1) 1055 return std::numeric_limits<double>::quiet_NaN(); 1056 return std::tan(children[0]); 1057 } 1007 1058 } 1008 1059 ASSERT_NOT_REACHED(); -
trunk/Source/WebCore/css/calc/CSSCalcOperationNode.h
r278283 r282162 38 38 static RefPtr<CSSCalcOperationNode> createProduct(Vector<Ref<CSSCalcExpressionNode>>&& values); 39 39 static RefPtr<CSSCalcOperationNode> createMinOrMaxOrClamp(CalcOperator, Vector<Ref<CSSCalcExpressionNode>>&& values, CalculationCategory destinationCategory); 40 static RefPtr<CSSCalcOperationNode> createTrig(CalcOperator, Vector<Ref<CSSCalcExpressionNode>>&& values); 40 41 41 42 static Ref<CSSCalcExpressionNode> simplify(Ref<CSSCalcExpressionNode>&&); … … 47 48 bool isCalcProductNode() const { return m_operator == CalcOperator::Multiply; } 48 49 bool isMinOrMaxNode() const { return m_operator == CalcOperator::Min || m_operator == CalcOperator::Max; } 50 bool isTrigNode() const { return m_operator == CalcOperator::Sin || m_operator == CalcOperator::Cos || m_operator == CalcOperator::Tan; } 49 51 bool shouldSortChildren() const { return isCalcSumNode() || isCalcProductNode(); } 50 52 -
trunk/Source/WebCore/css/calc/CSSCalcValue.cpp
r278698 r282162 165 165 return CSSCalcOperationNode::createProduct(createCSS(operationChildren, style)); 166 166 } 167 case CalcOperator::Cos: 168 case CalcOperator::Tan: 169 case CalcOperator::Sin: { 170 auto children = createCSS(operationChildren, style); 171 if (children.size() != 1) 172 return nullptr; 173 return CSSCalcOperationNode::createTrig(op, WTFMove(children)); 174 } 167 175 case CalcOperator::Min: 168 176 case CalcOperator::Max: … … 284 292 case CSSValueMax: 285 293 case CSSValueClamp: 294 case CSSValueSin: 295 case CSSValueCos: 296 case CSSValueTan: 286 297 return true; 287 298 default: -
trunk/Source/WebCore/platform/calc/CalcExpressionOperation.cpp
r278246 r282162 27 27 #include "CalcExpressionOperation.h" 28 28 29 #include <cmath> 29 30 #include <wtf/text/TextStream.h> 30 31 … … 87 88 return std::max(min, std::min(value, max)); 88 89 } 90 case CalcOperator::Sin: { 91 if (m_children.size() != 1) 92 return std::numeric_limits<double>::quiet_NaN(); 93 return std::sin(m_children[0]->evaluate(maxValue)); 94 } 95 case CalcOperator::Cos: { 96 if (m_children.size() != 1) 97 return std::numeric_limits<double>::quiet_NaN(); 98 return std::cos(m_children[0]->evaluate(maxValue)); 99 } 100 case CalcOperator::Tan: { 101 if (m_children.size() != 1) 102 return std::numeric_limits<double>::quiet_NaN(); 103 return std::tan(m_children[0]->evaluate(maxValue)); 104 } 89 105 } 90 106 ASSERT_NOT_REACHED(); -
trunk/Source/WebCore/platform/calc/CalcOperator.cpp
r278246 r282162 41 41 case CalcOperator::Max: ts << "max"; break; 42 42 case CalcOperator::Clamp: ts << "clamp"; break; 43 case CalcOperator::Sin: ts << "sin"; break; 44 case CalcOperator::Cos: ts << "cos"; break; 45 case CalcOperator::Tan: ts << "tan"; break; 43 46 } 44 47 return ts; -
trunk/Source/WebCore/platform/calc/CalcOperator.h
r278246 r282162 39 39 Max, 40 40 Clamp, 41 Sin, 42 Cos, 43 Tan, 41 44 }; 42 45
Note: See TracChangeset
for help on using the changeset viewer.