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

Side by Side Diff: Source/core/css/CSSCalculationValue.cpp

Issue 603443002: Don't add '(' to FUNCTION token names (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@internalsetshadowunused
Patch Set: Created 6 years, 3 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 createExpressionNode(CSSPrimitiveValue::create(pixels, CSSPrimitiveValue ::CSS_PX), pixels == trunc(pixels)), 746 createExpressionNode(CSSPrimitiveValue::create(pixels, CSSPrimitiveValue ::CSS_PX), pixels == trunc(pixels)),
747 createExpressionNode(CSSPrimitiveValue::create(percent, CSSPrimitiveValu e::CSS_PERCENTAGE), percent == trunc(percent)), 747 createExpressionNode(CSSPrimitiveValue::create(percent, CSSPrimitiveValu e::CSS_PERCENTAGE), percent == trunc(percent)),
748 CalcAdd); 748 CalcAdd);
749 } 749 }
750 750
751 PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(CSSParserString name, CSSParserValueList* parserValueList, ValueRange range) 751 PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(CSSParserString name, CSSParserValueList* parserValueList, ValueRange range)
752 { 752 {
753 CSSCalcExpressionNodeParser parser; 753 CSSCalcExpressionNodeParser parser;
754 RefPtrWillBeRawPtr<CSSCalcExpressionNode> expression = nullptr; 754 RefPtrWillBeRawPtr<CSSCalcExpressionNode> expression = nullptr;
755 755
756 if (equalIgnoringCase(name, "calc(") || equalIgnoringCase(name, "-webkit-cal c(")) 756 if (equalIgnoringCase(name, "calc") || equalIgnoringCase(name, "-webkit-calc "))
757 expression = parser.parseCalc(parserValueList); 757 expression = parser.parseCalc(parserValueList);
758 // FIXME calc (http://webkit.org/b/16662) Add parsing for min and max here 758 // FIXME calc (http://webkit.org/b/16662) Add parsing for min and max here
759 759
760 return expression ? adoptRefWillBeNoop(new CSSCalcValue(expression, range)) : nullptr; 760 return expression ? adoptRefWillBeNoop(new CSSCalcValue(expression, range)) : nullptr;
761 } 761 }
762 762
763 PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtrWillBeRawPtr <CSSCalcExpressionNode> expression, ValueRange range) 763 PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtrWillBeRawPtr <CSSCalcExpressionNode> expression, ValueRange range)
764 { 764 {
765 return adoptRefWillBeNoop(new CSSCalcValue(expression, range)); 765 return adoptRefWillBeNoop(new CSSCalcValue(expression, range));
766 } 766 }
767 767
768 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) 768 void CSSCalcValue::traceAfterDispatch(Visitor* visitor)
769 { 769 {
770 visitor->trace(m_expression); 770 visitor->trace(m_expression);
771 CSSValue::traceAfterDispatch(visitor); 771 CSSValue::traceAfterDispatch(visitor);
772 } 772 }
773 773
774 } // namespace blink 774 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/css-parser/color3-expected.txt ('k') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698