CRASH in WebCore::MediaPlayerPrivateAVFoundation::setPreload
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-10-12  Jer Noble  <jer.noble@apple.com>
2
3         CRASH in WebCore::MediaPlayerPrivateAVFoundation::setPreload
4         https://bugs.webkit.org/show_bug.cgi?id=190485
5         <rdar://problem/34613350>
6
7         Reviewed by Eric Carlson.
8
9         Crash analytics show that a pure-virtual function is called by MediaPlayerPrivateAVFoundation::setPreload(), and
10         the likely cause of that pure-virtual function call is that the MediaPlayerPrivateAVFoundation object itself has
11         been destroyed, likely as a side effect of calling MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL().
12         The usual suspect for this kind of crash is due to calling into JS (e.g., from a callback passed up to
13         HTMLMediaElement). Code inspection hasn't yielded any good hints about why this might be occurring, so we will
14         add a ScriptDisallowedScope assertion inside HTMLMediaElement::prepareToPlay(), to generate a good crashlog
15         showing exactly what callback is resulting in a JS call. But just in case the deallocation is not due to JS,
16         also add an explicit strong-ref inside MediaPlayer::prepareToPlay.
17
18         * html/HTMLMediaElement.cpp:
19         (WebCore::HTMLMediaElement::prepareToPlay):
20         * platform/graphics/MediaPlayer.cpp:
21         (WebCore::MediaPlayer::prepareToPlay):
22
23 2018-10-12  Jer Noble  <jer.noble@apple.com>
24
25         Null-dereference in SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged
26         https://bugs.webkit.org/show_bug.cgi?id=190490
27         <rdar://problem/42213807>
28
29         Reviewed by Eric Carlson.
30
31         Crash analytics show a null dereference occurring, likely because m_mediaSource is null.
32
33         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
34         (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
35
36 2018-10-11  Don Olmstead  <don.olmstead@sony.com>
37
38         Add Houdini specs to features.json
39         https://bugs.webkit.org/show_bug.cgi?id=190494
40         <rdar://problem/45211879>
41
42         Unreviewed fix.
43
44         Specifications should not reference other specifications. Also
45         move Worklet into the specifications section.
46
47         * features.json:
48
49 2018-10-11  Youenn Fablet  <youenn@apple.com>
50
51         IOS 12 - Service worker cache not shared when added to homescreen
52         https://bugs.webkit.org/show_bug.cgi?id=190269
53         <rdar://problem/45009961>
54
55         Reviewed by Alex Christensen.
56
57         Expose Cache Storage API when Service Worker API is exposed.
58         This is used for API tests.
59
60         * dom/ScriptExecutionContext.h: Make hasServiceWorkerScheme
61         available outside SERVICE_WORKER compilation flag since used by DOMWindowCaches.
62         * dom/ScriptExecutionContext.cpp: Ditto.
63         * Modules/cache/DOMWindowCaches.idl:
64
65 2018-10-10  Simon Fraser  <simon.fraser@apple.com>
66
67         Hide RenderLayer z-order and normal flow lists behind iterators
68         https://bugs.webkit.org/show_bug.cgi?id=190457
69
70         Reviewed by Zalan Bujtas.
71
72         Expose the positive z-order, negative z-order and normal flow lists
73         from RenderLayer as iterators rather than vectors of raw pointers.
74         
75         This hides the fact that the vectors can be null, and allows for easier casting in future.
76
77         * rendering/RenderLayer.cpp:
78         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
79         (WebCore::RenderLayer::paintLayerContents):
80         (WebCore::RenderLayer::paintList):
81         (WebCore::RenderLayer::hitTestLayer):
82         (WebCore::RenderLayer::hitTestList):
83         (WebCore::RenderLayer::calculateClipRects const):
84         * rendering/RenderLayer.h:
85         * rendering/RenderLayerBacking.cpp:
86         (WebCore::traverseVisibleNonCompositedDescendantLayers):
87         * rendering/RenderLayerCompositor.cpp:
88         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
89         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
90         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
91         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
92         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
93         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
94         (WebCore::RenderLayerCompositor::needsContentsCompositingLayer const):
95         (WebCore::RenderLayerCompositor::layerHas3DContent const):
96         * rendering/RenderTreeAsText.cpp:
97         (WebCore::writeLayers):
98
99 2018-10-11  Don Olmstead  <don.olmstead@sony.com>
100
101         Add Houdini specs to features.json
102         https://bugs.webkit.org/show_bug.cgi?id=190494
103
104         Reviewed by Simon Fraser.
105
106         Add CSS Typed OM Level 1, CSS Layout API Level 1, CSS Animation
107         Worklet, and group them under a Houdini feature set.
108
109         * features.json:
110
111 2018-10-11  Ross Kirsling  <ross.kirsling@sony.com>
112
113         [WTF] Semaphore.h conflicts with POSIX header
114         https://bugs.webkit.org/show_bug.cgi?id=190486
115
116         Reviewed by Yusuke Suzuki.
117
118         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
119
120 2018-10-11  Thibault Saunier  <tsaunier@igalia.com>
121
122         [GStreamer] Support arbitrary video resolution in getUserMedia API
123         https://bugs.webkit.org/show_bug.cgi?id=189734
124
125         Reviewed by Xabier Rodriguez-Calvar.
126
127         Implement arbitrary video resolution for the getUserMedia API in GStreamer.
128
129         Fix the MockRealtimeMediaSource device list to make devices properties match
130         test expectations.
131
132         Reactivate tests that were failling because of that.
133
134         * platform/mediastream/RealtimeVideoSource.cpp:
135         (WebCore::RealtimeVideoSource::standardVideoSizes):
136         (WebCore::standardVideoSizes): Deleted.
137         * platform/mediastream/RealtimeVideoSource.h:
138         * platform/mediastream/VideoPreset.h:
139         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
140         (WebCore::GStreamerVideoPreset::create):
141         (WebCore::GStreamerVideoPreset::GStreamerVideoPreset):
142         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
143         (WebCore::GStreamerVideoCaptureSource::capabilities):
144         (WebCore::GStreamerVideoCaptureSource::generatePresets):
145         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
146         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
147         (WebCore::defaultDevices):
148
149 2018-10-11  Keith Rollin  <krollin@apple.com>
150
151         CURRENT_ARCH should not be used in Run Script phase.
152         https://bugs.webkit.org/show_bug.cgi?id=190407
153         <rdar://problem/45133556>
154
155         Reviewed by Alexey Proskuryakov.
156
157         CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
158         CURRENT_ARCH is not well-defined during this phase (and may even have
159         the value "undefined") since this phase is run just once per build
160         rather than once per supported architecture. Migrate away from
161         CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
162         performing an operation for each value, or by picking the first entry
163         in ARCHS and using that as a representative value.
164
165         No new tests -- no functional changes.
166
167         * DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
168         first entry in ARCHS rather than use CURRENT_ARCH.
169
170 2018-10-11  Daniel Bates  <dabates@apple.com>
171
172         Support building WebKit for macOS Mojave using a newer SDK
173         https://bugs.webkit.org/show_bug.cgi?id=190431
174
175         Reviewed by Andy Estes.
176
177         * platform/network/cocoa/CookieCocoa.mm:
178         (WebCore::coreSameSitePolicy):
179         (WebCore::nsSameSitePolicy):
180
181 2018-10-11  Daniel Bates  <dabates@apple.com>
182
183         [iOS] Add typedef for WebEvent keyboard flags
184         https://bugs.webkit.org/show_bug.cgi?id=190435
185
186         Reviewed by Wenson Hsieh.
187
188         Currently WebEvent and UIKit SPI are intertwined when it comes to keyboard flags. It seems sufficient
189         to have WebEvent defined its own keyboard flags so that callers do not need to be aware of UIKit SPI.
190
191         No functionality changed. So, no new tests.
192
193         * platform/ios/WebEvent.h:
194         * platform/ios/WebEvent.mm:
195         (-[WebEvent keyboardFlags]):
196
197 2018-10-11  Antti Koivisto  <antti@apple.com>
198
199         Use finer grained locking in FontDatabase
200         https://bugs.webkit.org/show_bug.cgi?id=190467
201
202         Reviewed by Alex Christensen.
203
204         * platform/graphics/FontCache.h:
205
206         Also use ListHashSet for prewarming info so we can prewarm in the same order the fonts were
207         seen last time.
208
209         * platform/graphics/cocoa/FontCacheCoreText.cpp:
210         (WebCore::FontDatabase::collectionForFamily):
211
212         Only hold the lock when accessing the hashmap. There is no need to hold it during font construction
213         which can take a long time.
214
215         (WebCore::FontDatabase::fontForPostScriptName):
216
217         This is currently not prewarmed from a thread so no need for locking.
218
219         (WebCore::FontDatabase::clear):
220
221 2018-10-11  Thibault Saunier  <tsaunier@igalia.com>
222
223         [GStreamer] Fix race condition in GStreamerVideoDecoder
224         https://bugs.webkit.org/show_bug.cgi?id=190470
225
226         The GStreamerVideoDecoder.m_dtsPtsMap filed is accessed from
227         the main thread and some GStreamer streaming thread, make sure
228         to protect its access.
229
230         And use WTF::StdMap instead of std::map.
231
232         Reviewed by Philippe Normand.
233
234         Manually tested and a random crash is gone.
235
236         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
237         (WebCore::GStreamerVideoDecoder::newSampleCallback):
238
239 2018-10-11  Enrique Ocaña González  <eocanha@igalia.com>
240
241         [GStreamer][MSE] Fix height calculation for streams with source aspect ratio
242         https://bugs.webkit.org/show_bug.cgi?id=190464
243
244         Reviewed by Xabier Rodriguez-Calvar.
245
246         This patch is authored by Nikola Veljkovic <Nikola.Veljkovic@zenterio.com>
247
248         * platform/graphics/gstreamer/GStreamerCommon.cpp:
249         (WebCore::getVideoResolutionFromCaps): Reverse the SAR adjustment to "undo" it
250         instead of applying it twice.
251
252 2018-10-11  Alejandro G. Castro  <alex@igalia.com>
253
254         [GTK][WPE] Add mediaDevices.enumerateDevices support
255         https://bugs.webkit.org/show_bug.cgi?id=185761
256
257         Reviewed by Youenn Fablet.
258
259         We are adopting the same policy COCOA is using when returning the
260         list of media devices if the user does not have persistent
261         access. Namely, we just return the first media device for audio
262         and video capture.
263
264         * Modules/mediastream/MediaDevicesRequest.cpp:
265         (WebCore::MediaDevicesRequest::filterDeviceList): Add support for
266         other platforms when filtering devices if there is no persistent
267         access to the origin.
268
269 2018-10-10  Chris Dumez  <cdumez@apple.com>
270
271         Rename a couple of DOMWindowProperty virtual functions
272         https://bugs.webkit.org/show_bug.cgi?id=190458
273
274         Reviewed by Geoffrey Garen.
275
276         Rename a couple of DOMWindowProperty virtual functions as the current naming no longer makes
277         sense after recent refactoring.
278
279         disconnectFrameForDocumentSuspension() was renamed to suspendForPageCache(), and
280         reconnectFrameFromDocumentSuspension(Frame*) was renamed to resumeFromPageCache().
281         DOMWindowProperty objects no longer need to disconnect / reconnect from their
282         frame since they now get their frame from their associated Window. However, some
283         DOMWindowProperty subclasses do have some page cache suspension / resuming logic
284         implemented of overrides of these functions.
285
286         Also drop the disconnectDOMWindowProperties() / reconnectDOMWindowProperties()
287         methods in DOMWindow. The naming made little sense as it does not really
288         disconnect those properties in any way. Instead, inline them in
289         DOMWindow's suspendForPageCache() / resumeFromPageCache() since these are
290         the only callers.
291
292         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
293         (WebCore::DOMWindowIndexedDatabase::suspendForPageCache):
294         (WebCore::DOMWindowIndexedDatabase::resumeFromPageCache):
295         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension): Deleted.
296         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension): Deleted.
297         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
298         * history/CachedFrame.cpp:
299         (WebCore::CachedFrame::CachedFrame):
300         * loader/FrameLoader.cpp:
301         (WebCore::FrameLoader::open):
302         * loader/appcache/DOMApplicationCache.cpp:
303         (WebCore::DOMApplicationCache::suspendForPageCache):
304         (WebCore::DOMApplicationCache::resumeFromPageCache):
305         (WebCore::DOMApplicationCache::disconnectFrameForDocumentSuspension): Deleted.
306         (WebCore::DOMApplicationCache::reconnectFrameFromDocumentSuspension): Deleted.
307         * loader/appcache/DOMApplicationCache.h:
308         * page/DOMWindow.cpp:
309         (WebCore::DOMWindow::suspendForPageCache):
310         (WebCore::DOMWindow::resumeFromPageCache):
311         (WebCore::DOMWindow::suspendForDocumentSuspension): Deleted.
312         (WebCore::DOMWindow::resumeFromDocumentSuspension): Deleted.
313         (WebCore::DOMWindow::disconnectDOMWindowProperties): Deleted.
314         (WebCore::DOMWindow::reconnectDOMWindowProperties): Deleted.
315         * page/DOMWindow.h:
316         * page/DOMWindowExtension.cpp:
317         (WebCore::DOMWindowExtension::suspendForPageCache):
318         (WebCore::DOMWindowExtension::resumeFromPageCache):
319         (WebCore::DOMWindowExtension::disconnectFrameForDocumentSuspension): Deleted.
320         (WebCore::DOMWindowExtension::reconnectFrameFromDocumentSuspension): Deleted.
321         * page/DOMWindowExtension.h:
322         * page/DOMWindowProperty.cpp:
323         (WebCore::DOMWindowProperty::suspendForPageCache):
324         (WebCore::DOMWindowProperty::resumeFromPageCache):
325         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension): Deleted.
326         (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension): Deleted.
327         * page/DOMWindowProperty.h:
328
329 2018-10-10  Devin Rousso  <drousso@apple.com>
330
331         Web Inspector: create special Network waterfall for media events
332         https://bugs.webkit.org/show_bug.cgi?id=189773
333         <rdar://problem/44626605>
334
335         Reviewed by Joseph Pecoraro.
336
337         Test: http/tests/inspector/dom/didFireEvent.html
338
339         * html/HTMLMediaElement.cpp:
340         (WebCore::HTMLMediaElement::HTMLMediaElement):
341
342         * inspector/InspectorInstrumentation.h:
343         (WebCore::InspectorInstrumentation::addEventListenersToNode): Added.
344         * inspector/InspectorInstrumentation.cpp:
345         (WebCore::InspectorInstrumentation::addEventListenersToNodeImpl): Added.
346
347         * inspector/agents/InspectorDOMAgent.h:
348         * inspector/agents/InspectorDOMAgent.cpp:
349         (WebCore::EventFiredCallback): Added.
350         (WebCore::EventFiredCallback::create): Added.
351         (WebCore::EventFiredCallback::operator==): Added.
352         (WebCore::EventFiredCallback::handleEvent): Added.
353         (WebCore::EventFiredCallback::EventFiredCallback): Added.
354         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
355         (WebCore::InspectorDOMAgent::addEventListenersToNode): Added.
356
357 2018-10-10  Daniel Bates  <dabates@apple.com>
358
359         [iOS] Cleanup -[WAKView _selfHandleEvent:] and -[WAKWindow sendEventSynchronously:]
360         https://bugs.webkit.org/show_bug.cgi?id=190402
361
362         Reviewed by Anders Carlsson.
363
364         Unindent case statements. Remove use of default case statements with body ASSERT_NOT_REACHED()
365         to catch the cases of a missing enumerator. By omitting the default case statement we turn
366         such a scenario into a compile-time error instead of handling it as a runtime error.
367
368         * platform/ios/wak/WAKView.mm:
369         (-[WAKView _selfHandleEvent:]):
370         * platform/ios/wak/WAKWindow.mm:
371         (-[WAKWindow sendEventSynchronously:]):
372
373 2018-10-05  Ryosuke Niwa  <rniwa@webkit.org>
374
375         Rename MarkupAccumulator::appendStartTag, appendElement, etc... for clarity
376         https://bugs.webkit.org/show_bug.cgi?id=190308
377
378         Reviewed by Darin Adler.
379
380         Renamed appendStartTag and appendEndTag to startAppendingNode and endAppendingNode since serialize any node,
381         not just elements which produce start and end tags.
382
383         Renamed appendElement and appendEndElement to appendStartTag and appendEndTag since that's what they do.
384
385         * editing/MarkupAccumulator.cpp:
386         (WebCore::elementCannotHaveEndTag): Made this a static local function.
387         (WebCore::shouldSelfClose): Ditto.
388         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
389         (WebCore::MarkupAccumulator::startAppendingNode): Renamed from appendStartTag.
390         (WebCore::MarkupAccumulator::endAppendingNode): Renamed from appendEndElement and merged appendEndMarkup here.
391         (WebCore::MarkupAccumulator::appendTextSubstring): Deleted. This was only used by StyledMarkupAccumulator.
392         (WebCore::MarkupAccumulator::appendStringView): Added.
393         (WebCore::MarkupAccumulator::appendStartTag): Renamed from appendElement.
394         (WebCore::MarkupAccumulator::appendCloseTag):
395         (WebCore::MarkupAccumulator::appendNonElementNode): Renamed from appendStartMarkup. No longer serializes
396         an element. StyledMarkupAccumulator had a check before calling this function already so this clarifies
397         the purpose of this function.
398         (WebCore::MarkupAccumulator::appendElement): Deleted.
399         (WebCore::MarkupAccumulator::appendEndMarkup): Deleted. Merged into appendEndTag.
400         * editing/MarkupAccumulator.h:
401         (WebCore::MarkupAccumulator::appendNodeEnd): Renamed from appendEndTag.
402         * editing/markup.cpp:
403         (WebCore::StyledMarkupAccumulator::wrapWithNode):
404         (WebCore::StyledMarkupAccumulator::appendStartTag): Renamed from appendElement.
405         (WebCore::StyledMarkupAccumulator::appendEndTag): Renamed from appendEndElement.
406         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
407         (WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList): Use String::substring directly instead of
408         going through appendTextSubstring which has been deleted.
409         * page/PageSerializer.cpp:
410         (WebCore::PageSerializer::SerializerMarkupAccumulator::appendStartTag): Renamed from appendElement.
411         (WebCore::PageSerializer::SerializerMarkupAccumulator::appendEndTag): Renamed from appendEndElement.
412
413 2018-10-10  Ryan Haddad  <ryanhaddad@apple.com>
414
415         Unreviewed, attempt to fix the build with current SDKs.
416
417         * crypto/mac/CryptoKeyRSAMac.cpp:
418         (WebCore::getPublicKeyComponents):
419
420 2018-10-10  Brent Fulgham  <bfulgham@apple.com>
421
422         Only report the supported WebGL version
423         https://bugs.webkit.org/show_bug.cgi?id=190434
424         <rdar://problem/45024677>
425
426         Reviewed by Dean Jackson.
427
428         Tested by fast/canvas/webgl/gl-getstring.html
429
430         Revise getParameter(gl.VERSION) to only return the WebGL version without the hardware and
431         driver-specific details available through the low-level OpenGL driver interface. These details
432         are not needed for WebGL use and expose information about the user's system that we do not
433         need to share.
434
435         * html/canvas/WebGL2RenderingContext.cpp:
436         (WebCore::WebGL2RenderingContext::getParameter):
437         * html/canvas/WebGLRenderingContext.cpp:
438         (WebCore::WebGLRenderingContext::getParameter):
439
440 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
441
442         Unreviewed, add missing headers for inline functions
443         https://bugs.webkit.org/show_bug.cgi?id=190429
444
445         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
446
447 2018-10-10  Tim Horton  <timothy_horton@apple.com>
448
449         Share more WKShareSheet code between macOS and iOS, and fix a few bugs
450         https://bugs.webkit.org/show_bug.cgi?id=190420
451
452         Reviewed by Simon Fraser.
453
454         Test: fast/web-share/share-with-no-url.html
455
456         * page/Navigator.cpp:
457         (WebCore::Navigator::share):
458         * page/ShareData.h:
459         Make 'url' an optional field on ShareDataWithParsedURL, and don't
460         reject the share() promise if the URL is totally empty (as opposed to invalid).
461
462 2018-10-10  Devin Rousso  <drousso@apple.com>
463
464         Web Inspector: notify the frontend when a canvas has started recording via console.record
465         https://bugs.webkit.org/show_bug.cgi?id=190306
466
467         Reviewed by Brian Burg.
468
469         Updated existing tests: LayoutTests/inspector/canvas/recording-2d.html
470                                 LayoutTests/inspector/canvas/recording-bitmaprenderer.html
471                                 LayoutTests/inspector/canvas/recording-webgl-snapshots.html
472                                 LayoutTests/inspector/canvas/recording-webgl.html
473
474         * inspector/agents/InspectorCanvasAgent.cpp:
475         (WebCore::InspectorCanvasAgent::startRecording):
476         (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
477
478         * inspector/InspectorCanvas.h:
479         Default `singleFrame` to false to better match the default behaviour of other `console`
480         functions (`profile` doesn't stop until `profileEnd` is called, so the same should be true
481         of `record` and `recordEnd`).
482
483 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
484
485         [JSC] Rename createXXX to tryCreateXXX if it can return RefPtr
486         https://bugs.webkit.org/show_bug.cgi?id=190429
487
488         Reviewed by Saam Barati.
489
490         Use `tryCreate` or new `create`. If we use new `create`, we can use Ref<> and remove null check.
491
492         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
493         (WebCore::CDMSessionClearKey::cachedKeyForKeyID const):
494         * Modules/plugins/QuickTimePluginReplacement.mm:
495         (WebCore::jsValueWithDictionaryInContext):
496         * Modules/webaudio/AudioBuffer.cpp:
497         (WebCore::AudioBuffer::AudioBuffer):
498         (WebCore::AudioBuffer::getChannelData):
499         * Modules/webvr/VREyeParameters.cpp:
500         (WebCore::VREyeParameters::offset const):
501         * Modules/webvr/VRFrameData.cpp:
502         (WebCore::matrixToArray):
503         * Modules/webvr/VRPose.cpp:
504         (WebCore::optionalFloat3ToJSCArray):
505         (WebCore::VRPose::position const):
506         (WebCore::VRPose::orientation const):
507         * Modules/webvr/VRStageParameters.cpp:
508         (WebCore::VRStageParameters::sittingToStandingTransform const):
509         * bindings/js/ReadableStreamDefaultController.h:
510         (WebCore::ReadableStreamDefaultController::enqueue):
511         * bindings/js/SerializedScriptValue.cpp:
512         (WebCore::CloneDeserializer::readArrayBufferView):
513         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
514         (WebCore::CryptoKeyRSA::algorithm const):
515         * crypto/mac/CryptoKeyRSAMac.cpp:
516         (WebCore::CryptoKeyRSA::algorithm const):
517         * css/DOMMatrixReadOnly.cpp:
518         (WebCore::DOMMatrixReadOnly::toFloat32Array const):
519         (WebCore::DOMMatrixReadOnly::toFloat64Array const):
520         * css/FontFace.cpp:
521         (WebCore::FontFace::create):
522         * dom/TextEncoder.cpp:
523         (WebCore::TextEncoder::encode const):
524         * html/ImageData.cpp:
525         (WebCore::ImageData::ImageData):
526         * html/ImageData.h:
527         (WebCore::ImageData::data const):
528         (): Deleted.
529         * html/canvas/WebGL2RenderingContext.cpp:
530         (WebCore::WebGL2RenderingContext::bufferData):
531         (WebCore::WebGL2RenderingContext::bufferSubData):
532         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
533         (WebCore::WebGL2RenderingContext::getParameter):
534         * html/canvas/WebGLRenderingContext.cpp:
535         (WebCore::WebGLRenderingContext::getParameter):
536         * html/canvas/WebGLRenderingContextBase.cpp:
537         (WebCore::WebGLRenderingContextBase::getUniform):
538         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
539         (WebCore::WebGLRenderingContextBase::getWebGLFloatArrayParameter):
540         (WebCore::WebGLRenderingContextBase::getWebGLIntArrayParameter):
541         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
542         (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
543         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
544         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
545         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
546         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
547         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
548         (WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
549         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
550         (WebCore::CDMSessionAVContentKeySession::update):
551         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
552         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
553         (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
554         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
555         (WebCore::CDMSessionAVStreamSession::generateKeyRequest):
556         (WebCore::CDMSessionAVStreamSession::releaseKeys):
557         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
558         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
559         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
560         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
561         (WebCore::MediaSampleAVFObjC::getRGBAImageData const):
562         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
563         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
564         * platform/graphics/cairo/ImageBufferCairo.cpp:
565         (WebCore::getImageData):
566         * platform/graphics/cg/ImageBufferDataCG.cpp:
567         (WebCore::ImageBufferData::getData const):
568         * platform/graphics/filters/FEGaussianBlur.cpp:
569         (WebCore::FEGaussianBlur::platformApplySoftware):
570         * platform/graphics/filters/FilterEffect.cpp:
571         (WebCore::FilterEffect::unmultipliedResult):
572         (WebCore::FilterEffect::premultipliedResult):
573         (WebCore::FilterEffect::copyUnmultipliedResult):
574         (WebCore::FilterEffect::copyPremultipliedResult):
575         (WebCore::FilterEffect::createUnmultipliedImageResult):
576         (WebCore::FilterEffect::createPremultipliedImageResult):
577         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
578         (WebCore::ImageBufferData::getData const):
579         * platform/mac/SerializedPlatformRepresentationMac.mm:
580         (WebCore::jsValueWithDictionaryInContext):
581         * platform/mock/mediasource/MockBox.cpp:
582         (WebCore::MockBox::peekType):
583         (WebCore::MockBox::peekLength):
584         (WebCore::MockTrackBox::MockTrackBox):
585         (WebCore::MockInitializationBox::MockInitializationBox):
586         (WebCore::MockSampleBox::MockSampleBox):
587         * rendering/shapes/Shape.cpp:
588         (WebCore::Shape::createRasterShape):
589         * testing/LegacyMockCDM.cpp:
590         (WebCore::initDataPrefix):
591         (WebCore::keyPrefix):
592         (WebCore::keyRequest):
593
594 2018-10-10  Daniel Bates  <dabates@apple.com>
595
596         [iOS] Compare input string to UIKeyInput constants using string comparison instead of pointer comparison
597         https://bugs.webkit.org/show_bug.cgi?id=190432
598
599         Reviewed by Tim Horton.
600
601         Pointer comparision is brittle. We should be more forgiving and perform string comparision
602         of an input string to a UIKeyInput constant.
603
604         * platform/ios/WebEvent.mm:
605         (normalizedStringWithAppKitCompatibilityMapping):
606
607 2018-10-10  Chris Dumez  <cdumez@apple.com>
608
609         Unreviewed, rolling out r236802.
610
611         Working on getting the HTML spec updated instead
612         (https://github.com/whatwg/html/pull/4079)
613
614         Reverted changeset:
615
616         "Passing noopener=NOOPENER to window.open() should cause the
617         new window to not have an opener"
618         https://bugs.webkit.org/show_bug.cgi?id=190251
619         https://trac.webkit.org/changeset/236802
620
621 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
622
623         XMLHttpRequest should use reportExtraMemoryAllocated/reportExtraMemoryVisited instead of deprecatedReportExtraMemory
624         https://bugs.webkit.org/show_bug.cgi?id=190279
625
626         Reviewed by Ryosuke Niwa.
627
628         This patch switches deprecatedReportExtraMemory to reportExtraMemoryAllocated/reportExtraMemoryVisited
629         in XMLHttpRequest. We report extra memory allocation when the readyState becomes DONE. And memoryCost
630         function returns the memory cost which is based on the readyState and m_responseBuilder.
631         We annotate XMLHttpRequest with ReportExtraMemoryCost to use reportExtraMemoryVisited automatically with
632         memoryCost() function.
633
634         * xml/XMLHttpRequest.cpp:
635         (WebCore::XMLHttpRequest::changeState):
636         (WebCore::XMLHttpRequest::abort):
637         (WebCore::XMLHttpRequest::internalAbort):
638         (WebCore::XMLHttpRequest::networkErrorTimerFired):
639         (WebCore::XMLHttpRequest::memoryCost const):
640         (WebCore::XMLHttpRequest::didFinishLoading):
641         (WebCore::XMLHttpRequest::didReachTimeout):
642         (WebCore::XMLHttpRequest::dropProtection): Deleted.
643         * xml/XMLHttpRequest.h:
644         * xml/XMLHttpRequest.idl:
645
646 2018-10-09  Antoine Quint  <graouts@apple.com>
647
648         Remove the frames() timing function
649         https://bugs.webkit.org/show_bug.cgi?id=190034
650         <rdar://problem/44827544>
651
652         Reviewed by Dean Jackson.
653
654         * css/CSSComputedStyleDeclaration.cpp:
655         (WebCore::createTimingFunctionValue):
656         * css/CSSTimingFunctionValue.cpp:
657         (WebCore::CSSFramesTimingFunctionValue::customCSSText const): Deleted.
658         (WebCore::CSSFramesTimingFunctionValue::equals const): Deleted.
659         * css/CSSTimingFunctionValue.h:
660         * css/CSSToStyleMap.cpp:
661         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
662         * css/CSSValue.cpp:
663         (WebCore::CSSValue::equals const):
664         (WebCore::CSSValue::cssText const):
665         (WebCore::CSSValue::destroy):
666         * css/CSSValue.h:
667         (WebCore::CSSValue::isStepsTimingFunctionValue const):
668         (WebCore::CSSValue::isFramesTimingFunctionValue const): Deleted.
669         * css/CSSValueKeywords.in:
670         * css/parser/CSSPropertyParser.cpp:
671         (WebCore::consumeAnimationTimingFunction):
672         (WebCore::consumeFrames): Deleted.
673         * platform/animation/TimingFunction.cpp:
674         (WebCore::operator<<):
675         (WebCore::TimingFunction::transformTime const):
676         (WebCore::TimingFunction::createFromCSSValue):
677         * platform/animation/TimingFunction.h:
678         (WebCore::TimingFunction::isStepsTimingFunction const):
679         (WebCore::TimingFunction::isFramesTimingFunction const): Deleted.
680         * platform/graphics/ca/GraphicsLayerCA.cpp:
681         (WebCore::GraphicsLayerCA::animationCanBeAccelerated const):
682         (WebCore::animationHasFramesTimingFunction): Deleted.
683
684 2018-10-09  Devin Rousso  <drousso@apple.com>
685
686         Web Inspector: show redirect requests in Network and Timelines tabs
687         https://bugs.webkit.org/show_bug.cgi?id=150005
688         <rdar://problem/5378164>
689
690         Reviewed by Joseph Pecoraro.
691
692         Updated existing test http/tests/inspector/network/resource-timing.html.
693
694         * inspector/agents/InspectorNetworkAgent.cpp:
695         (WebCore::InspectorNetworkAgent::buildObjectForTiming):
696         (WebCore::InspectorNetworkAgent::didFinishLoading):
697         Add missing fields for `Network.types.ResourceTiming`.
698
699 2018-10-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
700
701         REGRESSION(r234620): SVGLangSpace::svgAttributeChanged() should invalidate the renderer of the SVGGeometryElement descendant only
702         https://bugs.webkit.org/show_bug.cgi?id=190411
703
704         Reviewed by Simon Fraser.
705
706         Test: svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html
707
708         When changing the attributes of the SVGLangSpace, we should invalidate
709         the renderer of the SVGGeometryElement descendant only. Renderer of other
710         elements, like SVGStopElement, should not be invalidated because they do
711         not have geometry and they can be used as resources for drawing another
712         SVGGeometryElement.
713
714         * svg/SVGElement.h:
715         (WebCore::SVGElement::isSVGGeometryElement const):
716         * svg/SVGGeometryElement.h:
717         (isType):
718         * svg/SVGLangSpace.cpp:
719         (WebCore::SVGLangSpace::svgAttributeChanged):
720
721 2018-10-09  Chris Dumez  <cdumez@apple.com>
722
723         Anchor target should be ignored on activation when the download attribute is set
724         https://bugs.webkit.org/show_bug.cgi?id=190408
725
726         Reviewed by Geoffrey Garen.
727
728         Anchor target should be ignored on activation when the download attribute is set:
729         - https://html.spec.whatwg.org/#the-a-element:downloading-hyperlinks-2
730
731         When the download attribute is set, we should use the "download the hyperlink" algorithm [1]
732         instead of the "follow the hyperlink" [2] algorithm.
733
734         Note that the "download the hyperlink" triggers a download and ignores the target attribute
735         entirely.
736
737         This is important as an anchor element with target=_blank and the download attribute set may
738         fail because of Safari's popup blocker if we do not disregard the anchor target.
739
740         [1] https://html.spec.whatwg.org/#downloading-hyperlinks
741         [2] https://html.spec.whatwg.org/#following-hyperlinks-2
742
743         Tests: fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html
744                fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html
745
746         * loader/FrameLoader.cpp:
747         (WebCore::FrameLoader::loadURL):
748
749 2018-10-09  Michael Catanzaro  <mcatanzaro@igalia.com>
750
751         [WPE][GTK] Complex text crashes with harfbuzz 1.8.8
752         https://bugs.webkit.org/show_bug.cgi?id=190409
753
754         Reviewed by Žan Doberšek.
755
756         We discovered that harfbuzz 1.8.8 breaks WebKit by changing the ownership semantics of
757         hb_icu_get_unicode_funcs() from (transfer full) to (transfer none). Our code was actually
758         expecting (transfer none), so it's not immediately clear to me why it's crashing now, but
759         doesn't matter as Behdad recommends removing this line of code because it hasn't been
760         been needed for many years.
761
762         This should be covered by all our complex text tests if the bots were upgraded to the newer
763         harfbuzz.
764
765         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
766         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
767
768 2018-10-09  Daniel Bates  <dabates@apple.com>
769
770         [iOS] Cleanup EventHandler::passSubframeEventToSubframe()
771         https://bugs.webkit.org/show_bug.cgi?id=190390
772
773         Reviewed by Wenson Hsieh.
774
775         Unindent case statements in switch block and use more auto.
776
777         * page/ios/EventHandlerIOS.mm:
778         (WebCore::EventHandler::passSubframeEventToSubframe):
779
780 2018-10-09  Daniel Bates  <dabates@apple.com>
781
782         Cleanup WebEvent.mm
783         https://bugs.webkit.org/show_bug.cgi?id=190391
784
785         Reviewed by Wenson Hsieh.
786
787         Unindent case statements in switch blocks.
788
789         * platform/ios/WebEvent.mm:
790         (-[WebEvent _typeDescription]):
791         (-[WebEvent _modiferFlagsDescription]):
792         (-[WebEvent _touchPhaseDescription:]):
793         (-[WebEvent _eventDescription]):
794
795 2018-10-09  Oriol Brufau  <obrufau@igalia.com>
796
797         Resolve inset properties to computed style when there is overconstraintment
798         https://bugs.webkit.org/show_bug.cgi?id=188711
799
800         Reviewed by Manuel Rego Casasnovas.
801
802         This patch makes WebKit behave closer to Blink. Specifically,
803          - In overconstrained relative or absolute positioning, inset properties resolve
804            to the computed value (absolutizing percentages) instead of to the used value.
805          - In fixed positioning, the resolved value of non-'auto' values is no longer
806            increased by the border of the containg block.
807
808         This patch can slighlty alter the resolved value if it's a long decimal number.
809
810         Tests: imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-absolute.html
811                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-fixed.html
812                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-nobox.html
813                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-relative.html
814                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-static.html
815                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky.html
816
817         * css/CSSComputedStyleDeclaration.cpp:
818         (WebCore::positionOffsetValue):
819         * rendering/RenderBox.h:
820
821 2018-10-09  Jiewen Tan  <jiewen_tan@apple.com>
822
823         [WebAuthN] Import CTAP HID message and packet structure from Chromium
824         https://bugs.webkit.org/show_bug.cgi?id=189289
825         <rdar://problem/44120310>
826
827         Reviewed by Brent Fulgham.
828
829         This patch imports CTAP HID message and packet structure:
830         https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#message-and-packet-structure
831         from Chromium. With this library, WebKit can now turn binaries into messages that CTAP devices could understand.
832         This patch contains the following Chromium files and modifies them to fit into WebKit:
833         https://cs.chromium.org/chromium/src/device/fido/fido_constants.cc?l=1&rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
834         https://cs.chromium.org/chromium/src/device/fido/fido_constants.h?l=1&rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
835         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_message.cc?l=1&rcl=387f3725de2842e0e6b7175a9b2ed472b0cf781a
836         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_message.h?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
837         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_packet.cc?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
838         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_packet.h?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
839         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_message_unittest.cc?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
840
841         Covered by API tests.
842
843         * Modules/webauthn/fido/FidoConstants.cpp: Added.
844         (fido::isFidoHidDeviceCommand):
845         * Modules/webauthn/fido/FidoConstants.h: Added.
846         * Modules/webauthn/fido/FidoHidMessage.cpp: Added.
847         (fido::FidoHidMessage::create):
848         (fido::FidoHidMessage::createFromSerializedData):
849         (fido::FidoHidMessage::messageComplete const):
850         (fido::FidoHidMessage::getMessagePayload const):
851         (fido::FidoHidMessage::popNextPacket):
852         (fido::FidoHidMessage::addContinuationPacket):
853         (fido::FidoHidMessage::numPackets const):
854         (fido::FidoHidMessage::FidoHidMessage):
855         * Modules/webauthn/fido/FidoHidMessage.h: Added.
856         * Modules/webauthn/fido/FidoHidPacket.cpp: Added.
857         (fido::FidoHidPacket::FidoHidPacket):
858         (fido::FidoHidInitPacket::createFromSerializedData):
859         (fido::FidoHidInitPacket::FidoHidInitPacket):
860         (fido::FidoHidInitPacket::getSerializedData const):
861         (fido::FidoHidContinuationPacket::createFromSerializedData):
862         (fido::FidoHidContinuationPacket::FidoHidContinuationPacket):
863         (fido::FidoHidContinuationPacket::getSerializedData const):
864         * Modules/webauthn/fido/FidoHidPacket.h: Added.
865         * Modules/webauthn/fido/FidoParsingUtils.cpp: Added.
866         (fido::getInitPacketData):
867         (fido::getContinuationPacketData):
868         * Modules/webauthn/fido/FidoParsingUtils.h: Added.
869         * Sources.txt:
870         * WebCore.xcodeproj/project.pbxproj:
871
872 2018-10-09  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
873
874         [CoordGraphics] Remove the 'previous backing store' logic
875         https://bugs.webkit.org/show_bug.cgi?id=188838
876
877         Reviewed by Žan Doberšek.
878
879         Remove previousBackingStore from LayerState, since it's not needed anymore.
880         When there is scale adjustment, we now simply discard mainBackingStore and
881         recreate a new one.
882
883         No new tests required.
884
885         * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
886         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
887         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
888         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
889         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
890
891 2018-10-09  Antti Koivisto  <antti@apple.com>
892
893         [PSON] Prewarm system UI font
894         https://bugs.webkit.org/show_bug.cgi?id=190397
895
896         Reviewed by Geoffrey Garen.
897
898         Cache system UI font fallbacks. Almost every web process needs these.
899
900         * page/ProcessWarming.cpp:
901         (WebCore::ProcessWarming::prewarmGlobally):
902
903 2018-10-09  Chris Dumez  <cdumez@apple.com>
904
905         REGRESSION (Safari 12): Download of Blob URL fails
906         https://bugs.webkit.org/show_bug.cgi?id=190351
907         <rdar://problem/45091181>
908
909         Reviewed by Geoffrey Garen.
910
911         When using both the download attribute and target="_blank" on an anchor element, we would
912         mistakenly drop the download attribute after the "new window" policy decision has been made.
913         As a result, we would try to load the blob instead of downloading it.
914
915         Test: fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html
916
917         * loader/FrameLoader.cpp:
918         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
919
920 2018-10-09  Alicia Boya García  <aboya@igalia.com>
921
922         [MSE][GStreamer] r236735 has some dead ASSERTs that need to be moved
923         https://bugs.webkit.org/show_bug.cgi?id=190394
924
925         Reviewed by Xabier Rodriguez-Calvar.
926
927         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
928         (WebCore::createOptionalParserForFormat):
929
930 2018-10-09  Chris Dumez  <cdumez@apple.com>
931
932         Have DOMWindow get its frame from its document
933         https://bugs.webkit.org/show_bug.cgi?id=190389
934
935         Reviewed by Geoff Garen.
936
937         Have DOMWindow get its frame from its document instead of having its own m_frame which can potentially
938         be out-of-sync.
939
940         * dom/Document.cpp:
941         (WebCore::Document::frameDestroyed):
942         (WebCore::Document::willDetachPage):
943         (WebCore::Document::attachToCachedFrame):
944         * dom/Document.h:
945         * page/DOMWindow.cpp:
946         (WebCore::DOMWindow::allowPopUp):
947         (WebCore::ContextDestructionObserver):
948         (WebCore::DOMWindow::didSecureTransitionTo):
949         (WebCore::DOMWindow::frameDestroyed):
950         (WebCore::DOMWindow::willDetachDocumentFromFrame):
951         (WebCore::DOMWindow::reconnectDOMWindowProperties):
952         (WebCore::DOMWindow::isCurrentlyDisplayedInFrame const):
953         (WebCore::DOMWindow::collectMatchingElementsInFlatTree):
954         (WebCore::DOMWindow::matchingElementInFlatTree):
955         (WebCore::DOMWindow::orientation const):
956         (WebCore::DOMWindow::console const):
957         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
958         (WebCore::DOMWindow::webkitNamespace):
959         (WebCore::DOMWindow::postMessage):
960         (WebCore::DOMWindow::postMessageTimerFired):
961         (WebCore::DOMWindow::frameElement const):
962         (WebCore::DOMWindow::focus):
963         (WebCore::DOMWindow::blur):
964         (WebCore::DOMWindow::close):
965         (WebCore::DOMWindow::print):
966         (WebCore::DOMWindow::stop):
967         (WebCore::DOMWindow::alert):
968         (WebCore::DOMWindow::confirm):
969         (WebCore::DOMWindow::prompt):
970         (WebCore::DOMWindow::find const):
971         (WebCore::DOMWindow::outerHeight const):
972         (WebCore::DOMWindow::outerWidth const):
973         (WebCore::DOMWindow::innerHeight const):
974         (WebCore::DOMWindow::innerWidth const):
975         (WebCore::DOMWindow::screenX const):
976         (WebCore::DOMWindow::screenY const):
977         (WebCore::DOMWindow::scrollX const):
978         (WebCore::DOMWindow::scrollY const):
979         (WebCore::DOMWindow::closed const):
980         (WebCore::DOMWindow::length const):
981         (WebCore::DOMWindow::name const):
982         (WebCore::DOMWindow::setName):
983         (WebCore::DOMWindow::setStatus):
984         (WebCore::DOMWindow::setDefaultStatus):
985         (WebCore::DOMWindow::self const):
986         (WebCore::DOMWindow::opener const):
987         (WebCore::DOMWindow::disownOpener):
988         (WebCore::DOMWindow::parent const):
989         (WebCore::DOMWindow::top const):
990         (WebCore::DOMWindow::getMatchedCSSRules const):
991         (WebCore::DOMWindow::devicePixelRatio const):
992         (WebCore::DOMWindow::scrollBy const):
993         (WebCore::DOMWindow::scrollTo const):
994         (WebCore::DOMWindow::allowedToChangeWindowGeometry const):
995         (WebCore::DOMWindow::moveBy const):
996         (WebCore::DOMWindow::moveTo const):
997         (WebCore::DOMWindow::resizeBy const):
998         (WebCore::DOMWindow::resizeTo const):
999         (WebCore::DOMWindow::clearTimeout):
1000         (WebCore::DOMWindow::isSameSecurityOriginAsMainFrame const):
1001         (WebCore::DOMWindow::finishedLoading):
1002         (WebCore::DOMWindow::setLocation):
1003         (WebCore::DOMWindow::open):
1004         (WebCore::DOMWindow::showModalDialog):
1005         (WebCore::DOMWindow::frame const):
1006         (WebCore::FrameDestructionObserver): Deleted.
1007         (WebCore::DOMWindow::willDetachPage): Deleted.
1008         (WebCore::DOMWindow::detachFromFrame): Deleted.
1009         (WebCore::DOMWindow::attachToFrame): Deleted.
1010         * page/DOMWindow.h:
1011
1012 2018-10-09  Jer Noble  <jer.noble@apple.com>
1013
1014         ISOTrackEncryptionBox returns incorrect defaultKeyID
1015         https://bugs.webkit.org/show_bug.cgi?id=190368
1016
1017         Reviewed by Eric Carlson.
1018
1019         Test: TestWebKitAPI.ISOBox.ISOProtectionSchemeInfoBox
1020
1021         ISOTrackEncryptionBox::parse() increments the data offset by an incorrect amount.
1022
1023         Drive-by fix: add EXPORT macros to all the ISO box classes so that tests can be written in TestWebKitAPI.
1024
1025         * WebCore.xcodeproj/project.pbxproj:
1026         * platform/graphics/iso/ISOBox.h:
1027         * platform/graphics/iso/ISOOriginalFormatBox.h:
1028         * platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
1029         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h:
1030         * platform/graphics/iso/ISOSchemeInformationBox.h:
1031         * platform/graphics/iso/ISOSchemeTypeBox.h:
1032         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
1033         (WebCore::ISOTrackEncryptionBox::parse):
1034         * platform/graphics/iso/ISOTrackEncryptionBox.h:
1035
1036 2018-10-09  Youenn Fablet  <youenn@apple.com>
1037
1038         Add support for IceCandidate stats
1039         https://bugs.webkit.org/show_bug.cgi?id=190329
1040
1041         Reviewed by Eric Carlson.
1042
1043         Convert IceCandidate stats gathered by libwebrtc.
1044         Since networkType might be sensitive information, we currently do not expose it.
1045         We do not expose address either if it is a host or prflx candidate.
1046
1047         Test: webrtc/candidate-stats.html
1048
1049         * Modules/mediastream/RTCStatsReport.h:
1050         * Modules/mediastream/RTCStatsReport.idl:
1051         * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
1052         (WebCore::iceCandidateState):
1053         (WebCore::fillRTCIceCandidateStats):
1054         (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
1055
1056 2018-10-09  Philippe Normand  <pnormand@igalia.com>
1057
1058         [GStreamer] Stealing cross-origin video pixel with HLS
1059         https://bugs.webkit.org/show_bug.cgi?id=190003
1060
1061         Reviewed by Xabier Rodriguez-Calvar.
1062
1063         Report the SecurityOrigin of downloaded adaptivedemux (HLS, DASH,
1064         SmoothStreaming) fragments as tainted if their origin differs from
1065         the manifest SecurityOrigin. SecurityOrigins are stored in the
1066         CachedResourceStreamingClient implemented in the internal
1067         GStreamer HTTP(S) source element.
1068
1069         The implementation is not ideal yet because the fragments download
1070         is performed by the WebProcess, until bug 189967 is fixed. When
1071         this bug is fixed, the m_hasTaintedOrigin member variable should
1072         be removed and all checks be done unconditionally to the
1073         webkithttpsrc element which will manage the download of the
1074         manifests and fragments.
1075
1076         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1077         (WebCore::MediaPlayerPrivateGStreamer::loadFull): Reset the m_hasTaintedOrigin value.
1078         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Get the
1079         fragment URL from the adaptivedemux stats message and check if its
1080         origin is tainted.
1081         (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
1082         Initial implementation by checking the m_hasTaintedOrigin member
1083         variable value.
1084         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1085         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1086         (CachedResourceStreamingClient::responseReceived): Store the
1087         resource origin internally so it can be checked later on by
1088         webKitSrtcWouldTaintOrigin().
1089         (webKitSrcWouldTaintOrigin): Check given origin against cached
1090         origins. This implementation is similar to Cocoa's
1091         WebCoreNSURLSession implementation.
1092         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
1093
1094 2018-10-09  Antti Koivisto  <antti@apple.com>
1095
1096         Prewarm FontDatabase on process swap
1097         https://bugs.webkit.org/show_bug.cgi?id=190312
1098
1099         Reviewed by Chris Dumez.
1100
1101         Implement basic prewarming of FontDatabase. When the domain of the first page load on
1102         a new process is known we pass the list of font families previous used by that domain to the
1103         process. This is used to prewarm CoreText font database. Initialization (which involves lots of
1104         blocking IPC) happens outside the main thread so the fonts are ready to use when needed.
1105
1106         * WebCore.xcodeproj/project.pbxproj:
1107         * page/PrewarmInformation.h: Added.
1108         (WebCore::PrewarmInformation::encode const):
1109         (WebCore::PrewarmInformation::decode):
1110
1111         Add data structure for prewarm information with encode/decode support.
1112
1113         * page/ProcessWarming.cpp:
1114         (WebCore::ProcessWarming::collectPrewarmInformation):
1115         (WebCore::ProcessWarming::prewarmWithInformation):
1116
1117         Prewarming interface to be used from WebKit.
1118
1119         * page/ProcessWarming.h:
1120         * platform/graphics/FontCache.cpp:
1121         (WebCore::FontCache::collectPrewarmInformation const):
1122         (WebCore::FontCache::prewarm):
1123         * platform/graphics/FontCache.h:
1124         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1125         (WebCore::FontDatabase::collectionForFamily):
1126         (WebCore::FontDatabase::fontForPostScriptName):
1127         (WebCore::FontDatabase::clear):
1128
1129         Add mutex for thread safe access.
1130
1131         (WebCore::FontCache::createFontPlatformData):
1132         (WebCore::FontCache::collectPrewarmInformation const):
1133
1134         Collect font families seen by this process.
1135
1136         (WebCore::FontCache::prewarm):
1137
1138         Prewarm FontDatabase in a dispatch queue.
1139
1140 2018-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1141
1142         [Cocoa] [WK2] Add support for text alignment and text lists in font attributes
1143         https://bugs.webkit.org/show_bug.cgi?id=190342
1144         <rdar://problem/44767118>
1145
1146         Reviewed by Tim Horton.
1147
1148         Adds support for computing and encoding information about text alignment and enclosing list elements in the font
1149         attributes dictionary, exposed to the UI delegate on Cocoa platforms. This is exposed through NSParagraphStyle,
1150         which contains properties for both `NSTextAlignment` and an array of enclosing `NSTextList` objects.
1151
1152         Test:   FontAttributes.NestedTextListsWithHorizontalAlignment
1153                 FontAttributes.FontAttributesAfterChangingSelection
1154
1155         * editing/Editor.cpp:
1156         (WebCore::editableTextListsAtPositionInDescendingOrder):
1157
1158         Add a helper function to ascend the DOM, starting at the given position, in search of enclosing list elements.
1159         For each enclosing list element we find within the scope of the editable root, we create a `TextList`
1160         representing the list element.
1161
1162         (WebCore::Editor::fontAttributesAtSelectionStart const):
1163
1164         Compute and set enclosing text lists and text alignment. For text alignment, we convert the initial text-align
1165         value, `start`, to NSTextAlignmentNatural (the default text alignment type on Cocoa platforms); other values
1166         then map to Left, Right, Center, and Justified as expected (taking direction into account).
1167
1168         * editing/FontAttributes.h:
1169         (WebCore::TextList::encode const):
1170         (WebCore::TextList::decode):
1171
1172         Introduce TextList, a platform-agnostic representation of an unordered or ordered list. On Cocoa, this can be
1173         used to construct a corresponding NSTextList.
1174
1175         * editing/cocoa/FontAttributesCocoa.mm:
1176         (WebCore::cocoaTextListMarkerName):
1177
1178         Attempt to map a WebCore list style type to a `NSTextListMarker*` constant. While most of the Cocoa marker
1179         formats have a corresponding web-exposed list style type, many web-exposed types have no Cocoa equivalent; as
1180         such, fall back to default marker formats: "{disc}" for unordered lists and "{decimal}" for ordered lists.
1181
1182         (WebCore::TextList::createTextList const):
1183         (WebCore::FontAttributes::createDictionary const):
1184
1185         Include an NSParagraphStyle in the dictionary of font attributes that includes information about text alignment
1186         and enclosing text lists (per Cocoa convention, in order from outermost list to innermost list).
1187
1188 2018-10-08  Justin Fan  <justin_fan@apple.com>
1189
1190         WebGPU: Rename old WebGPU prototype to WebMetal
1191         https://bugs.webkit.org/show_bug.cgi?id=190325
1192         <rdar://problem/44990443>
1193
1194         Reviewed by Dean Jackson.
1195
1196         Existing WebGPU tests also renamed to reflect WebGPU -> WebMetal change.
1197
1198         Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
1199
1200         * CMakeLists.txt:
1201         * Configurations/FeatureDefines.xcconfig:
1202         * DerivedSources.make:
1203         * Sources.txt:
1204         * SourcesCocoa.txt:
1205         * WebCore.xcodeproj/project.pbxproj:
1206         * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp.
1207         (WebCore::toJSNewlyCreated):
1208         (WebCore::toJS):
1209         * bindings/js/JSWebMetalRenderingContextCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderingContextCustom.cpp.
1210         (WebCore::JSWebMetalRenderingContext::visitAdditionalChildren):
1211         * bindings/js/WebCoreBuiltinNames.h:
1212         * dom/Document.cpp:
1213         (WebCore::Document::getCSSCanvasContext):
1214         * dom/Document.h:
1215         * dom/Document.idl:
1216         * html/HTMLCanvasElement.cpp:
1217         (WebCore::HTMLCanvasElement::getContext):
1218         (WebCore::HTMLCanvasElement::isWebMetalType):
1219         (WebCore::HTMLCanvasElement::createContextWebMetal):
1220         (WebCore::HTMLCanvasElement::getContextWebMetal):
1221         (WebCore::HTMLCanvasElement::isWebGPUType): Deleted.
1222         (WebCore::HTMLCanvasElement::createContextWebGPU): Deleted.
1223         (WebCore::HTMLCanvasElement::getContextWebGPU): Deleted.
1224         * html/HTMLCanvasElement.h:
1225         * html/HTMLCanvasElement.idl:
1226         * html/canvas/CanvasRenderingContext.h:
1227         (WebCore::CanvasRenderingContext::isWebMetal const):
1228         (WebCore::CanvasRenderingContext::isWebGPU const): Deleted.
1229         * html/canvas/WebGPURenderingContext.cpp: Removed.
1230         * html/canvas/WebMetalBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.cpp.
1231         (WebCore::WebMetalBuffer::create):
1232         (WebCore::WebMetalBuffer::WebMetalBuffer):
1233         * html/canvas/WebMetalBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.h.
1234         * html/canvas/WebMetalBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.idl.
1235         * html/canvas/WebMetalCommandBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp.
1236         (WebCore::WebMetalCommandBuffer::create):
1237         (WebCore::WebMetalCommandBuffer::WebMetalCommandBuffer):
1238         (WebCore::WebMetalCommandBuffer::~WebMetalCommandBuffer):
1239         (WebCore::WebMetalCommandBuffer::commit):
1240         (WebCore::WebMetalCommandBuffer::presentDrawable):
1241         (WebCore::WebMetalCommandBuffer::createRenderCommandEncoderWithDescriptor):
1242         (WebCore::WebMetalCommandBuffer::createComputeCommandEncoder):
1243         (WebCore::WebMetalCommandBuffer::completed):
1244         * html/canvas/WebMetalCommandBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
1245         * html/canvas/WebMetalCommandBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
1246         * html/canvas/WebMetalCommandQueue.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.cpp.
1247         (WebCore::WebMetalCommandQueue::create):
1248         (WebCore::WebMetalCommandQueue::WebMetalCommandQueue):
1249         (WebCore::WebMetalCommandQueue::createCommandBuffer):
1250         * html/canvas/WebMetalCommandQueue.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.h.
1251         * html/canvas/WebMetalCommandQueue.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.idl.
1252         * html/canvas/WebMetalComputeCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp.
1253         (WebCore::GPUSizeMake):
1254         (WebCore::WebMetalComputeCommandEncoder::create):
1255         (WebCore::WebMetalComputeCommandEncoder::WebMetalComputeCommandEncoder):
1256         (WebCore::WebMetalComputeCommandEncoder::setComputePipelineState):
1257         (WebCore::WebMetalComputeCommandEncoder::setBuffer):
1258         (WebCore::WebMetalComputeCommandEncoder::dispatch):
1259         (WebCore::WebMetalComputeCommandEncoder::endEncoding):
1260         * html/canvas/WebMetalComputeCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h.
1261         * html/canvas/WebMetalComputeCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl.
1262         * html/canvas/WebMetalComputePipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp.
1263         (WebCore::WebMetalComputePipelineState::create):
1264         (WebCore::WebMetalComputePipelineState::WebMetalComputePipelineState):
1265         * html/canvas/WebMetalComputePipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.h.
1266         * html/canvas/WebMetalComputePipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.idl.
1267         * html/canvas/WebMetalDepthStencilDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp.
1268         (WebCore::WebMetalDepthStencilDescriptor::create):
1269         (WebCore::WebMetalDepthStencilDescriptor::depthWriteEnabled const):
1270         (WebCore::WebMetalDepthStencilDescriptor::setDepthWriteEnabled):
1271         (WebCore::WebMetalDepthStencilDescriptor::depthCompareFunction const):
1272         (WebCore::WebMetalDepthStencilDescriptor::setDepthCompareFunction):
1273         * html/canvas/WebMetalDepthStencilDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h.
1274         * html/canvas/WebMetalDepthStencilDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl.
1275         * html/canvas/WebMetalDepthStencilState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp.
1276         (WebCore::WebMetalDepthStencilState::create):
1277         (WebCore::WebMetalDepthStencilState::WebMetalDepthStencilState):
1278         (WebCore::WebMetalDepthStencilState::label const):
1279         (WebCore::WebMetalDepthStencilState::setLabel):
1280         * html/canvas/WebMetalDepthStencilState.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.h.
1281         * html/canvas/WebMetalDepthStencilState.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.idl.
1282         * html/canvas/WebMetalDrawable.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.cpp.
1283         (WebCore::WebMetalDrawable::create):
1284         (WebCore::WebMetalDrawable::WebMetalDrawable):
1285         * html/canvas/WebMetalDrawable.h: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.h.
1286         (WebCore::WebMetalDrawable::texture):
1287         * html/canvas/WebMetalDrawable.idl: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.idl.
1288         * html/canvas/WebMetalEnums.cpp: Renamed from Source/WebCore/html/canvas/WebGPUEnums.cpp.
1289         (WebCore::toWebMetalCompareFunction):
1290         (WebCore::web3DCompareFunctionName):
1291         (WebCore::toGPUCompareFunction):
1292         * html/canvas/WebMetalEnums.h: Renamed from Source/WebCore/html/canvas/WebGPUEnums.h.
1293         * html/canvas/WebMetalEnums.idl: Renamed from Source/WebCore/html/canvas/WebGPUEnums.idl.
1294         * html/canvas/WebMetalFunction.cpp: Renamed from Source/WebCore/html/canvas/WebGPUFunction.cpp.
1295         (WebCore::WebMetalFunction::create):
1296         (WebCore::WebMetalFunction::WebMetalFunction):
1297         * html/canvas/WebMetalFunction.h: Renamed from Source/WebCore/html/canvas/WebGPUFunction.h.
1298         * html/canvas/WebMetalFunction.idl: Renamed from Source/WebCore/html/canvas/WebGPUFunction.idl.
1299         * html/canvas/WebMetalLibrary.cpp: Renamed from Source/WebCore/html/canvas/WebGPULibrary.cpp.
1300         (WebCore::WebMetalLibrary::create):
1301         (WebCore::WebMetalLibrary::WebMetalLibrary):
1302         (WebCore::WebMetalLibrary::functionNames const):
1303         (WebCore::WebMetalLibrary::functionWithName const):
1304         * html/canvas/WebMetalLibrary.h: Renamed from Source/WebCore/html/canvas/WebGPULibrary.h.
1305         * html/canvas/WebMetalLibrary.idl: Renamed from Source/WebCore/html/canvas/WebGPULibrary.idl.
1306         * html/canvas/WebMetalRenderCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp.
1307         (WebCore::WebMetalRenderCommandEncoder::create):
1308         (WebCore::WebMetalRenderCommandEncoder::WebMetalRenderCommandEncoder):
1309         (WebCore::WebMetalRenderCommandEncoder::setRenderPipelineState):
1310         (WebCore::WebMetalRenderCommandEncoder::setDepthStencilState):
1311         (WebCore::WebMetalRenderCommandEncoder::setVertexBuffer):
1312         (WebCore::WebMetalRenderCommandEncoder::setFragmentBuffer):
1313         (WebCore::WebMetalRenderCommandEncoder::drawPrimitives):
1314         (WebCore::WebMetalRenderCommandEncoder::endEncoding):
1315         * html/canvas/WebMetalRenderCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h.
1316         * html/canvas/WebMetalRenderCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl.
1317         * html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp.
1318         (WebCore::WebMetalRenderPassAttachmentDescriptor::WebMetalRenderPassAttachmentDescriptor):
1319         (WebCore::WebMetalRenderPassAttachmentDescriptor::loadAction const):
1320         (WebCore::WebMetalRenderPassAttachmentDescriptor::setLoadAction):
1321         (WebCore::WebMetalRenderPassAttachmentDescriptor::storeAction const):
1322         (WebCore::WebMetalRenderPassAttachmentDescriptor::setStoreAction):
1323         (WebCore::WebMetalRenderPassAttachmentDescriptor::texture const):
1324         (WebCore::WebMetalRenderPassAttachmentDescriptor::setTexture):
1325         * html/canvas/WebMetalRenderPassAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h.
1326         * html/canvas/WebMetalRenderPassAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.idl.
1327         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp.
1328         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::create):
1329         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::WebMetalRenderPassColorAttachmentDescriptor):
1330         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::descriptor const):
1331         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::clearColor const):
1332         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::setClearColor):
1333         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h.
1334         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl.
1335         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp.
1336         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::create):
1337         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::WebMetalRenderPassDepthAttachmentDescriptor):
1338         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::clearDepth const):
1339         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::setClearDepth):
1340         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::descriptor const):
1341         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h.
1342         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl.
1343         * html/canvas/WebMetalRenderPassDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp.
1344         (WebCore::WebMetalRenderPassDescriptor::create):
1345         (WebCore::WebMetalRenderPassDescriptor::depthAttachment):
1346         (WebCore::WebMetalRenderPassDescriptor::colorAttachments):
1347         * html/canvas/WebMetalRenderPassDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h.
1348         * html/canvas/WebMetalRenderPassDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl.
1349         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp.
1350         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::create):
1351         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::WebMetalRenderPipelineColorAttachmentDescriptor):
1352         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::pixelFormat const):
1353         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::setPixelFormat):
1354         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h.
1355         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl.
1356         * html/canvas/WebMetalRenderPipelineDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp.
1357         (WebCore::WebMetalRenderPipelineDescriptor::create):
1358         (WebCore::WebMetalRenderPipelineDescriptor::vertexFunction const):
1359         (WebCore::WebMetalRenderPipelineDescriptor::setVertexFunction):
1360         (WebCore::WebMetalRenderPipelineDescriptor::fragmentFunction const):
1361         (WebCore::WebMetalRenderPipelineDescriptor::setFragmentFunction):
1362         (WebCore::WebMetalRenderPipelineDescriptor::colorAttachments):
1363         (WebCore::WebMetalRenderPipelineDescriptor::depthAttachmentPixelFormat const):
1364         (WebCore::WebMetalRenderPipelineDescriptor::setDepthAttachmentPixelFormat):
1365         (WebCore::WebMetalRenderPipelineDescriptor::reset):
1366         * html/canvas/WebMetalRenderPipelineDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h.
1367         * html/canvas/WebMetalRenderPipelineDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl.
1368         * html/canvas/WebMetalRenderPipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp.
1369         (WebCore::WebMetalRenderPipelineState::create):
1370         (WebCore::WebMetalRenderPipelineState::WebMetalRenderPipelineState):
1371         (WebCore::WebMetalRenderPipelineState::label const):
1372         (WebCore::WebMetalRenderPipelineState::setLabel):
1373         * html/canvas/WebMetalRenderPipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.h.
1374         * html/canvas/WebMetalRenderPipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.idl.
1375         * html/canvas/WebMetalRenderingContext.cpp: Added.
1376         (WebCore::WebMetalRenderingContext::create):
1377         (WebCore::WebMetalRenderingContext::WebMetalRenderingContext):
1378         (WebCore::WebMetalRenderingContext::canvas const):
1379         (WebCore::WebMetalRenderingContext::initializeNewContext):
1380         (WebCore::WebMetalRenderingContext::clampedCanvasSize const):
1381         (WebCore::WebMetalRenderingContext::hasPendingActivity const):
1382         (WebCore::WebMetalRenderingContext::stop):
1383         (WebCore::WebMetalRenderingContext::activeDOMObjectName const):
1384         (WebCore::WebMetalRenderingContext::canSuspendForDocumentSuspension const):
1385         (WebCore::WebMetalRenderingContext::platformLayer const):
1386         (WebCore::WebMetalRenderingContext::markLayerComposited):
1387         (WebCore::WebMetalRenderingContext::reshape):
1388         (WebCore::WebMetalRenderingContext::createLibrary):
1389         (WebCore::WebMetalRenderingContext::createRenderPipelineState):
1390         (WebCore::WebMetalRenderingContext::createDepthStencilState):
1391         (WebCore::WebMetalRenderingContext::createComputePipelineState):
1392         (WebCore::WebMetalRenderingContext::createCommandQueue):
1393         (WebCore::WebMetalRenderingContext::nextDrawable):
1394         (WebCore::WebMetalRenderingContext::createBuffer):
1395         (WebCore::WebMetalRenderingContext::createTexture):
1396         * html/canvas/WebMetalRenderingContext.h: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.h.
1397         * html/canvas/WebMetalRenderingContext.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.idl.
1398         * html/canvas/WebMetalSize.h: Renamed from Source/WebCore/html/canvas/WebGPUSize.h.
1399         * html/canvas/WebMetalSize.idl: Renamed from Source/WebCore/html/canvas/WebGPUSize.idl.
1400         * html/canvas/WebMetalTexture.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTexture.cpp.
1401         (WebCore::WebMetalTexture::create):
1402         (WebCore::WebMetalTexture::WebMetalTexture):
1403         * html/canvas/WebMetalTexture.h: Renamed from Source/WebCore/html/canvas/WebGPUTexture.h.
1404         * html/canvas/WebMetalTexture.idl: Renamed from Source/WebCore/html/canvas/WebGPUTexture.idl.
1405         * html/canvas/WebMetalTextureDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.cpp.
1406         (WebCore::WebMetalTextureDescriptor::create):
1407         (WebCore::WebMetalTextureDescriptor::WebMetalTextureDescriptor):
1408         (WebCore::WebMetalTextureDescriptor::width const):
1409         (WebCore::WebMetalTextureDescriptor::setWidth):
1410         (WebCore::WebMetalTextureDescriptor::height const):
1411         (WebCore::WebMetalTextureDescriptor::setHeight):
1412         (WebCore::WebMetalTextureDescriptor::sampleCount const):
1413         (WebCore::WebMetalTextureDescriptor::setSampleCount):
1414         (WebCore::WebMetalTextureDescriptor::textureType const):
1415         (WebCore::WebMetalTextureDescriptor::setTextureType):
1416         (WebCore::WebMetalTextureDescriptor::storageMode const):
1417         (WebCore::WebMetalTextureDescriptor::setStorageMode):
1418         (WebCore::WebMetalTextureDescriptor::usage const):
1419         (WebCore::WebMetalTextureDescriptor::setUsage):
1420         * html/canvas/WebMetalTextureDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.h.
1421         * html/canvas/WebMetalTextureDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl.
1422         * inspector/InspectorCanvas.cpp:
1423         (WebCore::InspectorCanvas::buildObjectForCanvas):
1424         * inspector/agents/InspectorCanvasAgent.cpp:
1425         (WebCore::InspectorCanvasAgent::requestContent):
1426         (WebCore::contextAsScriptValue):
1427         * page/RuntimeEnabledFeatures.h:
1428         (WebCore::RuntimeEnabledFeatures::setWebMetalEnabled):
1429         (WebCore::RuntimeEnabledFeatures::webMetalEnabled const):
1430         (WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted.
1431         (WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted.
1432         * platform/Logging.h:
1433         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1434         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
1435         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1436         * platform/graphics/cocoa/WebMetalLayer.h: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.h.
1437         * platform/graphics/cocoa/WebMetalLayer.mm: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm.
1438         (-[WebMetalLayer initWithGPUDevice:]):
1439         * platform/graphics/gpu/GPUBuffer.cpp:
1440         (WebCore::GPUBuffer::~GPUBuffer):
1441         * platform/graphics/gpu/GPUBuffer.h:
1442         * platform/graphics/gpu/GPUCommandBuffer.cpp:
1443         (WebCore::GPUCommandBuffer::~GPUCommandBuffer):
1444         * platform/graphics/gpu/GPUCommandBuffer.h:
1445         * platform/graphics/gpu/GPUCommandQueue.cpp:
1446         (WebCore::GPUCommandQueue::~GPUCommandQueue):
1447         * platform/graphics/gpu/GPUCommandQueue.h:
1448         * platform/graphics/gpu/GPUComputeCommandEncoder.cpp:
1449         (WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
1450         * platform/graphics/gpu/GPUComputeCommandEncoder.h:
1451         * platform/graphics/gpu/GPUComputePipelineState.cpp:
1452         (WebCore::GPUComputePipelineState::~GPUComputePipelineState):
1453         * platform/graphics/gpu/GPUComputePipelineState.h:
1454         * platform/graphics/gpu/GPUDepthStencilDescriptor.cpp:
1455         (WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
1456         * platform/graphics/gpu/GPUDepthStencilDescriptor.h:
1457         * platform/graphics/gpu/GPUDepthStencilState.cpp:
1458         (WebCore::GPUDepthStencilState::~GPUDepthStencilState):
1459         * platform/graphics/gpu/GPUDepthStencilState.h:
1460         * platform/graphics/gpu/GPUDevice.cpp:
1461         (WebCore::GPUDevice::~GPUDevice):
1462         * platform/graphics/gpu/GPUDevice.h:
1463         (WebCore::GPUDevice::layer const):
1464         * platform/graphics/gpu/GPUDrawable.cpp:
1465         (WebCore::GPUDrawable::~GPUDrawable):
1466         * platform/graphics/gpu/GPUDrawable.h:
1467         * platform/graphics/gpu/GPUEnums.h:
1468         * platform/graphics/gpu/GPUFunction.cpp:
1469         (WebCore::GPUFunction::~GPUFunction):
1470         * platform/graphics/gpu/GPUFunction.h:
1471         * platform/graphics/gpu/GPULibrary.cpp:
1472         (WebCore::GPULibrary::~GPULibrary):
1473         * platform/graphics/gpu/GPULibrary.h:
1474         * platform/graphics/gpu/GPURenderCommandEncoder.cpp:
1475         (WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
1476         * platform/graphics/gpu/GPURenderCommandEncoder.h:
1477         * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp:
1478         (WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
1479         * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h:
1480         * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp:
1481         (WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
1482         * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h:
1483         * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp:
1484         (WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
1485         * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h:
1486         * platform/graphics/gpu/GPURenderPassDescriptor.cpp:
1487         (WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
1488         * platform/graphics/gpu/GPURenderPassDescriptor.h:
1489         * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp:
1490         (WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
1491         * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h:
1492         * platform/graphics/gpu/GPURenderPipelineDescriptor.cpp:
1493         (WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
1494         * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
1495         * platform/graphics/gpu/GPURenderPipelineState.cpp:
1496         (WebCore::GPURenderPipelineState::~GPURenderPipelineState):
1497         * platform/graphics/gpu/GPURenderPipelineState.h:
1498         * platform/graphics/gpu/GPUSize.h:
1499         * platform/graphics/gpu/GPUTexture.cpp:
1500         (WebCore::GPUTexture::~GPUTexture):
1501         * platform/graphics/gpu/GPUTexture.h:
1502         * platform/graphics/gpu/GPUTextureDescriptor.cpp:
1503         (WebCore::GPUTextureDescriptor::~GPUTextureDescriptor):
1504         * platform/graphics/gpu/GPUTextureDescriptor.h:
1505         * platform/graphics/metal/GPUBufferMetal.mm:
1506         (WebCore::GPUBuffer::GPUBuffer):
1507         * platform/graphics/metal/GPUCommandBufferMetal.mm:
1508         * platform/graphics/metal/GPUCommandQueueMetal.mm:
1509         * platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:
1510         * platform/graphics/metal/GPUComputePipelineStateMetal.mm:
1511         (WebCore::GPUComputePipelineState::GPUComputePipelineState):
1512         * platform/graphics/metal/GPUDepthStencilDescriptorMetal.mm:
1513         * platform/graphics/metal/GPUDepthStencilStateMetal.mm:
1514         (WebCore::GPUDepthStencilState::setLabel const):
1515         * platform/graphics/metal/GPUDeviceMetal.mm:
1516         (WebCore::GPUDevice::reshape const):
1517         * platform/graphics/metal/GPUDrawableMetal.mm:
1518         (WebCore::GPUDrawable::release):
1519         * platform/graphics/metal/GPUFunctionMetal.mm:
1520         * platform/graphics/metal/GPULibraryMetal.mm:
1521         (WebCore::GPULibrary::GPULibrary):
1522         * platform/graphics/metal/GPURenderCommandEncoderMetal.mm:
1523         (WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
1524         * platform/graphics/metal/GPURenderPassAttachmentDescriptorMetal.mm:
1525         * platform/graphics/metal/GPURenderPassColorAttachmentDescriptorMetal.mm:
1526         * platform/graphics/metal/GPURenderPassDepthAttachmentDescriptorMetal.mm:
1527         * platform/graphics/metal/GPURenderPassDescriptorMetal.mm:
1528         * platform/graphics/metal/GPURenderPipelineColorAttachmentDescriptorMetal.mm:
1529         * platform/graphics/metal/GPURenderPipelineDescriptorMetal.mm:
1530         * platform/graphics/metal/GPURenderPipelineStateMetal.mm:
1531         (WebCore::GPURenderPipelineState::setLabel const):
1532         * platform/graphics/metal/GPUTextureDescriptorMetal.mm:
1533         * platform/graphics/metal/GPUTextureMetal.mm:
1534         (WebCore::GPUTexture::GPUTexture):
1535         * testing/InternalSettings.cpp:
1536         (WebCore::InternalSettings::Backup::Backup):
1537         (WebCore::InternalSettings::Backup::restoreTo):
1538         (WebCore::InternalSettings::setWebMetalEnabled):
1539         (WebCore::InternalSettings::setWebGPUEnabled): Deleted.
1540         * testing/InternalSettings.h:
1541         * testing/InternalSettings.idl:
1542
1543 2018-10-08  Dean Jackson  <dino@apple.com>
1544
1545         CrashTracer: backboardd at Recursion :: QuartzCore: CA::Render::Updater::prepare_sublayer0
1546         https://bugs.webkit.org/show_bug.cgi?id=190376
1547         <rdar://problem/44986520>
1548
1549         Reviewed by Tim Horton.
1550
1551         Very deep CoreAnimation layer trees can cause problems. Reduce our maximum
1552         depth from 256 to 128.
1553
1554         Modified existing test: compositing/layer-creation/deep-tree.html
1555
1556         * platform/graphics/ca/GraphicsLayerCA.cpp: Cap the depth at 128.
1557
1558 2018-10-08  Commit Queue  <commit-queue@webkit.org>
1559
1560         Unreviewed, rolling out r236941.
1561         https://bugs.webkit.org/show_bug.cgi?id=190374
1562
1563         Causing API test failures in new test (Requested by jernoble
1564         on #webkit).
1565
1566         Reverted changeset:
1567
1568         "ISOTrackEncryptionBox returns incorrect defaultKeyID"
1569         https://bugs.webkit.org/show_bug.cgi?id=190368
1570         https://trac.webkit.org/changeset/236941
1571
1572 2018-10-08  Aditya Keerthi  <akeerthi@apple.com>
1573
1574         Make <input type=color> a runtime enabled (on-by-default) feature
1575         https://bugs.webkit.org/show_bug.cgi?id=189162
1576
1577         Reviewed by Wenson Hsieh and Tim Horton.
1578
1579         Enable the build-time flag INPUT_TYPE_COLOR by default and introduce a runtime-enabled feature for input type
1580         color, also on by default.
1581
1582         Covered by rebaselining existing layout tests.
1583
1584         * Configurations/FeatureDefines.xcconfig:
1585         * html/InputType.cpp:
1586         (WebCore::createInputTypeFactoryMap):
1587         * page/RuntimeEnabledFeatures.h:
1588         (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const):
1589         (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled):
1590
1591 2018-10-08  Jer Noble  <jer.noble@apple.com>
1592
1593         ISOTrackEncryptionBox returns incorrect defaultKeyID
1594         https://bugs.webkit.org/show_bug.cgi?id=190368
1595
1596         Reviewed by Eric Carlson.
1597
1598         Test: TestWebKitAPI.ISOBox.ISOProtectionSchemeInfoBox
1599
1600         ISOTrackEncryptionBox::parse() increments the data offset by an incorrect amount.
1601
1602         Drive-by fix: add EXPORT macros to all the ISO box classes so that tests can be written in TestWebKitAPI.
1603
1604         * WebCore.xcodeproj/project.pbxproj:
1605         * platform/graphics/iso/ISOBox.h:
1606         * platform/graphics/iso/ISOOriginalFormatBox.h:
1607         * platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
1608         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h:
1609         * platform/graphics/iso/ISOSchemeInformationBox.h:
1610         * platform/graphics/iso/ISOSchemeTypeBox.h:
1611         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
1612         (WebCore::ISOTrackEncryptionBox::parse):
1613         * platform/graphics/iso/ISOTrackEncryptionBox.h:
1614
1615 2018-10-08  Antti Koivisto  <antti@apple.com>
1616
1617         Move SystemFontDatabase to a file of its own
1618         https://bugs.webkit.org/show_bug.cgi?id=190347
1619
1620         Reviewed by Chris Dumez.
1621
1622         Also rename it to SystemFontDatabaseCoreText as it is CoreText specific.
1623
1624         * SourcesCocoa.txt:
1625         * WebCore.xcodeproj/project.pbxproj:
1626         * page/MemoryRelease.cpp:
1627         (WebCore::releaseNoncriticalMemory):
1628         * page/cocoa/MemoryReleaseCocoa.mm:
1629
1630         Release SystemFontDatabaseCoreText directly from platform specific cleanup code.
1631
1632         (WebCore::platformReleaseMemory):
1633         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
1634         (WebCore::FontDescription::invalidateCaches):
1635         (WebCore::systemFontCascadeList):
1636         (WebCore::FontCascadeDescription::effectiveFamilyCount const):
1637         (WebCore::FontCascadeDescription::effectiveFamilyAt const):
1638         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters): Deleted.
1639         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue const): Deleted.
1640         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator== const): Deleted.
1641         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash const): Deleted.
1642         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::hash): Deleted.
1643         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::equal): Deleted.
1644         (): Deleted.
1645         (WebCore::SystemFontDatabase::singleton): Deleted.
1646         (WebCore::SystemFontDatabase::systemFontCascadeList): Deleted.
1647         (WebCore::SystemFontDatabase::clear): Deleted.
1648         (WebCore::SystemFontDatabase::SystemFontDatabase): Deleted.
1649         (WebCore::SystemFontDatabase::applyWeightItalicsAndFallbackBehavior): Deleted.
1650         (WebCore::SystemFontDatabase::removeCascadeList): Deleted.
1651         (WebCore::SystemFontDatabase::computeCascadeList): Deleted.
1652         (WebCore::systemFontParameters): Deleted.
1653         * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: Added.
1654         (WebCore::SystemFontDatabaseCoreText::singleton):
1655         (WebCore::SystemFontDatabaseCoreText::SystemFontDatabaseCoreText):
1656         (WebCore::SystemFontDatabaseCoreText::systemFontCascadeList):
1657         (WebCore::SystemFontDatabaseCoreText::clear):
1658         (WebCore::SystemFontDatabaseCoreText::applyWeightItalicsAndFallbackBehavior):
1659         (WebCore::SystemFontDatabaseCoreText::removeCascadeList):
1660         (WebCore::SystemFontDatabaseCoreText::computeCascadeList):
1661         (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
1662         * platform/graphics/cocoa/SystemFontDatabaseCoreText.h: Added.
1663         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::CascadeListParameters):
1664         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::isHashTableDeletedValue const):
1665         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::operator== const):
1666         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const):
1667         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::CascadeListParametersHash::hash):
1668         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::CascadeListParametersHash::equal):
1669         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1670
1671 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
1672
1673         Remove dead code: VideoFullscreenModel::isVisible()
1674         https://bugs.webkit.org/show_bug.cgi?id=190356
1675
1676         Reviewed by Jon Lee.
1677
1678         No new tests because there is no behavior change.
1679
1680         Remove isVisible() since it is no longer used.
1681
1682         * platform/cocoa/VideoFullscreenModel.h:
1683         * platform/cocoa/VideoFullscreenModelVideoElement.h:
1684         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
1685         (WebCore::VideoFullscreenModelVideoElement::isVisible const): Deleted.
1686         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1687         (VideoFullscreenControllerContext::isVisible const): Deleted.
1688
1689 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
1690
1691         Remove dead code: resetMediaState.
1692         https://bugs.webkit.org/show_bug.cgi?id=190355
1693
1694         Reviewed by Jon Lee.
1695
1696         No new tests because no behavior change.
1697
1698         Remove resetMediaState since it is no longer used.
1699
1700         * platform/cocoa/PlaybackSessionInterface.h:
1701         (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
1702         * platform/ios/PlaybackSessionInterfaceAVKit.h:
1703         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
1704         (WebCore::PlaybackSessionInterfaceAVKit::resetMediaState): Deleted.
1705         * platform/ios/WebAVPlayerController.h:
1706         * platform/ios/WebAVPlayerController.mm:
1707         (-[WebAVPlayerController resetMediaState]): Deleted.
1708         * platform/mac/PlaybackSessionInterfaceMac.h:
1709         * platform/mac/PlaybackSessionInterfaceMac.mm:
1710         (WebCore::PlaybackSessionInterfaceMac::resetMediaState): Deleted.
1711
1712 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
1713
1714         Use MediaPlayerEnums::VideoGravity in VideoFullscreenModel.
1715         https://bugs.webkit.org/show_bug.cgi?id=190357
1716
1717         Reviewed by Jon Lee.
1718
1719         No new tests because no behavior change.
1720
1721         Use MediaPlayerEnums::VideoGravity instead of creating another identical enum in VideoFullscreenModel.
1722
1723         * platform/cocoa/VideoFullscreenModel.h:
1724         (): Deleted.
1725         * platform/cocoa/VideoFullscreenModelVideoElement.h:
1726         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
1727         (WebCore::VideoFullscreenModelVideoElement::setVideoLayerGravity):
1728         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1729         (-[WebAVPlayerLayer setVideoGravity:]):
1730         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1731         (VideoFullscreenControllerContext::setVideoLayerGravity):
1732         * platform/mac/VideoFullscreenInterfaceMac.mm:
1733         (-[WebVideoFullscreenInterfaceMacObjC setUpPIPForVideoView:withFrame:inWindow:]):
1734         (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):
1735
1736 2018-10-08  Devin Rousso  <drousso@apple.com>
1737
1738         Web Inspector: group media network entries by the node that triggered the request
1739         https://bugs.webkit.org/show_bug.cgi?id=189606
1740         <rdar://problem/44438527>
1741
1742         Reviewed by Brian Burg.
1743
1744         Test: http/tests/inspector/network/resource-initiatorNode.html
1745
1746         Add extra arguments to functions that create `ResourceRequest` objects for media resources so
1747         that `initiatorNodeIdentifier` can be set for WebInspector frontend to use for grouping.
1748
1749         * html/HTMLMediaElement.cpp:
1750         (WebCore::HTMLMediaElement::loadResource):
1751         * html/HTMLVideoElement.cpp:
1752         (WebCore::HTMLVideoElement::setDisplayMode):
1753         * loader/FrameLoader.h:
1754         * loader/FrameLoader.cpp:
1755         (WebCore::FrameLoader::willLoadMediaElementURL):
1756         Handles initial (e.g. DNT) resource requests.
1757
1758         * loader/ImageLoader.cpp:
1759         (ImageLoader::updateFromElement):
1760         Handles "poster" requests.
1761
1762         * loader/MediaResourceLoader.cpp:
1763         (MediaResourceLoader::requestResource):
1764         Handles byte-range requests.
1765
1766         * html/track/LoadableTextTrack.cpp:
1767         (WebCore::LoadableTextTrack::loadTimerFired):
1768         * loader/TextTrackLoader.h:
1769         * loader/TextTrackLoader.cpp:
1770         (WebCore::TextTrackLoader::load):
1771         * html/HTMLTrackElement.h:
1772         Handles <track> (e.g. subtitle) requests.
1773
1774         * inspector/agents/InspectorDOMAgent.cpp:
1775         (WebCore::InspectorDOMAgent::identifierForNode):
1776         * inspector/InspectorInstrumentation.h:
1777         (WebCore::InspectorInstrumentation::identifierForNode):
1778         * inspector/InspectorInstrumentation.cpp:
1779         (WebCore::InspectorInstrumentation::identifierForNodeImpl):
1780         Allows callers to get a `DOM.nodeId` for the given `Node`, which is (in this patch) attached
1781         to the `ResourceRequest` and later used by `InspectorNetworkAgent`.
1782
1783         * inspector/agents/InspectorNetworkAgent.h:
1784         * inspector/agents/InspectorNetworkAgent.cpp:
1785         (WebCore::InspectorNetworkAgent::willSendRequest):
1786         (WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
1787         (WebCore::InspectorNetworkAgent::buildInitiatorObject):
1788
1789         * platform/network/ResourceRequestBase.h:
1790         (WebCore::ResourceRequestBase::initiatorNodeIdentifier const):
1791         (WebCore::ResourceRequestBase::setInitiatorNodeIdentifier):
1792         * platform/network/ResourceRequestBase.cpp:
1793         (WebCore::ResourceRequestBase::setAsIsolatedCopy):
1794         * platform/network/cf/ResourceRequestCFNet.cpp:
1795         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
1796         * loader/cache/CachedResourceLoader.cpp:
1797         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
1798
1799         * inspector/InspectorCanvas.h:
1800         * inspector/InspectorCanvas.cpp:
1801         (WebCore::InspectorCanvas::buildObjectForCanvas):
1802         * inspector/agents/InspectorCanvasAgent.cpp:
1803         (WebCore::InspectorCanvasAgent::enable):
1804         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1805         Don't try to push the canvas' node to the frontend, as this will create a dangling node in
1806         `InspectorDOMAgent` if the canvas' node is detached from the DOM.
1807
1808 2018-10-08  Andy Estes  <aestes@apple.com>
1809
1810         [Payment Request] Requests should be aborted after details settle when the user cancels
1811         https://bugs.webkit.org/show_bug.cgi?id=190333
1812
1813         Reviewed by Alex Christensen.
1814
1815         In Payment Request's "update a PaymentRequest's details" algorithm, user agents are expected
1816         to disable the payment UI when PaymentRequest details are being updated by the merchant.
1817         This is to prevent the user from accepting a payment before updated details are displayed.
1818
1819         Further, Payment Request's "user aborts the payment request" algorithm says that the
1820         algorithm should be terminated prior to throwing an AbortError if the request is currently
1821         being updated, and also that user agents SHOULD ensure this never occurs. This is based on
1822         the assumption that payment UIs are disabled during details updates.
1823
1824         For Apple Pay, while it is true that a payment cannot be accepted by the user while details
1825         are being updated by the merchant, the payment UI is not completely disabled. In particular,
1826         the user is allowed to abort the payment while details are being updated. We need to honor
1827         the user's request to abort without doing so in the middle of a details update.
1828
1829         This patch defers a user-initiated abort until after details are settled, at which point the
1830         promise returned by show() is rejected with an AbortError. This behaves as if the details
1831         update promise were rejected by the merchant.
1832
1833         Added a test case to http/tests/paymentrequest/payment-request-show-method.https.html.
1834
1835         * Modules/paymentrequest/PaymentRequest.cpp:
1836         (WebCore::PaymentRequest::settleDetailsPromise):
1837         (WebCore::PaymentRequest::whenDetailsSettled):
1838         (WebCore::PaymentRequest::cancel):
1839         * Modules/paymentrequest/PaymentRequest.h:
1840
1841 2018-10-08  Chris Dumez  <cdumez@apple.com>
1842
1843         Have DOMWindowProperty get is frame from its associated DOMWindow
1844         https://bugs.webkit.org/show_bug.cgi?id=190341
1845
1846         Reviewed by Alex Christensen.
1847
1848         Have DOMWindowProperty get is frame from its associated DOMWindow, instead of having its own
1849         m_frame that can potentially get out-of-sync.
1850
1851         * Modules/cache/DOMWindowCaches.cpp:
1852         (WebCore::DOMWindowCaches::DOMWindowCaches):
1853         * Modules/geolocation/NavigatorGeolocation.cpp:
1854         (WebCore::NavigatorGeolocation::NavigatorGeolocation):
1855         (WebCore::NavigatorGeolocation::from):
1856         * Modules/geolocation/NavigatorGeolocation.h:
1857         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1858         (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
1859         * Modules/mediastream/NavigatorMediaDevices.cpp:
1860         (WebCore::NavigatorMediaDevices::NavigatorMediaDevices):
1861         (WebCore::NavigatorMediaDevices::from):
1862         * Modules/mediastream/NavigatorMediaDevices.h:
1863         * Modules/quota/DOMWindowQuota.cpp:
1864         (WebCore::DOMWindowQuota::DOMWindowQuota):
1865         * Modules/quota/NavigatorStorageQuota.cpp:
1866         (WebCore::NavigatorStorageQuota::NavigatorStorageQuota):
1867         * Modules/quota/NavigatorStorageQuota.h:
1868         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
1869         (WebCore::DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis):
1870         * css/StyleMedia.cpp:
1871         (WebCore::StyleMedia::StyleMedia):
1872         (WebCore::StyleMedia::type const):
1873         (WebCore::StyleMedia::matchMedium const):
1874         * css/StyleMedia.h:
1875         * loader/appcache/DOMApplicationCache.cpp:
1876         (WebCore::DOMApplicationCache::DOMApplicationCache):
1877         (WebCore::DOMApplicationCache::applicationCacheHost const):
1878         (WebCore::DOMApplicationCache::scriptExecutionContext const):
1879         * loader/appcache/DOMApplicationCache.h:
1880         * page/BarProp.cpp:
1881         (WebCore::BarProp::BarProp):
1882         (WebCore::BarProp::visible const):
1883         * page/BarProp.h:
1884         (WebCore::BarProp::create):
1885         * page/DOMSelection.cpp:
1886         (WebCore::DOMSelection::DOMSelection):
1887         (WebCore::DOMSelection::visibleSelection const):
1888         (WebCore::DOMSelection::anchorNode const):
1889         (WebCore::DOMSelection::anchorOffset const):
1890         (WebCore::DOMSelection::focusNode const):
1891         (WebCore::DOMSelection::focusOffset const):
1892         (WebCore::DOMSelection::baseNode const):
1893         (WebCore::DOMSelection::baseOffset const):
1894         (WebCore::DOMSelection::extentNode const):
1895         (WebCore::DOMSelection::extentOffset const):
1896         (WebCore::DOMSelection::isCollapsed const):
1897         (WebCore::DOMSelection::type const):
1898         (WebCore::DOMSelection::rangeCount const):
1899         (WebCore::DOMSelection::collapse):
1900         (WebCore::DOMSelection::collapseToEnd):
1901         (WebCore::DOMSelection::collapseToStart):
1902         (WebCore::DOMSelection::empty):
1903         (WebCore::DOMSelection::setBaseAndExtent):
1904         (WebCore::DOMSelection::setPosition):
1905         (WebCore::DOMSelection::modify):
1906         (WebCore::DOMSelection::extend):
1907         (WebCore::DOMSelection::getRangeAt):
1908         (WebCore::DOMSelection::removeAllRanges):
1909         (WebCore::DOMSelection::addRange):
1910         (WebCore::DOMSelection::deleteFromDocument):
1911         (WebCore::DOMSelection::containsNode const):
1912         (WebCore::DOMSelection::toString):
1913         (WebCore::DOMSelection::shadowAdjustedNode const):
1914         (WebCore::DOMSelection::shadowAdjustedOffset const):
1915         (WebCore::DOMSelection::isValidForPosition const):
1916         * page/DOMSelection.h:
1917         (WebCore::DOMSelection::create):
1918         * page/DOMWindow.cpp:
1919         (WebCore::DOMWindow::screen):
1920         (WebCore::DOMWindow::history):
1921         (WebCore::DOMWindow::locationbar):
1922         (WebCore::DOMWindow::menubar):
1923         (WebCore::DOMWindow::personalbar):
1924         (WebCore::DOMWindow::scrollbars):
1925         (WebCore::DOMWindow::statusbar):
1926         (WebCore::DOMWindow::toolbar):
1927         (WebCore::DOMWindow::applicationCache):
1928         (WebCore::DOMWindow::navigator):
1929         (WebCore::DOMWindow::location):
1930         (WebCore::DOMWindow::visualViewport):
1931         (WebCore::DOMWindow::webkitNamespace):
1932         (WebCore::DOMWindow::getSelection):
1933         (WebCore::DOMWindow::styleMedia):
1934         * page/DOMWindow.h:
1935         * page/DOMWindowExtension.cpp:
1936         (WebCore::DOMWindowExtension::DOMWindowExtension):
1937         * page/DOMWindowExtension.h:
1938         (WebCore::DOMWindowExtension::create):
1939         * page/DOMWindowProperty.cpp:
1940         (WebCore::DOMWindowProperty::DOMWindowProperty):
1941         (WebCore::DOMWindowProperty::~DOMWindowProperty):
1942         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
1943         (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
1944         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
1945         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
1946         (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
1947         (WebCore::DOMWindowProperty::frame const):
1948         * page/DOMWindowProperty.h:
1949         (WebCore::DOMWindowProperty::window const):
1950         * page/History.cpp:
1951         (WebCore::History::History):
1952         (WebCore::History::length const):
1953         (WebCore::History::scrollRestoration const):
1954         (WebCore::History::setScrollRestoration):
1955         (WebCore::History::stateInternal const):
1956         (WebCore::History::go):
1957         (WebCore::History::urlForState):
1958         (WebCore::History::stateObjectAdded):
1959         * page/History.h:
1960         * page/Location.cpp:
1961         (WebCore::Location::Location):
1962         (WebCore::Location::url const):
1963         (WebCore::Location::href const):
1964         (WebCore::Location::protocol const):
1965         (WebCore::Location::host const):
1966         (WebCore::Location::hostname const):
1967         (WebCore::Location::port const):
1968         (WebCore::Location::pathname const):
1969         (WebCore::Location::search const):
1970         (WebCore::Location::origin const):
1971         (WebCore::Location::ancestorOrigins const):
1972         (WebCore::Location::hash const):
1973         (WebCore::Location::setHref):
1974         (WebCore::Location::setProtocol):
1975         (WebCore::Location::setHost):
1976         (WebCore::Location::setHostname):
1977         (WebCore::Location::setPort):
1978         (WebCore::Location::setPathname):
1979         (WebCore::Location::setSearch):
1980         (WebCore::Location::setHash):
1981         (WebCore::Location::assign):
1982         (WebCore::Location::replace):
1983         (WebCore::Location::reload):
1984         (WebCore::Location::setLocation):
1985         * page/Location.h:
1986         (WebCore::Location::create):
1987         * page/Navigator.cpp:
1988         (WebCore::Navigator::Navigator):
1989         (WebCore::Navigator::appVersion const):
1990         (WebCore::Navigator::userAgent const):
1991         (WebCore::Navigator::share):
1992         (WebCore::Navigator::plugins):
1993         (WebCore::Navigator::mimeTypes):
1994         (WebCore::Navigator::cookieEnabled const):
1995         (WebCore::Navigator::javaEnabled const):
1996         (WebCore::Navigator::standalone const):
1997         * page/Navigator.h:
1998         * page/Performance.cpp:
1999         (WebCore::Performance::navigation):
2000         (WebCore::Performance::timing):
2001         * page/PerformanceNavigation.cpp:
2002         (WebCore::PerformanceNavigation::PerformanceNavigation):
2003         (WebCore::PerformanceNavigation::type const):
2004         (WebCore::PerformanceNavigation::redirectCount const):
2005         * page/PerformanceNavigation.h:
2006         (WebCore::PerformanceNavigation::create):
2007         * page/PerformanceTiming.cpp:
2008         (WebCore::PerformanceTiming::PerformanceTiming):
2009         (WebCore::PerformanceTiming::documentLoader const):
2010         (WebCore::PerformanceTiming::documentTiming const):
2011         * page/PerformanceTiming.h:
2012         (WebCore::PerformanceTiming::create):
2013         * page/Screen.cpp:
2014         (WebCore::Screen::Screen):
2015         (WebCore::Screen::height const):
2016         (WebCore::Screen::width const):
2017         (WebCore::Screen::colorDepth const):
2018         (WebCore::Screen::pixelDepth const):
2019         (WebCore::Screen::availLeft const):
2020         (WebCore::Screen::availTop const):
2021         (WebCore::Screen::availHeight const):
2022         (WebCore::Screen::availWidth const):
2023         * page/Screen.h:
2024         * page/VisualViewport.cpp:
2025         (WebCore::VisualViewport::VisualViewport):
2026         (WebCore::VisualViewport::scriptExecutionContext const):
2027         (WebCore::VisualViewport::addEventListener):
2028         (WebCore::VisualViewport::updateFrameLayout const):
2029         (WebCore::VisualViewport::offsetLeft const):
2030         (WebCore::VisualViewport::offsetTop const):
2031         (WebCore::VisualViewport::pageLeft const):
2032         (WebCore::VisualViewport::pageTop const):
2033         (WebCore::VisualViewport::width const):
2034         (WebCore::VisualViewport::height const):
2035         (WebCore::VisualViewport::scale const):
2036         (WebCore::VisualViewport::update):
2037         (WebCore::VisualViewport::enqueueResizeEvent):
2038         (WebCore::VisualViewport::enqueueScrollEvent):
2039         * page/VisualViewport.h:
2040         * page/WebKitNamespace.cpp:
2041         (WebCore::WebKitNamespace::WebKitNamespace):
2042         * page/WebKitNamespace.h:
2043         (WebCore::WebKitNamespace::create):
2044         * plugins/DOMMimeTypeArray.cpp:
2045         (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
2046         (WebCore::DOMMimeTypeArray::item):
2047         (WebCore::DOMMimeTypeArray::namedItem):
2048         (WebCore::DOMMimeTypeArray::getPluginData const):
2049         * plugins/DOMMimeTypeArray.h:
2050         (WebCore::DOMMimeTypeArray::create):
2051         * plugins/DOMPluginArray.cpp:
2052         (WebCore::DOMPluginArray::DOMPluginArray):
2053         (WebCore::DOMPluginArray::item):
2054         (WebCore::DOMPluginArray::namedItem):
2055         (WebCore::DOMPluginArray::refresh):
2056         (WebCore::DOMPluginArray::pluginData const):
2057         * plugins/DOMPluginArray.h:
2058         (WebCore::DOMPluginArray::create):
2059         * storage/Storage.cpp:
2060         (WebCore::Storage::create):
2061         (WebCore::Storage::Storage):
2062         (WebCore::Storage::setItem):
2063         (WebCore::Storage::removeItem):
2064         (WebCore::Storage::clear):
2065         * storage/Storage.h:
2066
2067 2018-10-08  Antti Koivisto  <antti@apple.com>
2068
2069         Move FontCascadeDescription to a file of its own
2070         https://bugs.webkit.org/show_bug.cgi?id=190348
2071
2072         Reviewed by Chris Dumez.
2073
2074         * Sources.txt:
2075         * WebCore.xcodeproj/project.pbxproj:
2076         * platform/graphics/FontCascade.h:
2077         * platform/graphics/FontCascadeDescription.cpp: Copied from Source/WebCore/platform/graphics/FontDescription.cpp.
2078         (WebCore::FontDescription::FontDescription): Deleted.
2079         (WebCore::m_shouldAllowUserInstalledFonts): Deleted.
2080         (WebCore::FontDescription::setLocale): Deleted.
2081         (WebCore::FontDescription::invalidateCaches): Deleted.
2082         * platform/graphics/FontCascadeDescription.h: Copied from Source/WebCore/platform/graphics/FontDescription.h.
2083         (WebCore::FontDescription::operator!= const): Deleted.
2084         (WebCore::FontDescription::computedSize const): Deleted.
2085         (WebCore::FontDescription::computedPixelSize const): Deleted.
2086         (WebCore::FontDescription::italic const): Deleted.
2087         (WebCore::FontDescription::stretch const): Deleted.
2088         (WebCore::FontDescription::weight const): Deleted.
2089         (WebCore::FontDescription::fontSelectionRequest const): Deleted.
2090         (WebCore::FontDescription::renderingMode const): Deleted.
2091         (WebCore::FontDescription::textRenderingMode const): Deleted.
2092         (WebCore::FontDescription::script const): Deleted.
2093         (WebCore::FontDescription::locale const): Deleted.
2094         (WebCore::FontDescription::orientation const): Deleted.
2095         (WebCore::FontDescription::nonCJKGlyphOrientation const): Deleted.
2096         (WebCore::FontDescription::widthVariant const): Deleted.
2097         (WebCore::FontDescription::featureSettings const): Deleted.
2098         (WebCore::FontDescription::variationSettings const): Deleted.
2099         (WebCore::FontDescription::fontSynthesis const): Deleted.
2100         (WebCore::FontDescription::variantCommonLigatures const): Deleted.
2101         (WebCore::FontDescription::variantDiscretionaryLigatures const): Deleted.
2102         (WebCore::FontDescription::variantHistoricalLigatures const): Deleted.
2103         (WebCore::FontDescription::variantContextualAlternates const): Deleted.
2104         (WebCore::FontDescription::variantPosition const): Deleted.
2105         (WebCore::FontDescription::variantCaps const): Deleted.
2106         (WebCore::FontDescription::variantNumericFigure const): Deleted.
2107         (WebCore::FontDescription::variantNumericSpacing const): Deleted.
2108         (WebCore::FontDescription::variantNumericFraction const): Deleted.
2109         (WebCore::FontDescription::variantNumericOrdinal const): Deleted.
2110         (WebCore::FontDescription::variantNumericSlashedZero const): Deleted.
2111         (WebCore::FontDescription::variantAlternates const): Deleted.
2112         (WebCore::FontDescription::variantEastAsianVariant const): Deleted.
2113         (WebCore::FontDescription::variantEastAsianWidth const): Deleted.
2114         (WebCore::FontDescription::variantEastAsianRuby const): Deleted.
2115         (WebCore::FontDescription::variantSettings const): Deleted.
2116         (WebCore::FontDescription::opticalSizing const): Deleted.
2117         (WebCore::FontDescription::fontStyleAxis const): Deleted.
2118         (WebCore::FontDescription::shouldAllowUserInstalledFonts const): Deleted.
2119         (WebCore::FontDescription::setComputedSize): Deleted.
2120         (WebCore::FontDescription::setItalic): Deleted.
2121         (WebCore::FontDescription::setStretch): Deleted.
2122         (WebCore::FontDescription::setIsItalic): Deleted.
2123         (WebCore::FontDescription::setWeight): Deleted.
2124         (WebCore::FontDescription::setRenderingMode): Deleted.
2125         (WebCore::FontDescription::setTextRenderingMode): Deleted.
2126         (WebCore::FontDescription::setOrientation): Deleted.
2127         (WebCore::FontDescription::setNonCJKGlyphOrientation): Deleted.
2128         (WebCore::FontDescription::setWidthVariant): Deleted.
2129         (WebCore::FontDescription::setFeatureSettings): Deleted.
2130         (WebCore::FontDescription::setVariationSettings): Deleted.
2131         (WebCore::FontDescription::setFontSynthesis): Deleted.
2132         (WebCore::FontDescription::setVariantCommonLigatures): Deleted.
2133         (WebCore::FontDescription::setVariantDiscretionaryLigatures): Deleted.
2134         (WebCore::FontDescription::setVariantHistoricalLigatures): Deleted.
2135         (WebCore::FontDescription::setVariantContextualAlternates): Deleted.
2136         (WebCore::FontDescription::setVariantPosition): Deleted.
2137         (WebCore::FontDescription::setVariantCaps): Deleted.
2138         (WebCore::FontDescription::setVariantNumericFigure): Deleted.
2139         (WebCore::FontDescription::setVariantNumericSpacing): Deleted.
2140         (WebCore::FontDescription::setVariantNumericFraction): Deleted.
2141         (WebCore::FontDescription::setVariantNumericOrdinal): Deleted.
2142         (WebCore::FontDescription::setVariantNumericSlashedZero): Deleted.
2143         (WebCore::FontDescription::setVariantAlternates): Deleted.
2144         (WebCore::FontDescription::setVariantEastAsianVariant): Deleted.
2145         (WebCore::FontDescription::setVariantEastAsianWidth): Deleted.
2146         (WebCore::FontDescription::setVariantEastAsianRuby): Deleted.
2147         (WebCore::FontDescription::setOpticalSizing): Deleted.
2148         (WebCore::FontDescription::setFontStyleAxis): Deleted.
2149         (WebCore::FontDescription::setShouldAllowUserInstalledFonts): Deleted.
2150         (WebCore::FontDescription::operator== const): Deleted.
2151         * platform/graphics/FontDescription.cpp:
2152         (WebCore::FontDescription::invalidateCaches):
2153         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
2154         (WebCore::FontCascadeDescription::effectiveFamilyCount const): Deleted.
2155         (WebCore::FontCascadeDescription::effectiveFamilyAt const): Deleted.
2156         (WebCore::FontCascadeDescription::lighterWeight): Deleted.
2157         (WebCore::FontCascadeDescription::bolderWeight): Deleted.
2158         (WebCore::FontCascadeDescription::familiesEqualForTextAutoSizing const): Deleted.
2159         (WebCore::FontCascadeDescription::familyNamesAreEqual): Deleted.
2160         (WebCore::FontCascadeDescription::familyNameHash): Deleted.
2161         (WebCore::FontCascadeDescription::foldedFamilyName): Deleted.
2162         * platform/graphics/FontDescription.h:
2163         (WebCore::FontCascadeDescription::operator!= const): Deleted.
2164         (WebCore::FontCascadeDescription::familyCount const): Deleted.
2165         (WebCore::FontCascadeDescription::firstFamily const): Deleted.
2166         (WebCore::FontCascadeDescription::familyAt const): Deleted.
2167         (WebCore::FontCascadeDescription::families const): Deleted.
2168         (WebCore::FontCascadeDescription::specifiedSize const): Deleted.
2169         (WebCore::FontCascadeDescription::isAbsoluteSize const): Deleted.
2170         (WebCore::FontCascadeDescription::lighterWeight const): Deleted.
2171         (WebCore::FontCascadeDescription::bolderWeight const): Deleted.
2172         (WebCore::FontCascadeDescription::useFixedDefaultSize const): Deleted.
2173         (WebCore::FontCascadeDescription::kerning const): Deleted.
2174         (WebCore::FontCascadeDescription::keywordSize const): Deleted.
2175         (WebCore::FontCascadeDescription::keywordSizeAsIdentifier const): Deleted.
2176         (WebCore::FontCascadeDescription::fontSmoothing const): Deleted.
2177         (WebCore::FontCascadeDescription::isSpecifiedFont const): Deleted.
2178         (WebCore::FontCascadeDescription::setOneFamily): Deleted.
2179         (WebCore::FontCascadeDescription::setFamilies): Deleted.
2180         (WebCore::FontCascadeDescription::setSpecifiedSize): Deleted.
2181         (WebCore::FontCascadeDescription::setIsAbsoluteSize): Deleted.
2182         (WebCore::FontCascadeDescription::setKerning): Deleted.
2183         (WebCore::FontCascadeDescription::setKeywordSize): Deleted.
2184         (WebCore::FontCascadeDescription::setKeywordSizeFromIdentifier): Deleted.
2185         (WebCore::FontCascadeDescription::setFontSmoothing): Deleted.
2186         (WebCore::FontCascadeDescription::setIsSpecifiedFont): Deleted.
2187         (WebCore::FontCascadeDescription::equalForTextAutoSizing const): Deleted.
2188         (WebCore::FontCascadeDescription::initialItalic): Deleted.
2189         (WebCore::FontCascadeDescription::initialFontStyleAxis): Deleted.
2190         (WebCore::FontCascadeDescription::initialWeight): Deleted.
2191         (WebCore::FontCascadeDescription::initialStretch): Deleted.
2192         (WebCore::FontCascadeDescription::initialSmallCaps): Deleted.
2193         (WebCore::FontCascadeDescription::initialKerning): Deleted.
2194         (WebCore::FontCascadeDescription::initialFontSmoothing): Deleted.
2195         (WebCore::FontCascadeDescription::initialTextRenderingMode): Deleted.
2196         (WebCore::FontCascadeDescription::initialFontSynthesis): Deleted.
2197         (WebCore::FontCascadeDescription::initialVariantPosition): Deleted.
2198         (WebCore::FontCascadeDescription::initialVariantCaps): Deleted.
2199         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
2200         (WebCore::FontCascadeDescription::initialOpticalSizing): Deleted.
2201         (WebCore::FontCascadeDescription::initialLocale): Deleted.
2202         (WebCore::FontCascadeDescription::operator== const): Deleted.
2203         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2204         * rendering/style/RenderStyle.h:
2205
2206 2018-10-08  Yacine Bandou  <yacine.bandou_ext@softathome.com>
2207
2208         [EME][GStreamer] Add support for WebM encrypted caps "application/x-webm-enc"
2209         https://bugs.webkit.org/show_bug.cgi?id=189239
2210
2211         Reviewed by Xabier Rodriguez-Calvar.
2212
2213         Add the support of GStreamer caps "application/x-webm-enc" in GStreamerCommon.
2214
2215         The DRM system id field in the encrypted event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID
2216         in case of WebM, for details, see https://bugzilla.gnome.org/attachment.cgi?id=365211.
2217
2218         Tests: media/encrypted-media/clearKey/clearKey-encrypted-webm-eventmse.html
2219                media/encrypted-media/clearKey/clearKey-webm-video-playback-mse.html
2220
2221         * platform/graphics/gstreamer/GStreamerCommon.cpp:
2222         (WebCore::capsMediaType):
2223         (WebCore::areEncryptedCaps):
2224         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2225         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
2226         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2227         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2228         (webkitMediaCommonEncryptionDecryptTransformCaps):
2229
2230 2018-10-07  Dan Bernstein  <mitz@apple.com>
2231
2232         Fixed building with the latest macOS SDK
2233
2234         * platform/graphics/cocoa/IOSurface.mm:
2235         (WebCore::IOSurface::ensurePlatformContext): Suppressed deprecation warnings around use of
2236           CGIOSurfaceContextSetDisplayMask.
2237
2238 2018-10-06  Justin Michaud  <justin_michaud@apple.com>
2239
2240         Properly determine if css custom property values are computationally independent
2241         https://bugs.webkit.org/show_bug.cgi?id=190303
2242
2243         Reviewed by Antti Koivisto.
2244
2245         Add getDirectComputationalDependencies method to determine if a value is computationally
2246         dependent. Use this method in CSS.registerProperty to replace existing substring checks.
2247         No new tests are needed because the existing tests cover this behaviour.
2248
2249         * css/CSSCalculationValue.cpp:
2250         (WebCore::determineCategory):
2251         * css/CSSCalculationValue.h:
2252         (WebCore::CSSCalcValue::getDirectComputationalDependencies const):
2253         (WebCore::CSSCalcValue::getDirectRootComputationalDependencies const):
2254         * css/CSSCustomPropertyValue.cpp:
2255         (WebCore::CSSCustomPropertyValue::customCSSText const):
2256         (WebCore::CSSCustomPropertyValue::tokens const):
2257         (WebCore::CSSCustomPropertyValue::setResolvedTypedValue):
2258         * css/CSSCustomPropertyValue.h:
2259         * css/CSSPrimitiveValue.cpp:
2260         (WebCore::CSSPrimitiveValue::getDirectComputationalDependencies const):
2261         (WebCore::CSSPrimitiveValue::getDirectRootComputationalDependencies const):
2262         * css/CSSPrimitiveValue.h:
2263         * css/CSSValue.cpp:
2264         (WebCore::CSSValue::getDirectComputationalDependencies const):
2265         (WebCore::CSSValue::getDirectRootComputationalDependencies const):
2266         * css/CSSValue.h:
2267         * css/CSSVariableData.cpp:
2268         (WebCore::CSSVariableData::CSSVariableData):
2269         (WebCore::CSSVariableData::resolveVariableReference const):
2270         * css/DOMCSSRegisterCustomProperty.cpp:
2271         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
2272
2273 2018-10-05  Chris Dumez  <cdumez@apple.com>
2274
2275         Regression(r236862): Crash under DOMWindowExtension::willDetachGlobalObjectFromFrame()
2276         https://bugs.webkit.org/show_bug.cgi?id=190320
2277         <rdar://problem/45044814>
2278
2279         Reviewed by Geoffrey Garen.
2280
2281         r236862 caused DOMWindowProperty::willDetachGlobalObjectFromFrame() to get called several
2282         times. There was no effect for most DOMWindowProperty objects. However, it would cause
2283         crashes for DOMWindowExtension objects, which subclass DOMWindowProperty and override
2284         DOMWindowProperty::willDetachGlobalObjectFromFrame() because they dereference the frame
2285         without null checking it.
2286
2287         To address the issue, we now make sure DOMWindowProperty::willDetachGlobalObjectFromFrame()
2288         is not called several times.
2289
2290         * dom/Document.cpp:
2291         (WebCore::Document::detachFromFrame):
2292         Stop calling DOMWindow::willDetachDocumentFromFrame() here as most call sites already
2293         take care of calling DOMWindow::willDetachDocumentFromFrame() beforehand (e.g.
2294         Document::prepareForDestruction()).
2295         Also, return early if the Document is already detached from its frame.
2296
2297         (WebCore::Document::frameWasDisconnectedFromOwner):
2298         Add new utility function called when a Frame is disconnected from its owner which
2299         calls both Document::detachFromFrame() and DOMWindow::willDetachDocumentFromFrame().
2300
2301         * dom/Document.h:
2302         * page/DOMWindow.cpp:
2303         (WebCore::DOMWindow::willDetachDocumentFromFrame):
2304         Return early if the Window is already detached from its frame.
2305
2306         * page/Frame.cpp:
2307         (WebCore::Frame::disconnectOwnerElement):
2308
2309 2018-10-05  Jer Noble  <jer.noble@apple.com>
2310
2311         Further unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
2312
2313         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2314         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
2315
2316 2018-10-05  Jer Noble  <jer.noble@apple.com>
2317
2318        Unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
2319
2320         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2321         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
2322
2323 2018-10-05  Eric Carlson  <eric.carlson@apple.com>
2324
2325         [MediaStream] RealtimeMediaSource should be able to vend hashed IDs
2326         https://bugs.webkit.org/show_bug.cgi?id=190142
2327         <rdar://problem/44911109>
2328
2329         Reviewed by Youenn Fablet.
2330
2331         No new tests, covered by existing tests.
2332
2333         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
2334         (WebCore::CanvasCaptureMediaStreamTrack::Source::Source): Update order of parameters passed
2335         to base class.
2336
2337         * Modules/mediastream/MediaDevicesRequest.cpp:
2338         (WebCore::MediaDevicesRequest::start): ASSERT if document.deviceIDHashSalt is not the same
2339         as passed salt.
2340
2341         * Modules/mediastream/MediaStreamTrack.cpp:
2342         (WebCore::MediaStreamTrack::getSettings const): Don't need to hash ID.
2343         (WebCore::MediaStreamTrack::getCapabilities const): Ditto.
2344         * Modules/mediastream/MediaStreamTrack.h:
2345         * Modules/mediastream/MediaStreamTrack.idl:
2346
2347         * Modules/mediastream/UserMediaRequest.cpp:
2348         (WebCore::UserMediaRequest::allow): Pass hash salt to createMediaStream.
2349
2350         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
2351         (WebCore::LibWebRTCPeerConnectionBackend::createReceiverForSource): Update order of parameters passed
2352         to base class.
2353
2354         * Modules/webaudio/MediaStreamAudioSource.cpp:
2355         (WebCore::MediaStreamAudioSource::MediaStreamAudioSource): Ditto.
2356         * platform/mediastream/MediaConstraints.h:
2357
2358         * platform/mediastream/RealtimeIncomingAudioSource.cpp:
2359         (WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource): Ditto.
2360
2361         * platform/mediastream/RealtimeIncomingVideoSource.cpp:
2362         (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource): Ditto.
2363
2364         * platform/mediastream/RealtimeMediaSource.cpp:
2365         (WebCore::RealtimeMediaSource::RealtimeMediaSource): Calculate hashed ID.
2366         (WebCore::RealtimeMediaSource::selectSettings): Use m_hashedID.
2367         (WebCore::RealtimeMediaSource::hashedId const): New.
2368         (WebCore::RealtimeMediaSource::deviceIDHashSalt const): New.
2369         * platform/mediastream/RealtimeMediaSource.h:
2370
2371         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
2372         (WebCore::RealtimeMediaSourceCenter::createMediaStream): Take hash salt, pass it when creating
2373         a source.
2374         (WebCore::RealtimeMediaSourceCenter::getUserMediaDevices): Ditto.
2375         (WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
2376         * platform/mediastream/RealtimeMediaSourceCenter.h:
2377
2378         * platform/mediastream/RealtimeMediaSourceFactory.h:
2379         * platform/mediastream/RealtimeVideoSource.cpp:
2380         (WebCore::RealtimeVideoSource::RealtimeVideoSource): Update parameters.
2381         * platform/mediastream/RealtimeVideoSource.h:
2382
2383         * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
2384         (WebCore::GStreamerAudioCaptureSource::create): Ditto.
2385         (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): Ditto.
2386         * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
2387
2388         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
2389         (WebCore::GStreamerVideoCaptureSource::create): Ditto.
2390         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): Ditto.
2391         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
2392
2393         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
2394         (WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource): Ditto.
2395         (WebCore::MockRealtimeAudioSource::create): Ditto.
2396         (WebCore::MockGStreamerAudioCaptureSource::MockGStreamerAudioCaptureSource): Ditto.
2397         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h:
2398
2399         * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
2400         (WebCore::MockRealtimeVideoSource::create): Ditto.
2401         (WebCore::MockGStreamerVideoCaptureSource::MockGStreamerVideoCaptureSource): Ditto.
2402         * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h:
2403
2404         * platform/mediastream/mac/AVVideoCaptureSource.h:
2405         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2406         (WebCore::AVVideoCaptureSource::create): Ditto.
2407         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): Ditto.
2408         (WebCore::AVVideoCaptureSource::settings): Use hashedId to set device ID.
2409         (WebCore::AVVideoCaptureSource::capabilities): Ditto.
2410
2411         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
2412         (WebCore::CoreAudioCaptureSource::create): Update parameters.
2413         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): Ditto.
2414         (WebCore::CoreAudioCaptureSource::capabilities): Use hashedId to set device ID.
2415         (WebCore::CoreAudioCaptureSource::settings): Ditto.
2416         * platform/mediastream/mac/CoreAudioCaptureSource.h:
2417
2418         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
2419         (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa): Update parameters.
2420         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
2421
2422         * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
2423         * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
2424         (WebCore::MockRealtimeAudioSource::create): Ditto.
2425         (WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac): Ditto.
2426
2427         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
2428         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
2429         (WebCore::MockRealtimeVideoSource::create): Ditto.
2430         (WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac): Ditto.
2431
2432         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2433
2434         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
2435         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
2436         (WebCore::ScreenDisplayCaptureSourceMac::create): Ditto.
2437         (WebCore::ScreenDisplayCaptureSourceMac::ScreenDisplayCaptureSourceMac): Ditto.
2438         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Update logging.
2439         (WebCore::ScreenDisplayCaptureSourceMac::startDisplayStream): Ditto.
2440         (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable): Ditto.
2441
2442         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.h:
2443         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.mm:
2444         (WebCore::WindowDisplayCaptureSourceMac::create): Update parameters.
2445
2446         * platform/mock/MockRealtimeAudioSource.cpp:
2447         (WebCore::MockRealtimeAudioSource::create): Ditto.
2448         (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource): Ditto.
2449         (WebCore::MockRealtimeAudioSource::settings): Use hashedId to set device ID.
2450         (WebCore::MockRealtimeAudioSource::capabilities): Ditto.
2451         * platform/mock/MockRealtimeAudioSource.h:
2452
2453         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2454
2455         * platform/mock/MockRealtimeVideoSource.cpp:
2456         (WebCore::MockRealtimeVideoSource::create): Update parameters.
2457         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Ditto.
2458         (WebCore::MockRealtimeVideoSource::capabilities): Use hashedId to set device ID.
2459         (WebCore::MockRealtimeVideoSource::settings): Ditto.
2460         * platform/mock/MockRealtimeVideoSource.h:
2461
2462 2018-10-03  Jer Noble  <jer.noble@apple.com>
2463
2464         Add support for reporting "display composited video frames" through the VideoPlaybackQuality object.
2465         https://bugs.webkit.org/show_bug.cgi?id=190266
2466
2467         Reviewed by Eric Carlson.
2468
2469         Test: TestWebKitAPI.VideoQualityDisplayCompositing
2470
2471         Modify VideoPlaybackQuality to take a VideoPlaybackQualityMetrics object in its
2472         constructor (rather than individual fields). Add a new setting to control visibility
2473         of the displayCompositedVideoFrames attribute on VideoPlaybackQuality. Add support
2474         for VideoPlaybackQualityMetrics to MediaPlayerPrivateAVFoundationObjC.
2475
2476         * Modules/mediasource/VideoPlaybackQuality.cpp:
2477         (WebCore::VideoPlaybackQuality::create):
2478         (WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
2479         * Modules/mediasource/VideoPlaybackQuality.h:
2480         (WebCore::VideoPlaybackQuality::displayCompositedVideoFrames const):
2481         * Modules/mediasource/VideoPlaybackQuality.idl:
2482         * html/HTMLMediaElement.cpp:
2483         (WebCore::HTMLMediaElement::getVideoPlaybackQuality):
2484         * html/HTMLMediaElement.h:
2485         * html/HTMLMediaElement.idl:
2486         * page/Settings.yaml:
2487         * platform/graphics/MediaPlayer.h:
2488         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2489         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2490         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
2491         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2492         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics):
2493         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2494         (WebCore::MockMediaSourcePrivate::videoPlaybackQualityMetrics):
2495
2496 2018-10-05  Ryan Haddad  <ryanhaddad@apple.com>
2497
2498         Unreviewed, rolling out r236866.
2499
2500         Breaks internal builds.
2501
2502         Reverted changeset:
2503
2504         "Add support for reporting "display composited video frames"
2505         through the VideoPlaybackQuality object."
2506         https://bugs.webkit.org/show_bug.cgi?id=190266
2507         https://trac.webkit.org/changeset/236866
2508
2509 2018-10-05  Antoine Quint  <graouts@apple.com>
2510
2511         [Web Animations] REGRESSION (r236809): crash under AnimationTimeline::updateCSSAnimationsForElement()
2512         https://bugs.webkit.org/show_bug.cgi?id=190307
2513         <rdar://problem/45009901>
2514
2515         Reviewed by Dean Jackson.
2516
2517         We could crash with an invalid access to cssAnimationsByName since cancelOrRemoveDeclarativeAnimation() already
2518         does the job of clearing the m_elementToCSSAnimationByName entry for this particular element if there are no
2519         animations targeting it anymore. This started happening in r236809 when we switched from a simple call to to cancel()
2520         to a call to cancelOrRemoveDeclarativeAnimation(). We can safely remove the removal here since cancelOrRemoveDeclarativeAnimation()
2521         will already have performed this task safely if needed.
2522
2523         * animation/AnimationTimeline.cpp:
2524         (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
2525
2526 2018-10-04  Jer Noble  <jer.noble@apple.com>
2527
2528         Add support for reporting "display composited video frames" through the VideoPlaybackQuality object.
2529         https://bugs.webkit.org/show_bug.cgi?id=190266
2530
2531         Reviewed by Eric Carlson.
2532
2533         Test: TestWebKitAPI.VideoQualityDisplayCompositing
2534
2535         Modify VideoPlaybackQuality to take a VideoPlaybackQualityMetrics object in its
2536         constructor (rather than individual fields). Add a new setting to control visibility
2537         of the displayCompositedVideoFrames attribute on VideoPlaybackQuality. Add support
2538         for VideoPlaybackQualityMetrics to MediaPlayerPrivateAVFoundationObjC.
2539
2540         * Modules/mediasource/VideoPlaybackQuality.cpp:
2541         (WebCore::VideoPlaybackQuality::create):
2542         (WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
2543         * Modules/mediasource/VideoPlaybackQuality.h:
2544         (WebCore::VideoPlaybackQuality::displayCompositedVideoFrames const):
2545         * Modules/mediasource/VideoPlaybackQuality.idl:
2546         * html/HTMLMediaElement.cpp:
2547         (WebCore::HTMLMediaElement::getVideoPlaybackQuality):
2548         * html/HTMLMediaElement.h:
2549         * html/HTMLMediaElement.idl:
2550         * page/Settings.yaml:
2551         * platform/graphics/MediaPlayer.h:
2552         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2553         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2554         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
2555         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2556         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics):
2557         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2558         (WebCore::MockMediaSourcePrivate::videoPlaybackQualityMetrics):
2559
2560 2018-10-04  Chris Dumez  <cdumez@apple.com>
2561
2562         A Document / Window should lose its browsing context as soon as its iframe is removed from the document
2563         https://bugs.webkit.org/show_bug.cgi?id=190282
2564
2565         Reviewed by Ryosuke Niwa.
2566
2567         A Document / Window should lose its browsing context (aka Frame) as soon as its iframe is removed from
2568         the document. In WebKit, a Document / Window's Frame was only getting nulled out when the frame gets
2569         destroyed, which happens later usually after a GC happens.
2570
2571         Specification:
2572         - https://html.spec.whatwg.org/#the-iframe-element
2573         """
2574         When an iframe element is removed from a document, the user agent must discard the element's nested browsing
2575         context, if it is not null, and then set the element's nested browsing context to null.
2576         """
2577
2578         This was not consistent with the specification or other browsers (tested Chrome and Firefox) so this
2579         patch is aligning our behavior.
2580
2581         In a follow-up, I am planning to look into making the Window not be a FrameDestructionObserver, and instead
2582         get its frame from the Document. This should make the code simpler.
2583
2584         No new tests, rebaselined existing tests.
2585
2586         * Modules/mediastream/MediaDevices.cpp:
2587         (WebCore::MediaDevices::getUserMedia const):
2588         * Modules/mediastream/MediaDevices.h:
2589         Update getUserMedia() to reject a the Promise with an InvalidStateError when calling after the
2590         document has been detached, instead of throwing an InvalidStateError. This behavior is as per
2591         specification:
2592         - https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia (Step 4)
2593         I needed to make this change to keep one of our layout tests passing.
2594
2595         * dom/Document.cpp:
2596         (WebCore::Document::attachToCachedFrame):
2597         (WebCore::Document::detachFromFrame):
2598         * dom/Document.h:
2599         * page/DOMWindow.cpp:
2600         (WebCore::DOMWindow::didSecureTransitionTo):
2601         (WebCore::DOMWindow::willDetachDocumentFromFrame):
2602         (WebCore::DOMWindow::setStatus):
2603         (WebCore::DOMWindow::detachFromFrame):
2604         (WebCore::DOMWindow::attachToFrame):
2605         * page/DOMWindow.h:
2606         * page/DOMWindowProperty.cpp:
2607         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
2608         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
2609         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
2610         * page/Frame.cpp:
2611         (WebCore::Frame::disconnectOwnerElement):
2612
2613         * platform/mock/MockRealtimeVideoSource.cpp:
2614         (WebCore::MockRealtimeVideoSource::drawText):
2615         Calling drawText() with a null String hits an assertion in debug. This was triggered by one of
2616         our layout tests so I made sure we only call drawText when the String is not null.
2617
2618 2018-10-04  Jeremy Jones  <jeremyj@apple.com>
2619
2620         Unify implementation in VideoFullscreenInterfaceAVKit
2621         https://bugs.webkit.org/show_bug.cgi?id=190091
2622         rdar://problem/44734523
2623
2624         Reviewed by Jer Noble.
2625
2626         No new tests because no behavior change.
2627
2628         Unified code in VideoFullscreenInterfaceAVKit now that new code path is proven and include
2629         any changes that had been made in the old path.
2630
2631         * platform/ios/VideoFullscreenInterfaceAVKit.h:
2632         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2633         (-[WebAVPlayerViewControllerDelegate playerViewControllerShouldStartPictureInPictureFromInlineWhenEnteringBackground:]):
2634         (VideoFullscreenInterfaceAVKit::preparedToExitFullscreen):
2635         (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
2636         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2637         (VideoFullscreenControllerContext::requestUpdateInlineRect):
2638         (VideoFullscreenControllerContext::requestVideoContentLayer):
2639         (VideoFullscreenControllerContext::returnVideoContentLayer):
2640         (VideoFullscreenControllerContext::didSetupFullscreen):
2641         (VideoFullscreenControllerContext::didExitFullscreen):
2642
2643 2018-10-04  Justin Michaud  <justin_michaud@apple.com>
2644
2645         Bindings generator should support static attributes that are interfaces with CallWith
2646         https://bugs.webkit.org/show_bug.cgi?id=190292
2647
2648         Reviewed by Chris Dumez.
2649
2650         Add support for static attributes that support callWith to the bindings generator. This
2651         is needed for CSS.paintWorklet.
2652
2653         * bindings/scripts/CodeGeneratorJS.pm:
2654         (GenerateAttributeGetterBodyDefinition):
2655         * bindings/scripts/test/JS/JSTestObj.cpp:
2656         (WebCore::jsTestObjConstructorTestStaticReadonlyObjGetter):
2657         (WebCore::jsTestObjConstructorTestStaticReadonlyObj):
2658         * bindings/scripts/test/TestObj.idl:
2659
2660 2018-10-04  Matt Lewis  <jlewis3@apple.com>
2661
2662         Unreviewed, rolling out r236730.
2663
2664         This caused a consistent crash in test http/tests/media/media-stream/get-display-media-prompt.html.
2665
2666         Reverted changeset:
2667
2668         "[MediaStream] RealtimeMediaSource should be able to vend
2669         hashed IDs"
2670         https://bugs.webkit.org/show_bug.cgi?id=190142
2671         https://trac.webkit.org/changeset/236730
2672
2673 2018-10-04  Wenson Hsieh  <wenson_hsieh@apple.com>
2674
2675         [macOS] Fix some font attribute conversion bugs in preparation for "Font > Styles…" support in WebKit2
2676         https://bugs.webkit.org/show_bug.cgi?id=190289
2677         <rdar://problem/45020806>
2678
2679         Reviewed by Ryosuke Niwa.
2680
2681         Makes some small adjustments to fix two bugs in font attribute conversion logic. See below for more detail.
2682
2683         Tests:  FontManagerTests.AddFontShadowUsingFontOptions
2684                 FontManagerTests.AddAndRemoveColorsUsingFontOptions
2685
2686         * editing/FontAttributeChanges.cpp:
2687         (WebCore::cssValueListForShadow):
2688         * editing/cocoa/FontAttributesCocoa.mm:
2689
2690         Currently, we bail from adding a font shadow if the shadow's offset is empty. However, valid shadow offsets may
2691         have negative dimensions, so a check for `isZero()` should be used instead.
2692
2693         (WebCore::FontAttributes::createDictionary const):
2694         * platform/mac/WebCoreNSFontManagerExtras.mm:
2695
2696         Fall back to a transparent background color; this allows senders to remove the current background color by just
2697         removing NSBackgroundColorAttributeName from the attribute dictionary, rather than explicitly setting it to the
2698         transparent color (this scenario is exercised when using "Font > Styles…" to specify a font style without a
2699         background color).
2700
2701         (WebCore::computedFontAttributeChanges):
2702
2703 2018-10-03  Ryosuke Niwa  <rniwa@webkit.org>
2704
2705         MutationRecord doesn't keep JS wrappers of target, addedNodes, and removedNodes alive
2706         https://bugs.webkit.org/show_bug.cgi?id=190277
2707
2708         Reviewed by Antti Koivisto.
2709
2710         The bug was caused by JSMutationRecord not visiting any of the nodes referenced by mutation records.
2711
2712         Fixed the bug by adding JSMutationRecord::visitAdditionalChildren, which adds the root nodes of
2713         the root nodes of the target, addedNodes, and removedNodes in each mutation record.
2714
2715         Test: fast/dom/MutationObserver/mutation-record-keeps-js-wrappers-of-nodes-alive.html
2716
2717         * Sources.txt:
2718         * WebCore.xcodeproj/project.pbxproj:
2719         * bindings/js/JSMutationRecordCustom.cpp: Added.
2720         (WebCore::JSMutationRecord::visitAdditionalChildren): Added.
2721         * bindings/js/JSPerformanceObserverCustom.cpp: This file got dumped out of a unified build file
2722         where using namespace JSC was defined. Use the fully qualified names to refer to JSC types.
2723         (WebCore::JSPerformanceObserverOwner::isReachableFromOpaqueRoots):
2724         * dom/MutationRecord.cpp:
2725         (WebCore::ChildListRecord::visitNodesConcurrently): Added.
2726         (WebCore::RecordWithEmptyNodeLists::visitNodesConcurrently): Added.
2727         (WebCore::MutationRecordWithNullOldValue::visitNodesConcurrently): Added.
2728         * dom/MutationRecord.h:
2729         * dom/MutationRecord.idl:
2730
2731 2018-10-04  Jiewen Tan  <jiewen_tan@apple.com>
2732
2733         [WebAuthN] Move time out control from WebProcess to UIProcess
2734         https://bugs.webkit.org/show_bug.cgi?id=189642
2735         <rdar://problem/44476765>
2736
2737         Reviewed by Chris Dumez.
2738
2739         Since now the control unit of WebAuthN has been moved to UI Process, i.e. AuthenticatorManager,
2740         the time out timer should move to UI Process as well.
2741
2742         Tests: http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html
2743                http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html
2744
2745         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2746         (WebCore::AuthenticatorCoordinator::create const):
2747         (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
2748         (WebCore::AuthenticatorCoordinatorInternal::initTimeoutTimer): Deleted.
2749         (WebCore::AuthenticatorCoordinatorInternal::didTimeoutTimerFire): Deleted.
2750         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
2751         (WebCore::PublicKeyCredentialCreationOptions::encode const):
2752         (WebCore::PublicKeyCredentialCreationOptions::decode):
2753         * Modules/webauthn/PublicKeyCredentialRequestOptions.h:
2754         (WebCore::PublicKeyCredentialRequestOptions::encode const):
2755         (WebCore::PublicKeyCredentialRequestOptions::decode):
2756
2757 2018-10-04  Chris Dumez  <cdumez@apple.com>
2758
2759         Regression(r236779): Crash when changing the input element type from inside an 'input' event listener
2760         https://bugs.webkit.org/show_bug.cgi?id=190252
2761
2762         Reviewed by Alex Christensen.
2763
2764         Add a null check for element() after firing the 'input' event and before firing the 'change' event
2765         in case the input event listener changes the input type.
2766
2767         Tests: fast/dom/HTMLInputElement/change-type-in-click-event-listener.html
2768                fast/dom/HTMLInputElement/change-type-in-input-event-listener.html
2769
2770         * html/BaseCheckableInputType.cpp:
2771         (WebCore::BaseCheckableInputType::fireInputAndChangeEvents):
2772
2773 2018-10-04  Yuhan Wu  <yuhan_wu@apple.com>
2774
2775         runtime flag and IDL for MediaRecorder
2776         https://bugs.webkit.org/show_bug.cgi?id=190018
2777
2778         Reviewed by Youenn Fablet and Chris Dumez.
2779
2780         Covered by tests:
2781         imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
2782         imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html
2783
2784         Add an architecture of the IDL and the class for MediaRecorder and BlobEvent.
2785
2786         * CMakeLists.txt:
2787         * DerivedSources.make:
2788         * Modules/mediarecorder/BlobEvent.h:
2789         (WebCore::BlobEvent::create):
2790         (WebCore::BlobEvent:::Event):
2791         * Modules/mediarecorder/BlobEvent.idl:
2792         * Modules/mediarecorder/MediaRecorder.cpp:
2793         (WebCore::MediaRecorder::create):
2794         (WebCore::MediaRecorder::MediaRecorder):
2795         (WebCore::MediaRecorder::activeDOMObjectName const):
2796         (WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
2797         * Modules/mediarecorder/MediaRecorder.h: Added.
2798         (WebCore::MediaRecorder::state const):
2799         (WebCore::MediaRecorder::~MediaRecorder):
2800         * Modules/mediarecorder/MediaRecorder.idl:
2801         * Modules/mediastream/RTCRtpReceiver.cpp:
2802         * Sources.txt:
2803         * WebCore.xcodeproj/project.pbxproj:
2804         * bindings/js/WebCoreBuiltinNames.h:
2805         * page/RuntimeEnabledFeatures.h:
2806         (WebCore::RuntimeEnabledFeatures::mediaRecorderEnabled const):
2807         (WebCore::RuntimeEnabledFeatures::setMediaRecorderEnabled):
2808
2809 2018-10-04  Chris Dumez  <cdumez@apple.com>
2810
2811         Unreviewed, rolling out r236803.
2812
2813         Caused crashes on some bots
2814
2815         Reverted changeset:
2816
2817         "Regression(r236779): Crash when changing the input element
2818         type from inside an 'input' event listener"
2819         https://bugs.webkit.org/show_bug.cgi?id=190252
2820         https://trac.webkit.org/changeset/236803
2821
2822 2018-10-04  Dan Bernstein  <mitz@apple.com>
2823
2824         Tried to fix the Mojave build after r236832.
2825
2826         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2827         (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
2828         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
2829
2830 2018-10-04  Michael Catanzaro  <mcatanzaro@igalia.com>
2831
2832         ENABLE(ASSERT) used in grid code when !ASSERT_DISABLED is desired
2833         https://bugs.webkit.org/show_bug.cgi?id=190145
2834
2835         Reviewed by Javier Fernandez.
2836
2837         Replace ENABLE(ASSERT), which doesn't exist, with !ASSERT_DISABLED.
2838
2839         * rendering/RenderGrid.cpp:
2840         (WebCore::RenderGrid::placeItemsOnGrid const):
2841         (WebCore::RenderGrid::baselinePosition const):
2842         * rendering/style/GridArea.h:
2843         (WebCore::GridSpan::GridSpan):
2844
2845 2018-10-04  Dan Bernstein  <mitz@apple.com>
2846
2847         WebCore part of [Xcode] Update some build settings as recommended by Xcode 10
2848         https://bugs.webkit.org/show_bug.cgi?id=190250
2849
2850         Reviewed by Andy Estes.
2851
2852         * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF,
2853           CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED, and CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS.
2854
2855         * WebCore.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck and remove a
2856           duplicate reference in a Compile Sources build phase.
2857
2858         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Suppress -Wdeprecated-implementations
2859           around implementations of deprecated accessibility methods.
2860
2861         * loader/TextResourceDecoder.cpp:
2862         (WebCore::TextResourceDecoder::checkForBOM): Addressed CLANG_WARN_COMMA.
2863
2864         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2865         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]):
2866           Suppress -Wdeprecated-implementations around implementations of this deprecated delegate method.
2867         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): Ditto.
2868
2869 2018-10-02  Darin Adler  <darin@apple.com>
2870
2871         AudioNode.connect should use [ReturnValue]
2872         https://bugs.webkit.org/show_bug.cgi?id=190231
2873
2874         Reviewed by Eric Carlson.
2875
2876         This is a slightly more efficient way to return a value that is always
2877         identical to one of the arguments, so use it here.
2878
2879         * Modules/webaudio/AudioBasicInspectorNode.cpp:
2880         (WebCore::AudioBasicInspectorNode::connect): Return ExceptionOr<void>.
2881         * Modules/webaudio/AudioBasicInspectorNode.h: Ditto.
2882         * Modules/webaudio/AudioNode.cpp:
2883         (WebCore::AudioNode::connect): Ditto.
2884         * Modules/webaudio/AudioNode.h: Ditto.
2885
2886         * Modules/webaudio/AudioNode.idl: Use [ReturnValue].
2887
2888 2018-10-03  Justin Michaud  <justin_michaud@apple.com>
2889
2890         Registered custom properties should allow inheritance to be controlled
2891         https://bugs.webkit.org/show_bug.cgi?id=190038
2892
2893         Reviewed by Antti Koivisto.
2894
2895         Tests: css-custom-properties-api/inherits.html
2896                css-custom-properties-api/length.html
2897                css-custom-properties-api/length2.html
2898
2899         Add support for inherits property on registered css custom properties, as well
2900         as a starting point for evaluating registered custom properties with types. Registered
2901         custom properties are evaluated as length values before being substituted. Currently,
2902         relative unit cycles are not detected.
2903
2904         A proper solution is still needed to resolve relative unit cycles, and to apply properties like font
2905         and line-height before they are needed by custom properties. In this patch, the font-size property is
2906         applied twice, once before and once after resolving custom property values.
2907
2908         * Sources.txt:
2909         * WebCore.xcodeproj/project.pbxproj:
2910         * css/CSSComputedStyleDeclaration.cpp:
2911         (WebCore::ComputedStyleExtractor::customPropertyValue):
2912         (WebCore::CSSComputedStyleDeclaration::length const):
2913         (WebCore::CSSComputedStyleDeclaration::item const):
2914
2915         Allow JS to get custom properties that have been resolved to a length. Also add properties from
2916         m_rareNonInheritedData.
2917
2918         * css/CSSCustomPropertyValue.cpp:
2919         (WebCore::CSSCustomPropertyValue::checkVariablesForCycles const):
2920         (WebCore::CSSCustomPropertyValue::resolveVariableReferences const):
2921         * css/CSSCustomPropertyValue.h:
2922         * css/CSSRegisteredCustomProperty.cpp: Copied from Source/WebCore/css/CSSRegisteredCustomProperty.h.
2923         (WebCore::CSSRegisteredCustomProperty::CSSRegisteredCustomProperty):
2924         (WebCore::CSSRegisteredCustomProperty::initialValueCopy const):
2925         * css/CSSRegisteredCustomProperty.h:
2926         (WebCore::CSSRegisteredCustomProperty::initialValue const):
2927         * css/CSSVariableData.cpp:
2928         (WebCore::CSSVariableData::checkVariablesForCycles const):
2929         (WebCore::CSSVariableData::checkVariablesForCyclesWithRange const):
2930         (WebCore::CSSVariableData::resolveVariableFallback const):
2931         (WebCore::CSSVariableData::resolveVariableReference const):
2932         (WebCore::CSSVariableData::resolveVariableReferences const):
2933         (WebCore::CSSVariableData::resolveTokenRange const):
2934         * css/CSSVariableData.h:
2935         * css/CSSVariableReferenceValue.cpp:
2936         (WebCore::CSSVariableReferenceValue::checkVariablesForCycles const):
2937         * css/CSSVariableReferenceValue.h:
2938         * css/DOMCSSRegisterCustomProperty.cpp:
2939         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
2940
2941         Use RenderStyle over passing in a customProperties map.
2942
2943         * css/StyleBuilder.h:
2944         * css/StyleBuilderConverter.h:
2945         (WebCore::StyleBuilderConverter::convertLength):
2946         (WebCore::StyleBuilderConverter::convertLengthOrAuto):
2947         (WebCore::StyleBuilderConverter::convertLengthSizing):
2948         (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
2949         * css/StyleBuilderCustom.h:
2950         (WebCore::StyleBuilderCustom::applyInitialCustomProperty):
2951         (WebCore::StyleBuilderCustom::applyInheritCustomProperty):
2952         (WebCore::StyleBuilderCustom::applyValueCustomProperty):
2953         * css/StyleResolver.cpp:
2954         (WebCore::StyleResolver::useSVGZoomRules const):
2955         (WebCore::StyleResolver::useSVGZoomRulesForLength const):
2956         (WebCore::StyleResolver::applyProperty):
2957         (WebCore::StyleResolver::resolvedVariableValue const):
2958         (WebCore::StyleResolver::applyCascadedProperties):
2959         (WebCore::StyleResolver::useSVGZoomRules): Deleted.
2960         (WebCore::StyleResolver::useSVGZoomRulesForLength): Deleted.
2961         (WebCore::StyleResolver::resolvedVariableValue): Deleted.
2962         * css/StyleResolver.h:
2963         * css/makeprop.pl:
2964
2965         Move custom property initial values to StyleBuilerCustom. Hook them up to correctly deal with
2966         inheritance, unset and revert values.
2967
2968         * css/parser/CSSParser.cpp:
2969         (WebCore::CSSParser::parseValueWithVariableReferences):
2970         * css/parser/CSSParser.h:
2971         * css/parser/CSSParserContext.cpp:
2972         (WebCore::CSSParserContext::CSSParserContext):
2973         * css/parser/CSSParserContext.h:
2974         * css/parser/CSSPropertyParser.cpp:
2975         (WebCore::CSSPropertyParser::parseSingleValue):
2976
2977         Allow parsing custom property values as lengths.
2978
2979         * rendering/style/RenderStyle.cpp:
2980         (WebCore::RenderStyle::checkVariablesInCustomProperties):
2981         * rendering/style/RenderStyle.h:
2982         (WebCore::RenderStyle::inheritedCustomProperties const):
2983         (WebCore::RenderStyle::nonInheritedCustomProperties const):
2984         (WebCore::RenderStyle::setInheritedCustomPropertyValue):
2985         (WebCore::RenderStyle::setNonInheritedCustomPropertyValue):
2986         (WebCore::RenderStyle::getCustomProperty const):
2987         (WebCore::RenderStyle::customProperties const): Deleted.
2988         (WebCore::RenderStyle::setCustomPropertyValue): Deleted.
2989         * rendering/style/StyleRareNonInheritedData.cpp:
2990         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2991         (WebCore::StyleRareNonInheritedData::operator== const):
2992         * rendering/style/StyleRareNonInheritedData.h:
2993         * style/StyleResolveForDocument.cpp:
2994         (WebCore::Style::resolveForDocument):
2995
2996         Add support for RenderStyle to deal with both inherited and non-inherited properties, and to find
2997         cycles between them.
2998
2999 2018-10-03  Ryosuke Niwa  <rniwa@webkit.org>
3000
3001         Clear m_pendingTargets in MutationObserver::takeRecords
3002         https://bugs.webkit.org/show_bug.cgi?id=190240
3003
3004         Reviewed by Geoffrey Garen.
3005
3006         In r236781, we delayed the clearing of m_pendingTargets until the end of microtask to avoid a race between
3007         mutation record's JS wrappers getting created and GC marking JS wrappers of elements in mutation records.
3008
3009         This patch shortens this delay to until mutation record's JS wrappers are created. Specifically, we make
3010         MutationObserver::takeRecords() return a struct which has both pending targets hash set and the vector of
3011         mutation records so that the hash set survives through the creation of JS wrappers for mutation records.
3012
3013         To do this, a new IDL extended attribute "ResultField" is introduced to specify the member variable in
3014         which the result is stored.
3015
3016         No new tests. Unfortunately, this race condition appears to be impossible to capture in a regression test.
3017
3018         * bindings/scripts/CodeGeneratorJS.pm:
3019         (GenerateOperationBodyDefinition):
3020         * bindings/scripts/IDLAttributes.json:
3021         * bindings/scripts/test/JS/JSTestInterface.cpp:
3022         (WebCore::jsTestInterfacePrototypeFunctionTakeNodesBody):
3023         (WebCore::jsTestInterfacePrototypeFunctionTakeNodes):
3024         * bindings/scripts/test/TestImplements.idl: Added a test case.
3025         * dom/MutationObserver.cpp:
3026         (WebCore::MutationObserver::takeRecords):
3027         (WebCore::MutationObserver::deliver):
3028         * dom/MutationObserver.h:
3029         * dom/MutationObserver.idl:
3030
3031 2018-10-03  Youenn Fablet  <youenn@apple.com>
3032
3033         Add VP8 support to WebRTC
3034         https://bugs.webkit.org/show_bug.cgi?id=189976
3035
3036         Reviewed by Eric Carlson.
3037
3038         Add a runtime flag to control activation of VP8 codec.
3039         Bind this runtime flag to the video codec factories.
3040         Test: webrtc/video-mute-vp8.html
3041
3042         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3043         (WebCore::createLibWebRTCPeerConnectionBackend):
3044         * page/RuntimeEnabledFeatures.h:
3045         (WebCore::RuntimeEnabledFeatures::webRTCVP8CodecEnabled const):
3046         (WebCore::RuntimeEnabledFeatures::setWebRTCVP8CodecEnabled):
3047         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3048         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
3049         (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
3050         (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
3051         * testing/Internals.cpp:
3052         (WebCore::Internals::resetToConsistentState):
3053         Enable VP8 codec for tests.
3054
3055 2018-09-28  Jiewen Tan  <jiewen_tan@apple.com>
3056
3057         [WebCrypto] ECDSA could not deal with invalid signature inputs
3058         https://bugs.webkit.org/show_bug.cgi?id=189879
3059         <rdar://problem/44701276>
3060
3061         Reviewed by Brent Fulgham.
3062
3063         Add some guards over detections of the start positions of r/s.
3064
3065         Covered by improved existing tests.
3066
3067         * crypto/mac/CryptoAlgorithmECDSAMac.cpp:
3068         (WebCore::verifyECDSA):
3069
3070 2018-10-03  Jer Noble  <jer.noble@apple.com>
3071
3072         Add a quirk to disable Modern EME for sites which are broken with it enabled
3073         https://bugs.webkit.org/show_bug.cgi?id=190051
3074
3075         Reviewed by Daniel Bates.
3076
3077         Add a new class, parallel to Settings, to track quirk behavior. Extend the bindings
3078         generator to support a DisabledByQuirk attribute, and set this attribute for all
3079         the Modern EME types. Check whether the quirk is set inside HTMLMediaElement in
3080         addition to the existing Setting.
3081
3082         * Modules/encryptedmedia/MediaKeyMessageEvent.idl:
3083         * Modules/encryptedmedia/MediaKeySession.idl:
3084         * Modules/encryptedmedia/MediaKeyStatusMap.idl:
3085         * Modules/encryptedmedia/MediaKeySystemAccess.idl:
3086         * Modules/encryptedmedia/MediaKeys.idl:
3087         * Modules/encryptedmedia/NavigatorEME.idl:
3088         * Sources.txt:
3089         * WebCore.xcodeproj/project.pbxproj:
3090         * bindings/scripts/CodeGenerator.pm:
3091         (WK_ucfirst):
3092         * bindings/scripts/CodeGeneratorJS.pm:
3093         (NeedsRuntimeCheck):
3094         (GenerateRuntimeEnableConditionalString):
3095         * bindings/scripts/IDLAttributes.json:
3096         * bindings/scripts/preprocess-idls.pl:
3097         (GenerateConstructorAttributes):
3098         * dom/Document.cpp:
3099         (WebCore::Document::Document):
3100         * dom/Document.h:
3101         (WebCore::Document::quirks const):
3102         * html/HTMLMediaElement.cpp:
3103         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
3104         (WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
3105         * html/HTMLMediaElement.idl:
3106         * page/Quirks.cpp: Added.
3107         (Quirks::Quirks):
3108         (Quirks::disableEncryptedMediaAPIQuirk const):
3109         * page/Quirks.h: Added.
3110
3111 2018-10-03  Antoine Quint  <graouts@apple.com>
3112
3113         [Web Animations] REGRESSION: setting 'animation-name: none' after a 'fill: forwards' animation has completed does not revert to the unanimated style
3114         https://bugs.webkit.org/show_bug.cgi?id=190257
3115         <rdar://problem/41341473>
3116
3117         Reviewed by Dean Jackson.
3118
3119         Test: animations/animation-fill-forwards-removal.html
3120
3121         While we removed a declarative animation that was no longer targetting its element, we were not removing it from the declarative animation maps
3122         on the timeline, which means that the animation would still be picked up when resolving styles. We now notify the timeline that the animation
3123         was detached from the element. This preserves the DeclarativeAnimation relationship returning the element as its effect's target and the document
3124         timeline as its timeline, but the document timeline will no longer see this animation as targeting this element.
3125
3126         * animation/AnimationTimeline.cpp:
3127         (WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation):
3128         * animation/DeclarativeAnimation.h:
3129         (WebCore::DeclarativeAnimation::target const):
3130
3131 2018-10-03  Jer Noble  <jer.noble@apple.com>
3132
3133         CRASH in CVPixelBufferGetBytePointerCallback()
3134         https://bugs.webkit.org/show_bug.cgi?id=190092
3135
3136         Reviewed by Eric Carlson.
3137
3138         Speculative fix for crash that occurs when callers of CVPixelBufferGetBytePointerCallback() attempt
3139         to read the last byte of a CVPixelBuffer (as a pre-flight check) and crash due to a memory access
3140         error. It's speculated that mismatching CVPixelBufferLockBytePointer / CVPixelBufferUnlockBytePointer
3141         calls could result in an incorrect state inside the CVPixelBuffer. Add log count checks, locking, and
3142         release logging to try to pinpoint if mismatch lock counts are occurring in this code path.
3143
3144         * platform/graphics/cv/PixelBufferConformerCV.cpp:
3145         (WebCore::CVPixelBufferGetBytePointerCallback):
3146         (WebCore::CVPixelBufferReleaseBytePointerCallback):
3147         (WebCore::CVPixelBufferReleaseInfoCallback):
3148         (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer):
3149
3150 2018-10-03  Chris Dumez  <cdumez@apple.com>
3151
3152         Regression(r236779): Crash when changing the input element type from inside an 'input' event listener
3153         https://bugs.webkit.org/show_bug.cgi?id=190252
3154
3155         Reviewed by Alex Christensen.
3156
3157         Add a null check for element() after firing the 'input' event and before firing the 'change' event
3158         in case the input event listener changes the input type.
3159
3160         Tests: fast/dom/HTMLInputElement/change-type-in-click-event-listener.html
3161                fast/dom/HTMLInputElement/change-type-in-input-event-listener.html
3162
3163         * html/BaseCheckableInputType.cpp:
3164         (WebCore::BaseCheckableInputType::fireInputAndChangeEvents):
3165
3166 2018-10-03  Chris Dumez  <cdumez@apple.com>
3167
3168         Passing noopener=NOOPENER to window.open() should cause the new window to not have an opener
3169         https://bugs.webkit.org/show_bug.cgi?id=190251
3170
3171         Reviewed by Alex Christensen.
3172
3173         Passing noopener=NOOPENER to window.open() should cause the new window to not have an opener,
3174         similarly to noopener=1:
3175         - https://html.spec.whatwg.org/#window-open-steps (step 5)
3176
3177         It does not matter what the value is, if there is a key named "noopener", then the new window
3178         should not have an opener.
3179
3180         No new tests, rebaselined existing test.
3181
3182         * page/WindowFeatures.cpp:
3183         (WebCore::setWindowFeature):
3184
3185 2018-10-03  Ryosuke Niwa  <rniwa@webkit.org>
3186
3187         GC can collect JS wrappers of nodes in the mutation records waiting to be delivered
3188         https://bugs.webkit.org/show_bug.cgi?id=190115
3189
3190         Reviewed by Geoffrey Garen.
3191
3192         Fixed the bug by retaining JS wrappers of elements in mutation records using GCReachableRef.
3193
3194         This patch deploys GCReachableRef in two places: MutationObserver where each mutation record's
3195         target is kept alive and MutationObserverRegistration where each node which had been removed
3196         from an observed tree is kept alive for a subtree observation.
3197
3198         No new test since the test which can reproduce this problem is too slow.
3199
3200         * dom/GCReachableRef.h:
3201         (WebCore::GCReachableRef): Made it work with hash table.
3202         (WebCore::GCReachableRef::operator T& const):
3203         (WebCore::GCReachableRef::GCReachableRef):
3204         (WebCore::GCReachableRef::isHashTableDeletedValue const):
3205         (WebCore::GCReachableRef::isHashTableEmptyValue const):
3206         (WebCore::GCReachableRef::ptrAllowingHashTableEmptyValue const):
3207         (WebCore::GCReachableRef::ptrAllowingHashTableEmptyValue):
3208         (WebCore::GCReachableRef::assignToHashTableEmptyValue):
3209         (WTF::HashTraits<WebCore::GCReachableRef<P>>::emptyValue):
3210         (WTF::HashTraits<WebCore::GCReachableRef<P>>::constructEmptyValue):
3211         (WTF::HashTraits<WebCore::GCReachableRef<P>>::isEmptyValue):
3212         (WTF::HashTraits<WebCore::GCReachableRef<P>>::assignToEmpty):
3213         (WTF::HashTraits<WebCore::GCReachableRef<P>>::peek):
3214         (WTF::HashTraits<WebCore::GCReachableRef<P>>::take):
3215         * dom/MutationObserver.cpp:
3216         (WebCore::MutationObserver::takeRecords): Don't clear m_pendingTargets because that would allow wrappers
3217         to be collected before elements in mutation records are accessed. We delay until the end of the current
3218         microtask at which point deliver() function is called.
3219         (WebCore::MutationObserver::disconnect):
3220         (WebCore::MutationObserver::enqueueMutationRecord): Add the target to the list of elements to keep alive.
3221         This is needed for a newly inserted node, a node with attribute change, etc...
3222         (WebCore::MutationObserver::deliver): Keep the set of transient registration targets alive until mutation
3223         records are delivered to each observer. These are nodes which had been removed from a tree and whose
3224         subtree had still been obsreved up until this point.
3225         * dom/MutationObserver.h:
3226         * dom/MutationObserverRegistration.cpp:
3227         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
3228         (WebCore::MutationObserverRegistration::takeTransientRegistrations): Return the hash set of elemenets
3229         that need to be kept alive so that MutationObserver::deliver can keep them alive until the deliver
3230         function had been called.
3231         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet const):
3232         * dom/MutationObserverRegistration.h:
3233
3234 2018-10-03  Dean Jackson  <dino@apple.com>
3235
3236         Make the Pointer Events feature description valid
3237         https://bugs.webkit.org/show_bug.cgi?id=190254
3238
3239         Reviewed by Simon Fraser.
3240
3241         * features.json:
3242
3243 2018-10-03  Matt Lewis  <jlewis3@apple.com>
3244
3245         Unreviewed, rolling out r236781.
3246
3247         The test added with this commit is timing out consistently.
3248
3249         Reverted changeset:
3250
3251         "GC can collect JS wrappers of nodes in the mutation records
3252         waiting to be delivered"
3253         https://bugs.webkit.org/show_bug.cgi?id=190115
3254         https://trac.webkit.org/changeset/236781
3255
3256 2018-10-03  Dean Jackson  <dino@apple.com>
3257
3258         [macOS] Switching to discrete GPU should be done in the UI process
3259         https://bugs.webkit.org/show_bug.cgi?id=189361
3260         <rdar://problem/43949622>
3261
3262         Try to fix the IOSMAC build.
3263
3264         * platform/graphics/GraphicsContext3D.h:
3265
3266 2018-10-03  Chris Dumez  <cdumez@apple.com>
3267
3268         input.checked is incorrect while we're parsing its children
3269         https://bugs.webkit.org/show_bug.cgi?id=190227
3270
3271         Reviewed by Ryosuke Niwa.
3272
3273         input.checked was incorrect while we're parsing its children because we were delaying updating the
3274         checked state until HTMLInputElement::finishParsingChildren() is called, to avoid a bad interaction
3275         with form state restoration.
3276
3277         In this patch, we update the checked state as soon as the 'checked' attribute is set, when we know
3278         that no form state to restore.
3279
3280         fast/forms/radio/state-restore-radio-group.html covers the form restoration case and is still
3281         passing.
3282
3283         No new tests, rebaselined existing test.
3284
3285         * html/FormController.cpp:
3286         (WebCore::FormController::hasFormStateToRestore const):
3287         * html/FormController.h:
3288         * html/HTMLInputElement.cpp:
3289         (WebCore::HTMLInputElement::parseAttribute):
3290
3291 2018-10-03  Miguel Gomez  <magomez@igalia.com>
3292
3293         [GTK][WPE] Incorrect rendering of layers whose backingStore hasn't changed
3294         https://bugs.webkit.org/show_bug.cgi?id=190249
3295
3296         Reviewed by Žan Doberšek.
3297
3298         Do not overwrite m_nicosia.performLayerSync when updating the content buffers or we lose
3299         the value calculated during the layer flush. Use an OR instead to keep the old value.
3300
3301         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3302         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
3303
3304 2018-10-03  Youenn Fablet  <youenn@apple.com>
3305
3306         Enable H264 simulcast
3307         https://bugs.webkit.org/show_bug.cgi?id=190167
3308
3309         Reviewed by Eric Carlson.
3310
3311         Activate H264 simulcast trial field.
3312         Make track.getSettings() expose width and height for incoming tracks.
3313
3314         Test: webrtc/simulcast-h264.html
3315
3316         * Configurations/WebCore.xcconfig:
3317         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3318         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
3319         * platform/mediastream/RealtimeIncomingVideoSource.cpp:
3320         (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
3321
3322 2018-10-03  Michael Catanzaro  <mcatanzaro@igalia.com>
3323
3324         -Wunused-variable in RenderLayer::updateScrollableAreaSet
3325         https://bugs.webkit.org/show_bug.cgi?id=190200
3326
3327         Reviewed by Yusuke Suzuki.
3328
3329         Pass it through UNUSED_VARIABLE().
3330
3331         * rendering/RenderLayer.cpp:
3332         (WebCore::RenderLayer::calculateClipRects const):
3333
3334 2018-10-03  Zan Dobersek  <zdobersek@igalia.com>
3335
3336         Ref<FetchResponse> use-after-move in DOMCache::put()
3337         https://bugs.webkit.org/show_bug.cgi?id=190239
3338
3339         Reviewed by Youenn Fablet.
3340
3341         Retrieve reference from the Ref<FetchResponse> object before it's
3342         move-captured in the lambda that's passed to the
3343         FetchResponse::consumeBodyReceivedByChunk() method that is invoked on
3344         that very same object. This is a classic use-after-move bug that pops
3345         up on compilers with different C++ calling convention.
3346
3347         * Modules/cache/DOMCache.cpp:
3348         (WebCore::DOMCache::put):
3349
3350 2018-10-03  Ryosuke Niwa  <rniwa@webkit.org>
3351
3352         Enable selectionAcrossShadowBoundariesEnabled by default in WebKitLegacy
3353         https://bugs.webkit.org/show_bug.cgi?id=190238
3354
3355         Reviewed by Antti Koivisto.
3356
3357         Enable the feature by default.
3358
3359         * page/Settings.yaml:
3360
3361 2018-10-02  Ryosuke Niwa  <rniwa@webkit.org>
3362
3363         Copying content with shadow DOM doesn't copy any contents
3364         https://bugs.webkit.org/show_bug.cgi?id=157443
3365
3366         Reviewed by Wenson Hsieh.
3367
3368         This patch adds the support for copying and pasting content across shadow boundaries in HTML and plain text,
3369         which is enabled whenever selection across shadow boundaries is enabled.
3370
3371         To do this, TextIterator now has a constructor which takes two Positions, and the node traversal code in
3372         StyledMarkupAccumulator has been abstracted via helper functions as done for TextIterator.
3373
3374         When serializing a HTMl slot element, serialize it as a span with "display: contents" to make sure when
3375         the content is pasted into a shadow tree, it wouldn't affect the slot assignment of the shadow tree.
3376
3377         Tests: editing/pasteboard/copy-paste-across-shadow-boundaries-1.html
3378                editing/pasteboard/copy-paste-across-shadow-boundaries-2.html
3379                editing/pasteboard/copy-paste-across-shadow-boundaries-3.html
3380                editing/pasteboard/copy-paste-across-shadow-boundaries-4.html
3381                editing/pasteboard/copy-paste-across-shadow-boundaries-with-style-1.html
3382                editing/pasteboard/copy-paste-across-shadow-boundaries-with-style-2.html
3383                editing/pasteboard/copy-paste-with-shadow-content.html
3384
3385         * dom/ComposedTreeIterator.h:
3386         (WebCore::assignedSlotIgnoringUserAgentShadow): Moved from TextIterator.cpp.
3387         (WebCore::shadowRootIgnoringUserAgentShadow): Ditto.
3388         (WebCore::firstChildInComposedTreeIgnoringUserAgentShadow): Ditto.
3389         (WebCore::nextSiblingInComposedTreeIgnoringUserAgentShadow): Ditto.
3390         * dom/Position.h:
3391         (WebCore::Position::treeScope const): Added.
3392         * editing/EditingStyle.cpp: