Hi, currently, WebKit allows for an arbitrary number of new windows to be created in response to a single user gesture. This is "used" for example to create pop-unders.
In order to restrict the number of new windows to one per user gesture, a port needs to invoke UserGestureIndicator::consumeUserGesture() in it's ChromeClient::createWindow method. In https://bugs.webkit.org/show_bug.cgi?id=114379 I add this for WK2 and for WK1 mac/win. Are other ports interested in this behavior? If not, I'd just skip the corresponding tests. There are some gotchas: e.g. if your port is using out of process plugins, and the plugin wants to react to a user gesture, you're probably storing whether WebKit is processing a user gesture before calling out to the plugin, and restore a UserGestureIndicator once the plugin replies. To make sure a plugin cannot use this to generate additional user gestures (after the original user gesture was already consumed), you should store the UserGestureIndicator::currentToken() and use that to create the UserGestureIndicator (it's basically a ref-counted integer of how many gestures are left to consume). best -jochen
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev