Bug 920425 part.5 Use mozilla::WidgetEvent::AsScrollPortEvent() r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 18 Oct 2013 15:10:21 +0900
changeset 166068 9f96402dc1d47894f25db66e36ddb4a8756ce519
parent 166067 582c33cea601a7f916639328e053a2edf823f2ca
child 166069 6c2180e88728c86eed949422d0c61289d6c1cf7b
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs920425
milestone27.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 920425 part.5 Use mozilla::WidgetEvent::AsScrollPortEvent() r=smaug
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMUIEvent.cpp
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -618,18 +618,17 @@ nsDOMEvent::DuplicatePrivateData()
       WidgetWheelEvent* oldWheelEvent = static_cast<WidgetWheelEvent*>(mEvent);
       WidgetWheelEvent* wheelEvent = new WidgetWheelEvent(false, msg, nullptr);
       wheelEvent->AssignWheelEventData(*oldWheelEvent, true);
       newEvent = wheelEvent;
       break;
     }
     case NS_SCROLLPORT_EVENT:
     {
-      InternalScrollPortEvent* oldScrollPortEvent =
-        static_cast<InternalScrollPortEvent*>(mEvent);
+      InternalScrollPortEvent* oldScrollPortEvent = mEvent->AsScrollPortEvent();
       InternalScrollPortEvent* scrollPortEvent =
         new InternalScrollPortEvent(false, msg, nullptr);
       scrollPortEvent->AssignScrollPortEventData(*oldScrollPortEvent, true);
       newEvent = scrollPortEvent;
       break;
     }
     case NS_SCROLLAREA_EVENT:
     {
--- a/content/events/src/nsDOMUIEvent.cpp
+++ b/content/events/src/nsDOMUIEvent.cpp
@@ -46,18 +46,17 @@ nsDOMUIEvent::nsDOMUIEvent(mozilla::dom:
     {
       InternalUIEvent *event = static_cast<InternalUIEvent*>(mEvent);
       mDetail = event->detail;
       break;
     }
 
     case NS_SCROLLPORT_EVENT:
     {
-      InternalScrollPortEvent* scrollEvent =
-        static_cast<InternalScrollPortEvent*>(mEvent);
+      InternalScrollPortEvent* scrollEvent = mEvent->AsScrollPortEvent();
       mDetail = (int32_t)scrollEvent->orient;
       break;
     }
 
     default:
       mDetail = 0;
       break;
   }