Commit Graph

114 Commits

Author SHA1 Message Date
Masayuki Nakano
bbce223b06 Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved.  However, posting all key events to the chrome process may make damage to the performance of text input.  Therefore, this patch starts to post a key event whose key combination may be a shortcut key.  However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.

For receiving response from widget, this patch defines nsIKeyEventInPluginCallback.  It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply.  Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process.  However, if the widget is a PuppetWidget, it cannot return the result synchronously.  Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks.  Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().

MozReview-Commit-ID: G6brOU26NwQ
2016-04-19 20:09:37 +09:00
Kyle Machulis
d37bea3dcb Bug 1171182 - Browser Zoom Query for NPAPI; r=bsmedberg r=jaas 2016-03-18 10:50:50 -07:00
Dylan Roeh
bc0b4739ad Bug 1243639 - Remove Honeycomb flash-related code. r=snorp 2016-03-03 10:30:53 -05:00
Jim Mathies
26c7ae8377 Bug 1232181 - Plugin module plumbing for retrieving scroll captures and updating plugin instance content scroll state. r=roc 2016-03-01 12:48:25 -06:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Nicholas Nethercote
5a68f41931 Bug 1233619 (part 2) - Moz2Dify BeginUpdate() and BeginUpdateBackground() functions. r=roc.
The only non-trivial change is in BasicPaintedLayer::Validate().
2015-12-17 19:39:10 -08:00
Nicholas Nethercote
e2e2a2fbf9 Bug 1233619 (part 1) - Remove unneeded gfxContext argument from EndUpdate() and EndUpdateBackground() functions. r=roc. 2015-12-17 19:39:09 -08:00
David Anderson
4686122c82 Revive NPAPI async drawing: stub code. (bug 1217665 part 1, r=aklotz) 2015-12-02 11:31:16 -08:00
Aaron Klotz
0a9ea22aa5 Bug 1208059: Make nsNPAPIPluginInstance support WeakPtr and modify PluginAsyncSurrogate to use it; r=jimm 2015-10-19 14:34:27 -04: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
Andrea Marchesini
9deb1d22c3 Bug 1167690 - Part 2: Integrate plugins which support the NPAPI audio extensions with the Audio Channel Service; r=BenWa 2015-07-29 08:26:42 -04:00
Nathan Froyd
92a8124fef Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Chris Peterson
8c77629af9 Bug 554186 - Part 1: Unimplement NPN_Status API. r=josh 2015-06-13 22:50:03 -07:00
Mike Conley
ca7d1a4482 Bug 1148012 - Expose run ID through nsIObjectLoadingContent.idl. r=josh,smaug.
The run ID for a plugin is retrieved and cached in the nsObjectLoadingContent
on plugin instantiation.
2015-03-17 13:28:32 -04:00
Nicolas Silva
13344864c0 Bug 1132854 - Make nsIntSize a typedef of gfx::IntSize. r=Bas, roc 2015-03-29 16:59:08 +02:00
John Schoenick
d4c7392c8a Bug 1136379. Clean up the nsPluginHost API a bit. r=bzbarsky 2015-02-25 11:36:39 -05:00
Jeff Gilbert
e2b7d174dd Bug 1100699 - Use OriginPos instead of isInverted. - r=mattwoodrow,snorp 2014-11-17 17:02:19 -08:00
Josh Aas
974e19a35e Bug 1092630: Get rid of native widgets for OS X NPAPI plugins, make things work much better under e10s. Patch by Josh Aas, Markus Stange, Steven Michaud, David Parks. r=smichaud/jst/josh (more reviews pending) 2014-12-11 08:44:07 -06:00
Nathan Froyd
37dbc35b64 Bug 1095543 - remove unnecessary nsInterfaceHashtable.h includes; r=ehsan 2014-11-07 08:52:43 -05:00
James Willcox
4da97db54f Bug 1086693 - Part 6: Use generated bindings for AndroidMediaCodec and AndroidSurfaceTexture r=blassey,gcp 2014-11-13 12:47:24 -06:00
James Willcox
0f01d3f5f9 Bug 1014614 - Rename nsSurfaceTexture to AndroidSurfaceTexture r=jgilbert 2014-10-21 08:53:00 -05:00
Robert O'Callahan
864665b3b1 Bug 1072528. Part 1: Remove plugin-related code. r=bsmedberg 2014-09-24 16:35:00 -04:00
Wes Kocher
fc6c88a0cd Backed out 9 changesets (bug 1014614) for Android mochitest bustage on a CLOSED TREE
Backed out changeset 40f99ba7f616 (bug 1014614)
Backed out changeset 8fbc3c85adfc (bug 1014614)
Backed out changeset 40dbd7c6ce65 (bug 1014614)
Backed out changeset f2b504bdd7c5 (bug 1014614)
Backed out changeset c878e29fbef9 (bug 1014614)
Backed out changeset 511dcc817f5d (bug 1014614)
Backed out changeset 2b72e71f1fdf (bug 1014614)
Backed out changeset 8b530a9a2f99 (bug 1014614)
Backed out changeset 7fa1b78de684 (bug 1014614)
2014-10-17 16:34:01 -07:00
James Willcox
20e61c9ede Bug 1014614 - Rename nsSurfaceTexture to AndroidSurfaceTexture r=jgilbert 2014-10-17 10:35:10 -05:00
Jeff Gilbert
4943991010 Bug 1037147 - Remove SharedTextureHandle and friends r=mattwoodrow,snorp 2014-09-17 08:13:29 -05:00
James Willcox
e07d73a455 Back out a84f9edfe968 for bustage 2014-09-12 14:01:26 -05:00
Jeff Gilbert
63c2e0ad7f Bug 1037147 - Replace SharedTextureHandle with a TextureClient variant r=mattwoodrow,snorp 2014-09-12 13:39:20 -05:00
Catalin Badea
ab8f05696a Bug 853995 - Move plugin parameters array from nsPluginInstanceOwner to content. r=johns,jst 2014-08-15 14:24:40 -07:00
Benoit Jacob
7bbd89e2ca Bug 1028588 - Fix dangerous public destructors in the rest of dom/ - r=ehsan 2014-06-23 15:56:07 -04:00
Jeff Gilbert
c181902f8a Bug 999713 - Kill WS in files we want to touch. - r=kamidphish 2014-04-22 16:23:18 -07:00
Neil Rashbrook
afcb26040f Bug 514280 Stop using nsCOMPtr for concrete types r=bsmedberg 2014-03-18 00:23:03 +00:00
Wes Kocher
5b4557e895 Backed out 2 changesets (bug 514280) for OSX build bustage on a CLOSED TREE
Backed out changeset 2a015b45d808 (bug 514280)
Backed out changeset a01f97c1ed02 (bug 514280)
2014-03-17 15:19:53 -07:00
Neil Rashbrook
91221f71f5 Bug 514280 Stop using nsCOMPtr for concrete types r=bsmedberg 2014-03-17 19:07:09 +00:00
Henri Sivonen
a646170fb6 Bug 942706 - Remove nsIPluginTagInfo and unused associated methods. r=johns. 2013-12-03 10:36:13 +02:00
Benoit Jacob
8b1ffe319e Bug 912042 - Avoid including GLContext.h in headers that don't need it - r=jrmuizel 2013-09-04 08:14:52 -04:00
Nicholas Nethercote
d0f640378a Bug 911020 - Introduce js/TypeDecls.h, which holds very commonly used type declarations from the JS engine. r=luke. 2013-08-27 19:59:14 -07:00
Doug Turner
7767c0773f Bug 906072 - Remove Maemo port. r=romaxa, r=ted, r=johns 2013-08-25 16:56:53 -07:00
Joshua Cranmer
46b6048262 Bug 884061 - Part 3f: Use NS_DECL_THREADSAFE_ISUPPORTS in dom/, r=smaug,dhylands. 2013-07-18 21:21:20 -05:00
Jacek Caban
fecceb176c Bug 849198 - Merge nsPluginSafety.h into nsNPAPIPluginInstance.h r=roc 2013-03-12 11:34:07 +01:00
James Willcox
980c7b3840 Bug 837114 - Don't leak Flash shared objects while private browsing on Android r=bsmedberg 2013-03-04 13:18:20 -05:00
Robert O'Callahan
6deb776bba Bug 829557. Part 2: Allow plugin code to reenter Gecko safely while while the plugin is processing an input event. r=bsmedberg
When nsPluginInstanceOwner passes input events to the plugin instance,
it's safe to reenter Gecko from plugin code and do anything, even
arbitrary script execution.
2013-02-28 00:50:28 +13:00
Robert O'Callahan
e5e3b3660e Bug 829557. Part 1: When calling into plugin code, identify situations where it is safe (or unsafe) to reenter Gecko from plugin code. r=bsmedberg
When Gecko is reentered from unsafe call sites, we allow the reentry, but we
suppress execution of the refresh driver to minimize the danger.
In this patch, we treat all sites as unsafe.
2013-02-28 00:50:27 +13:00
Ed Morley
cc47d0ca78 Backed out changeset f73b7b8d1a2d (bug 829557) for failing to compile on Windows on a CLOSED TREE 2013-02-27 12:50:30 +00:00
Ed Morley
606f9faaaf Backed out changeset 622b744e5df9 (bug 829557) 2013-02-27 12:49:32 +00:00
Robert O'Callahan
d78efc9174 Bug 829557. Part 2: Allow plugin code to reenter Gecko safely while while the plugin is processing an input event. r=bsmedberg
When nsPluginInstanceOwner passes input events to the plugin instance,
it's safe to reenter Gecko from plugin code and do anything, even
arbitrary script execution.
2013-02-28 00:50:28 +13:00
Robert O'Callahan
9b4faa088f Bug 829557. Part 1: When calling into plugin code, identify situations where it is safe (or unsafe) to reenter Gecko from plugin code. r=bsmedberg
When Gecko is reentered from unsafe call sites, we allow the reentry, but we
suppress execution of the refresh driver to minimize the danger.
In this patch, we treat all sites as unsafe.
2013-02-28 00:50:27 +13:00
James Willcox
8287dabf11 Bug 800838 - Guard against invalid NPP when unscheduling plugin timers on Android r=blassey 2013-01-23 09:16:26 -05:00
Steve Fink
ed62b6f44e Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence 2012-12-31 12:40:21 -08:00
Steve Fink
27634e6f07 Backed out changeset fce4e0f8a553 (bug 828753) for breaking windows warnings-as-errors (stop adding JSObject forward decls, please!) 2013-01-18 13:20:21 -08:00