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