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