OLD | NEW |
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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 case Calculated: | 756 case Calculated: |
757 return createExpressionNode(length.calculationValue()->expression(), zoo
m); | 757 return createExpressionNode(length.calculationValue()->expression(), zoo
m); |
758 case Auto: | 758 case Auto: |
759 case Intrinsic: | 759 case Intrinsic: |
760 case MinIntrinsic: | 760 case MinIntrinsic: |
761 case MinContent: | 761 case MinContent: |
762 case MaxContent: | 762 case MaxContent: |
763 case FillAvailable: | 763 case FillAvailable: |
764 case FitContent: | 764 case FitContent: |
765 case ExtendToZoom: | 765 case ExtendToZoom: |
766 case Relative: | |
767 case Undefined: | 766 case Undefined: |
768 ASSERT_NOT_REACHED(); | 767 ASSERT_NOT_REACHED(); |
769 return 0; | 768 return 0; |
770 } | 769 } |
771 ASSERT_NOT_REACHED(); | 770 ASSERT_NOT_REACHED(); |
772 return 0; | 771 return 0; |
773 } | 772 } |
774 | 773 |
775 PassRefPtr<CSSCalcValue> CSSCalcValue::create(CSSParserString name, CSSParserVal
ueList* parserValueList, ValueRange range) | 774 PassRefPtr<CSSCalcValue> CSSCalcValue::create(CSSParserString name, CSSParserVal
ueList* parserValueList, ValueRange range) |
776 { | 775 { |
777 CSSCalcExpressionNodeParser parser; | 776 CSSCalcExpressionNodeParser parser; |
778 RefPtr<CSSCalcExpressionNode> expression; | 777 RefPtr<CSSCalcExpressionNode> expression; |
779 | 778 |
780 if (equalIgnoringCase(name, "calc(") || equalIgnoringCase(name, "-webkit-cal
c(")) | 779 if (equalIgnoringCase(name, "calc(") || equalIgnoringCase(name, "-webkit-cal
c(")) |
781 expression = parser.parseCalc(parserValueList); | 780 expression = parser.parseCalc(parserValueList); |
782 // FIXME calc (http://webkit.org/b/16662) Add parsing for min and max here | 781 // FIXME calc (http://webkit.org/b/16662) Add parsing for min and max here |
783 | 782 |
784 return expression ? adoptRef(new CSSCalcValue(expression, range)) : 0; | 783 return expression ? adoptRef(new CSSCalcValue(expression, range)) : 0; |
785 } | 784 } |
786 | 785 |
787 PassRefPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtr<CSSCalcExpressionNode>
expression, ValueRange range) | 786 PassRefPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtr<CSSCalcExpressionNode>
expression, ValueRange range) |
788 { | 787 { |
789 return adoptRef(new CSSCalcValue(expression, range)); | 788 return adoptRef(new CSSCalcValue(expression, range)); |
790 } | 789 } |
791 | 790 |
792 } // namespace WebCore | 791 } // namespace WebCore |
OLD | NEW |