Changeset 110129 in webkit
- Timestamp:
- Mar 7, 2012 6:50:39 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r110126 r110129 1 2012-03-07 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r110126. 4 http://trac.webkit.org/changeset/110126 5 https://bugs.webkit.org/show_bug.cgi?id=80558 6 7 compile failed on AppleMac (Requested by ukai on #webkit). 8 9 * css3/calc/margin-expected.txt: 10 * css3/calc/padding-expected.txt: 11 * css3/calc/simple-calcs-expected.txt: 12 1 13 2012-03-07 Mike Lawther <mikelawther@chromium.org> 2 14 -
trunk/LayoutTests/css3/calc/margin-expected.txt
r110126 r110129 19 19 PASS computedMarginRight("simple-bottom") is "0px" 20 20 PASS computedMarginBottom("simple-bottom") is "25px" 21 PASS computedMarginLeft("percent-all") is "25px" 22 PASS computedMarginTop("percent-all") is "25px" 23 PASS computedMarginRight("percent-all") is "25px" 24 PASS computedMarginBottom("percent-all") is "25px" 25 PASS computedMarginLeft("percent-left") is "25px" 21 FAIL computedMarginLeft("percent-all") should be 25px. Was 0px. 22 FAIL computedMarginTop("percent-all") should be 25px. Was 0px. 23 FAIL computedMarginRight("percent-all") should be 25px. Was 0px. 24 FAIL computedMarginBottom("percent-all") should be 25px. Was 0px. 25 FAIL computedMarginLeft("percent-left") should be 25px. Was 0px. 26 26 PASS computedMarginTop("percent-left") is "0px" 27 27 PASS computedMarginRight("percent-left") is "0px" … … 29 29 PASS computedMarginLeft("percent-right") is "0px" 30 30 PASS computedMarginTop("percent-right") is "0px" 31 PASS computedMarginRight("percent-right") is "25px" 31 FAIL computedMarginRight("percent-right") should be 25px. Was 0px. 32 32 PASS computedMarginBottom("percent-right") is "0px" 33 33 PASS computedMarginLeft("percent-top") is "0px" 34 PASS computedMarginTop("percent-top") is "25px" 34 FAIL computedMarginTop("percent-top") should be 25px. Was 0px. 35 35 PASS computedMarginRight("percent-top") is "0px" 36 36 PASS computedMarginBottom("percent-top") is "0px" … … 38 38 PASS computedMarginTop("percent-bottom") is "0px" 39 39 PASS computedMarginRight("percent-bottom") is "0px" 40 PASS computedMarginBottom("percent-bottom") is "25px" 40 FAIL computedMarginBottom("percent-bottom") should be 25px. Was 0px. 41 41 PASS successfullyParsed is true 42 42 -
trunk/LayoutTests/css3/calc/padding-expected.txt
r110126 r110129 9 9 This element should have a bottom padding of 25 pixels. => PASS 10 10 11 This element should have an overall padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS11 This element should have an overall padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong width, wrong height 12 12 13 This element should have a left padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS13 This element should have a left padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong width 14 14 15 This element should have a right padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS15 This element should have a right padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong width 16 16 17 This element should have a top padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS17 This element should have a top padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong height 18 18 19 This element should have a bottom padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS19 This element should have a bottom padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong height -
trunk/LayoutTests/css3/calc/simple-calcs-expected.txt
r110126 r110129 21 21 50px + 10px * 5 (operation order) => PASS 22 22 100%/2 (where 100% is 200px) => PASS 23 100% + -100px (where 100% is 200px) => PASS24 80% - 60px (where 100% is 200px) => PASS25 300px - 100% (where 100% is 200px) => PASS26 -100px + 100% (where 100% is 200px) => PASS23 100% + -100px (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256 24 80% - 60px (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256 25 300px - 100% (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256 26 -100px + 100% (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256 27 27 20% + 30% (where 100% is 200px) => PASS 28 28 80% - 30% (where 100% is 200px) => PASS -
trunk/Source/WebCore/ChangeLog
r110128 r110129 1 2012-03-07 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r110126. 4 http://trac.webkit.org/changeset/110126 5 https://bugs.webkit.org/show_bug.cgi?id=80558 6 7 compile failed on AppleMac (Requested by ukai on #webkit). 8 9 * WebCore.exp.in: 10 * css/CSSCalculationValue.cpp: 11 * css/CSSCalculationValue.h: 12 (WebCore): 13 (CSSCalcExpressionNode): 14 (CSSCalcValue): 15 * css/CSSPrimitiveValue.cpp: 16 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 17 * css/CSSStyleApplyProperty.cpp: 18 (WebCore::ApplyPropertyLength::applyValue): 19 * css/CSSStyleSelector.cpp: 20 (WebCore::CSSStyleSelector::collectMatchingRulesForList): 21 * css/CSSStyleSelector.h: 22 * platform/CalculationValue.cpp: 23 * platform/CalculationValue.h: 24 * platform/Length.cpp: 25 (WebCore::newLengthArray): 26 * platform/Length.h: 27 (WebCore::Length::operator*=): 28 (WebCore::Length::value): 29 (WebCore::Length::setValue): 30 (Length): 31 (WebCore::Length::calcValue): 32 (WebCore::Length::calcMinValue): 33 (WebCore::Length::calcFloatValue): 34 (WebCore::Length::isZero): 35 (WebCore::Length::isPositive): 36 (WebCore::Length::isNegative): 37 (WebCore::Length::isPercent): 38 (WebCore::Length::isSpecified): 39 1 40 2012-03-05 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 41 -
trunk/Source/WebCore/WebCore.exp.in
r110126 r110129 1423 1423 __ZNK7WebCore6Editor9canDeleteEv 1424 1424 __ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE 1425 __ZNK7WebCore6Length22decrementCalculatedRefEv1426 1425 __ZNK7WebCore6Region5rectsEv 1427 1426 __ZNK7WebCore6Widget14platformWidgetEv -
trunk/Source/WebCore/css/CSSCalculationValue.cpp
r110126 r110129 115 115 } 116 116 117 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom) const118 {119 switch (m_category) {120 case CalcNumber:121 return adoptPtr(new CalcExpressionNumber(m_value->getFloatValue()));122 case CalcLength:123 return adoptPtr(new CalcExpressionNumber(m_value->computeLength<float>(style, rootStyle, zoom)));124 case CalcPercent:125 case CalcPercentLength:126 return adoptPtr(new CalcExpressionLength(CSSStyleSelector::convertToFloatLength(m_value.get(), style, rootStyle, zoom)));127 // Only types that could be part of a Length expression can be converted128 // to a CalcExpressionNode. CalcPercentNumber makes no sense as a Length.129 case CalcPercentNumber:130 case CalcOther:131 ASSERT_NOT_REACHED();132 }133 return nullptr;134 }135 136 117 virtual double doubleValue() const 137 118 { … … 228 209 } 229 210 230 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom) const231 {232 OwnPtr<CalcExpressionNode> left(m_leftSide->toCalcValue(style, rootStyle, zoom));233 if (!left)234 return nullptr;235 OwnPtr<CalcExpressionNode> right(m_rightSide->toCalcValue(style, rootStyle, zoom));236 if (!right)237 return nullptr;238 return adoptPtr(new CalcExpressionBinaryOperation(left.release(), right.release(), m_operator));239 }240 241 211 virtual double doubleValue() const 242 212 { -
trunk/Source/WebCore/css/CSSCalculationValue.h
r110126 r110129 44 44 class CSSValueList; 45 45 class RenderStyle; 46 class Calc ulationValue;46 class CalcValue; 47 47 class CalcExpressionNode; 48 48 … … 59 59 public: 60 60 61 virtual ~CSSCalcExpressionNode() = 0; 61 virtual ~CSSCalcExpressionNode() = 0; 62 62 virtual bool isZero() const = 0; 63 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle* rootStyle, double zoom = 1.0) const = 0;64 63 virtual double doubleValue() const = 0; 65 64 virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const = 0; … … 82 81 public: 83 82 static PassRefPtr<CSSCalcValue> create(CSSParserString name, CSSParserValueList*, CalculationPermittedValueRange); 84 static PassRefPtr<CSSCalcValue> create(CalculationValue*);85 83 86 PassRefPtr<CalculationValue> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom = 1.0) const87 {88 return CalculationValue::create(m_expression->toCalcValue(style, rootStyle, zoom), m_nonNegative ? CalculationRangeNonNegative : CalculationRangeAll);89 }90 84 CalculationCategory category() const { return m_expression->category(); } 91 85 bool isInt() const { return m_expression->isInteger(); } -
trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
r110126 r110129 267 267 m_value.num = length.percent(); 268 268 break; 269 case Calculated:270 269 case Relative: 271 270 case Undefined: -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r110126 r110129 27 27 28 28 #include "CSSAspectRatioValue.h" 29 #include "CSSCalculationValue.h"30 29 #include "CSSCursorImageValue.h" 31 30 #include "CSSFlexValue.h" … … 391 390 } else if (primitiveValue->isPercentage()) 392 391 setValue(selector->style(), Length(primitiveValue->getDoubleValue(), Percent)); 393 else if (primitiveValue->isCalculatedPercentageWithLength())394 setValue(selector->style(), Length(primitiveValue->cssCalcValue()->toCalcValue(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom())));395 392 } 396 393 } -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r110126 r110129 31 31 #include "Attribute.h" 32 32 #include "CachedImage.h" 33 #include "CalculationValue.h"34 33 #include "ContentData.h" 35 34 #include "Counter.h" 36 35 #include "CounterContent.h" 37 36 #include "CSSBorderImage.h" 38 #include "CSSCalculationValue.h"39 37 #include "CSSCursorImageValue.h" 40 38 #include "CSSFontFaceRule.h" … … 2550 2548 } 2551 2549 2552 Length CSSStyleSelector::convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier)2550 static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1) 2553 2551 { 2554 2552 return convertToLength(primitiveValue, style, rootStyle, false, multiplier); 2555 2553 } 2556 2554 2557 Length CSSStyleSelector::convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier)2555 static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1) 2558 2556 { 2559 2557 return convertToLength(primitiveValue, style, rootStyle, true, multiplier); -
trunk/Source/WebCore/css/CSSStyleSelector.h
r110126 r110129 363 363 bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisitedLinkStyle; } 364 364 365 static Length convertToIntLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, double multiplier = 1);366 static Length convertToFloatLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, double multiplier = 1);367 368 365 private: 369 366 static RenderStyle* s_styleNotYetAvailable; -
trunk/Source/WebCore/platform/CalculationValue.cpp
r110126 r110129 32 32 #include "CalculationValue.h" 33 33 34 #include <limits>35 36 34 namespace WebCore { 37 35 38 float CalcExpressionBinaryOperation::evaluate(float maxValue) const39 {40 float left = m_leftSide->evaluate(maxValue);41 float right = m_rightSide->evaluate(maxValue);42 switch (m_operator) {43 case CalcAdd:44 return left + right;45 case CalcSubtract:46 return left - right;47 case CalcMultiply:48 return left * right;49 case CalcDivide:50 if (!right)51 return std::numeric_limits<float>::quiet_NaN();52 return left / right;53 }54 ASSERT_NOT_REACHED();55 return std::numeric_limits<float>::quiet_NaN();56 }57 58 PassRefPtr<CalculationValue> CalculationValue::create(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange range)59 {60 return adoptRef(new CalculationValue(value, range));61 }62 63 float CalculationValue::evaluate(float maxValue) const64 {65 float result = m_value->evaluate(maxValue);66 // FIXME calc https://webkit.org/b/80411 : result is NaN when there is a division67 // by zero which isn't found at parse time.68 if (isnan(result))69 return 0;70 return m_isNonNegative && result < 0 ? 0 : result;71 }72 73 36 } // namespace WebCore -
trunk/Source/WebCore/platform/CalculationValue.h
r110126 r110129 51 51 CalculationRangeNonNegative 52 52 }; 53 54 class CalcExpressionNode {55 public:56 virtual ~CalcExpressionNode()57 {58 }59 60 virtual float evaluate(float maxValue) const = 0;61 };62 63 class CalculationValue : public RefCounted<CalculationValue> {64 public:65 static PassRefPtr<CalculationValue> create(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange);66 float evaluate(float maxValue) const;67 68 private:69 CalculationValue(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange range)70 : m_value(value)71 , m_isNonNegative(range == CalculationRangeNonNegative)72 {73 }74 75 OwnPtr<CalcExpressionNode> m_value;76 bool m_isNonNegative;77 };78 79 class CalcExpressionNumber : public CalcExpressionNode {80 public:81 explicit CalcExpressionNumber(float value)82 : m_value(value)83 {84 }85 86 virtual float evaluate(float) const87 {88 return m_value;89 }90 91 private:92 float m_value;93 };94 95 class CalcExpressionLength : public CalcExpressionNode {96 public:97 explicit CalcExpressionLength(Length length)98 : m_length(length)99 {100 }101 102 virtual float evaluate(float maxValue) const103 {104 return m_length.calcFloatValue(maxValue);105 }106 107 private:108 Length m_length;109 };110 111 class CalcExpressionBinaryOperation : public CalcExpressionNode {112 public:113 CalcExpressionBinaryOperation(PassOwnPtr<CalcExpressionNode> leftSide, PassOwnPtr<CalcExpressionNode> rightSide, CalcOperator op)114 : m_leftSide(leftSide)115 , m_rightSide(rightSide)116 , m_operator(op)117 {118 }119 120 virtual float evaluate(float) const;121 122 private:123 OwnPtr<CalcExpressionNode> m_leftSide;124 OwnPtr<CalcExpressionNode> m_rightSide;125 CalcOperator m_operator;126 };127 53 128 54 } // namespace WebCore -
trunk/Source/WebCore/platform/Length.cpp
r110126 r110129 26 26 #include "Length.h" 27 27 28 #include "CalculationValue.h"29 28 #include "PlatformString.h" 30 29 #include <wtf/ASCIICType.h> … … 150 149 return r.release(); 151 150 } 152 153 class CalculationValueHandleMap {154 public:155 CalculationValueHandleMap()156 : m_index(1)157 {158 }159 160 int insert(PassRefPtr<CalculationValue> calcValue)161 {162 ASSERT(m_index);163 // FIXME calc(): https://bugs.webkit.org/show_bug.cgi?id=80489164 // This monotonically increasing handle generation scheme is potentially wasteful165 // of the handle space. Consider reusing empty handles.166 while (m_map.contains(m_index))167 m_index++;168 169 m_map.set(m_index, calcValue);170 171 return m_index;172 }173 174 void remove(int index)175 {176 ASSERT(m_map.contains(index));177 m_map.remove(index);178 }179 180 PassRefPtr<CalculationValue> get(int index)181 {182 ASSERT(m_map.contains(index));183 return m_map.get(index);184 }185 186 private:187 int m_index;188 HashMap<int, RefPtr<CalculationValue> > m_map;189 };190 191 static CalculationValueHandleMap& calcHandles()192 {193 DEFINE_STATIC_LOCAL(CalculationValueHandleMap, handleMap, ());194 return handleMap;195 }196 197 Length::Length(PassRefPtr<CalculationValue> calc)198 : m_quirk(false)199 , m_type(Calculated)200 , m_isFloat(false)201 {202 m_intValue = calcHandles().insert(calc);203 }204 205 PassRefPtr<CalculationValue> Length::calculationValue() const206 {207 ASSERT(isCalculated());208 return calcHandles().get(calculationHandle());209 }210 211 void Length::incrementCalculatedRef() const212 {213 ASSERT(isCalculated());214 calculationValue()->ref();215 }216 217 void Length::decrementCalculatedRef() const218 {219 ASSERT(isCalculated());220 RefPtr<CalculationValue> calcLength = calculationValue();221 if (calcLength->hasOneRef())222 calcHandles().remove(calculationHandle());223 calcLength->deref();224 }225 226 float Length::nonNanCalculatedValue(int maxValue) const227 {228 ASSERT(isCalculated());229 float result = calculationValue()->evaluate(maxValue);230 if (isnan(result))231 return 0;232 return result;233 }234 151 235 152 class SameSizeAsLength { -
trunk/Source/WebCore/platform/Length.h
r110126 r110129 27 27 #include <wtf/FastAllocBase.h> 28 28 #include <wtf/Forward.h> 29 #include <wtf/HashMap.h>30 29 #include <wtf/MathExtras.h> 31 30 #include <wtf/PassOwnArrayPtr.h> … … 36 35 const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int 37 36 38 enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, Calculated, Undefined }; 39 40 class CalculationValue; 41 37 enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, Undefined }; 38 42 39 struct Length { 43 40 WTF_MAKE_FAST_ALLOCATED; … … 69 66 } 70 67 71 explicit Length(PassRefPtr<CalculationValue>);72 73 Length(const Length& length)74 {75 initFromLength(length);76 }77 78 Length& operator=(const Length& length)79 {80 initFromLength(length);81 return *this;82 }83 84 ~Length()85 {86 if (isCalculated())87 decrementCalculatedRef();88 }89 90 68 bool operator==(const Length& o) const { return (m_type == o.m_type) && (m_quirk == o.m_quirk) && (isUndefined() || (getFloatValue() == o.getFloatValue())); } 91 69 bool operator!=(const Length& o) const { return !(*this == o); } 92 70 93 71 const Length& operator*=(float v) 94 { 95 if (isCalculated()) { 96 ASSERT_NOT_REACHED(); 97 return *this; 98 } 99 72 { 100 73 if (m_isFloat) 101 74 m_floatValue = static_cast<float>(m_floatValue * v); … … 108 81 int value() const 109 82 { 110 if (isCalculated()) {111 ASSERT_NOT_REACHED();112 return 0;113 }114 83 return getIntValue(); 115 84 } … … 120 89 return getFloatValue(); 121 90 } 122 123 PassRefPtr<CalculationValue> calculationValue() const;124 91 125 92 LengthType type() const { return static_cast<LengthType>(m_type); } … … 140 107 void setValue(int value) 141 108 { 142 if (isCalculated()) {143 ASSERT_NOT_REACHED();144 return;145 }146 109 setValue(Fixed, value); 147 110 } … … 159 122 } 160 123 124 // Note: May only be called for Fixed, Percent and Auto lengths. 125 // Other types will ASSERT in order to catch invalid length calculations. 161 126 int calcValue(int maxValue, bool roundPercentages = false) const 162 127 { … … 164 129 case Fixed: 165 130 case Percent: 166 case Calculated:167 131 return calcMinValue(maxValue, roundPercentages); 168 132 case Auto: … … 189 153 // Don't remove the extra cast to float. It is needed for rounding on 32-bit Intel machines that use the FPU stack. 190 154 return static_cast<int>(static_cast<float>(maxValue * percent() / 100.0f)); 191 case Calculated:192 return nonNanCalculatedValue(maxValue);193 155 case Auto: 194 156 return 0; … … 213 175 case Auto: 214 176 return static_cast<float>(maxValue); 215 case Calculated:216 return nonNanCalculatedValue(maxValue);217 177 case Relative: 218 178 case Intrinsic: … … 227 187 228 188 bool isUndefined() const { return type() == Undefined; } 229 230 // FIXME calc: https://bugs.webkit.org/show_bug.cgi?id=80357. A calculated Length231 // always contains a percentage, and without a maxValue passed to these functions232 // it's impossible to determine the sign or zero-ness. We assume all calc values233 // are positive and non-zero for now.234 189 bool isZero() const 235 190 { 236 191 ASSERT(!isUndefined()); 237 if (isCalculated())238 return false;239 240 192 return m_isFloat ? !m_floatValue : !m_intValue; 241 193 } 242 bool isPositive() const243 {244 if (isUndefined())245 return false;246 if (isCalculated())247 return true;248 249 return getFloatValue() > 0;250 }251 bool isNegative() const252 {253 if (isUndefined() || isCalculated())254 return false;255 256 return getFloatValue() < 0;257 }258 194 195 bool isPositive() const { return isUndefined() ? false : getFloatValue() > 0; } 196 bool isNegative() const { return isUndefined() ? false : getFloatValue() < 0; } 197 259 198 bool isAuto() const { return type() == Auto; } 260 199 bool isRelative() const { return type() == Relative; } 261 bool isPercent() const { return type() == Percent || type() == Calculated; }200 bool isPercent() const { return type() == Percent; } 262 201 bool isFixed() const { return type() == Fixed; } 263 202 bool isIntrinsicOrAuto() const { return type() == Auto || type() == MinIntrinsic || type() == Intrinsic; } 264 bool isSpecified() const { return type() == Fixed || type() == Percent || type() == Calculated; } 265 bool isCalculated() const { return type() == Calculated; } 203 bool isSpecified() const { return type() == Fixed || type() == Percent; } 266 204 267 205 Length blend(const Length& from, double progress) const … … 302 240 } 303 241 304 void initFromLength(const Length &length)305 {306 m_quirk = length.m_quirk;307 m_type = length.m_type;308 m_isFloat = length.m_isFloat;309 310 if (m_isFloat)311 m_floatValue = length.m_floatValue;312 else313 m_intValue = length.m_intValue;314 315 if (isCalculated())316 incrementCalculatedRef();317 }318 319 float nonNanCalculatedValue(int maxValue) const;320 int calculationHandle() const321 {322 ASSERT(isCalculated());323 return getIntValue();324 }325 void incrementCalculatedRef() const;326 void decrementCalculatedRef() const;327 328 242 union { 329 243 int m_intValue;
Note: See TracChangeset
for help on using the changeset viewer.