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

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

Issue 189543014: Ensure proper finalization of garbage-collected types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and sign error in Vector Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSBasicShapes.cpp ('k') | Source/core/css/CSSCalculationValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 enum CalculationCategory { 50 enum CalculationCategory {
51 CalcNumber = 0, 51 CalcNumber = 0,
52 CalcLength, 52 CalcLength,
53 CalcPercent, 53 CalcPercent,
54 CalcPercentNumber, 54 CalcPercentNumber,
55 CalcPercentLength, 55 CalcPercentLength,
56 CalcOther 56 CalcOther
57 }; 57 };
58 58
59 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp ressionNode> { 59 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp ressionNode> {
60 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode);
60 public: 61 public:
61 enum Type { 62 enum Type {
62 CssCalcPrimitiveValue = 1, 63 CssCalcPrimitiveValue = 1,
63 CssCalcBinaryOperation 64 CssCalcBinaryOperation
64 }; 65 };
65 66
66 virtual ~CSSCalcExpressionNode() = 0;
67 virtual bool isZero() const = 0; 67 virtual bool isZero() const = 0;
68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversi onData&) const = 0; 68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversi onData&) const = 0;
69 virtual double doubleValue() const = 0; 69 virtual double doubleValue() const = 0;
70 virtual double computeLengthPx(const CSSToLengthConversionData&) const = 0; 70 virtual double computeLengthPx(const CSSToLengthConversionData&) const = 0;
71 virtual String customCSSText() const = 0; 71 virtual String customCSSText() const = 0;
72 virtual bool equals(const CSSCalcExpressionNode& other) const { return m_cat egory == other.m_category && m_isInteger == other.m_isInteger; } 72 virtual bool equals(const CSSCalcExpressionNode& other) const { return m_cat egory == other.m_category && m_isInteger == other.m_isInteger; }
73 virtual Type type() const = 0; 73 virtual Type type() const = 0;
74 74
75 CalculationCategory category() const { return m_category; } 75 CalculationCategory category() const { return m_category; }
76 virtual CSSPrimitiveValue::UnitTypes primitiveType() const = 0; 76 virtual CSSPrimitiveValue::UnitTypes primitiveType() const = 0;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; 136 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression;
137 const bool m_nonNegative; 137 const bool m_nonNegative;
138 }; 138 };
139 139
140 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); 140 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue());
141 141
142 } // namespace WebCore 142 } // namespace WebCore
143 143
144 144
145 #endif // CSSCalculationValue_h 145 #endif // CSSCalculationValue_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSBasicShapes.cpp ('k') | Source/core/css/CSSCalculationValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698