Граф коммитов

101 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Aryeh Gregor af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00
Aryeh Gregor b03daa975a Bug 1314388 - Remove SVGZoomEvent; r=longsonr,smaug
Some code in SVGSVGElement.cpp might be unnecessary now, but Robert said
to leave it for a followup.

MozReview-Commit-ID: 8PpRGeGrREJ
2017-04-04 15:36:22 +03:00
Thinker K.F. Li 84c4fd2c69 Bug 1323076 - Part 2: EventDispatcher with flag checking for TaskTracer. r=smaug 2017-03-22 21:44:00 +01:00
Olli Pettay 121666c25e Bug 1333901, fix hazard issue, r=me
--HG--
extra : rebase_source : 204c37d51ab7534211364ddda8162da678b5734e
2017-01-26 16:09:24 +02:00
Olli Pettay 68d3ebc645 Bug 1333901 - support document.createEvent(ErrorEvent), r=masayuki
--HG--
extra : rebase_source : c0cb764a8d7d99fb681cafb7c99bb334627299c8
2017-01-26 12:00:16 +02:00
Carsten "Tomcat" Book e8b6225b69 Backed out changeset fe6d35a774ed (bug 1333901) for causing hazard warnings after landing 2017-01-26 14:40:42 +01:00
Olli Pettay c479f3ffbf Bug 1333901 - support document.createEvent(ErrorEvent), r=masayuki 2017-01-26 12:00:16 +02:00
Masayuki Nakano e0dcff15d2 Bug 1322736 part.3 Remove dom::BeforeAfterKeyboardEvent and InternalBeforeAfterKeyboardEvent r=smaug
MozReview-Commit-ID: Eyz2HjIdQEW

--HG--
extra : rebase_source : 182f4f8236dcfb83f8725a9c66cc46dedbb14f2c
2016-12-16 16:25:22 +09:00
Andrea Marchesini e566d05769 Bug 1323386 - Get rid of NS_NewDOMStorageEvent, r=smaug 2016-12-15 13:18:31 +01:00
Phil Ringnalda 61baa2aa9a Merge m-i to m-c, a=merge
MozReview-Commit-ID: A3wgReQAalj
2016-11-17 19:21:20 -08:00
Stone Shih a4fbee5fbd Bug 1305458 Part14: Refine assertion in EventTargetChainItem::Create r=smaug
--HG--
extra : rebase_source : 5a0a15405e72cdcdf4a808072c1c015be0171a3e
2016-11-15 16:42:29 +08:00
Stone Shih 16335c6088 Bug 1305458 Part13: Refine event target chain creation. r=smaug
MozReview-Commit-ID: 6DEJDoAzjiu

--HG--
extra : rebase_source : 1f7cea9867c99c1f69cfcee27cf3a8119f9c5a25
2016-11-03 11:01:06 +08:00
Stone Shih e5ea1805f2 Bug 1305458 Part12: Refine EventTargetChain flags to reduce overheads. r=smaug
MozReview-Commit-ID: CxiMsVw3ydz

--HG--
extra : rebase_source : b5d2d8acb3d93e69aab6b8551b9e5ab225949f12
2016-11-02 11:39:32 +08:00
Stone Shih 07066e00ca Bug 1305458 Part4: Call EventTargetChainItem::PreHandleEvent even it sets mCanHandle=false. r=smaug
MozReview-Commit-ID: H9UAHNJGiOD

--HG--
extra : rebase_source : 4d2a3d8944ed1019ac8e87739eb65441b976dd01
2016-10-22 08:47:30 +08:00
Stone Shih 8f2ec136e1 Bug 1305458 Part3: Add EventTargetChainItem::GetFirstEventTarget. r=smaug
MozReview-Commit-ID: 7EuGKsG9maX

--HG--
extra : rebase_source : 3eb173356333458c0a7b2a53b3868c6412071e10
2016-10-22 09:21:40 +08:00
Stone Shih 6df624de3f Bug 1305458 Part2: Add nsIDOMEventTarget::PreHandleEvent. r=smaug
MozReview-Commit-ID: HiCDTXgNr0l

--HG--
extra : rebase_source : ce3318fac96a1baf86059274230b1e6cae750347
2016-10-21 11:29:34 +08:00
Stone Shih 1ed10ff082 Bug 1305458 Part1: Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: FM3vDUyLOCb

--HG--
extra : rebase_source : 5a513af84718a6d591f77437a0704984c8fc2b67
2016-10-21 10:11:07 +08:00
Stone Shih 5d6aec8c60 Bug 1315862 Part1: Stop dispatching pointer events in the system group. r=masayuki,smaug
MozReview-Commit-ID: 8Xqp3bxlRFt

--HG--
extra : rebase_source : 25afbefb19e5ae613e9e493ea2f275a36004d523
2016-11-11 18:02:37 +08:00
Andrea Marchesini 4f20f137bf Bug 1309139 - Get rid of NS_NewDOMMessageEvent, r=smaug 2016-10-12 15:17:10 +02:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Aryeh Gregor 00e1330640 Bug 1295588 - Add createEvent() telemetry; r=smaug, data-review=bsmedberg
The createEvent() method supports only a fixed list of legacy event
types, and we would like to converge with other browsers on a list of
events to support.  To this end, we want to know if any supported types
are unused so we can drop them.

MozReview-Commit-ID: 8uB1vepBCpi
2016-08-21 16:06:14 +03:00
Olli Pettay 7cbc9752a1 Bug 1288898 - Document::createEvent sometimes creates events with the initialized flag set, r=masayuki 2016-07-29 19:45:52 +03:00
Kartikaya Gupta eb68bbaaa8 Bug 970346 - Add a DocShell attribute to override the default touch event options to a tab. r=bz
MozReview-Commit-ID: 4BdhwQRBavd
2016-07-18 10:26:38 -04:00
Andrea Marchesini 392b98b4bc Bug 1266701 - some header missing in dom/events, r=jwatt 2016-04-22 15:37:28 +02:00
Masayuki Nakano 9170348baf Bug 1259656 part.7 Rename WidgetEvent::originalTarget to WidgetEvent::mOriginalTarget r=smaug
MozReview-Commit-ID: G1WVCWkS0Lt

--HG--
extra : rebase_source : e4790266f4efa33269c073bca1d98f9e8e6c90d7
2016-04-19 01:33:23 +09:00
Masayuki Nakano 8caf2f2633 Bug 1259656 part.6 Rename WidgetEvent::currentTarget to WidgetEvent::mCurrentTarget r=smaug
MozReview-Commit-ID: 9UcpPbgEbB0

--HG--
extra : rebase_source : f044e89581d0591a87e4c459978cc4ca727d3303
2016-04-19 01:15:16 +09:00
Masayuki Nakano da3898bcb7 Bug 1259656 part.5 Rename WidgetEvent::target to WidgetEvent::mTarget r=smaug
MozReview-Commit-ID: L0GnVR6NcAe

--HG--
extra : rebase_source : a8784d4599dad317f8335477afac9a7d4b92918f
2016-04-19 00:46:00 +09:00
Masayuki Nakano 399cac9177 Bug 1256589 part.7 Add PropagationStopped() to WidgetEvent r=smaug
MozReview-Commit-ID: 3eLDURWr6d9

--HG--
extra : rebase_source : 058ab0d76512622a63c792cb91eb83700743549a
extra : source : 5fda4309b3413d8227828dcfce585500290c0a04
2016-03-17 16:21:57 +09:00
Masayuki Nakano 12a007fd7f Bug 1203059 part.2 When an event is reserved by chrome, it should be fired only on chrome r=smaug 2016-03-16 10:58:28 +09:00
Aidin Gharibnavaz 6863090c8a Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r=smaug
MozReview-Commit-ID: Hm8Owq17KXn

--HG--
extra : transplant_source : 2%82%D5%89%19%94%7C%E7%CA1%99%B5%24%1F5%E1%C0%1F%DE%07
2016-02-12 19:10:07 +03:30
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Nathan Froyd 5aa6eb62b0 Bug 1225873 - micro-optimize creating event target chains; r=smaug
This code is only called in a few cases that aren't on the critical
path, but less code is less code: we eliminate the checks for whether we
have enough space in the copying loop, and maybe save some function
calls.
2015-11-18 09:48:45 -05:00
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Nathan Froyd 01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Bobby Holley 110f12e7ca Bug 1072150 - Use the opt-out for various sloppy consumers. r=bz 2015-09-24 14:02:41 -07:00
Masayuki Nakano 6ecfef2cde Bug 895274 part.5 Rename NS_EVENT_NULL to eVoidEvent r=smaug 2015-08-29 08:58:26 +09:00
Masayuki Nakano 66f2c27305 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Aryeh Gregor 5aeef0231d Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Eric Rahm a1f6b6b345 Bug 1171294 - Stop warning if piTarget is null. r=smaug 2015-06-04 09:03:40 -07:00
Andrea Marchesini 8674a0606d Bug 1161950 - Remove support for createEvent("CloseEvent") / initCloseEvent, r=smaug 2015-05-14 12:25:36 +01:00
Kartikaya Gupta 796beb9721 Bug 1125422 - Change EventDispatcher::Dispatch to take an nsTArray instead of a nsCOMArray. r=smaug 2015-02-10 16:28:07 -05:00
Shelly Lin 2be44806ed Bug 1100259 - Add TaskTracer labels in EventDispatcher and console.log of message with special prefix. r=sinker. 2014-11-20 10:57:27 +08:00
Gina Yeh 1d9d1f4c1f Bug 989198, Patch 2: Implementation of BeforeAfterKeyboardEvent, sr=smaug, r=masayuki. 2014-11-03 15:05:32 +08:00
Ryan VanderMeulen f00e2738a4 Backed out 6 changesets (bug 989198, bug 1082963) for causing bug 1083231.
Backed out changeset a7c972407578 (bug 1082963)
Backed out changeset 94d1b30bde00 (bug 989198)
Backed out changeset 01e064ceb505 (bug 989198)
Backed out changeset f5a538109e36 (bug 989198)
Backed out changeset 3ff227d79d74 (bug 989198)
Backed out changeset 186743fc6f6d (bug 989198)

CLOSED TREE
2014-10-16 12:57:18 -04:00
Gina Yeh 303bfb5736 Bug 989198, Patch 2: Implementation of BeforeAfterKeyboardEvent, sr=smaug, r=masayuki.
---
 dom/events/BeforeAfterKeyboardEvent.cpp          |   92 ++++++++++++++++++++++
 dom/events/BeforeAfterKeyboardEvent.h            |   45 +++++++++++
 dom/events/EventDispatcher.cpp                   |    3 +
 dom/events/KeyboardEvent.cpp                     |   60 ++++++++------
 dom/events/KeyboardEvent.h                       |    8 +-
 dom/events/moz.build                             |    2 +
 dom/events/test/test_all_synthetic_events.html   |    4 +
 dom/interfaces/events/nsIDOMEvent.idl            |    7 ++
 dom/tests/mochitest/general/test_interfaces.html |   48 ++++++-----
 dom/webidl/BeforeAfterKeyboardEvent.webidl       |   24 ++++++
 dom/webidl/moz.build                             |    1 +
 11 files changed, 250 insertions(+), 44 deletions(-)
 create mode 100644 dom/events/BeforeAfterKeyboardEvent.cpp
 create mode 100644 dom/events/BeforeAfterKeyboardEvent.h
 create mode 100644 dom/webidl/BeforeAfterKeyboardEvent.webidl
2014-10-14 15:09:20 +08:00
Masayuki Nakano d08404080c Bug 960871 part.7 Get rid of WidgetTextEvent r=smaug 2014-10-07 19:01:48 +09:00
Masayuki Nakano 9011740f12 Bug 960871 part.6 Use WidgetCompositionEvent for NS_COMPOSITION_CHANGE instead of WidgetTextEvent r=smaug 2014-10-07 19:01:48 +09:00
Ehsan Akhgari 1b1d6ffebf Bug 1061023 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : c80c5f9d7ae28286513cdb52ad76b46c240bdd5d
2014-09-01 18:26:43 -04:00