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

Unified Diff: third_party/WebKit/Source/core/css/CSSCalculationValue.cpp

Issue 2371673002: [CSS Typed OM] Implement support for CSSValue -> CSSCalcLength (Closed)
Patch Set: sync to head Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSCalculationValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSCalculationValue.cpp b/third_party/WebKit/Source/core/css/CSSCalculationValue.cpp
index 71464e4f49692b8986bcb2efe01cf2fa13c546e5..e162cd6d3e54c3d7ea04780646cb142e74cb0786 100644
--- a/third_party/WebKit/Source/core/css/CSSCalculationValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSCalculationValue.cpp
@@ -252,6 +252,11 @@ class CSSCalcPrimitiveValue final : public CSSCalcExpressionNode {
CSSPrimitiveValue::UnitType typeWithCalcResolved() const override {
return m_value->typeWithCalcResolved();
}
+ const CSSCalcExpressionNode* leftExpressionNode() const { return nullptr; }
+
+ const CSSCalcExpressionNode* rightExpressionNode() const { return nullptr; }
+
+ CalcOperator operatorType() const { return CalcAdd; }
alancutter (OOO until 2018) 2016/10/13 22:19:05 Can these just be NOTREACHED()?
meade_UTC10 2016/11/16 19:28:21 Done.
DEFINE_INLINE_VIRTUAL_TRACE() {
visitor->trace(m_value);
@@ -551,6 +556,13 @@ class CSSCalcBinaryOperation final : public CSSCalcExpressionNode {
}
Type getType() const override { return CssCalcBinaryOperation; }
+ const CSSCalcExpressionNode* leftExpressionNode() const { return m_leftSide; }
+
+ const CSSCalcExpressionNode* rightExpressionNode() const {
+ return m_rightSide;
+ }
+
+ CalcOperator operatorType() const { return m_operator; }
CSSPrimitiveValue::UnitType typeWithCalcResolved() const override {
switch (m_category) {

Powered by Google App Engine
This is Rietveld 408576698