Commit graph

321 commits

Author SHA1 Message Date
André Wöbbeking 60b83d0b65 -pedantic
svn path=/trunk/KDE/kdebase/apps/; revision=1137930
2010-06-14 17:51:36 +00:00
Maks Orlovich 13b6a7a3a6 With new info provided by khtml, implement just enough of plugin -> part scripting stuff for
Flash to activate its interface. With this, the new Youtube skin works, as do simple examples.
It may be enough to fix some flash uploaders, too, but I can't find those bug reports, so I am 
not sure.

Also, the scripting work means that the getCurrentPageURL function in Gnash no longer crashes,
though we don't export enough stuff for it to actually get a value back.

CCBUG: 213196

svn path=/trunk/KDE/kdebase/apps/; revision=1117262
2010-04-21 17:47:13 +00:00
Maks Orlovich 8fddccb8d5 Restructure plugin initialization a bit so we can export stuff for scripting early enough.
svn path=/trunk/KDE/kdebase/apps/; revision=1117246
2010-04-21 16:44:57 +00:00
Laurent Montel 81afc0eea7 Fix iterator
svn path=/trunk/KDE/kdebase/apps/; revision=1117078
2010-04-21 06:24:33 +00:00
Maks Orlovich ac83275585 Some preliminary wrapper glue for other direction, mostly for logging.
Deactivated in this commit, though.

svn path=/trunk/KDE/kdebase/apps/; revision=1117037
2010-04-20 23:36:51 +00:00
Maks Orlovich 8d1750eaaf Implement most of the memory management stuff (modulo final cleanup,
which is a big deal, too); and basic code for get/call/put. 

Trouble is, GetVariable method is found, but invoke of it fails :(

svn path=/trunk/KDE/kdebase/apps/; revision=1117015
2010-04-20 21:20:38 +00:00
Maks Orlovich a5c38428e3 As an intermediate stage, let's implement one direction of scripting using
current LC API first. No idea if it's workable w/o doing the other direction 
the way Koos did, but I figure it's better than trying to get a few thousand 
of untested LoC with completely new APIs working (and may be perhaps backportable), 
especially since I did a lot of the work before and can adapt it.

This commit does:
- Update the SDK headers for some of the new functions/enums
- Handle the LC requests in the part, and forward them via DBus to the viewer
- Similarly, have the viewer properly unpack and pass to the scripting engine
- The scripting code for now merely does some API initialization, no actual work.

svn path=/trunk/KDE/kdebase/apps/; revision=1116993
2010-04-20 20:08:43 +00:00
Laurent Montel 50bb447dc8 Fix iterator
svn path=/trunk/KDE/kdebase/apps/; revision=1116249
2010-04-18 23:02:41 +00:00
Maks Orlovich 413dc6f626 Implement the various helper/glue functions of npruntime
(which mostly just wrap to the class structure fields)

svn path=/trunk/KDE/kdebase/apps/; revision=1116103
2010-04-18 16:40:47 +00:00
Maks Orlovich 6ce84cd8c1 Try to avoid needless wakeups with the event pumps when not needed:
- Don't activate the Xt pump when not needed; it's not 
for most commonly used plugins
- Don't use our glib pump's timer when Qt's glib event loop 
is on anyway.

This doesn't cover 100% of situations, and doesn't really explain 
why QT_NO_GLIB works better for some people (never saw this particular 
case myself), but it should cover the "nspluginviewer wakes up 
a lot and uses a few% of cpu" case for most people. Hopefully.

CCBUG: 182869

I am thinking off holding of on backporting this till 4.4.1, though.... 
 

svn path=/trunk/KDE/kdebase/apps/; revision=1075295
2010-01-15 19:27:06 +00:00
Darío Andrés Rodríguez e92afd4d24 - Reduce the ammount of unused vars/parameters warnings
svn path=/trunk/KDE/kdebase/apps/; revision=1049628
2009-11-15 15:41:16 +00:00
Maks Orlovich e3f790bf01 Fix dbus assert fail when plugin fails to load (e.g. when it's swfdec or gnash, which don't
like us claiming to not use gtk)
BUG:195589
CCBUG:191331

svn path=/trunk/KDE/kdebase/apps/; revision=984515
2009-06-20 22:19:00 +00:00
Luboš Luňák d1f0fafcdc Try to protect at least a bit from starving.
svn path=/trunk/KDE/kdebase/apps/; revision=977550
2009-06-04 16:03:19 +00:00
Christian Ehrlicher b2cc6acd46 a lot of more KUrl::path() -> KUrl::toLocalFile() changes (mostly after a check for KUrl::isLocalFile())
svn path=/trunk/KDE/kdebase/apps/; revision=939835
2009-03-15 20:20:33 +00:00
Maks Orlovich 2da742afd0 Merged revision 939403:
Block handling of normal I/O streams until javascript: queries are handled.
Fixes the problem with opening of local flash files reported by KMess 
developers, and hopefully the ocassional white windows on web flash stuff 
as well

CCBUG: 169626

svn path=/trunk/KDE/kdebase/apps/; revision=939405
2009-03-14 20:00:06 +00:00
Rick Xing 9354cf17a2 Just EBN fixes
svn path=/trunk/KDE/kdebase/apps/; revision=894687
2008-12-09 06:59:31 +00:00
Fredrik Höglund d6fed1897b Prevent gtk_init() from replacing the KDE X error handler, since the Gtk
handler aborts() and kills the viewer when it receives an X error.

CCBUG: 174066

svn path=/trunk/KDE/kdebase/apps/; revision=890912
2008-11-30 16:43:32 +00:00
Sebastian Sauer ef9f14a0a9 * comments++
* copyright++
* naming++


svn path=/trunk/KDE/kdebase/apps/; revision=876584
2008-10-27 15:16:23 +00:00
Sebastian Sauer 2e155713a7 dox++ SVN_SILENT
svn path=/trunk/KDE/kdebase/apps/; revision=876216
2008-10-26 19:44:42 +00:00
Sebastian Sauer 378291285e Fix flash9 crash needed to allow me to watch youtube :)
Patch is partly based on how WebCore works around those case. Looks as we have the same prob in 3.5. Ok to backport to 4.1 and 3.5?
CC_MAIL:kfm-devel@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=876130
2008-10-26 15:12:09 +00:00
Maks Orlovich c86783ec75 Merged revision 847205:
Fix exit detection here, too, in case konqueror dies for some reason, 
due to kill -9 or something. (Why else wouldn't it exit normally?)

svn path=/trunk/KDE/kdebase/apps/; revision=847206
2008-08-14 23:06:11 +00:00
Andreas Hartmetz 7fe1eb209d Some more linking fixes for gold.
svn path=/trunk/KDE/kdebase/apps/; revision=839027
2008-07-29 10:02:28 +00:00
David Faure 9694768ece Fix errors when glib2 isn't found (from error posted by em_pl on irc)
svn path=/trunk/KDE/kdebase/apps/; revision=833928
2008-07-17 15:30:00 +00:00
Maks Orlovich be7ba55889 Here too:
Workaround a certain popular plugin's version 10 beta's inability 
to figure out that 13 < 16. 
   
(AKA, stub out some ABI r16 methods that get called despite us claiming only ABI r13 support. 
 I could perhaps do more than stubs, but I can't find any docs!) 

BUG:164706

svn path=/trunk/KDE/kdebase/apps/; revision=825888
2008-06-29 15:42:03 +00:00
David Johnson 19a7f06de1 Converting old style includes to new qt4 style
svn path=/trunk/KDE/kdebase/apps/; revision=820905
2008-06-15 18:49:48 +00:00
Luboš Luňák bee6af9016 Hacking Glib eventloop integration. Not everybody has Qt with glib support,
and new Flash doesn't work without it.


svn path=/trunk/KDE/kdebase/apps/; revision=820257
2008-06-13 17:16:14 +00:00
Laurent Montel 95e90f46ab Use INSTALL_TARGETS_DEFAULT_ARGS
svn path=/trunk/KDE/kdebase/apps/; revision=813304
2008-05-27 11:36:57 +00:00
Urs Wolfer 3dfcdfe090 cleanup libs (no more Qt/KDE3 support libs required)
svn path=/trunk/KDE/kdebase/apps/; revision=806769
2008-05-12 11:24:16 +00:00
Urs Wolfer d2618ce4a8 Port nsplugins to clean Qt 4.
Work done by Sergey Saukh.
See discussion on kde-devel ('nsplugins patch (KDE4)').

CCMAIL:thelich@yandex.ru

svn path=/trunk/KDE/kdebase/apps/; revision=803987
2008-05-04 18:50:49 +00:00
Andreas Hartmetz 3c8f73c8e4 Fix linking with the gold linker. This change should have no effect for users of the traditional ld.
svn path=/trunk/KDE/kdebase/apps/; revision=803407
2008-05-02 19:24:18 +00:00
Allen Winter 242b51d1f0 remove ahartmetz's "Dirty, dirty hack" as it breaks the build on
non-Linux (ie. FreeBSD) systems.

Please find a more portable way of dealing with this library

CCMAIL: ahartmetz@gmail.com

svn path=/trunk/KDE/kdebase/apps/; revision=797567
2008-04-16 12:06:30 +00:00
Szombathelyi György 5ca1f7a66f But don't forget to free the private data!
svn path=/trunk/KDE/kdebase/apps/; revision=797364
2008-04-15 16:08:18 +00:00
Szombathelyi György aa9d3a351f Create the plugin instance before using it.
BUG: 160413

svn path=/trunk/KDE/kdebase/apps/; revision=797362
2008-04-15 16:02:33 +00:00
Andreas Hartmetz c8fb541d3f Dirty, dirty hack to make nspluginviewer (and thus kdebase) compile using the gold linker on Linux.
svn path=/trunk/KDE/kdebase/apps/; revision=796175
2008-04-13 00:24:35 +00:00
Claudio Bantaloukas 97ec37e01f fix EBN errors: header rearrangements, guards
svn path=/trunk/KDE/kdebase/apps/; revision=783227
2008-03-07 14:20:44 +00:00
Adriaan de Groot b55ea00b33 Qt3 -> Qt4 style includes (build fix on FBSD with Qt3 installed)
svn path=/trunk/KDE/kdebase/apps/; revision=770099
2008-02-02 20:04:34 +00:00
Maks Orlovich 4b0cfcd653 automatically merged revision 769144:
Ugh. Remember folks, always forwaport your changes.
FP r.565998, which fixes handling of redirects in nspv,
aka "Youtube videos embedded from an another page". Anyway,
I consider flash issues to be, to the best of my knowledge, resolved now.
BUG:132138

svn path=/trunk/KDE/kdebase/apps/; revision=769147
2008-01-31 17:04:01 +00:00
Maks Orlovich 8c731bc1d4 automatically merged revision 768871:
Make flash embedding work much better..
- Make sure to give distinct callback objects distinct IDs, so they
talk to the proper KHTMLPart. Fixes only one flash object working per
window
- Rework the size/init heuristics yet again, following closer to Seli's code,
but instead of trying to count events, etc., just have the part
tell us when we were really resized, and qwidget isn't making up a random

svn path=/trunk/KDE/kdebase/apps/; revision=768880
2008-01-30 20:54:20 +00:00
Maks Orlovich 3980953c02 automatically merged revision 768870:
- Make the XEmbed host embed directly, removing 2 layers of embedding,
upon suggestion of Seli, hopefully making things more robust
- Be more careful in initializing the plugin, to avoid extra NPSetWindow calls
- Workaround Qt bug in the Xt host, to avoid annoying flicker of an unembedded

svn path=/trunk/KDE/kdebase/apps/; revision=768878
2008-01-30 20:51:18 +00:00
Luboš Luňák ae7b566993 Make keyboard work also with XEmbed - there are no real X focus events
with XEmbed, so the XQueryKeymap() protection protected a bit too much.
The focus messages from QXEmbed are received only by the plugin itself
due to the way XSendEvent() is used, so forward focus in/out events
from the embedder side.


svn path=/trunk/KDE/kdebase/apps/; revision=764345
2008-01-21 14:06:21 +00:00
Luboš Luňák e72f44abf1 This X error handler doesn't seem to be any better than the standard Qt one.
svn path=/trunk/KDE/kdebase/apps/; revision=764287
2008-01-21 11:01:32 +00:00
Luboš Luňák c0575bcae1 Fix #154713 here too, just in case.
svn path=/trunk/KDE/kdebase/apps/; revision=758320
2008-01-07 16:05:36 +00:00
Maks Orlovich 6b1ed28114 Refactor some duplicated stuff out...
svn path=/trunk/KDE/kdebase/apps/; revision=748198
2007-12-13 20:44:08 +00:00
Maks Orlovich 25d7450efc Seli completely and utterly rocks.
Thanks to his Xt event integration, I can now
implement (by c&p from old code, mostly) the Xt host.

Flash 9.0r48 seems to work now!

svn path=/trunk/KDE/kdebase/apps/; revision=748197
2007-12-13 20:43:58 +00:00
Maks Orlovich e796685285 Commiting my current nspluginviewer work tree. This
has the viewer <-> part interface mostly fixed, and 
has beginnings of an XEmbed host for the plugin.
Unfortunately, that works part of the time at best 
with r115, (probably none of the time on sites other than 
youtube), and is quite  crashy, partly because XEmbed flash
uses Xt anyway(!). I may have to go back to Xt only, not sure. 
(Of course, Xt plugins don't work at all ATM). I need to consult
with some people on the best course of action, since this is getting very tricky, 
and somewhat outside my area of expertise.
======================================================
- Remove the padding hack now we're using newer headers
- Add some more compatibility features, such as initializing gtk for
plugins that need it. Also say we're keeping plugins in memory.
It's true, and swfdec-mozilla-0.5.3 wants it (though 0.5.4 does somehting else)
- Clarify some comments
- a bit of debug output

svn path=/trunk/KDE/kdebase/apps/; revision=748161
2007-12-13 19:10:16 +00:00
Maks Orlovich 0c3fd1c874 Commiting my current nspluginviewer work tree. This
has the viewer <-> part interface mostly fixed, and 
has beginnings of an XEmbed host for the plugin.
Unfortunately, that works part of the time at best 
with r115, (probably none of the time on sites other than 
youtube), and is quite  crashy, partly because XEmbed flash
uses Xt anyway(!). I may have to go back to Xt only, not sure. 
(Of course, Xt plugins don't work at all ATM). I need to consult
with some people on the best course of action, since this is getting very tricky, 
and somewhat outside my area of expertise.
======================================================
Fixup error logging (probably got broken in the port)

svn path=/trunk/KDE/kdebase/apps/; revision=748160
2007-12-13 19:09:51 +00:00
Maks Orlovich 2fc5dec59a Commiting my current nspluginviewer work tree. This
has the viewer <-> part interface mostly fixed, and 
has beginnings of an XEmbed host for the plugin.
Unfortunately, that works part of the time at best 
with r115, (probably none of the time on sites other than 
youtube), and is quite  crashy, partly because XEmbed flash
uses Xt anyway(!). I may have to go back to Xt only, not sure. 
(Of course, Xt plugins don't work at all ATM). I need to consult
with some people on the best course of action, since this is getting very tricky, 
and somewhat outside my area of expertise.
======================================================
- Fix g_NPN_UserAgent to not return address of a temporary buffer
- Add some zeroed padding after the function table to provide some counter-sanity
against Flash reading npruntime functions for ABI revisions that don't
have them yet. Covers about 20 out of 2 zillion of vg warnings on it

... It would also help if XEmbed flash wasn't using Xt anyway, even w/XEmbed

svn path=/trunk/KDE/kdebase/apps/; revision=748158
2007-12-13 19:09:25 +00:00
Maks Orlovich d7cf6af919 Commiting my current nspluginviewer work tree. This
has the viewer <-> part interface mostly fixed, and 
has beginnings of an XEmbed host for the plugin.
Unfortunately, that works part of the time at best 
with r115, (probably none of the time on sites other than 
youtube), and is quite  crashy, partly because XEmbed flash
uses Xt anyway(!). I may have to go back to Xt only, not sure. 
(Of course, Xt plugins don't work at all ATM). I need to consult
with some people on the best course of action, since this is getting very tricky, 
and somewhat outside my area of expertise.
======================================================
Add beginning of an XEmbed host. It partly works --- youtube works part of the time;
but at least the playback window gets parented and sized properly

svn path=/trunk/KDE/kdebase/apps/; revision=748156
2007-12-13 19:09:08 +00:00
Maks Orlovich cfc86d4d71 Commiting my current nspluginviewer work tree. This
has the viewer <-> part interface mostly fixed, and 
has beginnings of an XEmbed host for the plugin.
Unfortunately, that works part of the time at best 
with r115, (probably none of the time on sites other than 
youtube), and is quite  crashy, partly because XEmbed flash
uses Xt anyway(!). I may have to go back to Xt only, not sure. 
(Of course, Xt plugins don't work at all ATM). I need to consult
with some people on the best course of action, since this is getting very tricky, 
and somewhat outside my area of expertise.
======================================================
Get the embedding of the viewer into part working (though it flickers a bit);
the plugin embedding itself not there yet

svn path=/trunk/KDE/kdebase/apps/; revision=748154
2007-12-13 19:08:38 +00:00
Luboš Luňák 9ef37bc286 A somewhat hackish Xt eventloop support. Works in KDE3. I can't say
for sure the same about KDE4, since nsplugins still doesn't work,
looks like embedding problems.


svn path=/trunk/KDE/kdebase/apps/; revision=747214
2007-12-11 11:06:10 +00:00