Bug 979692 - Extend MouseEvent interface r=bz
☠☠ backed out by 6b52f777d2ac ☠ ☠
authorRik Cabanier <cabanier@adobe.com>
Sat, 26 Apr 2014 18:32:00 +0200
changeset 183741 756fac661b86129a0e392e10c4e2c8f686c547f8
parent 183740 207ddc4b0cd0a3bc3c52116b8bc6d26800454e30
child 183742 45ea7a49ecec4f150cb2844c6b501958865e372b
push id43651
push usercbook@mozilla.com
push dateMon, 19 May 2014 10:07:02 +0000
treeherdermozilla-inbound@2ee1b1118636 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs979692
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 979692 - Extend MouseEvent interface r=bz
dom/events/MouseEvent.cpp
dom/events/MouseEvent.h
dom/webidl/MouseEvent.webidl
--- a/dom/events/MouseEvent.cpp
+++ b/dom/events/MouseEvent.cpp
@@ -290,16 +290,22 @@ MouseEvent::GetRelatedTarget()
     if (relatedTarget) {
       relatedTarget = relatedTarget->GetTargetForDOMEvent();
     }
     return relatedTarget.forget();
   }
   return nullptr;
 }
 
+void
+MouseEvent::GetRegion(nsAString& aRegion)
+{
+  SetDOMStringToNull(aRegion);
+}
+
 NS_IMETHODIMP
 MouseEvent::GetMozMovementX(int32_t* aMovementX)
 {
   NS_ENSURE_ARG_POINTER(aMovementX);
   *aMovementX = MozMovementX();
 
   return NS_OK;
 }
--- a/dom/events/MouseEvent.h
+++ b/dom/events/MouseEvent.h
@@ -47,16 +47,17 @@ public:
   int32_t ClientY();
   bool CtrlKey();
   bool ShiftKey();
   bool AltKey();
   bool MetaKey();
   int16_t Button();
   uint16_t Buttons();
   already_AddRefed<EventTarget> GetRelatedTarget();
+  void GetRegion(nsAString& aRegion);
   void InitMouseEvent(const nsAString& aType, bool aCanBubble, bool aCancelable,
                       nsIDOMWindow* aView, int32_t aDetail, int32_t aScreenX,
                       int32_t aScreenY, int32_t aClientX, int32_t aClientY,
                       bool aCtrlKey, bool aAltKey, bool aShiftKey,
                       bool aMetaKey, uint16_t aButton,
                       EventTarget* aRelatedTarget, ErrorResult& aRv)
   {
     aRv = InitMouseEvent(aType, aCanBubble, aCancelable,
--- a/dom/webidl/MouseEvent.webidl
+++ b/dom/webidl/MouseEvent.webidl
@@ -17,16 +17,17 @@ interface MouseEvent : UIEvent {
   readonly attribute long           clientY;
   readonly attribute boolean        ctrlKey;
   readonly attribute boolean        shiftKey;
   readonly attribute boolean        altKey;
   readonly attribute boolean        metaKey;
   readonly attribute short          button;
   readonly attribute unsigned short buttons;
   readonly attribute EventTarget?   relatedTarget;
+  readonly attribute DOMString?     region;
   // Deprecated in DOM Level 3:
   [Throws]
   void                              initMouseEvent(DOMString typeArg, 
                                                    boolean canBubbleArg, 
                                                    boolean cancelableArg, 
                                                    WindowProxy? viewArg, 
                                                    long detailArg, 
                                                    long screenXArg,