chromium/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/css/cssom/css_numeric_value.h"

#include <numeric>

#include "base/ranges/algorithm.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_css_numeric_type.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_cssnumericvalue_double.h"
#include "third_party/blink/renderer/core/css/css_math_expression_node.h"
#include "third_party/blink/renderer/core/css/css_math_function_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_clamp.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_invert.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_max.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_min.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_negate.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_product.h"
#include "third_party/blink/renderer/core/css/cssom/css_math_sum.h"
#include "third_party/blink/renderer/core/css/cssom/css_unit_value.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_context.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_token_stream.h"
#include "third_party/blink/renderer/core/css/parser/css_tokenizer.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"

namespace blink {

namespace {

template <CSSStyleValue::StyleValueType type>
void PrependValueForArithmetic(CSSNumericValueVector& vector,
                               CSSNumericValue* value) {}

template <class BinaryOperation>
CSSUnitValue* MaybeSimplifyAsUnitValue(const CSSNumericValueVector& values,
                                       const BinaryOperation& op) {}

CSSUnitValue* MaybeMultiplyAsUnitValue(const CSSNumericValueVector& values) {}

CSSMathOperator CanonicalOperator(CSSMathOperator op) {}

bool CanCombineNodes(const CSSMathExpressionNode& root,
                     const CSSMathExpressionNode& node) {}

CSSNumericValue* NegateOrInvertIfRequired(CSSMathOperator parent_op,
                                          CSSNumericValue* value) {}

CSSNumericValue* CalcToNumericValue(const CSSMathExpressionNode& root) {}

CSSUnitValue* CSSNumericSumValueEntryToUnitValue(
    const CSSNumericSumValue::Term& term) {}

}  // namespace

bool CSSNumericValue::IsValidUnit(CSSPrimitiveValue::UnitType unit) {}

CSSPrimitiveValue::UnitType CSSNumericValue::UnitFromName(const String& name) {}

// static
CSSNumericValue* CSSNumericValue::parse(
    const ExecutionContext* execution_context,
    const String& css_text,
    ExceptionState& exception_state) {}

// static
CSSNumericValue* CSSNumericValue::FromCSSValue(const CSSPrimitiveValue& value) {}

// static
CSSNumericValue* CSSNumericValue::FromNumberish(const V8CSSNumberish* value) {}

// static
CSSNumericValue* CSSNumericValue::FromPercentish(const V8CSSNumberish* value) {}

CSSUnitValue* CSSNumericValue::to(const String& unit_string,
                                  ExceptionState& exception_state) {}

CSSUnitValue* CSSNumericValue::to(CSSPrimitiveValue::UnitType unit) const {}

CSSMathSum* CSSNumericValue::toSum(const Vector<String>& unit_strings,
                                   ExceptionState& exception_state) {}

CSSNumericType* CSSNumericValue::type() const {}

CSSNumericValue* CSSNumericValue::add(
    const HeapVector<Member<V8CSSNumberish>>& numberishes,
    ExceptionState& exception_state) {}

CSSNumericValue* CSSNumericValue::sub(
    const HeapVector<Member<V8CSSNumberish>>& numberishes,
    ExceptionState& exception_state) {}

CSSNumericValue* CSSNumericValue::mul(
    const HeapVector<Member<V8CSSNumberish>>& numberishes,
    ExceptionState& exception_state) {}

CSSNumericValue* CSSNumericValue::div(
    const HeapVector<Member<V8CSSNumberish>>& numberishes,
    ExceptionState& exception_state) {}

CSSNumericValue* CSSNumericValue::min(
    const HeapVector<Member<V8CSSNumberish>>& numberishes,
    ExceptionState& exception_state) {}

CSSNumericValue* CSSNumericValue::max(
    const HeapVector<Member<V8CSSNumberish>>& numberishes,
    ExceptionState& exception_state) {}

bool CSSNumericValue::equals(
    const HeapVector<Member<V8CSSNumberish>>& numberishes) {}

String CSSNumericValue::toString() const {}

CSSNumericValue* CSSNumericValue::Negate() {}

CSSNumericValue* CSSNumericValue::Invert() {}

CSSNumericValueVector CSSNumberishesToNumericValues(
    const HeapVector<Member<V8CSSNumberish>>& values) {}

}  // namespace blink