Re: KDE3, Konq & Flash
On Sunday 26 May 2002 14:03, Jarno Elonen wrote:
> Has anyone got Flash/Shockwave working with the new KDE3 packages?
Flash plugin (and maybe other plugins too) support is broken in kde3. Try this
patch (apply in kdelibs/khtml/), it should fix it. The patch was posted on
kde-devel some time ago.
--
Ciao...
Index: html/html_objectimpl.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/html/html_objectimpl.cpp,v
retrieving revision 1.84
diff -u -p -r1.84 html_objectimpl.cpp
--- html/html_objectimpl.cpp 2002/04/12 08:48:28 1.84
+++ html/html_objectimpl.cpp 2002/04/17 07:52:36
@@ -327,12 +327,16 @@ void HTMLObjectElementImpl::attach()
KHTMLView* w = getDocument()->view();
bool loadplugin = w->part()->pluginsEnabled();
KURL u = getDocument()->completeURL(url);
- for (KHTMLPart* part = w->part(); part; part = part->parentPart())
+
+ // avoid selfreference-crashes with <object>
+ for (KHTMLPart* part = w->part(); part; part = part->parentPart()) {
+ //kdDebug() << "Checking url='" << part->url().url() << "'" << endl;
if (part->url() == u) {
- loadplugin = false;
+ // loadplugin = false;
+ kdDebug() << "Self-Reference! Aborting on url='" << u.url() << "'" << endl;
break;
}
-
+ }
if (loadplugin && parentNode()->renderer()) {
needWidgetUpdate = false;
m_render = new RenderPartObject(this);
Index: rendering/render_frames.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_frames.cpp,v
retrieving revision 1.134
diff -u -p -r1.134 render_frames.cpp
--- rendering/render_frames.cpp 2002/04/07 22:02:11 1.134
+++ rendering/render_frames.cpp 2002/04/17 07:52:36
@@ -602,6 +602,7 @@ void RenderPartObject::updateWidget()
setMinMaxKnown(false);
setLayouted(false);
+ QString movieUrl;
// ### this should be constant true - move iframe to somewhere else
if (element()->id() == ID_OBJECT || element()->id() == ID_EMBED) {
@@ -610,6 +611,9 @@ void RenderPartObject::updateWidget()
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>( child );
QString aStr = p->name();
+ if (aStr == "MOVIE") {
+ movieUrl = p->value();
+ }
aStr += QString::fromLatin1("=\"");
aStr += p->value();
aStr += QString::fromLatin1("\"");
@@ -628,6 +632,7 @@ void RenderPartObject::updateWidget()
for (NodeImpl *child = o->firstChild(); child; child = child->nextSibling())
if ( child->id() == ID_EMBED ) {
embed = static_cast<HTMLEmbedElementImpl *>( child );
+ kdDebug() << "Found <embed> in <object>" << endl;
break;
}
@@ -638,11 +643,14 @@ void RenderPartObject::updateWidget()
{
url = o->url;
serviceType = o->serviceType;
+ kdDebug() << "!embed *********** serviceType='" << serviceType << "' ***************" << endl;
if(serviceType.isEmpty() || serviceType.isNull()) {
if(!o->classId.isEmpty()) {
// We have a clsid, means this is activex (Niko)
serviceType = "application/x-activex-handler";
- url = "dummy"; // Not needed, but KHTMLPart aborts the request if empty
+ if (!movieUrl.isNull() && !movieUrl.isEmpty()) {
+ url = "dummy"; // Not needed, but KHTMLPart aborts the request if empty
+ }
}
if(o->classId.contains(QString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000"))) {
Reply to: