Title: [182544] trunk/Source
Revision
182544
Author
[email protected]
Date
2015-04-08 09:45:01 -0700 (Wed, 08 Apr 2015)

Log Message

Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
https://bugs.webkit.org/show_bug.cgi?id=143513

Reviewed by Andreas Kling.

Source/WebCore:

Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for
clarity as it is only used for the page cache. Also rename the
'DocumentWillBecomeInactive' value of the ReasonForSuspension enum to
'PageCache' as it is only used by CachedFrame for the page cache and it
is a lot more understandable.

Source/WebKit/mac:

Update ScriptExecutionContext::canSuspendActiveDOMObjects() to
canSuspendActiveDOMObjectsForPageCache() as the method was renamed.

* WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (182543 => 182544)


--- trunk/Source/WebCore/ChangeLog	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/ChangeLog	2015-04-08 16:45:01 UTC (rev 182544)
@@ -1,3 +1,16 @@
+2015-04-08  Chris Dumez  <[email protected]>
+
+        Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=143513
+
+        Reviewed by Andreas Kling.
+
+        Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for
+        clarity as it is only used for the page cache. Also rename the
+        'DocumentWillBecomeInactive' value of the ReasonForSuspension enum to
+        'PageCache' as it is only used by CachedFrame for the page cache and it
+        is a lot more understandable.
+
 2015-04-08  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r182536.

Modified: trunk/Source/WebCore/Modules/battery/BatteryManager.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/battery/BatteryManager.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/battery/BatteryManager.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -88,7 +88,7 @@
     m_batteryStatus = batteryStatus;
 }
 
-bool BatteryManager::canSuspend() const
+bool BatteryManager::canSuspendForPageCache() const
 {
     return true;
 }

Modified: trunk/Source/WebCore/Modules/battery/BatteryManager.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/battery/BatteryManager.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/battery/BatteryManager.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -61,7 +61,7 @@
     explicit BatteryManager(Navigator*);
 
     // ActiveDOMObject API.
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void suspend(ReasonForSuspension) override;
     void resume() override;
     void stop() override;

Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -265,7 +265,7 @@
     return "MediaKeySession";
 }
 
-bool MediaKeySession::canSuspend() const
+bool MediaKeySession::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -113,7 +113,7 @@
 
     // ActiveDOMObject API.
     void stop() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     const char* activeDOMObjectName() const override;
 };
 

Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -162,7 +162,7 @@
     return document() ? document()->page() : nullptr;
 }
 
-bool Geolocation::canSuspend() const
+bool Geolocation::canSuspendForPageCache() const
 {
     return !hasListeners();
 }
@@ -171,7 +171,7 @@
 {
     // Allow pages that no longer have listeners to enter the page cache.
     // Have them stop updating and reset geolocation permissions when the page is resumed.
-    if (reason == ActiveDOMObject::DocumentWillBecomeInactive) {
+    if (reason == ActiveDOMObject::PageCache) {
         ASSERT(!hasListeners());
         stop();
         m_resetOnResume = true;

Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/geolocation/Geolocation.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -78,7 +78,7 @@
 
     // ActiveDOMObject
     void stop() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void suspend(ReasonForSuspension) override;
     void resume() override;
     const char* activeDOMObjectName() const override;

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -366,7 +366,7 @@
     return "IDBDatabase";
 }
 
-bool IDBDatabase::canSuspend() const
+bool IDBDatabase::canSuspendForPageCache() const
 {
     return m_isClosed;
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -110,7 +110,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     // EventTarget
     virtual void refEventTarget() override final { ref(); }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -443,7 +443,7 @@
         markEarlyDeath();
 }
 
-bool IDBRequest::canSuspend() const
+bool IDBRequest::canSuspendForPageCache() const
 {
     return !m_hasPendingActivity;
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -130,7 +130,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     // EventTarget API.
     virtual void refEventTarget() override final { ref(); }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -394,7 +394,7 @@
     return returnValue;
 }
 
-bool IDBTransaction::canSuspend() const
+bool IDBTransaction::canSuspendForPageCache() const
 {
     // FIXME: Technically we can suspend before the first request is schedule
     //        and after the complete/abort event is enqueued.

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -122,7 +122,7 @@
     void unregisterOpenCursor(IDBCursor*);
 
     // ActiveDOMObject API.
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void stop() override;
     const char* activeDOMObjectName() const override;
 

Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -809,7 +809,7 @@
     m_private.clear();
 }
 
-bool MediaSource::canSuspend() const
+bool MediaSource::canSuspendForPageCache() const
 {
     return isClosed() && !m_asyncEventQueue.hasPendingEvents();
 }

Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediasource/MediaSource.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -119,7 +119,7 @@
 
     // ActiveDOMObject API.
     void stop() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     const char* activeDOMObjectName() const override;
 
     void onReadyStateChange(const AtomicString& oldState, const AtomicString& newState);

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -510,7 +510,7 @@
     m_removeTimer.stop();
 }
 
-bool SourceBuffer::canSuspend() const
+bool SourceBuffer::canSuspendForPageCache() const
 {
     return !hasPendingActivity();
 }

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -139,7 +139,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     // SourceBufferPrivateClient
     virtual void sourceBufferPrivateDidEndStream(SourceBufferPrivate*, const WTF::AtomicString&) override;

Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -293,7 +293,7 @@
     return "MediaStreamTrack";
 }
 
-bool MediaStreamTrack::canSuspend() const
+bool MediaStreamTrack::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -113,7 +113,7 @@
     // ActiveDOMObject API.
     void stop() override final;
     const char* activeDOMObjectName() const override final;
-    bool canSuspend() const override final;
+    bool canSuspendForPageCache() const override final;
 
     // EventTarget
     virtual void refEventTarget() override final { ref(); }

Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -139,7 +139,7 @@
     return "RTCDTMFSender";
 }
 
-bool RTCDTMFSender::canSuspend() const
+bool RTCDTMFSender::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -69,7 +69,7 @@
     // ActiveDOMObject
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void scheduleDispatchEvent(PassRefPtr<Event>);
     void scheduledEventTimerFired();

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -695,7 +695,7 @@
     return "RTCPeerConnection";
 }
 
-bool RTCPeerConnection::canSuspend() const
+bool RTCPeerConnection::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -138,7 +138,7 @@
     // ActiveDOMObject
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void changeSignalingState(SignalingState);
     void changeIceGatheringState(IceGatheringState);

Modified: trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -89,7 +89,7 @@
     return "RTCSessionDescriptionRequestImpl";
 }
 
-bool RTCSessionDescriptionRequestImpl::canSuspend() const
+bool RTCSessionDescriptionRequestImpl::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -57,7 +57,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void clear();
 

Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -96,7 +96,7 @@
     return "RTCStatsRequestImpl";
 }
 
-bool RTCStatsRequestImpl::canSuspend() const
+bool RTCStatsRequestImpl::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -57,7 +57,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void clear();
 

Modified: trunk/Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -86,7 +86,7 @@
     return "RTCVoidRequestImpl";
 }
 
-bool RTCVoidRequestImpl::canSuspend() const
+bool RTCVoidRequestImpl::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -58,7 +58,7 @@
     // ActiveDOMObject
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     RefPtr<VoidCallback> m_successCallback;
     RefPtr<RTCPeerConnectionErrorCallback> m_errorCallback;

Modified: trunk/Source/WebCore/Modules/notifications/Notification.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/notifications/Notification.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/notifications/Notification.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -175,7 +175,7 @@
     return "Notification";
 }
 
-bool Notification::canSuspend() const
+bool Notification::canSuspendForPageCache() const
 {
     // We can suspend if the Notification is not shown yet or after it is closed.
     return m_state == Idle || m_state == Closed;

Modified: trunk/Source/WebCore/Modules/notifications/Notification.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/notifications/Notification.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/notifications/Notification.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -140,7 +140,7 @@
     // ActiveDOMObject API.
     void contextDestroyed() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     // EventTarget API.
     virtual void refEventTarget() override { ref(); }

Modified: trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/notifications/NotificationCenter.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -117,7 +117,7 @@
     return "NotificationCenter";
 }
 
-bool NotificationCenter::canSuspend() const
+bool NotificationCenter::canSuspendForPageCache() const
 {
     // 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

Modified: trunk/Source/WebCore/Modules/notifications/NotificationCenter.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/notifications/NotificationCenter.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/notifications/NotificationCenter.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -76,7 +76,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     class NotificationRequestCallback : public RefCounted<NotificationRequestCallback> {
     public:

Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/streams/ReadableStream.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -63,7 +63,7 @@
     return "ReadableStream";
 }
 
-bool ReadableStream::canSuspend() const
+bool ReadableStream::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/streams/ReadableStream.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -73,7 +73,7 @@
 private:
     // ActiveDOMObject API.
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     State m_state;
     Ref<ReadableStreamSource> m_source;

Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -72,7 +72,7 @@
     return "ReadableStreamReader";
 }
 
-bool ReadableStreamReader::canSuspend() const
+bool ReadableStreamReader::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -60,7 +60,7 @@
 private:
     // ActiveDOMObject API.
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     RefPtr<ReadableStream> m_stream;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -355,7 +355,7 @@
     callOnMainThread(stopDispatch, this);
 }
 
-bool AudioContext::canSuspend() const
+bool AudioContext::canSuspendForPageCache() const
 {
     // FIXME: We should be able to suspend while rendering as well with some more code.
     return m_state == State::Suspended || m_state == State::Closed;

Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/webaudio/AudioContext.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -297,7 +297,7 @@
 
     // ActiveDOMObject API.
     void stop() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     const char* activeDOMObjectName() const override;
 
     // When the context goes away, there might still be some sources which haven't finished playing.

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -145,7 +145,7 @@
     stopDatabases();
 }
 
-bool DatabaseContext::canSuspend() const
+bool DatabaseContext::canSuspendForPageCache() const
 {
     if (!hasOpenDatabases() || !m_databaseThread)
         return true;

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -75,7 +75,7 @@
 
     void contextDestroyed() override;
     void stop() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     const char* activeDOMObjectName() const override { return "DatabaseContext"; }
 
     RefPtr<DatabaseThread> m_databaseThread;

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (182543 => 182544)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -461,7 +461,7 @@
     ActiveDOMObject::contextDestroyed();
 }
 
-bool WebSocket::canSuspend() const
+bool WebSocket::canSuspendForPageCache() const
 {
     return true;
 }
@@ -472,7 +472,7 @@
         m_resumeTimer.stop();
 
     if (m_channel) {
-        if (reason == ActiveDOMObject::DocumentWillBecomeInactive) {
+        if (reason == ActiveDOMObject::PageCache) {
             // The page will enter the page cache, close the channel but only fire the close event after resuming.
             m_shouldDelayCloseEvent = true;
             // This will cause didClose() to be called.

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.h (182543 => 182544)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -113,7 +113,7 @@
 
     // ActiveDOMObject API.
     void contextDestroyed() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void suspend(ReasonForSuspension) override;
     void resume() override;
     void stop() override;

Modified: trunk/Source/WebCore/css/FontLoader.cpp (182543 => 182544)


--- trunk/Source/WebCore/css/FontLoader.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/css/FontLoader.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -161,7 +161,7 @@
     return "FontLoader";
 }
 
-bool FontLoader::canSuspend() const
+bool FontLoader::canSuspendForPageCache() const
 {
     return !m_numLoadingFromCSS && !m_numLoadingFromJS;
 }

Modified: trunk/Source/WebCore/css/FontLoader.h (182543 => 182544)


--- trunk/Source/WebCore/css/FontLoader.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/css/FontLoader.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -89,7 +89,7 @@
 
     // ActiveDOMObject API.
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void pendingEventsTimerFired() { firePendingEvents(); }
     void scheduleEvent(PassRefPtr<Event>);

Modified: trunk/Source/WebCore/dom/ActiveDOMObject.cpp (182543 => 182544)


--- trunk/Source/WebCore/dom/ActiveDOMObject.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/dom/ActiveDOMObject.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -90,7 +90,7 @@
     return m_pendingActivityCount;
 }
 
-bool ActiveDOMObject::canSuspend() const
+bool ActiveDOMObject::canSuspendForPageCache() const
 {
     return false;
 }

Modified: trunk/Source/WebCore/dom/ActiveDOMObject.h (182543 => 182544)


--- trunk/Source/WebCore/dom/ActiveDOMObject.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/dom/ActiveDOMObject.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -42,18 +42,18 @@
 
     virtual bool hasPendingActivity() const;
 
-    // The canSuspend function is used by the caller if there is a choice between suspending
+    // The canSuspendForPageCache() function is used by the caller if there is a choice between suspending
     // and stopping. For example, a page won't be suspended and placed in the back/forward
     // cache if it contains any objects that cannot be suspended.
 
-    // However, the suspend function will sometimes be called even if canSuspend returns false.
+    // However, the suspend function will sometimes be called even if canSuspendForPageCache() returns false.
     // That happens in step-by-step JS debugging for example - in this case it would be incorrect
     // to stop the object. Exact semantics of suspend is up to the object in cases like that.
 
     enum ReasonForSuspension {
         _javascript_DebuggerPaused,
         WillDeferLoading,
-        DocumentWillBecomeInactive,
+        PageCache,
         PageWillBeSuspended,
         DocumentWillBePaused
     };
@@ -62,7 +62,7 @@
 
     // These three functions must not have a side effect of creating or destroying
     // any ActiveDOMObject. That means they must not result in calls to arbitrary _javascript_.
-    virtual bool canSuspend() const = 0; // Returning false in canSuspend() will prevent the page from entering the PageCache.
+    virtual bool canSuspendForPageCache() const = 0; // Returning false in canSuspendForPageCache() will prevent the page from entering the PageCache.
     virtual void suspend(ReasonForSuspension);
     virtual void resume();
 

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (182543 => 182544)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -174,7 +174,7 @@
 {
 }
 
-bool ScriptExecutionContext::canSuspendActiveDOMObjects(Vector<ActiveDOMObject*>* unsuspendableObjects)
+bool ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache(Vector<ActiveDOMObject*>* unsuspendableObjects)
 {
     checkConsistency();
 
@@ -190,7 +190,7 @@
     // An ASSERT or RELEASE_ASSERT will fire if this happens, but it's important to code
     // canSuspend functions so it will not happen!
     for (auto* activeDOMObject : m_activeDOMObjects) {
-        if (!activeDOMObject->canSuspend()) {
+        if (!activeDOMObject->canSuspendForPageCache()) {
             canSuspend = false;
             if (unsuspendableObjects)
                 unsuspendableObjects->append(activeDOMObject);

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (182543 => 182544)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -86,9 +86,9 @@
     PublicURLManager& publicURLManager();
 
     // Active objects are not garbage collected even if inaccessible, e.g. because their activity may result in callbacks being invoked.
-    WEBCORE_EXPORT bool canSuspendActiveDOMObjects(Vector<ActiveDOMObject*>* unsuspendableObjects = nullptr);
+    WEBCORE_EXPORT bool canSuspendActiveDOMObjectsForPageCache(Vector<ActiveDOMObject*>* unsuspendableObjects = nullptr);
 
-    // Active objects can be asked to suspend even if canSuspendActiveDOMObjects() returns 'false' -
+    // Active objects can be asked to suspend even if canSuspendActiveDOMObjectsForPageCache() returns 'false' -
     // step-by-step JS debugging is one example.
     virtual void suspendActiveDOMObjects(ActiveDOMObject::ReasonForSuspension);
     virtual void resumeActiveDOMObjects(ActiveDOMObject::ReasonForSuspension);

Modified: trunk/Source/WebCore/fileapi/FileReader.cpp (182543 => 182544)


--- trunk/Source/WebCore/fileapi/FileReader.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/fileapi/FileReader.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -65,7 +65,7 @@
     terminate();
 }
 
-bool FileReader::canSuspend() const
+bool FileReader::canSuspendForPageCache() const
 {
     // FIXME: It is not currently possible to suspend a FileReader, so pages with FileReader can not go into page cache.
     return false;

Modified: trunk/Source/WebCore/fileapi/FileReader.h (182543 => 182544)


--- trunk/Source/WebCore/fileapi/FileReader.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/fileapi/FileReader.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -97,7 +97,7 @@
 
     // ActiveDOMObject API.
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void stop() override;
 
     // EventTarget

Modified: trunk/Source/WebCore/history/CachedFrame.cpp (182543 => 182544)


--- trunk/Source/WebCore/history/CachedFrame.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/history/CachedFrame.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -92,7 +92,7 @@
         m_document->accessSVGExtensions().unpauseAnimations();
 
     frame.animation().resumeAnimationsForDocument(m_document.get());
-    m_document->resumeActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
+    m_document->resumeActiveDOMObjects(ActiveDOMObject::PageCache);
     m_document->resumeScriptedAnimationControllerCallbacks();
 
     // It is necessary to update any platform script objects after restoring the
@@ -167,7 +167,7 @@
     // those create more objects.
     m_document->documentWillSuspendForPageCache();
     m_document->suspendScriptedAnimationControllerCallbacks();
-    m_document->suspendActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
+    m_document->suspendActiveDOMObjects(ActiveDOMObject::PageCache);
     m_cachedFrameScriptData = std::make_unique<ScriptCachedFrameData>(frame);
 
     m_document->domWindow()->suspendForPageCache();

Modified: trunk/Source/WebCore/history/PageCache.cpp (182543 => 182544)


--- trunk/Source/WebCore/history/PageCache.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/history/PageCache.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -171,7 +171,7 @@
     }
 
     Vector<ActiveDOMObject*> unsuspendableObjects;
-    if (!frame.document()->canSuspendActiveDOMObjects(&unsuspendableObjects)) {
+    if (!frame.document()->canSuspendActiveDOMObjectsForPageCache(&unsuspendableObjects)) {
         PCLOG("   -The document cannot suspend its active DOM Objects");
         for (auto* activeDOMObject : unsuspendableObjects) {
             PCLOG("    - Unsuspendable: ", activeDOMObject->activeDOMObjectName());
@@ -310,7 +310,7 @@
         && !frameLoader.quickRedirectComing()
         && !documentLoader->isLoadingInAPISense()
         && !documentLoader->isStopping()
-        && document->canSuspendActiveDOMObjects()
+        && document->canSuspendActiveDOMObjectsForPageCache()
         // FIXME: We should investigating caching frames that have an associated
         // application cache. <rdar://problem/5917899> tracks that work.
         && documentLoader->applicationCacheHost()->canCacheInPageCache()

Modified: trunk/Source/WebCore/html/HTMLMarqueeElement.cpp (182543 => 182544)


--- trunk/Source/WebCore/html/HTMLMarqueeElement.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/HTMLMarqueeElement.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -166,7 +166,7 @@
         setIntegralAttribute(loopAttr, loop);
 }
 
-bool HTMLMarqueeElement::canSuspend() const
+bool HTMLMarqueeElement::canSuspendForPageCache() const
 {
     return true;
 }

Modified: trunk/Source/WebCore/html/HTMLMarqueeElement.h (182543 => 182544)


--- trunk/Source/WebCore/html/HTMLMarqueeElement.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/HTMLMarqueeElement.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -57,7 +57,7 @@
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
 
     // ActiveDOMObject
-    virtual bool canSuspend() const override;
+    virtual bool canSuspendForPageCache() const override;
     virtual void suspend(ReasonForSuspension) override;
     virtual void resume() override;
     virtual const char* activeDOMObjectName() const override { return "HTMLMarqueeElement"; }

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (182543 => 182544)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -4684,7 +4684,7 @@
     updateSleepDisabling();
 }
 
-bool HTMLMediaElement::canSuspend() const
+bool HTMLMediaElement::canSuspendForPageCache() const
 {
     return true; 
 }
@@ -4732,7 +4732,7 @@
 
     switch (why)
     {
-        case DocumentWillBecomeInactive:
+        case PageCache:
             stop();
             m_mediaSession->addBehaviorRestriction(HTMLMediaSession::RequirePageConsentToResumeMedia);
             break;

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (182543 => 182544)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -508,7 +508,7 @@
 
     // ActiveDOMObject API.
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void suspend(ReasonForSuspension) override;
     void resume() override;
     void stop() override;

Modified: trunk/Source/WebCore/html/PublicURLManager.cpp (182543 => 182544)


--- trunk/Source/WebCore/html/PublicURLManager.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/PublicURLManager.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -80,7 +80,7 @@
     m_registryToURL.clear();
 }
 
-bool PublicURLManager::canSuspend() const
+bool PublicURLManager::canSuspendForPageCache() const
 {
     // Suspending an PublicURLManager is safe as it does not cause any JS to be executed.
     return true;

Modified: trunk/Source/WebCore/html/PublicURLManager.h (182543 => 182544)


--- trunk/Source/WebCore/html/PublicURLManager.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/PublicURLManager.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -53,7 +53,7 @@
 private:
     // ActiveDOMObject API.
     void stop() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     const char* activeDOMObjectName() const override;
     
     typedef HashSet<String> URLSet;

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (182543 => 182544)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -3904,7 +3904,7 @@
     return "WebGLRenderingContext";
 }
 
-bool WebGLRenderingContextBase::canSuspend() const
+bool WebGLRenderingContextBase::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (182543 => 182544)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -384,7 +384,7 @@
     virtual bool hasPendingActivity() const override;
     virtual void stop() override;
     virtual const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void addSharedObject(WebGLSharedObject*);
     void addContextObject(WebGLContextObject*);

Modified: trunk/Source/WebCore/page/EventSource.cpp (182543 => 182544)


--- trunk/Source/WebCore/page/EventSource.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/page/EventSource.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -421,7 +421,7 @@
     return "EventSource";
 }
 
-bool EventSource::canSuspend() const
+bool EventSource::canSuspendForPageCache() const
 {
     // FIXME: We should try and do better here.
     return false;

Modified: trunk/Source/WebCore/page/EventSource.h (182543 => 182544)


--- trunk/Source/WebCore/page/EventSource.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/page/EventSource.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -90,7 +90,7 @@
     // ActiveDOMObject API.
     void stop() override;
     const char* activeDOMObjectName() const override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
 
     void connect();
     void networkRequestEnded();

Modified: trunk/Source/WebCore/page/SuspendableTimer.cpp (182543 => 182544)


--- trunk/Source/WebCore/page/SuspendableTimer.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/page/SuspendableTimer.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -84,7 +84,7 @@
         start(m_savedNextFireInterval, m_savedRepeatInterval);
 }
 
-bool SuspendableTimer::canSuspend() const
+bool SuspendableTimer::canSuspendForPageCache() const
 {
     return true;
 }

Modified: trunk/Source/WebCore/page/SuspendableTimer.h (182543 => 182544)


--- trunk/Source/WebCore/page/SuspendableTimer.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/page/SuspendableTimer.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -60,7 +60,7 @@
     // ActiveDOMObject API.
     bool hasPendingActivity() const override final;
     void stop() override final;
-    bool canSuspend() const override final;
+    bool canSuspendForPageCache() const override final;
     void suspend(ReasonForSuspension) override final;
     void resume() override final;
 

Modified: trunk/Source/WebCore/workers/Worker.cpp (182543 => 182544)


--- trunk/Source/WebCore/workers/Worker.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/workers/Worker.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -126,7 +126,7 @@
     m_contextProxy->terminateWorkerGlobalScope();
 }
 
-bool Worker::canSuspend() const
+bool Worker::canSuspendForPageCache() const
 {
     // FIXME: It is not currently possible to suspend a worker, so pages with workers can not go into page cache.
     return false;

Modified: trunk/Source/WebCore/workers/Worker.h (182543 => 182544)


--- trunk/Source/WebCore/workers/Worker.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/workers/Worker.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -75,7 +75,7 @@
         virtual void notifyFinished() override;
 
         // ActiveDOMObject API.
-        bool canSuspend() const override;
+        bool canSuspendForPageCache() const override;
         void stop() override;
         const char* activeDOMObjectName() const override;
 

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (182543 => 182544)


--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2015-04-08 16:45:01 UTC (rev 182544)
@@ -1250,7 +1250,7 @@
 }
 #endif
 
-bool XMLHttpRequest::canSuspend() const
+bool XMLHttpRequest::canSuspendForPageCache() const
 {
     // If the load event has not fired yet, cancelling the load in suspend() may cause
     // the load event to be fired and arbitrary JS execution, which would be unsafe.
@@ -1274,7 +1274,7 @@
         m_dispatchErrorOnResuming = true;
     }
 
-    if (reason == ActiveDOMObject::DocumentWillBecomeInactive && m_loader) {
+    if (reason == ActiveDOMObject::PageCache && m_loader) {
         // Going into PageCache, abort the request and dispatch a network error on resuming.
         genericError();
         m_dispatchErrorOnResuming = true;

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.h (182543 => 182544)


--- trunk/Source/WebCore/xml/XMLHttpRequest.h	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.h	2015-04-08 16:45:01 UTC (rev 182544)
@@ -152,7 +152,7 @@
 
     // ActiveDOMObject
     void contextDestroyed() override;
-    bool canSuspend() const override;
+    bool canSuspendForPageCache() const override;
     void suspend(ReasonForSuspension) override;
     void resume() override;
     void stop() override;

Modified: trunk/Source/WebKit/mac/ChangeLog (182543 => 182544)


--- trunk/Source/WebKit/mac/ChangeLog	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-04-08 16:45:01 UTC (rev 182544)
@@ -1,3 +1,16 @@
+2015-04-08  Chris Dumez  <[email protected]>
+
+        Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=143513
+
+        Reviewed by Andreas Kling.
+
+        Update ScriptExecutionContext::canSuspendActiveDOMObjects() to
+        canSuspendActiveDOMObjectsForPageCache() as the method was renamed.
+
+        * WebView/WebFrame.mm:
+        (-[WebFrame _cacheabilityDictionary]):
+
 2015-04-07  Anders Carlsson  <[email protected]>
 
         Get rid of uses of ApplicationCacheStorage::singleton() from WebKitLegacy

Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (182543 => 182544)


--- trunk/Source/WebKit/mac/WebView/WebFrame.mm	2015-04-08 16:31:01 UTC (rev 182543)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm	2015-04-08 16:45:01 UTC (rev 182544)
@@ -2079,7 +2079,7 @@
     if (Document* document = _private->coreFrame->document()) {
         if (DatabaseManager::singleton().hasOpenDatabases(document))
             [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesDatabases];
-        if (!document->canSuspendActiveDOMObjects())
+        if (!document->canSuspendActiveDOMObjectsForPageCache())
             [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameCanSuspendActiveDOMObjects];
     }
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to