2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2006-03-29 18:29:03 +00:00
|
|
|
|
|
|
|
/* rendering objects for replaced elements implemented by a plugin */
|
|
|
|
|
2014-09-24 04:34:00 +00:00
|
|
|
#ifndef nsPluginFrame_h___
|
|
|
|
#define nsPluginFrame_h___
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-02-19 21:50:04 +00:00
|
|
|
#include "nsIObjectFrame.h"
|
2006-02-02 19:29:10 +00:00
|
|
|
#include "nsFrame.h"
|
2009-07-22 00:45:00 +00:00
|
|
|
#include "nsRegion.h"
|
|
|
|
#include "nsDisplayList.h"
|
2010-09-08 00:36:59 +00:00
|
|
|
#include "nsIReflowCallback.h"
|
2015-04-08 16:51:49 +00:00
|
|
|
#include "Units.h"
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2013-08-22 18:32:52 +00:00
|
|
|
#ifdef XP_WIN
|
|
|
|
#include <windows.h> // For HWND :(
|
2014-05-22 22:09:03 +00:00
|
|
|
// Undo the windows.h damage
|
|
|
|
#undef GetMessage
|
|
|
|
#undef CreateEvent
|
|
|
|
#undef GetClassName
|
|
|
|
#undef GetBinaryType
|
2014-06-22 02:17:44 +00:00
|
|
|
#undef RemoveDirectory
|
2013-08-22 18:32:52 +00:00
|
|
|
#endif
|
|
|
|
|
2006-02-02 19:29:10 +00:00
|
|
|
class nsPresContext;
|
2012-08-17 04:25:19 +00:00
|
|
|
class nsRootPresContext;
|
2009-07-22 00:45:00 +00:00
|
|
|
class nsDisplayPlugin;
|
2011-02-16 22:43:30 +00:00
|
|
|
class PluginBackgroundSink;
|
2013-08-22 18:32:52 +00:00
|
|
|
class nsPluginInstanceOwner;
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2012-07-31 00:42:26 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
class ImageContainer;
|
|
|
|
class Layer;
|
|
|
|
class LayerManager;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-24 04:34:00 +00:00
|
|
|
typedef nsFrame nsPluginFrameSuper;
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2014-09-24 04:34:00 +00:00
|
|
|
class nsPluginFrame : public nsPluginFrameSuper,
|
2010-09-08 00:36:59 +00:00
|
|
|
public nsIObjectFrame,
|
|
|
|
public nsIReflowCallback {
|
2000-04-14 22:48:30 +00:00
|
|
|
public:
|
2010-09-17 04:09:25 +00:00
|
|
|
typedef mozilla::LayerState LayerState;
|
|
|
|
typedef mozilla::layers::Layer Layer;
|
|
|
|
typedef mozilla::layers::LayerManager LayerManager;
|
|
|
|
typedef mozilla::layers::ImageContainer ImageContainer;
|
2013-09-27 06:01:16 +00:00
|
|
|
typedef mozilla::ContainerLayerParameters ContainerLayerParameters;
|
2010-09-17 04:09:25 +00:00
|
|
|
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
friend nsIFrame* NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
|
2009-01-12 19:20:59 +00:00
|
|
|
NS_DECL_QUERYFRAME
|
2014-09-24 04:34:00 +00:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsPluginFrame)
|
2001-02-19 21:50:04 +00:00
|
|
|
|
2014-05-24 22:20:40 +00:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame* aPrevInFlow) override;
|
|
|
|
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
|
|
|
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
2014-05-13 00:47:52 +00:00
|
|
|
virtual void Reflow(nsPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsReflowStatus& aStatus) override;
|
2014-05-13 00:47:53 +00:00
|
|
|
virtual void DidReflow(nsPresContext* aPresContext,
|
|
|
|
const nsHTMLReflowState* aReflowState,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsDidReflowStatus aStatus) override;
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
2015-03-21 16:28:04 +00:00
|
|
|
const nsDisplayListSet& aLists) override;
|
2006-01-26 02:29:17 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult HandleEvent(nsPresContext* aPresContext,
|
2014-02-18 08:36:33 +00:00
|
|
|
mozilla::WidgetGUIEvent* aEvent,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsEventStatus* aEventStatus) override;
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsIAtom* GetType() const override;
|
2007-02-24 18:33:33 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
2007-02-24 18:33:33 +00:00
|
|
|
{
|
2014-09-24 04:34:00 +00:00
|
|
|
return nsPluginFrameSuper::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
2007-02-24 18:33:33 +00:00
|
|
|
}
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool NeedsView() override { return true; }
|
2003-04-10 17:22:24 +00:00
|
|
|
|
2014-01-05 23:31:14 +00:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const override;
|
2000-04-14 22:48:30 +00:00
|
|
|
#endif
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
|
2007-10-19 03:41:07 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
NS_METHOD GetPluginInstance(nsNPAPIPluginInstance** aPluginInstance) override;
|
2001-02-19 21:50:04 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void SetIsDocumentActive(bool aIsActive) override;
|
2011-08-30 06:09:56 +00:00
|
|
|
|
2014-02-19 08:21:57 +00:00
|
|
|
virtual nsresult GetCursor(const nsPoint& aPoint,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame::Cursor& aCursor) override;
|
2002-01-26 00:39:43 +00:00
|
|
|
|
2012-10-06 13:03:23 +00:00
|
|
|
// APIs used by nsRootPresContext to set up the widget position/size/clip
|
|
|
|
// region.
|
|
|
|
/**
|
|
|
|
* Set the next widget configuration for the plugin to the desired
|
|
|
|
* position of the plugin's widget, on the assumption that it is not visible
|
|
|
|
* (clipped out or covered by opaque content).
|
|
|
|
* This will only be called for plugins which have been registered
|
|
|
|
* with the root pres context for geometry updates.
|
|
|
|
* If there is no widget associated with the plugin, this will have no effect.
|
|
|
|
*/
|
|
|
|
void SetEmptyWidgetConfiguration()
|
|
|
|
{
|
|
|
|
mNextConfigurationBounds = nsIntRect(0,0,0,0);
|
|
|
|
mNextConfigurationClipRegion.Clear();
|
2009-07-22 00:45:00 +00:00
|
|
|
}
|
2012-10-06 13:03:23 +00:00
|
|
|
/**
|
|
|
|
* Append the desired widget configuration to aConfigurations.
|
|
|
|
*/
|
2015-01-29 19:41:55 +00:00
|
|
|
void GetWidgetConfiguration(nsTArray<nsIWidget::Configuration>* aConfigurations);
|
2014-12-11 14:44:07 +00:00
|
|
|
|
|
|
|
nsIntRect GetWidgetlessClipRect() {
|
|
|
|
return RegionFromArray(mNextConfigurationClipRegion).GetBounds();
|
|
|
|
}
|
|
|
|
|
2012-10-06 13:03:23 +00:00
|
|
|
/**
|
|
|
|
* Called after all widget position/size/clip regions have been changed
|
|
|
|
* (even if there isn't a widget for this plugin).
|
|
|
|
*/
|
2009-07-22 00:45:02 +00:00
|
|
|
void DidSetWidgetGeometry();
|
|
|
|
|
2002-05-10 22:34:53 +00:00
|
|
|
// accessibility support
|
|
|
|
#ifdef ACCESSIBILITY
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual mozilla::a11y::AccType AccessibleType() override;
|
2002-05-10 22:34:53 +00:00
|
|
|
#ifdef XP_WIN
|
|
|
|
NS_IMETHOD GetPluginPort(HWND *aPort);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2000-04-14 22:48:30 +00:00
|
|
|
//local methods
|
2012-01-31 21:55:54 +00:00
|
|
|
nsresult PrepForDrawing(nsIWidget *aWidget);
|
2005-01-05 00:21:06 +00:00
|
|
|
|
2001-09-18 02:11:09 +00:00
|
|
|
// for a given aRoot, this walks the frame tree looking for the next outFrame
|
2004-07-31 23:15:21 +00:00
|
|
|
static nsIObjectFrame* GetNextObjectFrame(nsPresContext* aPresContext,
|
2004-02-09 17:33:45 +00:00
|
|
|
nsIFrame* aRoot);
|
2001-09-18 02:11:09 +00:00
|
|
|
|
2010-09-08 00:36:59 +00:00
|
|
|
// nsIReflowCallback
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool ReflowFinished() override;
|
|
|
|
virtual void ReflowCallbackCanceled() override;
|
2010-09-08 00:36:59 +00:00
|
|
|
|
2011-02-16 22:43:30 +00:00
|
|
|
/**
|
|
|
|
* Builds either an ImageLayer or a ReadbackLayer, depending on the type
|
|
|
|
* of aItem (TYPE_PLUGIN or TYPE_PLUGIN_READBACK respectively).
|
|
|
|
*/
|
2010-09-17 04:09:25 +00:00
|
|
|
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
|
|
|
LayerManager* aManager,
|
2012-09-16 22:25:33 +00:00
|
|
|
nsDisplayItem* aItem,
|
2013-09-27 06:01:16 +00:00
|
|
|
const ContainerLayerParameters& aContainerParameters);
|
2010-09-17 04:09:25 +00:00
|
|
|
|
2012-05-03 14:05:55 +00:00
|
|
|
LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
|
|
|
LayerManager* aManager);
|
2010-09-17 04:09:25 +00:00
|
|
|
|
2011-02-23 05:38:09 +00:00
|
|
|
/**
|
|
|
|
* Get the rectangle (relative to this frame) which it will paint. Normally
|
|
|
|
* the frame's content-box but may be smaller if the plugin is rendering
|
|
|
|
* asynchronously and has a different-sized image temporarily.
|
|
|
|
*/
|
|
|
|
nsRect GetPaintedRect(nsDisplayPlugin* aItem);
|
2010-09-17 04:09:25 +00:00
|
|
|
|
2010-09-18 11:28:49 +00:00
|
|
|
/**
|
2014-09-24 04:34:00 +00:00
|
|
|
* If aSupports has a nsPluginFrame, then prepare it for a DocShell swap.
|
2010-09-18 11:28:49 +00:00
|
|
|
* @see nsSubDocumentFrame::BeginSwapDocShells.
|
|
|
|
* There will be a call to EndSwapDocShells after we were moved to the
|
|
|
|
* new view tree.
|
|
|
|
*/
|
2014-06-19 02:09:35 +00:00
|
|
|
static void BeginSwapDocShells(nsISupports* aSupports, void*);
|
2010-09-18 11:28:49 +00:00
|
|
|
/**
|
2014-09-24 04:34:00 +00:00
|
|
|
* If aSupports has a nsPluginFrame, then set it up after a DocShell swap.
|
2010-09-18 11:28:49 +00:00
|
|
|
* @see nsSubDocumentFrame::EndSwapDocShells.
|
|
|
|
*/
|
2014-06-19 02:09:35 +00:00
|
|
|
static void EndSwapDocShells(nsISupports* aSupports, void*);
|
2010-09-18 11:28:49 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIWidget* GetWidget() override { return mInnerView ? mWidget : nullptr; }
|
2011-03-31 21:33:46 +00:00
|
|
|
|
2011-08-30 06:09:56 +00:00
|
|
|
/**
|
|
|
|
* Adjust the plugin's idea of its size, using aSize as its new size.
|
|
|
|
* (aSize must be in twips)
|
|
|
|
*/
|
|
|
|
void FixupWindow(const nsSize& aSize);
|
|
|
|
|
2012-01-31 21:55:54 +00:00
|
|
|
/*
|
2011-08-30 06:09:56 +00:00
|
|
|
* Sets up the plugin window and calls SetWindow on the plugin.
|
|
|
|
*/
|
2011-09-29 06:19:26 +00:00
|
|
|
nsresult CallSetWindow(bool aCheckIsHidden = true);
|
2011-08-30 06:09:56 +00:00
|
|
|
|
2012-01-31 21:55:54 +00:00
|
|
|
void SetInstanceOwner(nsPluginInstanceOwner* aOwner);
|
|
|
|
|
|
|
|
protected:
|
2014-09-24 04:34:00 +00:00
|
|
|
explicit nsPluginFrame(nsStyleContext* aContext);
|
|
|
|
virtual ~nsPluginFrame();
|
2012-01-31 21:55:54 +00:00
|
|
|
|
|
|
|
// NOTE: This frame class does not inherit from |nsLeafFrame|, so
|
|
|
|
// this is not a virtual method implementation.
|
|
|
|
void GetDesiredSize(nsPresContext* aPresContext,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize);
|
|
|
|
|
2014-02-19 08:21:57 +00:00
|
|
|
bool IsFocusable(int32_t *aTabIndex = nullptr,
|
2015-03-21 16:28:04 +00:00
|
|
|
bool aWithMouse = false) override;
|
2005-03-31 01:38:04 +00:00
|
|
|
|
2002-04-13 01:53:23 +00:00
|
|
|
// check attributes and optionally CSS to see if we should display anything
|
2011-09-29 06:19:26 +00:00
|
|
|
bool IsHidden(bool aCheckVisibilityStyle = true) const;
|
2000-07-19 23:46:43 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool IsOpaque() const;
|
|
|
|
bool IsTransparentMode() const;
|
2012-10-06 13:03:23 +00:00
|
|
|
bool IsPaintedByGecko() const;
|
2009-07-22 00:45:00 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
nsIntPoint GetWindowOriginInPixels(bool aWindowless);
|
2015-04-08 16:51:49 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If this frame is in a remote tab, return the tab offset to
|
|
|
|
* the origin of the chrome window. In non-e10s, this return 0,0.
|
|
|
|
* This api sends a sync ipc request so be careful about use.
|
|
|
|
*/
|
|
|
|
mozilla::LayoutDeviceIntPoint GetRemoteTabChromeOffset();
|
2001-12-22 00:00:44 +00:00
|
|
|
|
2008-07-07 02:49:38 +00:00
|
|
|
static void PaintPrintPlugin(nsIFrame* aFrame,
|
2011-04-08 01:04:40 +00:00
|
|
|
nsRenderingContext* aRenderingContext,
|
2008-07-07 02:49:38 +00:00
|
|
|
const nsRect& aDirtyRect, nsPoint aPt);
|
2011-04-08 01:04:40 +00:00
|
|
|
void PrintPlugin(nsRenderingContext& aRenderingContext,
|
2008-07-07 02:49:38 +00:00
|
|
|
const nsRect& aDirtyRect);
|
2010-10-25 14:38:09 +00:00
|
|
|
void PaintPlugin(nsDisplayListBuilder* aBuilder,
|
2011-04-08 01:04:40 +00:00
|
|
|
nsRenderingContext& aRenderingContext,
|
2009-09-11 01:44:20 +00:00
|
|
|
const nsRect& aDirtyRect, const nsRect& aPluginRect);
|
2008-07-07 02:49:38 +00:00
|
|
|
|
2010-01-21 15:17:52 +00:00
|
|
|
void NotifyPluginReflowObservers();
|
2009-11-20 22:59:27 +00:00
|
|
|
|
2003-04-12 15:03:08 +00:00
|
|
|
friend class nsPluginInstanceOwner;
|
2009-07-22 00:45:00 +00:00
|
|
|
friend class nsDisplayPlugin;
|
2011-02-16 22:43:30 +00:00
|
|
|
friend class PluginBackgroundSink;
|
2009-07-22 00:45:00 +00:00
|
|
|
|
2000-04-14 22:48:30 +00:00
|
|
|
private:
|
2012-08-17 04:25:19 +00:00
|
|
|
// Registers the plugin for a geometry update, and requests a geometry
|
|
|
|
// update. This caches the root pres context in
|
|
|
|
// mRootPresContextRegisteredWith, so that we can be sure we unregister
|
|
|
|
// from the right root prest context in UnregisterPluginForGeometryUpdates.
|
|
|
|
void RegisterPluginForGeometryUpdates();
|
|
|
|
|
|
|
|
// Unregisters the plugin for geometry updated with the root pres context
|
|
|
|
// stored in mRootPresContextRegisteredWith.
|
|
|
|
void UnregisterPluginForGeometryUpdates();
|
|
|
|
|
2014-12-11 14:44:07 +00:00
|
|
|
static const nsIntRegion RegionFromArray(const nsTArray<nsIntRect>& aRects)
|
|
|
|
{
|
|
|
|
nsIntRegion region;
|
|
|
|
for (uint32_t i = 0; i < aRects.Length(); ++i) {
|
|
|
|
region.Or(region, aRects[i]);
|
|
|
|
}
|
|
|
|
return region;
|
|
|
|
}
|
|
|
|
|
2010-01-21 15:17:52 +00:00
|
|
|
class PluginEventNotifier : public nsRunnable {
|
|
|
|
public:
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit PluginEventNotifier(const nsString &aEventType) :
|
2010-01-21 15:17:52 +00:00
|
|
|
mEventType(aEventType) {}
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
NS_IMETHOD Run() override;
|
2010-01-21 15:17:52 +00:00
|
|
|
private:
|
|
|
|
nsString mEventType;
|
|
|
|
};
|
2012-01-31 21:55:54 +00:00
|
|
|
|
|
|
|
nsPluginInstanceOwner* mInstanceOwner; // WEAK
|
2013-01-03 13:23:11 +00:00
|
|
|
nsView* mInnerView;
|
2009-07-22 00:45:00 +00:00
|
|
|
nsCOMPtr<nsIWidget> mWidget;
|
2009-01-15 03:27:09 +00:00
|
|
|
nsIntRect mWindowlessRect;
|
2011-02-16 22:43:30 +00:00
|
|
|
/**
|
2014-09-24 04:34:00 +00:00
|
|
|
* This is owned by the ReadbackLayer for this nsPluginFrame. It is
|
2011-02-16 22:43:30 +00:00
|
|
|
* automatically cleared if the PluginBackgroundSink is destroyed.
|
|
|
|
*/
|
|
|
|
PluginBackgroundSink* mBackgroundSink;
|
2005-04-14 21:50:46 +00:00
|
|
|
|
2012-10-06 13:03:23 +00:00
|
|
|
/**
|
|
|
|
* Bounds that we should set the plugin's widget to in the next composite,
|
|
|
|
* for plugins with widgets. For plugins without widgets, bounds in device
|
|
|
|
* pixels relative to the nearest frame that's a display list reference frame.
|
|
|
|
*/
|
|
|
|
nsIntRect mNextConfigurationBounds;
|
|
|
|
/**
|
|
|
|
* Clip region that we should set the plugin's widget to
|
|
|
|
* in the next composite. Only meaningful for plugins with widgets.
|
|
|
|
*/
|
|
|
|
nsTArray<nsIntRect> mNextConfigurationClipRegion;
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool mReflowCallbackPosted;
|
2010-09-17 04:09:25 +00:00
|
|
|
|
2012-08-17 04:25:19 +00:00
|
|
|
// We keep this reference to ensure we can always unregister the
|
|
|
|
// plugins we register on the root PresContext.
|
|
|
|
// This is only non-null while we have a plugin registered for geometry
|
|
|
|
// updates.
|
|
|
|
nsRefPtr<nsRootPresContext> mRootPresContextRegisteredWith;
|
2000-04-14 22:48:30 +00:00
|
|
|
};
|
|
|
|
|
2009-07-22 00:45:00 +00:00
|
|
|
class nsDisplayPlugin : public nsDisplayItem {
|
|
|
|
public:
|
2010-08-13 10:01:13 +00:00
|
|
|
nsDisplayPlugin(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
|
|
|
: nsDisplayItem(aBuilder, aFrame)
|
2009-07-22 00:45:00 +00:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(nsDisplayPlugin);
|
2012-10-18 05:34:58 +00:00
|
|
|
aBuilder->SetContainsPluginItem();
|
2009-07-22 00:45:00 +00:00
|
|
|
}
|
|
|
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
|
|
|
virtual ~nsDisplayPlugin() {
|
|
|
|
MOZ_COUNT_DTOR(nsDisplayPlugin);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
|
2011-01-03 01:48:09 +00:00
|
|
|
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
2015-03-21 16:28:04 +00:00
|
|
|
bool* aSnap) override;
|
2009-09-07 00:35:14 +00:00
|
|
|
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsRenderingContext* aCtx) override;
|
2011-09-29 06:19:26 +00:00
|
|
|
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsRegion* aVisibleRegion) override;
|
2009-07-22 00:45:00 +00:00
|
|
|
|
2010-07-15 21:07:49 +00:00
|
|
|
NS_DISPLAY_DECL_NAME("Plugin", TYPE_PLUGIN)
|
2009-07-22 00:45:00 +00:00
|
|
|
|
2010-09-17 04:09:25 +00:00
|
|
|
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
2011-06-22 12:11:27 +00:00
|
|
|
LayerManager* aManager,
|
2015-03-21 16:28:04 +00:00
|
|
|
const ContainerLayerParameters& aContainerParameters) override
|
2010-09-17 04:09:25 +00:00
|
|
|
{
|
2014-09-24 04:34:00 +00:00
|
|
|
return static_cast<nsPluginFrame*>(mFrame)->BuildLayer(aBuilder,
|
2011-02-12 16:09:03 +00:00
|
|
|
aManager,
|
2012-09-16 22:25:33 +00:00
|
|
|
this,
|
|
|
|
aContainerParameters);
|
2010-09-17 04:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
2012-05-03 14:05:55 +00:00
|
|
|
LayerManager* aManager,
|
2015-03-21 16:28:04 +00:00
|
|
|
const ContainerLayerParameters& aParameters) override
|
2010-09-17 04:09:25 +00:00
|
|
|
{
|
2014-09-24 04:34:00 +00:00
|
|
|
return static_cast<nsPluginFrame*>(mFrame)->GetLayerState(aBuilder,
|
2011-02-16 22:43:30 +00:00
|
|
|
aManager);
|
2010-09-17 04:09:25 +00:00
|
|
|
}
|
2009-07-22 00:45:00 +00:00
|
|
|
};
|
2000-04-14 22:48:30 +00:00
|
|
|
|
2014-09-24 04:34:00 +00:00
|
|
|
#endif /* nsPluginFrame_h___ */
|