1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef LAYOUT_SVG_DISPLAYSVGITEM_H_
8 #define LAYOUT_SVG_DISPLAYSVGITEM_H_
10 #include "nsDisplayList.h"
14 //----------------------------------------------------------------------
17 class DisplaySVGItem
: public nsPaintedDisplayItem
{
19 DisplaySVGItem(nsDisplayListBuilder
* aBuilder
, nsIFrame
* aFrame
)
20 : nsPaintedDisplayItem(aBuilder
, aFrame
) {
21 MOZ_ASSERT(aFrame
, "Must have a frame!");
25 * Hit testing for display lists.
26 * @param aRect the point or rect being tested, relative to aFrame.
27 * If the width and height are both 1 app unit, it indicates we're
28 * hit testing a point, not a rect.
29 * @param aOutFrames each item appends the frame(s) in this display item that
30 * the rect is considered over (if any) to aOutFrames.
32 void HitTest(nsDisplayListBuilder
* aBuilder
, const nsRect
& aRect
,
33 HitTestState
* aState
, nsTArray
<nsIFrame
*>* aOutFrames
) override
;
35 * Paint the frame to some rendering context.
37 void Paint(nsDisplayListBuilder
* aBuilder
, gfxContext
* aCtx
) override
;
40 } // namespace mozilla
42 #endif // LAYOUT_SVG_DISPLAYSVGITEM_H_