Commit Graph

71 Commits

Author SHA1 Message Date
Nicholas Nethercote
a58025002f 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.
2017-06-22 17:08:53 +10:00
Emilio Cobos Álvarez
3731858edf Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle
2017-04-30 17:30:08 +02:00
Masatoshi Kimura
fd136e7327 Bug 1358758 - Use CSSIntRect for nsIFrame::GetScreenRect. r=kats
MozReview-Commit-ID: KXPL1ERbFDa
2017-04-25 07:33:13 +09:00
Stone Shih
2b86511344 Bug 606885 - Fire drag events with keyboard modifiers. r=enn 2017-02-17 11:29:42 +08:00
Cameron McCormack
5f9911da79 Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
cku
45e5563bae Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange
Each concrete class of imgIContainer is able to handle opacity already. All we
need to do is pass opacity value to them.

MozReview-Commit-ID: EMkLnG3YXA1
2017-01-03 13:53:22 +08:00
Iris Hsiao
f05dc61a9f Backed out changeset c868ab532766 (bug 1323912) 2017-01-04 21:47:12 -05:00
cku
f1ffeaa1c2 Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange
Each concrete class of imgIContainer is able to handle opacity already. All we
need to do is pass opacity value to them.

MozReview-Commit-ID: EMkLnG3YXA1
2017-01-03 13:53:22 +08:00
Neil Deakin
45e02b912c Bug 1309596, add an updateDragImage method to modify the drag feedback image during the drag, r=smaug 2016-12-23 18:09:44 -05:00
Sylvestre Ledru
a78ffc700c Bug 1317973 - Use auto type specifier for variable declarations to improve code readability and maintainability r=tnikkel
MozReview-Commit-ID: 5RDrGaxV3E4
2016-11-16 15:22:36 +01:00
Sylvestre Ledru
87ea1806c2 Bug 1317973 - Replace default bodies of special member functions with = default; r=tnikkel
MozReview-Commit-ID: EV0tM3A26XY
2016-11-16 15:23:37 +01:00
Edwin Flores
613846be56 Bug 1295272 - Discard internal DataTransferItem data in nsBaseDragService::EndDragSession - r=enndeakin 2016-11-28 11:39:22 +00:00
Neil Deakin
9952d272a7 Bug 1301673, convert the image width and height to device pixels so that custom drag images are drawn at the right size, r=tn 2016-10-19 15:01:40 -04:00
Neil Deakin
f3db8e2bb9 Bug 1301673, properly handle disabled drag feedback image and failed drag feedbacks in content processes, r=tn 2016-10-19 15:01:39 -04:00
Neil Deakin
79c0ef78dd Bug 1301673, use the correct coordinates when drag feedback is disabled or fails; this allows the drag feedback on Mac to appear as a grey rectangle, r=tn 2016-10-19 15:01:39 -04:00
Neil Deakin
df6ce0d915 Bug 1301673, use device pixels for the supplied drag position and the computed dragrectangle, r=tn 2016-10-19 15:01:39 -04:00
Neil Deakin
9120a44fd2 Bug 1301673, don't confuse different coordinate types in image offsets, r=tn 2016-10-19 15:01:39 -04:00
Neil Deakin
4a820ef165 Bug 1301673, use more specific coordinates for screen position in drag calculations, r=tn 2016-10-19 15:01:39 -04:00
Eric Rahm
2a4d3b22b9 Bug 1309698 - Remove usage of nsISupportsArray from nsIDragService. r=smaug 2016-10-18 11:56:20 -07:00
Eric Rahm
ce3a293d8c Bug 1310017 - Remove nsISupportsArray usage from nsITransferable and nsIFormatConverter. r=smaug
This converts |nsITransferable.flavorsTransferableCanExport| and
|nsITransferable.flavorsTransferableCanImport| to return a |nsIArray|.

|nsIFormatConverter.getInputDataFlavors| and
|nsIFormatConverter.getOutputDataFlavors| are updated as well.
2016-10-16 12:43:56 -07:00
Kan-Ru Chen
a9b19d0584 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
2016-08-24 14:47:04 +08:00
Jonathan Kingston
ed99242d32 Bug 1192945 - Use channel->asyncOpen2 in widget/windows/nsDataObj.cpp. r=ckerschb
MozReview-Commit-ID: 5whNAj5KAjf
2015-08-10 12:56:47 -07:00
Randell Jesup
48d6215a5d Backed out changeset 36e71bcb0266 (bug 1192945) 2016-06-10 02:24:08 -04:00
Jonathan Kingston
99b2793b93 Bug 1192945 - Use channel->ascynOpen2 in widget/windows/nsDataObj.cpp . r=ckerschb, r=jmathies
MozReview-Commit-ID: 5whNAj5KAjf
2015-08-10 12:56:47 -07:00
Nicholas Nethercote
a41e57a9b1 Bug 1276824 (part 1) - Rename gfxContext::ForDrawTarget{,WithTransform}(). r=milan.
The new names Create{,PreservingTransform}OrNull() better communicate that
these functions (a) do object creation, and (b) are fallible.
2016-06-07 09:39:56 +10:00
Jonathan Watt
fa7b69b631 Bug 1277862, part 3 - Rename Moz2D's Filter to SamplingFilter in the rest of the tree. r=Bas 2016-05-25 17:01:18 +01:00
Blake Kaplan
7a30fa561f Bug 1244533 - Pass dragend coordinates down to the content process. r=enndeakin 2016-05-19 11:55:40 -07:00
Moritz Brunner
356b295e65 Bug 732733 - Resize drag image relative to the available screensize. r=jimm 2016-05-13 06:48:00 -04:00
Jonathan Watt
5199de2cab No Bug - Remove some unnecessary SVGImageContext.h includes and add comments. r=sparky 2016-04-22 15:07:31 +01:00
Botond Ballo
255b5d9300 Bug 1260018 - Route drag events to APZ, so it can accurately detect the end of a drag. r=kats 2016-04-18 14:24:28 -04:00
Masayuki Nakano
99eab530eb Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug
MozReview-Commit-ID: ESWM5ZyBpSR
2016-04-18 23:09:02 +09:00
Nathan Froyd
3aa2743f4f Bug 1264784 - part 1 - call nsIFrame::{GetScreenRect,GetView} instead of their *External counterparts; r=dholbert
The latter functions just call through to the former functions, and
we're going to remove the latter functions in a separate, subsequent
patch.
2016-04-15 19:37:35 -04:00
Milan Sreckovic
dd0830c93c Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman
MozReview-Commit-ID: rHhLEDZEQt
2016-04-12 15:18:11 -04:00
Jonathan Watt
947f9705a7 Bug 1263785 - Kill off the deprecated nsINode::GetCurrentDoc. r=baku 2016-03-31 12:46:32 +01:00
Masayuki Nakano
53779f7f29 Bug 1259662 part.2 Rename WidgetDragEvent::userCancelled to WidgetDragEvent::mUserCancelled r=smaug
MozReview-Commit-ID: 1Nx5NssvbM9
2016-03-31 19:06:05 +09:00
Timothy Nikkel
e2558e6f26 Bug 1209780. Check DrawResult return value in nsBaseDragService. r=seth 2016-03-10 00:37:18 -06:00
David Rajchenbach-Teller
323ccee44c Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa 2016-01-15 11:38:03 +01:00
Sebastian Hengst
2e241e7e5e Backed out 2 changesets (bug 1224374) for Windows bustage. r=bustage on a CLOSED TREE
Backed out changeset 5f458e6e4997 (bug 1224374)
Backed out changeset 0dc02cb0b604 (bug 1224374)
2016-01-19 21:30:41 +01:00
David Rajchenbach-Teller
f7045cd073 Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa 2016-01-15 11:38:03 +01:00
Bogdan Postelnicu
ed88172c70 Bug 1231329 - run ConvertToUnscaledDevPixels if *aPresContext is valid. r=roc 2015-12-11 03:16:00 +01:00
Nicholas Nethercote
a0edd1fb5f Bug 1230863 - Remove unused nsPresContext args from many functions. r=roc. 2015-12-06 17:15:53 -08:00
Nicholas Nethercote
2459b09f92 Bug 1223310 (part 1) - Pass a LayoutDeviceIntPoint instead of an nsIntPoint to InitEvent(). r=kats.
Also use direct assignment for some LayoutDeviceIntPoint assignments, rather
than doing it field-by-field.
2015-11-09 21:37:32 -08:00
Bill McCloskey
c65a5ca18d Bug 1218552 - Fix GTK drag-and-drop coordinate scaling on HiDPI displays (r=karlt) 2015-11-04 13:40:15 -08:00
Birunthan Mohanathas
ac37dec517 Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Wes Kocher
0c7830821c Backed out changeset 47d076aeb8c4 (bug 1218552) for build bustage CLOSED TREE 2015-10-30 13:37:50 -07:00
Bill McCloskey
37abb5c1c7 Bug 1218552 - Fix GTK drag-and-drop coordinate scaling on HiDPI displays (r=karlt) 2015-10-30 13:01:58 -07:00
Karl Tomlinson
2f9063a893 bug 1216916 clean up when InvokeDragSessionWithImage/Selection() fails r=roc 2015-10-21 20:12:42 +13:00
Karl Tomlinson
13517b1a0a bug 1216916 clean up when InvokeDragSession() fails r=roc 2015-10-21 22:16:40 +13:00
Nathan Froyd
4e6d8f6705 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
Nathan Froyd
bf7f6dda03 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00