<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[180871] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180871">180871</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-03-01 16:08:03 -0800 (Sun, 01 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make NotificationCenter / Notification suspendable
https://bugs.webkit.org/show_bug.cgi?id=142117
&lt;rdar://problem/19923085&gt;

Reviewed by Andreas Kling.

Source/WebCore:

Make NotificationCenter / Notification suspendable so that pages using
them can enter the PageCache.

NotificationCenter can safely be suspended if there are no pending
permission requests. This required adding an
&quot;hasPendingPermissionRequests()&quot; callback to the NotificationClient.

Notification can safely be suspended if it is either idle (not showing
yet) or closed.

Tests: fast/history/page-cache-notification-non-suspendable.html
       fast/history/page-cache-notification-suspendable.html

* Modules/notifications/Notification.cpp:
(WebCore::Notification::canSuspend):
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::canSuspend):
* Modules/notifications/NotificationClient.h:

Source/WebKit/mac:

Provide implementation for NotificationClient::hasPendingPermissionRequests().
The implementation is very simplistic. it will only return false if no
request for permission for ever made. This is because there is currently no
easy way to figure out if a permission request is pending or not.

* WebCoreSupport/WebNotificationClient.h:
* WebCoreSupport/WebNotificationClient.mm:
(WebNotificationClient::requestPermission):
(WebNotificationClient::hasPendingPermissionRequests):

Source/WebKit/win:

Provide implementation for NotificationClient::hasPendingPermissionRequests().

* WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
(WebDesktopNotificationsDelegate::requestPermission):
(hasPendingPermissionRequests):
* WebCoreSupport/WebDesktopNotificationsDelegate.h:

Source/WebKit2:

Provide implementation for NotificationClient::hasPendingPermissionRequests().

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::hasPendingPermissionRequests):
* WebProcess/WebCoreSupport/WebNotificationClient.h:

LayoutTests:

Add layout tests to cover cases where notifications should prevent
entering the PageCache or not.

* fast/history/page-cache-notification-non-suspendable-expected.txt: Added.
* fast/history/page-cache-notification-non-suspendable.html: Added.
* fast/history/page-cache-notification-suspendable-expected.txt: Added.
* fast/history/page-cache-notification-suspendable.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwincairoTestExpectations">trunk/LayoutTests/platform/wincairo/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationcpp">trunk/Source/WebCore/Modules/notifications/Notification.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationCentercpp">trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationClienth">trunk/Source/WebCore/Modules/notifications/NotificationClient.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebNotificationClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebNotificationClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebDesktopNotificationsDelegatecpp">trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebDesktopNotificationsDelegateh">trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNotificationsNotificationPermissionRequestManagercpp">trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNotificationsNotificationPermissionRequestManagerh">trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebNotificationClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebNotificationClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasthistorypagecachenotificationnonsuspendableexpectedtxt">trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasthistorypagecachenotificationnonsuspendablehtml">trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable.html</a></li>
<li><a href="#trunkLayoutTestsfasthistorypagecachenotificationsuspendableexpectedtxt">trunk/LayoutTests/fast/history/page-cache-notification-suspendable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasthistorypagecachenotificationsuspendablehtml">trunk/LayoutTests/fast/history/page-cache-notification-suspendable.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/LayoutTests/ChangeLog        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-03-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Make NotificationCenter / Notification suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142117
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Add layout tests to cover cases where notifications should prevent
+        entering the PageCache or not.
+
+        * fast/history/page-cache-notification-non-suspendable-expected.txt: Added.
+        * fast/history/page-cache-notification-non-suspendable.html: Added.
+        * fast/history/page-cache-notification-suspendable-expected.txt: Added.
+        * fast/history/page-cache-notification-suspendable.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/ios-simulator/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wincairo/TestExpectations:
+
</ins><span class="cx"> 2015-03-01  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         EFL, GTK+, and Windows rebaselines after r180867.
</span></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecachenotificationnonsuspendableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable-expected.txt (0 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable-expected.txt        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Tests that a page with a notification that is showing does not enter page cache.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+pageshow - not from cache
+PASS Page was not restored from page cache
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecachenotificationnonsuspendablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable.html (0 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable.html                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-notification-non-suspendable.html        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description('Tests that a page with a notification that is showing does not enter page cache.');
+window.jsTestIsAsync = true;
+
+if (window.testRunner) {
+    testRunner.overridePreference(&quot;WebKitUsesPageCachePreferenceKey&quot;, 1);
+    testRunner.grantWebNotificationPermission(&quot;file://&quot;);
+}
+
+window.addEventListener(&quot;pageshow&quot;, function(event) {
+    debug(&quot;pageshow - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;from cache&quot;);
+    if (!window.sessionStorage.page_cache_notifications_test_started)
+        return;
+
+    delete window.sessionStorage.page_cache_notifications_test_started;
+
+    if (event.persisted)
+        testFailed(&quot;Page did enter and was restored from the page cache&quot;);
+    else
+        testPassed(&quot;Page was not restored from page cache&quot;);
+    finishJSTest();
+}, false);
+
+window.addEventListener(&quot;pagehide&quot;, function(event) {
+    debug(&quot;pagehide - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;entering cache&quot;);
+    if (event.persisted) {
+        testFailed(&quot;Page entered the page cache.&quot;);
+        finishJSTest();
+    }
+}, false);
+
+window.addEventListener('load', function() {
+    window.sessionStorage.page_cache_notifications_test_started = true;
+
+    // This notification is shown and should not be suspendable.
+    notification = webkitNotifications.createNotification('', 'title 2', 'body');
+    notification.onerror = function() {
+        testFailed(&quot;Could not show the notification&quot;);
+        finishJSTest();
+    };
+    notification.ondisplay = function() {
+        // Force a back navigation back to this page.
+        window.location.href = &quot;resources/page-cache-helper.html&quot;;
+    };
+    notification.show();
+}, false);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecachenotificationsuspendableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-notification-suspendable-expected.txt (0 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-notification-suspendable-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-notification-suspendable-expected.txt        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Tests that notifications do not prevent the Page from entering page cache if they are idle or closed.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+pageshow - not from cache
+pagehide - entering cache
+pageshow - from cache
+PASS Page did enter and was restored from the page cache
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthistorypagecachenotificationsuspendablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/history/page-cache-notification-suspendable.html (0 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/history/page-cache-notification-suspendable.html                                (rev 0)
+++ trunk/LayoutTests/fast/history/page-cache-notification-suspendable.html        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description('Tests that notifications do not prevent the Page from entering page cache if they are idle or closed.');
+window.jsTestIsAsync = true;
+
+if (window.testRunner) {
+    testRunner.overridePreference(&quot;WebKitUsesPageCachePreferenceKey&quot;, 1);
+    testRunner.grantWebNotificationPermission(&quot;file://&quot;);
+}
+
+window.addEventListener(&quot;pageshow&quot;, function(event) {
+    debug(&quot;pageshow - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;from cache&quot;);
+
+    if (event.persisted) {
+        testPassed(&quot;Page did enter and was restored from the page cache&quot;);
+        finishJSTest();
+    }
+}, false);
+
+window.addEventListener(&quot;pagehide&quot;, function(event) {
+    debug(&quot;pagehide - &quot; + (event.persisted ? &quot;&quot; : &quot;not &quot;) + &quot;entering cache&quot;);
+    if (!event.persisted) {
+        testFailed(&quot;Page did not enter the page cache.&quot;);
+        finishJSTest();
+    }
+}, false);
+
+window.addEventListener('load', function() {
+    // This notification is in idle state and should be suspendable.
+    notification1 = webkitNotifications.createNotification('', 'title 1', 'body');
+
+    // This notification is shown and should be suspendable once it is closed.
+    notification2 = webkitNotifications.createNotification('', 'title 2', 'body');
+    notification2.ondisplay = function() {
+        // Close the notification.
+        setTimeout(function() {
+            notification2.cancel();
+        }, 0);
+    };
+    notification2.onerror = function() {
+        testFailed(&quot;Could not display the notification&quot;);
+        finishJSTest();
+    };
+    notification2.onclose = function() {
+        setTimeout(function() {
+            // Force a back navigation back to this page.
+            window.location.href = &quot;resources/page-cache-helper.html&quot;;
+        }, 0);
+    };
+    notification2.show();
+}, false);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/TestExpectations        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/LayoutTests/platform/efl/TestExpectations        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1074,6 +1074,8 @@
</span><span class="cx"> # Requires support for Web notifications
</span><span class="cx"> webkit.org/b/73544 fast/notifications [ Skip ]
</span><span class="cx"> webkit.org/b/73544 http/tests/notifications [ Skip ]
</span><ins>+webkit.org/b/73544 fast/history/page-cache-notification-non-suspendable.html [ Skip ]
+webkit.org/b/73544 fast/history/page-cache-notification-suspendable.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # The test is too slow on Debug bot and randomly fails
</span><span class="cx"> webkit.org/b/61932 [ Debug ] jquery/manipulation.html [ Failure Pass Timeout ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -148,6 +148,8 @@
</span><span class="cx"> 
</span><span class="cx"> # https://bugs.webkit.org/show_bug.cgi?id=81697 Skip file:// based notifications tests
</span><span class="cx"> fast/notifications
</span><ins>+fast/history/page-cache-notification-non-suspendable.html
+fast/history/page-cache-notification-suspendable.html
</ins><span class="cx"> 
</span><span class="cx"> # we do not enable legacy notifications
</span><span class="cx"> http/tests/notifications/legacy/window-show-on-click.html
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -26,10 +26,15 @@
</span><span class="cx"> # FIXME: &lt;rdar://problem/6512037&gt; LayoutTests: Enable printing tests once printing is supported on iOS
</span><span class="cx"> printing
</span><span class="cx"> 
</span><ins>+# Web Notifications are not supported on iOS.
+fast/notifications
+http/tests/notifications
+fast/history/page-cache-notification-non-suspendable.html
+fast/history/page-cache-notification-suspendable.html
+
</ins><span class="cx"> # Not supported on iOS
</span><span class="cx"> batterystatus
</span><span class="cx"> fast/mediastream
</span><del>-fast/notifications
</del><span class="cx"> fast/speechsynthesis
</span><span class="cx"> gamepad
</span><span class="cx"> java
</span><span class="lines">@@ -38,7 +43,6 @@
</span><span class="cx"> touchadjustment
</span><span class="cx"> vibration
</span><span class="cx"> webaudio
</span><del>-http/tests/notifications
</del><span class="cx"> 
</span><span class="cx"> # ENABLE(MEDIA_CAPTURE) is not enabled
</span><span class="cx"> fast/forms/file/file-input-capture.html
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/LayoutTests/platform/win/TestExpectations        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -128,6 +128,8 @@
</span><span class="cx"> # TODO This port doesn't support Notifications.
</span><span class="cx"> fast/notifications/ [ Skip ]
</span><span class="cx"> http/tests/notifications/ [ Skip ]
</span><ins>+fast/history/page-cache-notification-non-suspendable.html [ Skip ]
+fast/history/page-cache-notification-suspendable.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # TODO DumpRenderTree code to enable Java is currently a no-op. Windows doesn't come with Java by default.
</span><span class="cx"> java/ [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwincairoTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wincairo/TestExpectations        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1333,6 +1333,8 @@
</span><span class="cx"> # This port doesn't support Notifications.
</span><span class="cx"> fast/notifications
</span><span class="cx"> http/tests/notifications
</span><ins>+fast/history/page-cache-notification-non-suspendable.html
+fast/history/page-cache-notification-suspendable.html
</ins><span class="cx"> 
</span><span class="cx"> # These media tests regressed on the bots.  Skipping to make the bots green again.
</span><span class="cx"> # https://bugs.webkit.org/show_bug.cgi?id=28281
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebCore/ChangeLog        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-03-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Make NotificationCenter / Notification suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142117
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Make NotificationCenter / Notification suspendable so that pages using
+        them can enter the PageCache.
+
+        NotificationCenter can safely be suspended if there are no pending
+        permission requests. This required adding an
+        &quot;hasPendingPermissionRequests()&quot; callback to the NotificationClient.
+
+        Notification can safely be suspended if it is either idle (not showing
+        yet) or closed.
+
+        Tests: fast/history/page-cache-notification-non-suspendable.html
+               fast/history/page-cache-notification-suspendable.html
+
+        * Modules/notifications/Notification.cpp:
+        (WebCore::Notification::canSuspend):
+        * Modules/notifications/NotificationCenter.cpp:
+        (WebCore::NotificationCenter::canSuspend):
+        * Modules/notifications/NotificationClient.h:
+
</ins><span class="cx"> 2015-03-01  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         isContentEditable shouldn't trigger synchronous style recalc in most cases
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/Notification.cpp (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/Notification.cpp        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebCore/Modules/notifications/Notification.cpp        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -177,8 +177,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool Notification::canSuspend() const
</span><span class="cx"> {
</span><del>-    // FIXME: We should try and do better here.
-    return false;
</del><ins>+    // We can suspend if the Notification is not shown yet or after it is closed.
+    return m_state == Idle || m_state == Closed;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Notification::finalize()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationCentercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -112,8 +112,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool NotificationCenter::canSuspend() const
</span><span class="cx"> {
</span><del>-    // FIXME: We should try and do better here.
-    return false;
</del><ins>+    // We don't need to worry about Notifications because those are ActiveDOMObject too.
+    // The NotificationCenter can safely be suspended if there are no pending permission
+    // requests.
+    return m_callbacks.isEmpty() &amp;&amp; (!m_client || !m_client-&gt;hasPendingPermissionRequests(scriptExecutionContext()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NotificationCenter::requestTimedOut(NotificationCenter::NotificationRequestCallback* request)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/NotificationClient.h (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/NotificationClient.h        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebCore/Modules/notifications/NotificationClient.h        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -81,6 +81,8 @@
</span><span class="cx">     virtual void requestPermission(ScriptExecutionContext*, PassRefPtr&lt;NotificationPermissionCallback&gt;) = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    virtual bool hasPendingPermissionRequests(ScriptExecutionContext*) const = 0;
+
</ins><span class="cx">     // Cancel all outstanding requests for the ScriptExecutionContext
</span><span class="cx">     virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-03-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Make NotificationCenter / Notification suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142117
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Provide implementation for NotificationClient::hasPendingPermissionRequests().
+        The implementation is very simplistic. it will only return false if no
+        request for permission for ever made. This is because there is currently no
+        easy way to figure out if a permission request is pending or not.
+
+        * WebCoreSupport/WebNotificationClient.h:
+        * WebCoreSupport/WebNotificationClient.mm:
+        (WebNotificationClient::requestPermission):
+        (WebNotificationClient::hasPendingPermissionRequests):
+
</ins><span class="cx"> 2015-02-28  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Viewport units should not dirty style just before we do layout
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebNotificationClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx">     virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr&lt;WebCore::NotificationPermissionCallback&gt;) override;
</span><span class="cx"> #endif
</span><span class="cx">     virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) override { }
</span><ins>+    virtual bool hasPendingPermissionRequests(WebCore::ScriptExecutionContext*) const override;
</ins><span class="cx">     virtual WebCore::NotificationClient::Permission checkPermission(WebCore::ScriptExecutionContext*) override;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
</span><span class="lines">@@ -78,5 +79,7 @@
</span><span class="cx">     
</span><span class="cx">     typedef HashMap&lt;RefPtr&lt;WebCore::ScriptExecutionContext&gt;, Vector&lt;RetainPtr&lt;WebNotification&gt;&gt;&gt; NotificationContextMap;
</span><span class="cx">     NotificationContextMap m_notificationContextMap;
</span><ins>+
+    bool m_everRequestedPermission { false };
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebNotificationClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -170,7 +170,9 @@
</span><span class="cx">     SEL selector = @selector(webView:decidePolicyForNotificationRequestFromOrigin:listener:);
</span><span class="cx">     if (![[m_webView UIDelegate] respondsToSelector:selector])
</span><span class="cx">         return;
</span><del>-    
</del><ins>+
+    m_everRequestedPermission = true;
+
</ins><span class="cx">     WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:context-&gt;securityOrigin()];
</span><span class="cx">     
</span><span class="cx">     CallUIDelegate(m_webView, selector, webOrigin, listener);
</span><span class="lines">@@ -190,6 +192,17 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+bool WebNotificationClient::hasPendingPermissionRequests(ScriptExecutionContext*) const
+{
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+    // We know permission was requested but we don't know if the client responded. In this case, we play it
+    // safe and presume there is one pending so that ActiveDOMObjects don't get suspended.
+    return m_everRequestedPermission;
+#else
+    return false;
+#endif
+}
+
</ins><span class="cx"> #if ENABLE(NOTIFICATIONS)
</span><span class="cx"> void WebNotificationClient::requestPermission(ScriptExecutionContext* context, PassRefPtr&lt;NotificationPermissionCallback&gt; callback)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit/win/ChangeLog        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-03-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Make NotificationCenter / Notification suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142117
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Provide implementation for NotificationClient::hasPendingPermissionRequests().
+
+        * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+        (WebDesktopNotificationsDelegate::requestPermission):
+        (hasPendingPermissionRequests):
+        * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
</ins><span class="cx"> 2015-02-26  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Remove remaining SafariTheme cruft
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebDesktopNotificationsDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin, PassRefPtr&lt;VoidCallback&gt; callback)
</del><ins>+void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin, PassRefPtr&lt;VoidCallback&gt;)
</ins><span class="cx"> {
</span><span class="cx">     BString org(origin-&gt;toString());
</span><span class="cx">     if (hasNotificationDelegate())
</span><span class="lines">@@ -183,6 +183,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool hasPendingPermissionRequests(ScriptExecutionContext*) const
+{
+    // We can safely return false here because our implementation for requestPermission() never calls
+    // the completion callback.
+    return false;
+}
+
</ins><span class="cx"> NotificationClient::Permission WebDesktopNotificationsDelegate::checkPermission(const URL&amp; url)
</span><span class="cx"> {
</span><span class="cx">     int out = 0;
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebDesktopNotificationsDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> #if ENABLE(NOTIFICATIONS)
</span><span class="cx">     virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr&lt;WebCore::NotificationPermissionCallback&gt;);
</span><span class="cx"> #endif
</span><ins>+    virtual bool hasPendingPermissionRequests(WebCore::ScriptExecutionContext*) const override;
</ins><span class="cx">     virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*);
</span><span class="cx">     virtual WebCore::NotificationClient::Permission checkPermission(const URL&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit2/ChangeLog        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-03-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Make NotificationCenter / Notification suspendable
+        https://bugs.webkit.org/show_bug.cgi?id=142117
+        &lt;rdar://problem/19923085&gt;
+
+        Reviewed by Andreas Kling.
+
+        Provide implementation for NotificationClient::hasPendingPermissionRequests().
+
+        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
+        (WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
+        * WebProcess/Notifications/NotificationPermissionRequestManager.h:
+        * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
+        (WebKit::WebNotificationClient::hasPendingPermissionRequests):
+        * WebProcess/WebCoreSupport/WebNotificationClient.h:
+
</ins><span class="cx"> 2015-03-01  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Enable new disk cache on iOS
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNotificationsNotificationPermissionRequestManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -120,6 +120,16 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool NotificationPermissionRequestManager::hasPendingPermissionRequests(SecurityOrigin* origin) const
+{
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+    return m_originToIDMap.contains(origin);
+#else
+    UNUSED_PARAM(origin);
+    return false;
+#endif
+}
+
</ins><span class="cx"> NotificationClient::Permission NotificationPermissionRequestManager::permissionLevel(SecurityOrigin* securityOrigin)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNotificationsNotificationPermissionRequestManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.h (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.h        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.h        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx">     void startRequest(WebCore::SecurityOrigin*, PassRefPtr&lt;WebCore::VoidCallback&gt;);
</span><span class="cx"> #endif
</span><span class="cx">     void cancelRequest(WebCore::SecurityOrigin*);
</span><ins>+    bool hasPendingPermissionRequests(WebCore::SecurityOrigin*) const;
</ins><span class="cx">     
</span><span class="cx">     WebCore::NotificationClient::Permission permissionLevel(WebCore::SecurityOrigin*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebNotificationClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -86,6 +86,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+bool WebNotificationClient::hasPendingPermissionRequests(ScriptExecutionContext* context) const
+{
+    return m_page-&gt;notificationPermissionRequestManager()-&gt;hasPendingPermissionRequests(context-&gt;securityOrigin());
+}
+
</ins><span class="cx"> void WebNotificationClient::cancelRequestsForPermission(ScriptExecutionContext* context)
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;notificationPermissionRequestManager()-&gt;cancelRequest(context-&gt;securityOrigin());
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebNotificationClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h (180870 => 180871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h        2015-03-01 22:34:12 UTC (rev 180870)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h        2015-03-02 00:08:03 UTC (rev 180871)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx">     virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr&lt;WebCore::NotificationPermissionCallback&gt;) override;
</span><span class="cx"> #endif
</span><span class="cx">     virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) override;
</span><ins>+    virtual bool hasPendingPermissionRequests(WebCore::ScriptExecutionContext*) const override;
</ins><span class="cx">     virtual NotificationClient::Permission checkPermission(WebCore::ScriptExecutionContext*) override;
</span><span class="cx">     
</span><span class="cx">     WebPage* m_page;
</span></span></pre>
</div>
</div>

</body>
</html>