Bug 1436869 - Remove nsIDOMPaintRequest. r?bz
MozReview-Commit-ID: 3Xpk2v1xbPp
--- a/dom/events/PaintRequest.cpp
+++ b/dom/events/PaintRequest.cpp
@@ -16,17 +16,16 @@ namespace dom {
/******************************************************************************
* mozilla::dom::PaintRequest
*****************************************************************************/
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PaintRequest, mParent)
NS_INTERFACE_TABLE_HEAD(PaintRequest)
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
- NS_INTERFACE_TABLE(PaintRequest, nsIDOMPaintRequest)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(PaintRequest)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(PaintRequest)
NS_IMPL_CYCLE_COLLECTING_RELEASE(PaintRequest)
/* virtual */ JSObject*
PaintRequest::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
@@ -37,31 +36,16 @@ PaintRequest::WrapObject(JSContext* aCx,
already_AddRefed<DOMRect>
PaintRequest::ClientRect()
{
RefPtr<DOMRect> clientRect = new DOMRect(this);
clientRect->SetLayoutRect(mRequest);
return clientRect.forget();
}
-NS_IMETHODIMP
-PaintRequest::GetClientRect(nsIDOMClientRect** aResult)
-{
- RefPtr<DOMRect> clientRect = ClientRect();
- clientRect.forget(aResult);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-PaintRequest::GetXPCOMReason(nsAString& aResult)
-{
- GetReason(aResult);
- return NS_OK;
-}
-
/******************************************************************************
* mozilla::dom::PaintRequestList
*****************************************************************************/
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PaintRequestList, mParent)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PaintRequestList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
--- a/dom/events/PaintRequest.h
+++ b/dom/events/PaintRequest.h
@@ -2,39 +2,37 @@
/* 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 mozilla_dom_PaintRequest_h_
#define mozilla_dom_PaintRequest_h_
-#include "nsIDOMPaintRequest.h"
#include "nsPresContext.h"
#include "nsIDOMEvent.h"
#include "mozilla/Attributes.h"
#include "nsWrapperCache.h"
namespace mozilla {
namespace dom {
class DOMRect;
-class PaintRequest final : public nsIDOMPaintRequest
+class PaintRequest final : public nsISupports
, public nsWrapperCache
{
public:
explicit PaintRequest(nsIDOMEvent* aParent)
: mParent(aParent)
{
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PaintRequest)
- NS_DECL_NSIDOMPAINTREQUEST
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
nsIDOMEvent* GetParentObject() const
{
return mParent;
}
--- a/dom/interfaces/events/moz.build
+++ b/dom/interfaces/events/moz.build
@@ -20,17 +20,16 @@ XPIDL_SOURCES += [
'nsIDOMEventTarget.idl',
'nsIDOMFocusEvent.idl',
'nsIDOMKeyEvent.idl',
'nsIDOMMouseEvent.idl',
'nsIDOMMouseScrollEvent.idl',
'nsIDOMMutationEvent.idl',
'nsIDOMNotifyPaintEvent.idl',
'nsIDOMNSEvent.idl',
- 'nsIDOMPaintRequest.idl',
'nsIDOMScrollAreaEvent.idl',
'nsIDOMSimpleGestureEvent.idl',
'nsIDOMTransitionEvent.idl',
'nsIDOMUIEvent.idl',
'nsIDOMWheelEvent.idl',
]
XPIDL_MODULE = 'dom_events'
deleted file mode 100644
--- a/dom/interfaces/events/nsIDOMPaintRequest.idl
+++ /dev/null
@@ -1,30 +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 nsIDOMClientRect;
-
-/**
- * These objects are exposed by the MozDOMAfterPaint event. Each one represents
- * a request to repaint a rectangle that was generated by the browser.
- */
-[uuid(9eb5268f-73a4-41da-9790-d21fcefd5ffa)]
-interface nsIDOMPaintRequest : nsISupports
-{
- /**
- * The client rect where invalidation was triggered.
- */
- readonly attribute nsIDOMClientRect clientRect;
- /**
- * The reason for the request, as a string. If an empty string, then we don't know
- * the reason (this is common). Reasons include "scroll repaint", meaning that we
- * needed to repaint the rectangle due to scrolling, and "scroll copy", meaning
- * that we updated the rectangle due to scrolling but instead of painting
- * manually, we were able to do a copy from another area of the screen.
- */
- [binaryname(XPCOMReason)]
- readonly attribute DOMString reason;
-};
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -45,17 +45,16 @@
#include "nsIDOMMouseEvent.h"
#include "nsIDOMMouseScrollEvent.h"
#include "nsIDOMMutationEvent.h"
#include "nsIDOMNode.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMNotifyPaintEvent.h"
#include "nsIDOMNSEvent.h"
#include "nsIDOMOfflineResourceList.h"
-#include "nsIDOMPaintRequest.h"
#include "nsIDOMParser.h"
#include "nsIDOMProcessingInstruction.h"
#include "nsIDOMRange.h"
#include "nsIDOMScreen.h"
#include "nsIDOMScrollAreaEvent.h"
#include "nsIDOMSerializer.h"
#include "nsIDOMSimpleGestureEvent.h"
#include "nsIDOMText.h"
@@ -129,17 +128,16 @@
#include "mozilla/dom/MouseEventBinding.h"
#include "mozilla/dom/MouseScrollEventBinding.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "mozilla/dom/NodeListBinding.h"
#include "mozilla/dom/NodeBinding.h"
#include "mozilla/dom/NotifyPaintEventBinding.h"
#include "mozilla/dom/EventBinding.h"
#include "mozilla/dom/OfflineResourceListBinding.h"
-#include "mozilla/dom/PaintRequestBinding.h"
#include "mozilla/dom/PositionErrorBinding.h"
#include "mozilla/dom/ProcessingInstructionBinding.h"
#include "mozilla/dom/RangeBinding.h"
#include "mozilla/dom/RectBinding.h"
#include "mozilla/dom/ScreenBinding.h"
#include "mozilla/dom/ScrollBoxObjectBinding.h"
#include "mozilla/dom/SelectionBinding.h"
#include "mozilla/dom/ScrollAreaEventBinding.h"
@@ -260,17 +258,16 @@ const ComponentsInterfaceShimEntry kComp
DEFINE_SHIM(MouseEvent),
DEFINE_SHIM(MouseScrollEvent),
DEFINE_SHIM(MutationEvent),
DEFINE_SHIM(NodeList),
DEFINE_SHIM(Node),
DEFINE_SHIM(NotifyPaintEvent),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMNSEvent, Event),
DEFINE_SHIM(OfflineResourceList),
- DEFINE_SHIM(PaintRequest),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMParser, DOMParser),
DEFINE_SHIM(ProcessingInstruction),
DEFINE_SHIM(Range),
DEFINE_SHIM(Screen),
DEFINE_SHIM(ScrollAreaEvent),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
DEFINE_SHIM(SimpleGestureEvent),