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