Accurately clip copyTexImage2D and copyTexSubImage2D
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-01-05  Dean Jackson  <dino@apple.com>
2
3         Accurately clip copyTexImage2D and copyTexSubImage2D
4         https://bugs.webkit.org/show_bug.cgi?id=181356
5         <rdar://problem/35083877>
6
7         Reviewed by Eric Carlson.
8
9         The code to make sure copyTexSubImage2D and copyTexImage2D will not try to read
10         out of bounds had a bad bug introduced here:
11         https://bugs.webkit.org/show_bug.cgi?id=51421
12
13         With appropriate parameters, it would produce a rectangle with
14         negative dimensions. Most GL drivers just ignored this, but some
15         are not happy.
16
17         Test: fast/canvas/webgl/copy-tex-image-and-sub-image-2d-bad-input.html
18
19         * html/canvas/WebGLRenderingContextBase.cpp:
20         (WebCore::clip2D): Reimplement this in a more sane manner, and use
21         checked arithmetic while here.
22         * html/canvas/WebGLRenderingContextBase.h:
23         (WebCore::clip1D): Deleted.
24         (WebCore::clip2D): Deleted.
25
26 2018-01-06  Antti Koivisto  <antti@apple.com>
27
28         Use WeakPtr for RenderTreePosition::m_nextSibling
29         https://bugs.webkit.org/show_bug.cgi?id=181363
30
31         Reviewed by Zalan Bujtas.
32
33         For safety. In most cases it is null and won't cause us to instantiate WeakReferences for
34         many new objects.
35
36         * rendering/updating/RenderTreePosition.cpp:
37         (WebCore::RenderTreePosition::computeNextSibling):
38         * rendering/updating/RenderTreePosition.h:
39         (WebCore::RenderTreePosition::RenderTreePosition):
40         (WebCore::RenderTreePosition::nextSibling const):
41
42 2018-01-05  David Kilzer  <ddkilzer@apple.com>
43
44         Re-enable -Wcast-qual in WebCore for Apple ports
45         <https://webkit.org/b/177895>
46         <rdar://problem/34960830>
47
48         Reviewed by Joseph Pecoraro.
49
50         * Configurations/Base.xcconfig:
51         (WARNING_CFLAGS): Remove FIXME and add -Wcast-qual back to
52         arguments.
53
54         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
55         (WebCore::createAndStoreMasterKey):
56         - Use checked_cf_cast<SecACLRef>().
57
58         * editing/cocoa/DataDetection.mm:
59         (WebCore::detectItemAtPositionWithRange):
60         - Manually cast CFTypeRef to DDResultRef until
61           DDResultGetTypeID() is available as SPI.
62
63         * platform/gamepad/mac/HIDGamepad.cpp:
64         (WebCore::HIDGamepad::initElementsFromArray):
65         - Use checked_cf_cast<IOHIDElementRef>().
66
67         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
68         (WebCore::MediaSampleAVFObjC::createImageSample):
69         (WebCore::CMSampleBufferIsRandomAccess):
70         (WebCore::CMSampleBufferIsNonDisplaying):
71         (WebCore::MediaSampleAVFObjC::createNonDisplayingCopy const):
72         - Use checked_cf_cast<CFMutableDictionaryRef>() and
73           checked_cf_cast<CFDictionaryRef>().
74
75         * platform/graphics/cocoa/IOSurface.h:
76         (WebCore::IOSurface::asLayerContents):
77         - Use reinterpret_cast<id>() to cast from IOSurfaceRef to id.
78
79         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
80         (WebCore::WebCoreDecompressionSession::getFirstVideoFrame):
81         (WebCore::WebCoreDecompressionSession::automaticDequeue):
82         (WebCore::WebCoreDecompressionSession::imageForTime):
83         (WebCore::WebCoreDecompressionSession::getDecodeTime):
84         (WebCore::WebCoreDecompressionSession::getPresentationTime):
85         (WebCore::WebCoreDecompressionSession::getDuration):
86         - Use checked_cf_cast<CMSampleBufferRef>().
87
88         * platform/graphics/Font.h:
89         (WebCore::Font::m_kernedCFStringAttributes):
90         (WebCore::Font::m_nonKernedCFStringAttributes):
91         - Change type from RetainPtr<CFDictionaryRef> to
92           RetainPtr<CFMutableDictionaryRef> since that's what they are.
93         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
94         (WebCore::Font::getCFStringAttributes const):
95         - Replace local `mutableAttributes` variable with
96           `attributesDictionary.get()` since it returns the correct type
97           now.
98
99         * platform/ios/wak/WAKView.mm:
100         (-[WAKView _initWithViewRef:]):
101         (_WAKCopyWrapper):
102         * platform/ios/wak/WKView.mm:
103         (_WKViewClearSuperview):
104         (WKViewFirstChild):
105         (WKViewNextSibling):
106         - Use static_cast<WKViewRef>(const_cast<void*>()) to convert
107           const void* variable to WKViewRef.
108
109         * platform/mac/PasteboardMac.mm:
110         (WebCore::flipImageSpec):
111         (WebCore::setDragImageImpl):
112         - Use const_cast<> to remove 'const' modifier from
113           unsigned char pointers.  This regressed while -Wcast-qual was
114           disabled for WebCore.
115
116         * platform/mac/SSLKeyGeneratorMac.mm:
117         (WebCore::signedPublicKeyAndChallengeString):
118         - Use checked_cf_cast<SecACLRef>().
119
120         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp:
121         (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):
122         - Use checked_cf_cast<CFMutableDictionaryRef>().
123
124         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
125         (WebCore::copyCONNECTProxyResponse):
126         - Use checked_cf_cast<CFHTTPMessageRef>().
127
128         * platform/network/cocoa/ResourceResponseCocoa.mm:
129         (WebCore::ResourceResponse::platformCertificateInfo const):
130         - Use checked_cf_cast<SecTrustRef>().
131
132         * platform/network/mac/CertificateInfoMac.mm:
133         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const):
134         (WebCore::CertificateInfo::dump const):
135         - Use checked_cf_cast<SecCertificateRef>().
136
137         * testing/cocoa/WebArchiveDumpSupport.mm:
138         (WebCoreTestSupport::createCFURLResponseFromResponseData):
139         - Use checked_cf_cast<>() for CFMutable* types.
140
141 2018-01-05  John Wilander  <wilander@apple.com>
142
143         Storage Access API: Refactor to make naming accurate and explicit, simplify access table, and prepare for access removal for page
144         https://bugs.webkit.org/show_bug.cgi?id=181357
145         <rdar://problem/36331031>
146
147         Reviewed by Alex Christensen.
148
149         No new tests. The only changed functionality that isn't covered
150         by existing tests is cross-origin iframes in the same partition
151         should be handled as already having access. This cannot be
152         tested in layout tests since they don't support subdomains.
153
154         This change does the following:
155         - Changes function and message names to reflect how this feature
156           was eventually implemented, i.e. access per frame.
157         - Makes it explicit that the UI process is only involved in
158           granting storage access and not removing storage access.
159           The latter is done directly by the web process.
160         - Simplifies the network process' entry map since only needs to
161           be able to give access to one domain in one frame at a time.
162           Access goes away on frame navigation so there can only be one
163           domain at a time per frame. Also, the map now uses pageIDs as
164           main keys to prepare for efficient access removal for all
165           frames under a page.
166         - Fixes a bug in so that a cross-origin iframe with the same
167           partition as the top frame correctly is handled as already
168           having access.
169
170         * platform/network/NetworkStorageSession.h:
171         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
172         (WebCore::NetworkStorageSession::cookieStoragePartition const):
173             The only change here is the changed named of the call to
174             NetworkStorageSession::hasStorageAccessForFrame().
175         (WebCore::NetworkStorageSession::hasStorageAccessForFrame const):
176         (WebCore::NetworkStorageSession::grantStorageAccessForFrame):
177         (WebCore::NetworkStorageSession::removeStorageAccessForFrame):
178         (WebCore::NetworkStorageSession::isStorageAccessGranted const): Deleted.
179         (WebCore::NetworkStorageSession::setStorageAccessGranted): Deleted.
180         (WebCore::NetworkStorageSession::removeStorageAccess): Deleted.
181
182 2018-01-05  Youenn Fablet  <youenn@apple.com>
183
184         Implement Cache API partitioning based on ClientOrigin
185         https://bugs.webkit.org/show_bug.cgi?id=181240
186
187         Reviewed by Alex Christensen.
188
189         Covered by updated tests.
190
191         Previously, cache storage was partitioned according the origin of the client, represented as a String.
192         We now partition according both client and top origins, represented as a ClientOrigin
193
194         Minor refactoring to use more makePendingActivity.
195         Added support for IPC serialization of ClientOrigin.
196         Added SecurityOriginData::toString which is used by WebKit2 Cache Storage implementation.
197
198         * Modules/cache/CacheStorageConnection.cpp:
199         (WebCore::CacheStorageConnection::open):
200         (WebCore::CacheStorageConnection::retrieveCaches):
201         * Modules/cache/CacheStorageConnection.h:
202         (WebCore::CacheStorageConnection::clearMemoryRepresentation):
203         (WebCore::CacheStorageConnection::doOpen):
204         (WebCore::CacheStorageConnection::doRetrieveCaches):
205         * Modules/cache/DOMCacheStorage.cpp:
206         (WebCore::DOMCacheStorage::origin const):
207         (WebCore::DOMCacheStorage::retrieveCaches):
208         (WebCore::DOMCacheStorage::open):
209         (WebCore::DOMCacheStorage::remove):
210         * Modules/cache/DOMCacheStorage.h:
211         * Modules/cache/WorkerCacheStorageConnection.cpp:
212         (WebCore::WorkerCacheStorageConnection::doOpen):
213         (WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
214         * Modules/cache/WorkerCacheStorageConnection.h:
215         * page/ClientOrigin.h:
216         (WebCore::ClientOrigin::isolatedCopy const):
217         (WebCore::ClientOrigin::encode const):
218         (WebCore::ClientOrigin::decode):
219         * page/SecurityOriginData.cpp:
220         (WebCore::SecurityOriginData::toString const):
221         (WebCore::SecurityOriginData::debugString const): Deleted.
222         * page/SecurityOriginData.h:
223         (WebCore::SecurityOriginData::debugString const):
224         * testing/Internals.cpp:
225         (WebCore::Internals::clearCacheStorageMemoryRepresentation):
226
227 2018-01-05  Wenson Hsieh  <wenson_hsieh@apple.com>
228
229         [Attachment Support] Add a way to write blob data to a file URL from the UI process
230         https://bugs.webkit.org/show_bug.cgi?id=181236
231
232         Reviewed by Brady Eidson.
233
234         Add support for writing a blob to a designated file path. See comments below for more detail. No new tests, as
235         there change in behavior yet. See part 2: https://bugs.webkit.org/show_bug.cgi?id=181199.
236
237         * page/DragController.cpp:
238         (WebCore::DragController::dragAttachmentElement):
239         * platform/PromisedBlobInfo.h:
240
241         Remove PromisedBlobData entirely. This was added with the premise of having the web process deliver blob data to
242         the UI process. However, the new approach I'm taking just has the UI process tell the network process to write
243         a blob to a given location, so a data structure to deliver blob data over IPC is no longer necessary.
244
245         (WebCore::PromisedBlobData::hasData const): Deleted.
246         (WebCore::PromisedBlobData::hasFile const): Deleted.
247         (WebCore::PromisedBlobData::operator bool const): Deleted.
248         (WebCore::PromisedBlobData::fulfills const): Deleted.
249         * platform/network/BlobRegistryImpl.cpp:
250         (WebCore::BlobRegistryImpl::populateBlobsForFileWriting):
251
252         Introduce a new helper to build a list of blob data for file writing.
253
254         (WebCore::writeFilePathsOrDataBuffersToFile):
255
256         Introduce a new static helper to write blob data (a list of file paths and data buffers) to a given file handle.
257         Automatically closes the given file handle upon exit.
258
259         (WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles):
260         (WebCore::BlobRegistryImpl::writeBlobToFilePath):
261
262         Pull out common logic in writeBlobsToTemporaryFiles and writeBlobToFilePath into helper methods (see above), and
263         refactor both methods to use the helpers.
264
265         * platform/network/BlobRegistryImpl.h:
266
267 2018-01-05  Alex Christensen  <achristensen@webkit.org>
268
269         Forbid < and > in URL hosts
270         https://bugs.webkit.org/show_bug.cgi?id=181308
271         <rdar://problem/36012757>
272
273         Reviewed by Tim Horton.
274
275         https://url.spec.whatwg.org/#forbidden-host-code-point does not include these characters yet, but I think it should.
276         Firefox fails to parse URLs with < or > in the host.  Chrome percent encodes them.  Safari needs to do something.
277         The web platform tests are unclear on this case, and they will need to be updated with the specification.
278         They do show a change in behavior, though.
279
280         * platform/URLParser.cpp:
281         Add < and > to the list of forbidden host code points.
282
283 2018-01-05  Eric Carlson  <eric.carlson@apple.com>
284
285         [MediaStream] Add Mac screen capture source
286         https://bugs.webkit.org/show_bug.cgi?id=181333
287         <rdar://problem/36323219>
288
289         Reviewed by Dean Jackson.
290
291         * SourcesCocoa.txt: Add ScreenDisplayCaptureSourceMac.mm.
292
293         * WebCore.xcodeproj/project.pbxproj: Ditto.
294
295         * platform/cocoa/CoreVideoSoftLink.cpp: Declare new constants used.
296         * platform/cocoa/CoreVideoSoftLink.h:
297
298         * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
299         (WebCore::displayReconfigurationCallBack): Call refreshCaptureDevices.
300         (WebCore::DisplayCaptureManagerCocoa::~DisplayCaptureManagerCocoa): Unregister for display
301         reconfiguration callbacks.
302         (WebCore::DisplayCaptureManagerCocoa::captureDevices): Register for display reconfigrations.
303         (WebCore::DisplayCaptureManagerCocoa::refreshCaptureDevices): Use CGActiveDisplayList to
304         get list of active screens.
305         (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): Validate screen
306         ID, return CaptureDevice.
307         * platform/mediastream/mac/DisplayCaptureManagerCocoa.h:
308
309         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
310         (WebCore::VideoCaptureSourceFactoryMac::createVideoCaptureSource): Deal with screen capture
311         on macOS.
312
313         Implement Mac screen capture with CGDisplayStream.
314         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h: Added.
315         (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::~DisplaySurface):
316         (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::operator=):
317         (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::ioSurface const):
318         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: Added.
319         (WebCore::roundUpToMacroblockMultiple):
320         (WebCore::ScreenDisplayCaptureSourceMac::updateDisplayID):
321         (WebCore::ScreenDisplayCaptureSourceMac::create):
322         (WebCore::ScreenDisplayCaptureSourceMac::ScreenDisplayCaptureSourceMac):
323         (WebCore::ScreenDisplayCaptureSourceMac::~ScreenDisplayCaptureSourceMac):
324         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
325         (WebCore::ScreenDisplayCaptureSourceMac::startProducingData):
326         (WebCore::ScreenDisplayCaptureSourceMac::stopProducingData):
327         (WebCore::ScreenDisplayCaptureSourceMac::sampleBufferFromPixelBuffer):
328         (WebCore::ScreenDisplayCaptureSourceMac::pixelBufferFromIOSurface):
329         (WebCore::ScreenDisplayCaptureSourceMac::generateFrame):
330         (WebCore::ScreenDisplayCaptureSourceMac::startDisplayStream):
331         (WebCore::ScreenDisplayCaptureSourceMac::applySize):
332         (WebCore::ScreenDisplayCaptureSourceMac::applyFrameRate):
333         (WebCore::ScreenDisplayCaptureSourceMac::commitConfiguration):
334         (WebCore::ScreenDisplayCaptureSourceMac::displayWasReconfigured):
335         (WebCore::ScreenDisplayCaptureSourceMac::displayReconfigurationCallBack):
336         (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable):
337
338 2018-01-05  Don Olmstead  <don.olmstead@sony.com>
339
340         [curl] Can't load file:// URL with a URL fragment identifier
341         https://bugs.webkit.org/show_bug.cgi?id=181170
342
343         Reviewed by Alex Christensen.
344
345         No new tests. No change in behavior.
346
347         * platform/network/curl/CurlRequest.cpp:
348         (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
349
350 2018-01-05  Don Olmstead  <don.olmstead@sony.com>
351
352         TextCodec uses std::array but does not include it
353         https://bugs.webkit.org/show_bug.cgi?id=181340
354
355         Reviewed by Alex Christensen.
356
357         No new tests. No change in behavior.
358
359         * platform/text/TextCodec.h:
360
361 2018-01-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
362
363         SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded() should do nothing if the property is not animating
364         https://bugs.webkit.org/show_bug.cgi?id=181316
365         <rdar://problem/36147545>
366
367         Reviewed by Simon Fraser.
368
369         This is a speculative change to fix a crash which appeared after r226065.
370         The crash is very intermittent and sometimes very hard to reproduce. The
371         basic code analysis did not show how this crash can even happen.
372
373         * svg/SVGAnimatedTypeAnimator.h:
374         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues): For SVG property
375         with two values, e.g. <SVGAngleValue, SVGMarkerOrientType>,  we need to
376         detach the wrappers of the animated property if the animated values are
377         going to change. This is similar to what we did in resetFromBaseValue().
378
379         * svg/properties/SVGAnimatedListPropertyTearOff.h:
380         (WebCore::SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded):
381
382 2018-01-05  Matt Lewis  <jlewis3@apple.com>
383
384         Unreviewed, rolling out r226401.
385
386         This caused timeouts on multiple platforms.
387
388         Reverted changeset:
389
390         "Implement Cache API partitioning based on ClientOrigin"
391         https://bugs.webkit.org/show_bug.cgi?id=181240
392         https://trac.webkit.org/changeset/226401
393
394 2018-01-05  Dan Bernstein  <mitz@apple.com>
395
396         Fixed the build following AppKit API deprecations in a recent SDKs
397
398         * platform/mac/PasteboardMac.mm:
399         (WebCore::setDragImageImpl): Suppressed deprecation warnings.
400         * platform/mac/WidgetMac.mm:
401         (WebCore::Widget::paint): Ditto.
402
403 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
404
405         ServiceWorkers: Enable UserTiming / ResourceTiming
406         https://bugs.webkit.org/show_bug.cgi?id=181297
407         <rdar://problem/36307306>
408
409         Reviewed by Youenn Fablet.
410
411         Tests: http/tests/workers/service/service-worker-resource-timing.https.html
412                http/tests/workers/service/service-worker-user-timing.https.html
413
414         * loader/ResourceTiming.cpp:
415         (WebCore::ResourceTiming::ResourceTiming):
416         We used to clear extra NetworkLoadMetrics data early on. However,
417         for Workers we want to pass the complete NetworkLoadMetrics to
418         the Worker so that a Worker inspector has access to it.
419
420         * page/PerformanceResourceTiming.cpp:
421         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
422         Instead move the clearing of extra data to here, when the NetworkLoadMetrics
423         have finally settled into being used only for a performance entry.
424
425 2018-01-04  Philippe Normand  <pnormand@igalia.com>
426
427         [EME][GStreamer] Fix wrong ifdef
428         https://bugs.webkit.org/show_bug.cgi?id=181289
429
430         Reviewed by Alex Christensen.
431
432         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
433         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove the
434         ENCRYPTED_MEDIA ifdef from the VIDEO_TRACK ifdef block. Both have
435         nothing to do together.
436
437 2018-01-05  Fujii Hironori  <Hironori.Fujii@sony.com>
438
439         [Cairo] Canvas: Path::clear should clear its transform
440         https://bugs.webkit.org/show_bug.cgi?id=181320
441
442         Reviewed by Carlos Garcia Campos.
443
444         Path of Cairo port has its cairo context. Path::clear() didn't
445         clear the transform matrix of the context.
446
447         Test: fast/canvas/reset-scaling-by-height-change.html
448
449         * platform/graphics/cairo/PathCairo.cpp:
450         (WebCore::Path::clear): Reset the transform matrix of Path.
451
452 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
453
454         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
455         https://bugs.webkit.org/show_bug.cgi?id=180770
456
457         Reviewed by Joseph Pecoraro.
458
459         No change in functionality.
460
461         * html/HTMLCanvasElement.h:
462         * html/HTMLCanvasElement.cpp:
463         (WebCore::HTMLCanvasElement::createContext2d):
464         (WebCore::HTMLCanvasElement::createContextWebGL):
465         (WebCore::HTMLCanvasElement::createContextWebGPU):
466         (WebCore::HTMLCanvasElement::createContextBitmapRenderer):
467         (WebCore::HTMLCanvasElement::reset):
468         (WebCore::HTMLCanvasElement::paint):
469         (WebCore::HTMLCanvasElement::setImageBuffer const):
470         (WebCore::HTMLCanvasElement::addObserver): Deleted.
471         (WebCore::HTMLCanvasElement::removeObserver): Deleted.
472         (WebCore::HTMLCanvasElement::cssCanvasClients): Deleted.
473         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
474         * html/OffscreenCanvas.h:
475         * html/canvas/CanvasRenderingContext.h:
476         * html/canvas/CanvasRenderingContext.cpp:
477         * html/canvas/CanvasRenderingContext2D.h:
478         * html/canvas/CanvasRenderingContext2D.cpp:
479         (WebCore::CanvasRenderingContext2D::create):
480         * html/canvas/CanvasRenderingContext2DBase.h:
481         * html/canvas/ImageBitmapRenderingContext.h:
482         * html/canvas/ImageBitmapRenderingContext.cpp:
483         (WebCore::ImageBitmapRenderingContext::create):
484         * html/canvas/WebGL2RenderingContext.h:
485         * html/canvas/WebGL2RenderingContext.cpp:
486         (WebCore::WebGL2RenderingContext::create):
487         * html/canvas/WebGLRenderingContext.h:
488         * html/canvas/WebGLRenderingContext.cpp:
489         (WebCore::WebGLRenderingContext::create):
490         * html/canvas/WebGLRenderingContextBase.h:
491         * html/canvas/WebGLRenderingContextBase.cpp:
492         (WebCore::WebGLRenderingContextBase::create):
493         * html/canvas/WebGPURenderingContext.cpp:
494         (WebCore::WebGPURenderingContext::create):
495         Instead of adding didCreateCanvasRenderingContext calls at the construction sites of each
496         context, we can make the constructors private and force the usage of static `create` functions.
497         This way, we have access to the fully constructed object and have a guaranteed path for creation.
498
499         * html/CanvasBase.h:
500         * html/CanvasBase.cpp:
501         (WebCore::CanvasBase::~CanvasBase):
502         (WebCore::CanvasBase::renderingContext const):
503         (WebCore::CanvasBase::addObserver):
504         (WebCore::CanvasBase::removeObserver):
505         (WebCore::CanvasBase::notifyObserversCanvasChanged):
506         (WebCore::CanvasBase::notifyObserversCanvasResized):
507         (WebCore::CanvasBase::notifyObserversCanvasDestroyed):
508         (WebCore::CanvasBase::cssCanvasClients const):
509         * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
510         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
511         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasDestroyed):
512         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):
513         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
514         * css/CSSCanvasValue.h:
515         Move the CanvasObserver class to CanvasBase so that it can also be used for OffscreenCanvas.
516
517         * inspector/InspectorInstrumentation.h:
518         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
519         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
520         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
521         (WebCore::InspectorInstrumentation::recordCanvasAction):
522         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
523         (WebCore::InspectorInstrumentation::didEnableExtension):
524         (WebCore::InspectorInstrumentation::didCreateProgram):
525         (WebCore::InspectorInstrumentation::willDeleteProgram):
526         (WebCore::InspectorInstrumentation::isShaderProgramDisabled):
527         (WebCore::InspectorInstrumentation::consoleStartRecordingCanvas):
528         (WebCore::InspectorInstrumentation::didCreateCSSCanvas): Deleted.
529         * inspector/InspectorInstrumentation.cpp:
530         (WebCore::InspectorInstrumentation::consoleStartRecordingCanvasImpl):
531         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
532         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
533         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
534         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
535         (WebCore::InspectorInstrumentation::didEnableExtensionImpl):
536         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
537         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl): Deleted.
538
539         * inspector/agents/InspectorCanvasAgent.h:
540         * inspector/agents/InspectorCanvasAgent.cpp:
541         (WebCore::InspectorCanvasAgent::enable):
542         (WebCore::InspectorCanvasAgent::requestNode):
543         (WebCore::InspectorCanvasAgent::requestContent):
544         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
545         (WebCore::contextAsScriptValue):
546         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
547         (WebCore::InspectorCanvasAgent::startRecording):
548         (WebCore::InspectorCanvasAgent::stopRecording):
549         (WebCore::InspectorCanvasAgent::updateShader):
550         (WebCore::InspectorCanvasAgent::frameNavigated):
551         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
552         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
553         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
554         (WebCore::InspectorCanvasAgent::recordCanvasAction):
555         (WebCore::InspectorCanvasAgent::canvasDestroyed):
556         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
557         (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
558         (WebCore::InspectorCanvasAgent::didEnableExtension):
559         (WebCore::InspectorCanvasAgent::didCreateProgram):
560         (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired):
561         (WebCore::InspectorCanvasAgent::clearCanvasData):
562         (WebCore::InspectorCanvasAgent::unbindCanvas):
563         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
564         (WebCore::InspectorCanvasAgent::unbindProgram):
565         (WebCore::InspectorCanvasAgent::didCreateCSSCanvas): Deleted.
566
567         * inspector/InspectorCanvas.h:
568         * inspector/InspectorCanvas.cpp:
569         (WebCore::InspectorCanvas::create):
570         (WebCore::InspectorCanvas::InspectorCanvas):
571         (WebCore::InspectorCanvas::canvasElement):
572         (WebCore::InspectorCanvas::resetRecordingData):
573         (WebCore::InspectorCanvas::recordAction):
574         (WebCore::InspectorCanvas::buildObjectForCanvas):
575         (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
576         (WebCore::InspectorCanvas::buildInitialState):
577         (WebCore::InspectorCanvas::~InspectorCanvas): Deleted.
578
579         * inspector/InspectorShaderProgram.h:
580         * inspector/InspectorShaderProgram.cpp:
581         (WebCore::InspectorShaderProgram::context const):
582
583         * page/PageConsoleClient.cpp:
584         (WebCore::PageConsoleClient::record):
585         (WebCore::PageConsoleClient::recordEnd):
586
587         * dom/Document.h:
588         * dom/Document.cpp:
589         (WebCore::Document::getCSSCanvasElement):
590         (WebCore::Document::nameForCSSCanvasElement const):
591         We have no reason to save the CSS canvas name for each InspectorCanvas object, so instead we
592         can just query for the name based on the CanvasRenderingContext's HTMLCanvasElement (assuming
593         it is not an OffscreenCanvas) when we need it.
594
595 2018-01-04  Chris Fleizach  <cfleizach@apple.com>
596
597         AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties
598         https://bugs.webkit.org/show_bug.cgi?id=180361
599
600         Reviewed by Zalan Bujtas.
601
602         Change speak -> speakAs, and allow a combination of properties.
603
604         Tests: Updated accessibility/mac/css-speech-speak.html
605
606         * accessibility/AccessibilityObject.h:
607         (WebCore::AccessibilityObject::speakAsProperty const):
608         (WebCore::AccessibilityObject::speakProperty const): Deleted.
609         * accessibility/AccessibilityRenderObject.cpp:
610         (WebCore::AccessibilityRenderObject::speakAsProperty const):
611         (WebCore::AccessibilityRenderObject::speakProperty const): Deleted.
612         * accessibility/AccessibilityRenderObject.h:
613         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
614         (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]):
615         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
616         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
617         (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
618         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
619         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
620         * css/CSSComputedStyleDeclaration.cpp:
621         (WebCore::speakAsToCSSValue):
622         (WebCore::ComputedStyleExtractor::propertyValue):
623         * css/CSSPrimitiveValueMappings.h:
624         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
625         (WebCore::CSSPrimitiveValue::operator ESpeakAs const):
626         (WebCore::CSSPrimitiveValue::operator ESpeak const): Deleted.
627         * css/CSSProperties.json:
628         * css/StyleBuilderConverter.h:
629         (WebCore::StyleBuilderConverter::convertSpeakAs):
630         * css/parser/CSSParserFastPaths.cpp:
631         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
632         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
633         * css/parser/CSSPropertyParser.cpp:
634         (WebCore::consumeSpeakAs):
635         (WebCore::CSSPropertyParser::parseSingleValue):
636         * rendering/style/RenderStyle.h:
637         (WebCore::RenderStyle::speakAs const):
638         (WebCore::RenderStyle::setSpeakAs):
639         (WebCore::RenderStyle::initialSpeakAs):
640         (WebCore::RenderStyle::speak const): Deleted.
641         (WebCore::RenderStyle::setSpeak): Deleted.
642         (WebCore::RenderStyle::initialSpeak): Deleted.
643         * rendering/style/RenderStyleConstants.h:
644         (WebCore::operator| ):
645         (WebCore::operator|= ):
646         * rendering/style/StyleRareInheritedData.cpp:
647         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
648         (WebCore::StyleRareInheritedData::operator== const):
649         * rendering/style/StyleRareInheritedData.h:
650
651 2018-01-04  Brian Burg  <bburg@apple.com>
652
653         Web Inspector: Capture Element Screenshot looks fuzzy
654         https://bugs.webkit.org/show_bug.cgi?id=175734
655         <rdar://problem/33803377>
656
657         Reviewed by Joseph Pecoraro and Simon Fraser.
658
659         Screenshots taken by Web Inspector were being downscaled from the
660         internal size to the logical size, causing them to be blurry when
661         later upscaled to the internal size.
662
663         Replace ScaleBehavior { Scaled, Unscaled } with PreserveResolution { No, Yes }.
664         This is a lot less confusing to read both inside ImageBuffer and at its use sites.
665
666         Remove unused CoordinateSystem argument for ImageBuffer::toDataURL,
667         and replace it with PreserveResolution. Plumb PreserveResolution into toCFData
668         so that PreserveResolution::Yes will preserve the internal size of
669         the image buffer, just as it does in other methods that take PreserveResolution.
670
671         At the use site in InspectorPageAgent, always request PreserveResolution::Yes snapshots
672         when taking an element screenshot. For now, keep using downscaled (smaller)
673         snapshots when capturing canvas previews, as the previews are not full-size.
674
675         Test: inspector/page/hidpi-snapshot-size.html
676
677         * html/HTMLCanvasElement.cpp:
678         (WebCore::HTMLCanvasElement::makePresentationCopy):
679         (WebCore::HTMLCanvasElement::copiedImage const):
680         * html/canvas/CanvasRenderingContext2DBase.cpp:
681         (WebCore::CanvasRenderingContext2DBase::createPattern):
682         * inspector/agents/InspectorPageAgent.cpp:
683         (WebCore::InspectorPageAgent::snapshotNode):
684         (WebCore::InspectorPageAgent::snapshotRect):
685         * page/TextIndicator.cpp:
686         (WebCore::takeSnapshot):
687         * platform/DragImage.cpp:
688         (WebCore::createDragImageFromSnapshot):
689         * platform/graphics/BitmapImage.cpp:
690         (WebCore::BitmapImage::drawPattern):
691         * platform/graphics/ImageBuffer.h:
692         * platform/graphics/cairo/ImageBufferCairo.cpp:
693         (WebCore::ImageBuffer::sinkIntoImage):
694         (WebCore::ImageBuffer::copyImage const):
695         (WebCore::ImageBuffer::toDataURL const):
696         * platform/graphics/cg/ImageBufferCG.cpp:
697         (WebCore::createBitmapImageAfterScalingIfNeeded):
698         (WebCore::ImageBuffer::copyImage const):
699         (WebCore::ImageBuffer::sinkIntoImage):
700         (WebCore::ImageBuffer::toDataURL const):
701         (WebCore::ImageBuffer::toData const):
702         (WebCore::ImageBuffer::toCFData const):
703         * platform/graphics/gtk/ImageBufferGtk.cpp:
704         (WebCore::ImageBuffer::toDataURL const):
705         * platform/graphics/win/ImageBufferDirect2D.cpp:
706         (WebCore::ImageBuffer::copyImage const):
707         (WebCore::ImageBuffer::sinkIntoImage):
708         (WebCore::ImageBuffer::toDataURL const):
709         * svg/graphics/SVGImage.cpp:
710         (WebCore::SVGImage::drawPatternForContainer):
711
712 2018-01-04  John Wilander  <wilander@apple.com>
713
714         Storage Access API: Turn feature on by default in Settings.yaml
715         https://bugs.webkit.org/show_bug.cgi?id=181298
716         <rdar://problem/36302506>
717
718         Reviewed by Brent Fulgham.
719
720         No new tests. This is just a feature settings change.
721
722         * page/Settings.yaml:
723
724 2018-01-04  Zalan Bujtas  <zalan@apple.com>
725
726         WebContent process crashes while loading https://www.classicspecs.com
727         https://bugs.webkit.org/show_bug.cgi?id=181290
728         <rdar://problem/36225906>
729
730         Reviewed by Simon Fraser.
731
732         Floats can overhang multiple blocks (they are called intruding floats).
733         Each block keeps track of such intruding floats. When an overhanging float box is destroyed,
734         we need to deregister it from all those blocks. We do it by walking up the ancestor block chain
735         and check if the parent (grandparent etc) block still contains this float. Once we find the topmost block, 
736         we start deregistering it by traversing back on the descendant blocks.
737         Normally we do it in RenderElement::takeChildInternal right before the box is getting detached.
738         However in certain cases (like when the float's parent happens to be an anonymous wrapper)
739         by the time we get to ::takeChildInternal the subtree is already detached and we can't access all the
740         ancestors.
741         This patch ensure that the floating box is still attached during de-registration. 
742
743         Test: fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html
744
745         * rendering/RenderObject.cpp:
746         (WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
747
748 2018-01-04  Eric Carlson  <eric.carlson@apple.com>
749
750         [MediaStream] Add Mock screen capture source
751         https://bugs.webkit.org/show_bug.cgi?id=181291
752         <rdar://problem/36298164>
753
754         Reviewed by Dean Jackson.
755
756         Tests:  http/tests/media/media-stream/get-display-media-prompt.html
757                 GetDisplayMediaTest.BasicPrompt
758                 GetDisplayMediaTest.Constraints
759
760         * Modules/mediastream/MediaDevices.cpp:
761         (WebCore::MediaDevices::MediaDevices): Add static_assert to ensure MediaDevices::DisplayCaptureSurfaceType
762         and RealtimeMediaSourceSettings::DisplaySurfaceType values are equivalent.
763         (WebCore::MediaDevices::getSupportedConstraints): Remove bogus code.
764         * Modules/mediastream/MediaDevices.h: Add DisplayCaptureSurfaceType.
765         * Modules/mediastream/MediaDevices.idl: Ditto.
766
767         * Modules/mediastream/MediaStreamTrack.cpp:
768         (WebCore::MediaStreamTrack::getSettings const): Add a FIXME.
769         * Modules/mediastream/MediaStreamTrack.h: Add displaySurface and logicalSurface.
770
771         * Modules/mediastream/MediaTrackSupportedConstraints.h: Remove displaySurface and logicalSurface.
772         * Modules/mediastream/MediaTrackSupportedConstraints.idl:
773
774         * SourcesCocoa.txt: Add DisplayCaptureManagerCocoa.cpp and DisplayCaptureSourceCocoa.cpp.
775
776         * WebCore.xcodeproj/project.pbxproj: Ditto.
777
778         * platform/mediastream/CaptureDevice.h:
779         (WebCore::CaptureDevice::encode const): Add.
780         (WebCore::CaptureDevice::decode):
781
782         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
783         (WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices): Include display capture "devices".
784         (WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Deal with display capture devices.
785         (WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID): Ditto.
786         * platform/mediastream/RealtimeMediaSourceCenter.h:
787
788         * platform/mediastream/RealtimeMediaSourceSettings.h:
789         (WebCore::RealtimeMediaSourceSettings::displaySurface const): Return a DisplaySurfaceType.
790         (WebCore::RealtimeMediaSourceSettings::setDisplaySurface): Take a DisplaySurfaceType.
791
792         * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
793         (WebCore::DisplayCaptureManagerCocoa::singleton):
794         (WebCore::DisplayCaptureManagerCocoa::~DisplayCaptureManagerCocoa):
795         (WebCore::DisplayCaptureManagerCocoa::captureDevices):
796         (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID):
797         (WebCore::DisplayCaptureManagerCocoa::captureDeviceWithPersistentID):
798         * platform/mediastream/mac/DisplayCaptureManagerCocoa.h:
799
800         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: Added.
801         (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa):
802         (WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
803         (WebCore::DisplayCaptureSourceCocoa::capabilities const):
804         (WebCore::DisplayCaptureSourceCocoa::settings const):
805         (WebCore::DisplayCaptureSourceCocoa::settingsDidChange):
806         (WebCore::DisplayCaptureSourceCocoa::startProducingData):
807         (WebCore::DisplayCaptureSourceCocoa::stopProducingData):
808         (WebCore::DisplayCaptureSourceCocoa::elapsedTime):
809         (WebCore::DisplayCaptureSourceCocoa::applyFrameRate):
810         (WebCore::DisplayCaptureSourceCocoa::emitFrame):
811         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
812
813         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
814         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureDeviceManager): New.
815         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
816
817         * platform/mock/MockRealtimeMediaSource.cpp:
818         (WebCore::deviceMap): Add screen capture "devices".
819         (WebCore::MockRealtimeMediaSource::displayDevices): New.
820         * platform/mock/MockRealtimeMediaSource.h:
821
822         * platform/mock/MockRealtimeMediaSourceCenter.cpp: Clean up includes.
823         * platform/mock/MockRealtimeMediaSourceCenter.h:
824
825         * platform/mock/MockRealtimeVideoSource.cpp:
826         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Mock two screen devices.
827         (WebCore::MockRealtimeVideoSource::updateSettings): Deal with mock screens.
828         (WebCore::MockRealtimeVideoSource::initializeCapabilities): Ditto.
829         (WebCore::MockRealtimeVideoSource::initializeSupportedConstraints): Ditto.
830         (WebCore::MockRealtimeVideoSource::drawText): Ditto.
831         (WebCore::MockRealtimeVideoSource::generateFrame): Ditto.
832         * platform/mock/MockRealtimeVideoSource.h:
833         (WebCore::MockRealtimeVideoSource::mockCamera const):
834         (WebCore::MockRealtimeVideoSource::mockScreen const):
835
836 2018-01-04  Youenn Fablet  <youenn@apple.com>
837
838         FetchResponse should set its internal response text encoding name
839         https://bugs.webkit.org/show_bug.cgi?id=181284
840
841         Reviewed by Alex Christensen.
842
843         Covered by rebased test.
844
845         * Modules/fetch/FetchResponse.cpp:
846         (WebCore::FetchResponse::create): Set response text encoding based on content type charset.
847
848 2018-01-04  John Wilander  <wilander@apple.com>
849
850         Storage Access API: Remove JavaScript confirm() prompt from Document::requestStorageAccess()
851         https://bugs.webkit.org/show_bug.cgi?id=181276
852         <rdar://problem/36290463>
853
854         Reviewed by Alex Christensen.
855
856         No new tests. Existing test expectations updated.
857
858         * dom/Document.cpp:
859         (WebCore::Document::requestStorageAccess):
860
861 2018-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>
862
863         [GTK] Issues with Ahem's ex / x-height
864         https://bugs.webkit.org/show_bug.cgi?id=180581
865
866         Reviewed by Michael Catanzaro.
867
868         Get the x-height value from the TT_OS2 table if available.
869
870         Fixes: fast/text/break-word-pre-wrap.html
871                imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html
872
873         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
874         (WebCore::Font::platformInit):
875
876 2018-01-04  Philippe Normand  <pnormand@igalia.com>
877
878         Unreviewed, GTK build fix attempt after r226357
879
880         * platform/graphics/gstreamer/GStreamerUtilities.h: The
881         GST_BUFFER_DTS_OR_PTS macro was added in GStreamer 1.8 but old
882         versions of Debian might not have this release yet.
883
884 2018-01-04  Youenn Fablet  <youenn@apple.com>
885
886         Implement Cache API partitioning based on ClientOrigin
887         https://bugs.webkit.org/show_bug.cgi?id=181240
888
889         Reviewed by Alex Christensen.
890
891         Covered by updated tests.
892
893         Previously, cache storage was partitioned according the origin of the client, represented as a String.
894         We now partition according both client and top origins, represented as a ClientOrigin
895
896         Minor refactoring to use more makePendingActivity.
897         Added support for IPC serialization of ClientOrigin.
898         Added SecurityOriginData::toString which is used by WebKit2 Cache Storage implementation.
899
900         * Modules/cache/CacheStorageConnection.cpp:
901         (WebCore::CacheStorageConnection::open):
902         (WebCore::CacheStorageConnection::retrieveCaches):
903         * Modules/cache/CacheStorageConnection.h:
904         (WebCore::CacheStorageConnection::clearMemoryRepresentation):
905         (WebCore::CacheStorageConnection::doOpen):
906         (WebCore::CacheStorageConnection::doRetrieveCaches):
907         * Modules/cache/DOMCacheStorage.cpp:
908         (WebCore::DOMCacheStorage::origin const):
909         (WebCore::DOMCacheStorage::retrieveCaches):
910         (WebCore::DOMCacheStorage::open):
911         (WebCore::DOMCacheStorage::remove):
912         * Modules/cache/DOMCacheStorage.h:
913         * Modules/cache/WorkerCacheStorageConnection.cpp:
914         (WebCore::WorkerCacheStorageConnection::doOpen):
915         (WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
916         * Modules/cache/WorkerCacheStorageConnection.h:
917         * page/ClientOrigin.h:
918         (WebCore::ClientOrigin::isolatedCopy const):
919         (WebCore::ClientOrigin::encode const):
920         (WebCore::ClientOrigin::decode):
921         * page/SecurityOriginData.cpp:
922         (WebCore::SecurityOriginData::toString const):
923         (WebCore::SecurityOriginData::debugString const): Deleted.
924         * page/SecurityOriginData.h:
925         (WebCore::SecurityOriginData::debugString const):
926         * testing/Internals.cpp:
927         (WebCore::Internals::clearCacheStorageMemoryRepresentation):
928
929 2018-01-04  Youenn Fablet  <youenn@apple.com>
930
931         Service Worker should expose redirect mode for navigation loads as manual
932         https://bugs.webkit.org/show_bug.cgi?id=181067
933
934         Reviewed by Alex Christensen.
935
936         Covered by rebased tests.
937
938         * loader/CrossOriginAccessControl.cpp: Removing ContentType header only if affecting CORS checks.
939         This allows extending header filtering in service worker to all modes, including Navigate.
940         * workers/service/context/ServiceWorkerFetch.cpp:
941         (WebCore::ServiceWorkerFetch::dispatchFetchEvent): Ideally, document loading code should set redirect to manual.
942         Since it is not the case yet and that would require changes to various places, manual is set before exposing the corresponding fetch event.
943
944 2018-01-04  Youenn Fablet  <youenn@apple.com>
945
946         ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope should be a no-op if worker is being terminated
947         https://bugs.webkit.org/show_bug.cgi?id=181245
948
949         Reviewed by Alex Christensen.
950
951         Stop appending tasks to a terminating worker and returning false in that case.
952         This mirrors what is done for regular workers.
953
954         * workers/service/context/SWContextManager.cpp:
955         (WebCore::SWContextManager::terminateWorker):
956         * workers/service/context/ServiceWorkerThreadProxy.cpp:
957         (WebCore::ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope):
958         * workers/service/context/ServiceWorkerThreadProxy.h:
959
960 2018-01-04  Youenn Fablet  <youenn@apple.com>
961
962         Cancel pending script loads when service worker is being terminated
963         https://bugs.webkit.org/show_bug.cgi?id=181250
964
965         Reviewed by Alex Christensen.
966
967         Covered by service worker tests no longer crashing in ASAN builds.
968
969         * workers/WorkerScriptLoader.cpp:
970         (WebCore::WorkerScriptLoader::notifyFinished): Clearing loader when finished.
971         (WebCore::WorkerScriptLoader::cancel): Implementing cancel of a script loader by cancelling the underlying threadable loader.
972         * workers/WorkerScriptLoader.h:
973         * workers/service/ServiceWorkerContainer.cpp: Canceling loads of all pending jobs.
974         (WebCore::ServiceWorkerContainer::stop):
975         * workers/service/ServiceWorkerJob.cpp:
976         (WebCore::ServiceWorkerJob::cancelPendingLoad):
977         * workers/service/ServiceWorkerJob.h:
978
979 2018-01-04  Youenn Fablet  <youenn@apple.com>
980
981         Implement  https://fetch.spec.whatwg.org/#main-fetch default referrer policy setting
982         https://bugs.webkit.org/show_bug.cgi?id=181239
983
984         Reviewed by Alex Christensen.
985
986         Covered by updated and rebased test.
987
988         Setting the request referrer policy to the Document referrer policy if no one is set.
989         If Document has no referrer policy, use no-referrer-when-downgrade as per the spec.
990
991         * loader/cache/CachedResourceLoader.cpp:
992         (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
993         (WebCore::CachedResourceLoader::requestResource):
994         * loader/cache/CachedResourceLoader.h:
995         * loader/cache/CachedResourceRequest.cpp:
996         (WebCore::CachedResourceRequest::updateReferrerPolicy):
997         (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
998         * loader/cache/CachedResourceRequest.h:
999
1000 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1001
1002         [Attachment Support] Create attachment elements when dropping files on iOS
1003         https://bugs.webkit.org/show_bug.cgi?id=181192
1004         <rdar://problem/36280945>
1005
1006         Reviewed by Tim Horton.
1007
1008         Implements support for dropping data as attachment elements on iOS. See comments below for more detail.
1009
1010         Tests:  WKAttachmentTests.InsertDroppedRichAndPlainTextFilesAsAttachments
1011                 WKAttachmentTests.InsertDroppedZipArchiveAsAttachment
1012                 WKAttachmentTests.InsertDroppedItemProvidersInOrder
1013
1014         * WebCore.xcodeproj/project.pbxproj:
1015         * editing/WebContentReader.cpp:
1016         (WebCore::WebContentReader::ensureFragment):
1017
1018         Add a new helper to create the WebContentReader's fragment, if it hasn't already been created.
1019
1020         * editing/WebContentReader.h:
1021         * editing/cocoa/WebContentReaderCocoa.mm:
1022         (WebCore::WebContentReader::readFilePaths):
1023
1024         Rename readFilenames to readFilePaths (which better reflects its parameters, which are file paths). Also, move
1025         the implementation of readFilePaths to shared iOS/macOS code in WebContentReaderCocoa, and remove the stub
1026         implementation on iOS.
1027
1028         There's a bit of code here that I kept macOS-only which deals with inserting file paths as plain text in
1029         editable areas, but it's unclear to me why and if WebKit clients currently find this useful, so I left a FIXME
1030         to investigate removing this altogether. Code for handling this plain text insertion of file paths on Mac was
1031         introduced in r67403.
1032
1033         * editing/ios/WebContentReaderIOS.mm:
1034         (WebCore::WebContentReader::readFilenames): Deleted.
1035         * editing/mac/WebContentReaderMac.mm:
1036         (WebCore::WebContentReader::readFilenames): Deleted.
1037         * page/mac/DragControllerMac.mm:
1038         (WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod const):
1039
1040         Teach DragController to accept all types conforming to "public.item" and "public.content" on iOS, only when
1041         attachment elements are enabled. This allows us to load content from item providers that we otherwise would not
1042         have loaded, since we now have the ability to fall back to attachment element insertion if the type is not have
1043         a default representation using standard web content.
1044
1045         * platform/Pasteboard.h:
1046         * platform/PasteboardItemInfo.h: Added.
1047         (WebCore::PasteboardItemInfo::encode const):
1048         (WebCore::PasteboardItemInfo::decode):
1049
1050         Add PasteboardItemInfo, a struct that describes an item on the pasteboard. Also, implement encoding and decoding
1051         support for PasteboardItemInfo. So far, the item info only describes file information about the pasteboard item,
1052         and flags indicating whether the item prefers attachment or inline presentation.
1053
1054         * platform/PasteboardStrategy.h:
1055
1056         Replace getFilenamesForDataInteraction with informationForItemAtIndex. Instead of returning all of the file
1057         paths associated with any item on the pasteboard, fetch a PasteboardItemInfo at a given item index, which
1058         includes information about the file path as well as some other metadata we'll need when deciding how to read
1059         pasteboard contents as a document fragment.
1060
1061         * platform/PlatformPasteboard.h:
1062         * platform/cocoa/PasteboardCocoa.mm:
1063         (WebCore::Pasteboard::read):
1064         * platform/ios/AbstractPasteboard.h:
1065         * platform/ios/PasteboardIOS.mm:
1066         (WebCore::Pasteboard::read):
1067         (WebCore::Pasteboard::readRespectingUTIFidelities):
1068
1069         Teach the iOS Pasteboard to read web content using attachment elements, if enabled. There are two scenarios in
1070         which we would want to insert an attachment element:
1071         (1) The item provider uses a preferred presentation style of attachment, in which case we bail out of trying to
1072             handle the drop using the default mechanisms, and simply insert it as an attachment. We need this to deal
1073             with the case where we drop text or HTML files from the Files app, so that we don't try and insert the
1074             contents of the text or HTML as inline web content.
1075         (2) The item provider doesn't have a preferred attachment presentation style, but there's nothing WebKit would
1076             otherwise do with the dropped content, so insert an attachment element as a fallback. Examples where this is
1077             relevant are dropping a PDF or ZIP archive without attachment presentation style explicitly set.
1078         We first check if we fall into case (1). If so, we can bail early by inserting an attachment; otherwise, we
1079         proceed normally and see if we can read the contents of the drop as web content. If, at the end of default drop
1080         handling, we don't still have a way to represent the dropped content, enter case (2).
1081
1082         (WebCore::Pasteboard::readFilePaths):
1083         (WebCore::Pasteboard::readFilenames): Deleted.
1084
1085         Rename readFilenames to readFilePaths, and reimplement it using informationForItemAtIndex.
1086
1087         * platform/ios/PlatformPasteboardIOS.mm:
1088         (WebCore::pasteboardItemPresentationStyle):
1089         (WebCore::PlatformPasteboard::informationForItemAtIndex):
1090         (WebCore::PlatformPasteboard::filenamesForDataInteraction): Deleted.
1091
1092         Implement informationForItemAtIndex and remove filenamesForDataInteraction. As before, we ask the pasteboard
1093         (i.e. WebItemProviderPasteboard) for information about dropped file URLs. This time, we limit this to a single
1094         file, so we don't end up creating multiple attachment elements for each representation of a single item
1095         provider. See below for -preferredFileUploadURLAtIndex:fileType: for more detail.
1096
1097         * platform/ios/WebItemProviderPasteboard.h:
1098         * platform/ios/WebItemProviderPasteboard.mm:
1099         (-[WebItemProviderLoadResult initWithItemProvider:typesToLoad:]):
1100         (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
1101
1102         Remove this synthesized instance variable and instead just check the item provider's preferredPresentationStyle.
1103
1104         (-[WebItemProviderLoadResult description]):
1105
1106         Add a verbose -description to the load result object. Useful for debugging what was content was loaded from an
1107         item provider on drop.
1108
1109         (-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]):
1110
1111         Return the highest fidelity loaded type identifier for a given item.
1112
1113         (-[WebItemProviderPasteboard allDroppedFileURLs]):
1114         (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
1115
1116         Prefer flat RTFD to RTFD. In the case where attachments are enabled and we're accepting all types of content
1117         using attachment elements as a fallback representation, if the source writes attributed strings to the
1118         pasteboard with com.apple.rtfd at a higher fidelity than com.apple.flat-rtfd, we'll end up loading only
1119         com.apple.rtfd and dropping the text as an attachment element because we cannot convert the dropped content to
1120         markup. Instead, if flat RTFD is present in the item provider, always prefer that over RTFD so that dropping as
1121         regular web content isn't overridden when attachment elements are enabled.
1122
1123         (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
1124         (-[WebItemProviderPasteboard droppedFileURLs]): Deleted.
1125         * platform/mac/DragDataMac.mm:
1126         (WebCore::DragData::containsCompatibleContent const):
1127
1128         DragData::containsCompatibleContent should be true when attachment elements are enabled, and there are files we
1129         can drop as attachment elements.
1130
1131         * platform/mac/PasteboardMac.mm:
1132         (WebCore::Pasteboard::read):
1133         (WebCore::Pasteboard::readFilePaths):
1134         (WebCore::Pasteboard::readFilenames): Deleted.
1135
1136 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
1137
1138         Replace hard-coded paths in shebangs with #!/usr/bin/env
1139         https://bugs.webkit.org/show_bug.cgi?id=181040
1140
1141         Reviewed by Alex Christensen.
1142
1143         * bindings/scripts/InFilesCompiler.pm:
1144         * bindings/scripts/InFilesParser.pm:
1145         * bindings/scripts/generate-bindings-all.pl:
1146         * bindings/scripts/generate-bindings.pl:
1147         * bindings/scripts/preprocess-idls.pl:
1148         * css/make-css-file-arrays.pl:
1149         * css/makeprop.pl:
1150         * css/makevalues.pl:
1151         * dom/make_event_factory.pl:
1152         * dom/make_names.pl:
1153         * extract-localizable-strings.pl:
1154         * make-hash-tools.pl:
1155
1156 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1157
1158         [Attachment Support] Add plumbing for starting a drag with promised blob data
1159         https://bugs.webkit.org/show_bug.cgi?id=181201
1160
1161         Reviewed by Tim Horton.
1162
1163         Adds logic to allow dragging an attachment element as a file by sending promised blob information to the UI
1164         process. See comments below for more detail.
1165
1166         The only change in behavior is that dragging an attachment element will no longer write web content and injected
1167         bundle data to the pasteboard if the attachment element's file attribute is nonnull. This will cause one
1168         existing WK1 layout test to fail, but will otherwise not affect any attachment editing clients. On iOS,
1169         attachment elements in the Mail viewer can be dragged, but each attachment's file is null, so we fall back to
1170         current behavior; on macOS, Mail currently overrides the drag completely, beginning at -mouseDown:, so this
1171         doesn't make a difference to macOS Mail either.
1172
1173         * editing/Editor.h:
1174         * editing/cocoa/EditorCocoa.mm:
1175         (WebCore::Editor::getPasteboardTypesAndDataForAttachment):
1176
1177         Add a helper method to retrieve an attachment element as web archive data, for moving attachments within the
1178         same document. Also gives the injected editor bundle a chance to supply custom pasteboard types.
1179
1180         * loader/EmptyClients.cpp:
1181         * page/DragClient.h:
1182         (WebCore::DragClient::prepareToDragPromisedBlob):
1183
1184         Add new DragClient methods to send information about a promised blob to the UI process.
1185
1186         * page/DragController.cpp:
1187         (WebCore::DragController::startDrag):
1188
1189         Call dragAttachmentElement when starting a drag on an attachment element.
1190
1191         (WebCore::DragController::dragAttachmentElement):
1192
1193         Try to begin dragging a given attachment element, propagating promised blob information to the client layers.
1194         Returns true iff the attachment is backed by blob data (i.e. the file is nonnull).
1195
1196         * platform/PromisedBlobInfo.h:
1197
1198         Add a list of additional types and data to PromisedBlobInfo. In addition to the promised blob info, this would
1199         allow injected bundle data and other private types alongside the main attachment data on the pasteboard.
1200
1201 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
1202
1203         Remove the 'resolutionScale' parameter from ImageBufferDataCG get/putBytes
1204         https://bugs.webkit.org/show_bug.cgi?id=181268
1205
1206         Reviewed by Alex Christensen.
1207
1208         These functions were always called with resolutionScale=1.
1209
1210         * platform/graphics/cg/ImageBufferCG.cpp:
1211         (WebCore::ImageBuffer::getUnmultipliedImageData const):
1212         (WebCore::ImageBuffer::getPremultipliedImageData const):
1213         (WebCore::ImageBuffer::putByteArray):
1214         * platform/graphics/cg/ImageBufferDataCG.cpp:
1215         (WebCore::ImageBufferData::getData const):
1216         (WebCore::ImageBufferData::putData):
1217         (WebCore::affineWarpBufferData): Deleted.
1218         * platform/graphics/cg/ImageBufferDataCG.h:
1219
1220 2018-01-03  John Wilander  <wilander@apple.com>
1221
1222         Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
1223         https://bugs.webkit.org/show_bug.cgi?id=181270
1224         <rdar://problem/36289544>
1225
1226         Reviewed by Alex Christensen.
1227
1228         No new tests. Existing test re-enabled.
1229
1230         This change refactors how the web process tells the network process
1231         to remove storage access. Previously, this was done over the UI process
1232         just like requests for storage access. But since no further reasoning
1233         is needed, the message should go straight from the web process to the
1234         network process for performance reasons and to minimize the risk of a
1235         race.
1236
1237         As a consequence, the XPC code for storage access removal in the UI
1238         process is deleted.
1239
1240         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1241         (WebCore::NetworkStorageSession::cookieStoragePartition const):
1242             Removes the storageAccessAPIEnabled check since the flag
1243             doesn't get propagated when the network process is created.
1244             Figuring this out will take some work which is unnecessary
1245             when we already gate access to the feature in Document.idl.
1246
1247 2018-01-03  James Craig  <jcraig@apple.com>
1248
1249         AX: when invert colors is on, double-invert certain media elements in UserAgentStyleSheet
1250         https://bugs.webkit.org/show_bug.cgi?id=168447
1251         <rdar://problem/30559874>
1252
1253         Reviewed by Simon Fraser.
1254
1255         Double-invert video when platform 'invert colors' setting is enabled. Behavior matches 
1256         current 'Smart Invert' feature of Safari Reader on macOS/iOS and other iOS native apps.
1257
1258         Tests: accessibility/smart-invert-reference.html
1259                accessibility/smart-invert.html
1260
1261         * Modules/modern-media-controls/controls/media-controls.css:
1262         (@media (inverted-colors)):
1263         (:host):
1264         (picture):
1265         * css/html.css:
1266         (@media (inverted-colors)):
1267         (video):
1268
1269 2018-01-03  Youenn Fablet  <youenn@apple.com>
1270
1271         LayoutTest http/tests/media/media-stream/disconnected-frame.html to consistently fail an assertion: !m_adoptionIsRequired
1272         https://bugs.webkit.org/show_bug.cgi?id=181264
1273
1274         Reviewed by Eric Carlson.
1275
1276         Covered by http/tests/media/media-stream/disconnected-frame.html not crashing anymore in Debug builds.
1277         Calling suspendIfNeeded in create method instead of constructor.
1278
1279         * Modules/mediastream/UserMediaRequest.cpp:
1280         (WebCore::UserMediaRequest::create):
1281         (WebCore::UserMediaRequest::UserMediaRequest):
1282
1283 2018-01-03  Antti Koivisto  <antti@apple.com>
1284
1285         Remove DeprecatedCSSOMValue::equals
1286         https://bugs.webkit.org/show_bug.cgi?id=181241
1287
1288         Reviewed by Zalan Bujtas.
1289
1290         This is dead code.
1291
1292         * css/DeprecatedCSSOMValue.cpp:
1293         (WebCore::compareCSSOMValues): Deleted.
1294         (WebCore::DeprecatedCSSOMValue::equals const): Deleted.
1295         * css/DeprecatedCSSOMValue.h:
1296         (WebCore::DeprecatedCSSOMValue::operator== const): Deleted.
1297         (WebCore::DeprecatedCSSOMComplexValue::equals const): Deleted.
1298         * css/DeprecatedCSSOMValueList.cpp:
1299         (WebCore::DeprecatedCSSOMValueList::equals const): Deleted.
1300         * css/DeprecatedCSSOMValueList.h:
1301
1302 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
1303
1304         feLighting is broken with primitiveUnits="objectBoundingBox"
1305         https://bugs.webkit.org/show_bug.cgi?id=181197
1306
1307         Reviewed by Tim Horton.
1308
1309         With <filter primitiveUnits="objectBoundingBox"> we need to convert the coordinates
1310         of fePointLights and feSpotLights into user space coordinates. Following
1311         https://www.w3.org/TR/SVG/filters.html#FilterElementPrimitiveUnitsAttribute
1312         this is done by treating them as fractions of the bounding box on the referencing
1313         element, with treatment for z following https://www.w3.org/TR/SVG/coords.html#Units_viewport_percentage
1314         
1315         To do this, store the bounds of the referencing elemenet on SVGFilterBuilder as
1316         targetBoundingBox, and store the primitiveUnits type. Then do the conversion of lighting
1317         coordinates in SVGFESpecularLightingElement::build() and SVGFEDiffuseLightingElement::build().
1318
1319         Remove SVGFELightElement::findLightSource(), since we need to be able to pass the SVGFilterBuilder
1320         to the lightSource() function so hoist the code up.
1321
1322         Tests: svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg
1323                svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox.svg
1324                svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox-expected.svg
1325                svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox.svg
1326                svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg
1327                svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox.svg
1328
1329         * rendering/svg/RenderSVGResourceFilter.cpp:
1330         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
1331         * svg/SVGFEDiffuseLightingElement.cpp:
1332         (WebCore::SVGFEDiffuseLightingElement::build):
1333         * svg/SVGFEDistantLightElement.cpp:
1334         (WebCore::SVGFEDistantLightElement::lightSource const):
1335         * svg/SVGFEDistantLightElement.h:
1336         * svg/SVGFELightElement.cpp:
1337         (WebCore::SVGFELightElement::findLightSource): Deleted.
1338         * svg/SVGFELightElement.h:
1339         * svg/SVGFEPointLightElement.cpp:
1340         (WebCore::SVGFEPointLightElement::lightSource const):
1341         * svg/SVGFEPointLightElement.h:
1342         * svg/SVGFESpecularLightingElement.cpp:
1343         (WebCore::SVGFESpecularLightingElement::build):
1344         * svg/SVGFESpotLightElement.cpp:
1345         (WebCore::SVGFESpotLightElement::lightSource const):
1346         * svg/SVGFESpotLightElement.h:
1347         * svg/graphics/filters/SVGFilterBuilder.h:
1348         (WebCore::SVGFilterBuilder::setTargetBoundingBox):
1349         (WebCore::SVGFilterBuilder::targetBoundingBox const):
1350         (WebCore::SVGFilterBuilder::primitiveUnits const):
1351         (WebCore::SVGFilterBuilder::setPrimitiveUnits):
1352
1353 2018-01-03  Antti Koivisto  <antti@apple.com>
1354
1355         Crash beneath CSSValue::equals @ csas.cz
1356         https://bugs.webkit.org/show_bug.cgi?id=181243
1357         <rdar://problem/35990826>
1358
1359         Reviewed by Alex Christensen.
1360
1361         Test: fast/text/oblique-degree-equals-crash.html
1362
1363         * css/CSSFontStyleValue.cpp:
1364         (WebCore::CSSFontStyleValue::equals const):
1365
1366         Null check both oblique pointers.
1367
1368 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1369
1370         Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
1371         https://bugs.webkit.org/show_bug.cgi?id=180979
1372         <rdar://problem/36146670>
1373
1374         Reviewed by Matt Baker.
1375
1376         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1377         (fontNameIsSystemFont):
1378         (WebCore::FontCache::systemFontFamilies):
1379         Switch to the original Mac algorithm before r180979 that uses
1380         CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
1381         available on iOS but now it is. This is a performance improvement on
1382         both platforms, but significantly so on macOS. It also finds more,
1383         valid, family names.
1384
1385 2018-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
1386
1387         ASSERTION FAILED: !source || is<Target>(*source) in CoordinatedGraphicsLayer::removeFromParent
1388         https://bugs.webkit.org/show_bug.cgi?id=166568
1389
1390         Reviewed by Simon Fraser.
1391
1392         When a GraphicsLayer has a mask layer, it fails to properly unparent the mask layer before
1393         it is destroyed. This leaves the mask layer with a dangling parent pointer. Fix it, while
1394         taking care not to introduce yet another virtual function call during the execution of the
1395         destructor.
1396
1397         * platform/graphics/GraphicsLayer.cpp:
1398         (WebCore::GraphicsLayer::willBeDestroyed):
1399
1400 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
1401
1402         SVG lighting filter lights are in the wrong coordinate system
1403         https://bugs.webkit.org/show_bug.cgi?id=181147
1404
1405         Reviewed by Zalan Bujtas.
1406
1407         Point and spot light coordinates weren't being converted into buffer-relative
1408         coordinates before being fed into the lighting math, resulting in incorrect light
1409         rendering on Retina devices, and when the filter primitive region was clipped.
1410
1411         Fix by storing absoluteUnclippedSubregion on FilterEffect, which allows us to map
1412         lighting points from user space coordinates into the coordinates of the buffer being
1413         used for rendering. Also scale the light z coordinate by doing a dummy point mapping in x.
1414
1415         Rename members of PointLightSource and SpotLightSource to make it clear which coordinate
1416         system they are in.
1417
1418         Tests include HiDPI tests.
1419
1420         Tests: svg/filters/fePointLight-coordinates-expected.svg
1421                svg/filters/fePointLight-coordinates.svg
1422                svg/filters/feSpotLight-coordinates-expected.svg
1423                svg/filters/feSpotLight-coordinates.svg
1424                svg/filters/hidpi/fePointLight-coordinates-expected.svg
1425                svg/filters/hidpi/fePointLight-coordinates.svg
1426                svg/filters/hidpi/feSpotLight-coordinates-expected.svg
1427                svg/filters/hidpi/feSpotLight-coordinates.svg
1428
1429         * platform/graphics/FloatPoint3D.h: Make it easy to get and set the X and Y coords as a FloatPoint.
1430         (WebCore::FloatPoint3D::xy const):
1431         (WebCore::FloatPoint3D::setXY):
1432         * platform/graphics/GeometryUtilities.cpp:
1433         (WebCore::mapPoint):
1434         (WebCore::mapRect):
1435         * platform/graphics/GeometryUtilities.h: Helper to make a point between rects.
1436         * platform/graphics/filters/DistantLightSource.cpp:
1437         (WebCore::DistantLightSource::initPaintingData):
1438         * platform/graphics/filters/DistantLightSource.h:
1439         * platform/graphics/filters/FELighting.cpp:
1440         (WebCore::FELighting::drawLighting):
1441         * platform/graphics/filters/FilterEffect.cpp:
1442         (WebCore::FilterEffect::mapPointFromUserSpaceToBuffer const):
1443         * platform/graphics/filters/FilterEffect.h:
1444         (WebCore::FilterEffect::setUnclippedAbsoluteSubregion):
1445         * platform/graphics/filters/LightSource.h:
1446         * platform/graphics/filters/PointLightSource.cpp:
1447         (WebCore::PointLightSource::initPaintingData):
1448         (WebCore::PointLightSource::computePixelLightingData const):
1449         (WebCore::PointLightSource::setX):
1450         (WebCore::PointLightSource::setY):
1451         (WebCore::PointLightSource::setZ):
1452         * platform/graphics/filters/PointLightSource.h:
1453         (WebCore::PointLightSource::position const):
1454         (WebCore::PointLightSource::PointLightSource):
1455         * platform/graphics/filters/SpotLightSource.cpp:
1456         (WebCore::SpotLightSource::initPaintingData):
1457         (WebCore::SpotLightSource::computePixelLightingData const):
1458         (WebCore::SpotLightSource::setX):
1459         (WebCore::SpotLightSource::setY):
1460         (WebCore::SpotLightSource::setZ):
1461         (WebCore::SpotLightSource::setPointsAtX):
1462         (WebCore::SpotLightSource::setPointsAtY):
1463         (WebCore::SpotLightSource::setPointsAtZ):
1464         * platform/graphics/filters/SpotLightSource.h:
1465         (WebCore::SpotLightSource::position const):
1466         (WebCore::SpotLightSource::direction const):
1467         (WebCore::SpotLightSource::SpotLightSource):
1468         * rendering/svg/RenderSVGResourceFilter.cpp:
1469         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
1470         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1471         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
1472
1473 2018-01-03  Youenn Fablet  <youenn@apple.com>
1474
1475         Select service worker for documents with data/blob URLS
1476         https://bugs.webkit.org/show_bug.cgi?id=181213
1477
1478         Reviewed by Alex Christensen.
1479
1480         Covered by updated test.
1481
1482         Reusing the service worker of the parent for blob/data URL documents.
1483
1484         * loader/DocumentLoader.cpp:
1485         (WebCore::isLocalURL):
1486         (WebCore::DocumentLoader::commitData):
1487
1488 2018-01-03  Ryan Haddad  <ryanhaddad@apple.com>
1489
1490         Unreviewed, rolling out r226352.
1491
1492         Breaks Sierra and El Capitan builds.
1493
1494         Reverted changeset:
1495
1496         "Web Inspector: Slow open time enumerating system fonts
1497         (FontCache::systemFontFamilies)"
1498         https://bugs.webkit.org/show_bug.cgi?id=180979
1499         https://trac.webkit.org/changeset/226352
1500
1501 2018-01-03  Philippe Normand  <pnormand@igalia.com>
1502
1503         [GStreamer] The bus synchronous handler should be in the base player class
1504         https://bugs.webkit.org/show_bug.cgi?id=181237
1505
1506         Reviewed by Carlos Garcia Campos.
1507
1508         Because this is where video rendering is handled.
1509
1510         No new tests, this is only a refactoring.
1511
1512         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1513         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1514         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1515         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
1516
1517 2018-01-03  Philippe Normand  <pnormand@igalia.com>
1518
1519         [GStreamer] move MediaSample implementation out of mse/
1520         https://bugs.webkit.org/show_bug.cgi?id=179165
1521
1522         Reviewed by Carlos Garcia Campos.
1523
1524         This module isn't specific to MSE and can potentially be reused
1525         elsewhere, for WebRTC for instance. Additionally the
1526         ::platformSample() method was implemented and the code was cleaned up.
1527
1528         * platform/GStreamer.cmake:
1529         * platform/MediaSample.h:
1530         * platform/graphics/gstreamer/GStreamerMediaSample.cpp: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp.
1531         (WebCore::GStreamerMediaSample::platformSample):
1532         * platform/graphics/gstreamer/GStreamerMediaSample.h: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.h.
1533         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
1534         (WebCore::PlaybackPipeline::enqueueSample):
1535
1536 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1537
1538         Unreviewed. Fix resource load stats tests on GLib based ports after r226355.
1539
1540         The monitor can be created in the work queue thread too.
1541
1542         * platform/glib/FileMonitorGLib.cpp:
1543         (WebCore::FileMonitor::FileMonitor):
1544
1545 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1546
1547         [GTK] Crash destroying WebCore::FileMonitor
1548         https://bugs.webkit.org/show_bug.cgi?id=181138
1549
1550         Reviewed by Michael Catanzaro.
1551
1552         Ensure that platform file monitor is always created and destroyed in the work queue thread synchronously.
1553
1554         * platform/FileMonitor.h:
1555         * platform/glib/FileMonitorGLib.cpp:
1556         (WebCore::FileMonitor::FileMonitor):
1557         (WebCore::FileMonitor::~FileMonitor):
1558         (WebCore::FileMonitor::didChange):
1559
1560 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
1561
1562         Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
1563         https://bugs.webkit.org/show_bug.cgi?id=180979
1564         <rdar://problem/36146670>
1565
1566         Reviewed by Matt Baker.
1567
1568         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1569         (WebCore::FontCache::systemFontFamilies):
1570         Switch to the original Mac algorithm before r180979 that uses
1571         CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
1572         available on iOS but now it is. This is a performance improvement on
1573         both platforms, but significantly so on macOS. It also finds more,
1574         valid, family names.
1575
1576 2018-01-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1577
1578         Unreviewed, fix GCC warning by using #include
1579         https://bugs.webkit.org/show_bug.cgi?id=181189
1580
1581         This file is included in C++ files. Use #include instead of #import to suppress warning in GCC.
1582
1583         * platform/PromisedBlobInfo.h:
1584
1585 2017-12-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1586
1587         Remove std::chrono completely
1588         https://bugs.webkit.org/show_bug.cgi?id=181186
1589
1590         Reviewed by Alex Christensen.
1591
1592         Use MonotonicTime, WallTime, and Seconds instead.
1593         Changes are mechanical ones. But persistent network cache data is changed.
1594         So we bump the version number of the cache storage.
1595
1596         * Modules/indexeddb/server/IDBServer.cpp:
1597         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
1598         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
1599         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
1600         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
1601         * Modules/indexeddb/server/IDBServer.h:
1602         * Modules/webdatabase/DatabaseTracker.cpp:
1603         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
1604         * Modules/webdatabase/DatabaseTracker.h:
1605         * dom/Document.cpp:
1606         (WebCore::Document::lastModified):
1607         * html/HTMLMediaElement.cpp:
1608         (WebCore::HTMLMediaElement::clearMediaCache):
1609         * html/HTMLMediaElement.h:
1610         (WebCore::HTMLMediaElement::clearMediaCache):
1611         * loader/CrossOriginPreflightResultCache.cpp:
1612         (WebCore::parseAccessControlMaxAge):
1613         (WebCore::CrossOriginPreflightResultCacheItem::parse):
1614         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
1615         * loader/CrossOriginPreflightResultCache.h:
1616         * loader/cache/CachedResource.cpp:
1617         (WebCore::CachedResource::CachedResource):
1618         (WebCore::CachedResource::freshnessLifetime const):
1619         (WebCore::CachedResource::responseReceived):
1620         (WebCore::CachedResource::updateResponseAfterRevalidation):
1621         * loader/cache/CachedResource.h:
1622         * platform/FileSystem.cpp:
1623         (WebCore::FileSystem::getFileModificationTime):
1624         * platform/FileSystem.h:
1625         * platform/SearchPopupMenu.h:
1626         * platform/cocoa/SearchPopupMenuCocoa.h:
1627         * platform/cocoa/SearchPopupMenuCocoa.mm:
1628         (WebCore::toSystemClockTime):
1629         (WebCore::toNSDateFromSystemClock):
1630         (WebCore::removeRecentlyModifiedRecentSearches):
1631         * platform/graphics/MediaPlayer.cpp:
1632         (WebCore::MediaPlayer::clearMediaCache):
1633         * platform/graphics/MediaPlayer.h:
1634         * platform/graphics/MediaPlayerPrivate.h:
1635         (WebCore::MediaPlayerPrivateInterface::clearMediaCache):
1636         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1637         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1638         (WebCore::toSystemClockTime):
1639         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
1640         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1641         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1642         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache):
1643         * platform/network/CacheValidation.cpp:
1644         (WebCore::computeCurrentAge):
1645         (WebCore::computeFreshnessLifetimeForHTTPFamily):
1646         (WebCore::updateRedirectChainStatus):
1647         (WebCore::redirectChainAllowsReuse):
1648         (WebCore::parseCacheControlDirectives):
1649         * platform/network/CacheValidation.h:
1650         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
1651         * platform/network/HTTPParsers.cpp:
1652         (WebCore::parseHTTPDate):
1653         * platform/network/HTTPParsers.h:
1654         * platform/network/PlatformCookieJar.h:
1655         * platform/network/ResourceResponseBase.cpp:
1656         (WebCore::ResourceResponseBase::cacheControlMaxAge const):
1657         (WebCore::parseDateValueInHeader):
1658         (WebCore::ResourceResponseBase::date const):
1659         (WebCore::ResourceResponseBase::age const):
1660         (WebCore::ResourceResponseBase::expires const):
1661         (WebCore::ResourceResponseBase::lastModified const):
1662         * platform/network/ResourceResponseBase.h:
1663         * platform/network/cf/CookieJarCFNet.cpp:
1664         (WebCore::deleteAllCookiesModifiedSince):
1665         * platform/network/curl/CookieJarCurl.cpp:
1666         (WebCore::CookieJarCurlFileSystem::deleteAllCookiesModifiedSince):
1667         (WebCore::deleteAllCookiesModifiedSince):
1668         * platform/network/curl/CookieJarCurl.h:
1669         * platform/network/curl/CurlCacheEntry.cpp:
1670         (WebCore::CurlCacheEntry::CurlCacheEntry):
1671         (WebCore::CurlCacheEntry::isCached):
1672         (WebCore::CurlCacheEntry::parseResponseHeaders):
1673         * platform/network/curl/CurlCacheEntry.h:
1674         * platform/network/mac/CookieJarMac.mm:
1675         (WebCore::deleteAllCookiesModifiedSince):
1676         * platform/network/soup/CookieJarSoup.cpp:
1677         (WebCore::deleteAllCookiesModifiedSince):
1678         * platform/win/SearchPopupMenuWin.cpp:
1679         (WebCore::SearchPopupMenuWin::loadRecentSearches):
1680         * rendering/RenderSearchField.cpp:
1681         (WebCore::RenderSearchField::addSearchResult):
1682
1683 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1684
1685         [Attachment Support] Introduce data structures and IPC support for writing promised blobs
1686         https://bugs.webkit.org/show_bug.cgi?id=181189
1687
1688         Reviewed by Tim Horton.
1689
1690         Introduces a new header containing structs to be used for writing blob data when dragging. PromisedBlobInfo
1691         represents information needed to declare data on the pasteboard that will eventually be provided via a Blob.
1692         This includes the type and filename of the Blob-backed content. PromisedBlobData represents information needed
1693         to actually deliver the Blob's content to the platform, and is sent some time after its corresponding
1694         PromisedBlobInfo. The content may either be in the form of a file path (as is the case using the previous
1695         declareAndWriteAttachment codepath) or a data buffer (which we would use if the Blob is not already backed by a
1696         file on disk).
1697
1698         No new tests, since there is no observable change in functionality yet.
1699
1700         * WebCore.xcodeproj/project.pbxproj:
1701         * platform/PromisedBlobInfo.h: Added.
1702         (WebCore::PromisedBlobInfo::operator bool const):
1703         (WebCore::PromisedBlobData::hasData const):
1704         (WebCore::PromisedBlobData::hasFile const):
1705         (WebCore::PromisedBlobData::operator bool const):
1706         (WebCore::PromisedBlobData::fulfills const):
1707
1708 2018-01-02  Brady Eidson  <beidson@apple.com>
1709
1710         Make MessagePortChannel::takeAllMessagesFromRemote asynchronous.
1711         https://bugs.webkit.org/show_bug.cgi?id=181205
1712
1713         Reviewed by Alex Christensen.
1714
1715         No new tests (No behavior change)
1716
1717         This is needed for the ongoing WK2 MessagePort work.
1718
1719         For WK1 in-process MessagePorts it is still synchronous; no behavior change.
1720
1721         * dom/InProcessMessagePortChannel.cpp:
1722         (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote):
1723         * dom/InProcessMessagePortChannel.h:
1724
1725         * dom/MessagePort.cpp:
1726         (WebCore::MessagePort::dispatchMessages):
1727         * dom/MessagePortChannel.h:
1728
1729 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1730
1731         Add a WebAuthentication runtime feature flag
1732         https://bugs.webkit.org/show_bug.cgi?id=181220
1733         <rdar://problem/36055305>
1734
1735         Reviewed by Brent Fulgham.
1736
1737         This patch basically renames the CredentialManagement runtime feature flag into
1738         WebAuthentication runtime feature flag.
1739
1740         No tests.
1741
1742         * Modules/credentialmanagement/BasicCredential.idl:
1743         * Modules/credentialmanagement/CredentialsContainer.idl:
1744         * Modules/credentialmanagement/NavigatorCredentials.idl:
1745         * Modules/webauthn/PublicKeyCredential.idl:
1746         * page/RuntimeEnabledFeatures.h:
1747         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationEnabled):
1748         (WebCore::RuntimeEnabledFeatures::webAuthenticationEnabled const):
1749         (WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Deleted.
1750         (WebCore::RuntimeEnabledFeatures::credentialManagementEnabled const): Deleted.
1751
1752 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1753
1754         [Attachment Support] Don't Blob-convert images and attachments with https:, http: or data: urls
1755         https://bugs.webkit.org/show_bug.cgi?id=181143
1756         <rdar://problem/36200381>
1757
1758         Reviewed by Tim Horton.
1759
1760         Clients such as Mail would expect pasting or dropping an image with src="https://..." to result in the source
1761         URL being preserved (i.e. staying as remote images) instead of creating image attachments out of them. This
1762         patch hooks into the shouldConvertToBlob() check added in r226272 so that it applies to attachment element
1763         replacement as well.
1764
1765         Test: WKAttachmentTests.DoNotInsertDataURLImagesAsAttachments
1766
1767         * editing/cocoa/WebContentReaderCocoa.mm:
1768         (WebCore::shouldConvertToBlob):
1769         (WebCore::replaceRichContentWithAttachments):
1770
1771 2018-01-02  Brady Eidson  <beidson@apple.com>
1772
1773         Identify MessagePorts by a globally unique MessagePortIdentifier.
1774         https://bugs.webkit.org/show_bug.cgi?id=181172
1775
1776         Reviewed by Alex Christensen.
1777
1778         No new tests (Behavior change covered by all existing tests).
1779
1780         This cleans up the abstract MessagePortChannel interface to be in terms of identifiers
1781         instead of actual MessagePort objects.
1782         
1783         The identifiers are compounded with the current ProcessIdentifier meaning they are global
1784         across all processes for the running UI process, enabling easy cross-process communication.
1785         
1786         (Actual cross-process communication comes in a followup)
1787         
1788         * WebCore.xcodeproj/project.pbxproj:
1789         
1790         * dom/InProcessMessagePortChannel.cpp:
1791         (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts):
1792         (WebCore::InProcessMessagePortChannel::isConnectedTo):
1793         (WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen):
1794         (WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted.
1795         * dom/InProcessMessagePortChannel.h:
1796         
1797         * dom/MessageChannel.cpp:
1798         (WebCore::MessageChannel::MessageChannel):
1799         (WebCore::m_port2):
1800         
1801         * dom/MessagePort.cpp:
1802         (WebCore::allMessagePortsLock):
1803         (WebCore::MessagePort::ref const):
1804         (WebCore::MessagePort::deref const):
1805         (WebCore::MessagePort::existingMessagePortForIdentifier):
1806         (WebCore::MessagePort::MessagePort):
1807         (WebCore::MessagePort::~MessagePort):
1808         (WebCore::MessagePort::postMessage):
1809         (WebCore::MessagePort::entangleWithRemote):
1810         (WebCore::MessagePort::entanglePorts):
1811         (WebCore::MessagePort::entangle): Deleted.
1812         * dom/MessagePort.h:
1813         
1814         * dom/MessagePortChannel.h:
1815         
1816         * dom/MessagePortIdentifier.h: Added.
1817         (WebCore::operator==):
1818         (WebCore::MessagePortIdentifier::encode const):
1819         (WebCore::MessagePortIdentifier::decode):
1820         (WebCore::MessagePortIdentifier::hash const):
1821         (WTF::MessagePortIdentifierHash::hash):
1822         (WTF::MessagePortIdentifierHash::equal):
1823         (WTF::HashTraits<WebCore::MessagePortIdentifier>::emptyValue):
1824         (WTF::HashTraits<WebCore::MessagePortIdentifier>::constructDeletedValue):
1825         (WTF::HashTraits<WebCore::MessagePortIdentifier>::isDeletedValue):
1826
1827 2018-01-02  Youenn Fablet  <youenn@apple.com>
1828
1829         Memory cache should not reuse resources with different credential fetch option
1830         https://bugs.webkit.org/show_bug.cgi?id=181212
1831
1832         Reviewed by Alex Christensen.
1833
1834         Covered by rebased test.
1835
1836         * loader/cache/CachedResourceLoader.cpp:
1837         (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
1838
1839 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1840
1841         Update Credential Management API for WebAuthentication
1842         https://bugs.webkit.org/show_bug.cgi?id=181082
1843         <rdar://problem/36055239>
1844
1845         Reviewed by Brent Fulgham.
1846
1847         Part 2/2
1848
1849         This patch implements Core API from Credential Management API: https://www.w3.org/TR/credential-management-1/#core.
1850         which is required by WebAuthN. It also sets the CredentialManagement runtime flag to enable testing. Note that it
1851         introduces a dummy PublicKeyCredential interface for testing functionalities of the Credential interface, which
1852         cannot be instantiated.
1853
1854         Tests: http/wpt/credential-management/credentialscontainer-create-basics.https.html
1855                http/wpt/credential-management/credentialscontainer-get-basics.https.html
1856                http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html
1857                http/wpt/credential-management/idl.https.html
1858
1859         * CMakeLists.txt:
1860         * DerivedSources.make:
1861         * Modules/credentialmanagement/BasicCredential.cpp:
1862         (WebCore::BasicCredential::BasicCredential):
1863         (WebCore::BasicCredential::type const):
1864         * Modules/credentialmanagement/BasicCredential.h:
1865         (WebCore::BasicCredential::discovery const):
1866         * Modules/credentialmanagement/BasicCredential.idl:
1867         * Modules/credentialmanagement/CredentialCreationOptions.h:
1868         * Modules/credentialmanagement/CredentialCreationOptions.idl:
1869         * Modules/credentialmanagement/CredentialRequestOptions.h:
1870         * Modules/credentialmanagement/CredentialRequestOptions.idl:
1871         * Modules/credentialmanagement/CredentialsContainer.cpp:
1872         (WebCore::CredentialsContainer::CredentialsContainer):
1873         (WebCore::CredentialsContainer::isSameOriginWithItsAncestors):
1874         (WebCore::CredentialsContainer::dispatchTask):
1875         (WebCore::CredentialsContainer::get):
1876         (WebCore::CredentialsContainer::store):
1877         (WebCore::CredentialsContainer::isCreate):
1878         (WebCore::CredentialsContainer::preventSilentAccess):
1879         * Modules/credentialmanagement/CredentialsContainer.h:
1880         (WebCore::CredentialsContainer::create):
1881         (WebCore::CredentialsContainer::CredentialsContainer): Deleted.
1882         * Modules/credentialmanagement/CredentialsContainer.idl:
1883         * Modules/credentialmanagement/NavigatorCredentials.cpp:
1884         (WebCore::NavigatorCredentials::credentials):
1885         * Modules/credentialmanagement/NavigatorCredentials.h:
1886         * Modules/credentialmanagement/NavigatorCredentials.idl:
1887         * Modules/webauthn/PublicKeyCredential.cpp: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
1888         (WebCore::PublicKeyCredential::PublicKeyCredential):
1889         (WebCore::PublicKeyCredential::collectFromCredentialStore):
1890         (WebCore::PublicKeyCredential::discoverFromExternalSource):
1891         (WebCore::PublicKeyCredential::store):
1892         (WebCore::PublicKeyCredential::create):
1893         * Modules/webauthn/PublicKeyCredential.h: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
1894         * Modules/webauthn/PublicKeyCredential.idl: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.idl.
1895         * Sources.txt:
1896         * WebCore.xcodeproj/project.pbxproj:
1897         * bindings/js/WebCoreBuiltinNames.h:
1898         * page/RuntimeEnabledFeatures.h:
1899
1900 2018-01-02  Oleksandr Skachkov  <gskachkov@gmail.com>
1901
1902         WebAssembly: sending module to iframe fails
1903         https://bugs.webkit.org/show_bug.cgi?id=179263
1904
1905         Reviewed by JF Bastien.
1906
1907         Allow use WebAssembly.Module as input parameters for postMessage 
1908         in window and iframe object. To prevent sending message to iframe
1909         that is not ready, in iframe-* test we are waiting message from
1910         iframe only after that we send message to it.   
1911
1912         Tests: wasm/iframe-parent-postmessage.html
1913                wasm/iframe-postmessage.html
1914                wasm/window-postmessage.html
1915
1916         * bindings/js/SerializedScriptValue.cpp:
1917         (WebCore::CloneSerializer::dumpIfTerminal):
1918         * bindings/js/SerializedScriptValue.h:
1919         * page/DOMWindow.cpp:
1920         (WebCore::DOMWindow::postMessage):
1921
1922 == Rolled over to ChangeLog-2018-01-01 ==