blob: 46295bf7728278ef315e9c4ec820c41c10df3285 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// 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/cross_thread_unit_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_unit_value.h"
namespace blink {
CSSStyleValue* CrossThreadUnitValue::ToCSSStyleValue() {
return CSSUnitValue::Create(value_, unit_);
}
bool CrossThreadUnitValue::operator==(
const CrossThreadStyleValue& other) const {
if (auto* o = DynamicTo<CrossThreadUnitValue>(other))
return value_ == o->value_ && unit_ == o->unit_;
return false;
}
std::unique_ptr<CrossThreadStyleValue> CrossThreadUnitValue::IsolatedCopy()
const {
return std::make_unique<CrossThreadUnitValue>(value_, unit_);
}
} // namespace blink