[Sugar-devel] [PATCH v2 Browse] Fix for the MIME type handling of a request SL #3512

Manuel Quiñones manuq at laptop.org
Thu May 3 22:43:40 EDT 2012


2012/5/3 Manuel Kaufmann <humitos at gmail.com>:
> On Wed, May 2, 2012 at 1:07 PM, Manuel Quiñones <manuq at laptop.org> wrote:
>>             self.emit('open-pdf', request.get_uri())
>> -            return False
>
> Reading the WebKit documentation [1] I found that we HAVE TO return
> True if we are handling the MIME type ourselves. In fact, we have to
> open a new tab (as we are doing now) and ignore the request for the
> original tab. There is a way to do this ignoring the request[2] in
> that tab using:
>
> policy_decision.ignore()
>
> So, you should replace the "return False" by "return True" and put
> "policy_decision.ignore()" immediately after emitting the 'open-pdf'
> signal. I've just tested this and it works.
>
> That's all! Thanks for your patch!

Oh, yes! Thanks for noting.  Sending v3.

>
> [1] http://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView-mime-type-policy-decision-requested
> [2] http://webkitgtk.org/reference/webkitgtk/unstable/WebKitWebPolicyDecision.html#webkit-web-policy-decision-ignore
>
> --
> Kaufmann Manuel
> Blog: http://humitos.wordpress.com/
> Porfolio: http://fotos.mkaufmann.com.ar/
> PyAr: http://www.python.com.ar/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..


More information about the Sugar-devel mailing list