When OBJECT's 'confirm open' becomes not so nice...

Koos Vriezen koos.vriezen at xs4all.nl
Sat Oct 23 14:48:27 BST 2004


On Mon, Oct 18, 2004 at 08:10:43PM +0200, Koos Vriezen wrote:
> I'm not sure yet where this mime comes from, because this page has only
> classid set. Did find a problem, but it didn't change the popup (asked
> for the same audio/x-pn-realaudio-plugin mime):
> 
> RCS file: /home/kde/kdelibs/khtml/rendering/render_frames.cpp,v
> retrieving revision 1.187
> diff -u -3 -p -r1.187 render_frames.cpp
> --- rendering/render_frames.cpp 14 Oct 2004 12:17:59 -0000      1.187
> +++ rendering/render_frames.cpp 18 Oct 2004 17:58:19 -0000
> @@ -693,7 +695,9 @@ void RenderPartObject::updateWidget()
>                        serviceType = "application/x-shockwave-flash";
>                    }
>                    else if(objbase->classId.contains(QString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")))
> -                      serviceType = "audio/x-pn-realaudio-plugin";
> +                      //if we support -plugin suffixes
> +                      //serviceType = "audio/x-pn-realaudio-plugin";
> +                      serviceType = "audio/x-pn-realaudio";
>                    else if(objbase->classId.contains(QString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) ||
>                            objbase->classId.contains(QString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")))
>                        serviceType = "application/x-java-applet";
> 
> Although I'm not sure what to do. Currently we strip '-plugin' suffixes
> in khtml, so we should do it here too.

Heh, how silly it doesn't get there in the 
   <object CLASSID="...">
     <embed SRC="...">
   </object>
case. Because here khtml takes the servicetype from the embed and
doesn't fall back on the classid check in case servicetype is empty.
Proposed patch attached.

> However people from Real requested
> to revert that and only, as a fail back, strip it. Personally I don't
> like that, because we have to add lots of mimes (embeddedable) twice.
> Also I'm uncertain what will happen with the nsplugin generated version,
> will it still work (ie. does nsplugin also generate the
> audio/x-pn-realaudio one? Can you check?)

Probably asking to much, I just commit and hear people complaning if
real plugins doesn't work anymore on some pages (like
http://service.real.com/help/library/guides/realone/ProductionGuide/HTML/samples/embed/plugin2.htm
).

Koos
-------------- next part --------------
Index: rendering/render_frames.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_frames.cpp,v
retrieving revision 1.187
diff -u -3 -p -r1.187 render_frames.cpp
--- rendering/render_frames.cpp	14 Oct 2004 12:17:59 -0000	1.187
+++ rendering/render_frames.cpp	23 Oct 2004 13:38:12 -0000
@@ -676,7 +676,6 @@ void RenderPartObject::updateWidget()
               url = embed->url;
               serviceType = embed->serviceType;
           }
-          else {
               serviceType = objbase->serviceType;
               if(serviceType.isEmpty() && !objbase->classId.isEmpty()) {
 
@@ -693,7 +692,9 @@ void RenderPartObject::updateWidget()
                       serviceType = "application/x-shockwave-flash";
                   }
                   else if(objbase->classId.contains(QString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")))
-                      serviceType = "audio/x-pn-realaudio-plugin";
+                      //if we support -plugin suffixes
+                      //serviceType = "audio/x-pn-realaudio-plugin";
+                      serviceType = "audio/x-pn-realaudio";
                   else if(objbase->classId.contains(QString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) ||
                           objbase->classId.contains(QString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")))
                       serviceType = "application/x-java-applet";
@@ -703,7 +704,6 @@ void RenderPartObject::updateWidget()
 
                   // TODO: add more plugins here
               }
-          }
       }
       if ((url.isEmpty() && !embed) || !document()->isURLAllowed(url) || !part->requestObject( this, url, serviceType, params ))
           objbase->renderAlternative();


More information about the kfm-devel mailing list