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

Side by Side Diff: sky/engine/core/css/CSSCalculationValue.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 return compareCSSValuePtr(m_value, static_cast<const CSSCalcPrimitiveVal ue&>(other).m_value); 265 return compareCSSValuePtr(m_value, static_cast<const CSSCalcPrimitiveVal ue&>(other).m_value);
266 } 266 }
267 267
268 virtual Type type() const override { return CssCalcPrimitiveValue; } 268 virtual Type type() const override { return CssCalcPrimitiveValue; }
269 virtual CSSPrimitiveValue::UnitType primitiveType() const override 269 virtual CSSPrimitiveValue::UnitType primitiveType() const override
270 { 270 {
271 return m_value->primitiveType(); 271 return m_value->primitiveType();
272 } 272 }
273 273
274
275 virtual void trace(Visitor* visitor)
276 {
277 visitor->trace(m_value);
278 CSSCalcExpressionNode::trace(visitor);
279 }
280
281 private: 274 private:
282 CSSCalcPrimitiveValue(PassRefPtr<CSSPrimitiveValue> value, bool isInteger) 275 CSSCalcPrimitiveValue(PassRefPtr<CSSPrimitiveValue> value, bool isInteger)
283 : CSSCalcExpressionNode(unitCategory(value->primitiveType()), isInteger) 276 : CSSCalcExpressionNode(unitCategory(value->primitiveType()), isInteger)
284 , m_value(value) 277 , m_value(value)
285 { 278 {
286 } 279 }
287 280
288 RefPtr<CSSPrimitiveValue> m_value; 281 RefPtr<CSSPrimitiveValue> m_value;
289 }; 282 };
290 283
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 return CSSPrimitiveValue::CSS_HZ; 524 return CSSPrimitiveValue::CSS_HZ;
532 case CalcPercentLength: 525 case CalcPercentLength:
533 case CalcPercentNumber: 526 case CalcPercentNumber:
534 case CalcOther: 527 case CalcOther:
535 return CSSPrimitiveValue::CSS_UNKNOWN; 528 return CSSPrimitiveValue::CSS_UNKNOWN;
536 } 529 }
537 ASSERT_NOT_REACHED(); 530 ASSERT_NOT_REACHED();
538 return CSSPrimitiveValue::CSS_UNKNOWN; 531 return CSSPrimitiveValue::CSS_UNKNOWN;
539 } 532 }
540 533
541 virtual void trace(Visitor* visitor)
542 {
543 visitor->trace(m_leftSide);
544 visitor->trace(m_rightSide);
545 CSSCalcExpressionNode::trace(visitor);
546 }
547
548 private: 534 private:
549 CSSCalcBinaryOperation(PassRefPtr<CSSCalcExpressionNode> leftSide, PassRefPt r<CSSCalcExpressionNode> rightSide, CalcOperator op, CalculationCategory categor y) 535 CSSCalcBinaryOperation(PassRefPtr<CSSCalcExpressionNode> leftSide, PassRefPt r<CSSCalcExpressionNode> rightSide, CalcOperator op, CalculationCategory categor y)
550 : CSSCalcExpressionNode(category, isIntegerResult(leftSide.get(), rightS ide.get(), op)) 536 : CSSCalcExpressionNode(category, isIntegerResult(leftSide.get(), rightS ide.get(), op))
551 , m_leftSide(leftSide) 537 , m_leftSide(leftSide)
552 , m_rightSide(rightSide) 538 , m_rightSide(rightSide)
553 , m_operator(op) 539 , m_operator(op)
554 { 540 {
555 } 541 }
556 542
557 static CSSCalcExpressionNode* getNumberSide(CSSCalcExpressionNode* leftSide, CSSCalcExpressionNode* rightSide) 543 static CSSCalcExpressionNode* getNumberSide(CSSCalcExpressionNode* leftSide, CSSCalcExpressionNode* rightSide)
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // FIXME calc (http://webkit.org/b/16662) Add parsing for min and max here 742 // FIXME calc (http://webkit.org/b/16662) Add parsing for min and max here
757 743
758 return expression ? adoptRef(new CSSCalcValue(expression, range)) : nullptr; 744 return expression ? adoptRef(new CSSCalcValue(expression, range)) : nullptr;
759 } 745 }
760 746
761 PassRefPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtr<CSSCalcExpressionNode> expression, ValueRange range) 747 PassRefPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtr<CSSCalcExpressionNode> expression, ValueRange range)
762 { 748 {
763 return adoptRef(new CSSCalcValue(expression, range)); 749 return adoptRef(new CSSCalcValue(expression, range));
764 } 750 }
765 751
766 void CSSCalcValue::traceAfterDispatch(Visitor* visitor)
767 {
768 visitor->trace(m_expression);
769 CSSValue::traceAfterDispatch(visitor);
770 }
771
772 } // namespace blink 752 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSCalculationValue.h ('k') | sky/engine/core/css/CSSComputedStyleDeclaration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698