blob: 3c29ca72f9c916095f96045ee9739a1b1200ad45 [file] [log] [blame]
// Copyright 2016 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 "platform/LayoutUnit.h"
#include "platform/wtf/text/WTFString.h"
namespace blink {
String LayoutUnit::ToString() const {
if (value_ == LayoutUnit::Max().RawValue())
return "LayoutUnit::max(" + String::Number(ToDouble()) + ")";
if (value_ == LayoutUnit::Min().RawValue())
return "LayoutUnit::min(" + String::Number(ToDouble()) + ")";
if (value_ == LayoutUnit::NearlyMax().RawValue())
return "LayoutUnit::nearlyMax(" + String::Number(ToDouble()) + ")";
if (value_ == LayoutUnit::NearlyMin().RawValue())
return "LayoutUnit::nearlyMin(" + String::Number(ToDouble()) + ")";
return String::Number(ToDouble());
}
} // namespace blink