Commit 612ba5ee authored by Miyoung Shin's avatar Miyoung Shin Committed by Commit Bot

Replace use of std containers with WTF's equivalents in css_numeric_value_type.h

This CL replaces the use of std::array of std containers
with WTF::Vector in css_numeric_value_type.h.

Bug: 952716
Change-Id: I1c9b80963301d28d8b3d0be24f423e38cfb8e9a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1694964Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#676185}
parent 51121cf7
......@@ -86,12 +86,14 @@ AtomicString CSSNumericValueType::BaseTypeToString(BaseType base_type) {
}
CSSNumericValueType::CSSNumericValueType(CSSPrimitiveValue::UnitType unit) {
exponents_.Fill(0, kNumBaseTypes);
if (unit != CSSPrimitiveValue::UnitType::kNumber)
SetExponent(UnitTypeToBaseType(unit), 1);
}
CSSNumericValueType::CSSNumericValueType(int exponent,
CSSPrimitiveValue::UnitType unit) {
exponents_.Fill(0, kNumBaseTypes);
if (unit != CSSPrimitiveValue::UnitType::kNumber)
SetExponent(UnitTypeToBaseType(unit), exponent);
}
......
......@@ -7,8 +7,6 @@
#include "third_party/blink/renderer/core/css/css_primitive_value.h"
#include <array>
namespace blink {
// Represents the type of a CSSNumericValue, which is a map of base types to
......@@ -93,7 +91,7 @@ class CORE_EXPORT CSSNumericValueType {
return num_non_zero_entries_ == 1 && Exponent(base_type) == value;
}
std::array<int, kNumBaseTypes> exponents_{}; // zero-initialize
Vector<int, kNumBaseTypes> exponents_;
BaseType percent_hint_ = BaseType::kPercent;
bool has_percent_hint_ = false;
unsigned num_non_zero_entries_ = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment