FetchResponse should set its internal response text encoding name
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-01-04  Youenn Fablet  <youenn@apple.com>
2
3         FetchResponse should set its internal response text encoding name
4         https://bugs.webkit.org/show_bug.cgi?id=181284
5
6         Reviewed by Alex Christensen.
7
8         Covered by rebased test.
9
10         * Modules/fetch/FetchResponse.cpp:
11         (WebCore::FetchResponse::create): Set response text encoding based on content type charset.
12
13 2018-01-04  John Wilander  <wilander@apple.com>
14
15         Storage Access API: Remove JavaScript confirm() prompt from Document::requestStorageAccess()
16         https://bugs.webkit.org/show_bug.cgi?id=181276
17         <rdar://problem/36290463>
18
19         Reviewed by Alex Christensen.
20
21         No new tests. Existing test expectations updated.
22
23         * dom/Document.cpp:
24         (WebCore::Document::requestStorageAccess):
25
26 2018-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>
27
28         [GTK] Issues with Ahem's ex / x-height
29         https://bugs.webkit.org/show_bug.cgi?id=180581
30
31         Reviewed by Michael Catanzaro.
32
33         Get the x-height value from the TT_OS2 table if available.
34
35         Fixes: fast/text/break-word-pre-wrap.html
36                imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html
37
38         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
39         (WebCore::Font::platformInit):
40
41 2018-01-04  Philippe Normand  <pnormand@igalia.com>
42
43         Unreviewed, GTK build fix attempt after r226357
44
45         * platform/graphics/gstreamer/GStreamerUtilities.h: The
46         GST_BUFFER_DTS_OR_PTS macro was added in GStreamer 1.8 but old
47         versions of Debian might not have this release yet.
48
49 2018-01-04  Youenn Fablet  <youenn@apple.com>
50
51         Implement Cache API partitioning based on ClientOrigin
52         https://bugs.webkit.org/show_bug.cgi?id=181240
53
54         Reviewed by Alex Christensen.
55
56         Covered by updated tests.
57
58         Previously, cache storage was partitioned according the origin of the client, represented as a String.
59         We now partition according both client and top origins, represented as a ClientOrigin
60
61         Minor refactoring to use more makePendingActivity.
62         Added support for IPC serialization of ClientOrigin.
63         Added SecurityOriginData::toString which is used by WebKit2 Cache Storage implementation.
64
65         * Modules/cache/CacheStorageConnection.cpp:
66         (WebCore::CacheStorageConnection::open):
67         (WebCore::CacheStorageConnection::retrieveCaches):
68         * Modules/cache/CacheStorageConnection.h:
69         (WebCore::CacheStorageConnection::clearMemoryRepresentation):
70         (WebCore::CacheStorageConnection::doOpen):
71         (WebCore::CacheStorageConnection::doRetrieveCaches):
72         * Modules/cache/DOMCacheStorage.cpp:
73         (WebCore::DOMCacheStorage::origin const):
74         (WebCore::DOMCacheStorage::retrieveCaches):
75         (WebCore::DOMCacheStorage::open):
76         (WebCore::DOMCacheStorage::remove):
77         * Modules/cache/DOMCacheStorage.h:
78         * Modules/cache/WorkerCacheStorageConnection.cpp:
79         (WebCore::WorkerCacheStorageConnection::doOpen):
80         (WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
81         * Modules/cache/WorkerCacheStorageConnection.h:
82         * page/ClientOrigin.h:
83         (WebCore::ClientOrigin::isolatedCopy const):
84         (WebCore::ClientOrigin::encode const):
85         (WebCore::ClientOrigin::decode):
86         * page/SecurityOriginData.cpp:
87         (WebCore::SecurityOriginData::toString const):
88         (WebCore::SecurityOriginData::debugString const): Deleted.
89         * page/SecurityOriginData.h:
90         (WebCore::SecurityOriginData::debugString const):
91         * testing/Internals.cpp:
92         (WebCore::Internals::clearCacheStorageMemoryRepresentation):
93
94 2018-01-04  Youenn Fablet  <youenn@apple.com>
95
96         Service Worker should expose redirect mode for navigation loads as manual
97         https://bugs.webkit.org/show_bug.cgi?id=181067
98
99         Reviewed by Alex Christensen.
100
101         Covered by rebased tests.
102
103         * loader/CrossOriginAccessControl.cpp: Removing ContentType header only if affecting CORS checks.
104         This allows extending header filtering in service worker to all modes, including Navigate.
105         * workers/service/context/ServiceWorkerFetch.cpp:
106         (WebCore::ServiceWorkerFetch::dispatchFetchEvent): Ideally, document loading code should set redirect to manual.
107         Since it is not the case yet and that would require changes to various places, manual is set before exposing the corresponding fetch event.
108
109 2018-01-04  Youenn Fablet  <youenn@apple.com>
110
111         ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope should be a no-op if worker is being terminated
112         https://bugs.webkit.org/show_bug.cgi?id=181245
113
114         Reviewed by Alex Christensen.
115
116         Stop appending tasks to a terminating worker and returning false in that case.
117         This mirrors what is done for regular workers.
118
119         * workers/service/context/SWContextManager.cpp:
120         (WebCore::SWContextManager::terminateWorker):
121         * workers/service/context/ServiceWorkerThreadProxy.cpp:
122         (WebCore::ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope):
123         * workers/service/context/ServiceWorkerThreadProxy.h:
124
125 2018-01-04  Youenn Fablet  <youenn@apple.com>
126
127         Cancel pending script loads when service worker is being terminated
128         https://bugs.webkit.org/show_bug.cgi?id=181250
129
130         Reviewed by Alex Christensen.
131
132         Covered by service worker tests no longer crashing in ASAN builds.
133
134         * workers/WorkerScriptLoader.cpp:
135         (WebCore::WorkerScriptLoader::notifyFinished): Clearing loader when finished.
136         (WebCore::WorkerScriptLoader::cancel): Implementing cancel of a script loader by cancelling the underlying threadable loader.
137         * workers/WorkerScriptLoader.h:
138         * workers/service/ServiceWorkerContainer.cpp: Canceling loads of all pending jobs.
139         (WebCore::ServiceWorkerContainer::stop):
140         * workers/service/ServiceWorkerJob.cpp:
141         (WebCore::ServiceWorkerJob::cancelPendingLoad):
142         * workers/service/ServiceWorkerJob.h:
143
144 2018-01-04  Youenn Fablet  <youenn@apple.com>
145
146         Implement  https://fetch.spec.whatwg.org/#main-fetch default referrer policy setting
147         https://bugs.webkit.org/show_bug.cgi?id=181239
148
149         Reviewed by Alex Christensen.
150
151         Covered by updated and rebased test.
152
153         Setting the request referrer policy to the Document referrer policy if no one is set.
154         If Document has no referrer policy, use no-referrer-when-downgrade as per the spec.
155
156         * loader/cache/CachedResourceLoader.cpp:
157         (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
158         (WebCore::CachedResourceLoader::requestResource):
159         * loader/cache/CachedResourceLoader.h:
160         * loader/cache/CachedResourceRequest.cpp:
161         (WebCore::CachedResourceRequest::updateReferrerPolicy):
162         (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
163         * loader/cache/CachedResourceRequest.h:
164
165 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
166
167         [Attachment Support] Create attachment elements when dropping files on iOS
168         https://bugs.webkit.org/show_bug.cgi?id=181192
169         <rdar://problem/36280945>
170
171         Reviewed by Tim Horton.
172
173         Implements support for dropping data as attachment elements on iOS. See comments below for more detail.
174
175         Tests:  WKAttachmentTests.InsertDroppedRichAndPlainTextFilesAsAttachments
176                 WKAttachmentTests.InsertDroppedZipArchiveAsAttachment
177                 WKAttachmentTests.InsertDroppedItemProvidersInOrder
178
179         * WebCore.xcodeproj/project.pbxproj:
180         * editing/WebContentReader.cpp:
181         (WebCore::WebContentReader::ensureFragment):
182
183         Add a new helper to create the WebContentReader's fragment, if it hasn't already been created.
184
185         * editing/WebContentReader.h:
186         * editing/cocoa/WebContentReaderCocoa.mm:
187         (WebCore::WebContentReader::readFilePaths):
188
189         Rename readFilenames to readFilePaths (which better reflects its parameters, which are file paths). Also, move
190         the implementation of readFilePaths to shared iOS/macOS code in WebContentReaderCocoa, and remove the stub
191         implementation on iOS.
192
193         There's a bit of code here that I kept macOS-only which deals with inserting file paths as plain text in
194         editable areas, but it's unclear to me why and if WebKit clients currently find this useful, so I left a FIXME
195         to investigate removing this altogether. Code for handling this plain text insertion of file paths on Mac was
196         introduced in r67403.
197
198         * editing/ios/WebContentReaderIOS.mm:
199         (WebCore::WebContentReader::readFilenames): Deleted.
200         * editing/mac/WebContentReaderMac.mm:
201         (WebCore::WebContentReader::readFilenames): Deleted.
202         * page/mac/DragControllerMac.mm:
203         (WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod const):
204
205         Teach DragController to accept all types conforming to "public.item" and "public.content" on iOS, only when
206         attachment elements are enabled. This allows us to load content from item providers that we otherwise would not
207         have loaded, since we now have the ability to fall back to attachment element insertion if the type is not have
208         a default representation using standard web content.
209
210         * platform/Pasteboard.h:
211         * platform/PasteboardItemInfo.h: Added.
212         (WebCore::PasteboardItemInfo::encode const):
213         (WebCore::PasteboardItemInfo::decode):
214
215         Add PasteboardItemInfo, a struct that describes an item on the pasteboard. Also, implement encoding and decoding
216         support for PasteboardItemInfo. So far, the item info only describes file information about the pasteboard item,
217         and flags indicating whether the item prefers attachment or inline presentation.
218
219         * platform/PasteboardStrategy.h:
220
221         Replace getFilenamesForDataInteraction with informationForItemAtIndex. Instead of returning all of the file
222         paths associated with any item on the pasteboard, fetch a PasteboardItemInfo at a given item index, which
223         includes information about the file path as well as some other metadata we'll need when deciding how to read
224         pasteboard contents as a document fragment.
225
226         * platform/PlatformPasteboard.h:
227         * platform/cocoa/PasteboardCocoa.mm:
228         (WebCore::Pasteboard::read):
229         * platform/ios/AbstractPasteboard.h:
230         * platform/ios/PasteboardIOS.mm:
231         (WebCore::Pasteboard::read):
232         (WebCore::Pasteboard::readRespectingUTIFidelities):
233
234         Teach the iOS Pasteboard to read web content using attachment elements, if enabled. There are two scenarios in
235         which we would want to insert an attachment element:
236         (1) The item provider uses a preferred presentation style of attachment, in which case we bail out of trying to
237             handle the drop using the default mechanisms, and simply insert it as an attachment. We need this to deal
238             with the case where we drop text or HTML files from the Files app, so that we don't try and insert the
239             contents of the text or HTML as inline web content.
240         (2) The item provider doesn't have a preferred attachment presentation style, but there's nothing WebKit would
241             otherwise do with the dropped content, so insert an attachment element as a fallback. Examples where this is
242             relevant are dropping a PDF or ZIP archive without attachment presentation style explicitly set.
243         We first check if we fall into case (1). If so, we can bail early by inserting an attachment; otherwise, we
244         proceed normally and see if we can read the contents of the drop as web content. If, at the end of default drop
245         handling, we don't still have a way to represent the dropped content, enter case (2).
246
247         (WebCore::Pasteboard::readFilePaths):
248         (WebCore::Pasteboard::readFilenames): Deleted.
249
250         Rename readFilenames to readFilePaths, and reimplement it using informationForItemAtIndex.
251
252         * platform/ios/PlatformPasteboardIOS.mm:
253         (WebCore::pasteboardItemPresentationStyle):
254         (WebCore::PlatformPasteboard::informationForItemAtIndex):
255         (WebCore::PlatformPasteboard::filenamesForDataInteraction): Deleted.
256
257         Implement informationForItemAtIndex and remove filenamesForDataInteraction. As before, we ask the pasteboard
258         (i.e. WebItemProviderPasteboard) for information about dropped file URLs. This time, we limit this to a single
259         file, so we don't end up creating multiple attachment elements for each representation of a single item
260         provider. See below for -preferredFileUploadURLAtIndex:fileType: for more detail.
261
262         * platform/ios/WebItemProviderPasteboard.h:
263         * platform/ios/WebItemProviderPasteboard.mm:
264         (-[WebItemProviderLoadResult initWithItemProvider:typesToLoad:]):
265         (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
266
267         Remove this synthesized instance variable and instead just check the item provider's preferredPresentationStyle.
268
269         (-[WebItemProviderLoadResult description]):
270
271         Add a verbose -description to the load result object. Useful for debugging what was content was loaded from an
272         item provider on drop.
273
274         (-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]):
275
276         Return the highest fidelity loaded type identifier for a given item.
277
278         (-[WebItemProviderPasteboard allDroppedFileURLs]):
279         (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
280
281         Prefer flat RTFD to RTFD. In the case where attachments are enabled and we're accepting all types of content
282         using attachment elements as a fallback representation, if the source writes attributed strings to the
283         pasteboard with com.apple.rtfd at a higher fidelity than com.apple.flat-rtfd, we'll end up loading only
284         com.apple.rtfd and dropping the text as an attachment element because we cannot convert the dropped content to
285         markup. Instead, if flat RTFD is present in the item provider, always prefer that over RTFD so that dropping as
286         regular web content isn't overridden when attachment elements are enabled.
287
288         (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
289         (-[WebItemProviderPasteboard droppedFileURLs]): Deleted.
290         * platform/mac/DragDataMac.mm:
291         (WebCore::DragData::containsCompatibleContent const):
292
293         DragData::containsCompatibleContent should be true when attachment elements are enabled, and there are files we
294         can drop as attachment elements.
295
296         * platform/mac/PasteboardMac.mm:
297         (WebCore::Pasteboard::read):
298         (WebCore::Pasteboard::readFilePaths):
299         (WebCore::Pasteboard::readFilenames): Deleted.
300
301 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
302
303         Replace hard-coded paths in shebangs with #!/usr/bin/env
304         https://bugs.webkit.org/show_bug.cgi?id=181040
305
306         Reviewed by Alex Christensen.
307
308         * bindings/scripts/InFilesCompiler.pm:
309         * bindings/scripts/InFilesParser.pm:
310         * bindings/scripts/generate-bindings-all.pl:
311         * bindings/scripts/generate-bindings.pl:
312         * bindings/scripts/preprocess-idls.pl:
313         * css/make-css-file-arrays.pl:
314         * css/makeprop.pl:
315         * css/makevalues.pl:
316         * dom/make_event_factory.pl:
317         * dom/make_names.pl:
318         * extract-localizable-strings.pl:
319         * make-hash-tools.pl:
320
321 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
322
323         [Attachment Support] Add plumbing for starting a drag with promised blob data
324         https://bugs.webkit.org/show_bug.cgi?id=181201
325
326         Reviewed by Tim Horton.
327
328         Adds logic to allow dragging an attachment element as a file by sending promised blob information to the UI
329         process. See comments below for more detail.
330
331         The only change in behavior is that dragging an attachment element will no longer write web content and injected
332         bundle data to the pasteboard if the attachment element's file attribute is nonnull. This will cause one
333         existing WK1 layout test to fail, but will otherwise not affect any attachment editing clients. On iOS,
334         attachment elements in the Mail viewer can be dragged, but each attachment's file is null, so we fall back to
335         current behavior; on macOS, Mail currently overrides the drag completely, beginning at -mouseDown:, so this
336         doesn't make a difference to macOS Mail either.
337
338         * editing/Editor.h:
339         * editing/cocoa/EditorCocoa.mm:
340         (WebCore::Editor::getPasteboardTypesAndDataForAttachment):
341
342         Add a helper method to retrieve an attachment element as web archive data, for moving attachments within the
343         same document. Also gives the injected editor bundle a chance to supply custom pasteboard types.
344
345         * loader/EmptyClients.cpp:
346         * page/DragClient.h:
347         (WebCore::DragClient::prepareToDragPromisedBlob):
348
349         Add new DragClient methods to send information about a promised blob to the UI process.
350
351         * page/DragController.cpp:
352         (WebCore::DragController::startDrag):
353
354         Call dragAttachmentElement when starting a drag on an attachment element.
355
356         (WebCore::DragController::dragAttachmentElement):
357
358         Try to begin dragging a given attachment element, propagating promised blob information to the client layers.
359         Returns true iff the attachment is backed by blob data (i.e. the file is nonnull).
360
361         * platform/PromisedBlobInfo.h:
362
363         Add a list of additional types and data to PromisedBlobInfo. In addition to the promised blob info, this would
364         allow injected bundle data and other private types alongside the main attachment data on the pasteboard.
365
366 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
367
368         Remove the 'resolutionScale' parameter from ImageBufferDataCG get/putBytes
369         https://bugs.webkit.org/show_bug.cgi?id=181268
370
371         Reviewed by Alex Christensen.
372
373         These functions were always called with resolutionScale=1.
374
375         * platform/graphics/cg/ImageBufferCG.cpp:
376         (WebCore::ImageBuffer::getUnmultipliedImageData const):
377         (WebCore::ImageBuffer::getPremultipliedImageData const):
378         (WebCore::ImageBuffer::putByteArray):
379         * platform/graphics/cg/ImageBufferDataCG.cpp:
380         (WebCore::ImageBufferData::getData const):
381         (WebCore::ImageBufferData::putData):
382         (WebCore::affineWarpBufferData): Deleted.
383         * platform/graphics/cg/ImageBufferDataCG.h:
384
385 2018-01-03  John Wilander  <wilander@apple.com>
386
387         Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
388         https://bugs.webkit.org/show_bug.cgi?id=181270
389         <rdar://problem/36289544>
390
391         Reviewed by Alex Christensen.
392
393         No new tests. Existing test re-enabled.
394
395         This change refactors how the web process tells the network process
396         to remove storage access. Previously, this was done over the UI process
397         just like requests for storage access. But since no further reasoning
398         is needed, the message should go straight from the web process to the
399         network process for performance reasons and to minimize the risk of a
400         race.
401
402         As a consequence, the XPC code for storage access removal in the UI
403         process is deleted.
404
405         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
406         (WebCore::NetworkStorageSession::cookieStoragePartition const):
407             Removes the storageAccessAPIEnabled check since the flag
408             doesn't get propagated when the network process is created.
409             Figuring this out will take some work which is unnecessary
410             when we already gate access to the feature in Document.idl.
411
412 2018-01-03  James Craig  <jcraig@apple.com>
413
414         AX: when invert colors is on, double-invert certain media elements in UserAgentStyleSheet
415         https://bugs.webkit.org/show_bug.cgi?id=168447
416         <rdar://problem/30559874>
417
418         Reviewed by Simon Fraser.
419
420         Double-invert video when platform 'invert colors' setting is enabled. Behavior matches 
421         current 'Smart Invert' feature of Safari Reader on macOS/iOS and other iOS native apps.
422
423         Tests: accessibility/smart-invert-reference.html
424                accessibility/smart-invert.html
425
426         * Modules/modern-media-controls/controls/media-controls.css:
427         (@media (inverted-colors)):
428         (:host):
429         (picture):
430         * css/html.css:
431         (@media (inverted-colors)):
432         (video):
433
434 2018-01-03  Youenn Fablet  <youenn@apple.com>
435
436         LayoutTest http/tests/media/media-stream/disconnected-frame.html to consistently fail an assertion: !m_adoptionIsRequired
437         https://bugs.webkit.org/show_bug.cgi?id=181264
438
439         Reviewed by Eric Carlson.
440
441         Covered by http/tests/media/media-stream/disconnected-frame.html not crashing anymore in Debug builds.
442         Calling suspendIfNeeded in create method instead of constructor.
443
444         * Modules/mediastream/UserMediaRequest.cpp:
445         (WebCore::UserMediaRequest::create):
446         (WebCore::UserMediaRequest::UserMediaRequest):
447
448 2018-01-03  Antti Koivisto  <antti@apple.com>
449
450         Remove DeprecatedCSSOMValue::equals
451         https://bugs.webkit.org/show_bug.cgi?id=181241
452
453         Reviewed by Zalan Bujtas.
454
455         This is dead code.
456
457         * css/DeprecatedCSSOMValue.cpp:
458         (WebCore::compareCSSOMValues): Deleted.
459         (WebCore::DeprecatedCSSOMValue::equals const): Deleted.
460         * css/DeprecatedCSSOMValue.h:
461         (WebCore::DeprecatedCSSOMValue::operator== const): Deleted.
462         (WebCore::DeprecatedCSSOMComplexValue::equals const): Deleted.
463         * css/DeprecatedCSSOMValueList.cpp:
464         (WebCore::DeprecatedCSSOMValueList::equals const): Deleted.
465         * css/DeprecatedCSSOMValueList.h:
466
467 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
468
469         feLighting is broken with primitiveUnits="objectBoundingBox"
470         https://bugs.webkit.org/show_bug.cgi?id=181197
471
472         Reviewed by Tim Horton.
473
474         With <filter primitiveUnits="objectBoundingBox"> we need to convert the coordinates
475         of fePointLights and feSpotLights into user space coordinates. Following
476         https://www.w3.org/TR/SVG/filters.html#FilterElementPrimitiveUnitsAttribute
477         this is done by treating them as fractions of the bounding box on the referencing
478         element, with treatment for z following https://www.w3.org/TR/SVG/coords.html#Units_viewport_percentage
479         
480         To do this, store the bounds of the referencing elemenet on SVGFilterBuilder as
481         targetBoundingBox, and store the primitiveUnits type. Then do the conversion of lighting
482         coordinates in SVGFESpecularLightingElement::build() and SVGFEDiffuseLightingElement::build().
483
484         Remove SVGFELightElement::findLightSource(), since we need to be able to pass the SVGFilterBuilder
485         to the lightSource() function so hoist the code up.
486
487         Tests: svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg
488                svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox.svg
489                svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox-expected.svg
490                svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox.svg
491                svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg
492                svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox.svg
493
494         * rendering/svg/RenderSVGResourceFilter.cpp:
495         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
496         * svg/SVGFEDiffuseLightingElement.cpp:
497         (WebCore::SVGFEDiffuseLightingElement::build):
498         * svg/SVGFEDistantLightElement.cpp:
499         (WebCore::SVGFEDistantLightElement::lightSource const):
500         * svg/SVGFEDistantLightElement.h:
501         * svg/SVGFELightElement.cpp:
502         (WebCore::SVGFELightElement::findLightSource): Deleted.
503         * svg/SVGFELightElement.h:
504         * svg/SVGFEPointLightElement.cpp:
505         (WebCore::SVGFEPointLightElement::lightSource const):
506         * svg/SVGFEPointLightElement.h:
507         * svg/SVGFESpecularLightingElement.cpp:
508         (WebCore::SVGFESpecularLightingElement::build):
509         * svg/SVGFESpotLightElement.cpp:
510         (WebCore::SVGFESpotLightElement::lightSource const):
511         * svg/SVGFESpotLightElement.h:
512         * svg/graphics/filters/SVGFilterBuilder.h:
513         (WebCore::SVGFilterBuilder::setTargetBoundingBox):
514         (WebCore::SVGFilterBuilder::targetBoundingBox const):
515         (WebCore::SVGFilterBuilder::primitiveUnits const):
516         (WebCore::SVGFilterBuilder::setPrimitiveUnits):
517
518 2018-01-03  Antti Koivisto  <antti@apple.com>
519
520         Crash beneath CSSValue::equals @ csas.cz
521         https://bugs.webkit.org/show_bug.cgi?id=181243
522         <rdar://problem/35990826>
523
524         Reviewed by Alex Christensen.
525
526         Test: fast/text/oblique-degree-equals-crash.html
527
528         * css/CSSFontStyleValue.cpp:
529         (WebCore::CSSFontStyleValue::equals const):
530
531         Null check both oblique pointers.
532
533 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
534
535         Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
536         https://bugs.webkit.org/show_bug.cgi?id=180979
537         <rdar://problem/36146670>
538
539         Reviewed by Matt Baker.
540
541         * platform/graphics/cocoa/FontCacheCoreText.cpp:
542         (fontNameIsSystemFont):
543         (WebCore::FontCache::systemFontFamilies):
544         Switch to the original Mac algorithm before r180979 that uses
545         CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
546         available on iOS but now it is. This is a performance improvement on
547         both platforms, but significantly so on macOS. It also finds more,
548         valid, family names.
549
550 2018-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
551
552         ASSERTION FAILED: !source || is<Target>(*source) in CoordinatedGraphicsLayer::removeFromParent
553         https://bugs.webkit.org/show_bug.cgi?id=166568
554
555         Reviewed by Simon Fraser.
556
557         When a GraphicsLayer has a mask layer, it fails to properly unparent the mask layer before
558         it is destroyed. This leaves the mask layer with a dangling parent pointer. Fix it, while
559         taking care not to introduce yet another virtual function call during the execution of the
560         destructor.
561
562         * platform/graphics/GraphicsLayer.cpp:
563         (WebCore::GraphicsLayer::willBeDestroyed):
564
565 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
566
567         SVG lighting filter lights are in the wrong coordinate system
568         https://bugs.webkit.org/show_bug.cgi?id=181147
569
570         Reviewed by Zalan Bujtas.
571
572         Point and spot light coordinates weren't being converted into buffer-relative
573         coordinates before being fed into the lighting math, resulting in incorrect light
574         rendering on Retina devices, and when the filter primitive region was clipped.
575
576         Fix by storing absoluteUnclippedSubregion on FilterEffect, which allows us to map
577         lighting points from user space coordinates into the coordinates of the buffer being
578         used for rendering. Also scale the light z coordinate by doing a dummy point mapping in x.
579
580         Rename members of PointLightSource and SpotLightSource to make it clear which coordinate
581         system they are in.
582
583         Tests include HiDPI tests.
584
585         Tests: svg/filters/fePointLight-coordinates-expected.svg
586                svg/filters/fePointLight-coordinates.svg
587                svg/filters/feSpotLight-coordinates-expected.svg
588                svg/filters/feSpotLight-coordinates.svg
589                svg/filters/hidpi/fePointLight-coordinates-expected.svg
590                svg/filters/hidpi/fePointLight-coordinates.svg
591                svg/filters/hidpi/feSpotLight-coordinates-expected.svg
592                svg/filters/hidpi/feSpotLight-coordinates.svg
593
594         * platform/graphics/FloatPoint3D.h: Make it easy to get and set the X and Y coords as a FloatPoint.
595         (WebCore::FloatPoint3D::xy const):
596         (WebCore::FloatPoint3D::setXY):
597         * platform/graphics/GeometryUtilities.cpp:
598         (WebCore::mapPoint):
599         (WebCore::mapRect):
600         * platform/graphics/GeometryUtilities.h: Helper to make a point between rects.
601         * platform/graphics/filters/DistantLightSource.cpp:
602         (WebCore::DistantLightSource::initPaintingData):
603         * platform/graphics/filters/DistantLightSource.h:
604         * platform/graphics/filters/FELighting.cpp:
605         (WebCore::FELighting::drawLighting):
606         * platform/graphics/filters/FilterEffect.cpp:
607         (WebCore::FilterEffect::mapPointFromUserSpaceToBuffer const):
608         * platform/graphics/filters/FilterEffect.h:
609         (WebCore::FilterEffect::setUnclippedAbsoluteSubregion):
610         * platform/graphics/filters/LightSource.h:
611         * platform/graphics/filters/PointLightSource.cpp:
612         (WebCore::PointLightSource::initPaintingData):
613         (WebCore::PointLightSource::computePixelLightingData const):
614         (WebCore::PointLightSource::setX):
615         (WebCore::PointLightSource::setY):
616         (WebCore::PointLightSource::setZ):
617         * platform/graphics/filters/PointLightSource.h:
618         (WebCore::PointLightSource::position const):
619         (WebCore::PointLightSource::PointLightSource):
620         * platform/graphics/filters/SpotLightSource.cpp:
621         (WebCore::SpotLightSource::initPaintingData):
622         (WebCore::SpotLightSource::computePixelLightingData const):
623         (WebCore::SpotLightSource::setX):
624         (WebCore::SpotLightSource::setY):
625         (WebCore::SpotLightSource::setZ):
626         (WebCore::SpotLightSource::setPointsAtX):
627         (WebCore::SpotLightSource::setPointsAtY):
628         (WebCore::SpotLightSource::setPointsAtZ):
629         * platform/graphics/filters/SpotLightSource.h:
630         (WebCore::SpotLightSource::position const):
631         (WebCore::SpotLightSource::direction const):
632         (WebCore::SpotLightSource::SpotLightSource):
633         * rendering/svg/RenderSVGResourceFilter.cpp:
634         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
635         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
636         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
637
638 2018-01-03  Youenn Fablet  <youenn@apple.com>
639
640         Select service worker for documents with data/blob URLS
641         https://bugs.webkit.org/show_bug.cgi?id=181213
642
643         Reviewed by Alex Christensen.
644
645         Covered by updated test.
646
647         Reusing the service worker of the parent for blob/data URL documents.
648
649         * loader/DocumentLoader.cpp:
650         (WebCore::isLocalURL):
651         (WebCore::DocumentLoader::commitData):
652
653 2018-01-03  Ryan Haddad  <ryanhaddad@apple.com>
654
655         Unreviewed, rolling out r226352.
656
657         Breaks Sierra and El Capitan builds.
658
659         Reverted changeset:
660
661         "Web Inspector: Slow open time enumerating system fonts
662         (FontCache::systemFontFamilies)"
663         https://bugs.webkit.org/show_bug.cgi?id=180979
664         https://trac.webkit.org/changeset/226352
665
666 2018-01-03  Philippe Normand  <pnormand@igalia.com>
667
668         [GStreamer] The bus synchronous handler should be in the base player class
669         https://bugs.webkit.org/show_bug.cgi?id=181237
670
671         Reviewed by Carlos Garcia Campos.
672
673         Because this is where video rendering is handled.
674
675         No new tests, this is only a refactoring.
676
677         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
678         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
679         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
680         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
681
682 2018-01-03  Philippe Normand  <pnormand@igalia.com>
683
684         [GStreamer] move MediaSample implementation out of mse/
685         https://bugs.webkit.org/show_bug.cgi?id=179165
686
687         Reviewed by Carlos Garcia Campos.
688
689         This module isn't specific to MSE and can potentially be reused
690         elsewhere, for WebRTC for instance. Additionally the
691         ::platformSample() method was implemented and the code was cleaned up.
692
693         * platform/GStreamer.cmake:
694         * platform/MediaSample.h:
695         * platform/graphics/gstreamer/GStreamerMediaSample.cpp: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp.
696         (WebCore::GStreamerMediaSample::platformSample):
697         * platform/graphics/gstreamer/GStreamerMediaSample.h: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.h.
698         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
699         (WebCore::PlaybackPipeline::enqueueSample):
700
701 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
702
703         Unreviewed. Fix resource load stats tests on GLib based ports after r226355.
704
705         The monitor can be created in the work queue thread too.
706
707         * platform/glib/FileMonitorGLib.cpp:
708         (WebCore::FileMonitor::FileMonitor):
709
710 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
711
712         [GTK] Crash destroying WebCore::FileMonitor
713         https://bugs.webkit.org/show_bug.cgi?id=181138
714
715         Reviewed by Michael Catanzaro.
716
717         Ensure that platform file monitor is always created and destroyed in the work queue thread synchronously.
718
719         * platform/FileMonitor.h:
720         * platform/glib/FileMonitorGLib.cpp:
721         (WebCore::FileMonitor::FileMonitor):
722         (WebCore::FileMonitor::~FileMonitor):
723         (WebCore::FileMonitor::didChange):
724
725 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
726
727         Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
728         https://bugs.webkit.org/show_bug.cgi?id=180979
729         <rdar://problem/36146670>
730
731         Reviewed by Matt Baker.
732
733         * platform/graphics/cocoa/FontCacheCoreText.cpp:
734         (WebCore::FontCache::systemFontFamilies):
735         Switch to the original Mac algorithm before r180979 that uses
736         CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
737         available on iOS but now it is. This is a performance improvement on
738         both platforms, but significantly so on macOS. It also finds more,
739         valid, family names.
740
741 2018-01-02  Yusuke Suzuki  <utatane.tea@gmail.com>
742
743         Unreviewed, fix GCC warning by using #include
744         https://bugs.webkit.org/show_bug.cgi?id=181189
745
746         This file is included in C++ files. Use #include instead of #import to suppress warning in GCC.
747
748         * platform/PromisedBlobInfo.h:
749
750 2017-12-28  Yusuke Suzuki  <utatane.tea@gmail.com>
751
752         Remove std::chrono completely
753         https://bugs.webkit.org/show_bug.cgi?id=181186
754
755         Reviewed by Alex Christensen.
756
757         Use MonotonicTime, WallTime, and Seconds instead.
758         Changes are mechanical ones. But persistent network cache data is changed.
759         So we bump the version number of the cache storage.
760
761         * Modules/indexeddb/server/IDBServer.cpp:
762         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
763         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
764         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
765         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
766         * Modules/indexeddb/server/IDBServer.h:
767         * Modules/webdatabase/DatabaseTracker.cpp:
768         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
769         * Modules/webdatabase/DatabaseTracker.h:
770         * dom/Document.cpp:
771         (WebCore::Document::lastModified):
772         * html/HTMLMediaElement.cpp:
773         (WebCore::HTMLMediaElement::clearMediaCache):
774         * html/HTMLMediaElement.h:
775         (WebCore::HTMLMediaElement::clearMediaCache):
776         * loader/CrossOriginPreflightResultCache.cpp:
777         (WebCore::parseAccessControlMaxAge):
778         (WebCore::CrossOriginPreflightResultCacheItem::parse):
779         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
780         * loader/CrossOriginPreflightResultCache.h:
781         * loader/cache/CachedResource.cpp:
782         (WebCore::CachedResource::CachedResource):
783         (WebCore::CachedResource::freshnessLifetime const):
784         (WebCore::CachedResource::responseReceived):
785         (WebCore::CachedResource::updateResponseAfterRevalidation):
786         * loader/cache/CachedResource.h:
787         * platform/FileSystem.cpp:
788         (WebCore::FileSystem::getFileModificationTime):
789         * platform/FileSystem.h:
790         * platform/SearchPopupMenu.h:
791         * platform/cocoa/SearchPopupMenuCocoa.h:
792         * platform/cocoa/SearchPopupMenuCocoa.mm:
793         (WebCore::toSystemClockTime):
794         (WebCore::toNSDateFromSystemClock):
795         (WebCore::removeRecentlyModifiedRecentSearches):
796         * platform/graphics/MediaPlayer.cpp:
797         (WebCore::MediaPlayer::clearMediaCache):
798         * platform/graphics/MediaPlayer.h:
799         * platform/graphics/MediaPlayerPrivate.h:
800         (WebCore::MediaPlayerPrivateInterface::clearMediaCache):
801         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
802         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
803         (WebCore::toSystemClockTime):
804         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
805         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
806         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
807         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache):
808         * platform/network/CacheValidation.cpp:
809         (WebCore::computeCurrentAge):
810         (WebCore::computeFreshnessLifetimeForHTTPFamily):
811         (WebCore::updateRedirectChainStatus):
812         (WebCore::redirectChainAllowsReuse):
813         (WebCore::parseCacheControlDirectives):
814         * platform/network/CacheValidation.h:
815         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
816         * platform/network/HTTPParsers.cpp:
817         (WebCore::parseHTTPDate):
818         * platform/network/HTTPParsers.h:
819         * platform/network/PlatformCookieJar.h:
820         * platform/network/ResourceResponseBase.cpp:
821         (WebCore::ResourceResponseBase::cacheControlMaxAge const):
822         (WebCore::parseDateValueInHeader):
823         (WebCore::ResourceResponseBase::date const):
824         (WebCore::ResourceResponseBase::age const):
825         (WebCore::ResourceResponseBase::expires const):
826         (WebCore::ResourceResponseBase::lastModified const):
827         * platform/network/ResourceResponseBase.h:
828         * platform/network/cf/CookieJarCFNet.cpp:
829         (WebCore::deleteAllCookiesModifiedSince):
830         * platform/network/curl/CookieJarCurl.cpp:
831         (WebCore::CookieJarCurlFileSystem::deleteAllCookiesModifiedSince):
832         (WebCore::deleteAllCookiesModifiedSince):
833         * platform/network/curl/CookieJarCurl.h:
834         * platform/network/curl/CurlCacheEntry.cpp:
835         (WebCore::CurlCacheEntry::CurlCacheEntry):
836         (WebCore::CurlCacheEntry::isCached):
837         (WebCore::CurlCacheEntry::parseResponseHeaders):
838         * platform/network/curl/CurlCacheEntry.h:
839         * platform/network/mac/CookieJarMac.mm:
840         (WebCore::deleteAllCookiesModifiedSince):
841         * platform/network/soup/CookieJarSoup.cpp:
842         (WebCore::deleteAllCookiesModifiedSince):
843         * platform/win/SearchPopupMenuWin.cpp:
844         (WebCore::SearchPopupMenuWin::loadRecentSearches):
845         * rendering/RenderSearchField.cpp:
846         (WebCore::RenderSearchField::addSearchResult):
847
848 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
849
850         [Attachment Support] Introduce data structures and IPC support for writing promised blobs
851         https://bugs.webkit.org/show_bug.cgi?id=181189
852
853         Reviewed by Tim Horton.
854
855         Introduces a new header containing structs to be used for writing blob data when dragging. PromisedBlobInfo
856         represents information needed to declare data on the pasteboard that will eventually be provided via a Blob.
857         This includes the type and filename of the Blob-backed content. PromisedBlobData represents information needed
858         to actually deliver the Blob's content to the platform, and is sent some time after its corresponding
859         PromisedBlobInfo. The content may either be in the form of a file path (as is the case using the previous
860         declareAndWriteAttachment codepath) or a data buffer (which we would use if the Blob is not already backed by a
861         file on disk).
862
863         No new tests, since there is no observable change in functionality yet.
864
865         * WebCore.xcodeproj/project.pbxproj:
866         * platform/PromisedBlobInfo.h: Added.
867         (WebCore::PromisedBlobInfo::operator bool const):
868         (WebCore::PromisedBlobData::hasData const):
869         (WebCore::PromisedBlobData::hasFile const):
870         (WebCore::PromisedBlobData::operator bool const):
871         (WebCore::PromisedBlobData::fulfills const):
872
873 2018-01-02  Brady Eidson  <beidson@apple.com>
874
875         Make MessagePortChannel::takeAllMessagesFromRemote asynchronous.
876         https://bugs.webkit.org/show_bug.cgi?id=181205
877
878         Reviewed by Alex Christensen.
879
880         No new tests (No behavior change)
881
882         This is needed for the ongoing WK2 MessagePort work.
883
884         For WK1 in-process MessagePorts it is still synchronous; no behavior change.
885
886         * dom/InProcessMessagePortChannel.cpp:
887         (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote):
888         * dom/InProcessMessagePortChannel.h:
889
890         * dom/MessagePort.cpp:
891         (WebCore::MessagePort::dispatchMessages):
892         * dom/MessagePortChannel.h:
893
894 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
895
896         Add a WebAuthentication runtime feature flag
897         https://bugs.webkit.org/show_bug.cgi?id=181220
898         <rdar://problem/36055305>
899
900         Reviewed by Brent Fulgham.
901
902         This patch basically renames the CredentialManagement runtime feature flag into
903         WebAuthentication runtime feature flag.
904
905         No tests.
906
907         * Modules/credentialmanagement/BasicCredential.idl:
908         * Modules/credentialmanagement/CredentialsContainer.idl:
909         * Modules/credentialmanagement/NavigatorCredentials.idl:
910         * Modules/webauthn/PublicKeyCredential.idl:
911         * page/RuntimeEnabledFeatures.h:
912         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationEnabled):
913         (WebCore::RuntimeEnabledFeatures::webAuthenticationEnabled const):
914         (WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Deleted.
915         (WebCore::RuntimeEnabledFeatures::credentialManagementEnabled const): Deleted.
916
917 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
918
919         [Attachment Support] Don't Blob-convert images and attachments with https:, http: or data: urls
920         https://bugs.webkit.org/show_bug.cgi?id=181143
921         <rdar://problem/36200381>
922
923         Reviewed by Tim Horton.
924
925         Clients such as Mail would expect pasting or dropping an image with src="https://..." to result in the source
926         URL being preserved (i.e. staying as remote images) instead of creating image attachments out of them. This
927         patch hooks into the shouldConvertToBlob() check added in r226272 so that it applies to attachment element
928         replacement as well.
929
930         Test: WKAttachmentTests.DoNotInsertDataURLImagesAsAttachments
931
932         * editing/cocoa/WebContentReaderCocoa.mm:
933         (WebCore::shouldConvertToBlob):
934         (WebCore::replaceRichContentWithAttachments):
935
936 2018-01-02  Brady Eidson  <beidson@apple.com>
937
938         Identify MessagePorts by a globally unique MessagePortIdentifier.
939         https://bugs.webkit.org/show_bug.cgi?id=181172
940
941         Reviewed by Alex Christensen.
942
943         No new tests (Behavior change covered by all existing tests).
944
945         This cleans up the abstract MessagePortChannel interface to be in terms of identifiers
946         instead of actual MessagePort objects.
947         
948         The identifiers are compounded with the current ProcessIdentifier meaning they are global
949         across all processes for the running UI process, enabling easy cross-process communication.
950         
951         (Actual cross-process communication comes in a followup)
952         
953         * WebCore.xcodeproj/project.pbxproj:
954         
955         * dom/InProcessMessagePortChannel.cpp:
956         (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts):
957         (WebCore::InProcessMessagePortChannel::isConnectedTo):
958         (WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen):
959         (WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted.
960         * dom/InProcessMessagePortChannel.h:
961         
962         * dom/MessageChannel.cpp:
963         (WebCore::MessageChannel::MessageChannel):
964         (WebCore::m_port2):
965         
966         * dom/MessagePort.cpp:
967         (WebCore::allMessagePortsLock):
968         (WebCore::MessagePort::ref const):
969         (WebCore::MessagePort::deref const):
970         (WebCore::MessagePort::existingMessagePortForIdentifier):
971         (WebCore::MessagePort::MessagePort):
972         (WebCore::MessagePort::~MessagePort):
973         (WebCore::MessagePort::postMessage):
974         (WebCore::MessagePort::entangleWithRemote):
975         (WebCore::MessagePort::entanglePorts):
976         (WebCore::MessagePort::entangle): Deleted.
977         * dom/MessagePort.h:
978         
979         * dom/MessagePortChannel.h:
980         
981         * dom/MessagePortIdentifier.h: Added.
982         (WebCore::operator==):
983         (WebCore::MessagePortIdentifier::encode const):
984         (WebCore::MessagePortIdentifier::decode):
985         (WebCore::MessagePortIdentifier::hash const):
986         (WTF::MessagePortIdentifierHash::hash):
987         (WTF::MessagePortIdentifierHash::equal):
988         (WTF::HashTraits<WebCore::MessagePortIdentifier>::emptyValue):
989         (WTF::HashTraits<WebCore::MessagePortIdentifier>::constructDeletedValue):
990         (WTF::HashTraits<WebCore::MessagePortIdentifier>::isDeletedValue):
991
992 2018-01-02  Youenn Fablet  <youenn@apple.com>
993
994         Memory cache should not reuse resources with different credential fetch option
995         https://bugs.webkit.org/show_bug.cgi?id=181212
996
997         Reviewed by Alex Christensen.
998
999         Covered by rebased test.
1000
1001         * loader/cache/CachedResourceLoader.cpp:
1002         (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
1003
1004 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1005
1006         Update Credential Management API for WebAuthentication
1007         https://bugs.webkit.org/show_bug.cgi?id=181082
1008         <rdar://problem/36055239>
1009
1010         Reviewed by Brent Fulgham.
1011
1012         Part 2/2
1013
1014         This patch implements Core API from Credential Management API: https://www.w3.org/TR/credential-management-1/#core.
1015         which is required by WebAuthN. It also sets the CredentialManagement runtime flag to enable testing. Note that it
1016         introduces a dummy PublicKeyCredential interface for testing functionalities of the Credential interface, which
1017         cannot be instantiated.
1018
1019         Tests: http/wpt/credential-management/credentialscontainer-create-basics.https.html
1020                http/wpt/credential-management/credentialscontainer-get-basics.https.html
1021                http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html
1022                http/wpt/credential-management/idl.https.html
1023
1024         * CMakeLists.txt:
1025         * DerivedSources.make:
1026         * Modules/credentialmanagement/BasicCredential.cpp:
1027         (WebCore::BasicCredential::BasicCredential):
1028         (WebCore::BasicCredential::type const):
1029         * Modules/credentialmanagement/BasicCredential.h:
1030         (WebCore::BasicCredential::discovery const):
1031         * Modules/credentialmanagement/BasicCredential.idl:
1032         * Modules/credentialmanagement/CredentialCreationOptions.h:
1033         * Modules/credentialmanagement/CredentialCreationOptions.idl:
1034         * Modules/credentialmanagement/CredentialRequestOptions.h:
1035         * Modules/credentialmanagement/CredentialRequestOptions.idl:
1036         * Modules/credentialmanagement/CredentialsContainer.cpp:
1037         (WebCore::CredentialsContainer::CredentialsContainer):
1038         (WebCore::CredentialsContainer::isSameOriginWithItsAncestors):
1039         (WebCore::CredentialsContainer::dispatchTask):
1040         (WebCore::CredentialsContainer::get):
1041         (WebCore::CredentialsContainer::store):
1042         (WebCore::CredentialsContainer::isCreate):
1043         (WebCore::CredentialsContainer::preventSilentAccess):
1044         * Modules/credentialmanagement/CredentialsContainer.h:
1045         (WebCore::CredentialsContainer::create):
1046         (WebCore::CredentialsContainer::CredentialsContainer): Deleted.
1047         * Modules/credentialmanagement/CredentialsContainer.idl:
1048         * Modules/credentialmanagement/NavigatorCredentials.cpp:
1049         (WebCore::NavigatorCredentials::credentials):
1050         * Modules/credentialmanagement/NavigatorCredentials.h:
1051         * Modules/credentialmanagement/NavigatorCredentials.idl:
1052         * Modules/webauthn/PublicKeyCredential.cpp: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
1053         (WebCore::PublicKeyCredential::PublicKeyCredential):
1054         (WebCore::PublicKeyCredential::collectFromCredentialStore):
1055         (WebCore::PublicKeyCredential::discoverFromExternalSource):
1056         (WebCore::PublicKeyCredential::store):
1057         (WebCore::PublicKeyCredential::create):
1058         * Modules/webauthn/PublicKeyCredential.h: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
1059         * Modules/webauthn/PublicKeyCredential.idl: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.idl.
1060         * Sources.txt:
1061         * WebCore.xcodeproj/project.pbxproj:
1062         * bindings/js/WebCoreBuiltinNames.h:
1063         * page/RuntimeEnabledFeatures.h:
1064
1065 2018-01-02  Oleksandr Skachkov  <gskachkov@gmail.com>
1066
1067         WebAssembly: sending module to iframe fails
1068         https://bugs.webkit.org/show_bug.cgi?id=179263
1069
1070         Reviewed by JF Bastien.
1071
1072         Allow use WebAssembly.Module as input parameters for postMessage 
1073         in window and iframe object. To prevent sending message to iframe
1074         that is not ready, in iframe-* test we are waiting message from
1075         iframe only after that we send message to it.   
1076
1077         Tests: wasm/iframe-parent-postmessage.html
1078                wasm/iframe-postmessage.html
1079                wasm/window-postmessage.html
1080
1081         * bindings/js/SerializedScriptValue.cpp:
1082         (WebCore::CloneSerializer::dumpIfTerminal):
1083         * bindings/js/SerializedScriptValue.h:
1084         * page/DOMWindow.cpp:
1085         (WebCore::DOMWindow::postMessage):
1086
1087 == Rolled over to ChangeLog-2018-01-01 ==