Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 293204 Details for
Bug 430566
nsplugins update fixes a number of issues
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
nsplugins patch for the issue above
kdebase-3.5.8-nsplugin_32_64.patch (text/plain), 16.22 KB, created by
Sammy
on 2008-01-28 21:37:16 UTC
(
hide
)
Description:
nsplugins patch for the issue above
Filename:
MIME Type:
Creator:
Sammy
Created:
2008-01-28 21:37:16 UTC
Size:
16.22 KB
patch
obsolete
>diff -ur nsplugins/NSPluginCallbackIface.h nsplugins.new/NSPluginCallbackIface.h >--- nsplugins/NSPluginCallbackIface.h 2005-10-10 10:04:05.000000000 -0500 >+++ nsplugins.new/NSPluginCallbackIface.h 2008-01-20 08:48:08.000000000 -0600 >@@ -37,7 +37,7 @@ > virtual ASYNC requestURL(QString url, QString target) = 0; > virtual ASYNC postURL(QString url, QString target, QByteArray data, QString mime) = 0; > virtual ASYNC statusMessage( QString msg ) = 0; >- virtual ASYNC evalJavaScript( int id, QString script ) = 0; >+ virtual ASYNC evalJavaScript( Q_INT32 id, QString script ) = 0; > > }; > >diff -ur nsplugins/nspluginloader.cpp nsplugins.new/nspluginloader.cpp >--- nsplugins/nspluginloader.cpp 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/nspluginloader.cpp 2008-01-20 08:48:08.000000000 -0600 >@@ -41,6 +41,7 @@ > #include <qpushbutton.h> > #include <qxembed.h> > #include <qtextstream.h> >+#include <qtimer.h> > #include <qregexp.h> > > #include "nspluginloader.h" >@@ -55,10 +56,8 @@ > > > NSPluginInstance::NSPluginInstance(QWidget *parent) >- : EMBEDCLASS(parent), stub( NULL ) >+ : EMBEDCLASS(parent), _loader( NULL ), shown( false ), inited( false ), resize_count( 0 ), stub( NULL ) > { >- _loader = 0L; >- shown = false; > } > > void NSPluginInstance::init(const QCString& app, const QCString& obj) >@@ -74,13 +73,20 @@ > show(); > } else { > _button = 0L; >- doLoadPlugin(); >+ // Protection against repeated NPSetWindow() - Flash v9,0,115,0 doesn't handle >+ // repeated NPSetWindow() calls properly, which happens when NSPluginInstance is first >+ // shown and then resized. Which is what happens with KHTML. Therefore use 'shown' >+ // to detect whether the widget is shown and drop all resize events before that, >+ // and use 'resize_count' to wait for that one more resize to come (plus a timer >+ // for a possible timeout). Only then flash is actually initialized ('inited' is true). >+ resize_count = 1; >+ QTimer::singleShot( 1000, this, SLOT( doLoadPlugin())); > } > } > > > void NSPluginInstance::doLoadPlugin() { >- if (!_loader) { >+ if (!inited) { > delete _button; > _button = 0L; > _loader = NSPluginLoader::instance(); >@@ -93,11 +99,11 @@ > setProtocol(QXEmbed::XEMBED); > } > // resize before showing, some plugins are stupid and can't handle repeated >- // NPSetWindow() calls very well >+ // NPSetWindow() calls very well (viewer will avoid the call if not shown yet) > resizePlugin(width(), height()); > displayPlugin(); > show(); >- shown = true; >+ inited = true; > } > } > >@@ -105,9 +111,11 @@ > NSPluginInstance::~NSPluginInstance() > { > kdDebug() << "-> NSPluginInstance::~NSPluginInstance" << endl; >- shutdown(); >+ if( inited ) >+ shutdown(); > kdDebug() << "release" << endl; >- _loader->release(); >+ if(_loader) >+ _loader->release(); > kdDebug() << "<- NSPluginInstance::~NSPluginInstance" << endl; > delete stub; > } >@@ -125,8 +133,14 @@ > > void NSPluginInstance::resizeEvent(QResizeEvent *event) > { >- if (shown == false) >+ if (shown == false) // ignore all resizes before being shown > return; >+ if( !inited && resize_count > 0 ) { >+ if( --resize_count == 0 ) >+ doLoadPlugin(); >+ else >+ return; >+ } > EMBEDCLASS::resizeEvent(event); > if (isVisible()) { > resizePlugin(width(), height()); >@@ -137,7 +151,29 @@ > void NSPluginInstance::showEvent(QShowEvent *event) > { > EMBEDCLASS::showEvent(event); >- resizePlugin(width(), height()); >+ shown = true; >+ if(!inited && resize_count == 0 ) >+ doLoadPlugin(); >+ if(inited) >+ resizePlugin(width(), height()); >+} >+ >+void NSPluginInstance::displayPlugin() >+{ >+ qApp->syncX(); // process pending X commands >+ stub->displayPlugin(); >+} >+ >+void NSPluginInstance::resizePlugin( int w, int h ) >+{ >+ qApp->syncX(); >+ stub->resizePlugin( w, h ); >+} >+ >+void NSPluginInstance::shutdown() >+{ >+ if( stub ) >+ stub->shutdown(); > } > > /*******************************************************************************/ >diff -ur nsplugins/nspluginloader.h nsplugins.new/nspluginloader.h >--- nsplugins/nspluginloader.h 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/nspluginloader.h 2008-01-20 08:48:08.000000000 -0600 >@@ -63,13 +63,15 @@ > void windowChanged(WId w); > class NSPluginLoader *_loader; > bool shown; >+ bool inited; >+ int resize_count; > QPushButton *_button; > QGridLayout *_layout; > NSPluginInstanceIface_stub* stub; > private: // wrappers >- void displayPlugin() { stub->displayPlugin(); } >- void resizePlugin( int w, int h ) { stub->resizePlugin( w, h ); } >- void shutdown() { if( stub ) stub->shutdown(); } >+ void displayPlugin(); >+ void resizePlugin( int w, int h ); >+ void shutdown(); > }; > > >diff -ur nsplugins/sdk/jni_md.h nsplugins.new/sdk/jni_md.h >--- nsplugins/sdk/jni_md.h 2007-10-08 04:51:23.000000000 -0500 >+++ nsplugins.new/sdk/jni_md.h 2008-01-20 08:48:07.000000000 -0600 >@@ -1,23 +1,40 @@ > /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- > * >- * The contents of this file are subject to the Netscape Public >- * License Version 1.1 (the "License"); you may not use this file >- * except in compliance with the License. You may obtain a copy of >- * the License at http://www.mozilla.org/NPL/ >- * >- * Software distributed under the License is distributed on an "AS >- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or >- * implied. See the License for the specific language governing >- * rights and limitations under the License. >+ * ***** BEGIN LICENSE BLOCK ***** >+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 >+ * >+ * The contents of this file are subject to the Mozilla Public License Version >+ * 1.1 (the "License"); you may not use this file except in compliance with >+ * the License. You may obtain a copy of the License at >+ * http://www.mozilla.org/MPL/ >+ * >+ * Software distributed under the License is distributed on an "AS IS" basis, >+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License >+ * for the specific language governing rights and limitations under the >+ * License. > * > * The Original Code is mozilla.org code. > * >- * The Initial Developer of the Original Code is Netscape >- * Communications Corporation. Portions created by Netscape are >- * Copyright (C) 1998 Netscape Communications Corporation. All >- * Rights Reserved. >+ * The Initial Developer of the Original Code is >+ * Netscape Communications Corporation. >+ * Portions created by the Initial Developer are Copyright (C) 1998 >+ * the Initial Developer. All Rights Reserved. >+ * >+ * Contributor(s): >+ * >+ * Alternatively, the contents of this file may be used under the terms of >+ * either the GNU General Public License Version 2 or later (the "GPL"), or >+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), >+ * in which case the provisions of the GPL or the LGPL are applicable instead >+ * of those above. If you wish to allow use of your version of this file only >+ * under the terms of either the GPL or the LGPL, and not to allow others to >+ * use your version of this file under the terms of the MPL, indicate your >+ * decision by deleting the provisions above and replace them with the notice >+ * and other provisions required by the GPL or the LGPL. If you do not delete >+ * the provisions above, a recipient may use your version of this file under >+ * the terms of any one of the MPL, the GPL or the LGPL. > * >- * Contributor(s): >+ * ***** END LICENSE BLOCK ***** > * > * > * This Original Code has been modified by IBM Corporation. >diff -ur nsplugins/sdk/npapi.h nsplugins.new/sdk/npapi.h >--- nsplugins/sdk/npapi.h 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/sdk/npapi.h 2008-01-20 08:48:07.000000000 -0600 >@@ -38,7 +38,7 @@ > > > /* >- * npapi.h $Revision: 748155 $ >+ * npapi.h > * Netscape client plug-in API spec > */ > >diff -ur nsplugins/sdk/npupp.h nsplugins.new/sdk/npupp.h >--- nsplugins/sdk/npupp.h 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/sdk/npupp.h 2008-01-20 08:48:07.000000000 -0600 >@@ -37,7 +37,7 @@ > > > /* >- * npupp.h $Revision: 748159 $ >+ * npupp.h > * function call mecahnics needed by platform specific glue code. > */ > >diff -ur nsplugins/sdk/prcpucfg.h nsplugins.new/sdk/prcpucfg.h >--- nsplugins/sdk/prcpucfg.h 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/sdk/prcpucfg.h 2008-01-20 08:48:07.000000000 -0600 >@@ -629,7 +629,9 @@ > #define BITS_PER_SHORT PR_BITS_PER_SHORT > #define BITS_PER_INT PR_BITS_PER_INT > #define BITS_PER_INT64 PR_BITS_PER_INT64 >+#ifndef BITS_PER_LONG > #define BITS_PER_LONG PR_BITS_PER_LONG >+#endif > #define BITS_PER_FLOAT PR_BITS_PER_FLOAT > #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE > #define BITS_PER_WORD PR_BITS_PER_WORD >diff -ur nsplugins/viewer/Makefile.am nsplugins.new/viewer/Makefile.am >--- nsplugins/viewer/Makefile.am 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/viewer/Makefile.am 2008-01-20 08:48:08.000000000 -0600 >@@ -1,12 +1,11 @@ >-INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) $(GTK_CFLAGS) >+INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) $(GTK_CFLAGS) `pkg-config --cflags glib-2.0` > METASOURCES = AUTO > > bin_PROGRAMS = nspluginviewer > > nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \ > nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp >-nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic >-nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt $(GTK_LIBS) >+nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic `pkg-config --libs glib-2.0` >+nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt $(GTK_LIBS) > > NSPluginCallbackIface_DIR = $(srcdir)/.. >- >diff -ur nsplugins/viewer/NSPluginClassIface.h nsplugins.new/viewer/NSPluginClassIface.h >--- nsplugins/viewer/NSPluginClassIface.h 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/viewer/NSPluginClassIface.h 2008-01-20 08:48:08.000000000 -0600 >@@ -47,10 +47,10 @@ > > k_dcop: > >- virtual DCOPRef newInstance(QString url, QString mimeType, bool embed, >+ virtual DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed, > QStringList argn, QStringList argv, >- QString appId, QString callbackId, bool reload, >- bool doPost, QByteArray postData, long xembed) = 0; >+ QString appId, QString callbackId, Q_INT8 reload, >+ Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed) = 0; > virtual QString getMIMEDescription() = 0; > > }; >@@ -66,11 +66,11 @@ > > virtual int winId() = 0; > >- virtual int setWindow(int remove=0) = 0; >+ virtual int setWindow(Q_INT8 remove=0) = 0; > >- virtual void resizePlugin(int w, int h) = 0; >+ virtual void resizePlugin(Q_INT32 w, Q_INT32 h) = 0; > >- virtual void javascriptResult(int id, QString result) = 0; >+ virtual void javascriptResult(Q_INT32 id, QString result) = 0; > > virtual void displayPlugin() = 0; > }; >diff -ur nsplugins/viewer/nsplugin.cpp nsplugins.new/viewer/nsplugin.cpp >--- nsplugins/viewer/nsplugin.cpp 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/viewer/nsplugin.cpp 2008-01-20 08:48:08.000000000 -0600 >@@ -180,10 +180,10 @@ > // Offline browsing - no thanks > *(bool*)value = false; > return NPERR_NO_ERROR; >- case 13: // NPNVToolkit >- *(int*)value = 2; // (NPNToolkitType)NPNVGtk2 >+ case NPNVToolkit: >+ *(NPNToolkitType*)value = NPNVGtk2; > return NPERR_NO_ERROR; >- case 14: // NPNVSupportsXEmbedBool >+ case NPNVSupportsXEmbedBool: > *(bool*)value = true; > return NPERR_NO_ERROR; > default: >@@ -820,7 +820,7 @@ > s->post( url, req.data, req.mime, req.notify, req.args ); > } else if (url.lower().startsWith("javascript:")){ > if (_callback) { >- static int _jsrequestid = 0; >+ static Q_INT32 _jsrequestid = 0; > _jsrequests.insert(_jsrequestid, new Request(req)); > _callback->evalJavaScript(_jsrequestid++, url.mid(11)); > } else { >@@ -916,7 +916,7 @@ > _timer->start( 100, true ); > } > >-int NSPluginInstance::setWindow(int remove) >+int NSPluginInstance::setWindow(Q_INT8 remove) > { > if (remove) > { >@@ -980,7 +980,7 @@ > } > > >-void NSPluginInstance::resizePlugin(int w, int h) >+void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h) > { > if (w == _width && h == _height) > return; >@@ -1021,7 +1021,7 @@ > } > > >-void NSPluginInstance::javascriptResult(int id, QString result) { >+void NSPluginInstance::javascriptResult(Q_INT32 id, QString result) { > QMap<int, Request*>::iterator i = _jsrequests.find( id ); > if (i != _jsrequests.end()) { > Request *req = i.data(); >@@ -1430,10 +1430,10 @@ > } > > >-DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, bool embed, >+DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, Q_INT8 embed, > QStringList argn, QStringList argv, > QString appId, QString callbackId, >- bool reload, bool doPost, QByteArray postData, long xembed ) >+ Q_INT8 reload, Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed ) > { > kdDebug(1431) << "-> NSPluginClass::NewInstance" << endl; > >@@ -1552,8 +1552,6 @@ > > delete _tempFile; > _tempFile = 0; >- delete _queue; >- _queue = 0; > } > > >diff -ur nsplugins/viewer/nsplugin.h nsplugins.new/viewer/nsplugin.h >--- nsplugins/viewer/nsplugin.h 2008-01-20 10:52:31.000000000 -0600 >+++ nsplugins.new/viewer/nsplugin.h 2008-01-20 08:48:08.000000000 -0600 >@@ -172,9 +172,9 @@ > // DCOP functions > void shutdown(); > int winId() { return _form != 0 ? XtWindow(_form) : 0; } >- int setWindow(int remove=0); >- void resizePlugin(int w, int h); >- void javascriptResult(int id, QString result); >+ int setWindow(Q_INT8 remove=0); >+ void resizePlugin(Q_INT32 w, Q_INT32 h); >+ void javascriptResult(Q_INT32 id, QString result); > void displayPlugin(); > > // value handling >@@ -279,10 +279,10 @@ > ~NSPluginClass(); > > QString getMIMEDescription(); >- DCOPRef newInstance(QString url, QString mimeType, bool embed, >+ DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed, > QStringList argn, QStringList argv, >- QString appId, QString callbackId, bool reload, bool post, >- QByteArray postData, long xembed ); >+ QString appId, QString callbackId, Q_INT8 reload, Q_INT8 post, >+ QByteArray postData, Q_UINT32 xembed ); > void destroyInstance( NSPluginInstance* inst ); > bool error() { return _error; } > >diff -ur nsplugins/viewer/qxteventloop.cpp nsplugins.new/viewer/qxteventloop.cpp >--- nsplugins/viewer/qxteventloop.cpp 2007-05-14 02:55:42.000000000 -0500 >+++ nsplugins.new/viewer/qxteventloop.cpp 2008-01-20 08:48:08.000000000 -0600 >@@ -72,7 +72,7 @@ > > QIntDict<QSocketNotifier> socknotDict; > bool activate_timers; >- int timerid; >+ XtIntervalId timerid; > > // arguments for Xt display initialization > const char* applicationClass; >@@ -110,7 +110,7 @@ > > QXtEventLoopPrivate::QXtEventLoopPrivate() > : appContext(NULL), ownContext(NULL), >- activate_timers(FALSE), timerid(-1) >+ activate_timers(FALSE), timerid(0) > { > } > >@@ -416,7 +416,7 @@ > void qmotif_timeout_handler( XtPointer, XtIntervalId * ) > { > static_d->activate_timers = TRUE; >- static_d->timerid = -1; >+ static_d->timerid = 0; > } > > /*! \reimp >@@ -429,10 +429,10 @@ > > // make sure we fire off Qt's timers > int ttw = timeToWait(); >- if ( d->timerid != -1 ) { >+ if ( d->timerid != 0 ) { > XtRemoveTimeOut( d->timerid ); > } >- d->timerid = -1; >+ d->timerid = 0; > if ( ttw != -1 ) { > d->timerid = > XtAppAddTimeOut( d->appContext, ttw, >diff -ur nsplugins/viewer/resolve.h nsplugins.new/viewer/resolve.h >--- nsplugins/viewer/resolve.h 2005-10-10 10:04:05.000000000 -0500 >+++ nsplugins.new/viewer/resolve.h 2008-01-20 08:48:08.000000000 -0600 >@@ -40,7 +40,7 @@ > > > #define CHECK(fname,error) \ >- kdDebug() << "Result of " << endl; \ >+ kdDebug() << "Result of " << #fname << ":" << error << endl; \ > return error; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 430566
: 293204 |
293319