[WebKit-devel] [Bug 194695] Site-specific JavaScript policy does not work

Dawit A. adawit at kde.org
Sun Oct 25 13:54:13 CET 2009


On Sunday 25 October 2009 06:48:00 Allan Sandfeld Jensen wrote:
> On Sunday 25 October 2009, Dawit A. wrote:
> > On Saturday 24 October 2009 18:41:36 Allan Sandfeld Jensen wrote:
> > > Hi
> > >
> > > Great work on this bug, but I would like to remind you that webkit has
> > > a few extra options that khtml does have. Some of these needs to be
> > > possible to deactivate. I can't remember them all right now, but they
> > > are mostly different types of events.
> >
> > My focus is mainly Konqueror integration and hence support as many of the
> > current Konqueror html settings, which are really khtml's settings...
> 
> Yes, I know. I am just writting this because I was looking at the site-
> specific settings myself at aKademy and started trying to make the settings
> more suited for webkit, but was stopped because it required support in
> QtWebKit. So it more of reminder to make the settings more suitable for
>  webkit on the long term. Since it requires patches to QtWebKit I would
>  just like to make sure it on someones mind (other than mine).

Ahhh I see... An item to put on the long term TODO list. ;)

> > > The only one I seem to recall right now is oncontextmenu. This is
> > > convient to turn off you want to avoid sites trying to prevent the
> > > default context- menu from working (as a poor copy-protection, or
> > > ad-block
> > >  protection).
> >
> > Not sure what feature you are talking about here...
> 
> It is a javascript feature where you grab right mouse clicks. This is used
>  in a number of sites, but not supported by khtml. Since right mouse clicks
>  are also used to trigger the brower's own context-menu, a website catching
>  the click will disable the context-menu. In theory this is used for the
>  site to provide their own right-click menues or actions, but is sometimes
>  also used just to disable the browsers default contextmenu. There might be
>  mechanism in WebKit already dealing with the issue already, but this was
>  the reason the feature was not implemented in khtml.

Now I understand what you mean. Indeed there are many examples of how to trap 
mouse click events in a web page and show custom context menu:

http://developer.yahoo.com/yui/examples/menu/contextmenu.html
http://luke.breuer.com/tutorial/javascript-context-menu-tutorial.htm

And indeed webkit allows this where as khtml does not at least with the 
examples above. Anyhow, I currently do not see any option to disable this 
behavior in QtWebKit, namely in QWebSettings.


More information about the WebKit-devel mailing list