#pragma once
#include "Length.h"
#include "RectEdges.h"
#include "WritingMode.h"
namespace WebCore {
class LengthBox : public RectEdges<Length> {
public:
LengthBox()
: LengthBox(Auto)
{
}
explicit LengthBox(LengthType type)
: RectEdges(Length(type), Length(type), Length(type), Length(type))
{
}
explicit LengthBox(int v)
: RectEdges(Length(v, Fixed), Length(v, Fixed), Length(v, Fixed), Length(v, Fixed))
{
}
LengthBox(int top, int right, int bottom, int left)
: RectEdges(Length(top, Fixed), Length(right, Fixed), Length(bottom, Fixed), Length(left, Fixed))
{
}
LengthBox(Length&& top, Length&& right, Length&& bottom, Length&& left)
: RectEdges { WTFMove(top), WTFMove(right), WTFMove(bottom), WTFMove(left) }
{
}
bool isZero() const
{
return top().isZero() && right().isZero() && bottom().isZero() && left().isZero();
}
};
using LayoutBoxExtent = RectEdges<LayoutUnit>;
using FloatBoxExtent = RectEdges<float>;
WTF::TextStream& operator<<(WTF::TextStream&, const LengthBox&);
WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const FloatBoxExtent&);
}