mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 890817 - Remove nsIDOMPaintRequestList; r=smaug
This commit is contained in:
parent
fae15265a4
commit
96c70711a2
@ -92,7 +92,7 @@ nsDOMNotifyPaintEvent::ClientRects()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMNotifyPaintEvent::GetPaintRequests(nsIDOMPaintRequestList** aResult)
|
||||
nsDOMNotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
|
||||
{
|
||||
nsRefPtr<nsPaintRequestList> requests = PaintRequests();
|
||||
requests.forget(aResult);
|
||||
|
@ -55,31 +55,16 @@ nsPaintRequest::GetXPCOMReason(nsAString& aResult)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsPaintRequestList, mParent)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(nsPaintRequestList)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsPaintRequestList)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_TABLE1(nsPaintRequestList, nsIDOMPaintRequestList)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsPaintRequestList)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsPaintRequestList)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsPaintRequestList)
|
||||
|
||||
JSObject*
|
||||
nsPaintRequestList::WrapObject(JSContext *cx, JS::Handle<JSObject*> scope)
|
||||
nsPaintRequestList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
||||
{
|
||||
return mozilla::dom::PaintRequestListBinding::Wrap(cx, scope, this);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPaintRequestList::GetLength(uint32_t* aLength)
|
||||
{
|
||||
*aLength = Length();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPaintRequestList::Item(uint32_t aIndex, nsIDOMPaintRequest** aReturn)
|
||||
{
|
||||
NS_IF_ADDREF(*aReturn = Item(aIndex));
|
||||
return NS_OK;
|
||||
return PaintRequestListBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
#define NSPAINTREQUEST_H_
|
||||
|
||||
#include "nsIDOMPaintRequest.h"
|
||||
#include "nsIDOMPaintRequestList.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
@ -53,7 +52,7 @@ private:
|
||||
nsInvalidateRequestList::Request mRequest;
|
||||
};
|
||||
|
||||
class nsPaintRequestList MOZ_FINAL : public nsIDOMPaintRequestList,
|
||||
class nsPaintRequestList MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
@ -64,10 +63,9 @@ public:
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsPaintRequestList)
|
||||
NS_DECL_NSIDOMPAINTREQUESTLIST
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx,
|
||||
JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
nsISupports* GetParentObject()
|
||||
{
|
||||
return mParent;
|
||||
@ -78,23 +76,6 @@ public:
|
||||
mArray.AppendElement(aElement);
|
||||
}
|
||||
|
||||
static nsPaintRequestList* FromSupports(nsISupports* aSupports)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
{
|
||||
nsCOMPtr<nsIDOMPaintRequestList> list_qi = do_QueryInterface(aSupports);
|
||||
|
||||
// If this assertion fires the QI implementation for the object in
|
||||
// question doesn't use the nsIDOMClientRectList pointer as the nsISupports
|
||||
// pointer. That must be fixed, or we'll crash...
|
||||
NS_ASSERTION(list_qi == static_cast<nsIDOMPaintRequestList*>(aSupports),
|
||||
"Uh, fix QI!");
|
||||
}
|
||||
#endif
|
||||
|
||||
return static_cast<nsPaintRequestList*>(aSupports);
|
||||
}
|
||||
|
||||
uint32_t Length()
|
||||
{
|
||||
return mArray.Length();
|
||||
|
@ -40,7 +40,6 @@ XPIDL_SOURCES += [
|
||||
'nsIDOMNotifyPaintEvent.idl',
|
||||
'nsIDOMPageTransitionEvent.idl',
|
||||
'nsIDOMPaintRequest.idl',
|
||||
'nsIDOMPaintRequestList.idl',
|
||||
'nsIDOMPopStateEvent.idl',
|
||||
'nsIDOMPopupBlockedEvent.idl',
|
||||
'nsIDOMProgressEvent.idl',
|
||||
|
@ -12,7 +12,7 @@ interface nsIDOMPaintRequestList;
|
||||
* event, which fires at a window when painting has happened in
|
||||
* that window.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(e3560df8-0926-48da-b13a-36d3938c95af)]
|
||||
[scriptable, builtinclass, uuid(ef68f0d5-5b55-4198-9e59-a5e2c57d3adc)]
|
||||
interface nsIDOMNotifyPaintEvent : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
@ -32,6 +32,6 @@ interface nsIDOMNotifyPaintEvent : nsIDOMEvent
|
||||
*/
|
||||
readonly attribute nsIDOMClientRect boundingClientRect;
|
||||
|
||||
readonly attribute nsIDOMPaintRequestList paintRequests;
|
||||
readonly attribute nsISupports /* PaintRequestList */ paintRequests;
|
||||
};
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
interface nsIDOMPaintRequest;
|
||||
|
||||
[scriptable, uuid(1d6a6e10-e9f0-468b-b8e5-da39c945690e)]
|
||||
interface nsIDOMPaintRequestList : nsISupports
|
||||
{
|
||||
readonly attribute unsigned long length;
|
||||
nsIDOMPaintRequest item(in unsigned long index);
|
||||
};
|
Loading…
Reference in New Issue
Block a user