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