Skip to content
  • jonlee@apple.com's avatar
    Safari 6 notifications' onclick handlers can't call window.open() · 2a69abdf
    jonlee@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=96959
    <rdar://problem/12132427>
    
    Reviewed by Darin Adler.
    
    Source/WebKit2:
    
    The click is not being treated as a user gesture when the message is sent to the web process.
    
    * WebProcess/Notifications/WebNotificationManager.cpp:
    (WebKit::WebNotificationManager::didClickNotification): Gets called when the user clicks on the
    platform notification. Set UserGestureIndicator to show the click event is due to user gesture.
    
    LayoutTests:
    
    The test shows and clicks a platform notification. The onclick handler calls window.open(),
    which in turn calls a function on the main page to confirm that a window was opened.
    
    * http/tests/notifications/legacy/window-show-on-click-expected.txt: Added.
    * http/tests/notifications/legacy/window-show-on-click.html: Added.
    * http/tests/notifications/resources/window-show-on-click.html: Added.
    * http/tests/notifications/window-show-on-click-expected.txt: Added.
    * http/tests/notifications/window-show-on-click.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2a69abdf