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