[Service Worker] Add stubs for Client / WindowClient / Clients
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2017 22:31:55 +0000 (22:31 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2017 22:31:55 +0000 (22:31 +0000)
commit1c3c9ef152c3babfd4286b7a5bf32a459ed7a8d4
tree40d4035dc5ee870750374c7ffac7b2d169c05b31
parent2d6cd1fc1335cdc3a05060c17e2eb910a349cf46
[Service Worker] Add stubs for Client / WindowClient / Clients
https://bugs.webkit.org/show_bug.cgi?id=178469

Reviewed by Youenn Fablet.

Source/WebCore:

Add stubs for Client / WindowClient / Clients:
- https://w3c.github.io/ServiceWorker/v1/#clients
- https://w3c.github.io/ServiceWorker/v1/#client-interface

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::visibilityState const):
* dom/Document.h:
* dom/Document.idl:
* dom/VisibilityState.h: Renamed from Source/WebCore/page/PageVisibilityState.h.
* dom/VisibilityState.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* page/Page.cpp:
(WebCore::Page::visibilityState const):
* page/Page.h:
* workers/service/ServiceWorkerClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
(WebCore::ServiceWorkerClient::ServiceWorkerClient):
(WebCore::ServiceWorkerClient::activeDOMObjectName const):
(WebCore::ServiceWorkerClient::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorkerClient::url const):
(WebCore::ServiceWorkerClient::frameType const):
(WebCore::ServiceWorkerClient::id const):
(WebCore::ServiceWorkerClient::postMessage):
* workers/service/ServiceWorkerClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerClients.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp.
(WebCore::ServiceWorkerClients::ServiceWorkerClients):
(WebCore::ServiceWorkerClients::activeDOMObjectName const):
(WebCore::ServiceWorkerClients::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorkerClients::get):
(WebCore::ServiceWorkerClients::matchAll):
(WebCore::ServiceWorkerClients::openWindow):
(WebCore::ServiceWorkerClients::claim):
* workers/service/ServiceWorkerClients.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h.
(WebCore::ServiceWorkerClients::create):
* workers/service/ServiceWorkerClients.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
* workers/service/ServiceWorkerGlobalScope.h:
(WebCore::ServiceWorkerGlobalScope::clients):
* workers/service/ServiceWorkerGlobalScope.idl:
* workers/service/ServiceWorkerWindowClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
(WebCore::ServiceWorkerWindowClient::ServiceWorkerWindowClient):
(WebCore::ServiceWorkerWindowClient::visibilityState const):
(WebCore::ServiceWorkerWindowClient::isFocused const):
(WebCore::ServiceWorkerWindowClient::focus):
(WebCore::ServiceWorkerWindowClient::navigate):
* workers/service/ServiceWorkerWindowClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerWindowClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.

Source/WebKit:

Rename PageVisibilityState to VisibilityState.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toVisibilityState):
* WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

Rename PageVisiblityState to VisibilityState.

* WebView/WebView.mm:
(kit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/dom/VisibilityState.h [moved from Source/WebCore/page/PageVisibilityState.h with 93% similarity]
Source/WebCore/dom/VisibilityState.idl [new file with mode: 0644]
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/workers/service/ServiceWorkerClient.cpp [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerClient.h [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerClient.idl [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerClients.cpp [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerClients.h [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerClients.idl [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
Source/WebCore/workers/service/ServiceWorkerGlobalScope.h
Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl
Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerWindowClient.h [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerWindowClient.idl [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/Shared/API/c/WKSharedAPICast.h
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/DOM/DOMDocument.mm
Source/WebKitLegacy/mac/WebView/WebView.mm