Bug 96959

Summary: Safari 6 notifications' onclick handlers can't call window.open()
Product: WebKit Reporter: Jon Lee <jonlee>
Component: DOMAssignee: Jon Lee <jonlee>
Status: RESOLVED FIXED    
Severity: Normal CC: jberlin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.8   
Attachments:
Description Flags
Patch darin: review+

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.

<rdar://problem/12132427>
Comment 1 Jon Lee 2012-09-17 15:11:29 PDT
Created attachment 164460 [details]
Patch
Comment 2 Darin Adler 2012-09-17 17:42:04 PDT
Comment on attachment 164460 [details]
Patch

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