diff --git a/gfx/src/moz.build b/gfx/src/moz.build index d8f58a48f1f4..1ea990e64359 100644 --- a/gfx/src/moz.build +++ b/gfx/src/moz.build @@ -23,6 +23,7 @@ EXPORTS += [ 'nsColorNameList.h', 'nsColorNames.h', 'nsCoord.h', + 'nsCoordBox.h', 'nsDeviceContext.h', 'nsFont.h', 'nsFontMetrics.h', diff --git a/gfx/src/nsCoordBox.h b/gfx/src/nsCoordBox.h new file mode 100644 index 000000000000..d184d70a7314 --- /dev/null +++ b/gfx/src/nsCoordBox.h @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef NSCOORDBOX_H +#define NSCOORDBOX_H + +#include "mozilla/gfx/Box.h" +#include "nsCoord.h" +#include "nsRect.h" + +// Would like to call this nsBox, but can't because nsBox is a frame type. +struct nsCoordBox : + public mozilla::gfx::BaseBox { + typedef mozilla::gfx::BaseBox Super; + + nsCoordBox() : Super() {} + nsCoordBox(nscoord aX1, nscoord aY1, nscoord aX2, nscoord aY2) : + Super(aX1, aY1, aX2, aY2) {} +}; + +#endif /* NSCOORDBOX_H */ diff --git a/layout/base/Units.h b/layout/base/Units.h index 94b4e15d9142..939b4ecf1997 100644 --- a/layout/base/Units.h +++ b/layout/base/Units.h @@ -7,6 +7,7 @@ #ifndef MOZ_UNITS_H_ #define MOZ_UNITS_H_ +#include "mozilla/gfx/Box.h" #include "mozilla/gfx/Coord.h" #include "mozilla/gfx/Point.h" #include "mozilla/gfx/Rect.h" @@ -74,6 +75,7 @@ typedef gfx::PointTyped LayerPoint; typedef gfx::IntPointTyped LayerIntPoint; typedef gfx::SizeTyped LayerSize; typedef gfx::IntSizeTyped LayerIntSize; +typedef gfx::BoxTyped LayerBox; typedef gfx::RectTyped LayerRect; typedef gfx::IntRectTyped LayerIntRect; typedef gfx::MarginTyped LayerMargin;