mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 826740 - Part a: General cleanup for HTMLCanvasElement; r=khuey
This commit is contained in:
parent
8f5d5c7049
commit
1f76a9c63a
@ -197,12 +197,6 @@ public:
|
||||
HTMLCanvasElement* GetOriginalCanvas();
|
||||
};
|
||||
|
||||
inline nsISupports*
|
||||
GetISupports(HTMLCanvasElement* p)
|
||||
{
|
||||
return static_cast<Element*>(p);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -4,46 +4,38 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/dom/HTMLCanvasElement.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
|
||||
#include "BasicLayers.h"
|
||||
#include "imgIEncoder.h"
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/dom/CanvasRenderingContext2D.h"
|
||||
#include "mozilla/gfx/Rect.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsDOMFile.h"
|
||||
|
||||
#include "mozilla/dom/CanvasRenderingContext2D.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsDOMFile.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsIWritablePropertyBag2.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsStreamUtils.h"
|
||||
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "BasicLayers.h"
|
||||
#include "imgIEncoder.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#include "nsIWritablePropertyBag2.h"
|
||||
|
||||
#define DEFAULT_CANVAS_WIDTH 300
|
||||
#define DEFAULT_CANVAS_HEIGHT 150
|
||||
|
||||
using namespace mozilla::layers;
|
||||
|
||||
nsGenericHTMLElement*
|
||||
NS_NewHTMLCanvasElement(already_AddRefed<nsINodeInfo> aNodeInfo,
|
||||
mozilla::dom::FromParser aFromParser)
|
||||
{
|
||||
return new mozilla::dom::HTMLCanvasElement(aNodeInfo);
|
||||
}
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT(Canvas)
|
||||
|
||||
namespace {
|
||||
|
||||
@ -161,21 +153,9 @@ HTMLCanvasElement::~HTMLCanvasElement()
|
||||
ResetPrintCallback();
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLCanvasElement,
|
||||
nsGenericHTMLElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCurrentContext)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPrintCallback)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPrintState)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOriginalCanvas)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLCanvasElement,
|
||||
nsGenericHTMLElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCurrentContext)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPrintCallback)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPrintState)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOriginalCanvas)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_4(HTMLCanvasElement, nsGenericHTMLElement,
|
||||
mCurrentContext, mPrintCallback,
|
||||
mPrintState, mOriginalCanvas)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(HTMLCanvasElement, Element)
|
||||
NS_IMPL_RELEASE_INHERITED(HTMLCanvasElement, Element)
|
||||
|
Loading…
Reference in New Issue
Block a user