Patch for Music India OnLine

Koos Vriezen koos.vriezen at xs4all.nl
Tue Jul 20 17:22:13 BST 2004


Hi,

Bug #77250, mentioned in the dot article is because some of the OBJECTs
don't have a source bind to it. I already changed this for EMBED
elements to allow that. The case here are OBJECTs with EMBEDs, so we
should allow that too (see patch)

Koos
-------------- next part --------------
Index: rendering/render_frames.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_frames.cpp,v
retrieving revision 1.179
diff -u -3 -p -r1.179 render_frames.cpp
--- rendering/render_frames.cpp	5 Jun 2004 23:19:57 -0000	1.179
+++ rendering/render_frames.cpp	20 Jul 2004 16:17:11 -0000
@@ -644,15 +644,16 @@ void RenderPartObject::updateWidget()
       params.append( QString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
       params.append( QString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
 
+      HTMLEmbedElementImpl *embed = 0;
       if ( element()->id() == ID_EMBED ) {
 
           serviceType = objbase->serviceType;
+          embed = static_cast<HTMLEmbedElementImpl *> (objbase);
 
       }
       else { // if(element()->id() == ID_OBJECT || element()->id() == ID_APPLET)
 
           // check for embed child object
-          HTMLEmbedElementImpl *embed = 0;
           for (NodeImpl *child = objbase->firstChild(); child; child = child->nextSibling())
               if ( child->id() == ID_EMBED ) {
                   embed = static_cast<HTMLEmbedElementImpl *>( child );
@@ -704,7 +705,7 @@ void RenderPartObject::updateWidget()
               }
           }
       }
-      if ((url.isEmpty() && element()->id() != ID_EMBED) || !document()->isURLAllowed(url) || !part->requestObject( this, url, serviceType, params ))
+      if ((url.isEmpty() && !embed) || !document()->isURLAllowed(url) || !part->requestObject( this, url, serviceType, params ))
           objbase->renderAlternative();
       else
           objbase->setLiveConnect(part->liveConnectExtension(this));


More information about the kfm-devel mailing list