Bug 96959 - Safari 6 notifications' onclick handlers can't call window.open()
Summary: Safari 6 notifications' onclick handlers can't call window.open()
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.8
: P2 Normal
Assignee: Jon Lee
Keywords: InRadar
Depends on:
Reported: 2012-09-17 15:01 PDT by Jon Lee
Modified: 2012-09-20 10:49 PDT (History)
2 users (show)

See Also:

Patch (7.63 KB, patch)
2012-09-17 15:11 PDT, Jon Lee
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2012-09-17 15:01:41 PDT
It is possible to do this in Chrome. Difference is WK2 isn't treating the click as a user gesture.

Comment 1 Jon Lee 2012-09-17 15:11:29 PDT
Created attachment 164460 [details]
Comment 2 Darin Adler 2012-09-17 17:42:04 PDT
Comment on attachment 164460 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=164460&action=review

> Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp:224
> +    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);

A “why” comment would be welcome here. Also, I think the local variable can be named "indicator".

Not caused by this patch: I also think that RAII objects with side effects need clearer names. It’s not at all clear that an indicator is an object that affects global state.
Comment 3 Jon Lee 2012-09-20 10:49:31 PDT
Committed 129140: http://trac.webkit.org/changeset/129140