Commit Graph

77 Commits

Author SHA1 Message Date
Kyle Huey
662c429aaa Bug 1224061: Make Event::InitEvent infallible. r=smaug 2015-11-13 08:09:42 +08:00
Randall Barker
ef6c693442 Bug 1220925 - Event::GetScreenCoords should return CSSIntPoint instead of LayoutDevicePoint. r=botond
This patch converts Event::GetScreenCoords to return the same type as Event::GetClientCoords
and Event::GetPageCoords which is a CSSIntPoint. When the function was originally updated it
was switched to returning LayoutDevicePoint. Additionally the redundant functions
UIEvent::CalculateClientPoint and UIEvent::CalculateScreenPoint were removed.
2015-11-10 11:32:40 -05:00
Nathan Froyd
9c5965b035 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Bobby Holley
f597bf6b1f Bug 1072150 - Use the opt-out for various sloppy consumers. r=bz 2015-09-24 14:02:41 -07:00
Boris Zbarsky
0b65334b28 Bug 1203404. offsetX/Y on mouse events should remain target-relative, instead of becoming page-relative, after event dispatch is done. r=roc 2015-09-18 13:36:13 -04:00
Masayuki Nakano
13ad066f9b Bug 895274 part.243 Rename NS_TOUCH_END to eTouchEnd r=smaug 2015-09-15 00:14:35 +09:00
Masayuki Nakano
6038863222 Bug 895274 part.241 Rename NS_TOUCH_START to eTouchStart r=smaug 2015-09-15 00:14:34 +09:00
Masayuki Nakano
3f9841f00c Bug 895274 part.232 Rename NS_EDITOR_INPUT to eEditorInput r=smaug 2015-09-15 00:14:33 +09:00
Masayuki Nakano
5cba173d14 Bug 895274 part.149 Rename NS_USER_DEFINED_EVENT to eUnidentifiedEvent r=smaug 2015-09-10 10:40:04 +09:00
Masayuki Nakano
622f45c557 Bug 895274 part.94 Rename NS_XUL_COMMAND to eXULCommand r=smaug 2015-09-04 19:54:12 +09:00
Masayuki Nakano
b1f146c2fa Bug 895274 part.66 Rename NS_FORM_SELECTED to eFormSelect r=smaug 2015-09-02 15:08:00 +09:00
Masayuki Nakano
52685414f3 Bug 895274 part.65 Rename NS_FORM_CHANGE to eFormChange r=smaug 2015-09-02 15:08:00 +09:00
Masayuki Nakano
5138f6fcbf Bug 895274 part.64 Rename NS_FORM_RESET to eFormReset r=smaug 2015-09-02 15:08:00 +09:00
Masayuki Nakano
4d315c9f6d Bug 895274 part.63 Rename NS_FORM_SUBMIT to eFormSubmit r=smaug 2015-09-02 15:08:00 +09:00
Masayuki Nakano
5f60978161 Bug 895274 part.31 Rename NS_MOUSE_CLICK to eMouseClick r=smaug 2015-08-29 08:58:32 +09:00
Masayuki Nakano
69dd8b3bcc Bug 895274 part.30 Rename NS_MOUSE_DOUBLECLICK to eMouseDoubleClick r=smaug 2015-08-29 08:58:31 +09:00
Masayuki Nakano
004e5bb7df Bug 895274 part.27 Rename NS_MOUSE_BUTTON_DOWN to eMouseDown r=smaug 2015-08-29 08:58:30 +09:00
Masayuki Nakano
1b91479600 Bug 895274 part.26 Rename NS_MOUSE_BUTTON_UP to eMouseUp r=smaug 2015-08-29 08:58:30 +09:00
Masayuki Nakano
6e7be53c8f Bug 895274 part.11 Rename NS_KEY_DOWN to eKeyDown r=smaug 2015-08-29 08:58:27 +09:00
Masayuki Nakano
b68467aba9 Bug 895274 part.10 Rename NS_KEY_UP to eKeyUp r=smaug 2015-08-29 08:58:27 +09:00
Masayuki Nakano
40a4dbb5ca Bug 895274 part.9 Rename NS_KEY_PRESS to eKeyPress r=smaug 2015-08-29 08:58:27 +09:00
Masayuki Nakano
c711b059dc Bug 895274 part.5 Rename NS_EVENT_NULL to eVoidEvent r=smaug 2015-08-29 08:58:26 +09:00
Masayuki Nakano
bf7357bb6a Bug 895274 part.4 Clean up the macro names of EventNameList.h r=smaug 2015-08-26 21:56:59 +09:00
Masayuki Nakano
3bf74a341a Bug 895274 part.3 Make the enum of event messages a named enum IGNORE IDL r=smaug 2015-08-26 21:56:59 +09:00
Masayuki Nakano
d56a7cc348 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Aryeh Gregor
f5961e4a6b Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Olli Pettay
1747360584 Bug 1177406, don't rely on owner to be set only on main thread, r=khuey 2015-06-25 09:26:09 -07:00
Kathy Brade
be0ea65a02 Bug 418986 - Resist fingerprinting by preventing exposure of screen and system info. r=mrbkap, r=heycam 2015-06-07 09:02:00 -04:00
George Wright
8b8942a474 Bug 1119074 - If we're stopping event propagation from XUL popups, also stop them from crossing process boundaries r=smaug,felipe 2015-05-25 16:54:13 -04:00
Andrew McCreight
aeff7c99ee Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Mike Hommey
ccd2a9b975 Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Boris Zbarsky
54c64f20a9 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Robert O'Callahan
b97c4bec29 Bug 1143972. Return 0,0 for offsetX/Y when the document has no presentation. r=mats 2015-03-18 02:04:32 +13:00
Robert O'Callahan
c12182dad4 Bug 69787. Implement MouseEvent.offsetX/Y. r=mats,smaug 2015-03-14 00:50:10 +13:00
Boris Zbarsky
0f9ff716f0 Bug 1135151. Add a WrapNativeParent specialization for the nsIGlobalObject case, and make Event return nsIGlobalObject as its parent object. r=smaug 2015-02-23 10:03:40 -05:00
David Zbarsky
14cd211692 Bug 1125040: Use LayoutDeviceIntPoint for GetScreenCoords r=botond 2015-02-15 13:52:28 -05:00
David Zbarsky
32c35eeb2a Bug 1125040: Use LayoutDeviceIntPoint for nsIWidget::WidgetToScreen r=botond 2015-02-04 15:21:03 -05:00
Phil Ringnalda
f55829d7eb Back out 5167196c4b98 (bug 1125040) for not compiling on Linux
CLOSED TREE
2015-02-01 15:27:14 -08:00
David Zbarsky
058ba6807f Bug 1125040: Use LayoutDeviceIntPoint for nsIWidget::WidgetToScreen r=botond 2015-02-01 17:27:41 -05:00
David Zbarsky
1330fc1496 Bug 1125040: Use LayoutDeviceIntPoint for nsLayoutUtils::GetEventCoordinatesRelativeTo and Touch::mRefPoint r=botond 2015-02-01 17:27:31 -05:00
Olli Pettay
c24d27ebac Bug 1079236, Event.composedTarget to reveal the original non-native-anonymous event target, r=wchen, r=smaug 2015-01-23 13:55:46 +02:00
Xidorn Quan
ef4f779722 Bug 910532 part 1 - Add flag to indicate prevent default from chrome. r=smaug
--HG--
extra : source : 0c9290ce08d739394df1787a05beff8dfddb1b4e
2015-01-21 12:16:04 +11:00
Karl Tomlinson
0a52493d8d bug 1096132 rename UnscaledAppUnitsPerDevPixel() to AppUnitsPerDevPixelAtUnitFullZoom() r=tn
--HG--
extra : rebase_source : 220ede5d449a752c16064bb77905bc68af3df707
2014-11-14 00:53:02 +13:00
Karl Tomlinson
e04362ca98 backout bug 1096132 for Mac build failure
--HG--
extra : rebase_source : 6994fe50e8fb1a4f89298e1b9ad1c714acdfe39e
2014-11-12 16:02:34 +13:00
Karl Tomlinson
1085e66407 bug 1096132 rename UnscaledAppUnitsPerDevPixel() to AppUnitsPerDevPixelAtUnitFullZoom() r=tn
--HG--
extra : rebase_source : 113b249f2cb6f1619e0b1a495655726b5100038b
2014-11-08 17:48:14 +13:00
Olli Pettay
329a5d00db Bug 1084421 - Only Events with a wrapper should trigger GC more likely, r=mccr8
--HG--
extra : rebase_source : 398e18dfc3d103ee139cc3c5d49710855c925e82
2014-10-18 02:16:58 +03:00
Olli Pettay
30ec898b4b Bug 874050, Make Nofification's click event cancelable, r=wchen
--HG--
extra : rebase_source : 155ceeec566a9726d9280be0eeeb6e0209df456c
2014-10-15 17:48:04 +03:00
Peter Van der Beken
9254096129 Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz.
--HG--
extra : rebase_source : 89c476cd9436530b2df5acc903909e34188417a0
2014-10-07 11:44:49 +02:00
Boris Zbarsky
8df706123f Bug 908390 followup. Fix up event timestamps on workers, and enable the test that was supposed to test for it. r=khuey pending 2014-08-30 00:56:35 -04:00
William Chen
e50e0d25cd Bug 887541 - Implement web components event path and event retargeting. r=smaug 2014-08-26 20:19:56 -07:00