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

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

Issue 345903005: calc expressions should support time, angle and frequency values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 CalcSubtract = '-', 52 CalcSubtract = '-',
53 CalcMultiply = '*', 53 CalcMultiply = '*',
54 CalcDivide = '/' 54 CalcDivide = '/'
55 }; 55 };
56 56
57 enum CalculationCategory { 57 enum CalculationCategory {
58 CalcNumber = 0, 58 CalcNumber = 0,
59 CalcLength, 59 CalcLength,
60 CalcPercent, 60 CalcPercent,
61 CalcPercentNumber, 61 CalcPercentNumber,
62 CalcPercentLength, 62 CalcPercentLength,
alancutter (OOO until 2018) 2014/07/02 05:56:10 Please add a comment stating that these first few
63 CalcAngle,
64 CalcTime,
65 CalcFrequency,
63 CalcOther 66 CalcOther
64 }; 67 };
65 68
66 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp ressionNode> { 69 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp ressionNode> {
67 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode); 70 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode);
68 public: 71 public:
69 enum Type { 72 enum Type {
70 CssCalcPrimitiveValue = 1, 73 CssCalcPrimitiveValue = 1,
71 CssCalcBinaryOperation 74 CssCalcBinaryOperation
72 }; 75 };
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; 143 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression;
141 const bool m_nonNegative; 144 const bool m_nonNegative;
142 }; 145 };
143 146
144 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); 147 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue());
145 148
146 } // namespace WebCore 149 } // namespace WebCore
147 150
148 151
149 #endif // CSSCalculationValue_h 152 #endif // CSSCalculationValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698