[Web Animations] Provide a way to query accelerated animations for internal testing
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-09-20  Antoine Quint  <graouts@apple.com>
2
3         [Web Animations] Provide a way to query accelerated animations for internal testing
4         https://bugs.webkit.org/show_bug.cgi?id=189762
5
6         Reviewed by Dean Jackson.
7
8         Expose a new internals.acceleratedAnimationsForElement(element) method to allow layout tests to query the current list
9         of accelerated animations for a given element. Currently only the animated property and animation speed are exposed, which
10         will allow us to identify missing, running and paused accelerated animations.
11
12         * animation/DocumentTimeline.cpp:
13         (WebCore::DocumentTimeline::acceleratedAnimationsForElement const):
14         * animation/DocumentTimeline.h:
15         * platform/graphics/GraphicsLayer.h:
16         (WebCore::GraphicsLayer::acceleratedAnimationsForTesting const):
17         * platform/graphics/ca/GraphicsLayerCA.cpp:
18         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
19         * platform/graphics/ca/GraphicsLayerCA.h:
20         * testing/Internals.cpp:
21         (WebCore::Internals::acceleratedAnimationsForElement):
22         * testing/Internals.h:
23         * testing/Internals.idl:
24
25 2018-09-19  Ryosuke Niwa  <rniwa@webkit.org>
26
27         Improve node statistics for rare data
28         https://bugs.webkit.org/show_bug.cgi?id=189775
29
30         Reviewed by Simon Fraser.
31
32         Report reasons we created NodeRareData and ElementRareData in node statistics.
33
34         Added NodeRareData::useTypes and ElementRareData::useTypes which returns OptionSet<NodeRareData::UseType>
35         indicating which instance member of the rare data is currently in use.
36
37         * dom/Element.cpp:
38         * dom/Element.h:
39         * dom/ElementRareData.h:
40         (WebCore::defaultMinimumSizeForResizing):
41         (WebCore::ElementRareData::useTypes const):
42         * dom/Node.cpp:
43         (WebCore::stringForRareDataUseType):
44         (WebCore::Node::dumpStatistics):
45         * dom/NodeRareData.cpp:
46         * dom/NodeRareData.h:
47         (WebCore::NodeRareData::useTypes const):
48
49 2018-09-19  Ryosuke Niwa  <rniwa@webkit.org>
50
51         REGRESSION(r235917): 2% regression in Dromaeo CSS selector on MacBookPro11,4
52         https://bugs.webkit.org/show_bug.cgi?id=189738
53
54         Reviewed by Yusuke Suzuki.
55
56         The regression was caused by the regundant walk to the parent element. Removed it to fix the regression.
57
58         * cssjit/SelectorCompiler.cpp:
59         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
60         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
61
62 2018-09-19  John Wilander  <wilander@apple.com>
63
64         Resource Load Statistics: Add optional cap on partitioned cache max age
65         https://bugs.webkit.org/show_bug.cgi?id=189711
66         <rdar://problem/39246837>
67
68         Reviewed by Antti Koivisto and Chris Dumez.
69
70         Test: http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource.html
71
72         * platform/network/NetworkStorageSession.h:
73         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
74         (WebCore::NetworkStorageSession::maxAgeCacheCap):
75             Checks if a max age cap is set and returns it if the request
76             represents a prevalent resource.
77         (WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources):
78         (WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources):
79             New functionality to receive a max age cap setting in the session.
80
81 2018-09-19  Youenn Fablet  <youenn@apple.com>
82
83         Layout Test webrtc/video-mute.html is flaky.
84         https://bugs.webkit.org/show_bug.cgi?id=177501
85
86         Reviewed by Eric Carlson.
87
88         Covered by updated test expectation.
89
90         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
91         (WebCore::createBlackPixelBuffer): Make sure the whole buffer is properly initialized.
92
93 2018-09-19  David Kilzer  <ddkilzer@apple.com>
94
95         WebCoreNSURLSession leaks an NSString (_sessionDescription) in -dealloc
96         <https://webkit.org/b/189742>
97         <rdar://problem/44589774>
98
99         Reviewed by Joseph Pecoraro.
100
101         * platform/network/cocoa/WebCoreNSURLSession.h:
102         (WebCoreNSURLSession._sessionDescription): Change type from
103         NSString * to RetainPtr<NSString>.
104         * platform/network/cocoa/WebCoreNSURLSession.mm: Remove
105         @synthesized statement for sessionDescription so that custom
106         methods can be implemented to handle RetainPtr<NSString>.
107         (-[WebCoreNSURLSession sessionDescription]): Add.
108         (-[WebCoreNSURLSession setSessionDescription:]): Add.
109
110 2018-09-19  Youenn Fablet  <youenn@apple.com>
111
112         Implement sender/receiver getStats
113         https://bugs.webkit.org/show_bug.cgi?id=189707
114
115         Reviewed by Eric Carlson.
116
117         Add support for sender and receiver getStats.
118         Also add support for peer connection selector parameter.
119
120         Add the plumbing of the selector to LibWebRTCMediaEndpoint.
121         Then make use of libwebrtc overloaded methods to retrieve the right stats.
122
123         Covered by updated/rebased tests.
124
125         * Modules/mediastream/PeerConnectionBackend.h:
126         * Modules/mediastream/RTCPeerConnection.cpp:
127         (WebCore::RTCPeerConnection::getStats):
128         * Modules/mediastream/RTCPeerConnection.h:
129         * Modules/mediastream/RTCPeerConnection.idl:
130         * Modules/mediastream/RTCRtpReceiver.cpp:
131         (WebCore::RTCRtpReceiver::RTCRtpReceiver):
132         (WebCore::RTCRtpReceiver::getStats):
133         * Modules/mediastream/RTCRtpReceiver.h:
134         (WebCore::RTCRtpReceiver::create):
135         (WebCore::RTCRtpReceiver::backend):
136         * Modules/mediastream/RTCRtpReceiver.idl:
137         * Modules/mediastream/RTCRtpSender.cpp:
138         (WebCore::RTCRtpSender::create):
139         (WebCore::RTCRtpSender::RTCRtpSender):
140         (WebCore::RTCRtpSender::getStats):
141         * Modules/mediastream/RTCRtpSender.h:
142         * Modules/mediastream/RTCRtpSender.idl:
143         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
144         (WebCore::LibWebRTCMediaEndpoint::getStats):
145         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
146         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
147         (WebCore::LibWebRTCPeerConnectionBackend::getStats):
148         (WebCore::backendFromRTPSender):
149         (WebCore::createReceiverForSource):
150         (WebCore::LibWebRTCPeerConnectionBackend::createReceiver):
151         (WebCore::LibWebRTCPeerConnectionBackend::videoReceiver):
152         (WebCore::LibWebRTCPeerConnectionBackend::audioReceiver):
153         (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
154         (WebCore::LibWebRTCPeerConnectionBackend::addUnifiedPlanTransceiver):
155         (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
156         (WebCore::LibWebRTCPeerConnectionBackend::newRemoteTransceiver):
157         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
158         * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
159
160 2018-09-19  Jer Noble  <jer.noble@apple.com>
161
162         REGRESSION (r236006): New waitingForKey() requirement breaks Modern EME tests.
163         https://bugs.webkit.org/show_bug.cgi?id=189720
164         <rdar://problem/44572140>
165
166         Reviewed by Xabier Rodriguez-Calvar.
167
168         Always call waitingForKey() after calling initializationDataEncountered().
169
170         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
171         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
172         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
173         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initializationDataEncountered):
174
175 2018-09-19  Philippe Normand <pnormand@igalia.com>
176
177         [GStreamer] Add support for AV1 decoding
178         https://bugs.webkit.org/show_bug.cgi?id=189647
179
180         Tweaked by Xabier Rodriguez Calvar <calvaris@igalia.com>.
181         Reviewed by Žan Doberšek.
182
183         AV1 can be muxed in MP4 and WebM containers. The test is an adaptation from Chromium's unittest:
184         https://chromium.googlesource.com/chromium/src/+/master/content/browser/media/media_canplaytype_browsertest.cc
185
186         Test: media/media-can-play-av1.html
187
188         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
189         (WebCore::MediaPlayerPrivateGStreamer::supportsType): Add AV1
190         support. The av01 codec has to be explicitely checked, along with
191         the presence of a compatible AV1 decoder.
192
193 2018-09-18  Basuke Suzuki  <Basuke.Suzuki@sony.com>
194
195         [Curl] Limit capturing extra metrics for Web Inspector when not required.
196         https://bugs.webkit.org/show_bug.cgi?id=189520
197
198         Reviewed by Alex Christensen.
199
200         Respect the value of NetworkDataTask::shouldCaptureExtraNetworkLoadMetrics() to reduce the process
201         time when they are not needed.
202
203         No new tests because there's no behavior change.
204
205         * platform/network/curl/CurlContext.cpp:
206         (WebCore::CurlHandle::getNetworkLoadMetrics):
207         (WebCore::CurlHandle::addExtraNetworkLoadMetrics):
208         * platform/network/curl/CurlContext.h:
209         * platform/network/curl/CurlRequest.cpp:
210         (WebCore::CurlRequest::CurlRequest):
211         (WebCore::CurlRequest::updateNetworkLoadMetrics):
212         * platform/network/curl/CurlRequest.h:
213         (WebCore::CurlRequest::create):
214         * platform/network/curl/ResourceHandleCurl.cpp:
215         (WebCore::ResourceHandle::createCurlRequest):
216
217 2018-09-18  Megan Gardner  <megan_gardner@apple.com>
218
219         Support Images Module Level 4's double-position gradient color stop syntax
220         https://bugs.webkit.org/show_bug.cgi?id=186154
221         <rdar://problem/44158152>
222
223         Reviewed by Simon Fraser.
224
225         The CSS spec for all gradients allows for each color stop to have two angles to be used for hints.
226         This makes pie chart and checkerboard conic gradients much simpler to write.
227         Any time you want to have a hard line in a gradient, this syntax simplifies the gradient specification.
228
229         Test: fast/gradients/conic-two-hints.html
230         Test: fast/gradients/linear-two-hints-angle.html
231         Test: fast/gradients/linear-two-hints.html
232         Test: fast/gradients/radial-two-hints.html
233
234         * css/parser/CSSPropertyParserHelpers.cpp:
235         (WebCore::CSSPropertyParserHelpers::consumeAngularGradientColorStops): Removed.
236         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
237
238 2018-09-18  Simon Fraser  <simon.fraser@apple.com>
239
240         Remove the unused RenderLayerCompositor::enclosingCompositorFlushingLayers()
241         https://bugs.webkit.org/show_bug.cgi?id=189689
242
243         Reviewed by Alex Christensen.
244
245         enclosingCompositorFlushingLayers() was added in r76196 but never used. Also use
246         a SetForScope<>.
247
248         * rendering/RenderLayerCompositor.cpp:
249         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
250         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers const): Deleted.
251         * rendering/RenderLayerCompositor.h:
252
253 2018-09-18  Joseph Pecoraro  <pecoraro@apple.com>
254
255         [macOS] Frequent leaks seen under WebCore::gpuIDForDisplayMask
256         https://bugs.webkit.org/show_bug.cgi?id=189685
257         <rdar://problem/44541974>
258
259         Reviewed by Per Arne Vollan.
260
261         * platform/mac/PlatformScreenMac.mm:
262         (WebCore::gpuIDForDisplayMask):
263
264 2018-09-18  Youenn Fablet  <youenn@apple.com>
265
266         Implement RTCRtpReceiver getContributingSources/getSynchronizationSources
267         https://bugs.webkit.org/show_bug.cgi?id=189671
268
269         Reviewed by Eric Carlson.
270
271         Introduce implementation of these two methods by calling the libwebrtc corresponding method.
272         Add corresponding IDL as per spec.
273         Covered by rebased WPT tests.
274
275         * CMakeLists.txt:
276         * DerivedSources.make:
277         * Modules/mediastream/RTCRtpContributingSource.h: Added.
278         * Modules/mediastream/RTCRtpContributingSource.idl: Added.
279         * Modules/mediastream/RTCRtpReceiver.h:
280         (WebCore::RTCRtpReceiver::getContributingSources const):
281         (WebCore::RTCRtpReceiver::getSynchronizationSources const):
282         * Modules/mediastream/RTCRtpReceiver.idl:
283         * Modules/mediastream/RTCRtpReceiverBackend.h:
284         (WebCore::RTCRtpReceiverBackend::getContributingSources const):
285         (WebCore::RTCRtpReceiverBackend::getSynchronizationSources const):
286         * Modules/mediastream/RTCRtpSynchronizationSource.h: Added.
287         * Modules/mediastream/RTCRtpSynchronizationSource.idl: Added.
288         * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
289         (WebCore::fillRTCRtpContributingSource):
290         (WebCore::toRTCRtpContributingSource):
291         (WebCore::toRTCRtpSynchronizationSource):
292         (WebCore::LibWebRTCRtpReceiverBackend::getContributingSources const):
293         (WebCore::LibWebRTCRtpReceiverBackend::getSynchronizationSources const):
294         * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
295         * Sources.txt:
296         * WebCore.xcodeproj/project.pbxproj:
297
298 2018-09-18  Youenn Fablet  <youenn@apple.com>
299
300         Enable Unified Plan by default
301         https://bugs.webkit.org/show_bug.cgi?id=189675
302
303         Reviewed by Eric Carlson.
304
305         RTCRtpTransceiver.currentDirection is now gated by the unified plan runtime flag.
306         This will allow easy feature detection of unified plan support.
307         Covered by updated test.
308
309         * Modules/mediastream/RTCRtpTransceiver.idl:
310
311 2018-09-18  Per Arne Vollan  <pvollan@apple.com>
312
313         [WebVTT] change "middle" to "center" for consistency with CSS
314         https://bugs.webkit.org/show_bug.cgi?id=158478
315
316         Reviewed by Eric Carlson.
317
318         No new tests, covered by existing tests.
319
320         * html/track/TextTrackCueGeneric.cpp:
321         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
322         * html/track/VTTCue.cpp:
323         (WebCore::centerKeyword):
324         (WebCore::VTTCue::initialize):
325         (WebCore::VTTCue::align const):
326         (WebCore::VTTCue::setAlign):
327         (WebCore::VTTCue::calculateDisplayParameters):
328         (WebCore::VTTCue::setCueSettings):
329         (WebCore::middleKeyword): Deleted.
330         * html/track/VTTCue.h:
331         * html/track/WebVTTParser.cpp:
332         (WebCore::WebVTTTreeBuilder::buildFromString):
333
334 2018-09-18  Chris Dumez  <cdumez@apple.com>
335
336         "DidFirstVisuallyNonEmptyLayout" callback does not get called when restoring a page from PageCache
337         https://bugs.webkit.org/show_bug.cgi?id=189681
338         <rdar://problem/44526171>
339
340         Reviewed by Alex Christensen and Zalan Bujtas.
341
342         The "DidFirstVisuallyNonEmptyLayout" callback was not getting called when restoring a page from PageCache
343         because the FrameView is restored from PageCache and we would fail to restore its flags (such as
344         m_firstVisuallyNonEmptyLayoutCallbackPending) when entering Page Cache. We now call reset those flags that
345         are related to layout miletones when entering PageCache so that layout milestone events properly get sent
346         again when restoring from Page Cache.
347
348         * history/CachedFrame.cpp:
349         (WebCore::CachedFrame::CachedFrame):
350
351 2018-09-18  Manuel Rego Casasnovas  <rego@igalia.com>
352
353         [css-grid] Static position should use content-box, not padding-box
354         https://bugs.webkit.org/show_bug.cgi?id=189698
355
356         Reviewed by Javier Fernandez.
357
358         This is a recent change by the CSSWG:
359         https://github.com/w3c/csswg-drafts/issues/3020
360
361         The spec text (https://drafts.csswg.org/css-grid/#static-position):
362           "The static position of an absolutely-positioned child
363            of a grid container is determined as if it were the sole grid item
364            in a grid area whose edges coincide with the content edges
365            of the grid container."
366
367         Test: imported/w3c/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html
368
369         * rendering/RenderGrid.cpp:
370         (WebCore::RenderGrid::prepareChildForPositionedLayout):
371         Simple change to use border and padding.
372
373 2018-09-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
374
375         [EME][GStreamer] The current EME implementation doesn't support the waitingforkey event
376         https://bugs.webkit.org/show_bug.cgi?id=185590
377
378         Reviewed by Philippe Normand.
379
380         When decryptors are blocked waiting for the key, instruct the
381         player to run the Wait for key algorithm. As per spec, if we run
382         out of blocks pending to decrypt because we don't have the key, we
383         request running the algorithm again.
384
385         Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https.html.
386
387         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
388         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
389         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
390         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
391         (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey):
392         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
393         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
394         (webkitMediaCommonEncryptionDecryptTransformInPlace):
395         (webkitMediaCommonEncryptionDecryptSinkEventHandler):
396
397 2018-09-12  Ryosuke Niwa  <rniwa@webkit.org>
398
399         Update composedPath to match the latest spec
400         https://bugs.webkit.org/show_bug.cgi?id=180378
401         <rdar://problem/42843004>
402
403         Reviewed by Darin Adler.
404
405         This patch makes the check for whether a given node in the event path be included in composedPath
406         pre-determined at the time of the event dispatching per https://github.com/whatwg/dom/issues/525.
407         This was a fix for the issue that if an event listener in a closed shadow tree removes a node in the
408         same tree in the event path, then composedPath called on its shadow host, for example, will include
409         the removed node since it's no longer in the closed shadow tree.
410
411         Naively, implementing this behavior would require remembering the original document or shadow root
412         of each node in the event path as well as its parent shadow root, or worse which node is disclosed
413         to every other node at the time of computing the event path.
414
415         This patch takes a more novel and efficient approach to implement the new behavior by adding a single
416         integer indicating the number of closed-mode shadow root ancestors of each node in the event path.
417         In computePathUnclosedToTarget, any node whose *depth* is greater than the context object is excluded.
418
419         Consider the following example:
420         div ------- ShadowRoot (closed)
421           +- span     +- slot
422         If an event is dispatched on span, then the event path would be [span, slot, ShadowRoot, div]. Then
423         the values of integers assigned to each node would be: [0, 1, 1, 0] respectively. When composedPath
424         is called on span or div, slot and ShadowRoot are excluded because they have a greater *depth* value.
425
426         Unfortunately, this simplistic solution doesn't work when there are multiple shadow roots of the same
427         depth through which an event is dispatched as in:
428         section -- ShadowRoot (closed, SR2)
429           |          +- slot (s2)
430           +div ------ ShadowRoot (closed, SR1)
431             +- span     +- slot (s1)
432         If an event is dispatched on span, the event path would be [span, s1, SR1, div, s2, SR2, section].
433         The values of integers assigned are: [0, 1, 1, 0, 1, 1, 0] respectively. When composedPath is called
434         on SR1, the simplistic approach would include s2 and SR2, which would be wrong.
435
436         To account for this case, in computePathUnclosedToTarget, we traverse the event path upwards (i.e.
437         ancestors) and downwards (i.e. descendants) from the context object and decrease the *allowed depth*
438         of shadow trees when we traverse out of a shadow tree in either direction. When traversing upwards,
439         therefore, moving out of a shadow root to its host would would decrease the allowed depth. When
440         traversing dowards, moving from a slot element to its assigned node would decrease the allowed depth.
441
442         Note that the depths can be negative when a composed event is dispatched inside a closed shadow tree,
443         and it gets out of its shadow host.
444
445         Unfortunately, the latest DOM specification has a bug and doesn't match the behavior of Chrome. This
446         patch proposes a new algorithm which can be adopted in https://github.com/whatwg/dom/issues/684.
447
448         Test: imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html
449
450         * dom/EventContext.cpp:
451         (WebCore::EventContext::EventContext):
452         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):
453         (WebCore::TouchEventContext::TouchEventContext):
454         * dom/EventContext.h:
455         (WebCore::EventContext::closedShadowDepth const): Added.
456         * dom/EventPath.cpp:
457         (WebCore::WindowEventContext::WindowEventContext):
458         (WebCore::EventPath::buildPath): Compute the closed shadow tree's depths for each node in the path.
459         (WebCore::computePathUnclosedToTarget const): Implemented the aforementioned algorithm.
460         (WebCore::EventPath::EventPath):
461
462 2018-09-17  Yusuke Suzuki  <utatane.tea@gmail.com>
463
464         [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
465         https://bugs.webkit.org/show_bug.cgi?id=185339
466
467         Reviewed by Mark Lam.
468
469         * fileapi/ThreadableBlobRegistry.cpp:
470         (WebCore::ThreadableBlobRegistry::blobSize):
471         * platform/cocoa/NetworkExtensionContentFilter.h:
472         * platform/cocoa/NetworkExtensionContentFilter.mm:
473         (WebCore::NetworkExtensionContentFilter::initialize):
474         (WebCore::NetworkExtensionContentFilter::willSendRequest):
475         (WebCore::NetworkExtensionContentFilter::responseReceived):
476         (WebCore::NetworkExtensionContentFilter::addData):
477         (WebCore::NetworkExtensionContentFilter::finishedAddingData):
478         (WebCore::NetworkExtensionContentFilter::handleDecision):
479         Use per-function BinarySemaphore instead of holding it in NetworkExtensionContentFilter's field.
480
481         * platform/glib/FileMonitorGLib.cpp:
482         (WebCore::FileMonitor::FileMonitor):
483         (WebCore::FileMonitor::~FileMonitor):
484         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
485         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
486         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
487         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
488         (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
489         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
490         Use BinarySemaphore. And remove unused dispatch_semaphore_t.
491
492         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
493         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
494         (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
495         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
496         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
497         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
498         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
499         (WebCore::SourceBufferPrivateAVFObjC::abort):
500         (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
501         (WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):
502         Use Box<Semaphore> and Box<BinarySemaphore>.
503
504         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
505         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
506         (WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession):
507         Remove unused dispatch_semaphore_t.
508
509         * platform/network/cf/ResourceHandleCFNet.cpp:
510         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
511         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
512         (WebCore::getRunLoop):
513         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
514         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
515         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
516         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
517         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
518         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
519         (-[WebCoreResourceHandleAsOperationQueueDelegate initWithHandle:messageQueue:]):
520         (-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]):
521         (-[WebCoreResourceHandleAsOperationQueueDelegate dealloc]):
522         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
523         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
524         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
525         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
526         Use BinarySemaphore instead.
527
528 2018-09-17  Simon Fraser  <simon.fraser@apple.com>
529
530         Many modern media control tests leak documents in testing
531         https://bugs.webkit.org/show_bug.cgi?id=189437
532
533         Reviewed by Darin Adler.
534
535         In order to accurately detect leaks in media controls tests which use lots of
536         SVGImages, we have to:
537         - Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer
538           to clear references to elements.
539         - Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources()
540           to drop the last handle to the CachedResource for an SVGImage.
541         - Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources()
542           to run again after that timer has fired.
543         
544         This should fix most of the spurious leak reports involving SVGImage documents.
545
546         * page/MemoryRelease.cpp:
547         (WebCore::releaseCriticalMemory):
548
549 2018-09-17  Jer Noble  <jer.noble@apple.com>
550
551         Add support for HEVC codec types in Media Capabilities
552         https://bugs.webkit.org/show_bug.cgi?id=189565
553
554         Reviewed by Eric Carlson.
555
556         Test: media/hevc-codec-parameters.html
557
558         Add some utility methods for parsing HEVC codec strings, and using those parsed
559         values to query the platform for detailed support for HEVC decoding.
560
561         Drive-by fix: Modify MediaEngineConfigurationFactory to allow for null function
562         pointers in the encode/decode factory pair.
563
564         * Sources.txt:
565         * SourcesCocoa.txt:
566         * WebCore.xcodeproj/project.pbxproj:
567         * platform/cocoa/VideoToolboxSoftLink.cpp:
568         * platform/cocoa/VideoToolboxSoftLink.h:
569         * platform/graphics/HEVCUtilities.cpp: Added.
570         (WebCore::parseHEVCCodecParameters):
571         * platform/graphics/HEVCUtilities.h: Added.
572         * platform/graphics/cocoa/HEVCUtilitiesCocoa.cpp: Added.
573         (WebCore::validateHEVCParameters):
574         * platform/graphics/cocoa/HEVCUtilitiesCocoa.h: Added.
575         * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp: Added.
576         (WebCore::videoCodecTypeFromRFC4281Type):
577         (WebCore::createMediaPlayerDecodingConfigurationCocoa):
578         * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.h: Added.
579         * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
580         (WebCore::factories):
581         (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
582         (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
583         * testing/Internals.cpp:
584         (WebCore::Internals::parseHEVCCodecParameters):
585         * testing/Internals.h:
586         * testing/Internals.idl:
587
588 2018-09-17  Devin Rousso  <drousso@apple.com>
589
590         Web Inspector: generate CSSKeywordCompletions from backend values
591         https://bugs.webkit.org/show_bug.cgi?id=189041
592
593         Reviewed by Joseph Pecoraro.
594
595         Modified existing test inspector/css/getSupportedCSSProperties.html.
596
597         * inspector/agents/InspectorCSSAgent.cpp:
598         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
599         Send alias and longhand information for all properties, and any known keyword values for
600         those applicable. This makes use of `CSSParserFastPaths::isValidKeywordPropertyAndValue` to
601         determine if a given keyword is a valid value for each property. This only generates a list
602         for properties who have no non-keyword values.
603
604         * css/makeprop.pl:
605         * css/makevalues.pl:
606         Create additional helper functions/constants for retrieving strings of each CSS keyword.
607
608         * css/CSSProperty.h:
609         (WebCore::CSSProperty::aliasesForProperty):
610
611         * css/CSSPrimitiveValue.cpp:
612         (WebCore::valueName):
613
614         * css/CSSValuePool.cpp:
615         (WebCore::CSSValuePool::CSSValuePool):
616         (WebCore::CSSValuePool::createIdentifierValue):
617
618 2018-09-17  Youenn Fablet  <youenn@apple.com>
619
620         track.onmute isn't called for a remote MediaStreamTrack when its counter part track is removed from the peer connection
621         https://bugs.webkit.org/show_bug.cgi?id=176281
622         <rdar://problem/44525674>
623
624         Reviewed by Eric Carlson.
625
626         Listen to libwebrtc remove track callbacks.
627         Implement handling as per https://w3c.github.io/webrtc-pc/#process-remote-track-removal.
628         This triggers a mute event on the track.
629
630         Test: webrtc/remove-track.html
631
632         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
633         (WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
634         (WebCore::LibWebRTCMediaEndpoint::OnRemoveTrack):
635         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
636         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
637         (WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
638         Drive by fix: Plan B code path does not mandate having an rtc backend for each sender.
639
640 2018-09-17  Simon Fraser  <simon.fraser@apple.com>
641
642         Add more Fullscreen logging
643         https://bugs.webkit.org/show_bug.cgi?id=189656
644
645         Reviewed by Jer Noble.
646
647         Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
648         the fullscreen element.
649
650         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
651         (VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement):
652         (VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement):
653         (VideoFullscreenModelVideoElement::setVideoElement):
654
655 2018-09-14  Simon Fraser  <simon.fraser@apple.com>
656
657         Add support for dumping the GraphicsLayer tree via notifyutil
658         https://bugs.webkit.org/show_bug.cgi?id=189639
659
660         Reviewed by Zalan Bujtas.
661
662         Make "notifyutil -p com.apple.WebKit.showGraphicsLayerTree" work. It dumps the GraphicsLayer tree
663         for each top-level document (GraphicsLayers are connected across frame boundaries, so this prints
664         the entire tree for each main frame).
665         
666         It uses WTFLogAlways rather than fprintf() so output shows on all platforms (other tree dumps should
667         be converted in the same way).
668
669         * page/mac/PageMac.mm:
670         (WebCore::Page::platformInitialize):
671         * platform/graphics/GraphicsLayer.cpp:
672         (showGraphicsLayerTree):
673         * rendering/RenderLayerCompositor.cpp:
674         (showGraphicsLayerTreeForCompositor):
675         * rendering/RenderLayerCompositor.h:
676         * rendering/RenderObject.cpp:
677         (WebCore::printGraphicsLayerTreeForLiveDocuments):
678         * rendering/RenderObject.h:
679
680 2018-09-17  Christopher Reid  <chris.reid@sony.com>
681
682         [Curl] Add schema version and enable auto vacuum for cookie database.
683         https://bugs.webkit.org/show_bug.cgi?id=189669
684
685         Reviewed by Alex Christensen.
686
687         Turning on auto incremental vacuuming and adding versioning to the database. Right now we
688         reset tables if there's an unknown schema or if the none is set. There is placeholder logic
689         in place to upgrade databases as the schema changes in the future.
690
691         Tested by checking the database manually after launching MiniBrowser.
692
693         * platform/network/curl/CookieJarDB.cpp:
694         (WebCore::CookieJarDB::openDatabase):
695         (WebCore::CookieJarDB::verifySchemaVersion):
696         (WebCore::CookieJarDB::deleteAllTables):
697         (WebCore::CookieJarDB::createPrepareStatement):
698         (WebCore::CookieJarDB::getPrepareStatement):
699         (WebCore::CookieJarDB::executeSimpleSql):
700         * platform/network/curl/CookieJarDB.h:
701         * platform/network/curl/NetworkStorageSessionCurl.cpp:
702         (WebCore::defaultSession):
703         * platform/sql/SQLiteDatabase.cpp:
704         (WebCore::SQLiteDatabase::turnOnIncrementalAutoVacuum): fixed a bug.
705
706 2018-09-14  Ryosuke Niwa  <rniwa@webkit.org>
707
708         Re-order Node flags based on semantics
709         https://bugs.webkit.org/show_bug.cgi?id=189643
710
711         Reviewed by Simon Fraser.
712
713         Re-ordered Node flags based on their category and subclasses of Node which use them.
714
715         * dom/Node.h:
716
717 2018-09-17  Simon Fraser  <simon.fraser@apple.com>
718
719         Add more ResourceLoading logging, particularly in MemoryCache code
720         https://bugs.webkit.org/show_bug.cgi?id=189651
721
722         Reviewed by Tim Horton.
723
724         Adding more logging to the ResourceLoading log channel, which I found useful
725         when trying to understand cached SVGImage lifetimes (bug 189437).
726
727         * loader/cache/CachedResource.cpp:
728         (WebCore::CachedResource::deleteIfPossible):
729         * loader/cache/CachedResourceLoader.cpp:
730         (WebCore::CachedResourceLoader::requestResource):
731         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
732         * loader/cache/MemoryCache.cpp:
733         (WebCore::MemoryCache::add):
734         (WebCore::MemoryCache::pruneLiveResourcesToSize):
735         (WebCore::MemoryCache::pruneDeadResources):
736         (WebCore::MemoryCache::pruneDeadResourcesToSize):
737         (WebCore::MemoryCache::remove):
738         (WebCore::MemoryCache::dumpLRULists const):
739
740 2018-09-17  Jer Noble  <jer.noble@apple.com>
741
742         Enable USE_MEDIAREMOTE on iOS
743         https://bugs.webkit.org/show_bug.cgi?id=189096
744
745         Reviewed by Eric Carlson.
746
747         Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
748         Now Playing implementation on iOS and Mac.
749
750         * SourcesCocoa.txt:
751         * WebCore.xcodeproj/project.pbxproj:
752         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
753         * platform/audio/cocoa/MediaSessionManagerCocoa.h:
754         * platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.
755         (PlatformMediaSessionManager::sharedManager):
756         (PlatformMediaSessionManager::sharedManagerIfExists):
757         (MediaSessionManagerCocoa::updateSessionState):
758         (MediaSessionManagerCocoa::beginInterruption):
759         (MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
760         (MediaSessionManagerCocoa::sessionWillBeginPlayback):
761         (MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
762         (MediaSessionManagerCocoa::removeSession):
763         (MediaSessionManagerCocoa::sessionWillEndPlayback):
764         (MediaSessionManagerCocoa::clientCharacteristicsChanged):
765         (MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
766         (MediaSessionManagerCocoa::nowPlayingEligibleSession):
767         (MediaSessionManagerCocoa::updateNowPlayingInfo):
768         * platform/audio/ios/MediaSessionManagerIOS.h:
769         (): Deleted.
770         * platform/audio/ios/MediaSessionManagerIOS.mm:
771         (WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
772         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
773         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
774         (WebCore::MediaSessionManageriOS::removeSession): Deleted.
775         (WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
776         (WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.
777         * platform/audio/mac/MediaSessionManagerMac.h: Removed.
778
779 2018-09-17  Frederic Wang  <fwang@igalia.com>
780
781         Build error in ImageBufferCG when compiled with IOSurfacePool
782         https://bugs.webkit.org/show_bug.cgi?id=189579
783
784         Reviewed by Tim Horton.
785
786         IOSurface.h might be included with different value of IOSURFACE_CANVAS_BACKING_STORE, causing
787         compilation errors when files in the same unified source do not agree on the definition.
788         This patch moves the definition of IOSURFACE_CANVAS_BACKING_STORE from ImageBufferDataCG.h
789         to Platform.h so that IOSURFACE_CANVAS_BACKING_STORE is set to the same value in all files.
790         Finally some minors changes to explicitly declare/define ImageBuffer are performed in order
791         to prevent future issues with Unified build rotating.
792
793         No new tests, behavior unchanged.
794
795         * html/HTMLCanvasElement.cpp: Explicitly include ImageBuffer.h since it's used in this file.
796         * platform/graphics/cg/ImageBufferDataCG.h: Move definition into Platform.h.
797         * platform/graphics/cocoa/IOSurface.h: Forward-declare ImageBuffer since it's used in this
798         header.
799
800 2018-09-17  Basuke Suzuki  <Basuke.Suzuki@sony.com>
801
802         [Curl] Respond with requested authentication scheme for authentication challenge.
803         https://bugs.webkit.org/show_bug.cgi?id=189318
804
805         Reviewed by Alex Christensen.
806
807         Curl port depends on libcurl's authentication handling by enabling CURLAUTH_ANY. With this
808         mode, the round-trip communication between the client and the server is handled by libcurl
809         internally. That's okay for many cases. But when initial request has a credentials
810         (i.e. XMLHttpRequest), there's no valid chance to store credential to the storage because
811         the returned response is not 401.
812
813         Passes following tests:
814         - http/tests/websocket/tests/hybi/httponly-cookie.pl
815         - http/tests/websocket/tests/hybi/secure-cookie-insecure-connection.pl
816         - http/tests/websocket/tests/hybi/secure-cookie-secure-connection.pl
817         - http/tests/xmlhttprequest/basic-auth-default.html
818         - http/tests/xmlhttprequest/cross-origin-authorization.html
819         - http/tests/xmlhttprequest/logout.html
820         - http/tests/xmlhttprequest/null-auth.php
821         - http/tests/xmlhttprequest/re-login-async.html
822         - http/tests/xmlhttprequest/re-login.html
823         - http/tests/xmlhttprequest/redirect-credentials-responseURL.html
824         - http/tests/xmlhttprequest/remember-bad-password.html
825
826         * platform/network/ResourceHandle.h:
827         * platform/network/curl/CurlContext.cpp:
828         (WebCore::CurlHandle::setHttpAuthUserPass):
829         (WebCore::CurlHandle::enableHttpAuthentication): Deleted.
830         * platform/network/curl/CurlContext.h:
831         * platform/network/curl/CurlRequest.cpp:
832         (WebCore::CurlRequest::setAuthenticationScheme):
833         (WebCore::CurlRequest::setupTransfer):
834         * platform/network/curl/CurlRequest.h:
835         * platform/network/curl/ResourceHandleCurl.cpp:
836         (WebCore::ResourceHandle::start):
837         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
838         (WebCore::ResourceHandle::receivedCredential):
839         (WebCore::ResourceHandle::getCredential):
840         (WebCore::ResourceHandle::restartRequestWithCredential):
841         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
842         (WebCore::ResourceHandle::continueAfterWillSendRequest):
843
844 2018-09-17  Youenn Fablet  <youenn@apple.com>
845
846         Enable VCP for iOS and reenable it for MacOS
847         https://bugs.webkit.org/show_bug.cgi?id=189635
848         <rdar://problem/43621029>
849
850         Reviewed by Eric Carlson.
851
852         Covered by exsiting and modified tests.
853         Instead of using libwebrtc YUV frames for black frames, use CVPixelBuffer to make it efficient.
854         Add internal API to know whether VCP is enabled so as to make capture-webrtc test pass on all platforms.
855
856         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
857         (WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
858         * platform/mediastream/RealtimeOutgoingVideoSource.h:
859         * platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.h:
860         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
861         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
862         (WebCore::createBlackPixelBuffer):
863         (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):
864         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
865         (WebCore::RealtimeOutgoingVideoSourceCocoa::createBlackFrame):
866         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
867         * testing/Internals.cpp:
868         (WebCore::Internals::supportsVCPEncoder):
869         * testing/Internals.h:
870         * testing/Internals.idl:
871
872 2018-09-17  Chris Dumez  <cdumez@apple.com>
873
874         PSON: window.open() with 'noopener' should only process-swap cross-site, not cross-origin
875         https://bugs.webkit.org/show_bug.cgi?id=189602
876         <rdar://problem/44430549>
877
878         Reviewed by Geoff Garen.
879
880         * loader/DocumentLoader.cpp:
881         (WebCore::DocumentLoader::setTriggeringAction):
882         * loader/DocumentLoader.h:
883         * loader/FrameLoadRequest.h:
884         * loader/FrameLoader.cpp:
885         (WebCore::FrameLoader::loadURL):
886         (WebCore::FrameLoader::loadWithNavigationAction):
887         (WebCore::FrameLoader::loadWithDocumentLoader):
888         (WebCore::FrameLoader::loadPostRequest):
889         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
890         (WebCore::FrameLoader::loadDifferentDocumentItem):
891         Move NavigationAction's opener setting to loadWithNavigationAction() as this is a better bottleneck.
892         Otherwise, we'd have to set it at several call sites. Also move the NavigationAction around instead
893         of copying it.
894
895         * loader/FrameLoader.h:
896         (WebCore::FrameLoader::loadWithNavigationAction):
897         * loader/NavigationAction.h:
898         (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy):
899         * loader/PolicyChecker.cpp:
900         (WebCore::PolicyChecker::checkNavigationPolicy):
901         * page/DOMWindow.cpp:
902         (WebCore::DOMWindow::createWindow):
903
904 2018-09-17  Darin Adler  <darin@apple.com>
905
906         Use OpaqueJSString rather than JSRetainPtr inside WebKit
907         https://bugs.webkit.org/show_bug.cgi?id=189652
908
909         Reviewed by Saam Barati.
910
911         * Modules/plugins/QuickTimePluginReplacement.mm:
912         (WebCore::jsValueWithDictionaryInContext): Use OpaqueJSString::create.
913         (WebCore::jsValueWithAVMetadataItemInContext): Use adoptCF.
914
915         * platform/mac/SerializedPlatformRepresentationMac.mm:
916         (WebCore::jsValueWithDictionaryInContext): Use OpaqueJSString::create.
917
918 2018-09-08  Darin Adler  <darin@apple.com>
919
920         Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
921         https://bugs.webkit.org/show_bug.cgi?id=189455
922
923         Reviewed by Keith Miller.
924
925         * Modules/plugins/QuickTimePluginReplacement.mm:
926         (WebCore::jsValueWithDictionaryInContext): Adding a missing
927         JSStringRelease to fix a leak.
928
929 2018-09-15  Rob Buis  <rbuis@igalia.com>
930
931         XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
932         https://bugs.webkit.org/show_bug.cgi?id=189627
933
934         Reviewed by Alexey Proskuryakov.
935
936         Right now we return an empty Blob without type when the response is empty, but
937         it should always include the type [1].
938
939         Test: web-platform-tests/xhr/overridemimetype-blob.html
940
941         [1] https://xhr.spec.whatwg.org/#blob-response
942
943         * xml/XMLHttpRequest.cpp:
944         (WebCore::XMLHttpRequest::createResponseBlob):
945
946 2018-09-14  Basuke Suzuki  <Basuke.Suzuki@sony.com>
947
948         [Curl] Bug fix on some inaccurate values in NetworkLoadMetrics.
949         https://bugs.webkit.org/show_bug.cgi?id=189530
950
951         Reviewed by Alex Christensen.
952
953         Curl port uses the start time libcurl provided. But there's a lug between main thread and Curl thread.
954         Record the start time of request instead of libcurl's start timing and use it to measure the metrics.
955         Also respondEnd was not correctly recorded and fixed.
956
957         No new tests because it cannot be measured from DRT.
958
959         * platform/network/ResourceHandleInternal.h:
960         * platform/network/curl/CurlContext.cpp:
961         (WebCore::CurlHandle::getNetworkLoadMetrics):
962         * platform/network/curl/CurlContext.h:
963         * platform/network/curl/CurlRequest.cpp:
964         (WebCore::CurlRequest::start):
965         (WebCore::CurlRequest::setupTransfer):
966         (WebCore::CurlRequest::didCompleteTransfer):
967         (WebCore::CurlRequest::updateNetworkLoadMetrics):
968         * platform/network/curl/CurlRequest.h:
969         (WebCore::CurlRequest::setStartTime):
970         * platform/network/curl/ResourceHandleCurl.cpp:
971         (WebCore::ResourceHandle::start):
972         (WebCore::ResourceHandle::restartRequestWithCredential):
973         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
974         (WebCore::ResourceHandle::willSendRequest):
975         (WebCore::ResourceHandle::continueAfterWillSendRequest):
976
977 2018-09-14  Justin Fan  <justin_fan@apple.com>
978
979         WebGL 2 conformance: rgb-format-support.html
980         https://bugs.webkit.org/show_bug.cgi?id=189610
981         <rdar://problem/44403343>
982
983         Reviewed by Dean Jackson.
984
985         Implementing getInternalformatParameter (emulating on macOS) and updating 
986         renderbufferStorage{Multisample} for WebGL 2 conformance. 
987
988         Test: webgl/2.0.0/conformance2/rendering/rgb-format-support.html enabled.
989
990         * html/canvas/WebGL2RenderingContext.cpp:
991         (WebCore::isRenderableInternalformat):
992         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
993         (WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
994         (WebCore::WebGL2RenderingContext::renderbufferStorage):
995         (WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
996         (WebCore::WebGL2RenderingContext::isIntegerFormat):
997         * platform/graphics/GraphicsContext3D.h:
998         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
999         (WebCore::GraphicsContext3D::getInternalformativ):
1000         (WebCore::GraphicsContext3D::renderbufferStorageMultisample):
1001
1002 2018-09-14  Justin Michaud  <justin_michaud@apple.com>
1003
1004         Add support for spreadMethod=reflect and repeat on SVG gradients (for CoreGraphics platforms)
1005         https://bugs.webkit.org/show_bug.cgi?id=5968
1006
1007         Add support for spreadMethod=repeat and reflect. Also, the opacity of a gradient is now
1008         the result of multiplying stop-opacity with the opacity of the color.
1009
1010         Reviewed by Simon Fraser.
1011
1012         Tests: svg/gradients/spreadMethod-expected.svg
1013                svg/gradients/spreadMethod.svg
1014                svg/gradients/spreadMethodAlpha-expected.svg
1015                svg/gradients/spreadMethodAlpha.svg
1016                svg/gradients/spreadMethodClose0-expected-mismatch.svg
1017                svg/gradients/spreadMethodClose0.svg
1018                svg/gradients/spreadMethodClose1-expected-mismatch.svg
1019                svg/gradients/spreadMethodClose1.svg
1020                svg/gradients/spreadMethodClose2-expected.svg
1021                svg/gradients/spreadMethodClose2.svg
1022                svg/gradients/spreadMethodDiagonal-expected.svg
1023                svg/gradients/spreadMethodDiagonal.svg
1024                svg/gradients/spreadMethodDiagonal2-expected.svg
1025                svg/gradients/spreadMethodDiagonal2.svg
1026                svg/gradients/spreadMethodDuplicateStop-expected.svg
1027                svg/gradients/spreadMethodDuplicateStop.svg
1028                svg/gradients/spreadMethodReversed-expected.svg
1029                svg/gradients/spreadMethodReversed.svg
1030                svg/gradients/stopAlpha-expected.svg
1031                svg/gradients/stopAlpha.svg
1032
1033         * platform/graphics/cg/GradientCG.cpp:
1034         (WebCore::Gradient::paint):
1035         * svg/SVGStopElement.cpp:
1036         (WebCore::SVGStopElement::stopColorIncludingOpacity const):
1037
1038 2018-09-14  Ryan Haddad  <ryanhaddad@apple.com>
1039
1040         Unreviewed, attempt to fix the iOSMac build after r236015.
1041
1042         * platform/graphics/cv/PixelBufferResizer.mm:
1043         (WebCore::PixelBufferResizer::PixelBufferResizer):
1044
1045 2018-09-11  Simon Fraser  <simon.fraser@apple.com>
1046
1047         Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
1048         https://bugs.webkit.org/show_bug.cgi?id=189521
1049
1050         Reviewed by Tim Horton.
1051         
1052         Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.
1053         
1054         RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.
1055         
1056         All the other changes are just to adapt to the new ownership patterns.
1057         
1058         I verified that no GraphicsLayers were leaked or abandoned after this change.
1059
1060         No behavior change.
1061
1062         * page/PageOverlayController.cpp:
1063         (WebCore::PageOverlayController::layerWithDocumentOverlays):
1064         (WebCore::PageOverlayController::layerWithViewOverlays):
1065         (WebCore::PageOverlayController::installPageOverlay):
1066         (WebCore::PageOverlayController::uninstallPageOverlay):
1067         (WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
1068         (WebCore::PageOverlayController::didChangeViewSize):
1069         (WebCore::PageOverlayController::didChangeDocumentSize):
1070         (WebCore::PageOverlayController::didChangeSettings):
1071         (WebCore::PageOverlayController::paintContents):
1072         (WebCore::PageOverlayController::didChangeOverlayFrame):
1073         (WebCore::PageOverlayController::didChangeOverlayBackgroundColor):
1074         * page/PageOverlayController.h:
1075         * page/mac/ServicesOverlayController.h:
1076         (WebCore::ServicesOverlayController::Highlight::layer const):
1077         * page/mac/ServicesOverlayController.mm:
1078         (WebCore::ServicesOverlayController::Highlight::Highlight):
1079         (WebCore::ServicesOverlayController::Highlight::invalidate):
1080         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1081         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1082         (WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
1083         (WebCore::ServicesOverlayController::determineActiveHighlight):
1084         * platform/graphics/GraphicsLayer.cpp:
1085         (WebCore::GraphicsLayer::GraphicsLayer):
1086         (WebCore::GraphicsLayer::willBeDestroyed):
1087         (WebCore::GraphicsLayer::setChildren):
1088         (WebCore::GraphicsLayer::addChild):
1089         (WebCore::GraphicsLayer::addChildAtIndex):
1090         (WebCore::GraphicsLayer::addChildBelow):
1091         (WebCore::GraphicsLayer::addChildAbove):
1092         (WebCore::GraphicsLayer::replaceChild):
1093         (WebCore::GraphicsLayer::removeAllChildren):
1094         (WebCore::GraphicsLayer::removeFromParent):
1095         (WebCore::GraphicsLayer::setMaskLayer):
1096         (WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
1097         (WebCore::GraphicsLayer::distributeOpacity):
1098         (WebCore::GraphicsLayer::traverse):
1099         (WebCore::dumpChildren):
1100         * platform/graphics/GraphicsLayer.h:
1101         (WebCore::GraphicsLayer::children const):
1102         (WebCore::GraphicsLayer::children):
1103         (WebCore::GraphicsLayer::maskLayer const):
1104         (WebCore::GraphicsLayer::replicaLayer const):
1105         (WebCore::GraphicsLayer::beingDestroyed const):
1106         (WebCore::GraphicsLayer:: const): Deleted.
1107         * platform/graphics/GraphicsLayerFactory.h:
1108         * platform/graphics/ca/GraphicsLayerCA.cpp:
1109         (WebCore::GraphicsLayer::create):
1110         (WebCore::GraphicsLayerCA::setChildren):
1111         (WebCore::GraphicsLayerCA::addChild):
1112         (WebCore::GraphicsLayerCA::addChildAtIndex):
1113         (WebCore::GraphicsLayerCA::addChildBelow):
1114         (WebCore::GraphicsLayerCA::addChildAbove):
1115         (WebCore::GraphicsLayerCA::replaceChild):
1116         (WebCore::GraphicsLayerCA::setMaskLayer):
1117         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
1118         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1119         (WebCore::GraphicsLayerCA::updateSublayerList):
1120         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1121         * platform/graphics/ca/GraphicsLayerCA.h:
1122         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1123         (WebCore::GraphicsLayer::create):
1124         (WebCore::GraphicsLayerTextureMapper::setChildren):
1125         (WebCore::GraphicsLayerTextureMapper::addChild):
1126         (WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
1127         (WebCore::GraphicsLayerTextureMapper::addChildAbove):
1128         (WebCore::GraphicsLayerTextureMapper::addChildBelow):
1129         (WebCore::GraphicsLayerTextureMapper::replaceChild):
1130         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
1131         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
1132         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1133         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1134         (WebCore::GraphicsLayer::create):
1135         (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
1136         (WebCore::CoordinatedGraphicsLayer::addChild):
1137         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
1138         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
1139         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
1140         (WebCore::CoordinatedGraphicsLayer::replaceChild):
1141         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
1142         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
1143         (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
1144         (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
1145         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1146         * platform/graphics/win/GraphicsLayerDirect2D.cpp:
1147         (WebCore::GraphicsLayer::create):
1148         (WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
1149         (WebCore::GraphicsLayerDirect2D::initialize): Deleted.
1150         (WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
1151         (WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
1152         (WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.
1153         * rendering/RenderLayerBacking.cpp:
1154         (WebCore::RenderLayerBacking::createGraphicsLayer):
1155         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1156         (WebCore::RenderLayerBacking::updateConfiguration):
1157         (WebCore::RenderLayerBacking::updateInternalHierarchy):
1158         (WebCore::RenderLayerBacking::updateMaskingLayer):
1159         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
1160         (WebCore::RenderLayerBacking::updateScrollingLayers):
1161         * rendering/RenderLayerBacking.h:
1162         * rendering/RenderLayerCompositor.cpp:
1163         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1164         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1165         (WebCore::RenderLayerCompositor::setCompositingParent):
1166         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1167         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
1168         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1169         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1170         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1171         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1172         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1173         (WebCore::RenderLayerCompositor::ensureRootLayer):
1174         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
1175         * rendering/RenderLayerCompositor.h:
1176
1177 2018-09-14  Eric Carlson  <eric.carlson@apple.com>
1178
1179         Support arbitrary video resolution in getUserMedia API
1180         https://bugs.webkit.org/show_bug.cgi?id=178109
1181         <rdar://problem/35083128>
1182
1183         Reviewed by Youenn Fablet.
1184
1185         Support arbitrary video resolutions by configuring the camera to capture at the closest
1186         larger size it supports and scaling/cropping frames as necessary.
1187
1188         No new tests, existing tests updated.
1189
1190         * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
1191         * Modules/webaudio/MediaStreamAudioSource.cpp:
1192         (WebCore::MediaStreamAudioSource::capabilities): Make non-const, it wasn't helpful.
1193         (WebCore::MediaStreamAudioSource::settings): Ditto.
1194         (WebCore::MediaStreamAudioSource::capabilities const): Deleted.
1195         (WebCore::MediaStreamAudioSource::settings const): Deleted.
1196         * Modules/webaudio/MediaStreamAudioSource.h:
1197
1198         * SourcesCocoa.txt: Add PixelBufferResizer.
1199
1200         * WebCore.xcodeproj/project.pbxproj: Ditto.
1201
1202         * platform/cocoa/CoreVideoSoftLink.h:
1203         * platform/cocoa/VideoToolboxSoftLink.cpp:
1204         * platform/cocoa/VideoToolboxSoftLink.h:
1205
1206         * platform/graphics/cv/PixelBufferResizer.h: Added.
1207         (WebCore::PixelBufferResizer::canResizeTo):
1208         * platform/graphics/cv/PixelBufferResizer.mm: Added.
1209         (WebCore::PixelBufferResizer::PixelBufferResizer):
1210         (WebCore::PixelBufferResizer::resize):
1211
1212         * platform/mediastream/RealtimeIncomingAudioSource.cpp:
1213         (WebCore::RealtimeIncomingAudioSource::capabilities): Make non-const, it wasn't helpful.
1214         (WebCore::RealtimeIncomingAudioSource::settings): Ditto.
1215         (WebCore::RealtimeIncomingAudioSource::capabilities const): Deleted.
1216         (WebCore::RealtimeIncomingAudioSource::settings const): Deleted.
1217         * platform/mediastream/RealtimeIncomingAudioSource.h:
1218
1219         * platform/mediastream/RealtimeIncomingVideoSource.cpp:
1220         (WebCore::RealtimeIncomingVideoSource::capabilities): Make non-const, it wasn't helpful.
1221         (WebCore::RealtimeIncomingVideoSource::settings): Ditto.
1222         (WebCore::RealtimeIncomingVideoSource::capabilities const): Deleted.
1223         (WebCore::RealtimeIncomingVideoSource::settings const): Deleted.
1224         * platform/mediastream/RealtimeIncomingVideoSource.h:
1225
1226         * platform/mediastream/RealtimeMediaSource.cpp:
1227         (WebCore::RealtimeMediaSource::supportsConstraint):
1228         (WebCore::RealtimeMediaSource::supportsConstraint const): Deleted.
1229         * platform/mediastream/RealtimeMediaSource.h:
1230
1231         * platform/mediastream/RealtimeVideoSource.cpp:
1232         (WebCore::RealtimeVideoSource::presets):
1233         (WebCore::RealtimeVideoSource::setSupportedPresets):
1234         (WebCore::standardVideoSizes):
1235         (WebCore::RealtimeVideoSource::updateCapabilities): Make non-const, it wasn't helpful.
1236         (WebCore::presetSupportsFrameRate):
1237         (WebCore::RealtimeVideoSource::supportsCaptureSize):
1238         (WebCore::RealtimeVideoSource::shouldUsePreset):
1239         (WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
1240         (WebCore::RealtimeVideoSource::setSizeAndFrameRate):
1241         (WebCore::RealtimeVideoSource::addSupportedCapabilities const): Deleted.
1242         * platform/mediastream/RealtimeVideoSource.h:
1243         (WebCore::VideoPresetData::encode const):
1244         (WebCore::VideoPresetData::decode):
1245         (WebCore::VideoPreset::create):
1246         (WebCore::VideoPreset::VideoPreset):
1247         (WebCore::RealtimeVideoSource::prefersPreset):
1248         (WebCore::RealtimeVideoSource::canResizeVideoFrames const):
1249         (WebCore::RealtimeVideoSource::setDefaultSize):
1250         (WebCore::RealtimeVideoSource::observedFrameRate const):
1251         (WebCore::VideoPreset::encode const): Deleted.
1252         (WebCore::VideoPreset::decode): Deleted.
1253
1254         * platform/mediastream/mac/AVVideoCaptureSource.h:
1255         (WebCore::AVVideoCaptureSource::videoPresets): Deleted.
1256         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1257         (WebCore::AVVideoPreset::create):
1258         (WebCore::AVVideoPreset::AVVideoPreset):
1259         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1260         (WebCore::AVVideoCaptureSource::settings):
1261         (WebCore::AVVideoCaptureSource::capabilities): Make non-const, it wasn't helpful.
1262         (WebCore::AVVideoCaptureSource::setFrameRate):
1263         (WebCore::AVVideoCaptureSource::prefersPreset):
1264         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
1265         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
1266         (WebCore::AVVideoCaptureSource::setupCaptureSession):
1267         (WebCore::AVVideoCaptureSource::processNewFrame):
1268         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
1269         (WebCore::AVVideoCaptureSource::isFrameRateSupported):
1270         (WebCore::AVVideoCaptureSource::generatePresets):
1271         (WebCore::updateSizeMinMax): Deleted.
1272         (WebCore::updateAspectRatioMinMax): Deleted.
1273         (WebCore::AVVideoCaptureSource::settings const): Deleted.
1274         (WebCore::AVVideoCaptureSource::capabilities const): Deleted.
1275         (WebCore::AVVideoCaptureSource::sizeForPreset): Deleted.
1276         (WebCore::AVVideoCaptureSource::setPreset): Deleted.
1277         (WebCore::AVVideoCaptureSource::setSizeAndFrameRate): Deleted.
1278         (WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions): Deleted.
1279         (WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate): Deleted.
1280
1281         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1282         (WebCore::CoreAudioCaptureSource::capabilities): Make non-const, it wasn't helpful.
1283         (WebCore::CoreAudioCaptureSource::settings): Ditto.
1284         (WebCore::CoreAudioCaptureSource::capabilities const): Deleted.
1285         (WebCore::CoreAudioCaptureSource::settings const): Deleted.
1286         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1287
1288         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
1289         (WebCore::DisplayCaptureSourceCocoa::capabilities): Make non-const, it wasn't helpful.
1290         (WebCore::DisplayCaptureSourceCocoa::settings): Ditto.
1291         (WebCore::DisplayCaptureSourceCocoa::capabilities const): Deleted.
1292         (WebCore::DisplayCaptureSourceCocoa::settings const): Deleted.
1293         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
1294
1295         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
1296         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
1297         (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
1298         (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
1299         (WebCore::MockRealtimeVideoSourceMac::setSizeAndFrameRateWithPreset):
1300         * platform/mock/MockMediaDevice.h:
1301         (WebCore::MockCameraProperties::decode):
1302
1303         * platform/mock/MockRealtimeAudioSource.cpp:
1304         (WebCore::MockRealtimeAudioSource::settings): Make non-const, it wasn't helpful.
1305         (WebCore::MockRealtimeAudioSource::capabilities): Ditto.
1306         (WebCore::MockRealtimeAudioSource::settings const): Deleted.
1307         (WebCore::MockRealtimeAudioSource::capabilities const): Deleted.
1308         * platform/mock/MockRealtimeAudioSource.h:
1309
1310         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1311         (WebCore::defaultDevices): Change video device presets to trigger resize code more often.
1312
1313         * platform/mock/MockRealtimeVideoSource.cpp:
1314         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
1315         (WebCore::MockRealtimeVideoSource::generatePresets):
1316         (WebCore::MockRealtimeVideoSource::capabilities): Make non-const, it wasn't helpful.
1317         (WebCore::MockRealtimeVideoSource::settings): Ditto.
1318         (WebCore::MockRealtimeVideoSource::capabilities const): Deleted.
1319         (WebCore::MockRealtimeVideoSource::settings const): Deleted.
1320         * platform/mock/MockRealtimeVideoSource.h:
1321
1322 2018-09-14  Frederic Wang  <fwang@igalia.com>
1323
1324         Bug 189541 - Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
1325         https://bugs.webkit.org/show_bug.cgi?id=189541
1326
1327         Reviewed by Alex Christensen.
1328
1329         FontDescriptionKey::computeHash() from In FontCache.h requires implicit instantiation of the
1330         FontTaggedSettings::hash() template function. This instantiation may happen before
1331         FontTaggedSettings::hash() is actually fully specialized in FontTaggedSettings.cpp. To avoid
1332         compiler errors when FontCache.h and FontTaggedSettings.cpp are in the same translation unit,
1333         we declare full specialization of the hash() functions in FontTaggedSettings.h.
1334
1335         No new tests, behavior unchanged.
1336
1337         * platform/graphics/FontCache.h: Explicitly include FontTaggedSettings to avoid possible future breakage.
1338         * platform/graphics/FontTaggedSettings.h: Declare full specialization of FontTaggedSettings::hash().
1339
1340 2018-09-14  Ryan Haddad  <ryanhaddad@apple.com>
1341
1342         Unreviewed, rolling out r235990.
1343
1344         Introduced TestWebKitAPI.NowPlayingTest timeouts on iOS
1345
1346         Reverted changeset:
1347
1348         "Enable USE_MEDIAREMOTE on iOS"
1349         https://bugs.webkit.org/show_bug.cgi?id=189096
1350         https://trac.webkit.org/changeset/235990
1351
1352 2018-09-14  Jer Noble  <jer.noble@apple.com>
1353
1354         Turn SourceBufferChangeTypeEnabled on by default
1355         https://bugs.webkit.org/show_bug.cgi?id=189527
1356
1357         Reviewed by Eric Carlson.
1358
1359         * page/Settings.yaml:
1360
1361 2018-09-14  Devin Rousso  <webkit@devinrousso.com>
1362
1363         Web Inspector: Record actions performed on ImageBitmapRenderingContext
1364         https://bugs.webkit.org/show_bug.cgi?id=181341
1365
1366         Reviewed by Joseph Pecoraro.
1367
1368         Test: inspector/canvas/recording-bitmaprenderer.html
1369
1370         * html/canvas/ImageBitmapRenderingContext.idl:
1371
1372         * inspector/InspectorCanvas.cpp:
1373         (WebCore::shouldSnapshotBitmapRendererAction):
1374         (WebCore::InspectorCanvas::recordAction):
1375
1376         * inspector/agents/InspectorCanvasAgent.cpp:
1377         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
1378
1379         * page/PageConsoleClient.cpp:
1380         (canvasRenderingContext):
1381
1382 2018-09-14  David Kilzer  <ddkilzer@apple.com>
1383
1384         REGRESSION (r235954): Fix build failure on watchOS
1385         <https://webkit.org/b/189605>
1386
1387         Reviewed by Geoffrey Garen.
1388
1389         Remove `using WebCore::IndexedDB::KeyType;` from
1390         Source/WebCore/Modules/indexeddb/IDBKey.h and fix all the
1391         resulting build failures.
1392
1393         * Modules/indexeddb/IDBKey.cpp:
1394         (WebCore::IDBKey::IDBKey):
1395         (WebCore::IDBKey::isValid const):
1396         (WebCore::IDBKey::compare const):
1397         * Modules/indexeddb/IDBKey.h:
1398         (WebCore::IDBKey::createNumber):
1399         (WebCore::IDBKey::createDate):
1400         (WebCore::IDBKey::type const):
1401         (WebCore::IDBKey::array const):
1402         (WebCore::IDBKey::string const):
1403         (WebCore::IDBKey::date const):
1404         (WebCore::IDBKey::number const):
1405         (WebCore::IDBKey::binary const):
1406         (WebCore::IDBKey::compareTypes):
1407         (WebCore::IDBKey::IDBKey):
1408         * Modules/indexeddb/IDBKeyData.cpp:
1409         (WebCore::IDBKeyData::IDBKeyData):
1410         (WebCore::IDBKeyData::maybeCreateIDBKey const):
1411         (WebCore::IDBKeyData::isolatedCopy):
1412         (WebCore::IDBKeyData::encode const):
1413         (WebCore::IDBKeyData::decode):
1414         (WebCore::IDBKeyData::compare const):
1415         (WebCore::IDBKeyData::loggingString const):
1416         (WebCore::IDBKeyData::setArrayValue):
1417         (WebCore::IDBKeyData::setBinaryValue):
1418         (WebCore::IDBKeyData::setStringValue):
1419         (WebCore::IDBKeyData::setDateValue):
1420         (WebCore::IDBKeyData::setNumberValue):
1421         (WebCore::IDBKeyData::isValid const):
1422         (WebCore::IDBKeyData::operator== const):
1423         * Modules/indexeddb/IDBKeyData.h:
1424         (WebCore::IDBKeyData::IDBKeyData):
1425         (WebCore::IDBKeyData::minimum):
1426         (WebCore::IDBKeyData::maximum):
1427         (WebCore::IDBKeyData::type const):
1428         (WebCore::IDBKeyData::hash const):
1429         (WebCore::IDBKeyData::string const):
1430         (WebCore::IDBKeyData::date const):
1431         (WebCore::IDBKeyData::number const):
1432         (WebCore::IDBKeyData::binary const):
1433         (WebCore::IDBKeyData::array const):
1434         (WebCore::IDBKeyData::encode const):
1435         (WebCore::IDBKeyData::decode):
1436         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1437         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
1438         * bindings/js/IDBBindingUtilities.cpp:
1439         (WebCore::toJS):
1440
1441 2018-09-14  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1442
1443         [EME] Add support the waitingforkey event
1444         https://bugs.webkit.org/show_bug.cgi?id=189616
1445
1446         Reviewed by Philippe Normand.
1447
1448         Crossplatform support to fire the waitingforkey event from the
1449         player to the element. The element implements the W3C specified
1450         algorithm.
1451
1452         * html/HTMLMediaElement.cpp:
1453         (WebCore::HTMLMediaElement::mediaPlayerWaitingForKey):
1454         (WebCore::HTMLMediaElement::attemptToResumePlaybackIfNecessary):
1455         * html/HTMLMediaElement.h:
1456         * platform/graphics/MediaPlayer.cpp:
1457         (WebCore::MediaPlayer::waitingForKey):
1458         * platform/graphics/MediaPlayer.h:
1459         (WebCore::MediaPlayerClient::mediaPlayerWaitingForKey):
1460
1461 2018-09-14  Mike Gorse  <mgorse@suse.com>
1462
1463         builtins directory causes name conflict on Python 3
1464         https://bugs.webkit.org/show_bug.cgi?id=189552
1465
1466         Reviewed by Michael Catanzaro.
1467
1468         No new tests (No behavior change).
1469
1470         * CMakeLists.txt: builtins -> wkbuiltins.
1471         * DerivedSources.make: builtins -> wkbuiltins.
1472
1473 2018-09-13  Ryosuke Niwa  <rniwa@webkit.org>
1474
1475         Capturing event listeners are called during bubbling phase for shadow hosts
1476         https://bugs.webkit.org/show_bug.cgi?id=174288
1477         <rdar://problem/33530455>
1478
1479         Reviewed by Darin Adler.
1480
1481         Implemented the new behavior proposed in https://github.com/whatwg/dom/pull/686 [1] to fix the problem
1482         that capturing event listeners on a shadow host is invoked during bubbling phase when an event is
1483         dispatched within its shadow tree.
1484
1485         To see why this is a problem, suppose we fire a composed event at span#target in the following DOM tree:
1486           section#hostParent
1487             + div#host -- ShadowRoot
1488                             - p#parent
1489                                 - span#target
1490         Then capturing and bubbling event listeners on #target, #parent, #host, and #hostParent are invoked in
1491         the following order in WebKit & Chrome right now:
1492
1493         1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
1494         2. #parent, capturing, eventPhase: CAPTURING_PHASE
1495         3. #target, capturing, eventPhase: AT_TARGET
1496         4. #target, non-capturing, eventPhase: AT_TARGET
1497         5. #parent, non-capturing, eventPhase: BUBBLING_PHASE
1498         6. #host, capturing, eventPhase: AT_TARGET
1499         7. #host, non-capturing, eventPhase: AT_TARGET
1500         8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE
1501
1502         This is counter-intuitive because capturing event listeners on #host isn't invoked until bubblign phase
1503         started. A more natural ordering would be:
1504
1505         1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
1506         2. #host, capturing, eventPhase: AT_TARGET
1507         3. #parent, capturing, eventPhase: CAPTURING_PHASE
1508         4. #target, capturing, eventPhase: AT_TARGET
1509         5. #target, non-capturing, eventPhase: AT_TARGET
1510         6. #parent, non-capturing, eventPhase: BUBBLING_PHASE
1511         7. #host, non-capturing, eventPhase: AT_TARGET
1512         8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE
1513
1514         This also happens to be the order by which Gecko's current shadow DOM implementation invoke event listners.
1515         This patch implements this new behavior using the spec-change proposed in [1]. Note that this patch also
1516         impacts the invocation order of event listeners when there is no shadow tree. Namely, before this patch,
1517         event listeners on the event's target is invoked in the registration order. After this patch, all capturing
1518         event listeners are invoked before bubbling event listeners are invoked.
1519
1520         To implement this behavior, this patch introduces EventTarget::EventInvokePhase indicating whether we're
1521         in the capturing phase or bubbling phase to EventTarget::fireEventListeners. We can't use Event's eventPhase
1522         enum because that's set to Event::Phase::AT_TARGET when we're at a shadow host.
1523
1524         Test: fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html
1525
1526         * Modules/modern-media-controls/media/media-controller-support.js:
1527         (MediaControllerSupport.prototype.enable): Use capturing event listeners so that we can update the states of
1528         media controls before author scripts recieve the event.
1529         (MediaControllerSupport.prototype.disable): Ditto.
1530         * dom/EventContext.cpp:
1531         (WebCore::EventContext::handleLocalEvents const):
1532         (WebCore::MouseOrFocusEventContext::handleLocalEvents const):
1533         (WebCore::TouchEventContext::handleLocalEvents const):
1534         * dom/EventContext.h:
1535         * dom/EventDispatcher.cpp:
1536         (WebCore::dispatchEventInDOM): Invoke capturing event listners even when target and current target are same.
1537         This happens when the current target is a shadow host and event's target is in its shadow tree. Also merged
1538         the special code path for the event's target with the code in the bubbling phase.
1539         * dom/EventPath.cpp:
1540         (WebCore::WindowEventContext::handleLocalEvents const):
1541         * dom/EventTarget.cpp:
1542         (WebCore::EventTarget::dispatchEvent): Invoke capturing and bubbling event listeners in the order.
1543         (WebCore::EventTarget::fireEventListeners):
1544         (WebCore::EventTarget::innerInvokeEventListeners): Renamed from fireEventListeners to match the spec. Use
1545         EventInvokePhase to filter out event listeners so that we can invoke capturing event listners before bubbling
1546         event listeners even when eventPhase is Event::Phase::AT_TARGET.
1547         * dom/EventTarget.h:
1548         * dom/Node.cpp:
1549         (WebCore::Node::handleLocalEvents):
1550         * dom/Node.h:
1551         * html/HTMLFormElement.cpp:
1552         (WebCore::HTMLFormElement::handleLocalEvents):
1553         * html/HTMLFormElement.h:
1554         * page/DOMWindow.cpp:
1555         (WebCore::DOMWindow::dispatchEvent):
1556
1557 2018-09-13  Megan Gardner  <megan_gardner@apple.com>
1558
1559         Fix color stop blending in conic gradients for stops past 1
1560         https://bugs.webkit.org/show_bug.cgi?id=189532
1561         <rdar://problem/44158221>
1562
1563         Reviewed by Simon Fraser.
1564
1565         Calculation was wrong, fixed it, and wrote a test that failed
1566         without the change, and passes with it.
1567
1568         Test: fast/gradients/conic-repeating-last-stop.html
1569
1570         * css/CSSGradientValue.cpp:
1571         (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
1572
1573 2018-09-13  Chris Dumez  <cdumez@apple.com>
1574
1575         Regression(PSON): setting window.opener to null allows process swapping in cases that are not web-compatible
1576         https://bugs.webkit.org/show_bug.cgi?id=189590
1577         <rdar://problem/44422725>
1578
1579         Reviewed by Geoffrey Garen.
1580
1581         Set a flag on the navigation action to indicate if the page was opened via window.open() without 'noopener'.
1582
1583         Test: http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html
1584
1585         * loader/FrameLoader.cpp:
1586         (WebCore::FrameLoader::loadURL):
1587         * loader/NavigationAction.h:
1588         (WebCore::NavigationAction::openedViaWindowOpenWithOpener const):
1589         (WebCore::NavigationAction::setOpenedViaWindowOpenWithOpener):
1590         * page/DOMWindow.cpp:
1591         (WebCore::DOMWindow::createWindow):
1592         * page/Page.h:
1593         (WebCore::Page::openedViaWindowOpenWithOpener const):
1594         (WebCore::Page::setOpenedViaWindowOpenWithOpener):
1595
1596 2018-09-13  Jer Noble  <jer.noble@apple.com>
1597
1598         Enable USE_MEDIAREMOTE on iOS
1599         https://bugs.webkit.org/show_bug.cgi?id=189096
1600
1601         Reviewed by Eric Carlson.
1602
1603         Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
1604         Now Playing implementation on iOS and Mac.
1605
1606         * SourcesCocoa.txt:
1607         * WebCore.xcodeproj/project.pbxproj:
1608         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
1609         * platform/audio/cocoa/MediaSessionManagerCocoa.h:
1610         * platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.
1611         (PlatformMediaSessionManager::sharedManager):
1612         (PlatformMediaSessionManager::sharedManagerIfExists):
1613         (MediaSessionManagerCocoa::updateSessionState):
1614         (MediaSessionManagerCocoa::beginInterruption):
1615         (MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
1616         (MediaSessionManagerCocoa::sessionWillBeginPlayback):
1617         (MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
1618         (MediaSessionManagerCocoa::removeSession):
1619         (MediaSessionManagerCocoa::sessionWillEndPlayback):
1620         (MediaSessionManagerCocoa::clientCharacteristicsChanged):
1621         (MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
1622         (MediaSessionManagerCocoa::nowPlayingEligibleSession):
1623         (MediaSessionManagerCocoa::updateNowPlayingInfo):
1624         * platform/audio/ios/MediaSessionManagerIOS.h:
1625         (): Deleted.
1626         * platform/audio/ios/MediaSessionManagerIOS.mm:
1627         (WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
1628         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
1629         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
1630         (WebCore::MediaSessionManageriOS::removeSession): Deleted.
1631         (WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
1632         (WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.
1633         * platform/audio/mac/MediaSessionManagerMac.h: Removed.
1634
1635 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
1636
1637         Remove the workaround for friend class LazyNeverDestroyed<X> statements for MSVC
1638         https://bugs.webkit.org/show_bug.cgi?id=189576
1639
1640         Reviewed by Alex Christensen.
1641
1642         Old MSVC can't compile "friend class LazyNeverDestroyed<X>"
1643         statements, but "friend LazyNeverDestroyed<X>".
1644
1645         No new tests (No behavior change).
1646
1647         * css/CSSInheritedValue.h: Removed the code for COMPILER(MSVC).
1648         Removed 'class' keyword in "friend class LazyNeverDestroyed<X>"
1649         statement.
1650         * css/CSSInitialValue.h: Ditto.
1651         * css/CSSPrimitiveValue.h: Ditto.
1652         * css/CSSRevertValue.h: Ditto.
1653         * css/CSSUnsetValue.h: Ditto.
1654
1655 2018-09-13  Ms2ger  <Ms2ger@igalia.com>
1656
1657         [GLib] Fix format string in KeyedEncoderGlib::beginObject().
1658         https://bugs.webkit.org/show_bug.cgi?id=189585
1659
1660         Reviewed by Michael Catanzaro.
1661
1662         This appears to fix the following assertion locally:
1663
1664         GLib-CRITICAL **: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
1665
1666         Covered by existing tests.
1667
1668         * platform/glib/KeyedEncoderGlib.cpp:
1669         (WebCore::KeyedEncoderGlib::beginObject):
1670
1671 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
1672
1673         Unreviewed, rolling out r235953.
1674
1675         Caused layout test crashes under GuardMalloc.
1676
1677         Reverted changeset:
1678
1679         "Make GraphicsLayers ref-counted, so their tree can persist
1680         when disconnected from RenderLayerBackings"
1681         https://bugs.webkit.org/show_bug.cgi?id=189521
1682         https://trac.webkit.org/changeset/235953
1683
1684 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
1685
1686         Remove a MSVC workaround in XPath::Step::NodeTest
1687         https://bugs.webkit.org/show_bug.cgi?id=189578
1688
1689         Reviewed by Alex Christensen.
1690
1691         XPath::Step::NodeTest has a special code for MSVC bug workaround.
1692         It has been introduced in 5 years ago in Bug 121082 Comment 19.
1693
1694         I think it is safe just to remove the workaround.
1695
1696         No new tests (No behavior change).
1697
1698         * xml/XPathStep.h: Removed the MSVC workaround.
1699
1700 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
1701
1702         Remove a MSVC workaround in InspectorStyle::styleWithProperties
1703         https://bugs.webkit.org/show_bug.cgi?id=189577
1704
1705         Reviewed by Alex Christensen.
1706
1707         No new tests (No behavior change).
1708
1709         * inspector/InspectorStyleSheet.cpp:
1710         (WebCore::InspectorStyle::styleWithProperties const): Use 'auto' for the type of 'status'.
1711
1712 2018-09-13  Alex Christensen  <achristensen@webkit.org>
1713
1714         Use a Variant instead of a union in CSSSelector
1715         https://bugs.webkit.org/show_bug.cgi?id=188559
1716
1717         Reviewed by Antti Koivisto.
1718
1719         No change in behavior. This just makes some of the existing problems more obvious and easy to fix.
1720
1721         I moved m_caseInsensitiveAttributeValueMatching to RareData because it's only used with RareData.
1722         I only have m_isForPage when assertions are enabled because it's only used for an assertion.
1723         The rest is pretty straightforward translating union syntax to Variant syntax.
1724         I use RefPtr for now where I could use Ref because it's never null to make copying easier, but that's temporary.
1725
1726         * css/CSSSelector.cpp:
1727         (WebCore::CSSSelector::CSSSelector):
1728         (WebCore::CSSSelector::createRareData):
1729         (WebCore::CSSSelector::setAttribute):
1730         (WebCore::CSSSelector::setArgument):
1731         (WebCore::CSSSelector::setLangArgumentList):
1732         (WebCore::CSSSelector::setSelectorList):
1733         (WebCore::CSSSelector::setNth):
1734         (WebCore::CSSSelector::matchNth const):
1735         (WebCore::CSSSelector::nthA const):
1736         (WebCore::CSSSelector::nthB const):
1737         (WebCore::CSSSelector::RareData::RareData):
1738         * css/CSSSelector.h:
1739         (WebCore::CSSSelector::argument const):
1740         (WebCore::CSSSelector::langArgumentList const):
1741         (WebCore::CSSSelector::selectorList const):
1742         (WebCore::CSSSelector::attribute const):
1743         (WebCore::CSSSelector::attributeCanonicalLocalName const):
1744         (WebCore::CSSSelector::setValue):
1745         (WebCore::CSSSelector::CSSSelector):
1746         (WebCore::CSSSelector::~CSSSelector):
1747         (WebCore::CSSSelector::tagQName const):
1748         (WebCore::CSSSelector::tagLowercaseLocalName const):
1749         (WebCore::CSSSelector::value const):
1750         (WebCore::CSSSelector::serializingValue const):
1751         (WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive const):
1752         (WebCore::CSSSelector::RareData::create): Deleted.
1753         * css/parser/CSSParserImpl.cpp:
1754         (WebCore::CSSParserImpl::parsePageSelector):
1755         * css/parser/CSSParserSelector.h:
1756
1757 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
1758
1759         [Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
1760         https://bugs.webkit.org/show_bug.cgi?id=189575
1761
1762         Reviewed by Alex Christensen.
1763
1764         No new tests (No behavior change).
1765
1766         * platform/win/WheelEventWin.cpp:
1767         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use flooredIntPoint to convert FloatPoint to POINT.
1768
1769 2018-09-13  Youenn Fablet  <youenn@apple.com>
1770
1771         Introduce RTCRtpSendParameters
1772         https://bugs.webkit.org/show_bug.cgi?id=189563
1773
1774         Reviewed by Eric Carlson.
1775
1776         Introduce RTCRtpSendParameters to match the WebRTC specification.
1777         Split RTCRtpPrameters fields accordingly and update call sites.
1778
1779         Covered by updated test.
1780
1781         * CMakeLists.txt:
1782         * DerivedSources.make:
1783         * Modules/mediastream/PeerConnectionBackend.h:
1784         * Modules/mediastream/RTCRtpCodingParameters.h: Added
1785         * Modules/mediastream/RTCRtpCodingParameters.idl: Added
1786         * Modules/mediastream/RTCRtpDecodingParameters.h: Added
1787         * Modules/mediastream/RTCRtpDecodingParameters.idl: Added
1788         * Modules/mediastream/RTCRtpEncodingParameters.h:
1789         * Modules/mediastream/RTCRtpEncodingParameters.idl:
1790         * Modules/mediastream/RTCRtpParameters.h:
1791         * Modules/mediastream/RTCRtpParameters.idl:
1792         * Modules/mediastream/RTCRtpReceiver.cpp:
1793         * Modules/mediastream/RTCRtpSendParameters.h: Added.
1794         (WebCore::RTCRtpSendParameters::RTCRtpSendParameters):
1795         * Modules/mediastream/RTCRtpSendParameters.idl: Added.
1796         * Modules/mediastream/RTCRtpSender.cpp:
1797         (WebCore::RTCRtpSender::getParameters):
1798         (WebCore::RTCRtpSender::setParameters):
1799         * Modules/mediastream/RTCRtpSender.h:
1800         * Modules/mediastream/RTCRtpSender.idl:
1801         * Modules/mediastream/RTCRtpSenderBackend.h:
1802         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
1803         (WebCore::LibWebRTCRtpSenderBackend::getParameters const):
1804         (WebCore::LibWebRTCRtpSenderBackend::setParameters):
1805         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
1806         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1807         (WebCore::toRTCRtpParameters):
1808         (WebCore::toRTCRtpSendParameters):
1809         (WebCore::fromRTCRtpSendParameters):
1810         * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
1811         * Sources.txt:
1812         * WebCore.xcodeproj/project.pbxproj:
1813
1814 2018-09-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1815
1816         [GStreamer][EME] decrypt-key-needed message renamed to drm-cdm-instance-needed
1817         https://bugs.webkit.org/show_bug.cgi?id=189547
1818
1819         Reviewed by Philippe Normand.
1820
1821         decrypt-key-needed message renamed to drm-cdm-instance-needed.
1822
1823         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1824         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Apart from
1825         renaming the message, removed the class prefix for
1826         dispatchCDMInstance.
1827         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1828         (webkitMediaCommonEncryptionDecryptTransformInPlace):
1829
1830 2018-09-11  Ryosuke Niwa  <rniwa@webkit.org>
1831
1832         imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits assertion
1833         https://bugs.webkit.org/show_bug.cgi?id=189493
1834
1835         Reviewed by Alex Christensen.
1836
1837         The debug assertion was caused by RefPtr in FormAssociatedElement::formOwnerRemovedFromTree introduced
1838         by r224390 and r223644 ref'ing ShadowRoot while calling removeDetachedChildren inside ~ShadowRoot.
1839         When a form (or any other) element has more than one ref inside removeDetachedChildren,
1840         addChildNodesToDeletionQueue calls notifyChildNodeRemoved in the tree oreder.
1841
1842         However, when a form associated element of this form element appears later in the tree order,
1843         FormAssociatedElement::formOwnerRemovedFromTree can traverse up ancestors including the ShadowRoot.
1844
1845         Fixed the bug by using raw pointers instead. Luckily, there is no DOM mutations or other non-trivial
1846         operations happening in this function so this should be safe.
1847
1848         Test: imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html
1849
1850         * html/FormAssociatedElement.cpp:
1851         (WebCore::FormAssociatedElement::formOwnerRemovedFromTree): Fixed the bug.
1852
1853 2018-09-12  Dan Bernstein  <mitz@apple.com>
1854
1855         [Cocoa] Complete support for Paste as Quotation
1856         https://bugs.webkit.org/show_bug.cgi?id=189504
1857
1858         Reviewed by Wenson Hsieh.
1859
1860         Tests: editing/pasteboard/4930986-1-paste-as-quotation.html
1861                editing/pasteboard/4930986-2-paste-as-quotation.html
1862                editing/pasteboard/4930986-3-paste-as-quotation.html
1863
1864         * editing/Editor.cpp:
1865           Added ClipboardEventKind::PasteAsQuotation.
1866         (WebCore::eventNameForClipboardEvent): Map PasteAsQuotation to the "paste" DOM event name.
1867         (WebCore::createDataTransferForClipboardEvent): Place the unquoted content in the event.
1868           This means that currently event handlers can’t emulate pasting as quotation, because they
1869           neither have the quoted content nor knowledge that quoting has been requested. We could
1870           change this in the future if needed.
1871         (WebCore::Editor::paste): Updated for change in pasteWithPasteboard’s argument type.
1872         (WebCore::Editor::pasteAsQuotation): Added. Similar to paste, but passes
1873           PasteOption::AsQuotation to pasteWithPasteboard.
1874         (WebCore::Editor::quoteFragmentForPasting): Added. Quoting for pasting consists of enclosing
1875           the fragment in a blockquote element with the "type" attribute set to "cite" and the
1876           "class" attribute set to a well-known value, which is used to trigger special behavior in
1877           ReplaceSelectionCommand. The behavior includes removing the "class" attribute in the end,
1878           so eventually, we could stop using this form of in-band signaling.
1879         * editing/Editor.h: Declared PasteOption enum class to encompass the existing allowPlainText
1880           and MailBlockquoteHandling arguments to pasteWithPasteboard as well as the new AsQuotation
1881           behavior.
1882
1883         * editing/EditorCommand.cpp:
1884         (WebCore::executePasteAsQuotation): Added. Similar to executing Paste.
1885         (WebCore::createCommandMap): Added an entry for PasteAsQuotation, based on the Paste entry.
1886
1887         * editing/cocoa/EditorCocoa.mm:
1888         (WebCore::Editor::webContentFromPasteboard): Moved from EditorIOS.mm and EditorMac.mm to
1889           here.
1890
1891         * editing/gtk/EditorGtk.cpp:
1892         (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
1893           quote the fragment if needed.
1894
1895         * editing/ios/EditorIOS.mm:
1896         (WebCore::Editor::pasteWithPasteboard): Ditto.
1897         (WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.
1898
1899         * editing/mac/EditorMac.mm:
1900         (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
1901           quote the fragment if needed.
1902         (WebCore::Editor::readSelectionFromPasteboard): Updated for new OptionSet argument to
1903           pasteWithPasteboard.
1904         (WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.
1905
1906         * editing/win/EditorWin.cpp:
1907         (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
1908           quote the fragment if needed.
1909
1910         * editing/wpe/EditorWPE.cpp:
1911         (WebCore::Editor::pasteWithPasteboard): Ditto.
1912
1913 2018-09-11  Simon Fraser  <simon.fraser@apple.com>
1914
1915         Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
1916         https://bugs.webkit.org/show_bug.cgi?id=189521
1917
1918         Reviewed by Tim Horton.
1919         
1920         Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.
1921         
1922         RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.
1923         
1924         All the other changes are just to adapt to the new ownership patterns.
1925         
1926         I verified that no GraphicsLayers were leaked or abandoned after this change.
1927
1928         No behavior change.
1929
1930         * page/PageOverlayController.cpp:
1931         (WebCore::PageOverlayController::layerWithDocumentOverlays):
1932         (WebCore::PageOverlayController::layerWithViewOverlays):
1933         (WebCore::PageOverlayController::installPageOverlay):
1934         (WebCore::PageOverlayController::uninstallPageOverlay):
1935         (WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
1936         (WebCore::PageOverlayController::didChangeViewSize):
1937         (WebCore::PageOverlayController::didChangeDocumentSize):
1938         (WebCore::PageOverlayController::didChangeSettings):
1939         (WebCore::PageOverlayController::paintContents):
1940         (WebCore::PageOverlayController::didChangeOverlayFrame):
1941         (WebCore::PageOverlayController::didChangeOverlayBackgroundColor):
1942         * page/PageOverlayController.h:
1943         * page/mac/ServicesOverlayController.h:
1944         (WebCore::ServicesOverlayController::Highlight::layer const):
1945         * page/mac/ServicesOverlayController.mm:
1946         (WebCore::ServicesOverlayController::Highlight::Highlight):
1947         (WebCore::ServicesOverlayController::Highlight::invalidate):
1948         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1949         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1950         (WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
1951         (WebCore::ServicesOverlayController::determineActiveHighlight):
1952         * platform/graphics/GraphicsLayer.cpp:
1953         (WebCore::GraphicsLayer::GraphicsLayer):
1954         (WebCore::GraphicsLayer::willBeDestroyed):
1955         (WebCore::GraphicsLayer::setChildren):
1956         (WebCore::GraphicsLayer::addChild):
1957         (WebCore::GraphicsLayer::addChildAtIndex):
1958         (WebCore::GraphicsLayer::addChildBelow):
1959         (WebCore::GraphicsLayer::addChildAbove):
1960         (WebCore::GraphicsLayer::replaceChild):
1961         (WebCore::GraphicsLayer::removeAllChildren):
1962         (WebCore::GraphicsLayer::removeFromParent):
1963         (WebCore::GraphicsLayer::setMaskLayer):
1964         (WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
1965         (WebCore::GraphicsLayer::distributeOpacity):
1966         (WebCore::GraphicsLayer::traverse):
1967         (WebCore::dumpChildren):
1968         * platform/graphics/GraphicsLayer.h:
1969         (WebCore::GraphicsLayer::children const):
1970         (WebCore::GraphicsLayer::children):
1971         (WebCore::GraphicsLayer::maskLayer const):
1972         (WebCore::GraphicsLayer::replicaLayer const):
1973         (WebCore::GraphicsLayer::beingDestroyed const):
1974         (WebCore::GraphicsLayer:: const): Deleted.
1975         * platform/graphics/GraphicsLayerFactory.h:
1976         * platform/graphics/ca/GraphicsLayerCA.cpp:
1977         (WebCore::GraphicsLayer::create):
1978         (WebCore::GraphicsLayerCA::setChildren):
1979         (WebCore::GraphicsLayerCA::addChild):
1980         (WebCore::GraphicsLayerCA::addChildAtIndex):
1981         (WebCore::GraphicsLayerCA::addChildBelow):
1982         (WebCore::GraphicsLayerCA::addChildAbove):
1983         (WebCore::GraphicsLayerCA::replaceChild):
1984         (WebCore::GraphicsLayerCA::setMaskLayer):
1985         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
1986         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1987         (WebCore::GraphicsLayerCA::updateSublayerList):
1988         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1989         * platform/graphics/ca/GraphicsLayerCA.h:
1990         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1991         (WebCore::GraphicsLayer::create):
1992         (WebCore::GraphicsLayerTextureMapper::setChildren):
1993         (WebCore::GraphicsLayerTextureMapper::addChild):
1994         (WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
1995         (WebCore::GraphicsLayerTextureMapper::addChildAbove):
1996         (WebCore::GraphicsLayerTextureMapper::addChildBelow):
1997         (WebCore::GraphicsLayerTextureMapper::replaceChild):
1998         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
1999         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
2000         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2001         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2002         (WebCore::GraphicsLayer::create):
2003         (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
2004         (WebCore::CoordinatedGraphicsLayer::addChild):
2005         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
2006         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
2007         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
2008         (WebCore::CoordinatedGraphicsLayer::replaceChild):
2009         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
2010         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
2011         (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
2012         (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
2013         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2014         * platform/graphics/win/GraphicsLayerDirect2D.cpp:
2015         (WebCore::GraphicsLayer::create):
2016         (WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
2017         (WebCore::GraphicsLayerDirect2D::initialize): Deleted.
2018         (WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
2019         (WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
2020         (WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.
2021         * rendering/RenderLayerBacking.cpp:
2022         (WebCore::RenderLayerBacking::createGraphicsLayer):
2023         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2024         (WebCore::RenderLayerBacking::updateConfiguration):
2025         (WebCore::RenderLayerBacking::updateInternalHierarchy):
2026         (WebCore::RenderLayerBacking::updateMaskingLayer):
2027         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
2028         (WebCore::RenderLayerBacking::updateScrollingLayers):
2029         * rendering/RenderLayerBacking.h:
2030         * rendering/RenderLayerCompositor.cpp:
2031         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2032         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
2033         (WebCore::RenderLayerCompositor::setCompositingParent):
2034         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2035         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
2036         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2037         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2038         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2039         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2040         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2041         (WebCore::RenderLayerCompositor::ensureRootLayer):
2042         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
2043         * rendering/RenderLayerCompositor.h:
2044
2045 2018-09-12  Alex Christensen  <achristensen@webkit.org>
2046
2047         Expose fewer of URL's internal members
2048         https://bugs.webkit.org/show_bug.cgi?id=189528
2049
2050         Reviewed by Chris Dumez.
2051
2052         * loader/appcache/ApplicationCacheStorage.cpp:
2053         (WebCore::urlHostHash):
2054         * platform/URL.cpp:
2055         (WebCore::URL::hostStart const):
2056         (WebCore::protocolHostAndPortAreEqual):
2057         (WebCore::hostsAreEqual):
2058         * platform/URL.h:
2059         (WebCore::URL::hostStart const): Deleted.
2060         (WebCore::URL::hostEnd const): Deleted.
2061
2062 2018-09-12  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2063
2064         [Curl] Implement correct total received bytes.
2065         https://bugs.webkit.org/show_bug.cgi?id=189555
2066
2067         Reviewed by Alex Christensen.
2068
2069         Curl port only reported total network received bytes before decoding.
2070
2071         No new test. InspectorTest is only available for WebKitTestRunner.
2072
2073         * platform/network/curl/CurlRequest.cpp:
2074         (WebCore::CurlRequest::didReceiveData):
2075         (WebCore::CurlRequest::updateNetworkLoadMetrics):
2076         * platform/network/curl/CurlRequest.h:
2077
2078 2018-09-12  Youenn Fablet  <youenn@apple.com>
2079
2080         Split RTCRtpParameters idl and header file
2081         https://bugs.webkit.org/show_bug.cgi?id=189524
2082
2083         Reviewed by Eric Carlson.
2084
2085         This will be easier to manage and will allow to more easily introduce sender/receiver parameters.
2086         No change of behavior.
2087
2088         * CMakeLists.txt:
2089         * DerivedSources.make:
2090         * Modules/mediastream/RTCDegradationPreference.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2091         * Modules/mediastream/RTCDegradationPreference.idl: Added.
2092         * Modules/mediastream/RTCDtxStatus.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2093         * Modules/mediastream/RTCDtxStatus.idl: Added.
2094         * Modules/mediastream/RTCPriorityType.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2095         * Modules/mediastream/RTCPriorityType.idl: Added.
2096         * Modules/mediastream/RTCRtpCodecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2097         * Modules/mediastream/RTCRtpCodecParameters.idl: Added.
2098         * Modules/mediastream/RTCRtpEncodingParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2099         * Modules/mediastream/RTCRtpEncodingParameters.idl: Added.
2100         * Modules/mediastream/RTCRtpFecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2101         * Modules/mediastream/RTCRtpFecParameters.idl: Added.
2102         * Modules/mediastream/RTCRtpHeaderExtensionParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2103         * Modules/mediastream/RTCRtpHeaderExtensionParameters.idl: Added.
2104         * Modules/mediastream/RTCRtpParameters.h:
2105         * Modules/mediastream/RTCRtpParameters.idl:
2106         * Modules/mediastream/RTCRtpRtxParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
2107         * Modules/mediastream/RTCRtpRtxParameters.idl: Added.
2108         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
2109         (WebCore::toRTCEncodingParameters):
2110         (WebCore::fromRTCEncodingParameters):
2111         (WebCore::toRTCHeaderExtensionParameters):
2112         (WebCore::fromRTCHeaderExtensionParameters):
2113         (WebCore::toRTCCodecParameters):
2114         (WebCore::toRTCRtpParameters):
2115         (WebCore::fromRTCRtpParameters):
2116         * Sources.txt:
2117         * WebCore.xcodeproj/project.pbxproj:
2118
2119 2018-09-12  Ali Juma  <ajuma@chromium.org>
2120
2121         [IntersectionObserver] Implement rootMargin expansion
2122         https://bugs.webkit.org/show_bug.cgi?id=189525
2123
2124         Reviewed by Simon Fraser.
2125
2126         Expand the root intersection rectangle by the observer's rootMargin when computing
2127         intersections.
2128
2129         Test: imported/w3c/web-platform-tests/intersection-observer/root-margin.html
2130
2131         * dom/Document.cpp:
2132         (WebCore::expandRootBoundsWithRootMargin):
2133         (WebCore::computeIntersectionRects):
2134         * page/IntersectionObserver.h:
2135         (WebCore::IntersectionObserver::rootMarginBox const):
2136         * platform/graphics/FloatRect.h:
2137         (WebCore::FloatRect::expand):
2138
2139 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
2140
2141         [Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
2142         https://bugs.webkit.org/show_bug.cgi?id=189542
2143
2144         Reviewed by Alex Christensen.
2145
2146         No new tests (No behavior change).
2147
2148         * platform/graphics/win/IntPointWin.cpp:
2149         (WebCore::IntPoint::operator POINTS const): Narrowed m_x and m_y by using static_cast.
2150
2151 2018-09-12  Guillaume Emont  <guijemont@igalia.com>
2152
2153         Add IGNORE_WARNING_.* macros
2154         https://bugs.webkit.org/show_bug.cgi?id=188996
2155
2156         Reviewed by Michael Catanzaro.
2157
2158         * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
2159         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2160         * accessibility/mac/AXObjectCacheMac.mm:
2161         (WebCore::AXObjectCache::postPlatformNotification):
2162         * accessibility/mac/AccessibilityObjectMac.mm:
2163         (WebCore::AccessibilityObject::overrideAttachmentParent):
2164         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
2165         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2166         (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
2167         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2168         (-[WebAccessibilityObjectWrapper role]):
2169         (-[WebAccessibilityObjectWrapper roleDescription]):
2170         * bridge/objc/WebScriptObject.mm:
2171         * bridge/objc/objc_class.mm:
2172         (JSC::Bindings::ObjcClass::fieldNamed const):
2173         * crypto/CommonCryptoUtilities.cpp:
2174         (WebCore::getCommonCryptoDigestAlgorithm):
2175         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
2176         (WebCore::encryptAES_GCM):
2177         (WebCore::decyptAES_GCM):
2178         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2179         (WebCore::wrapSerializedCryptoKey):
2180         (WebCore::unwrapSerializedCryptoKey):
2181         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2182         * css/makeSelectorPseudoElementsMap.py:
2183         * editing/TextIterator.cpp:
2184         * editing/mac/EditorMac.mm:
2185         (WebCore::Editor::pasteWithPasteboard):
2186         (WebCore::Editor::takeFindStringFromSelection):
2187         (WebCore::Editor::replaceNodeFromPasteboard):
2188         * page/mac/EventHandlerMac.mm:
2189         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
2190         * page/mac/ServicesOverlayController.mm:
2191         (WebCore::ServicesOverlayController::Highlight::paintContents):
2192         * platform/LocalizedStrings.cpp:
2193         (WebCore::formatLocalizedString):
2194         * platform/ScreenProperties.h:
2195         (WebCore::ScreenData::decode):
2196         * platform/gamepad/mac/HIDGamepadProvider.cpp:
2197         (WebCore::HIDGamepadProvider::stopMonitoringInput):
2198         * platform/graphics/PlatformDisplay.cpp:
2199         (WebCore::PlatformDisplay::sharedDisplay):
2200         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
2201         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
2202         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
2203         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2204         (WebCore::CDMSessionAVStreamSession::update):
2205         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2206         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2207         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
2208         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
2209         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
2210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2211         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2212         (WebCore::IGNORE_CLANG_WARNING_END):
2213         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2214         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2215         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
2216         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
2217         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2218         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
2219         (WebCore::IGNORE_CLANG_WARNING_END):
2220         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2221         (PlatformCALayer::drawLayerContents):
2222         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2223         (WebCore::FontCascade::fontForCombiningCharacterSequence const):
2224         * platform/graphics/cg/ImageDecoderCG.cpp:
2225         (WebCore::ImageDecoderCG::createFrameImageAtIndex):
2226         * platform/graphics/cocoa/GraphicsContextCocoa.mm:
2227         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2228         * platform/graphics/cocoa/WebGLLayer.h:
2229         (IGNORE_CLANG_WARNING):
2230         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2231         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2232         * platform/graphics/mac/IconMac.mm:
2233         (WebCore::Icon::Icon):
2234         * platform/graphics/mac/PDFDocumentImageMac.mm:
2235         (WebCore::PDFDocumentImage::drawPDFPage):
2236         * platform/graphics/mac/WebKitNSImageExtras.mm:
2237         (-[NSImage _web_lockFocusWithDeviceScaleFactor:]):
2238         * platform/ios/DragImageIOS.mm:
2239         * platform/mac/DragImageMac.mm:
2240         (WebCore::scaleDragImage):
2241         (WebCore::createDragImageForLink):
2242         * platform/mac/LegacyNSPasteboardTypes.h:
2243         * platform/mac/LocalCurrentGraphicsContext.mm:
2244         (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
2245         * platform/mac/PasteboardMac.mm:
2246         (WebCore::Pasteboard::createForCopyAndPaste):
2247         (WebCore::Pasteboard::createForDragAndDrop):
2248         (WebCore::setDragImageImpl):
2249         * platform/mac/PlatformEventFactoryMac.mm:
2250         (WebCore::globalPoint):
2251         * platform/mac/SSLKeyGeneratorMac.mm:
2252         * platform/mac/ScrollViewMac.mm:
2253         (WebCore::ScrollView::platformContentsToScreen const):
2254         (WebCore::ScrollView::platformScreenToContents const):
2255         * platform/mac/ThemeMac.mm:
2256         (WebCore::drawCellFocusRingWithFrameAtTime):
2257         * platform/mac/WebPlaybackControlsManager.mm:
2258         * platform/mac/WidgetMac.mm:
2259         (WebCore::Widget::paint):
2260         * platform/mediastream/RealtimeIncomingAudioSource.h:
2261         * platform/mediastream/RealtimeIncomingVideoSource.h:
2262         * platform/mediastream/RealtimeOutgoingAudioSource.h:
2263         * platform/mediastream/RealtimeOutgoingVideoSource.h:
2264         * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
2265         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
2266         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
2267         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
2268         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
2269         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2270         * platform/network/cf/ResourceHandleCFNet.cpp:
2271         (WebCore::ResourceHandle::createCFURLConnection):
2272         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2273         (WebCore::SocketStreamHandleImpl::reportErrorToClient):
2274         * platform/network/create-http-header-name-table:
2275         * platform/text/TextEncoding.cpp:
2276         * testing/MockLibWebRTCPeerConnection.h:
2277         * xml/XPathGrammar.cpp:
2278
2279 2018-09-12  Pablo Saavedra  <psaavedra@igalia.com>
2280
2281         Linking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDEO=OFF and ENABLE_WEB_AUDIO=OFF
2282         https://bugs.webkit.org/show_bug.cgi?id=189540
2283
2284         Reviewed by Philippe Normand.
2285
2286         Related issues:
2287
2288         This issue is related with changes in https://bugs.webkit.org/show_bug.cgi?id=183080
2289         This issue is introduced in https://bugs.webkit.org/show_bug.cgi?id=186547
2290
2291         No new tests, no changes in the functionality.
2292
2293         * platform/GStreamer.cmake:
2294         * platform/SourcesGLib.txt:
2295         * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
2296         (WebCore::LibWebRTCProvider::webRTCAvailable):
2297
2298 2018-09-11  Zan Dobersek  <zdobersek@igalia.com>
2299
2300         Unreviewed WPE build fix.
2301
2302         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
2303         Add extra header inclusions to get this code building after the unified
2304         sources system shifted it into a different translation unit.
2305
2306 2018-09-11  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2307
2308         [Curl] WebInspector doesn't display request headers added during processing.
2309         https://bugs.webkit.org/show_bug.cgi?id=189531
2310
2311         Reviewed by Alex Christensen.
2312
2313         While processing the request, Curl port network layer adds some headers to the request
2314         such as cookies. Those headers should be displayed in the WebInspector.
2315
2316         Tested on MiniBrowser.
2317
2318         * platform/network/curl/CurlRequest.cpp:
2319         (WebCore::CurlRequest::didReceiveHeader):
2320         (WebCore::CurlRequest::didCompleteTransfer):
2321         (WebCore::CurlRequest::updateNetworkLoadMetrics):
2322         * platform/network/curl/CurlRequest.h:
2323
2324 2018-09-11  James Savage  <james.savage@apple.com>
2325
2326         Follow up to:
2327         Expose -apple-system-container-border color to internal web views.
2328         https://bugs.webkit.org/show_bug.cgi?id=189178.
2329
2330         Reviewed by Timothy Hatcher.
2331
2332         * rendering/RenderThemeMac.mm:
2333         (WebCore::RenderThemeMac::systemColor const): Add a separate #if block for
2334         Mojave. When I used CSSValueAppleSystemFindHighlightBackground as a template
2335         for this change, I had to write out the condition in the first change, but
2336         mistakenly thought I could reuse the block here. Turns out the versions were
2337         different, and I could not.
2338
2339 2018-09-11  Youenn Fablet  <youenn@apple.com>
2340
2341         Remove MediaDevices NoInterfaceObject
2342         https://bugs.webkit.org/show_bug.cgi?id=189512
2343
2344         Reviewed by Alex Christensen.
2345
2346         Covered by rebased WPT tests.
2347
2348         * Modules/mediastream/MediaDevices.idl:
2349
2350 2018-09-11  Jer Noble  <jer.noble@apple.com>
2351
2352         [MediaCapabilities] Implement MediaEngineConfigurationFactory registration
2353         https://bugs.webkit.org/show_bug.cgi?id=189438
2354
2355         Reviewed by Eric Carlson.
2356
2357         Implement a mechanism to register platform-specific MediaEngineConfigurationFactory methods, and a mechanism to iterate
2358         over those registered factories when createDecodingConfiguration() and createEncodingConfiguration() are called.
2359
2360         The Factory has been radically simplified; the concept of MediaEngineDecodingConfiguration
2361         and MediaEngineEncodingConfiguration and its subclasess have been removed. Since the primary
2362         objects representing video and audio configurations are IDLDictionaries, the native objects
2363         are just structs full of POD types (and Strings). Since these have no dependencies on
2364         higher-level HTML concepts, they can be moved into platform/ and accessed from there. This
2365         patch also converts MediaCapabilitiesInfo to an Interface, so its implementation also can
2366         become a struct and live in platform/. The MediaEngineDecodingConfigurationMock and
2367         MediaEngineEncodingConfigurationMock have been consolidated in a single class which simply
2368         parses MediaDecodingConfiguration and MediaEncodingConifguration objects (now that they live
2369         in Platform) and return a MediaCapabilitiesInfo object (now that it does too).
2370
2371         * Modules/mediacapabilities/MediaCapabilities.cpp:
2372         (WebCore::isValidVideoConfiguration):
2373         (WebCore::MediaCapabilities::decodingInfo):
2374         (WebCore::MediaCapabilities::encodingInfo):
2375         * Modules/mediacapabilities/MediaCapabilitiesInfo.h: Removed.
2376         * Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
2377         * Modules/mediacapabilities/VideoConfiguration.idl:
2378         * Sources.txt:
2379         * WebCore.xcodeproj/project.pbxproj:
2380         * platform/MediaCapabilitiesInfo.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
2381         * platform/mediacapabilities/AudioConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/AudioConfiguration.h.
2382         * platform/mediacapabilities/MediaConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaConfiguration.h.
2383         * platform/mediacapabilities/MediaDecodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingConfiguration.h.
2384         * platform/mediacapabilities/MediaDecodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
2385         * platform/mediacapabilities/MediaEncodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingConfiguration.h.
2386         * platform/mediacapabilities/MediaEncodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingType.h.
2387         * platform/mediacapabilities/MediaEngineConfiguration.cpp: Removed.
2388         * platform/mediacapabilities/MediaEngineConfiguration.h: Removed.
2389         * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
2390         (WebCore::factories):
2391         (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
2392         (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
2393         * platform/mediacapabilities/MediaEngineConfigurationFactory.h:
2394         * platform/mediacapabilities/MediaEngineEncodingConfiguration.h: Removed.
2395         * platform/mediacapabilities/VideoConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/VideoConfiguration.h.
2396         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
2397         * platform/mock/MediaEngineConfigurationFactoryMock.cpp: Added.
2398         (WebCore::canDecodeMedia):
2399         (WebCore::canSmoothlyDecodeMedia):
2400         (WebCore::canPowerEfficientlyDecodeMedia):
2401         (WebCore::canEncodeMedia):
2402         (WebCore::canSmoothlyEncodeMedia):
2403         (WebCore::canPowerEfficientlyEncodeMedia):
2404         (WebCore::MediaEngineConfigurationFactoryMock::createDecodingConfiguration):
2405         (WebCore::MediaEngineConfigurationFactoryMock::createEncodingConfiguration):
2406         * platform/mock/MediaEngineConfigurationFactoryMock.h: Renamed from Source/WebCore/platform/mediacapabilities/MediaEngineDecodingConfiguration.h.
2407         * platform/mock/MediaEngineDecodingConfigurationMock.cpp: Removed.
2408         * platform/mock/MediaEngineDecodingConfigurationMock.h: Removed.
2409         * platform/mock/MediaEngineEncodingConfigurationMock.cpp: Removed.
2410         * platform/mock/MediaEngineEncodingConfigurationMock.h: Removed.
2411
2412 2018-09-08  Ryosuke Niwa  <rniwa@webkit.org>
2413
2414         :first-child, :last-child, :nth-child, and :nth-of-type don't work on shadow root's children
2415         https://bugs.webkit.org/show_bug.cgi?id=166748
2416         <rdar://problem/29649177>
2417
2418         Reviewed by Yusuke Suzuki.
2419
2420         Added the support for matching positional pseudo classes. For now, we invalidate whenever a child node
2421         of a non-UA ShadowRoot is mutated instead of a fine-grained style invalidation as done for regular elements.
2422
2423         Tests: fast/shadow-dom/nth-node-on-shadow-child-invalidation.html
2424                fast/shadow-dom/nth-node-on-shadow-child-no-jit.html
2425                fast/shadow-dom/nth-node-on-shadow-child.html
2426
2427         * css/SelectorChecker.cpp:
2428         (WebCore::SelectorChecker::checkOne const):
2429         * cssjit/SelectorCompiler.cpp:
2430         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElementOrShadowRoot):
2431         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
2432         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
2433         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
2434         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
2435         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2436         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
2437         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
2438         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
2439         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
2440         * dom/ShadowRoot.cpp:
2441         (WebCore::ShadowRoot::childrenChanged): Invalidate the subtree whenever a child node is mutated.
2442         * dom/ShadowRoot.h:
2443         * domjit/DOMJITHelpers.h:
2444         (WebCore::DOMJIT::branchTestIsShadowRootFlagOnNode): Added.
2445         (WebCore::DOMJIT::branchTestIsElementOrShadowRootFlagOnNode): Added.
2446
2447 2018-09-11  Per Arne Vollan  <pvollan@apple.com>
2448
2449         Addressing post-review feedback on r235619.
2450         https://bugs.webkit.org/show_bug.cgi?id=187925
2451
2452         Unreviewed.
2453
2454         * testing/Internals.cpp:
2455         (WebCore::Internals::primaryScreenDisplayID):
2456         * testing/Internals.h:
2457
2458 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2459
2460         [macOS] [WK2] Support changing foreground colors via color panel
2461         https://bugs.webkit.org/show_bug.cgi?id=189382
2462         <rdar://problem/44227311>
2463
2464         Reviewed by Ryosuke Niwa.
2465
2466         Small adjustments to support changing foreground text color using NSColorPanel in WebKit2. See comments below.
2467         Tested by FontManagerTests.ChangeFontColorWithColorPanel.
2468
2469         * editing/EditingStyle.cpp:
2470         (WebCore::StyleChange::extractTextStyles):
2471
2472         Support setting foreground text color with alpha by using a styled span element rather than a font element with
2473         attributes. To do this, only populate `StyleChange::m_applyFontColor` if the color is opaque. This is because
2474         the font element does not support `rgba()` syntax, so any font colors here with alpha that are serialized to
2475         `rgba()` result in a garbage value for the computed color style.
2476
2477         * editing/FontAttributeChanges.cpp:
2478         (WebCore::FontAttributeChanges::editAction const):
2479
2480         Add a helper to return the relevant EditAction describing this set of FontAttributeChanges.
2481
2482         * editing/FontAttributeChanges.h:
2483         (WebCore::FontChanges::isEmpty const):
2484
2485 2018-09-11  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
2486
2487         Shrink size of ResourseResponseBase
2488         https://bugs.webkit.org/show_bug.cgi?id=189501
2489
2490         Reviewed by Simon Fraser.
2491
2492         We reduce the size of ResourceResponseBase by the following two optimizations.
2493
2494         1. Use bitfields for bool flags and reorder them.
2495
2496         2. Use Markable<> in CacheControlDirectives, which is held by ResourceResponseBase.
2497
2498         This patch reduces the size of ResourceResponseBase from 416 to 392 bytes.
2499
2500         No behavior change.
2501
2502         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2503         (WebCore::WebCoreAVFResourceLoader::responseReceived):
2504         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
2505         * platform/network/CacheValidation.h:
2506         (WebCore::CacheControlDirectives::CacheControlDirectives):
2507         * platform/network/ResourceResponseBase.cpp:
2508         (WebCore::ResourceResponseBase::ResourceResponseBase):
2509         (WebCore::ResourceResponseBase::contentRange const):
2510         * platform/network/ResourceResponseBase.h:
2511         (WebCore::ResourceResponseBase::decode):
2512
2513 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
2514
2515         Unreviewed, fix some -Wreturn-type warnings
2516
2517         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2518         (WebCore::sourceFromNewReceiver):
2519         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
2520         (WebCore::toRTCRtpTransceiverDirection):
2521         (WebCore::fromRTCRtpTransceiverDirection):
2522
2523 2018-09-11  Jiewen Tan  <jiewen_tan@apple.com>
2524
2525         Unreviewed, a speculative build fix for r235888.
2526
2527         * Modules/mediastream/MediaDevices.h:
2528         Add class Document forward declaration.
2529
2530 2018-09-11  Woodrow Wang  <woodrow_wang@apple.com>
2531
2532         Add Web API Statistics Collection
2533         https://bugs.webkit.org/show_bug.cgi?id=187773
2534         <rdar://problem/44155162>
2535
2536         Reviewed by Brent Fulgham.
2537
2538         Added data collection for web API statistics, specifically regarding the canvas, font loads, 
2539         screen functions, and navigator functions. The data collection code is placed under a runtime 
2540         enabled feature flag. The statistics are stored in a ResourceLoadStatistics object and written 
2541         to a plist on disk. Added a new file CanvasActivityRecord.h and CanvasActivityRecord.cpp which
2542         includes a struct to keep track of HTML5 canvas element read and writes. 
2543
2544         Tests: http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html
2545                http/tests/webAPIStatistics/font-load-data-collection.html
2546                http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html
2547                http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html
2548
2549         * Sources.txt:
2550         * WebCore.xcodeproj/project.pbxproj:
2551         * css/CSSFontFaceSource.cpp:
2552         (WebCore::CSSFontFaceSource::load):
2553         * css/CSSFontSelector.cpp:
2554         (WebCore::CSSFontSelector::fontRangesForFamily):
2555         (WebCore::CSSFontSelector::fallbackFontAt):
2556
2557         The following are the functions where we'd like to record a canvas read.
2558
2559         * html/HTMLCanvasElement.cpp:
2560         (WebCore::HTMLCanvasElement::toDataURL):
2561         (WebCore::HTMLCanvasElement::toBlob):
2562         (WebCore::HTMLCanvasElement::getImageData):
2563         (WebCore::HTMLCanvasElement::toMediaSample):
2564         (WebCore::HTMLCanvasElement::captureStream):
2565
2566         The following are the functions where we'd like to record a canvas write.
2567
2568         * html/canvas/CanvasRenderingContext2D.cpp:
2569         (WebCore::CanvasRenderingContext2D::measureText):
2570         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2571
2572         The following files and functions handle the CanvasActivityRecord struct and
2573         its respective functions.
2574
2575         * loader/CanvasActivityRecord.cpp: Added.
2576         (WebCore::CanvasActivityRecord::recordWrittenOrMeasuredText):
2577         (WebCore::CanvasActivityRecord::mergeWith):
2578         * loader/CanvasActivityRecord.h: Added.
2579         (WebCore::CanvasActivityRecord::encode const):
2580         (WebCore::CanvasActivityRecord::decode):
2581
2582         * loader/DocumentThreadableLoader.cpp:
2583         * loader/FrameLoader.cpp:
2584         * loader/ResourceLoadObserver.cpp:
2585         (WebCore::ResourceLoadObserver::logFontLoad):
2586         (WebCore::ResourceLoadObserver::logCanvasRead):
2587         (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
2588         (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
2589         (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
2590
2591         Before, entries in the ResourceLoadStatistics involving HashSets used "origin" as the key. 
2592         Now the encodeHashSet function has been generalized to take any key to encode the entries 
2593         in the HashSet. Also added functionality to encode an OptionSet by converting it to its 
2594         raw bitmask state. 
2595
2596         * loader/ResourceLoadObserver.h:
2597         * loader/ResourceLoadStatistics.cpp:
2598         (WebCore::encodeHashSet):
2599         (WebCore::encodeOriginHashSet):
2600         (WebCore::encodeOptionSet):
2601         (WebCore::encodeFontHashSet):
2602         (WebCore::encodeCanvasActivityRecord):
2603         (WebCore::ResourceLoadStatistics::encode const):
2604         (WebCore::decodeHashSet):
2605         (WebCore::decodeOriginHashSet):
2606         (WebCore::decodeOptionSet):
2607         (WebCore::decodeFontHashSet):
2608         (WebCore::decodeCanvasActivityRecord):
2609         (WebCore::ResourceLoadStatistics::decode):
2610         (WebCore::navigatorAPIEnumToString):
2611         (WebCore::screenAPIEnumToString):
2612         (WebCore::appendNavigatorAPIOptionSet):
2613         (WebCore::appendScreenAPIOptionSet):
2614         (WebCore::ResourceLoadStatistics::toString const):
2615         (WebCore::ResourceLoadStatistics::merge):
2616         * loader/ResourceLoadStatistics.h:
2617         * loader/ResourceTiming.cpp:
2618
2619         The following are the navigator functions recorded for the web API statistics.
2620
2621         * page/Navigator.cpp:
2622         (WebCore::Navigator::appVersion const):
2623         (WebCore::Navigator::userAgent const):
2624         (WebCore::Navigator::plugins):
2625         (WebCore::Navigator::mimeTypes):
2626         (WebCore::Navigator::cookieEnabled const):
2627         (WebCore::Navigator::javaEnabled const):
2628
2629         The following are the screen functions recorded for the web API statistics.
2630
2631         * page/Screen.cpp:
2632         (WebCore::Screen::height const):
2633         (WebCore::Screen::width const):
2634         (WebCore::Screen::colorDepth const):
2635         (WebCore::Screen::pixelDepth const):
2636         (WebCore::Screen::availLeft const):
2637         (WebCore::Screen::availTop const):
2638         (WebCore::Screen::availHeight const):
2639         (WebCore::Screen::availWidth const):
2640
2641 2018-09-11  Pablo Saavedra  <psaavedra@igalia.com>
2642
2643         playbackControlsManagerUpdateTimerFired and
2644         m_playbackControlsManagerUpdateTimer must be
2645         guarded with ENABLE(VIDEO), otherwise the following
2646         error occurs with the VIDEO feature turned off:
2647
2648           error: 'MediaElementSession' has not been declared
2649
2650         Add missing #if ENABLE(VIDEO) Page.cpp and Page.h
2651         https://bugs.webkit.org/show_bug.cgi?id=189500
2652
2653         Reviewed by Anders Carlsson.
2654
2655         * page/Page.cpp:
2656         (WebCore::Page::Page):
2657         (WebCore::Page::schedulePlaybackControlsManagerUpdate):
2658         * page/Page.h:
2659
2660 2018-09-11  Frederic Wang  <fwang@igalia.com>
2661
2662         Refactor filter list checking code
2663         https://bugs.webkit.org/show_bug.cgi?id=185087
2664
2665         Reviewed by Antonio Gomes.
2666
2667         No new tests, behavior unchanged.
2668
2669         * page/animation/KeyframeAnimation.h: Add missing forward-declaration FilterOperations.
2670
2671 == Rolled over to ChangeLog-2018-09-11 ==