[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Bug#22331: how to reproduce.
From:       Leon Bottou <leonb () research ! att ! com>
Date:       2001-03-15 20:01:40
[Download RAW message or body]


How to reproduce the problem.

Requirements:
- Latest cvs version of kdebase/nsplugins.
- DjVu plugin (http://www.djvu.com/download).

Go to URL:
http://www.djvuzone.org/cgi-bin/htdemo/makeframes?query=/djvu/sci/shannon/index.djvu?djvuopts&page=1

Without the patch, you will see a dialog asking whether you
want to save the data into file.  The upper frame only contains a
message
from the nsplugin part explaining that a proper plugin could not be
found.

The nsplugin part starts because KHTMLPart::processObjectRequest()
has the mimetype information and can determine which part should run.
But the nsplugin part also needs the mimetype in order to determine
which plugin to run.  It does this using BrowserExtension::urlArgs()
and looking at the UrlArgs::serviceType field.  But it is empty.

The patch suggested in my initial message simply copies
the mimetype into the UrlArgs::serviceType field.
With the patch, the plugin starts properly, and you can 
see the djvu image in the upper frame.

This patch addresses a problem that will occur with every part
that needs to access the actual mimetype in order to decide
what to do (i.e. almost every part serving more than one mimetype).
The nsplugin part is a good example.

Hope it helps.

- Leon Bottou


P.S.: the patch again:

Index: khtml_part.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtml_part.cpp,v
retrieving revision 1.429
diff -u -3 -p -r1.429 khtml_part.cpp
--- khtml_part.cpp      2001/03/09 15:52:04     1.429
+++ khtml_part.cpp      2001/03/15 19:59:05
@@ -2552,6 +2552,7 @@ bool KHTMLPart::processObjectRequest( kh
     }
 
     child->m_serviceType = mimetype;
+    child->m_args.serviceType = mimetype;
     if ( child->m_frame )
       child->m_frame->setWidget( part->widget() );

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic