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

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

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 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/CSSBorderImageSliceValue.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 virtual ~CSSCalcExpressionNode() = 0; 66 virtual ~CSSCalcExpressionNode() = 0;
67 virtual bool isZero() const = 0; 67 virtual bool isZero() const = 0;
68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle * rootStyle, double zoom = 1.0) const = 0; 68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle * rootStyle, double zoom = 1.0) const = 0;
69 virtual double doubleValue() const = 0; 69 virtual double doubleValue() const = 0;
70 virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootS tyle, double multiplier = 1.0, bool computingFontSize = false) const = 0; 70 virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootS tyle, double multiplier = 1.0, bool computingFontSize = false) const = 0;
71 virtual String customCssText() const = 0; 71 virtual String customCssText() const = 0;
72 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin g>&) const = 0; 72 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin g>&) const = 0;
73 virtual bool hasVariableReference() const = 0; 73 virtual bool hasVariableReference() const = 0;
74 virtual bool equals(const CSSCalcExpressionNode& other) const { return m_cat egory == other.m_category && m_isInteger == other.m_isInteger; } 74 virtual bool equals(const CSSCalcExpressionNode& other) const { return m_cat egory == other.m_category && m_isInteger == other.m_isInteger; }
75 virtual void reportMemoryUsage(MemoryObjectInfo*) const = 0;
76 virtual Type type() const = 0; 75 virtual Type type() const = 0;
77 76
78 CalculationCategory category() const { return m_category; } 77 CalculationCategory category() const { return m_category; }
79 bool isInteger() const { return m_isInteger; } 78 bool isInteger() const { return m_isInteger; }
80 79
81 protected: 80 protected:
82 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) 81 CSSCalcExpressionNode(CalculationCategory category, bool isInteger)
83 : m_category(category) 82 : m_category(category)
84 , m_isInteger(isInteger) 83 , m_isInteger(isInteger)
85 { 84 {
(...skipping 16 matching lines...) Expand all
102 bool isInt() const { return m_expression->isInteger(); } 101 bool isInt() const { return m_expression->isInteger(); }
103 double doubleValue() const; 102 double doubleValue() const;
104 bool isNegative() const { return m_expression->doubleValue() < 0; } 103 bool isNegative() const { return m_expression->doubleValue() < 0; }
105 double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, do uble multiplier = 1.0, bool computingFontSize = false) const; 104 double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, do uble multiplier = 1.0, bool computingFontSize = false) const;
106 105
107 String customCssText() const; 106 String customCssText() const;
108 bool equals(const CSSCalcValue&) const; 107 bool equals(const CSSCalcValue&) const;
109 String customSerializeResolvingVariables(const HashMap<AtomicString, String> &) const; 108 String customSerializeResolvingVariables(const HashMap<AtomicString, String> &) const;
110 bool hasVariableReference() const; 109 bool hasVariableReference() const;
111 110
112 void reportDescendantMemoryUsage(MemoryObjectInfo*) const;
113
114 private: 111 private:
115 CSSCalcValue(PassRefPtr<CSSCalcExpressionNode> expression, CalculationPermit tedValueRange range) 112 CSSCalcValue(PassRefPtr<CSSCalcExpressionNode> expression, CalculationPermit tedValueRange range)
116 : CSSValue(CalculationClass) 113 : CSSValue(CalculationClass)
117 , m_expression(expression) 114 , m_expression(expression)
118 , m_nonNegative(range == CalculationRangeNonNegative) 115 , m_nonNegative(range == CalculationRangeNonNegative)
119 { 116 {
120 } 117 }
121 118
122 double clampToPermittedRange(double) const; 119 double clampToPermittedRange(double) const;
123 120
124 const RefPtr<CSSCalcExpressionNode> m_expression; 121 const RefPtr<CSSCalcExpressionNode> m_expression;
125 const bool m_nonNegative; 122 const bool m_nonNegative;
126 }; 123 };
127 124
128 } // namespace WebCore 125 } // namespace WebCore
129 126
130 #endif // CSSCalculationValue_h 127 #endif // CSSCalculationValue_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSBorderImageSliceValue.cpp ('k') | Source/core/css/CSSCalculationValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698