Commit Graph

32 Commits

Author SHA1 Message Date
Kyle Huey
d9adfa1d30 Bug 1224061: Make Event::InitEvent infallible. r=smaug 2015-11-13 08:09:42 +08:00
Randall Barker
d93f8381b4 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
Ben Kelly
da0565c244 Bug 1215140 P9 Provide file and line number when FetchEvent.preventDefault() cancels a request. r=bz
* * *
Bug 1215140 P9 interdiff 001
2015-10-29 19:53:25 -07:00
Nathan Froyd
e4e2da55c9 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
Masayuki Nakano
08c1409ff7 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
451161e458 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Aryeh Gregor
2aab280bb3 Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
George Wright
97921dfc1e 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
c979f253c0 Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Rahul
b517abd208 Bug 1152473 - Remove InstallEvent. r=nsm,ehsan 2015-04-20 18:47:13 -07:00
Ehsan Akhgari
5cccea6f0f Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky
988b8e01be 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
cae6c20e26 Bug 69787. Implement MouseEvent.offsetX/Y. r=mats,smaug 2015-03-14 00:50:10 +13:00
Boris Zbarsky
11743e14d0 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
2a13fc70a1 Bug 1125040: Use LayoutDeviceIntPoint for GetScreenCoords r=botond 2015-02-15 13:52:28 -05:00
Nikhil Marathe
b4bb7fa086 Bug 1113627 - Refactor lifecycle event dispatching and handling. r=baku,bz 2014-12-19 05:01:53 -08:00
Olli Pettay
01fdc982c5 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
Olli Pettay
943d241995 Bug 1119652, create mozilla::dom::Event::As*Event automatically for all the codegen'ed Events and annotate As*Event with MOZ_OVERRIDE in the codegen, r=bz
--HG--
extra : rebase_source : 8dc5e2f29d4ae7702e4f41c01e971016c357c85a
2015-01-10 13:46:41 +02:00
Ehsan Akhgari
c01ec2fa46 Bug 1118546 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/events; r=baku 2015-01-07 10:19:11 -05:00
Ehsan Akhgari
3e2be4b2e7 Bug 1090242 - Fix some more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : 22f80376a2ce9415dc9d7fdd2444405d3cd7e011
2014-10-10 17:28:35 -04:00
Olli Pettay
6efa464486 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
3270a77c09 Bug 874050, Make Nofification's click event cancelable, r=wchen
--HG--
extra : rebase_source : 155ceeec566a9726d9280be0eeeb6e0209df456c
2014-10-15 17:48:04 +03:00
William Chen
3f5e38c7c5 Bug 887541 - Implement web components event path and event retargeting. r=smaug 2014-08-26 20:19:56 -07:00
Ehsan Akhgari
a7206dd7d4 Bug 1048247 - Fix more bad implicit constructors in DOM; r=smaug 2014-08-05 09:19:51 -04:00
Benoit Jacob
84b13c683d Bug 1028588 - Fix dangerous public destructors in the rest of dom/ - r=ehsan 2014-06-23 15:56:07 -04:00
Brian Birtles
a8e047d3c2 Bug 77992 part 3 - Make event.timeStamp return a DOMHighResTimeStamp; r=bz
Even when dom.event.highrestimestamp.enabled is false and we should return
a DOMTimeStamp (=unsigned long long), we still just return a double since that's
what would happen anyway when we convert the DOMTimeStamp to a Javascript
Number and it simplifies the code significantly to just always return a double.
2014-06-06 14:29:49 +09:00
Brian Birtles
ca996e25d9 Bug 77992 part 2 - Make event.timeStamp use TimeStamp value based on a pref; r=smaug
Note that this pref isn't fully live since the timeStamp member of the event
interface is [Pure] and so values will be cached.
2014-06-06 14:29:49 +09:00
Kyle Huey
081cb57b98 Bug 1019248: Convert ProgressEvent to WebIDL codegen. r=smaug 2014-06-03 15:52:36 -07:00
Boris Zbarsky
fdbb455d4f Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
Boris Zbarsky
3f26a82832 Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""

plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 18:27:17 -04:00
Olli Pettay
f3870cd2bf Bug 985988, event handlers should update preventDefault flag similar way to event.preventDefault(), r=masayuki
--HG--
extra : rebase_source : f82af82dfd290fbba851eda5dceebcd1911ef72b
2014-03-21 19:46:15 +02:00
Masayuki Nakano
66706f5a6e Bug 975688 part.28 Rename nsDOMEvent to mozilla::dom::Event r=smaug
--HG--
rename : dom/events/nsDOMEvent.cpp => dom/events/Event.cpp
rename : dom/events/nsDOMEvent.h => dom/events/Event.h
2014-03-05 09:37:43 +09:00