Commit Graph

266 Commits

Author SHA1 Message Date
Masayuki Nakano
0e46431f4f Bug 1179632 part.2 WidgetCompositionEvent should store NativeIMEContext which caused the event and PuppetWidget should store it for GetNativeIMEContext() r=smaug, sr=smaug 2015-12-11 15:15:57 +09:00
Masayuki Nakano
dc1bebbf22 Bug 1179632 part.1 native IME context should not be stored in InputContext but should be able to retrieve with nsIWidget::GetNativeData() r=smaug 2015-12-11 15:15:57 +09:00
Nicholas Nethercote
209e8be54e Bug 1230047 (part 1) - Make SynthesizeNativeTouch{Point,Tap}() take ScreenIntPoints. r=kats. 2015-12-02 21:45:38 -08:00
Nicholas Nethercote
7e3ab1c697 Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond. 2015-12-02 14:32:55 -08:00
Nicholas Nethercote
030fd36dff Bug 1229237 (part 5) - Make Update{Opaque,WindowDragging}Region() take a LayoutDeviceIntRegion. r=botond. 2015-11-25 21:42:59 -08:00
Nicholas Nethercote
31406e70ae Bug 1229237 (part 4) - Make ThemeGeometry::mRect a LayoutDeviceIntRect. r=botond. 2015-11-22 20:32:29 -08:00
Nicholas Nethercote
3b77d966c8 Bug 1229237 (part 3) - Make nsIWidget::Invalidate() take a LayoutDeviceIntRect. r=botond. 2015-11-16 21:18:31 -08:00
Nicholas Nethercote
6215f643a1 Bug 1229237 (part 2) - Make nsIWidget::DrawWindowUnderlay() take a LayoutDeviceIntRect. r=botond. 2015-11-16 20:34:00 -08:00
Nicholas Nethercote
5b298e5d07 Bug 1229237 (part 1) - Make nsIWidget::{Create,CreateChildren}() take a LayoutDeviceIntRect. r=botond. 2015-11-16 00:35:18 -08:00
Nicholas Nethercote
eca93c623a Bug 1228125 (part 3) - Remove nsIWidget::GetClientBoundsUntyped(). r=botond. 2015-11-25 20:55:36 -08:00
Nicholas Nethercote
d5979752f7 Bug 1228125 (part 2) - Remove nsIWidget::GetScreenBoundsUntyped(). r=botond. 2015-11-25 20:55:34 -08:00
Nicholas Nethercote
4d4e5f4387 Bug 1228125 (part 1) - Remove nsIWidget::GetBoundsUntyped(). r=botond.
This requires adding a new overloading of LayoutDevicePixel::ToAppUnits and a
new PixelCastJustification: LayoutDeviceIsParentLayerForRCDRSF.
2015-11-25 20:32:47 -08:00
Nicholas Nethercote
929ee0f0bf Bug 1225007 (part 1, attempt 3) - Use LayoutDevicePixel more in Cocoa widget code. r=kats. 2015-11-19 14:10:38 +11:00
Phil Ringnalda
a8f7f7dcab Backed out 2 changesets (bug 1225007) for frequent OS X "Shouldn't return empty rect" assertion failures, a=backout
Backed out changeset c5b352c74b35 (bug 1225007)
Backed out changeset 8a513c70ce7c (bug 1225007)
2015-11-19 20:55:26 -08:00
Nicholas Nethercote
b9abd35877 Bug 1225007 (part 1, attempt 2) - Use LayoutDevicePixel more in Cocoa widget code. r=kats. 2015-11-19 14:10:38 +11:00
Tooru Fujisawa
e5ae9d6de3 Bug 1224790 - Use SetFakeModal instead of SetModal for non-modal window opened by modal window. r=smaug, mstange 2015-11-18 20:12:26 +09:00
Nicholas Nethercote
38a8c624ec Backout 52ba24123046 and 66768d6a50fa (bug 1225007) for causing lots of test assertions on Mac. CLOSED TREE 2015-11-17 17:02:39 -08:00
Nicholas Nethercote
7488dd3e22 Bug 1225007 (part 1) - Use LayoutDevicePixel more in Cocoa widget code. r=kats. 2015-11-15 21:37:52 -08:00
Matt Brubeck
99950703f2 Bug 431620 - Remove unused function GetToggledKeyState [r=roc] 2015-11-16 16:06:41 -08:00
Nicholas Nethercote
f507c4752d Bug 1224482 (part 5) - Avoid excessive mozilla:: prefixes in nsIWidget and its subclasses. r=kats.
A couple of typedefs make things a lot nicer.
2015-11-13 01:37:02 -08:00
Nicholas Nethercote
195c3319dd Bug 1224482 (part 4) - Make GetClientSize() return a LayoutDeviceIntSize. r=kats. 2015-11-13 01:37:02 -08:00
Nicholas Nethercote
1804b2dda3 Bug 1224482 (part 3) - Replace GetClientOffsetUntyped() with GetClientOffset(). r=kats.
The patch also changes nsMenuPopupFrame::mLastClientOffset to
LayoutDeviceIntPoint.
2015-11-13 01:37:02 -08:00
Nicholas Nethercote
2cacd3de07 Bug 1224482 (part 2) - Replace GetNaturalBoundsUntyped() with GetNaturalBounds(). r=kats. 2015-11-13 01:37:02 -08:00
Nicholas Nethercote
fec16238b0 Bug 1224482 (part 1) - Tweak typed/untyped versions of Get{,Client,Screen}Bounds(). r=kats.
In nsIWidget, GetBoundsUntyped(), GetClientBoundsUntyped() and
GetScreenBoundsUntyped() are currently the primary implementations, and the
untyped versions are defined on top of them. This patch flips that around.
2015-11-12 16:04:52 -08:00
Nicholas Nethercote
e25f809f62 Bug 1224403 (part 12) - Remove WidgetToScreenOffsetUntyped(). r=kats.
There are few enough calls now that using WidgetToScreenOffset() +
ToUnknownPoint() is a better approach.
2015-11-12 15:37:18 -08:00
Nicholas Nethercote
c9d9c12f5f Bug 1224403 (part 9) - Remove GetRestoredBoundsUntyped(). r=kats.
The typed version can be used everywhere without difficulty.
2015-11-12 05:43:01 -08:00
Nicholas Nethercote
01ade14300 Bug 1224403 (part 5) - Make OnDefaultButtonLoaded() return/take a LayoutDeviceIntMargin. r=kats. 2015-11-12 04:34:29 -08:00
Nicholas Nethercote
66047527f1 Bug 1224403 (part 4) - Make {Get,Set}NonClientMargins() return/take a LayoutDeviceIntMargin. r=kats.
This required adding {To,From}UnknownMargin().
2015-11-11 23:05:04 -08:00
Nicholas Nethercote
b900f1cf11 Bug 1224403 (part 2) - Split GetClientOffset() into typed and untyped versions. r=kats. 2015-11-11 19:56:06 -08:00
Nicholas Nethercote
1ce280290d Bug 1224403 (part 1) - Make Configuration::mBounds a LayoutDeviceIntRect. r=kats. 2015-11-10 16:27:26 -08:00
Botond Ballo
6aaae8a2bc Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical 2015-11-06 22:13:40 -05:00
Nicholas Nethercote
ffaa7a3203 Bug 1223310 (part 2) - Use LayoutDeviceIntRect for bounds-related functions in nsIWidget. r=kats.
The patch renames the existing functions (GetBounds(), GetClientBounds(), etc)
by adding an |Untyped| suffix. It then adds typed equivalents, and uses those
typed equivalents in all the call sites where it's easy to do so. The trickier
remaining call sites are converted to use the Untyped-suffix version.
2015-11-09 21:37:32 -08:00
Botond Ballo
b4f149d49f Bug 1220923 - Make nsIntRegion a typedef for IntRegionTyped<UnknownUnits>. r=nical 2015-11-04 11:49:49 -05:00
Xidorn Quan
a715574aa2 Bug 1206468 - Remove unused internal appearance value -moz-mac-unified-toolbar. r=mstange 2015-10-23 19:51:34 +11: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
Nathan Froyd
e504437747 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
Benoit Girard
8f3e48831b Bug 1199885 - Part 12: Add StartScrollbarDrag IPC message. r=kats 2015-09-28 17:00:25 -04:00
Lee Salzman
fd95572dda Bug 1205045 - remove GTK calls from compositor thread. r=jmuizelaar 2015-09-15 16:46:39 -04:00
Jim Mathies
ec93342eba Bug 1137944 - Simplify the api associated with hiding e10s plugin widgets. r=roc 2015-09-03 10:01:33 -05:00
Markus Stange
fb05d46806 Bug 1016035 - Add nsIWidget::ReportSwipeStart and call it after processing wheel events that can trigger swipes. r=kats 2015-08-28 01:10:48 -04:00
Xidorn Quan
82034ad4ce Bug 1196163 part 1 - Use nsSizeMode instead of int32_t for nsIWidget::{SizeMode,SetSizeMode}. r=roc 2015-08-29 11:12:41 +10:00
Bob Owen
36f187da0f Bug 1182411 Part 2: Change winless popup surrogate to have its parent set in the chrome process. r=jimm
The creation of the surrogate native window in the child NPAPI process was
failing when then sandbox was at low integrity, because the parent is from the
chrome process, so at medium integrity.
Instead of making an IPC call to get the parent, we now create the window upfront
and send it in an IPC message to be parented in the chrome process.
This is done with asynchronous messaging.
2015-08-12 16:00:26 +01:00
Masayuki Nakano
c20e0ea95d Bug 1192156 Separate IME specific structs, classes and enums from nsIWidget.h to IMEData.h r=roc 2015-08-09 00:47:19 +09:00
Masayuki Nakano
3c3b507f8d Bug 1184986 NOTIFY_IME_OF_POSITION_CHANGE should be put off until all sending events are recieved by child process r=smaug 2015-07-22 14:15:06 +09:00
Masayuki Nakano
e7ef1f7da9 Bug 1184449 part.1 IMENotifiation::SelectionChangeData should store selected string r=smaug 2015-07-22 12:40:32 +09:00
George Wright
86ff843ebf Bug 1157941 - If the current PresShell is suppressed, paint the old one if it is available r=tn,Enn 2015-07-21 21:09:02 -04:00
Masayuki Nakano
dc9a7deb5d Bug 1184004 part.1 Give a name to each struct in IMENotification r=smaug 2015-07-17 13:30:01 +09:00
Masayuki Nakano
7a1e674a5f Bug 1176955 part.2 NOTIFY_IME_OF_SELECTION should have a flag which indicates if it's caused by a selection event r=smaug 2015-07-17 11:25:00 +09:00
Birunthan Mohanathas
e52329c788 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Nicolas Silva
e6a5a9b15d Bug 1180688 - Detect whether the widget will be able to present frames with BasicCompositor on Mac. r=mstange 2015-07-13 16:46:48 +02:00