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