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