Make MessagePortChannel::takeAllMessagesFromRemote asynchronous.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-01-02  Brady Eidson  <beidson@apple.com>
2
3         Make MessagePortChannel::takeAllMessagesFromRemote asynchronous.
4         https://bugs.webkit.org/show_bug.cgi?id=181205
5
6         Reviewed by Alex Christensen.
7
8         No new tests (No behavior change)
9
10         This is needed for the ongoing WK2 MessagePort work.
11
12         For WK1 in-process MessagePorts it is still synchronous; no behavior change.
13
14         * dom/InProcessMessagePortChannel.cpp:
15         (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote):
16         * dom/InProcessMessagePortChannel.h:
17
18         * dom/MessagePort.cpp:
19         (WebCore::MessagePort::dispatchMessages):
20         * dom/MessagePortChannel.h:
21
22 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
23
24         Add a WebAuthentication runtime feature flag
25         https://bugs.webkit.org/show_bug.cgi?id=181220
26         <rdar://problem/36055305>
27
28         Reviewed by Brent Fulgham.
29
30         This patch basically renames the CredentialManagement runtime feature flag into
31         WebAuthentication runtime feature flag.
32
33         No tests.
34
35         * Modules/credentialmanagement/BasicCredential.idl:
36         * Modules/credentialmanagement/CredentialsContainer.idl:
37         * Modules/credentialmanagement/NavigatorCredentials.idl:
38         * Modules/webauthn/PublicKeyCredential.idl:
39         * page/RuntimeEnabledFeatures.h:
40         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationEnabled):
41         (WebCore::RuntimeEnabledFeatures::webAuthenticationEnabled const):
42         (WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Deleted.
43         (WebCore::RuntimeEnabledFeatures::credentialManagementEnabled const): Deleted.
44
45 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
46
47         [Attachment Support] Don't Blob-convert images and attachments with https:, http: or data: urls
48         https://bugs.webkit.org/show_bug.cgi?id=181143
49         <rdar://problem/36200381>
50
51         Reviewed by Tim Horton.
52
53         Clients such as Mail would expect pasting or dropping an image with src="https://..." to result in the source
54         URL being preserved (i.e. staying as remote images) instead of creating image attachments out of them. This
55         patch hooks into the shouldConvertToBlob() check added in r226272 so that it applies to attachment element
56         replacement as well.
57
58         Test: WKAttachmentTests.DoNotInsertDataURLImagesAsAttachments
59
60         * editing/cocoa/WebContentReaderCocoa.mm:
61         (WebCore::shouldConvertToBlob):
62         (WebCore::replaceRichContentWithAttachments):
63
64 2018-01-02  Brady Eidson  <beidson@apple.com>
65
66         Identify MessagePorts by a globally unique MessagePortIdentifier.
67         https://bugs.webkit.org/show_bug.cgi?id=181172
68
69         Reviewed by Alex Christensen.
70
71         No new tests (Behavior change covered by all existing tests).
72
73         This cleans up the abstract MessagePortChannel interface to be in terms of identifiers
74         instead of actual MessagePort objects.
75         
76         The identifiers are compounded with the current ProcessIdentifier meaning they are global
77         across all processes for the running UI process, enabling easy cross-process communication.
78         
79         (Actual cross-process communication comes in a followup)
80         
81         * WebCore.xcodeproj/project.pbxproj:
82         
83         * dom/InProcessMessagePortChannel.cpp:
84         (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts):
85         (WebCore::InProcessMessagePortChannel::isConnectedTo):
86         (WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen):
87         (WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted.
88         * dom/InProcessMessagePortChannel.h:
89         
90         * dom/MessageChannel.cpp:
91         (WebCore::MessageChannel::MessageChannel):
92         (WebCore::m_port2):
93         
94         * dom/MessagePort.cpp:
95         (WebCore::allMessagePortsLock):
96         (WebCore::MessagePort::ref const):
97         (WebCore::MessagePort::deref const):
98         (WebCore::MessagePort::existingMessagePortForIdentifier):
99         (WebCore::MessagePort::MessagePort):
100         (WebCore::MessagePort::~MessagePort):
101         (WebCore::MessagePort::postMessage):
102         (WebCore::MessagePort::entangleWithRemote):
103         (WebCore::MessagePort::entanglePorts):
104         (WebCore::MessagePort::entangle): Deleted.
105         * dom/MessagePort.h:
106         
107         * dom/MessagePortChannel.h:
108         
109         * dom/MessagePortIdentifier.h: Added.
110         (WebCore::operator==):
111         (WebCore::MessagePortIdentifier::encode const):
112         (WebCore::MessagePortIdentifier::decode):
113         (WebCore::MessagePortIdentifier::hash const):
114         (WTF::MessagePortIdentifierHash::hash):
115         (WTF::MessagePortIdentifierHash::equal):
116         (WTF::HashTraits<WebCore::MessagePortIdentifier>::emptyValue):
117         (WTF::HashTraits<WebCore::MessagePortIdentifier>::constructDeletedValue):
118         (WTF::HashTraits<WebCore::MessagePortIdentifier>::isDeletedValue):
119
120 2018-01-02  Youenn Fablet  <youenn@apple.com>
121
122         Memory cache should not reuse resources with different credential fetch option
123         https://bugs.webkit.org/show_bug.cgi?id=181212
124
125         Reviewed by Alex Christensen.
126
127         Covered by rebased test.
128
129         * loader/cache/CachedResourceLoader.cpp:
130         (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
131
132 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
133
134         Update Credential Management API for WebAuthentication
135         https://bugs.webkit.org/show_bug.cgi?id=181082
136         <rdar://problem/36055239>
137
138         Reviewed by Brent Fulgham.
139
140         Part 2/2
141
142         This patch implements Core API from Credential Management API: https://www.w3.org/TR/credential-management-1/#core.
143         which is required by WebAuthN. It also sets the CredentialManagement runtime flag to enable testing. Note that it
144         introduces a dummy PublicKeyCredential interface for testing functionalities of the Credential interface, which
145         cannot be instantiated.
146
147         Tests: http/wpt/credential-management/credentialscontainer-create-basics.https.html
148                http/wpt/credential-management/credentialscontainer-get-basics.https.html
149                http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html
150                http/wpt/credential-management/idl.https.html
151
152         * CMakeLists.txt:
153         * DerivedSources.make:
154         * Modules/credentialmanagement/BasicCredential.cpp:
155         (WebCore::BasicCredential::BasicCredential):
156         (WebCore::BasicCredential::type const):
157         * Modules/credentialmanagement/BasicCredential.h:
158         (WebCore::BasicCredential::discovery const):
159         * Modules/credentialmanagement/BasicCredential.idl:
160         * Modules/credentialmanagement/CredentialCreationOptions.h:
161         * Modules/credentialmanagement/CredentialCreationOptions.idl:
162         * Modules/credentialmanagement/CredentialRequestOptions.h:
163         * Modules/credentialmanagement/CredentialRequestOptions.idl:
164         * Modules/credentialmanagement/CredentialsContainer.cpp:
165         (WebCore::CredentialsContainer::CredentialsContainer):
166         (WebCore::CredentialsContainer::isSameOriginWithItsAncestors):
167         (WebCore::CredentialsContainer::dispatchTask):
168         (WebCore::CredentialsContainer::get):
169         (WebCore::CredentialsContainer::store):
170         (WebCore::CredentialsContainer::isCreate):
171         (WebCore::CredentialsContainer::preventSilentAccess):
172         * Modules/credentialmanagement/CredentialsContainer.h:
173         (WebCore::CredentialsContainer::create):
174         (WebCore::CredentialsContainer::CredentialsContainer): Deleted.
175         * Modules/credentialmanagement/CredentialsContainer.idl:
176         * Modules/credentialmanagement/NavigatorCredentials.cpp:
177         (WebCore::NavigatorCredentials::credentials):
178         * Modules/credentialmanagement/NavigatorCredentials.h:
179         * Modules/credentialmanagement/NavigatorCredentials.idl:
180         * Modules/webauthn/PublicKeyCredential.cpp: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
181         (WebCore::PublicKeyCredential::PublicKeyCredential):
182         (WebCore::PublicKeyCredential::collectFromCredentialStore):
183         (WebCore::PublicKeyCredential::discoverFromExternalSource):
184         (WebCore::PublicKeyCredential::store):
185         (WebCore::PublicKeyCredential::create):
186         * Modules/webauthn/PublicKeyCredential.h: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
187         * Modules/webauthn/PublicKeyCredential.idl: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.idl.
188         * Sources.txt:
189         * WebCore.xcodeproj/project.pbxproj:
190         * bindings/js/WebCoreBuiltinNames.h:
191         * page/RuntimeEnabledFeatures.h:
192
193 2018-01-02  Oleksandr Skachkov  <gskachkov@gmail.com>
194
195         WebAssembly: sending module to iframe fails
196         https://bugs.webkit.org/show_bug.cgi?id=179263
197
198         Reviewed by JF Bastien.
199
200         Allow use WebAssembly.Module as input parameters for postMessage 
201         in window and iframe object. To prevent sending message to iframe
202         that is not ready, in iframe-* test we are waiting message from
203         iframe only after that we send message to it.   
204
205         Tests: wasm/iframe-parent-postmessage.html
206                wasm/iframe-postmessage.html
207                wasm/window-postmessage.html
208
209         * bindings/js/SerializedScriptValue.cpp:
210         (WebCore::CloneSerializer::dumpIfTerminal):
211         * bindings/js/SerializedScriptValue.h:
212         * page/DOMWindow.cpp:
213         (WebCore::DOMWindow::postMessage):
214
215 == Rolled over to ChangeLog-2018-01-01 ==