Bug 96959 - Safari 6 notifications' onclick handlers can't call window.open()
Summary: Safari 6 notifications' onclick handlers can't call window.open()
Status: RESOLVED FIXED
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
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-09-17 15:01 PDT by Jon Lee
Modified: 2012-09-20 10:49 PDT (History)
2 users (show)

See Also:


Attachments
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.

<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