2017-08-04 Zan Dobersek Unreviewed. Removing redundant NotImplemented.h header inclusions and cleaning up whitespace issues in libgcrypt-specific CryptoKeyEC and CryptoKeyRSA implementation files. * crypto/gcrypt/CryptoKeyECGCrypt.cpp: * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: 2017-08-04 Jeremy Jones Remove unnecesary call to status bar SPI. https://bugs.webkit.org/show_bug.cgi?id=175176 rdar://problem/20887306 Reviewed by Darin Adler. No new tests because no behavior change. This removes an obsolete call to SPI. * platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::cleanupFullscreen): 2017-08-03 Zan Dobersek [GCrypt] Implement CryptoKeyEC PKCS#8 imports https://bugs.webkit.org/show_bug.cgi?id=173647 Reviewed by Jiewen Tan. No new tests -- affected tests are now passing and are unskipped. Implement libgcrypt-based support for PKCS#8 imports of EC keys. Existing libtasn1 utilities are used to achieve this. First, the provided key data is decoded against the PrivateKeyInfo ASN.1 definition. First, the version member of that structure is validated, followed by the algorithm member. The latter is also properly tested depending on this being an import of an ECDSA or ECDH key. Data of the parameters member is decoded against the ECParameters ASN.1 definition, and the namedCurve object identifier is validated, making sure it represents a valid EC curve and that this curve maches the one specified for the import operation. Data of the privateKey member is decoded against the ECPrivateKey ASN.1 definition. The version member of that structure is properly validated. The optional parameters member of that structure is already decoded against the ECParameters ASN.1 definition. If present, it is checked to contain a valid EC curve identifier that matches the specified curve. The optional publicKey member of the ECPrivateKey structure is validated, testing that its data matches in size an uncompressed EC point, and that the first byte of this data is 0x04, as expected for an uncompressed EC point. What's left is the private key data on the initial ECPrivateKey structure. That data is retrieved and validated, making sure its size matches the size of the specified curve. The `private-key` s-expression is then constructed, embedding the curve name and the validated private key data. This s-expression is then used to construct an EC context. If the optional publicKey data was provided, it's used to set the `q` parameter for this EC context. Otherwise, the value for `q` is computed on-the-fly for the specified EC and the provided private key. The `q` point is then tested through the gcry_mpi_ec_curve_point() function, making sure that the derived point is indeed located on the given EC. Finally, with the private key properly validated, a new CryptoKeyEC object is constructed, using the `private-key` s-expression and the parameters that were specified for this import operation. * crypto/gcrypt/CryptoKeyECGCrypt.cpp: (WebCore::CryptoKeyEC::platformImportPkcs8): * crypto/gcrypt/GCryptUtilities.h: 2017-08-03 Chris Dumez Fix parsing of to allow time starting with a '.' without a leading 0 https://bugs.webkit.org/show_bug.cgi?id=175132 Reviewed by Darin Adler. Fix parsing of to allow time starting with a '.', without a leading 0. This is as per https://github.com/whatwg/html/pull/2852. The latest spec is at: - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTTPRefreshInternal): 2017-08-03 Brian Burg Remove ENABLE(WEB_SOCKET) guards https://bugs.webkit.org/show_bug.cgi?id=167044 Reviewed by Joseph Pecoraro. * Configurations/FeatureDefines.xcconfig: * Modules/websockets/ThreadableWebSocketChannel.cpp: * Modules/websockets/ThreadableWebSocketChannel.h: * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: * Modules/websockets/WebSocket.cpp: * Modules/websockets/WebSocket.h: * Modules/websockets/WebSocket.idl: * Modules/websockets/WebSocketChannel.cpp: * Modules/websockets/WebSocketChannel.h: * Modules/websockets/WebSocketChannelClient.h: * Modules/websockets/WebSocketDeflateFramer.cpp: * Modules/websockets/WebSocketDeflateFramer.h: * Modules/websockets/WebSocketDeflater.cpp: * Modules/websockets/WebSocketDeflater.h: * Modules/websockets/WebSocketExtensionDispatcher.cpp: * Modules/websockets/WebSocketExtensionDispatcher.h: * Modules/websockets/WebSocketExtensionParser.cpp: * Modules/websockets/WebSocketExtensionParser.h: * Modules/websockets/WebSocketExtensionProcessor.h: * Modules/websockets/WebSocketFrame.cpp: * Modules/websockets/WebSocketFrame.h: * Modules/websockets/WebSocketHandshake.cpp: * Modules/websockets/WebSocketHandshake.h: * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: * Modules/websockets/WorkerThreadableWebSocketChannel.h: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::idbConnectionProxy): (WebCore::Document::socketProvider): * dom/Document.h: * dom/ScriptExecutionContext.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didSendWebSocketFrame): * inspector/InspectorNetworkAgent.cpp: * inspector/InspectorNetworkAgent.h: * page/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::webSocketEnabled const): * page/RuntimeEnabledFeatures.h: * page/SocketProvider.cpp: * page/SocketProvider.h: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): * workers/WorkerGlobalScope.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::socketProvider): * workers/WorkerThread.h: 2017-08-03 Don Olmstead Remove LayoutUnit dependency in TextStream https://bugs.webkit.org/show_bug.cgi?id=175110 Reviewed by Zalan Bujtas. No new tests. No change in behavior. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * platform/LayoutUnit.cpp: Added. (WebCore::operator<<): * platform/LayoutUnit.h: * platform/text/TextStream.cpp: * platform/text/TextStream.h: 2017-08-03 Jeremy Jones Improve WebKitLegacy video fullscreen animation begin and end rects. https://bugs.webkit.org/show_bug.cgi?id=175152 rdar://problem/32840576 Reviewed by Eric Carlson. No new tests, becuase this change has no effect on the DOM. This change uses different rects for fullscreen animation to prevent the animation from failing, and to improve the aesthetics of the animation. * platform/mac/WebVideoFullscreenController.mm: (frameExpandedToRatioOfFrame): (-[WebVideoFullscreenController enterFullscreen:]): (-[WebVideoFullscreenController exitFullscreen]): (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]): (constrainFrameToRatioOfFrame): Deleted. 2017-08-03 Jer Noble [EME][Mac] SecureStop left on disk in Private Browsing mode. https://bugs.webkit.org/show_bug.cgi?id=175162 Reviewed by Eric Carlson. Return an empty string from mediaKeysStorageDirectory() when the page indicates that storage should be ephemeral(). Previously, an empty string in this case would be treated as an error. Instead, treat an empty string as valid, and do not try to store or retrieve session information to disk in that case. * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory const): * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: (WebCore::CDMSessionAVContentKeySession::releaseKeys): (WebCore::CDMSessionAVContentKeySession::update): (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage): (WebCore::CDMSessionAVContentKeySession::contentKeySession): * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::CDMSessionMediaSourceAVFObjC::storagePath const): 2017-08-03 Youenn Fablet [Fetch API] Add support for Request keepalive getter https://bugs.webkit.org/show_bug.cgi?id=175151 Reviewed by Chris Dumez. Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html Adding keepalive as a fetch option. Adding initialization and getter of keepalive into FetchRequest. * Modules/fetch/FetchRequest.cpp: (WebCore::buildOptions): * Modules/fetch/FetchRequest.h: * Modules/fetch/FetchRequest.idl: * loader/FetchOptions.h: 2017-08-03 Yoshiaki Jitsukawa [PAL] Move spi/cf directory into PAL https://bugs.webkit.org/show_bug.cgi?id=175057 Reviewed by Antti Koivisto. * WebCore.xcodeproj/project.pbxproj: * loader/cocoa/DiskCacheMonitorCocoa.mm: * loader/cocoa/SubresourceLoaderCocoa.mm: * loader/mac/ResourceLoaderMac.mm: * platform/cf/CoreMediaSoftLink.cpp: * platform/cf/CoreMediaSoftLink.h: * platform/mac/PluginBlacklist.mm: * platform/mac/WebCoreNSStringExtras.mm: * platform/mac/WebGLBlacklist.mm: * platform/mediastream/mac/CoreAudioCaptureSource.cpp: * platform/network/NetworkStorageSession.h: * platform/network/cf/CookieJarCFNet.cpp: * platform/network/cf/CredentialStorageCFNet.cpp: * platform/network/cf/ResourceHandleCFNet.cpp: * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: * platform/network/cf/ResourceRequestCFNet.cpp: * platform/network/cf/ResourceRequestCFNet.h: * platform/network/cf/ResourceResponse.h: * platform/network/cf/ResourceResponseCFNet.cpp: * platform/network/cf/SocketStreamHandleImplCFNet.cpp: * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: * platform/network/cocoa/CookieStorageObserver.h: * platform/network/cocoa/CredentialCocoa.h: * platform/network/cocoa/NetworkStorageSessionCocoa.mm: * platform/network/cocoa/ResourceRequestCocoa.mm: * platform/network/cocoa/ResourceResponseCocoa.mm: * platform/network/ios/ResourceRequestIOS.mm: * platform/network/mac/CookieJarMac.mm: * platform/network/mac/FormDataStreamMac.mm: * platform/network/mac/ResourceHandleMac.mm: * platform/network/mac/ResourceRequestMac.mm: * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: * platform/network/mac/WebCoreURLResponse.h: * testing/cocoa/WebArchiveDumpSupport.mm: 2017-08-03 Youenn Fablet Remove FETCH_API compilation guard https://bugs.webkit.org/show_bug.cgi?id=175154 Reviewed by Chris Dumez. No change of behavior. * Configurations/FeatureDefines.xcconfig: * Modules/fetch/DOMWindowFetch.cpp: * Modules/fetch/DOMWindowFetch.h: * Modules/fetch/DOMWindowFetch.idl: * Modules/fetch/FetchBody.cpp: * Modules/fetch/FetchBody.h: * Modules/fetch/FetchBody.idl: * Modules/fetch/FetchBodyConsumer.cpp: * Modules/fetch/FetchBodyConsumer.h: * Modules/fetch/FetchBodyOwner.cpp: * Modules/fetch/FetchBodyOwner.h: * Modules/fetch/FetchHeaders.cpp: * Modules/fetch/FetchHeaders.h: * Modules/fetch/FetchHeaders.idl: * Modules/fetch/FetchInternals.js: * Modules/fetch/FetchLoader.cpp: * Modules/fetch/FetchLoader.h: * Modules/fetch/FetchLoaderClient.h: * Modules/fetch/FetchRequest.cpp: * Modules/fetch/FetchRequest.h: * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchResponse.cpp: * Modules/fetch/FetchResponse.h: * Modules/fetch/FetchResponse.idl: * Modules/fetch/FetchResponse.js: * Modules/fetch/FetchResponseSource.cpp: * Modules/fetch/FetchResponseSource.h: * Modules/fetch/WorkerGlobalScopeFetch.cpp: * Modules/fetch/WorkerGlobalScopeFetch.h: * Modules/fetch/WorkerGlobalScopeFetch.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::fetchAPIEnabled const): 2017-08-03 Devin Rousso Web Inspector: add button to open Inspector^2 https://bugs.webkit.org/show_bug.cgi?id=175108 Reviewed by Brian Burg. This patch just exposes a function to the inspector page. No new functionality was added. * inspector/InspectorFrontendHost.idl: * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::inspectInspector): 2017-08-03 Matt Baker Web Inspector: Instrument WebGLProgram created/deleted https://bugs.webkit.org/show_bug.cgi?id=175059 Reviewed by Devin Rousso. Tests: inspector/canvas/shaderProgram-add-remove-webgl.html inspector/canvas/shaderProgram-add-remove-webgl2.html This patch adds instrumentation to WebGLRenderingContextBase for tracking WebGLPrograms. A new helper class, InspectorShaderProgram, is used by the CanvasAgent to hold related data. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::createProgram): (WebCore::WebGLRenderingContextBase::deleteProgram): * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::enable): (WebCore::InspectorCanvasAgent::frameNavigated): (WebCore::InspectorCanvasAgent::didCreateProgram): (WebCore::InspectorCanvasAgent::willDeleteProgram): (WebCore::InspectorCanvasAgent::clearCanvasData): (WebCore::InspectorCanvasAgent::unbindCanvas): (WebCore::InspectorCanvasAgent::unbindProgram): (WebCore::InspectorCanvasAgent::assertInspectorProgram): (WebCore::InspectorCanvasAgent::findInspectorProgram): * inspector/InspectorCanvasAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl): (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl): (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl): (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl): (WebCore::InspectorInstrumentation::recordCanvasActionImpl): (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl): (WebCore::InspectorInstrumentation::didCreateProgramImpl): (WebCore::InspectorInstrumentation::willDeleteProgramImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::recordCanvasActionImpl): (WebCore::InspectorInstrumentation::didCreateCSSCanvas): (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes): (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext): (WebCore::InspectorInstrumentation::didChangeCanvasMemory): (WebCore::InspectorInstrumentation::recordCanvasAction): (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame): (WebCore::InspectorInstrumentation::didCreateProgram): (WebCore::InspectorInstrumentation::willDeleteProgram): * inspector/InspectorShaderProgram.cpp: Added. (WebCore::InspectorShaderProgram::create): (WebCore::InspectorShaderProgram::InspectorShaderProgram): (WebCore::InspectorShaderProgram::context const): * inspector/InspectorShaderProgram.h: Added. 2017-08-03 Matt Lewis Unreviewed, rolling out r220209. This caused internal build failures. Reverted changeset: "Use MPAVRoutingController instead of deprecated versions." https://bugs.webkit.org/show_bug.cgi?id=175063 http://trac.webkit.org/changeset/220209 2017-08-03 Brady Eidson Add SW IDLs and stub out basic functionality. https://bugs.webkit.org/show_bug.cgi?id=175115 Reviewed by Chris Dumez. No new tests (Currently no behavior change). Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because the Settings-based code generation is completely broken for non-Document contexts, whereas the RuntimeEnabledFeatures-based generation is not. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file. * bindings/js/JSServiceWorkerContainerCustom.cpp: Added. (WebCore::JSServiceWorkerContainer::ready const): * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers. (WebCore::toJSServiceWorkerGlobalScope): * bindings/js/JSWorkerGlobalScopeBase.h: * dom/EventNames.h: * dom/EventTargetFactory.in: * features.json: Change status of feature. * page/Navigator.idl: * page/NavigatorBase.cpp: (WebCore::NavigatorBase::serviceWorker): * page/NavigatorBase.h: * page/NavigatorServiceWorker.idl: Added. * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const): (WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled): * workers/ServiceWorker.cpp: Added. (WebCore::ServiceWorker::postMessage): (WebCore::ServiceWorker::~ServiceWorker): (WebCore::ServiceWorker::scriptURL const): (WebCore::ServiceWorker::state const): (WebCore::ServiceWorker::eventTargetInterface const): (WebCore::ServiceWorker::scriptExecutionContext const): * workers/ServiceWorker.h: Added. * workers/ServiceWorker.idl: Added. * workers/ServiceWorkerContainer.cpp: Added. (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer): (WebCore::ServiceWorkerContainer::controller const): (WebCore::ServiceWorkerContainer::ready): (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::getRegistration): (WebCore::ServiceWorkerContainer::getRegistrations): (WebCore::ServiceWorkerContainer::startMessages): (WebCore::ServiceWorkerContainer::eventTargetInterface const): (WebCore::ServiceWorkerContainer::scriptExecutionContext const): * workers/ServiceWorkerContainer.h: Added. * workers/ServiceWorkerContainer.idl: Added. * workers/ServiceWorkerGlobalScope.cpp: Added. (WebCore::ServiceWorkerGlobalScope::registration): (WebCore::ServiceWorkerGlobalScope::skipWaiting): * workers/ServiceWorkerGlobalScope.h: Added. * workers/ServiceWorkerGlobalScope.idl: Added. * workers/ServiceWorkerRegistration.cpp: Added. (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration): (WebCore::ServiceWorkerRegistration::installing): (WebCore::ServiceWorkerRegistration::waiting): (WebCore::ServiceWorkerRegistration::active): (WebCore::ServiceWorkerRegistration::scope const): (WebCore::ServiceWorkerRegistration::update): (WebCore::ServiceWorkerRegistration::unregister): (WebCore::ServiceWorkerRegistration::eventTargetInterface const): (WebCore::ServiceWorkerRegistration::scriptExecutionContext const): * workers/ServiceWorkerRegistration.h: Added. * workers/ServiceWorkerRegistration.idl: Added. 2017-08-03 Yoshiaki Jitsukawa [WebCore] Sort Xcode project files https://bugs.webkit.org/show_bug.cgi?id=175121 Reviewed by Antti Koivisto. * WebCore.xcodeproj/project.pbxproj: 2017-08-02 Sam Weinig [WebIDL] Convert MutationCallback to be a normal generated callback https://bugs.webkit.org/show_bug.cgi?id=174140 Reviewed by Darin Adler. To make this work more nicely, I: - Added the ability to for non-nullable interfaces in sequences to be passed via a Ref<> rather than a RefPtr<> as a parameter to a callback function. (e.g. callback MyCallback = void (sequence foos) will now have the signature, CallbackResult handleEvent(const Vector>&) rather than CallbackResult handleEvent(const Vector>&). - Added a new extended attribute for callback functions called [CallbackThisObject=Type] which allows you to specify that the callback needs a this object in addition to its arguments. When specified, the first argument of the C++ implementation function will now correspond to the this object, with the remaining arguments shifted over one. - Converted callback objects to all inherit directly from ActiveDOMCallback rather than having the generated JS callback derived class inherit from it. This allows us to have access to a callback's canInvokeCallback() function anywhere (needed for MutationCallback) as well as giving a place to put an optional virtual visitJSFunction to allow marking weak callbacks (while not an ideal layering, this matches what we do in EventListener). This change requires each callback to have a bit more code to import the ActiveDOMCallback's constructor and requires non-JS derived callbacks to pass a ScriptExecutionContext (e.g. the Document). * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMutationCallback.cpp: Removed. * bindings/js/JSMutationCallback.h: Removed. Remove custom JSMutationCallback.h/cpp * Modules/geolocation/PositionCallback.h: * Modules/geolocation/PositionErrorCallback.h: * Modules/notifications/NotificationPermissionCallback.h: * Modules/webaudio/AudioBufferCallback.h: * Modules/webdatabase/DatabaseCallback.h: * Modules/webdatabase/SQLStatementCallback.h: * Modules/webdatabase/SQLStatementErrorCallback.h: * Modules/webdatabase/SQLTransactionCallback.h: * Modules/webdatabase/SQLTransactionErrorCallback.h: * css/MediaQueryListListener.h: * dom/NodeFilter.h: * dom/RequestAnimationFrameCallback.h: * dom/StringCallback.h: * fileapi/BlobCallback.h: * html/VoidCallback.h: * page/IntersectionObserverCallback.h: * page/PerformanceObserverCallback.h: Add ActiveDOMCallback as a base class. Import the ActiveDOMCallback constructor. * Modules/mediastream/MediaDevicesRequest.cpp: (WebCore::MediaDevicesRequest::filterDeviceList): (WebCore::MediaDevicesRequest::start): * Modules/mediastream/MediaDevicesRequest.h: Change filterDeviceList to take a Vector of Refs. * bindings/IDLTypes.h: Add InnerParameterType and NullableInnerParameterType type hooks and specialize wrappers to use Ref for InnerParameterType, and RefPtr for NullableInnerParameterType. * bindings/js/JSCallbackData.cpp: * bindings/js/JSCallbackData.h: Add support for passing a this object and give JSCallbackDataWeak a visitJSFunction to allow marking the underlying function. * bindings/js/JSMutationObserverCustom.cpp: (WebCore::JSMutationObserver::visitAdditionalChildren): (WebCore::constructJSMutationObserver): Deleted. Remove the custom constructor and replace it with a custom visitAdditionalChildren that calls the new ActiveDOMObject's visitJSFunction. * bindings/scripts/CodeGenerator.pm: (ParseType): Add helper to parse a type and cache the result. * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackHeaderContent): (GenerateCallbackImplementationContent): (GetJSCallbackDataType): Deleted. - Add support for [CallbackThisObject]. When [CallbackThisObject] is not specified, use jsUndefined() as the this object as specified by WebIDL. - Stop inheriting from ActiveDOMCallback now that callbacks need to do this themselves. - Add a visitJSFunction override for weak callback functions which calls into the callback data. * bindings/scripts/IDLAttributes.json: Add [CallbackThisObject]. * bindings/scripts/IDLParser.pm: (ParseType): Add entry point to parse a single type. * css/FontFaceSet.h: Use Ref rather than RefPtr for the faces sequence. * dom/ActiveDOMCallback.h: (WebCore::ActiveDOMCallback::visitJSFunction): Add an optional visitJSFunction virtual function so that derived classes have a way of marking underlying function objects. * dom/MutationCallback.h: Convert to support generation (return a CallbackResult, inherit from ActiveDOMObject). * dom/MutationCallback.idl: Added. Added to generate the callback. Uses the new [CallbackThisObject]. * dom/MutationObserver.cpp: (WebCore::MutationObserver::deliver): Switch to call idiomatic handleEvent, and pass *this as the first parameter which will be translated into the this object. * dom/MutationObserver.h: (WebCore::MutationObserver::callback): Expose the callback so it can marked during GC. * dom/MutationObserver.idl: Remove CustomConstructor and replace it with a custom mark function. * dom/NativeNodeFilter.cpp: * dom/NativeNodeFilter.h: * inspector/InspectorDatabaseAgent.cpp: Pass now needed ScriptExecutionContext to non-js based callbacks. * bindings/scripts/test/JS/JSTestCallbackFunction.cpp: * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp: * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added. * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added. * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp: * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: Added. * bindings/scripts/test/TestCallbackInterface.idl: Add/update tests. 2017-08-03 Jeremy Jones Use MPAVRoutingController instead of deprecated versions. https://bugs.webkit.org/show_bug.cgi?id=175063 Reviewed by Tim Horton. No new tests because no behavior change. This uses a different platform class to present an interface. Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet Add MPMediaControlsViewController. * platform/spi/ios/MediaPlayerSPI.h: 2017-08-03 Chris Dumez Improve our support for referrer policies https://bugs.webkit.org/show_bug.cgi?id=175069 Reviewed by Darin Adler. Improve our support for referrer policies. In particular, we now support the additional following ones: "same-origin", "origin-when-cross-origin" and "strict-origin-when-cross-origin". This is as per the following specification: - https://www.w3.org/TR/referrer-policy/#referrer-policies Also refactor the code a bit for clarity: I merged the ReferrerPolicy enum and the FetchOptions::ReferrerPolicy one. Tests: http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy/origin-when-cross-origin/same-origin.html http/tests/referrer-policy/same-origin/cross-origin-http-http.html http/tests/referrer-policy/same-origin/cross-origin-http.https.html http/tests/referrer-policy/same-origin/same-origin.html http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html http/tests/referrer-policy/strict-origin/cross-origin-http-http.html http/tests/referrer-policy/strict-origin/cross-origin-http.https.html http/tests/referrer-policy/strict-origin/same-origin.html * Modules/fetch/FetchLoader.cpp: (WebCore::FetchLoader::start): * Modules/fetch/FetchReferrerPolicy.h: * Modules/fetch/FetchReferrerPolicy.idl: * Modules/fetch/FetchRequest.h: * Modules/fetch/FetchRequestInit.h: * dom/Document.cpp: (WebCore::Document::processReferrerPolicy): (WebCore::Document::applyQuickLookSandbox): (WebCore::Document::applyContentDispositionAttachmentSandbox): * dom/Document.h: * loader/FetchOptions.h: * loader/FrameNetworkingContext.h: * loader/PingLoader.cpp: (WebCore::PingLoader::sendBeacon): Drop explicit call to SecurityPolicy::shouldHideReferrer(). This is already called inside SecurityPolicy::generateReferrerHeader() and used only when needed, depending on the actual referrer policy. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::updateHTTPRequestHeaders): * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders): * page/SecurityPolicy.cpp: (WebCore::referrerToOriginString): (WebCore::SecurityPolicy::generateReferrerHeader): * page/SecurityPolicy.h: * platform/ReferrerPolicy.h: 2017-08-03 Daniel Bates Support ::marker pseudo-element https://bugs.webkit.org/show_bug.cgi?id=141477 Reviewed by David Hyatt. Implements the ::marker pseudo element as per the CSS Pseudo-Element Module Level 4 spec., (Editor's Draft, 24 July 2017). The ::marker pseudo element is a convenience pseudo element that allows a person to style the appearance of a list item marker. For example, to render all list item markers in bolded, blue text you would define a stylesheet with the following content: li::marker { color: blue; font-weight: bold; } and this could be applied to a page that contains markup of the form:
  1. Item 1
  2. Item 2
  3. ...
  4. Item N-1
  5. Item N
Formerly to the achieve the same effect you would need to use a stylesheet of the form: li { color: blue; font-weight: bold; } .list-item-content { all: initial; } and then write your markup to have the form:
  1. Item 1
  2. Item 2
  3. ...
  4. Item N-1
  5. Item N
The ::marker pseudo element only supports stylizing all font properties and the color property of a list item marker. Tests: fast/lists/list-marker-with-display.html http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements.html http/wpt/css/css-pseudo-4/marker-color.html http/wpt/css/css-pseudo-4/marker-font-properties.html http/wpt/css/css-pseudo-4/marker-inherit-values.html * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Return the pseudo id for the ::marker pseudo element. * css/CSSSelector.h: Add enumerator PseudoElementMarker to the pseudo element enum. * css/RuleSet.cpp: (WebCore::determinePropertyWhitelistType): Return whitelist type PropertyWhitelistMarker for ::marker so that we match rules against the acceptable rules for ::marker. * css/RuleSet.h: Add enumerator PropertyWhitelistMarker to the property whitelist type enum. * css/SelectorPseudoElementTypeMap.in: Add "marker" to the list of pseudo element types. * css/StyleResolver.cpp: (WebCore::isValidMarkerStyleProperty): Determines if the specified CSS property is valid inside ::marker. (WebCore::StyleResolver::CascadedProperties::addMatch): Only recognize CSS properties in the content block of ::marker that match the ::marker whitelist policy. * rendering/RenderListItem.cpp: (WebCore::RenderListItem::computeMarkerStyle): Computes the style object for the list item marker. We apply the user-agent style to the marker here as opposed to defining ::marker in the UA sheet as per the spec. as an optimization to avoid having the style resolver apply the pseudo element to all elements. For now, we always inherit style from the originating element (list item). Added FIXME to selectively inherit styles. (WebCore::RenderListItem::styleDidChange): Always apply the list marker style to the list marker renderer. * rendering/RenderListItem.h: * rendering/style/RenderStyleConstants.h: Add pseudo ID for the ::marker pseudo element. 2017-08-03 Antti Koivisto Factor common code in Style::*ChangeInvalidation into helper functions https://bugs.webkit.org/show_bug.cgi?id=174312 Reviewed by Andreas Kling. There is a lot of copy code here. * Style/StyleInvalidationFunctions.h: Added. (WebCore::Style::traverseRuleFeaturesInShadowTree): (WebCore::Style::traverseRuleFeaturesForSlotted): (WebCore::Style::traverseRuleFeatures): Add functions for traversing rule features that may affect style of an element. Use lambdas to implement client-specific behavior. * WebCore.xcodeproj/project.pbxproj: * style/AttributeChangeInvalidation.cpp: (WebCore::Style::mayBeAffectedByAttributeChange): (WebCore::Style::AttributeChangeInvalidation::invalidateStyle): (WebCore::Style::mayBeAffectedByHostRules): Deleted. (WebCore::Style::mayBeAffectedBySlottedRules): Deleted. * style/ClassChangeInvalidation.cpp: (WebCore::Style::ClassChangeInvalidation::invalidateStyle): (WebCore::Style::mayBeAffectedByHostRules): Deleted. (WebCore::Style::mayBeAffectedBySlottedRules): Deleted. * style/IdChangeInvalidation.cpp: (WebCore::Style::IdChangeInvalidation::invalidateStyle): (WebCore::Style::mayBeAffectedByHostRules): Deleted. (WebCore::Style::mayBeAffectedBySlottedRules): Deleted. 2017-08-03 Zan Dobersek [EME] CDM constructor assigns CDMPrivate member multiple times https://bugs.webkit.org/show_bug.cgi?id=175128 Reviewed by Xabier Rodriguez-Calvar. In the CDM class constructor, iterate over the registered CDM factories, finding one that supports the specified key system. A CDMPrivate object is created through that factory, and the iteration is now stopped at that point, while previously it contined to potentially create CDMPrivate objects through other factories. Helper createCDMPrivateForKeySystem() function is removed. * Modules/encryptedmedia/CDM.cpp: (WebCore::CDM::CDM): (WebCore::createCDMPrivateForKeySystem): Deleted. 2017-08-03 Emilio Cobos Álvarez Don't always recalc the style of display: contents elements. https://bugs.webkit.org/show_bug.cgi?id=172753 Reviewed by Antti Koivisto. No new tests (no functionality change). This only removes an inefficiency. * dom/Element.cpp: (WebCore::Element::existingComputedStyle): * dom/Element.h: * style/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateRenderTree): (WebCore::RenderTreeUpdater::updateElementRenderer): * style/StyleTreeResolver.cpp: (WebCore::Style::renderOrDisplayContentsStyle): (WebCore::Style::TreeResolver::resolveElement): (WebCore::Style::TreeResolver::createAnimatedElementUpdate): (WebCore::Style::shouldResolveElement): (WebCore::Style::TreeResolver::resolveComposedTree): 2017-08-02 Devin Rousso Web Inspector: add stack trace information for each RecordingAction https://bugs.webkit.org/show_bug.cgi?id=174663 Reviewed by Joseph Pecoraro. Tests: inspector/canvas/recording-2d.html inspector/model/recording.html * inspector/InspectorCanvas.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::indexForData): (WebCore::InspectorCanvas::buildAction): 2017-08-02 Yusuke Suzuki Merge WTFThreadData to Thread::current https://bugs.webkit.org/show_bug.cgi?id=174716 Reviewed by Mark Lam. Use Thread::current() instead. * fileapi/AsyncFileStream.cpp: * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/graphics/cocoa/WebCoreDecompressionSession.h: * platform/ios/wak/WebCoreThread.mm: (StartWebThread): * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): 2017-08-02 Sam Weinig Fix crashes in GC creating a document fragment on a background thread https://bugs.webkit.org/show_bug.cgi?id=175111 Reviewed by Chris Dumez. r220095 (https://webkit.org/b/175006) change JSHTMLTemplateElement from using a private name + property to manager the lifetime of the reference DocumentFragment to using the idiomatic visitAdditionalChildren. Unfortunately, the function to access the DocumentFragment lazily creates it. If this lazy creation happens on a GC thread, badness ensues. This introduces an accessor that returns the DocumentFragment if it has been created or null if it has not. * bindings/js/JSHTMLTemplateElementCustom.cpp: (WebCore::JSHTMLTemplateElement::visitAdditionalChildren): * html/HTMLTemplateElement.cpp: (WebCore::HTMLTemplateElement::contentIfAvailable): * html/HTMLTemplateElement.h: 2017-08-02 Sam Weinig [WebIDL] Simplify [EnabledBySettings] extended attribute code to not require passing a global object to finishCreation https://bugs.webkit.org/show_bug.cgi?id=175087 Reviewed by Chris Dumez. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): (GeneratePrototypeDeclaration): Remove unnecessary passing of the global object to finishCreation for [EnabledBySettings]. * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: * bindings/scripts/test/JS/JSTestNode.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: Update tests. 2017-08-02 Andy Estes REGRESSION (r207155): Unable to switch sheets when previewing Numbers '09 spreadsheets https://bugs.webkit.org/show_bug.cgi?id=175098 Reviewed by Daniel Bates. r207155 enabled sandboxing on the frame displaying a QuickLook preview. This restricted frames within the sandbox from navigating their sandboxed siblings or ancestors, which breaks the functionality of multi-sheet Numbers '09 spreadsheet previews. These previews contain a frameset with a table of contents frame and a content frame, and the table of contents frame needs to be able to navigate the content frame when the sheet selection changes. Fix this by disabling the SandboxNavigation flag in the QuickLook sandbox. Frames within the sandbox will be able to navigate each other, but will not be able to navigate the top frame (due to SandboxTopNavigation still being enabled), nor will they be able to navigate any other ancestor frame outside the sandbox (due to QuickLook previews being in a different origin than the hosting frame). These two cases are covered by existing tests. Test: quicklook/multi-sheet-numbers-09.html * dom/Document.cpp: (WebCore::Document::applyQuickLookSandbox): Added a call to disableSandboxFlags(SandboxNavigation) after applying the content security policy. * dom/SecurityContext.h: (WebCore::SecurityContext::disableSandboxFlags): Defined disableSandboxFlags(). 2017-08-02 Jer Noble [MSE] Removing samples when presentation order does not match decode order can cause bad behavior. https://bugs.webkit.org/show_bug.cgi?id=175091 Reviewed by Eric Carlson. Address follow-up comments to r219519. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::removeCodedFrames): 2017-08-02 Jeremy Jones Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically https://bugs.webkit.org/show_bug.cgi?id=175080 Reviewed by Jon Lee. No new tests because this only removes unused code. This is obsolete because of the alternate solution in https://bugs.webkit.org/show_bug.cgi?id=174850 * page/Settings.in: 2017-08-02 Filip Pizlo GPUBuffer::length() should return the size of the array buffer backing the GPU buffer, not the rounded-up GPU buffer length https://bugs.webkit.org/show_bug.cgi?id=175079 Reviewed by Simon Fraser. This fixes a failure in the GPU.BufferCreate unit test. The problem is that in order to have a Metal buffer wrap memory we allocated, we have to tell Metal that the memory is page-aligned. This means that the Metal buffer reports back a page-aligned size, which is different than what the test expected. It seems that it's most convenient for our GPUBuffer class to return the unaligned length, rather than the aligned length. This is just a simple matter of returning the length from the ArrayBuffer rather than the Metal buffer. This fixes the unit test and is probably more sensible for actual users of this class, since the page alignment of the length is a goofy implementation detail. * platform/graphics/cocoa/GPUBufferMetal.mm: (WebCore::GPUBuffer::length const): 2017-08-01 Brian Burg HTML file input elements do not support file extensions in the "accept" attribute https://bugs.webkit.org/show_bug.cgi?id=95698 Reviewed by Darin Adler. Serialize the accepted file extensions so they can be accessed in the UI process. * platform/FileChooser.h: * platform/FileChooser.cpp: (WebCore::FileChooser::invalidate): Modernize. (WebCore::FileChooserSettings::acceptTypes const): Deleted. This is dead code, it was only used by Chromium. 2017-08-02 Fujii Hironori Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName https://bugs.webkit.org/show_bug.cgi?id=175010 Reviewed by Alex Christensen. No new tests because no behavior change. Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed. * contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::isValidCSSSelector): Call QualifiedName::init(). * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp. * dom/QualifiedName.cpp: (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct instead of placement new. * dom/QualifiedName.h: Use LazyNeverDestroyed. 2017-08-01 Joseph Pecoraro CFString leak dragging an image - allocation under PlatformPasteboard::writeObjectRepresentations https://bugs.webkit.org/show_bug.cgi?id=175064 Reviewed by Tim Horton. * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::writeObjectRepresentations): Adopt a created string into the RetainPtr. * platform/ios/WebItemProviderPasteboard.h: * platform/ios/WebItemProviderPasteboard.mm: (-[WebItemProviderRegistrationInfoList dealloc]): Release suggestedName and switch from -strong to -copy. 2017-08-01 Chris Dumez Unreviewed, update Beacon API status to "In Development". * features.json: 2017-08-01 Chris Dumez Add initial support for navigator.sendBeacon https://bugs.webkit.org/show_bug.cgi?id=175007 Reviewed by Sam Weinig. Add initial support for navigator.sendBeacon behind an experimental feature runtime flag. The specification is available at: - https://w3c.github.io/beacon/ The current implementation supports sending beacons with all types of payloads except for ReadableStream. Some functionality is incomplete and will be taken care of in follow-up patches: - Support for CORS preflight for the cases where it is required. We currently return false and do not send the beacon in such cases. - Better support for redirects. - Use a more power-friendly network priority for beacon requests. Tests: http/tests/blink/sendbeacon/* http/tests/security/mixedContent/beacon/insecure-beacon-in-iframe.html http/wpt/beacon/* imported/blink/fast/beacon/* imported/w3c/web-platform-tests/beacon/* * CMakeLists.txt: * DerivedSources.make: * Modules/beacon/NavigatorBeacon.cpp: Added. (WebCore::NavigatorBeacon::sendBeacon): * Modules/beacon/NavigatorBeacon.h: Added. * Modules/beacon/NavigatorBeacon.idl: Added. * WebCore.xcodeproj/project.pbxproj: * loader/PingLoader.cpp: (WebCore::PingLoader::sendBeacon): * loader/PingLoader.h: 2017-08-01 Filip Pizlo Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region) https://bugs.webkit.org/show_bug.cgi?id=174727 Reviewed by Mark Lam. No new tests because no change in behavior. Needed to teach Metal how to allocate in the Gigacage. * platform/graphics/cocoa/GPUBufferMetal.mm: (WebCore::GPUBuffer::GPUBuffer): (WebCore::GPUBuffer::contents): 2017-08-01 Fujii Hironori [WinCairo] Implement Font::platformBoundsForGlyph https://bugs.webkit.org/show_bug.cgi?id=174813 Reviewed by Alex Christensen. Test: fast/text/emphasis.html * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::Font::platformBoundsForGlyph): Implemented by copying the code from Font::boundsForGDIGlyph(). 2017-08-01 Zalan Bujtas REGRESSION (r217197): New Yorker website hangs for a long time on load, lots of blank tiles https://bugs.webkit.org/show_bug.cgi?id=175009 Reviewed by Simon Fraser. This patch ensures that we report the desktop, non-frame-flattened frame size for media queries in subframes. Some websites don't expect the iframes to be expanded to the size of the content and when the media query callback mutates the content (triggering frame resize), they might end up getting into a never ending layout. Test: fast/frames/flattening/media-query-growing-content.html * css/MediaQueryEvaluator.cpp: (WebCore::orientationEvaluate): (WebCore::aspectRatioEvaluate): (WebCore::heightEvaluate): (WebCore::widthEvaluate): * page/FrameView.cpp: (WebCore::FrameView::layout): (WebCore::FrameView::layoutSizeForMediaQuery const): (WebCore::FrameView::evaluateMediaQueryList): * page/FrameView.h: 2017-07-26 Jiewen Tan Add tests to detect mistakes in backward compatibility when the structured clone algorithm is changed in the future https://bugs.webkit.org/show_bug.cgi?id=173998 Reviewed by Darin Adler. * bindings/js/SerializedScriptValue.cpp: Add a comment. 2017-08-01 Matt Lewis Unreviewed, rolling out r220089. This caused multiple crashes on macOS Debug testers. Reverted changeset: "Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName" https://bugs.webkit.org/show_bug.cgi?id=175010 http://trac.webkit.org/changeset/220089 2017-08-01 Sam Weinig [WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement https://bugs.webkit.org/show_bug.cgi?id=175006 Reviewed by Chris Dumez. Use the standard way of augmenting GC, visitAdditionalChildren, rather than using a private name to create ownership. * bindings/js/JSHTMLTemplateElementCustom.cpp: (WebCore::JSHTMLTemplateElement::visitAdditionalChildren): (WebCore::JSHTMLTemplateElement::content const): Deleted. * html/HTMLTemplateElement.idl: 2017-08-01 Zan Dobersek [GCrypt] Gather crypto constants in a single location https://bugs.webkit.org/show_bug.cgi?id=174091 Reviewed by Jiewen Tan. Gather common constants used across the libgcrypt-specific Web Crypto implementations in a single place -- in the GCryptUtilities.h header, inside the CryptoConstants namespace. The various ASN.1 object identifiers and other helper values are placed inside, in the std::array container. Additionally, CryptoConstants::matches() helper function is provided. It compares the provided data-and-size pair with the given std::array container and returns true if the std::memcmp() call returns 0. Changes in CryptoKeyEC and CryptoKeyRSA consist mostly of switching to the use of CryptoConstants::matches() and the CryptoConstants data arrays, as well as some whitespace cleanup. Additionallity in CryptoKeyEC, the helper functions covering various curve attributes are reordered, renamed and reorganized for simplicity. No new tests -- no changes in behavior. * crypto/gcrypt/CryptoKeyECGCrypt.cpp: (WebCore::curveIdentifier): (WebCore::curveSize): (WebCore::curveUncompressedFieldElementSize): (WebCore::curveUncompressedPointSize): (WebCore::CryptoKeyEC::platformImportRaw): (WebCore::CryptoKeyEC::platformImportJWKPublic): (WebCore::CryptoKeyEC::platformImportJWKPrivate): (WebCore::supportedAlgorithmIdentifier): (WebCore::curveForIdentifier): (WebCore::CryptoKeyEC::platformImportSpki): (WebCore::CryptoKeyEC::platformExportRaw): (WebCore::CryptoKeyEC::platformAddFieldElements): (WebCore::CryptoKeyEC::platformExportSpki): (WebCore::CryptoKeyEC::platformExportPkcs8): (WebCore::uncompressedPointSizeForCurve): Deleted. (WebCore::uncompressedFieldElementSizeForCurve): Deleted. * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: (WebCore::supportedAlgorithmIdentifier): (WebCore::CryptoKeyRSA::importPkcs8): (WebCore::CryptoKeyRSA::exportSpki): (WebCore::CryptoKeyRSA::exportPkcs8): * crypto/gcrypt/GCryptUtilities.h: (WebCore::CryptoConstants::matches): 2017-07-31 Fujii Hironori Use LazyNeverDestroyed instead of DEFINE_GLOBAL for MediaFeatureNames https://bugs.webkit.org/show_bug.cgi?id=175008 Reviewed by Alex Christensen. No new tests because no behavior change. Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed. * css/MediaFeatureNames.cpp: (WebCore::MediaFeatureNames::init): Do not include . Use LazyNeverDestroyed instead of DEFINE_GLOBAL. Call LazyNeverDestroyed::construct instead of placement new. * css/MediaFeatureNames.h: Use LazyNeverDestroyed. * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::evaluate const): Dereference with ->. 2017-07-31 Fujii Hironori Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName https://bugs.webkit.org/show_bug.cgi?id=175010 Reviewed by Alex Christensen. No new tests because no behavior change. Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed. * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp. * dom/QualifiedName.cpp: (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct instead of placement new. * dom/QualifiedName.h: Use LazyNeverDestroyed. 2017-07-31 Matt Rajca Support quirk for letting media autoplay if the user interacted with at least one media element. https://bugs.webkit.org/show_bug.cgi?id=175005 Reviewed by Eric Carlson. If the user has interacted with at least one media element, let other media elements auto-play as a quirk. * dom/Document.cpp: (WebCore::Document::updateIsPlayingMedia): * dom/Document.h: (WebCore::Document::noteUserInteractionWithMediaElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): * html/MediaElementSession.cpp: (WebCore::needsDocumentLevelMediaUserGestureQuirk): (WebCore::MediaElementSession::playbackPermitted const): * page/MediaProducer.h: 2017-07-31 Nan Wang AX: CFEqual is failing on text markers with exact same data https://bugs.webkit.org/show_bug.cgi?id=175002 Reviewed by Chris Fleizach. We should zero the memory of the TextMarkerData instance so that it can be tested for byte-equivalence. Made sure this change won't break any of the existing tests. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl): 2017-07-28 Matt Rajca Propagate user gesture tokens when script elements are loaded. https://bugs.webkit.org/show_bug.cgi?id=174959 Reviewed by Eric Carlson. Propagate user gesture tokens when script elements are loaded (i.e. between the time an element is created and its onload handler is invoked). * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator): (WebCore::ScriptElement::executeScriptAndDispatchEvent): (WebCore::ScriptElement::executePendingScript): * dom/ScriptElement.h: 2017-07-31 Matt Lewis Unreviewed, rolling out r220048. This revision caused multiple crashes in fast/images. See webkit.org/b/174990 Reverted changeset: "RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available" https://bugs.webkit.org/show_bug.cgi?id=174874 http://trac.webkit.org/changeset/220048 2017-07-31 Sam Weinig Remove unnecessary exceptions from storage code https://bugs.webkit.org/show_bug.cgi?id=174572 Reviewed by Chris Dumez. Remove checks for canAccessStorage() and the exceptions they would cause. These were used for Storage in ephemeral sessions, but they are now supported. Add checks for a null frame to functions that can mutate the storage, as the frame is needed for that, and it retains our existing behavior for disconnected frames. By removing these checks / exceptions, we can fully generate Storage.idl. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSStorageCustom.cpp: Removed. Remove JSStorageCustom.cpp * loader/EmptyClients.cpp: * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): * storage/StorageArea.h: Remove canAccessStorage. * storage/Storage.cpp: (WebCore::Storage::length): (WebCore::Storage::key): (WebCore::Storage::getItem): (WebCore::Storage::setItem): (WebCore::Storage::removeItem): (WebCore::Storage::clear): (WebCore::Storage::contains): (WebCore::Storage::isSupportedPropertyName): (WebCore::Storage::supportedPropertyNames): * storage/Storage.h: * storage/Storage.idl: Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames to allow the removal of the [CustomGetOwnPropertyNames]. 2017-07-31 Matt Lewis Unreviewed, rolling out r220060. This broke our internal builds. Contact reviewer of patch for more information. Reverted changeset: "Merge WTFThreadData to Thread::current" https://bugs.webkit.org/show_bug.cgi?id=174716 http://trac.webkit.org/changeset/220060 2017-07-31 Yusuke Suzuki Merge WTFThreadData to Thread::current https://bugs.webkit.org/show_bug.cgi?id=174716 Reviewed by Sam Weinig. Use Thread::current() instead. * fileapi/AsyncFileStream.cpp: * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/graphics/cocoa/WebCoreDecompressionSession.h: * platform/ios/wak/WebCoreThread.mm: (StartWebThread): * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): 2017-07-31 Xabier Rodriguez Calvar Created a bool pretty printer at WTF for debugging purposes https://bugs.webkit.org/show_bug.cgi?id=174893 Reviewed by Darin Adler. Use WTF::boolPrettyPrinter in debugging messages. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::seek): 2017-07-30 Zan Dobersek Unreviewed. Suppress the -Wextra compiler warning when building with GCC 6.3.0, explicitly initializing the RefCounted<> base class in the FetchHeaders(const FetchHeaders&) constructor. Note that while that's the signature of the copy constructor for the FetchHeaders class, the base RefCounted<> class is not copyable, so the default RefCounted<> constructor is used, but the FetchHeaders resources are normally copied into the new object from the one that's passed in. * Modules/fetch/FetchHeaders.h: (WebCore::FetchHeaders::FetchHeaders): 2017-07-30 Darin Adler Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout https://bugs.webkit.org/show_bug.cgi?id=130653 Reviewed by Antti Koivisto. Also fixes a bug where load events are delivered prematurely in some cases when an object, embed, frame, or iframe element is still loading. * dom/Document.cpp: (WebCore::Document::loadEventDelayTimerFired): Added a call to FrameLoader::checkLoadComplete. Goes along with the change to FrameLoader::checkLoadCompleteForThisFrame, which now respects the isDelayingLoadEvent flag. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::HTMLAppletElement): Removed the createdByParser argument, no longer needed by the base class. (WebCore::HTMLAppletElement::create): Added call to finishCreating, which is now part of the process of creating any object in a class derived from HTMLPlugInImageElement. (WebCore::HTMLAppletElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate is only called when it's becoming false; avoids a false/true/false round trip that can cause trouble. * html/HTMLAppletElement.h: Updated for the above. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::HTMLEmbedElement): Removed the createdByParser argument, no longer needed by the base class. (WebCore::HTMLEmbedElement::create): Added call to finishCreating, which is now part of the process of creating any object in a class derived from HTMLPlugInImageElement. (WebCore::HTMLEmbedElement::parseAttribute): Changed srcAttr to call updateImageLoaderWithNewURLSoon to do the image loading logic. (WebCore::HTMLEmbedElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate is only called when it's becoming false; avoids a false/true/false round trip that can cause trouble. * html/HTMLEmbedElement.h: Updated for the above. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setReadyState): Call setShouldDelayLoadEvent(false) when transitioning to HAVE_CURRENT_DATA (or beyond), even if we have already fired a loadeddata event in the past. This matches what the HTML specification calls for, but only if you read it carefully. Without this change, and with the more complete implementation of load event delay below, one of the regression tests hangs because are permanently stuck dealying load events. Also added a FIXME about other code that likely has a similar problem; the symptom is likely to be subtle and minor, though. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::HTMLObjectElement): Removed the createdByParser argument, no longer needed by the base class. (WebCore::HTMLObjectElement::create): Added call to finishCreating, which is now part of the process of creating any object in a class derived from HTMLPlugInImageElement. (WebCore::HTMLObjectElement::parseAttribute): Changed dataAttr to use updateImageLoaderWithNewURLSoon. Explicitly call scheduleUpdateForAfterStyleResolution since just calling invalidateStyleAndRenderersForSubtree alone is no longer sufficient. (WebCore::HTMLObjectElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate is only called when it's becoming false; avoids a false/true/false round trip that can cause trouble. (WebCore::HTMLObjectElement::childrenChanged): Added calls to the new scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient. (WebCore::HTMLObjectElement::renderFallbackContent): Remove the call to updateStyleIfNeeded. This is the main change that the title of this bug refers to. * html/HTMLObjectElement.h: Updated for the above. Also removed the clearUseFallbackContent function because it's clearer to set the data member in line at the single call site in HTMLObjectElement::parseAttribute. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Removed the createdByParser argument; no need to set an m_needsWidgetUpdate flag differently for parser cases now. (WebCore::HTMLPlugInImageElement::finshCreating): Added. To be called after creating an element to do work that can't be done in a constructor. (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new scheduleUpdateForAfterStyleResolution function. (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base class; cleans things up, even though it's just an assertion. (WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed the call to setNeedsWidgetUpdate(true) here; no longer needed because the new logic already does the right thing in this case. (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): Deleted. Now handled by updateAfterStyleResolution instead. (WebCore::HTMLPlugInImageElement::finishParsingChildren): Deleted. Handling updates after parsing all the children now comes naturally out of the new implementation. (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added. Schedules a call to updateAfterStyleResolution when needed, and equally importantly, increments the load event delay count to make sure that loads that are part of that update can participate in decision about whether it's time for the load event. (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added. Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new m_needsImageReload boolean in cases where no actual loading is done. (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Update load event delay count when moving an element that is in the middle of loading. This lets the updateAfterStyleResolution function do the right thing even when the element is moved without leaving anything stuck in a strange state. (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension): Call the new scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient. (WebCore::HTMLPlugInImageElement::startLoadingImage): Deleted. Now handled by updateAfterStyleResolution instead. (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Added. Does all the right things for when an image URL is changed; for use by the concrete derived classes. * html/HTMLPlugInImageElement.h: Updated for above changes. Also made m_imageLoader private rather than protected, and added the two new boolean data members. * html/HTMLTagNames.in: Removed unneeded constructorNeedsCreatedByParser flags for applet, embed, and object. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): Return true if the document is delaying a load event. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Don't do any work if isDelayingLoadEvent is true; otherwise this function can have a side effect of triggering the load event. (WebCore::FrameLoader::detachFromParent): Schedule a checkLoadComplete here, too, not just a checkCompleted. This is relevant if the frame we are detaching was delaying a load event because it no longer will be and so the load might be complete. 2017-07-30 Sam Weinig [WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobalScopeFetch https://bugs.webkit.org/show_bug.cgi?id=174974 Reviewed by Darin Adler. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * Modules/fetch/DOMWindowFetch.js: Removed. * Modules/fetch/FetchRequest.js: Removed. * Modules/fetch/WorkerGlobalScopeFetch.js: Removed. Remove builtin files. * Modules/fetch/DOMWindowFetch.cpp: (WebCore::DOMWindowFetch::fetch): * Modules/fetch/DOMWindowFetch.h: * Modules/fetch/DOMWindowFetch.idl: * Modules/fetch/WorkerGlobalScopeFetch.cpp: (WebCore::WorkerGlobalScopeFetch::fetch): * Modules/fetch/WorkerGlobalScopeFetch.h: * Modules/fetch/WorkerGlobalScopeFetch.idl: Remove builtin and instead create FetchRequest in the implementation. * Modules/fetch/FetchBody.cpp: (WebCore::FetchBody::extract): * Modules/fetch/FetchBody.h: * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::extractBody): * Modules/fetch/FetchBodyOwner.h: * Modules/fetch/FetchResponse.cpp: * Modules/fetch/FetchResponse.h: Rename FetchBody::BindingDataType to FetchBody::Init to match its IDL naming. * Modules/fetch/FetchHeaders.cpp: (WebCore::appendToHeaderMap): (WebCore::fillHeaderMap): (WebCore::FetchHeaders::create): (WebCore::FetchHeaders::fill): * Modules/fetch/FetchHeaders.h: Add helpers to implement the fill algorithm for various input types. Leave the existing fill for now, as it is still used by the FetchResponse builtin, but will eventually be removed. * Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::initializeOptions): (WebCore::FetchRequest::initializeWith): (WebCore::FetchRequest::setBody): (WebCore::FetchRequest::create): (WebCore::FetchRequest::setBodyFromInputRequest): Deleted. * Modules/fetch/FetchRequest.h: Migrate builtin code to the implementation. This is 1-to-1 re-implementation, so I did not attempt to fix any conformance issues. That will come in follow up. * Modules/fetch/FetchRequest.idl: Replace builtins with an IDL constructor. * Modules/fetch/FetchRequestInit.h: * Modules/fetch/FetchRequestInit.idl: Add missing headers and body to FetchRequestInit. 2017-07-30 Said Abou-Hallawa RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available https://bugs.webkit.org/show_bug.cgi?id=174874 Reviewed by Darin Adler. If an element has image content data for a none cached image, e.g. -webkit-named-image, RenderImageResourceStyleImage will be created and attached to the RenderImage. RenderImageResourceStyleImage::m_cachedImage will be set to null because the m_styleImage->isCachedImage() is false in this case. When ImageLoader finishes loading the url of the src attribute, RenderImageResource::setCachedImage() will be called to set m_cachedImage. A crash will happen when the RenderImage is destroyed. Destroying the RenderImage calls RenderImageResourceStyleImage::shutdown() which checks m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image() which ends up calling CSSNamedImageValue::image() which returns a null pointer because the size is empty. RenderImageResourceStyleImage::shutdown() calls image()->stopAnimation() without checking the return value of image(). Like the base class virtual method RenderImageResource::image(), RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available. Test: fast/images/image-element-image-content-data.html * css/CSSCrossfadeValue.cpp: * css/CSSFilterImageValue.cpp: * page/EventHandler.cpp: * page/PageSerializer.cpp: * rendering/RenderElement.cpp: * rendering/RenderImageResource.cpp: * rendering/RenderImageResourceStyleImage.cpp: (WebCore::RenderImageResourceStyleImage::initialize): (WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes of r208511 in this function. Add a call to image()->stopAnimation() without checking the return of image() since it will return the nullImage() if the image not available. There is no need to check m_cachedImage before calling image() because image() does not check or access m_cachedImage. (WebCore::RenderImageResourceStyleImage::image): The base class method RenderImageResource::image() returns the nullImage() if the image not available. This is because CachedImage::imageForRenderer() returns the nullImage() if the image is not available; see CachedImage.h. We should do the same for the derived class for consistency. * rendering/style/ContentData.cpp: * rendering/style/StyleCachedImage.cpp: * style/StylePendingResources.cpp: 2017-07-29 Filip Pizlo Unreviewed, rollout r220044 because it set the bots on fire. It seems that the "-Wunguarded-availability-new" pragma is not widely supported. So, a bunch of the Mac bots are now unable to build and that includes EWS. Fixing by rolling it out. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (-[WebAVSampleBufferErrorListener beginObservingRenderer:]): (-[WebAVSampleBufferErrorListener stopObservingRenderer:]): (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]): (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): (WebCore::SourceBufferPrivateAVFObjC::flush): 2017-07-29 Dan Bernstein Fixed building for macOS 10.12 with the macOS 10.13 SDK. Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available starting in that release, they have been available as SPI earlier. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (-[WebAVSampleBufferErrorListener beginObservingRenderer:]): (-[WebAVSampleBufferErrorListener stopObservingRenderer:]): (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]): (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): (WebCore::SourceBufferPrivateAVFObjC::flush): 2017-07-29 Nan Wang AX: findMatchingObjects doesn't work when the startObject is ignored https://bugs.webkit.org/show_bug.cgi?id=174965 Reviewed by Chris Fleizach. findMatchingObjects would return a wrong element if we pass in an ignored start object. To fix this, we should use the closest accessible sibling as the start object. Test: accessibility/mac/search-predicate-from-ignored-element.html * accessibility/AccessibilityObject.cpp: (WebCore::appendChildrenToArray): 2017-07-29 Aaron Chu AX: FKA: Buttons need a visible focus indicator https://bugs.webkit.org/show_bug.cgi?id=171040 Reviewed by Antoine Quint. Added a background color for the focus state of the icon buttons in modern media controls. Test: media/modern-media-controls/button/button-focus-state.html * Modules/modern-media-controls/controls/button.css: (button:focus): (button:focus > picture): * Modules/modern-media-controls/controls/slider.css: (.slider > input): 2017-07-28 Sam Weinig [WebIDL] Remove JS builtin bindings for FetchHeaders https://bugs.webkit.org/show_bug.cgi?id=174905 Reviewed by Alex Christensen. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * Modules/fetch/FetchHeaders.js: Removed. Remove FetchHeaders.js * Modules/fetch/FetchHeaders.cpp: (WebCore::appendToHeaderMap): (WebCore::FetchHeaders::create): (WebCore::FetchHeaders::append): * Modules/fetch/FetchHeaders.h: (WebCore::FetchHeaders::FetchHeaders): Add create function for generated constructor. Add appendToHeaderMap static function which takes the functionality from the existing append function, and makes it useable in create. * Modules/fetch/FetchHeaders.idl: Replace [JSBuiltinConstructor] with real constructor. Keep other builtin attributes as they are still used by other Fetch code. * bindings/js/JSDOMConvertRecord.h: Fix record conversion to work with proxies by changing to use the method table for getOwnPropertyNames, and undefined values by not excluding undefined values. 2017-07-28 Matt Baker Web Inspector: capture an async stack trace when web content calls addEventListener https://bugs.webkit.org/show_bug.cgi?id=174739 Reviewed by Brian Burg. Test: inspector/debugger/async-stack-trace.html Add instrumentation to EventTarget to support showing asynchronous stack traces when the debugger breaks in a script event listener. * dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::fireEventListeners): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didAddEventListenerImpl): (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl): (WebCore::InspectorInstrumentation::willHandleEventImpl): (WebCore::InspectorInstrumentation::didHandleEventImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didAddEventListener): (WebCore::InspectorInstrumentation::willRemoveEventListener): (WebCore::InspectorInstrumentation::willHandleEvent): (WebCore::InspectorInstrumentation::didHandleEvent): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData): (WebCore::PageDebuggerAgent::didAddEventListener): (WebCore::PageDebuggerAgent::willRemoveEventListener): (WebCore::PageDebuggerAgent::willHandleEvent): * inspector/PageDebuggerAgent.h: 2017-07-28 Matt Rajca Don't add autoplay restrictions to media elements created in response to user gestures. https://bugs.webkit.org/show_bug.cgi?id=174947 Reviewed by Eric Carlson. Test: media/video-create-with-user-gesture.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): 2017-07-28 Jeremy Jones WebMediaSessionHelper calls -[UIApplication beginReceivingRemoteControlEvents] from WebThread https://bugs.webkit.org/show_bug.cgi?id=174934 rdar://problem/33586772 Reviewed by Eric Carlson. No new tests because no effect on DOM. This dispatches a UIKit call to the main thread since it might happen on WebThread in WK1. * platform/audio/ios/MediaSessionManagerIOS.mm: (-[WebMediaSessionHelper initWithCallback:]): 2017-07-28 Myles C. Maxfield [macOS] Reeder's defaults font is Times instead of San Francisco https://bugs.webkit.org/show_bug.cgi?id=174885 Reviewed by Simon Fraser. Reeder uses explicit dot-prefixed names in its source code. Within Core Text, dot-prefixed names cannot be matched case insensitively. The solution is to not case-fold these family names, and to make our caches case sensitive for these special names. Tests: fast/text/font-lookup-dot-prefix-case-sensitive-2.html fast/text/font-lookup-dot-prefix-case-sensitive.html * platform/graphics/FontCache.cpp: (WebCore::FontPlatformDataCacheKey::operator==): (WebCore::FontPlatformDataCacheKeyHash::hash): * platform/graphics/FontCascade.cpp: (WebCore::keysMatch): (WebCore::computeFontCascadeCacheHash): * platform/graphics/FontDescription.cpp: (WebCore::FontCascadeDescription::familyNamesAreEqual): (WebCore::FontCascadeDescription::familyNameHash): (WebCore::FontCascadeDescription::foldedFamilyName): * platform/graphics/FontDescription.h: * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::FontDatabase::fontForPostScriptName): 2017-07-28 Devin Rousso Web Inspector: Record actions performed on CanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=174482 Reviewed by Joseph Pecoraro. Tests: inspector/canvas/recording-2d.html inspector/canvas/recording.html * html/canvas/CanvasRenderingContext2D.idl: Add CallTracingCallback to interface to record all API calls. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): If a recording is active, mark the current frame as completed. * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributeGetterBodyDefinition): (GenerateAttributeSetterBodyDefinition): (GenerateImplementationFunctionCall): (GenerateCallTracerParameter): (GenerateCallTracer): * bindings/scripts/test/TestCallTracer.idl: * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter): (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter): (WebCore::jsTestCallTracerTestAttributeWithVariantGetter): (WebCore::jsTestCallTracerTestAttributeWithVariant): (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter): (WebCore::setJSTestCallTracerTestAttributeWithVariant): (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody): (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody): (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody): (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody): (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody): (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument): * inspector/InspectorCanvas.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::recordAction): (WebCore::InspectorCanvas::buildAction): Change CallTracer IDL generation to flatten any variants so that all types for the parameters of an action are able to be listed in a single variant. This prevents possible ambiguity when constructing the variant, as they require that exactly one type be constructible and a sub-variant might not satisfy that condition. This was only an issue for older mac SDKs. * bindings/js/CallTracer.h: * bindings/js/CallTracer.cpp: (WebCore::CallTracer::recordCanvasAction): * bindings/js/CallTracerTypes.h: * inspector/InspectorCanvasAgent.h: * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::recordCanvasAction): * inspector/InspectorInstrumentation.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::recordCanvasAction): (WebCore::InspectorInstrumentation::recordCanvasActionImpl): Rename CanvasActionParameterVariant to RecordCanvasActionVariant to match what is expected by the IDL generator. Also remove unnecessary includes now that they are in CallTracerTypes.h. * CMakeLists.txt: * bindings/js/JSBindingsAllInOne.cpp: Add CallTracer for CMake builds. 2017-07-28 Sam Weinig [WebIDL] Split-up and cleanup Fetch IDL files in preparation for removing unnecessary js builtins https://bugs.webkit.org/show_bug.cgi?id=174915 Reviewed by Alex Christensen. - Split FetchRequest enums and Init dictionary out of FetchRequest so they can be used from other files like WorkerGlobalScopeFetch and DOMWindowFetch. - Add missing FetchResponseInit. Currently unused but will be in a subsequent patch. - Add and update comments about missing properties and functions. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * Modules/fetch/DOMWindowFetch.idl: * Modules/fetch/FetchBody.idl: * Modules/fetch/FetchBodyOwner.h: * Modules/fetch/FetchHeaders.h: * Modules/fetch/FetchHeaders.idl: * Modules/fetch/FetchReferrerPolicy.h: Added. * Modules/fetch/FetchReferrerPolicy.idl: Added. * Modules/fetch/FetchRequest.h: * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchRequestCache.h: Added. * Modules/fetch/FetchRequestCache.idl: Added. * Modules/fetch/FetchRequestCredentials.h: Added. * Modules/fetch/FetchRequestCredentials.idl: Added. * Modules/fetch/FetchRequestInit.h: Added. * Modules/fetch/FetchRequestInit.idl: Added. * Modules/fetch/FetchRequestMode.h: Added. * Modules/fetch/FetchRequestMode.idl: Added. * Modules/fetch/FetchRequestRedirect.h: Added. * Modules/fetch/FetchRequestRedirect.idl: Added. * Modules/fetch/FetchResponse.h: * Modules/fetch/FetchResponse.idl: * Modules/fetch/WorkerGlobalScopeFetch.idl: 2017-07-28 Myles C. Maxfield REGRESSION(r216944): Fallback fonts erroneously visible when the primary font is loading https://bugs.webkit.org/show_bug.cgi?id=174772 Reviewed by Simon Fraser. During a font load, we try pretty hard to find a font to use that isn't the last resort font (which happens to be Times). We do this by iterating through all the fonts in the font-family list, as well as through all the relevant @font-face blocks which share the requested font family name. Unfortunately, if we find one of these fallback fonts, we were simply using it directly, which means that it was being drawn as visible (because the visibility setting lives inside the Font object). Instead, we should carry the invisibility setting from the interstitial font to this used fallback font. This patch is an extension of r219221, which fixed the problem only for system fallback fonts. This patch adopts the same methodology to all fallback fonts. Test: http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html * platform/graphics/FontCascadeFonts.cpp: (WebCore::FontCascadeFonts::glyphDataForVariant): (WebCore::glyphPageFromFontRanges): * platform/graphics/FontRanges.cpp: (WebCore::FontRanges::glyphDataForCharacter): 2017-07-28 Frederic Wang Fix typo in scrollPositionChangedViaDelegatedScrolling https://bugs.webkit.org/show_bug.cgi?id=174937 Reviewed by Wenson Hsieh. No new tests, fix typo in the inUserInteraction parameter. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling): * page/scrolling/ScrollingTree.h: 2017-07-28 Wenson Hsieh [iOS DnD] [WK1] Snapshots generated using -[DOMRange renderImageForcingBlackText:] are upside down https://bugs.webkit.org/show_bug.cgi?id=174928 Reviewed by Tim Horton. Pulls the implementation of createDragImageForRange out into DragImageIOS, and use TextIndicator to generate a snapshot instead of FrameSelection's snapshotting utilities. This makes snapshotting a DOMRange behave the same way as snapshotting a dragged selection. No way of testing TextIndicator-based snapshotting yet. * platform/DragImage.cpp: Guard createDragImageForRange for !PLATFORM(IOS). * platform/ios/DragImageIOS.mm: (WebCore::createDragImageForSelection): Add a FIXME to point out that having an additional context flip inside the UIGraphicsImageRenderer block results in an upside-down drag image being returned from createDragImageFromImage. This image is being flipped elsewhere in drag initiation code, which eventually results in the correct orientation; we'll need further investigation to remove this extraneous flip. (WebCore::createDragImageForRange): 2017-07-28 Jeremy Jones Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes. https://bugs.webkit.org/show_bug.cgi?id=174437 Reviewed by Darin Adler. No new tests because no behavior change. Remove redundant Web- prefix from classes in WebCore namespace. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: * html/HTMLVideoElement.cpp: * platform/cocoa/PlaybackSessionInterface.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionInterface.h. (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface): * platform/cocoa/PlaybackSessionModel.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h. (WebCore::PlaybackSessionModel::~PlaybackSessionModel): (WebCore::PlaybackSessionModelClient::~PlaybackSessionModelClient): (WebCore::PlaybackSessionModelClient::externalPlaybackChanged): * platform/cocoa/PlaybackSessionModelMediaElement.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h. * platform/cocoa/PlaybackSessionModelMediaElement.mm: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm. * platform/cocoa/VideoFullscreenChangeObserver.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenChangeObserver.h. (WebCore::VideoFullscreenChangeObserver::~VideoFullscreenChangeObserver): * platform/cocoa/VideoFullscreenModel.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h. (WebCore::VideoFullscreenModel::~VideoFullscreenModel): (WebCore::VideoFullscreenModelClient::~VideoFullscreenModelClient): * platform/cocoa/VideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h. (WebCore::VideoFullscreenModelVideoElement::create): * platform/cocoa/VideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm. * platform/ios/PlaybackSessionInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h. * platform/ios/PlaybackSessionInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm. * platform/ios/VideoFullscreenInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h. * platform/ios/VideoFullscreenInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm. * platform/ios/WebAVPlayerController.h: * platform/ios/WebAVPlayerController.mm: * platform/ios/WebVideoFullscreenControllerAVKit.mm: * platform/mac/PlaybackSessionInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h. * platform/mac/PlaybackSessionInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm. * platform/mac/VideoFullscreenInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h. * platform/mac/VideoFullscreenInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm. * platform/mac/WebPlaybackControlsManager.h: * platform/mac/WebPlaybackControlsManager.mm: 2017-07-27 Jeremy Jones Don't override _allowsMediaDocumentInlinePlayback in MediaDocument with playsinlineAttr. https://bugs.webkit.org/show_bug.cgi?id=174850 rdar://problem/33449903 Reviewed by Jon Lee. This change removes playsinlineAttr from MediaDocument so that it doesn't override the setting from _allowsMediaDocumentInlinePlayback. In its place is an update to requiresFullscreenForVideoPlayback that implements the details of exactly which media documents are still allowed to play inlne. Media documents always use a video element; but when there are no video tracks, it has behavior like an audio element. See media-controller.js isAudio(). This change preserves this behavior with respect to fullscreen requirements for media document by mirroring the isAudio() check in requiresFullscreenForVideoPlayback. * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::createDocumentStructure): * html/MediaElementSession.cpp: (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): 2017-07-27 Jeremy Jones MediaDocument fullscreen pinch gesture should trigger navigate back. https://bugs.webkit.org/show_bug.cgi?id=174914 Reviewed by Jon Lee. No new tests because only effect is from interaction with platform. For media documents, pressing the "done" button on fullscreen video navigates back to the previous page. The same should happen for other gestures that pause playback when returning to inline. This allows the gesture to have the same behavior as the button. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): 2017-07-27 Aaron Chu AX: VoiceOver silent or skipping over time values on media player. https://bugs.webkit.org/show_bug.cgi?id=174324 Reviewed by Antoine Quint. Added role attribute to modern media controls time lable class so that VoiceOver can access the time label when the media is playing. Test Updated: media/modern-media-controls/time-label/time-label.html Test Added: media/modern-media-controls/time-label/ios-time-label.html * Modules/modern-media-controls/controls/time-label.js: 2017-07-27 Yusuke Suzuki Hoist DOM binding attribute getter prologue into JavaScriptCore taking advantage of DOMJIT / CheckSubClass https://bugs.webkit.org/show_bug.cgi?id=171637 Reviewed by Darin Adler. We use DOMAttribute. When DOMAttribute is specified, ClassInfo check is performed by JSC side. So, we can drop ClassInfo check from the actual function. We also simplify DOMJIT::GetterSetter to make it smaller size. WebCore size comparison Before: 48443292 After: 48087800 (0.7% reduction) Speedometer Scores show 0.8% improvement. Before: 158.9 +- 0.46 After: 160.2 +- 0.36 Dromaeo DOM core Scores show 5.8% improvement. Before After Total Score: 8424.12runs/s ±1.38% 8911.60runs/s ±1.47% DOM Attributes 12627.27runs/s ±1.87% 14023.17runs/s ±1.87% DOM Modification 1207.82runs/s ±2.48% 1204.21runs/s ±3.05% DOM Query 68068.82runs/s ±0.63% 74273.38runs/s ±0.69% DOM Traversal 1240.07runs/s ±1.96% 1256.64runs/s ±1.77% Performance improvement can be explained by the following optimizations. 1. Type checks are typically eliminated in all the JIT tiers. IC / DFG / FTL can drop type checks since get_by_id operation already performs a structure check which subsumes this type check. 2. Direct getter call by CallDOMGetter without creating IC in DFG and FTL. * bindings/js/JSDOMAttribute.h: (WebCore::IDLAttribute::get): Add CastedThisErrorBehavior::Assert case. When this is specified, we perform casting without using jsDynamicCast. * bindings/scripts/CodeGeneratorJS.pm: (IsAcceleratedDOMAttribute): (GetJSCAttributesForAttribute): (GenerateHeader): (GeneratePropertiesHashTable): (GenerateImplementation): (GenerateAttributeGetterTrampolineDefinition): (GenerateAttributeGetterDefinition): (GenerateCallbackImplementationContent): (GenerateHashTableValueArray): (GenerateHashTable): (GenerateConstructorHelperMethods): Update CodeGeneratorJS to emit DOMAttribute. And DOMJIT::GetterSetter becomes changed to be smaller size. * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::JSInterfaceNamePrototype::finishCreation): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::JSMapLikePrototype::finishCreation): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::JSReadOnlyMapLikePrototype::finishCreation): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObjectPrototype::finishCreation): (WebCore::jsTestActiveDOMObjectExcitingAttr): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::JSTestCEReactionsPrototype::finishCreation): (WebCore::jsTestCEReactionsAttributeWithCEReactions): (WebCore::jsTestCEReactionsReflectAttributeWithCEReactions): (WebCore::jsTestCEReactionsStringifierAttribute): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::JSTestCEReactionsStringifierPrototype::finishCreation): (WebCore::jsTestCEReactionsStringifierValue): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::JSTestCallTracerPrototype::finishCreation): (WebCore::jsTestCallTracerTestAttributeInterface): (WebCore::jsTestCallTracerTestAttributeSpecified): * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation): * bindings/scripts/test/JS/JSTestDOMJIT.cpp: (WebCore::JSTestDOMJITPrototype::finishCreation): (WebCore::TestDOMJITAnyAttrDOMJIT::TestDOMJITAnyAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITAnyAttr): Deleted. (WebCore::TestDOMJITBooleanAttrDOMJIT::TestDOMJITBooleanAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITBooleanAttr): Deleted. (WebCore::TestDOMJITByteAttrDOMJIT::TestDOMJITByteAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITByteAttr): Deleted. (WebCore::TestDOMJITOctetAttrDOMJIT::TestDOMJITOctetAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITOctetAttr): Deleted. (WebCore::TestDOMJITShortAttrDOMJIT::TestDOMJITShortAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITShortAttr): Deleted. (WebCore::TestDOMJITUnsignedShortAttrDOMJIT::TestDOMJITUnsignedShortAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortAttr): Deleted. (WebCore::TestDOMJITLongAttrDOMJIT::TestDOMJITLongAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITLongAttr): Deleted. (WebCore::TestDOMJITUnsignedLongAttrDOMJIT::TestDOMJITUnsignedLongAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongAttr): Deleted. (WebCore::TestDOMJITLongLongAttrDOMJIT::TestDOMJITLongLongAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITLongLongAttr): Deleted. (WebCore::TestDOMJITUnsignedLongLongAttrDOMJIT::TestDOMJITUnsignedLongLongAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongAttr): Deleted. (WebCore::TestDOMJITFloatAttrDOMJIT::TestDOMJITFloatAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITFloatAttr): Deleted. (WebCore::TestDOMJITUnrestrictedFloatAttrDOMJIT::TestDOMJITUnrestrictedFloatAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatAttr): Deleted. (WebCore::TestDOMJITDoubleAttrDOMJIT::TestDOMJITDoubleAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITDoubleAttr): Deleted. (WebCore::TestDOMJITUnrestrictedDoubleAttrDOMJIT::TestDOMJITUnrestrictedDoubleAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleAttr): Deleted. (WebCore::TestDOMJITDomStringAttrDOMJIT::TestDOMJITDomStringAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITDomStringAttr): Deleted. (WebCore::TestDOMJITByteStringAttrDOMJIT::TestDOMJITByteStringAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITByteStringAttr): Deleted. (WebCore::TestDOMJITUsvStringAttrDOMJIT::TestDOMJITUsvStringAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUsvStringAttr): Deleted. (WebCore::TestDOMJITNodeAttrDOMJIT::TestDOMJITNodeAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITNodeAttr): Deleted. (WebCore::TestDOMJITBooleanNullableAttrDOMJIT::TestDOMJITBooleanNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITBooleanNullableAttr): Deleted. (WebCore::TestDOMJITByteNullableAttrDOMJIT::TestDOMJITByteNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITByteNullableAttr): Deleted. (WebCore::TestDOMJITOctetNullableAttrDOMJIT::TestDOMJITOctetNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITOctetNullableAttr): Deleted. (WebCore::TestDOMJITShortNullableAttrDOMJIT::TestDOMJITShortNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITShortNullableAttr): Deleted. (WebCore::TestDOMJITUnsignedShortNullableAttrDOMJIT::TestDOMJITUnsignedShortNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortNullableAttr): Deleted. (WebCore::TestDOMJITLongNullableAttrDOMJIT::TestDOMJITLongNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITLongNullableAttr): Deleted. (WebCore::TestDOMJITUnsignedLongNullableAttrDOMJIT::TestDOMJITUnsignedLongNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongNullableAttr): Deleted. (WebCore::TestDOMJITLongLongNullableAttrDOMJIT::TestDOMJITLongLongNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITLongLongNullableAttr): Deleted. (WebCore::TestDOMJITUnsignedLongLongNullableAttrDOMJIT::TestDOMJITUnsignedLongLongNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongNullableAttr): Deleted. (WebCore::TestDOMJITFloatNullableAttrDOMJIT::TestDOMJITFloatNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITFloatNullableAttr): Deleted. (WebCore::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatNullableAttr): Deleted. (WebCore::TestDOMJITDoubleNullableAttrDOMJIT::TestDOMJITDoubleNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITDoubleNullableAttr): Deleted. (WebCore::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleNullableAttr): Deleted. (WebCore::TestDOMJITDomStringNullableAttrDOMJIT::TestDOMJITDomStringNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITDomStringNullableAttr): Deleted. (WebCore::TestDOMJITByteStringNullableAttrDOMJIT::TestDOMJITByteStringNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITByteStringNullableAttr): Deleted. (WebCore::TestDOMJITUsvStringNullableAttrDOMJIT::TestDOMJITUsvStringNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITUsvStringNullableAttr): Deleted. (WebCore::TestDOMJITNodeNullableAttrDOMJIT::TestDOMJITNodeNullableAttrDOMJIT): Deleted. (WebCore::domJITGetterSetterForTestDOMJITNodeNullableAttr): Deleted. * bindings/scripts/test/JS/JSTestDOMJIT.h: * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructorPrototype::finishCreation): (WebCore::jsTestEventConstructorAttr1): (WebCore::jsTestEventConstructorAttr2): (WebCore::jsTestEventConstructorAttr3): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTargetPrototype::finishCreation): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestExceptionPrototype::finishCreation): (WebCore::jsTestExceptionName): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::JSTestGenerateIsReachablePrototype::finishCreation): (WebCore::jsTestGenerateIsReachableASecretAttribute): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::jsTestGlobalObjectRegularAttribute): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::JSTestIndexedSetterNoIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::finishCreation): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::JSTestIndexedSetterWithIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::initializeProperties): (WebCore::JSTestInterfacePrototype::finishCreation): (WebCore::jsTestInterfaceImplementsStr1): (WebCore::jsTestInterfaceImplementsStr2): (WebCore::jsTestInterfaceImplementsStr3): (WebCore::jsTestInterfaceImplementsNode): (WebCore::jsTestInterfaceSupplementalStr1): (WebCore::jsTestInterfaceSupplementalStr2): (WebCore::jsTestInterfaceSupplementalStr3): (WebCore::jsTestInterfaceSupplementalNode): * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: (WebCore::JSTestInterfaceLeadingUnderscorePrototype::finishCreation): (WebCore::jsTestInterfaceLeadingUnderscoreReadonly): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::JSTestIterablePrototype::finishCreation): * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation): (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom): (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::JSTestNamedDeleterNoIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::JSTestNamedDeleterWithIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::JSTestNamedGetterCallWithPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::JSTestNamedGetterNoIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::JSTestNamedGetterWithIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::JSTestNamedSetterNoIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::JSTestNamedSetterThrowingExceptionPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::JSTestNamedSetterWithIdentifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::finishCreation): (WebCore::jsTestNamedSetterWithUnforgablePropertiesUnforgeableAttribute): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::finishCreation): (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::JSTestNodePrototype::finishCreation): (WebCore::jsTestNodeName): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::initializeProperties): (WebCore::JSTestObjPrototype::finishCreation): (WebCore::jsTestObjReadOnlyLongAttr): (WebCore::jsTestObjReadOnlyStringAttr): (WebCore::jsTestObjReadOnlyTestObjAttr): (WebCore::jsTestObjEnumAttr): (WebCore::jsTestObjByteAttr): (WebCore::jsTestObjOctetAttr): (WebCore::jsTestObjShortAttr): (WebCore::jsTestObjClampedShortAttr): (WebCore::jsTestObjEnforceRangeShortAttr): (WebCore::jsTestObjUnsignedShortAttr): (WebCore::jsTestObjLongAttr): (WebCore::jsTestObjLongLongAttr): (WebCore::jsTestObjUnsignedLongLongAttr): (WebCore::jsTestObjStringAttr): (WebCore::jsTestObjUsvstringAttr): (WebCore::jsTestObjTestObjAttr): (WebCore::jsTestObjTestNullableObjAttr): (WebCore::jsTestObjUnforgeableAttr): (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString): (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyString): (WebCore::jsTestObjByteStringAttrTreatingNullAsEmptyString): (WebCore::jsTestObjStringLongRecordAttr): (WebCore::jsTestObjUsvstringLongRecordAttr): (WebCore::jsTestObjStringObjRecordAttr): (WebCore::jsTestObjStringNullableObjRecordAttr): (WebCore::jsTestObjDictionaryAttr): (WebCore::jsTestObjNullableDictionaryAttr): (WebCore::jsTestObjAnnotatedTypeInUnionAttr): (WebCore::jsTestObjAnnotatedTypeInSequenceAttr): (WebCore::jsTestObjImplementationEnumAttr): (WebCore::jsTestObjXMLObjAttr): (WebCore::jsTestObjCreate): (WebCore::jsTestObjReflectedStringAttr): (WebCore::jsTestObjReflectedUSVStringAttr): (WebCore::jsTestObjReflectedIntegralAttr): (WebCore::jsTestObjReflectedUnsignedIntegralAttr): (WebCore::jsTestObjReflectedBooleanAttr): (WebCore::jsTestObjReflectedURLAttr): (WebCore::jsTestObjReflectedUSVURLAttr): (WebCore::jsTestObjReflectedCustomIntegralAttr): (WebCore::jsTestObjReflectedCustomBooleanAttr): (WebCore::jsTestObjReflectedCustomURLAttr): (WebCore::jsTestObjEnabledAtRuntimeAttribute): (WebCore::jsTestObjEnabledBySettingAttribute): (WebCore::jsTestObjTypedArrayAttr): (WebCore::jsTestObjAttributeWithGetterException): (WebCore::jsTestObjAttributeWithSetterException): (WebCore::jsTestObjStringAttrWithGetterException): (WebCore::jsTestObjStringAttrWithSetterException): (WebCore::jsTestObjCustomAttr): (WebCore::jsTestObjOnfoo): (WebCore::jsTestObjOnwebkitfoo): (WebCore::jsTestObjWithScriptStateAttribute): (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute): (WebCore::jsTestObjWithScriptExecutionContextAttribute): (WebCore::jsTestObjWithScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::jsTestObjConditionalAttr1): (WebCore::jsTestObjConditionalAttr2): (WebCore::jsTestObjConditionalAttr3): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::jsTestObjAnyAttribute): (WebCore::jsTestObjObjectAttribute): (WebCore::jsTestObjContentDocument): (WebCore::jsTestObjMutablePoint): (WebCore::jsTestObjStrawberry): (WebCore::jsTestObjDescription): (WebCore::jsTestObjId): (WebCore::jsTestObjHash): (WebCore::jsTestObjReplaceableAttribute): (WebCore::jsTestObjNullableDoubleAttribute): (WebCore::jsTestObjNullableLongAttribute): (WebCore::jsTestObjNullableBooleanAttribute): (WebCore::jsTestObjNullableStringAttribute): (WebCore::jsTestObjNullableLongSettableAttribute): (WebCore::jsTestObjNullableStringSettableAttribute): (WebCore::jsTestObjNullableUSVStringSettableAttribute): (WebCore::jsTestObjNullableByteStringSettableAttribute): (WebCore::jsTestObjNullableStringValue): (WebCore::jsTestObjAttribute): (WebCore::jsTestObjAttributeWithReservedEnumType): (WebCore::jsTestObjPutForwardsAttribute): (WebCore::jsTestObjPutForwardsNullableAttribute): (WebCore::jsTestObjStringifierAttribute): (WebCore::jsTestObjConditionallyReadWriteAttribute): (WebCore::jsTestObjConditionalAndConditionallyReadWriteAttribute): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::finishCreation): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterfacePrototype::finishCreation): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::JSTestPromiseRejectionEventPrototype::finishCreation): (WebCore::jsTestPromiseRejectionEventReason): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::JSTestSerializationPrototype::finishCreation): (WebCore::jsTestSerializationFirstStringAttribute): (WebCore::jsTestSerializationSecondLongAttribute): (WebCore::jsTestSerializationThirdUnserializableAttribute): (WebCore::jsTestSerializationFourthUnrestrictedDoubleAttribute): (WebCore::jsTestSerializationFifthLongAttribute): (WebCore::jsTestSerializationSixthTypedefAttribute): (WebCore::jsTestSerializationSeventhDirectlySerializableAttribute): (WebCore::jsTestSerializationEighthIndirectlyAttribute): * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: (WebCore::JSTestSerializationIndirectInheritancePrototype::finishCreation): * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: (WebCore::JSTestSerializationInheritPrototype::finishCreation): (WebCore::jsTestSerializationInheritInheritLongAttribute): * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: (WebCore::JSTestSerializationInheritFinalPrototype::finishCreation): (WebCore::jsTestSerializationInheritFinalFinalLongAttributeFoo): (WebCore::jsTestSerializationInheritFinalFinalLongAttributeBar): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation): (WebCore::jsTestSerializedScriptValueInterfaceValue): (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue): (WebCore::jsTestSerializedScriptValueInterfaceCachedValue): (WebCore::jsTestSerializedScriptValueInterfacePorts): (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::JSTestStringifierPrototype::finishCreation): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::JSTestStringifierAnonymousOperationPrototype::finishCreation): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::JSTestStringifierNamedOperationPrototype::finishCreation): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::JSTestStringifierOperationImplementedAsPrototype::finishCreation): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::JSTestStringifierOperationNamedToStringPrototype::finishCreation): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::JSTestStringifierReadOnlyAttributePrototype::finishCreation): (WebCore::jsTestStringifierReadOnlyAttributeIdentifier): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::JSTestStringifierReadWriteAttributePrototype::finishCreation): (WebCore::jsTestStringifierReadWriteAttributeIdentifier): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefsConstructor::initializeProperties): (WebCore::JSTestTypedefsPrototype::finishCreation): (WebCore::jsTestTypedefsUnsignedLongLongAttr): (WebCore::jsTestTypedefsSerializedScriptValue): (WebCore::jsTestTypedefsAttributeWithClamp): (WebCore::jsTestTypedefsAttributeWithClampInTypedef): (WebCore::jsTestTypedefsAttrWithGetterException): (WebCore::jsTestTypedefsAttrWithSetterException): (WebCore::jsTestTypedefsStringAttrWithGetterException): (WebCore::jsTestTypedefsStringAttrWithSetterException): (WebCore::jsTestTypedefsBufferSourceAttr): (WebCore::jsTestTypedefsDomTimeStampAttr): They are binding test rebaselines. * domjit/DOMJITIDLTypeFilter.h: * domjit/JSDocumentDOMJIT.cpp: (WebCore::compileDocumentDocumentElementAttribute): (WebCore::compileDocumentBodyAttribute): (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): Deleted. (WebCore::DocumentBodyDOMJIT::callDOMGetter): Deleted. * domjit/JSNodeDOMJIT.cpp: (WebCore::compileNodeFirstChildAttribute): (WebCore::compileNodeLastChildAttribute): (WebCore::compileNodeNextSiblingAttribute): (WebCore::compileNodePreviousSiblingAttribute): (WebCore::compileNodeParentNodeAttribute): (WebCore::compileNodeNodeTypeAttribute): (WebCore::compileNodeOwnerDocumentAttribute): (WebCore::NodeFirstChildDOMJIT::callDOMGetter): Deleted. (WebCore::NodeLastChildDOMJIT::callDOMGetter): Deleted. (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): Deleted. (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): Deleted. (WebCore::NodeParentNodeDOMJIT::callDOMGetter): Deleted. (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): Deleted. (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): Deleted. DOMJIT::GetterSetter becomes smaller constexpr data. 2017-07-27 Xabier Rodriguez Calvar [GStreamer][EME] Not having a key id buffer should not always error https://bugs.webkit.org/show_bug.cgi?id=174889 Reviewed by Žan Doberšek. In r219946 we introduced a hard requirement for a key id buffer that does not happen for all CDMs. * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp: (webKitMediaClearKeyDecryptorSetupCipher): Check for key id buffer and error if we didn't get it. * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (webkitMediaCommonEncryptionDecryptTransformInPlace): Soften the requirement for key id buffer. 2017-07-27 Xabier Rodriguez Calvar [GStreamer][EME] Fix phony debug output in player base for supported key system https://bugs.webkit.org/show_bug.cgi?id=174888 Reviewed by Žan Doberšek. The debug output was returning always false because that method was not checking anything before. Now it is and should reflect it. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem): 2017-07-27 Zan Dobersek [EME][GStreamer] Add barebones CDM interface implementations for ClearKey https://bugs.webkit.org/show_bug.cgi?id=174887 Reviewed by Xabier Rodriguez-Calvar. Add empty ClearKey derivations of CDMFactory, CDMPrivate and CDMInstance classes. These will be enhanced as the implementation progresses. ClearKey is added to CDMInstance::ImplementationType, and the CDMInstanceClearKey::implementationType() override returns that value. Type traits specialization for the CDMInstanceClearKey class is also added, utilizing the CDMInstance::ImplementationType::ClearKey value. The implementation file is added to the WPE build, along with the necessary inclusion directory. * PlatformWPE.cmake: * platform/encryptedmedia/CDMInstance.h: * platform/encryptedmedia/clearkey/CDMClearKey.cpp: Added. (WebCore::CDMFactoryClearKey::createCDM): (WebCore::CDMFactoryClearKey::supportsKeySystem): (WebCore::CDMPrivateClearKey::supportsInitDataType): (WebCore::CDMPrivateClearKey::supportsConfiguration): (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions): (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration): (WebCore::CDMPrivateClearKey::supportsRobustness): (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement): (WebCore::CDMPrivateClearKey::persistentStateRequirement): (WebCore::CDMPrivateClearKey::distinctiveIdentifiersAreUniquePerOriginAndClearable): (WebCore::CDMPrivateClearKey::createInstance): (WebCore::CDMPrivateClearKey::loadAndInitialize): (WebCore::CDMPrivateClearKey::supportsServerCertificates): (WebCore::CDMPrivateClearKey::supportsSessions): (WebCore::CDMPrivateClearKey::supportsInitData): (WebCore::CDMPrivateClearKey::sanitizeResponse): (WebCore::CDMPrivateClearKey::sanitizeSessionId): (WebCore::CDMInstanceClearKey::initializeWithConfiguration): (WebCore::CDMInstanceClearKey::setDistinctiveIdentifiersAllowed): (WebCore::CDMInstanceClearKey::setPersistentStateAllowed): (WebCore::CDMInstanceClearKey::setServerCertificate): (WebCore::CDMInstanceClearKey::requestLicense): (WebCore::CDMInstanceClearKey::updateLicense): (WebCore::CDMInstanceClearKey::loadSession): (WebCore::CDMInstanceClearKey::closeSession): (WebCore::CDMInstanceClearKey::removeSessionData): (WebCore::CDMInstanceClearKey::storeRecordOfKeyUsage): * platform/encryptedmedia/clearkey/CDMClearKey.h: Added. 2017-07-27 Zan Dobersek [EME] Allow CDMInstance type traits specialization https://bugs.webkit.org/show_bug.cgi?id=174886 Reviewed by Xabier Rodriguez-Calvar. Allow using the trait-based type casting for the CDMInstance class and its derivatives. ImplementationType enumeration values are to be used and returned from the new implementationType() virtual method. This method is leveraged in the type trait specialization that enables using is<>() and downcast<>() helpers for CDMInstance objects. This will allow differentiating between CDMInstance implementations once the media playback pipeline has to retrieve any key information that's necessary for playback of encrypted content. MockCDMInstance class overrides the implementationType() method, returning the ImplementationType::Mock value. Type trait specializations for this class aren't added since they're not needed anywhere at this point. * platform/encryptedmedia/CDMInstance.h: * testing/MockCDMFactory.h: 2017-07-27 Zan Dobersek [GCrypt] Key serialization support https://bugs.webkit.org/show_bug.cgi?id=173883 Reviewed by Jiewen Tan. Implement crypto key serialization for platforms that use libgcrypt. Despite the function names and the existing implementation for the Mac port, we don't perform the KEK wrapping and unwrapping due to the review feedback advising against it. Instead the passed-in key data is simply copied and returned as the result of the 'wrapping' operation, and similarly the passed-in serialized data is simply copied and returned as the result of the 'unwrapping' operation. No new tests -- related tests are now passing and are unskipped. * crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp: (WebCore::getDefaultWebCryptoMasterKey): (WebCore::wrapSerializedCryptoKey): (WebCore::unwrapSerializedCryptoKey): 2017-07-26 Arnaud Renevier and Fujii Hironori Implement new TextMetrics, returned by canvas measureText() https://bugs.webkit.org/show_bug.cgi?id=82798 Reviewed by Dean Jackson. The specification: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-measuretext Add new attributes to TextMetrics. Add a new method textOffset() of CanvasRenderingContext2D by extracting from drawTextInternal() to use the same horizontal and vertical offsets of a text in both drawTextInternal() and measureText(). Test: fast/canvas/canvas-measureText-2.html * html/TextMetrics.h: (WebCore::TextMetrics::actualBoundingBoxLeft): (WebCore::TextMetrics::setActualBoundingBoxLeft): (WebCore::TextMetrics::actualBoundingBoxRight): (WebCore::TextMetrics::setActualBoundingBoxRight): (WebCore::TextMetrics::fontBoundingBoxAscent): (WebCore::TextMetrics::setFontBoundingBoxAscent): (WebCore::TextMetrics::fontBoundingBoxDescent): (WebCore::TextMetrics::setFontBoundingBoxDescent): (WebCore::TextMetrics::actualBoundingBoxAscent): (WebCore::TextMetrics::setActualBoundingBoxAscent): (WebCore::TextMetrics::actualBoundingBoxDescent): (WebCore::TextMetrics::setActualBoundingBoxDescent): (WebCore::TextMetrics::emHeightAscent): (WebCore::TextMetrics::setEmHeightAscent): (WebCore::TextMetrics::emHeightDescent): (WebCore::TextMetrics::setEmHeightDescent): (WebCore::TextMetrics::hangingBaseline): (WebCore::TextMetrics::setHangingBaseline): (WebCore::TextMetrics::alphabeticBaseline): (WebCore::TextMetrics::setAlphabeticBaseline): (WebCore::TextMetrics::ideographicBaseline): (WebCore::TextMetrics::setIdeographicBaseline): Added getters and setters. (WebCore::TextMetrics::TextMetrics): Deleted. * html/TextMetrics.idl: Added new attributes. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::FontProxy::fontMetrics): Changed the return value type to a const reference of FontMetrics not to copy it. (WebCore::CanvasRenderingContext2D::FontProxy::width): Added the second arguemnt of GlyphOverflow type. (WebCore::CanvasRenderingContext2D::measureText): Calculate and set the new attributes of TextMetrics. (WebCore::CanvasRenderingContext2D::textOffset): Extracted from drawTextInternal. (WebCore::CanvasRenderingContext2D::drawTextInternal): Removed the offset calculation code and call textOffset. * html/canvas/CanvasRenderingContext2D.h: Added the method declaration of textOffset. Change types of fontMetrics and width methods. * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: (WebCore::FontCascade::floatWidthForComplexText): Added a dummy implementation of calculating GlyphOverflow. 2017-07-26 Devin Rousso Web Inspector: create protocol for recording Canvas contexts https://bugs.webkit.org/show_bug.cgi?id=174481 Reviewed by Joseph Pecoraro. Currently, a recording doesn't actually "start" until an action is performed on the context. This change adds the recording logic, but it does not use it anywhere. Additonal tests will be added in the patches that add uses: - Web Inspector: Record actions performed on CanvasRenderingContext2D - Web Inspector: Record actions performed on WebGLRenderingContext Test: inspector/model/recording.html * bindings/scripts/IDLAttributes.json: * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributeGetterBodyDefinition): (GenerateAttributeSetterBodyDefinition): (GenerateImplementationFunctionCall): * WebCore.xcodeproj/project.pbxproj: * bindings/js/CallTracer.h: Added. * bindings/js/CallTracer.cpp: Added. (WebCore::CallTracer::recordCanvasAction): * bindings/js/CallTracerTypes.h: Added. * bindings/scripts/test/TestCallTracer.idl: Added. * bindings/scripts/test/JS/JSTestCallTracer.h: Added. * bindings/scripts/test/JS/JSTestCallTracer.cpp: Added. Create new IDL extended attribute called "CallTracingCallback" that will add code to call a static function on CallTracer with the given extended attribute value as the function name, the `impl` object as the first parameter, the name of the attribute/operation as the second, and an optional object that accepts an initializer list of all the parameters as the third. This function will not be called, however, unless a `callTracingActive` function on the `impl` object returns true, and this is marked as UNLIKELY. "CallTracingCallback" can be added to an Interface, in which case it will apply to all attributes/operations of the generated class, or an individual Attribute/Operation. * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::callTracingActive): (WebCore::CanvasRenderingContext::setCallTracingActive): * inspector/InspectorCanvas.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::~InspectorCanvas): (WebCore::InspectorCanvas::resetRecordingData): (WebCore::InspectorCanvas::hasRecordingData): (WebCore::InspectorCanvas::recordAction): (WebCore::InspectorCanvas::releaseInitialState): (WebCore::InspectorCanvas::releaseFrames): (WebCore::InspectorCanvas::releaseData): (WebCore::InspectorCanvas::markNewFrame): (WebCore::InspectorCanvas::markCurrentFrameIncomplete): (WebCore::InspectorCanvas::setBufferLimit): (WebCore::InspectorCanvas::hasBufferSpace): (WebCore::InspectorCanvas::singleFrame): (WebCore::InspectorCanvas::setSingleFrame): (WebCore::InspectorCanvas::indexForData): (WebCore::buildArrayForAffineTransform): (WebCore::buildArrayForVector): (WebCore::InspectorCanvas::buildInitialState): (WebCore::InspectorCanvas::buildAction): (WebCore::InspectorCanvas::buildArrayForCanvasGradient): (WebCore::InspectorCanvas::buildArrayForCanvasPattern): (WebCore::InspectorCanvas::buildArrayForImageData): Hold the recording data on the corresponding InspectorCanvas. Recording Frames are completed when the HTMLCanvasElement paints or a 0_s timer is fired. A recording is not considered valid until at least one action is performed on the canvas context. Once that condition is satisfied, canceling the recording will flush the data. * inspector/InspectorCanvasAgent.h: * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::disable): (WebCore::InspectorCanvasAgent::requestRecording): (WebCore::InspectorCanvasAgent::cancelRecording): (WebCore::InspectorCanvasAgent::recordCanvasAction): (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame): (WebCore::InspectorCanvasAgent::canvasDestroyed): (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired): (WebCore::InspectorCanvasAgent::clearCanvasData): * inspector/InspectorInstrumentation.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::recordCanvasAction): (WebCore::InspectorInstrumentation::recordCanvasActionImpl): (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stringForWindingRule): (WebCore::CanvasRenderingContext2D::stringForImageSmoothingQuality): * platform/graphics/Gradient.h: (WebCore::Gradient::stops): * svg/SVGPathUtilities.h: * svg/SVGPathUtilities.cpp: (WebCore::buildStringFromPath): 2017-07-26 Ali Juma Implement document.elementsFromPoint https://bugs.webkit.org/show_bug.cgi?id=153137 Reviewed by Simon Fraser. This ports Blink's implementation of elementsFromPoint, from the following patches by Philip Rogers (pdr@chromium.org): -https://src.chromium.org/viewvc/blink?revision=190686&view=revision -https://src.chromium.org/viewvc/blink?revision=191240&view=revision -https://src.chromium.org/viewvc/blink?revision=199214&view=revision Tests: imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-iframes.html imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-invalid-cases.html imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-shadowroot.html imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-simple.html imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-svg.html imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-table.html * dom/DocumentOrShadowRoot.idl: * dom/TreeScope.cpp: (WebCore::absolutePointIfNotClipped): (WebCore::TreeScope::nodeFromPoint): (WebCore::TreeScope::elementFromPoint): (WebCore::TreeScope::elementsFromPoint): * dom/TreeScope.h: * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/HitTestRequest.h: (WebCore::HitTestRequest::HitTestRequest): (WebCore::HitTestRequest::resultIsElementList): (WebCore::HitTestRequest::includesAllElementsUnderPoint): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::addNodeToListBasedTestResult): (WebCore::HitTestResult::append): (WebCore::HitTestResult::listBasedTestResult): (WebCore::HitTestResult::mutableListBasedTestResult): (WebCore::HitTestResult::addNodeToRectBasedTestResult): Deleted. (WebCore::HitTestResult::rectBasedTestResult): Deleted. (WebCore::HitTestResult::mutableRectBasedTestResult): Deleted. * rendering/HitTestResult.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): * rendering/RenderInline.cpp: (WebCore::RenderInline::hitTestCulledInline): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::hitTestContents): (WebCore::RenderLayer::hitTestList): (WebCore::RenderLayer::calculateClipRects): * rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::nodeAtPoint): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::hitTestFlow): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::nodeAtFloatPoint): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::nodeAtFloatPoint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::nodeAtFloatPoint): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint): * testing/Internals.cpp: (WebCore::Internals::nodesFromRect): 2017-07-26 Charlie Turner [GStreamer] Review WebKitWebSource after r219252. https://bugs.webkit.org/show_bug.cgi?id=174415 Reviewed by Carlos Garcia Campos. Remove ResourceHandleStreamingClient, and flatten the StreamingClient into CachedResourceStreamingClient (the only implemetation left). They are no longer required after r219252. Also remove the locking code. It's not needed now, and what existed was heavy-handed and missed several cases it was supposed to protect Covered by existing tests. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webkit_web_src_init): (webKitWebSrcDispose): (webKitWebSrcStop): (webKitWebSrcStart): (webKitWebSrcNeedData): (webKitWebSrcEnoughData): (webKitWebSrcSeek): (webKitWebSrcSetMediaPlayer): (CachedResourceStreamingClient::CachedResourceStreamingClient): (CachedResourceStreamingClient::~CachedResourceStreamingClient): (CachedResourceStreamingClient::getOrCreateReadBuffer): (CachedResourceStreamingClient::responseReceived): (CachedResourceStreamingClient::dataReceived): (CachedResourceStreamingClient::loadFinished): (ResourceHandleStreamingClient::create): Deleted. (): Deleted. (StreamingClient::StreamingClient): Deleted. (StreamingClient::~StreamingClient): Deleted. (StreamingClient::createReadBuffer): Deleted. (StreamingClient::handleResponseReceived): Deleted. (StreamingClient::handleDataReceived): Deleted. (StreamingClient::handleNotifyFinished): Deleted. (ResourceHandleStreamingClient::ResourceHandleStreamingClient): Deleted. (ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Deleted. (ResourceHandleStreamingClient::cleanupAndStopRunLoop): Deleted. (ResourceHandleStreamingClient::invalidate): Deleted. (ResourceHandleStreamingClient::loadFailed): Deleted. (ResourceHandleStreamingClient::setDefersLoading): Deleted. (ResourceHandleStreamingClient::getOrCreateReadBuffer): Deleted. (ResourceHandleStreamingClient::willSendRequest): Deleted. (ResourceHandleStreamingClient::didReceiveResponse): Deleted. (ResourceHandleStreamingClient::didReceiveData): Deleted. (ResourceHandleStreamingClient::didReceiveBuffer): Deleted. (ResourceHandleStreamingClient::didFinishLoading): Deleted. (ResourceHandleStreamingClient::didFail): Deleted. (ResourceHandleStreamingClient::wasBlocked): Deleted. (ResourceHandleStreamingClient::cannotShowURL): Deleted. 2017-07-26 Brian Burg Remove WEB_TIMING feature flag https://bugs.webkit.org/show_bug.cgi?id=174795 Reviewed by Alex Christensen. * Configurations/FeatureDefines.xcconfig: * bindings/js/JSPerformanceEntryCustom.cpp: * dom/Document.cpp: (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): * dom/Document.h: (WebCore::Document::timing): * dom/DocumentTiming.h: * dom/EventTargetFactory.in: * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::finishedTimingForWorkerLoad): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/ResourceTimingInformation.cpp: * loader/ResourceTimingInformation.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFinishLoading): (WebCore::SubresourceLoader::reportResourceTiming): * loader/SubresourceLoader.h: * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didFail): (WebCore::ThreadableLoaderClient::didFinishTiming): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming): * loader/WorkerThreadableLoader.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::revalidateResource): (WebCore::CachedResourceLoader::loadResource): * loader/cache/CachedResourceLoader.h: (WebCore::CachedResourceLoader::resourceTimingInformation): * page/DOMWindow.cpp: (WebCore::DOMWindow::~DOMWindow): (WebCore::DOMWindow::resetDOMWindowProperties): (WebCore::DOMWindow::nowTimestamp): (WebCore::DOMWindow::removeAllEventListeners): * page/DOMWindow.h: * page/GlobalPerformance.idl: * page/Performance.cpp: * page/Performance.h: * page/Performance.idl: * page/PerformanceEntry.cpp: * page/PerformanceEntry.h: * page/PerformanceEntry.idl: * page/PerformanceMark.h: * page/PerformanceMark.idl: * page/PerformanceMeasure.h: * page/PerformanceMeasure.idl: * page/PerformanceNavigation.cpp: * page/PerformanceNavigation.h: * page/PerformanceNavigation.idl: * page/PerformanceObserver.cpp: * page/PerformanceObserver.h: * page/PerformanceObserver.idl: * page/PerformanceObserverCallback.h: * page/PerformanceObserverCallback.idl: * page/PerformanceObserverEntryList.cpp: * page/PerformanceObserverEntryList.h: * page/PerformanceObserverEntryList.idl: * page/PerformanceResourceTiming.cpp: * page/PerformanceResourceTiming.h: * page/PerformanceResourceTiming.idl: * page/PerformanceTiming.cpp: * page/PerformanceTiming.h: * page/PerformanceTiming.idl: * page/PerformanceUserTiming.cpp: * page/PerformanceUserTiming.h: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::start): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandleInternal::didFinish): (WebCore::ResourceHandleInternal::calculateWebTimingInformations): (WebCore::ResourceHandleInternal::dispatchSynchronousJob): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::createNSURLConnection): * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::restartedCallback): (WebCore::sendRequestCallback): (WebCore::createSoupMessageForHandleAndRequest): (WebCore::ResourceHandle::sendPendingRequest): * platform/network/soup/SoupNetworkSession.cpp: (WebCore::SoupNetworkSession::SoupNetworkSession): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::~WorkerGlobalScope): (WebCore::WorkerGlobalScope::removeAllEventListeners): * workers/WorkerGlobalScope.h: 2017-07-26 Chris Dumez Pressing the Escape key should not be a valid user gesture to enter fullscreen https://bugs.webkit.org/show_bug.cgi?id=174864 Reviewed by Geoffrey Garen. Pressing the Escape key should not be a valid user gesture to enter fullscreen since this is the gesture to exit fullscreen already. Test: fullscreen/requestFullscreen-escape-key.html * dom/Document.cpp: (WebCore::Document::requestFullScreenForElement): * dom/UserGestureIndicator.cpp: (WebCore::UserGestureIndicator::UserGestureIndicator): * dom/UserGestureIndicator.h: (WebCore::UserGestureToken::create): (WebCore::UserGestureToken::gestureType): (WebCore::UserGestureToken::UserGestureToken): * page/EventHandler.cpp: (WebCore::EventHandler::internalKeyEvent): 2017-07-26 Nan Wang AX: Incorrect range from index and length in contenteditable with

tags https://bugs.webkit.org/show_bug.cgi?id=174856 Reviewed by Chris Fleizach. When asking for the string inside a text control with a given range, we sometimes get a wrong string at the line boundary due to a bad plain range to text marker conversion. To fix this, we should use the exsisting method on text controls to avoid this issue. Updated the test to test the problematic case. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2017-07-26 Daewoong Jang [Curl] Bug fix after r219606 https://bugs.webkit.org/show_bug.cgi?id=174845 Reviewed by Alex Christensen. * platform/network/curl/CurlContext.h: (WebCore::CurlSList::isEmpty): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandleInternal::didReceiveHeaderLine): (WebCore::ResourceHandleInternal::headerCallback): 2017-07-26 Zan Dobersek [EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor https://bugs.webkit.org/show_bug.cgi?id=174779 Reviewed by Xabier Rodriguez-Calvar. In the CENC decryptor, the key ID value is retrieved from the info structure on the GstProtectionMeta object. GstBuffer for that value is retrieved and passed to the setupCipher() function. In the ClearKey decryptor (which extends the CENC decryptor), the single GstBuffer object on the private instance that holds the key value is replaced with a Vector object that holds pairs of key ID and value GstBuffers. In the handleKeyResponse() implementation that Vector is emptied and then refilled with key ID and value pairs that are passed in through the drm-cipher-clearkey structure that's attached to the GstEvent that signalled new key information. In the ClearKey decryptor's setupCipher() implementation the passed-in key ID buffer is used to find a matching key ID and value pair stored on the private instance. If not found, an error is thrown. If found, the matching key value is used for decryption. * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp: (webKitMediaClearKeyDecryptorHandleKeyResponse): (webKitMediaClearKeyDecryptorSetupCipher): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (webkitMediaCommonEncryptionDecryptTransformInPlace): (webKitMediaCommonEncryptionDecryptDefaultSetupCipher): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: 2017-07-26 Zan Dobersek [EME][GStreamer] Handle ClearKey as a supported key system https://bugs.webkit.org/show_bug.cgi?id=174778 Reviewed by Xabier Rodriguez-Calvar. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem): Return true for the 'org.w3.clearkey' key system when building with ENCRYPTED_MEDIA enabled. The underlying implementation will follow. 2017-07-26 Claudio Saavedra [WPE] Fix a potential crash in the platform pasteboard when reading a string https://bugs.webkit.org/show_bug.cgi?id=174859 Reviewed by Žan Doberšek. We shouldn't assume that the wpe_pasteboard_string struct will be filled in, so initialize it. * platform/wpe/PlatformPasteboardWPE.cpp: (WebCore::PlatformPasteboard::readString): Initialize the struct before passing it to wpe and early return if it's still empty. 2017-07-26 Javier Fernandez InsertOrderedList command applied to table cells inserts an extra BR before the table https://bugs.webkit.org/show_bug.cgi?id=174593 Reviewed by Darin Adler. Don't add BR when pruning empty blocks if it's the start of a paragraph. The function MoveParagraph is used for several operations and editing commands, like 'insertOrderedList'. When moving paragraphs we check out whether we should add a 'br' element to avoid undesired block collapse. However, we shouldn't do this when destination is the start of a paragraph. Tests: editing/inserting/insert-list-in-table-cell-01.html editing/inserting/insert-list-in-table-cell-02.html editing/inserting/insert-list-in-table-cell-03.html editing/inserting/insert-list-in-table-cell-04.html editing/inserting/insert-list-in-table-cell-05.html editing/inserting/insert-list-in-table-cell-06.html editing/inserting/insert-list-in-table-cell-07.html editing/inserting/insert-list-in-table-cell-08.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphs): 2017-07-26 Zan Dobersek [WPE] WebGL2 support https://bugs.webkit.org/show_bug.cgi?id=174249 Reviewed by Alex Christensen. Implement WebGL2 support in GraphicsContext3DCairo for the WPE port, but keep the implementation specific to libepoxy (which WPE leverages by default). In the GraphicsContext3D::create() method, we first construct the GraphicsContext3D object that also ensures a current GL context on this thread. Only then can we determine through libepoxy whether the underlying GL library is able to support WebGL2. For WebGL2, the GLES3 support is required. The initial libepoxy implementation ensures this only in case of 'non-desktop GL' library of minimum version 3.0. This effectively translates to the only supported configuration being the EGL and OpenGL ES 3.0 (or higher) combination. If this cannot be ensured, we discard the existing GraphicsContext3D object and return null. WebGL2 can also be supported via OpenGL (i.e. 'desktop GL'), but this hasn't been tested yet. Implementation will in the future be extended to support that as required. In the GraphicsContext3D constructor itself, the ANGLEWebKitBridge constructor has to now receive the second argument, the desired shader specification that's used when parsing the provided shaders. This should be SH_WEBGL_SPEC for WebGL1, and SH_WEBGL2_SPEC for WebGL2. No new tests -- a small set of existing WebGL2 tests is unskipped and passing. * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Add WebGL2-specific methods to the build. 2017-07-26 Nan Wang AX: should dispatch accessibilityPerformPressAction async on MacOS https://bugs.webkit.org/show_bug.cgi?id=174849 Reviewed by Chris Fleizach. If performing the accessibility press action results in a modal alert being displayed, it can cause VoiceOver to hang. To fix it, we should dispatch the action asynchronously. Updated tests to adapt to this change. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]): (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]): 2017-07-25 Carlos Garcia Campos Icon loader error on startup https://bugs.webkit.org/show_bug.cgi?id=174787 Reviewed by Brady Eidson. This is a regression of the new icon loading, it happens with pages that shouldn't have a favicon, like about pages. IconController::startLoader() did several checks before starting the load that DocumentLoader::startIconLoading() is not doing. It checked that the frame is the main one, the document can have an icon (document url is not empty and not about:blank) and that favicon url is in HTTP family. We should do the same checks now before starting to load icons. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::startIconLoading): 2017-07-25 Sam Weinig [WebIDL] Remove custom bindings for HTMLCanvasElement https://bugs.webkit.org/show_bug.cgi?id=174847 Reviewed by Darin Adler. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSHTMLCanvasElementCustom.cpp: Removed. Remove JSHTMLCanvasElementCustom. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): (WebCore::HTMLCanvasElement::getContext2d): (WebCore::HTMLCanvasElement::getContextWebGL): (WebCore::HTMLCanvasElement::getContextWebGPU): * html/HTMLCanvasElement.h: * html/HTMLCanvasElement.idl: Move context picking code to HTMLCanvasElement. Give more exact types to remaining context getters. 2017-07-25 Chris Dumez Clean up ExceptionCode enumeration https://bugs.webkit.org/show_bug.cgi?id=174812 Reviewed by Darin Adler. Clean up ExceptionCode enumeration: - Updated comments to reflect the latest WebIDL specification - Drop special values given to some exception codes. Those legacy codes are already in the table inside DOMException.cpp. This also allows us to drop empty rows in the DOMException table - Drop NoException value in the enumeration and use std::optional when needed instead. * Modules/indexeddb/shared/IDBError.cpp: (WebCore::IDBError::IDBError): (WebCore::IDBError::name): (WebCore::IDBError::message): * Modules/indexeddb/shared/IDBError.h: (WebCore::IDBError::code): (WebCore::IDBError::encode): (WebCore::IDBError::decode): * dom/DOMException.cpp: * dom/ExceptionCode.h: * fileapi/FileReaderSync.cpp: (WebCore::errorCodeToException): (WebCore::FileReaderSync::startLoading): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): * xml/XMLHttpRequest.h: 2017-07-25 Andy Estes [Apple Pay] Add "carteBancaire" as a supported payment network https://bugs.webkit.org/show_bug.cgi?id=174841 Reviewed by Alex Christensen. Tests: http/tests/ssl/applepay/ApplePaySession.html http/tests/ssl/applepay/ApplePaySessionV3.html * Modules/applepay/PaymentRequest.cpp: (WebCore::PaymentRequest::isValidSupportedNetwork): 2017-07-25 Daniel Bates Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member functions https://bugs.webkit.org/show_bug.cgi?id=174827 Reviewed by Simon Fraser. StyleResolver::isValid{Cue, Region}StyleProperty() access neither instance nor class data. Moreover, they are private member functions and hence cannot be used outside of StyleResolver's implementation. So, make these static, inline, non-member functions. * css/StyleResolver.cpp: (WebCore::isValidRegionStyleProperty): (WebCore::isValidCueStyleProperty): (WebCore::StyleResolver::CascadedProperties::addMatch): (WebCore::StyleResolver::isValidRegionStyleProperty): Deleted. (WebCore::StyleResolver::isValidCueStyleProperty): Deleted. * css/StyleResolver.h: 2017-07-25 Per Arne Vollan Dragged links are blurry on 1x displays. https://bugs.webkit.org/show_bug.cgi?id=174831 Reviewed by Simon Fraser. When the width and height of the drag image is a multiple of 2, the drag image is not blurry on a 1x display. This is a workaround which should be removed when is fixed. No new tests, since this is not straightforward to test with a layout test. * platform/mac/DragImageMac.mm: (WebCore::LinkImageLayout::LinkImageLayout): 2017-07-25 Matt Baker Web Inspector: Refactoring: extract async stack trace logic from InspectorInstrumentation https://bugs.webkit.org/show_bug.cgi?id=174738 Reviewed by Brian Burg. Relocate AsyncCallType from InspectorInstrumentation to the debugger agent. Plumbing for `requestAnimationFrame` notifications has been added to PageDebuggerAgent, which is responsible for managing async stack traces. * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didInstallTimerImpl): (WebCore::InspectorInstrumentation::didRemoveTimerImpl): (WebCore::InspectorInstrumentation::willFireTimerImpl): (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl): (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl): (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl): (): Deleted. (WebCore::didScheduleAsyncCall): Deleted. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didRequestAnimationFrame): (WebCore::InspectorInstrumentation::didCancelAnimationFrame): (WebCore::InspectorInstrumentation::willFireAnimationFrame): Replaced Frame and Document pointers with references and moved pointer validation upstream. * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::didRequestAnimationFrame): (WebCore::PageDebuggerAgent::willFireAnimationFrame): (WebCore::PageDebuggerAgent::didCancelAnimationFrame): * inspector/PageDebuggerAgent.h: 2017-07-25 Said Abou-Hallawa Async image decoding for large images should be disabled after the first time a tile is painted https://bugs.webkit.org/show_bug.cgi?id=174451 Reviewed by Simon Fraser. Flashing because of DOM mutation can be fixed by disabling the asynchronous image decoding after the first time a tile was painted. We can detect this by consulting the tile repaintCount. If it is zero, then it is safe to use asynchronous image decoded. If the tile repaintCount is greater than zero, we are not sure if the renderer rectangle has an image drawn in it already or not. In this case we have to use the synchronous image decoding to avoid causing a flash. Tests: fast/images/async-image-background-change.html fast/images/async-image-src-change.html http/tests/multipart/multipart-async-image.html * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * page/FrameView.cpp: (WebCore::FrameView::willPaintContents): (WebCore::FrameView::paintContentsForSnapshot): * page/PageOverlayController.cpp: (WebCore::PageOverlayController::paintContents): * page/PageOverlayController.h: * page/linux/ResourceUsageOverlayLinux.cpp: * page/mac/ServicesOverlayController.h: * page/mac/ServicesOverlayController.mm: (WebCore::ServicesOverlayController::Highlight::paintContents): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::draw): * platform/graphics/BitmapImage.h: * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::paintGraphicsLayerContents): * platform/graphics/GraphicsLayer.h: * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::paintContents): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::LayerClient::platformCALayerPaintContents): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::platformCALayerPaintContents): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/PlatformCALayerClient.h: (WebCore::PlatformCALayerClient::platformCALayerRepaintCount): * platform/graphics/ca/TileCoverageMap.cpp: (WebCore::TileCoverageMap::platformCALayerPaintContents): * platform/graphics/ca/TileCoverageMap.h: * platform/graphics/ca/TileGrid.cpp: (WebCore::TileGrid::platformCALayerPaintContents): (WebCore::TileGrid::platformCALayerRepaintCount): * platform/graphics/ca/TileGrid.h: * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (PlatformCALayer::drawLayerContents): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayer::drawLayerContents): * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::displayCallback): * platform/graphics/mac/WebLayer.mm: (-[WebLayer drawInContext:]): (-[WebSimpleLayer drawInContext:]): * rendering/PaintPhase.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::decodingModeForImageDraw): * rendering/RenderElement.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::paintForegroundForFragments): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::paintContents): * rendering/RenderLayerCompositor.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paintContents): * testing/Internals.cpp: (WebCore::imageFromImageElement): (WebCore::bitmapImageFromImageElement): (WebCore::Internals::imageFrameIndex): (WebCore::Internals::setImageFrameDecodingDuration): (WebCore::Internals::resetImageAnimation): (WebCore::Internals::isImageAnimating): (WebCore::Internals::setClearDecoderAfterAsyncFrameRequestForTesting): (WebCore::Internals::imageDecodeCount): (WebCore::Internals::setLargeImageAsyncDecodingEnabledForTesting): * testing/Internals.h: * testing/Internals.idl: 2017-07-23 Sam Weinig [WebIDL] Add support for generating timer bindings https://bugs.webkit.org/show_bug.cgi?id=174766 Reviewed by Darin Adler. Adds a new non-standard type, ScheduledAction, which stands in for the standard (DOMString or Function). It would be good to move to that in future, but for now, this allows for forward momentum on removing custom bindings. * WebCore.xcodeproj/project.pbxproj: Add JSDOMConvertScheduledAction.h. * bindings/IDLTypes.h: Add IDLScheduledAction. * bindings/js/JSDOMConvertScheduledAction.h: Added. (WebCore::Converter::convert): Add conversion from JSValue -> ScheduledAction. This is moved from the old ScheduledAction create function. * bindings/js/JSDOMConvertVariadic.h: (WebCore::convertVariadicArguments): (WebCore::Detail::VariadicConverterBase::convert): Deleted. (WebCore::Detail::VariadicConverterBase>::convert): Deleted. * bindings/js/JSDOMConvertBase.h: * bindings/js/JSDOMConvertAny.h: (WebCore::VariadicConverter::convert): * bindings/js/JSDOMConvertInterface.h: (WebCore::VariadicConverter>::convert): Rename VariadicConverter to VariadicConverterDetails, and remove base class. Rename VariadicConverterBase to VariadicConverter, and move specializations to the file containing the base converter for that IDL type * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setTimeout): Deleted. (WebCore::JSDOMWindow::setInterval): Deleted. * bindings/js/JSWorkerGlobalScopeCustom.cpp: (WebCore::JSWorkerGlobalScope::setTimeout): Deleted. (WebCore::JSWorkerGlobalScope::setInterval): Deleted. Remove custom implementations of setTimeout and setInterval. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): (WebCore::ScheduledAction::ScheduledAction): (WebCore::ScheduledAction::~ScheduledAction): (WebCore::ScheduledAction::addArguments): (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScheduledAction.h: (WebCore::ScheduledAction::ScheduledAction): Deleted. Rework ScheduledAction. Now has two create functions, one for the function form, one for the string form. These are now called by the Converter. Also, rather than extracting the arguments directly from the ExecState, allow the bindings to work as designed, and have the arguments come in as variadic arguments to setTimeout/setInterval and get added to the ScheduledAction if needed. Also, move ContentSecurityPolicy check out of construction, and into setTimeout/setInterval. * bindings/scripts/CodeGenerator.pm: (IsBuiltinType): Add ScheduledAction to the builtin list. * bindings/scripts/CodeGeneratorJS.pm: (AddToIncludesForIDLType): Add the correct include when ScheduledAction is used. (GenerateParametersCheck): Remove rule disallowing optional arguments before variadic arguments. That works just fine. (GetBaseIDLType): Add mapping of ScheduledAction -> IDLScheduledAction. (JSValueToNativeDOMConvertNeedsGlobalObject): Add ScheduledAction to the list of types that need a global object for conversion. * page/WindowOrWorkerGlobalScope.idl: Update interface to match spec and add FIXMEs for moving to TimerHandler. * page/DOMWindow.cpp: (WebCore::DOMWindow::setTimeout): (WebCore::DOMWindow::setInterval): * page/DOMWindow.h: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::setTimeout): (WebCore::WorkerGlobalScope::setInterval): * workers/WorkerGlobalScope.h: Update for new signatures. WorkerGlobalScope now has to return ExceptionOr even though it never throws, due to having one IDL file defining these. This is unfortunate and something we should look at addressing the future. 2017-07-25 Yoshiaki Jitsukawa [WinCairo] Fix build with AllInOnes disabled https://bugs.webkit.org/show_bug.cgi?id=174784 Reviewed by Alex Christensen. * PlatformWin.cmake: Add RenderThemeWin.cpp to WebCore_SOURCES * rendering/RenderingAllInOne.cpp: Remove #include "RenderThemeWin.cpp" * testing/MemoryInfo.h: Remove #include "JSDomWindow.h" * bindings/js/JSDOMGlobalObject.cpp: * bindings/js/JSDOMPromiseDeferred.cpp: * bindings/js/JSDOMWrapper.cpp: * bindings/js/JSImageDataCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallWith): * dom/ScriptExecutionContext.cpp: * inspector/InspectorController.cpp: * inspector/InspectorTimelineAgent.cpp: * rendering/RenderMediaControls.cpp: * rendering/RenderMediaControls.h: * rendering/RenderThemeWin.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: Update test results. 2017-07-25 Konstantin Tokarev Unreviewed, fix Mac CMake build after r219567 * PlatformMac.cmake: 2017-07-23 Darin Adler More NeverDestroyed and related cleanup https://bugs.webkit.org/show_bug.cgi?id=174745 Reviewed by Alex Christensen. * bindings/js/JSCustomElementInterface.cpp: (WebCore::JSCustomElementInterface::constructElementWithFallback): Use isNull() rather than comparing against nullAtom() since it's slightly more efficient. * css/MediaQueryEvaluator.cpp: (WebCore::prefersReducedMotionEvaluate): Use a switch statement for the three states of forcedPrefersReducedMotionAccessibilityValue. Also update to use Theme::singleton() instead of platformTheme(). * dom/QualifiedName.h: Removed some unneeded includes, minor style tweaks, and use isNull() rather than comparing against nullAtom() since it's slightly more efficient. * html/Autofill.cpp: (WebCore::AutofillData::createFromHTMLFormControlElement): Use isNull() rather than comparing against nullAtom() since it's slightly more efficient. * html/HTMLDocument.cpp: (WebCore::addLocalNameToSet): Deleted. (WebCore::createHtmlCaseInsensitiveAttributesSet): Deleted. (WebCore::HTMLDocument::isCaseSensitiveAttribute): Moved the case-sensitive attribute set in here and made it use makeNeverDestroyed. * html/HTMLNameCollection.cpp: (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch): Formatted vertically and sorted so it's easier to see what it does. (WebCore::WindowNameCollection::elementMatches): Use boolean logic instead of multiple return statements to make this a little more straightforward. (WebCore::isObjectElementForDocumentNameCollection): Added. Calls the new isExposed function. The old code called this isDocNamedItem. (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch): Use isObjectElementForDocumentNameCollection to clean up logic. Also sorted classes. (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch): Use isObjectElementForDocumentNameCollection to clean up logic. Also sorted classes and formatted vertically. (WebCore::DocumentNameCollection::elementMatches): Write in terms of above functions for clarity. Efficiency is roughly the same. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::HTMLObjectElement): Initialize data members in class definition instead of here. (WebCore::HTMLObjectElement::childrenChanged): Update for name change; function is now called updateExposedState rather than updateDocNamedItem. Also use m_useFallbackContent directly instead of through a function. (WebCore::HTMLObjectElement::renderFallbackContent): Ditto. (WebCore::preventsParentObjectFromExposure): Added. Replaces the old isRecognizedTagName function, and does almost the same thing, but the argument type is different and the param tag is now one of the tags exempted here. Also broke up into two overloads so we can handle the Element, Text, and other Node cases. (WebCore::shouldBeExposed): Added. Helper for the updateExposedState function that handles the logic of when the element should be exposed, separating it from what to do when the state changes. (WebCore::HTMLObjectElement::updateExposedState): Renamed from updateDocNamedItem. * html/HTMLObjectElement.h: Renamed isDocNamedItem -> isExposed, m_docNamedItem -> m_isExposed, updateDocNamedItem -> updateExposedState, stopped using bit fields for the two boolean data members, and initialized those data members here in the class definition. * platform/Theme.cpp: (WebCore::Theme::baselinePositionAdjustment): Moved here from header. (WebCore::Theme::controlFont): Ditto. (WebCore::Theme::controlSize): Ditto. (WebCore::Theme::minimumControlSize): Ditto. (WebCore::Theme::controlRequiresPreWhiteSpace): Ditto. (WebCore::Theme::paint): Ditto. (WebCore::Theme::inflateControlPaintRect): Ditto. (WebCore::Theme::userPrefersReducedMotion): Ditto. (WebCore::Theme::controlBorder): Fixed switch statement indentation. (WebCore::Theme::controlPadding): Ditto. * platform/Theme.h: Removed the many unnecessary includes. The one I was really after here was FontCascade.h. Replaced the platformTheme function with a singleton function, following our normal style. Also changed the return type to a reference rather than a pointer. Removed many unused function and data members. * platform/cocoa/ThemeCocoa.h: Tightened up implementation, removing unnecessary members and making overrides private. * platform/cocoa/ThemeCocoa.mm: Moved include in here. * platform/gamepad/glib/GamepadsGlib.cpp: (WebCore::sampleGamepads): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL. * platform/graphics/FontCascade.cpp: (WebCore::useBackslashAsYenSignForFamily): Build the set in a cleaner way and use a NeverDestroyed set instead of a heap-allocated one. (WebCore::FontCascade::FontCascade): Moved initialization of data members to the class definition. * platform/graphics/FontCascade.h: Initialize GlyphOverflow and FonstCascade data members in the class definition. Remove the constructor for GlyphOverflow entirely. Added FIXME about the peculiar != operator we defined for GlyphOverflow. * platform/graphics/NamedImageGeneratedImage.cpp: (WebCore::NamedImageGeneratedImage::draw): Use Theme::singleton() instead of platformTheme(). (WebCore::NamedImageGeneratedImage::drawPattern): Ditto. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::CMTimeRangeStartKey): Use CFSTR directly instead of using DEPRECATED_DEFINE_STATIC_LOCAL. (WebCore::CMTimeRangeDurationKey): Ditto. (WebCore::CACFContextNeedsFlushNotification): Ditto. * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::singleton): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL. * platform/graphics/ca/win/LayerChangesFlusher.h: Ditto. * platform/graphics/cg/ImageSourceCGWin.cpp: (WebCore::preferredExtensionForImageSourceType): Use HashMap constructor instead of writing out a lot of add calls. * platform/graphics/harfbuzz/HarfBuzzFace.cpp: (WebCore::harfBuzzFaceCache): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL. * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::lastResortFallbackFont): Ditto. * platform/ios/ThemeIOS.h: Tightened up implementation, removing unnecessary members and making overrides private. * platform/ios/ThemeIOS.mm: (WebCore::Theme::singleton): Renamed from platformTheme. * platform/mac/ThemeMac.h: Tightened up implementation, removing unnecessary members and making overrides private. Removed unneeded WTF_MAKE_FAST_ALLOCATED since this is never allocated on the heap. Removed unused -[NSFont webCoreFamilyName] method. * platform/mac/ThemeMac.mm: (-[NSFont webCoreFamilyName]): Deleted. (WebCore::Theme::singleton): Renamed from platformTheme. * platform/mediastream/mac/MockRealtimeAudioSourceMac.h: Removed unneeded include of FontCascade.h. * platform/mediastream/mac/MockRealtimeVideoSourceMac.h: Ditto. * platform/mock/MockRealtimeAudioSource.h: Ditto. * platform/network/win/DownloadBundleWin.cpp: (WebCore::DownloadBundle::fileExtension): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL. * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::replaceNewlinesWithWindowsStyleNewlines): Use appendLiteral instead of DEPRECATED_DEFINE_STATIC_LOCAL. * platform/win/FileSystemWin.cpp: (WebCore::bundleName): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL, and used a lambda to initialize rather than a boolean to control one-time code. (WebCore::storageDirectory): Removed unneeded use of DEPRECATED_DEFINE_STATIC_LOCAL for a prefix we are appending to a String. The + operator can handle a literal just as efficiently without first storing it in a String. * platform/wpe/ThemeWPE.cpp: (WebCore::Theme::singleton): Renamed from platformTheme. * platform/wpe/ThemeWPE.h: Tightened up implementation, removing unnecessary members and making overrides private. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::RenderTheme): No need to initialize m_theme. (WebCore::RenderTheme::adjustStyle): Use Theme::singleton() instead of accessing it through m_theme. (WebCore::RenderTheme::paint): Ditto. (WebCore::RenderTheme::baselinePosition): Ditto. (WebCore::RenderTheme::adjustRepaintRect): Ditto. (WebCore::RenderTheme::setCustomFocusRingColor): Ditto. (WebCore::RenderTheme::platformTapHighlightColor): Ditto. * rendering/RenderTheme.h: Removed unneded m_theme and unneeded inclusion of Theme.h. * rendering/line/LineBreaker.h: Removed unneeded include of FontCascade.h. 2017-07-24 Chris Dumez ExceptionCode enumeration should use modern exception names https://bugs.webkit.org/show_bug.cgi?id=174794 Reviewed by Geoffrey Garen. ExceptionCode enumeration should use modern exception names consistently. This makes the code nicer and closer to the text of the specification. 2017-07-24 Andy Estes Consider implementing W3C Payment Request API https://bugs.webkit.org/show_bug.cgi?id=174796 Reviewed by Daniel Bates. Add Payment Request to features.json as "Under Consideration". * features.json: 2017-07-24 Konstantin Tokarev Unreviewed attempt to fix Mac cmake build * PlatformMac.cmake: 2017-07-24 Chris Dumez Make ExceptionCode a proper enumeration https://bugs.webkit.org/show_bug.cgi?id=174771 Reviewed by Sam Weinig. Make ExceptionCode a proper enumeration instead of a typedef to uint8_t. * Modules/fetch/FetchBody.h: (WebCore::FetchBody::formData): * Modules/indexeddb/shared/IDBError.h: (WebCore::IDBError::encode): (WebCore::IDBError::decode): * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::rejectWithException): * dom/Exception.h: * dom/ExceptionCode.h: * fileapi/FileReaderSync.cpp: (WebCore::errorCodeToExceptionCode): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::texSubImage2D): (WebCore::WebGLRenderingContextBase::texImage2D): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): * xml/XMLHttpRequest.h: 2017-07-24 Simon Fraser Change "client" coordinates back to match scrolling coordinates https://bugs.webkit.org/show_bug.cgi?id=174734 rdar://problem/33336930 Reviewed by Tim Horton. Baidu.com (which uses jQuery), and various iOS apps make the assumption that getBoundingClientRect() returns a rectangle that can be used to set or compare with the scroll position. With visual viewports, that assumption is no longer valid when the page is zoomed, or when the keyboard has caused the visual viewport to detach from the layout viewport. At this point the compatibility cost of shipping layout viewport-based client rects seems higher than the gain, so revert to the shipping behavior. This reverts r216803, and will re-introduce bugs that occurred on zoomed pages on macOS, many of which are noted in webkit.org/b/170981. * page/FrameView.cpp: (WebCore::FrameView::documentToClientOffset): 2017-07-24 Zan Dobersek [WPE] libepoxy headers can use EGL_CAST, which might not be defined by eglplatform.h https://bugs.webkit.org/show_bug.cgi?id=174780 Reviewed by Carlos Garcia Campos. Newer versions of libepoxy provide EGL definitions that already use the EGL_CAST macro. We'd like to compile on systems where the eglplatform.h header doesn't yet provide that macro that was added only recently (e.g. it's available in Mesa 17.1, but not before). To address that, the EpoxyEGL.h header is added that first includes the libepoxy's EGL header and then provides the EGL_CAST definition in case the eglplatform.h header doesn't. This header should be included in place of (which is included in this new header). The EpoxyEGL.h and EpoxyShims.h headers are also moved under the platform/graphics/epoxy/ directory, with the new directory added to the list of inclusion paths for WPE. * PlatformWPE.cmake: * platform/graphics/PlatformDisplay.cpp: * platform/graphics/cairo/CairoUtilities.cpp: * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/egl/GLContextEGLWPE.cpp: * platform/graphics/epoxy/EpoxyEGL.h: Added. * platform/graphics/epoxy/EpoxyShims.h: Renamed from Source/WebCore/platform/graphics/EpoxyShims.h. * platform/graphics/opengl/Extensions3DOpenGLES.cpp: * platform/graphics/wpe/PlatformDisplayWPE.cpp: 2017-07-24 Zan Dobersek [CoordinatedGraphics] Remove unused GLDefs.h header https://bugs.webkit.org/show_bug.cgi?id=174712 Reviewed by Michael Catanzaro. * platform/graphics/opengl/GLDefs.h: Remove this unused header. As far as my recollection goes it was used in the IPC-based CoordinatedGraphics subsystem, which has been removed already. 2017-07-11 Frederic Wang Add attribute allow-top-navigation-by-user-activation to iframe sandbox https://bugs.webkit.org/show_bug.cgi?id=171327 Reviewed by Chris Dumez. Tests: http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-1.html http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-2.html imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt * dom/Document.cpp: (WebCore::Document::canNavigate): Case 2 of conformance verification is refined to match the current specification: Top navigation is allowed when it is triggered by user activation and when allow-top-navigation-by-user-activation is set. Because we have additional "security origin" rules with respect to the specification we also add some early return to ensure that navigation is really allowed for this new case. * dom/SecurityContext.cpp: (WebCore::SecurityContext::isSupportedSandboxPolicy): Add allow-top-navigation-by-user-activation flag. (WebCore::SecurityContext::parseSandboxPolicy): Parse the new flag to allow top user navigation by user activation. Also, make sure that allow-top-navigation allows such navigation as defined by the specification. * dom/SecurityContext.h: Declare new sandboxing flag. 2017-07-23 Wenson Hsieh [iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values https://bugs.webkit.org/show_bug.cgi?id=174769 Reviewed by Tim Horton. These tests began failing after r219541, due to a change in behavior of whether or not we call setIgnoreSelectionChanges(false, RevealSelection::No) or setIgnoreSelectionChanges(false, RevealSelection::Yes) when performing a text editing drop. Before r219541, we would not reveal the selection when performing an edit drag operation. This is because in WebPage::performDragControllerAction, we would begin ignoring selection changes by calling setIgnoreSelectionChanges(true). However, while taking a text indicator snapshot, we would stop ignoring selection in TextIndicator::createWithRange due to us calling setIgnoreSelectionChanges(false, RevealSelection::No) at the end of the function. Then, when we return to the scope of WebPage::performDragControllerAction and try to setIgnoreSelectionChanges(false), this is a no-op because we've already stopped ignoring selection changes. After r219541, switching to using TemporarySelectionChange means that TextIndicator::createWithRange now means we respect whether or not we were already ignoring selection before taking the snapshot, so we won't always setIgnoreSelectionChanges(false) at the end. This means that selection changes will now be correctly ignored when performing a drag operation, but this also means that we'll try to reveal the selection, since WebPage::performDragControllerAction calls setIgnoreSelectionChanges(false), for which RevealSelection::Yes is used by default. Revealing the selection in WebPage::performDragControllerAction was unintended in the first place, so we should revert to calling setIgnoreSelectionChanges(false, RevealSelection::No). To ensure this, we adopt TemporarySelectionChange here and pass only TemporarySelectionOptionIgnoreSelectionChanges, so that we won't additionally try to reveal selection after the drop. This is consistent with behavior prior to macOS 10.13 and iOS 11. Additionally, this patch also moves the call to ignore selection change from WebKit into WebCore, so that whether we ignore selection is consistent across both WebKit1 and WebKit2. * page/DragController.cpp: (WebCore::DragController::performDragOperation): 2017-07-23 Chris Dumez Drop ExceptionCodeDescription class https://bugs.webkit.org/show_bug.cgi?id=174757 Reviewed by Darin Adler. Drop ExceptionCodeDescription class now that there is only one exception type: DOMException. Instead, we now have static methods on DOMException to get the name / message for a given exception code. * CMakeLists.txt: * Modules/indexeddb/shared/IDBError.cpp: (WebCore::IDBError::name): (WebCore::IDBError::message): * Modules/quota/StorageErrorCallback.cpp: (WebCore::StorageErrorCallback::CallbackTask::CallbackTask): * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * dom/DOMAllInOne.cpp: * dom/DOMException.cpp: (WebCore::errorCodeFromName): (WebCore::DOMException::create): (WebCore::DOMException::DOMException): (WebCore::DOMException::name): (WebCore::DOMException::message): * dom/DOMException.h: * dom/ExceptionCodeDescription.cpp: Removed. * dom/ExceptionCodeDescription.h: Removed. * inspector/DOMEditor.cpp: (WebCore::populateErrorString): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::toErrorString): * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): 2017-07-22 Dan Bernstein Fixed building for macOS 10.12 with the macOS 10.13 SDK after r219644. * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: (WebCore::CDMSessionAVStreamSession::update): Suppress the objc-literal-conversion warning in one place where we are calling a class method on a Class and the compiler can’t tell which class it is, so it chooses wrong and emits a warning. 2017-07-22 Chris Dumez Merge ExceptionBase into DOMException and drop custom toString https://bugs.webkit.org/show_bug.cgi?id=174755 Reviewed by Sam Weinig. Merge ExceptionBase into DOMException and drop custom toString, now that DOMException is the only remaining exception type. * CMakeLists.txt: * Modules/mediastream/MediaStream.h: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::retrieveErrorMessage): * dom/DOMAllInOne.cpp: * dom/DOMException.cpp: (WebCore::DOMException::DOMException): (WebCore::DOMException::initializeDescription): * dom/DOMException.h: (WebCore::DOMException::code): (WebCore::DOMException::name): (WebCore::DOMException::message): * dom/ExceptionBase.cpp: Removed. * dom/ExceptionBase.h: Removed. 2017-07-14 Filip Pizlo It should be easy to decide how WebKit yields https://bugs.webkit.org/show_bug.cgi?id=174298 Reviewed by Saam Barati. No new tests because the WebCore change is just a change to how we #include things. * inspector/InspectorPageAgent.h: * inspector/TimelineRecordFactory.h: * workers/Worker.h: * workers/WorkerGlobalScopeProxy.h: * workers/WorkerMessagingProxy.h: 2017-07-22 Said Abou-Hallawa REGRESSION(r219045): A partially loaded image may not be repainted when its complete frame finishes decoding https://bugs.webkit.org/show_bug.cgi?id=174230 Reviewed by Simon Fraser. Because of r219045, we now only repaint the CachedImageClinets which tried to draw the image but they could not because they have to wait for the image decoding to finish. This was done by keeping a HashSet of these clients and make CachedImage own it. This HashSet is cleared once the image frame finishes decoding and all the waited clients are repainted. But Multiple asynchronous image decoding requests are allowed for the same frame if new data is added to the image source. If we tried to draw the same image twice before it finishes decoding the first request, we will not be to record this second request since the HashSet will not add the same client twice. When he second request finishes decoding, CachedImage will not repaint any client since its HashSet is empty. To fix this problem we can do the following. When an image frame finishes decoding, CachedImage will keep its HashSet of pending drawing clients as long as the image frame is a partially loaded frame. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::CachedImageObserver::imageFrameAvailable): (WebCore::CachedImage::imageFrameAvailable): * loader/cache/CachedImage.h: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedData): (WebCore::BitmapImage::dataChanged): (WebCore::BitmapImage::setCurrentFrameDecodingStatusIfNecessary): (WebCore::BitmapImage::draw): (WebCore::BitmapImage::internalStartAnimation): (WebCore::BitmapImage::internalAdvanceAnimation): (WebCore::BitmapImage::imageFrameAvailableAtIndex): * platform/graphics/BitmapImage.h: * platform/graphics/ImageFrame.cpp: (WebCore::ImageFrame::decodingStatus): * platform/graphics/ImageFrame.h: Move DecodingStatus out of this class to ImageTypes.h to avoid adding other header files to ImageObvsever.h * platform/graphics/ImageFrameCache.cpp: (WebCore::ImageFrameCache::setNativeImage): (WebCore::ImageFrameCache::cacheMetadataAtIndex): (WebCore::ImageFrameCache::cacheNativeImageAtIndex): (WebCore::ImageFrameCache::cacheNativeImageAtIndexAsync): (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): (WebCore::ImageFrameCache::frameDecodingStatusAtIndex): * platform/graphics/ImageFrameCache.h: * platform/graphics/ImageObserver.h: * platform/graphics/ImageSource.h: (WebCore::ImageSource::frameDecodingStatusAtIndex): * platform/graphics/ImageTypes.h: * platform/image-decoders/bmp/BMPImageReader.cpp: (WebCore::BMPImageReader::decodeBMP): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::frameComplete): (WebCore::GIFImageDecoder::initFrameBuffer): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::outputScanlines): (WebCore::JPEGImageDecoder::jpegComplete): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::rowAvailable): (WebCore::PNGImageDecoder::pngComplete): (WebCore::PNGImageDecoder::frameComplete): * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::decodingModeForImageDraw): 2017-07-22 Timothy Horton Drag and Drop preview image for Twitter link is the wrong shape ​https://bugs.webkit.org/show_bug.cgi?id=174731 * dom/Range.cpp: (WebCore::Range::absoluteRectsForRangeInText): * page/TextIndicator.cpp: (WebCore::initializeIndicator): Apply some post-landing review feedback for r219756. 2017-07-21 Chris Dumez Drop IDBDatabaseException class https://bugs.webkit.org/show_bug.cgi?id=174743 Reviewed by Darin Adler. Drop IDBDatabaseException class and use DOMException directly. IDBDatabaseException was only an internal concept and was already exposed to the Web as a DOMException. This simplifies the code a bit and will allow for further simplification in a follow-up patch. No new tests, no Web-facing behavior change, except for some exception messages being slightly different. * CMakeLists.txt: * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): (WebCore::IDBCursor::advance): (WebCore::IDBCursor::continuePrimaryKey): (WebCore::IDBCursor::continueFunction): (WebCore::IDBCursor::deleteFunction): * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): (WebCore::IDBDatabase::transaction): (WebCore::IDBDatabase::deleteObjectStore): * Modules/indexeddb/IDBDatabaseError.h: Removed. * Modules/indexeddb/IDBDatabaseException.cpp: Removed. * Modules/indexeddb/IDBDatabaseException.h: Removed. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::cmp): * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::setName): (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): (WebCore::IDBIndex::count): (WebCore::IDBIndex::doCount): (WebCore::IDBIndex::get): (WebCore::IDBIndex::doGet): (WebCore::IDBIndex::getKey): (WebCore::IDBIndex::doGetKey): (WebCore::IDBIndex::getAll): (WebCore::IDBIndex::getAllKeys): * Modules/indexeddb/IDBKeyRange.cpp: (WebCore::IDBKeyRange::only): (WebCore::IDBKeyRange::lowerBound): (WebCore::IDBKeyRange::upperBound): (WebCore::IDBKeyRange::bound): (WebCore::IDBKeyRange::includes): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::setName): (WebCore::IDBObjectStore::openCursor): (WebCore::IDBObjectStore::openKeyCursor): (WebCore::IDBObjectStore::get): (WebCore::IDBObjectStore::getKey): (WebCore::IDBObjectStore::putOrAdd): (WebCore::IDBObjectStore::doDelete): (WebCore::IDBObjectStore::deleteFunction): (WebCore::IDBObjectStore::clear): (WebCore::IDBObjectStore::createIndex): (WebCore::IDBObjectStore::index): (WebCore::IDBObjectStore::deleteIndex): (WebCore::IDBObjectStore::count): (WebCore::IDBObjectStore::doCount): (WebCore::IDBObjectStore::getAll): (WebCore::IDBObjectStore::getAllKeys): * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::result): (WebCore::IDBRequest::error): (WebCore::IDBRequest::uncaughtExceptionInEventHandler): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::abort): (WebCore::IDBTransaction::abortOnServerAndCancelRequests): (WebCore::IDBTransaction::didCreateIndexOnServer): (WebCore::IDBTransaction::putOrAddOnServer): * Modules/indexeddb/server/IndexValueStore.cpp: (WebCore::IDBServer::IndexValueStore::addRecord): * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction): (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction): (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction): (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore): (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore): (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore): (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore): (WebCore::IDBServer::MemoryIDBBackingStore::createIndex): (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex): (WebCore::IDBServer::MemoryIDBBackingStore::renameIndex): (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange): (WebCore::IDBServer::MemoryIDBBackingStore::addRecord): (WebCore::IDBServer::MemoryIDBBackingStore::getRecord): (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords): (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord): (WebCore::IDBServer::MemoryIDBBackingStore::getCount): (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): (WebCore::IDBServer::MemoryIDBBackingStore::openCursor): (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor): * Modules/indexeddb/server/MemoryIndex.cpp: (WebCore::IDBServer::MemoryIndex::putIndexKey): * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::createIndex): (WebCore::IDBServer::MemoryObjectStore::deleteIndex): * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange): (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords): (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey): (WebCore::IDBServer::SQLiteIDBBackingStore::getCount): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue): (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue): (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber): (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber): (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber): (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor): (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor): * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: (WebCore::IDBServer::SQLiteIDBTransaction::begin): (WebCore::IDBServer::SQLiteIDBTransaction::commit): (WebCore::IDBServer::SQLiteIDBTransaction::abort): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore): (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore): (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex): (WebCore::IDBServer::UniqueIDBDatabase::renameIndex): (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction): (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): * Modules/indexeddb/shared/IDBError.cpp: (WebCore::IDBError::name): (WebCore::IDBError::message): (WebCore::IDBError::toDOMError): * Modules/indexeddb/shared/IDBError.h: (WebCore::IDBError::userDeleteError): (WebCore::IDBError::isNull): * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * dom/DOMException.cpp: (WebCore::DOMException::initializeDescription): Initialize description->code from using the actual error codes in the coreExceptions table, instead of initializing it using |ec|. |ec| is the index in the ExceptionCode enumeration and it matches the error code only for legacy exceptions. New exceptions such as DataError should have a code of 0. Without this change, w3c for IDB would start failing. * dom/ExceptionCodeDescription.cpp: (WebCore::ExceptionCodeDescription::ExceptionCodeDescription): * dom/ExceptionCodeDescription.h: 2017-07-21 Sam Weinig [WebIDL] Simplify XMLHttpRequest bindings by removing built-ins https://bugs.webkit.org/show_bug.cgi?id=174740 Reviewed by Chris Dumez. The behavior we were getting from XMLHttpRequest.js can be implemented with the [CachedAttribute] extended attribute. This reduces the number of JS -> C++ jumps required and makes the code more similar to other bindings that need caching of an IDL any value. * CMakeLists.txt: * DerivedSources.make: * xml/XMLHttpRequest.js: Removed. Remove XMLHttpRequest.js. * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::response): (WebCore::JSXMLHttpRequest::retrieveResponse): Deleted. * xml/XMLHttpRequest.idl: Replace builtin with a [CachedAttribute] and [CustomGetter] for the response property. 2017-07-21 Timothy Horton Drag and Drop preview image for Twitter link is the wrong shape https://bugs.webkit.org/show_bug.cgi?id=174731 Reviewed by Zalan Bujtas. TextIndicator uses Range::borderAndTextQuads and ::absoluteTextRects in order to get the rects of the indicated text. Currently, these functions do not respect clipping, so clipped-out text (e.g. as seen inside links on Twitter) generates lots of meaningless indicated rects. * page/TextIndicator.cpp: (WebCore::estimatedBackgroundColorForRange): (WebCore::hasAnyIllegibleColors): Change adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary to instead be hasAnyIllegibleColors, and referred to in the same place as hasNonInlineOrReplacedElements, so that it follows the same upgrade path (leaving textRects empty, so that it is later filled in with the absoluteBoundingRect). This was a mistake in r219033, which instead would end up painting all content, but filling in textRects with the actual individual text rects. This alone changes the behavior on Twitter from lots of jagged misplaced rects to a too-large bounding rect. Combined with the following changes, the bounding rect is reduced to the right size: (WebCore::initializeIndicator): Adopt the new Range::borderAndTextQuads and ::absoluteTextRects parameter and opt-in to respecting clipping for text rects. * dom/DOMRectList.cpp: (WebCore::DOMRectList::DOMRectList): * dom/DOMRectList.h: (WebCore::DOMRectList::create): Add a DOMRectList constructor and create() that take FloatRects, similar to the one that takes FloatQuads, but without the boundingRect() calls. * dom/Document.h: * dom/Document.cpp: (WebCore::Document::convertAbsoluteToClientRects): Add convertAbsoluteToClientRects, similar to covertAbsoluteToClientQuads, except acting on rects instead of quads. * dom/Range.cpp: (WebCore::Range::absoluteRectsForRangeInText): (WebCore::Range::absoluteTextRects): (WebCore::Range::getClientRects): (WebCore::Range::borderAndTextRects): (WebCore::Range::boundingRect): (WebCore::Range::absoluteBoundingRect): (WebCore::Range::borderAndTextQuads): Deleted. * dom/Range.h: Replace borderAndTextQuads with borderAndTextRects, because all callers just ended up calling boundingBox() on the quads. Factor absoluteRectsForRangeInText out of absoluteTextRects and borderAndTextQuads, and teach it to optionally intersect the text rects with their renderer's absoluteClippedOverflowRect. 2017-07-21 Per Arne Vollan Round-tripping stroke-width styles through getComputedStyle cause the text to gain a stroke. https://bugs.webkit.org/show_bug.cgi?id=174701 Reviewed by Simon Fraser. The initial value of stroke-color should be transparent, see https://www.w3.org/TR/fill-stroke-3/#stroke-color. Also, there is no need to set the graphics context in text stroke mode, if the stroke color is not visible. Test: fast/css/round-trip-stroke-width-using-computed-style.html * rendering/TextPaintStyle.cpp: (WebCore::updateGraphicsContext): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::initialStrokeWidth): (WebCore::RenderStyle::initialStrokeColor): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): 2017-07-21 Timothy Horton Remove an inaccurate comment from RenderTextLineBoxes * rendering/RenderTextLineBoxes.cpp: (WebCore::RenderTextLineBoxes::absoluteRectsForRange): This comment has been wrong for at least 4 years. 2017-07-21 Timothy Horton TextIndicator::estimatedTextColorsForRange asserts inside HashSet code (inserting reserved value) https://bugs.webkit.org/show_bug.cgi?id=174733 Reviewed by Wenson Hsieh. * page/TextIndicator.cpp: (WebCore::estimatedTextColorsForRange): (WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary): RGBA32 isn't a valid hash key, because we have no traits that define the empty or deleted values, nor do we have any bits we could feasibly use -- the full range of RGBA32 is easy to reach with various colors. Instead, hash Color directly. 2017-07-21 Nan Wang AX: Expose form validation on iOS as hint https://bugs.webkit.org/show_bug.cgi?id=174722 Reviewed by Chris Fleizach. Adding the validation message to the hint of the form control element. Test: accessibility/ios-simulator/form-control-validation-message.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isShowingValidationMessage): (WebCore::AccessibilityObject::validationMessage): * accessibility/AccessibilityObject.h: * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityHint]): (-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::isShowingValidationMessage): * html/HTMLFormControlElement.h: 2017-07-21 Konstantin Tokarev [cmake][Mac] Unreviewed, fix linking WebKitSystemInterface After r219560 link_directories() in PlatformXXX.cmake files does not affect corresponding targets. * PlatformMac.cmake: 2017-07-21 Sam Weinig [WebIDL] Remove the need for the side map of DeprecatedCSSOMValue roots https://bugs.webkit.org/show_bug.cgi?id=174713 Reviewed by Andreas Kling. We used to not want to bloat the size of CSSValues with a pointer to the owner CSSStyleDeclaration, so, for GC purposes we need kept a mapping of them on DOMWrapperWorld that only got set if a wrapper was made. Now that we have DeprecatedCSSOMValue, a wrapper for CSSValue that only gets created for the bindings, we no longer need the side table, and simply have the DeprecatedCSSOMValue maintain a reference to the CSSStyleDeclaration. * bindings/js/DOMWrapperWorld.h: (WebCore::DOMWrapperWorld::wrappers): Remove m_deprecatedCSSOMValueRoots and make m_wrappers private with a getter. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Deleted. Remove custom implementation of getPropertyCSSValue, now that it no longer needs to update m_deprecatedCSSOMValueRoots. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow): * bindings/js/JSDOMWrapperCache.h: (WebCore::getCachedWrapper): (WebCore::cacheWrapper): (WebCore::uncacheWrapper): * bindings/js/JSNodeCustom.cpp: (WebCore::getOutOfLineCachedWrapper): Use wrappers getter rather than direct member variable. * bindings/js/JSDeprecatedCSSOMValueCustom.cpp: (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots): Rather than checking the side table for roots, now get the root via the reference CSSStyleDeclaration. (WebCore::JSDeprecatedCSSOMValueOwner::finalize): Deleted. Remove custom finalize now that we don't have to remove ourself from m_deprecatedCSSOMValueRoots. * css/CSSStyleDeclaration.idl: Remove [Custom] from getPropertyCSSValue. * css/DeprecatedCSSOMValue.idl: Remove [JSCustomFinalize]. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper): * css/CSSImageValue.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper): * css/CSSPrimitiveValue.h: * css/CSSStyleDeclaration.h: * css/CSSValue.cpp: (WebCore::CSSValue::createDeprecatedCSSOMWrapper): * css/CSSValue.h: * css/DeprecatedCSSOMCounter.h: * css/DeprecatedCSSOMPrimitiveValue.cpp: (WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue): (WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue): (WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue): * css/DeprecatedCSSOMPrimitiveValue.h: (WebCore::DeprecatedCSSOMPrimitiveValue::create): (WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue): * css/DeprecatedCSSOMRGBColor.h: * css/DeprecatedCSSOMRect.h: * css/DeprecatedCSSOMValue.h: (WebCore::DeprecatedCSSOMValue::owner): (WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue): (WebCore::DeprecatedCSSOMComplexValue::create): (WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue): * css/DeprecatedCSSOMValueList.h: (WebCore::DeprecatedCSSOMValueList::create): (WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM): * css/PropertySetCSSStyleDeclaration.h: * svg/SVGElement.cpp: (WebCore::SVGElement::getPresentationAttribute): Pass owning CSSStyleDeclaration to DeprecatedCSSOMValue and derived classes. 2017-07-21 Andreas Kling Use more references in event dispatch code https://bugs.webkit.org/show_bug.cgi?id=174681 Reviewed by Geoffrey Garen. Make EventListener::handleEvent() take a ScriptExecutionContext&, Event&. Then make everything build again. Various null checks and assertions disappear in the process. * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSErrorHandler.h: * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::initializeJSFunction): (WebCore::JSEventListener::handleEvent): (WebCore::eventHandlerAttribute): * bindings/js/JSEventListener.h: (WebCore::JSEventListener::jsFunction): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSLazyEventListener.h: * dom/EventListener.h: * dom/EventTarget.cpp: (WebCore::EventTarget::fireEventListeners): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): * html/ImageDocument.cpp: (WebCore::ImageEventListener::handleEvent): * inspector/CommandLineAPIHost.cpp: (WebCore::listenerEntriesFromListenerInfo): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/InspectorIndexedDBAgent.cpp: * platform/Widget.h: (WebCore::Widget::handleEvent): * platform/cocoa/WebPlaybackSessionModelMediaElement.h: * platform/cocoa/WebPlaybackSessionModelMediaElement.mm: (WebCore::WebPlaybackSessionModelMediaElement::handleEvent): * platform/cocoa/WebVideoFullscreenModelVideoElement.h: * platform/cocoa/WebVideoFullscreenModelVideoElement.mm: (WebVideoFullscreenModelVideoElement::handleEvent): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefTargetEventListener::handleEvent): * svg/animation/SVGSMILElement.cpp: (WebCore::ConditionEventListener::handleEvent): (WebCore::SVGSMILElement::handleConditionEvent): * svg/animation/SVGSMILElement.h: 2017-07-21 Zalan Bujtas iBooks: Overlapping/missing content at beginning/end of paragraph. https://bugs.webkit.org/show_bug.cgi?id=174717 Reviewed by Simon Fraser. By definiton simple and normal line layout should always produce the exact same lineboxes. It enables us not to force repaint while swapping between these 2 line layouts. However in certain cases (font size pixel rounding as an example) they don't agree on how much content fits the line and that could result in missing/overlapping content due to the lack of repaint. Unable to test. * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::ensureLineBoxes): 2017-07-21 Chris Dumez Drop make_dom_exceptions.pl script that we only have DOMException https://bugs.webkit.org/show_bug.cgi?id=174699 Reviewed by Darin Adler. Drop make_dom_exceptions.pl script that we only have DOMException. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * WebCoreMacros.cmake: * bindings/js/JSDOMExceptionHandling.cpp: * css/FontFaceSet.cpp: * dom/DOMAllInOne.cpp: * dom/DOMExceptions.in: Removed. * dom/ExceptionCodeDescription.cpp: Added. (WebCore::ExceptionCodeDescription::ExceptionCodeDescription): * dom/ExceptionCodeDescription.h: Added. * dom/make_dom_exceptions.pl: Removed. * inspector/WebInjectedScriptHost.cpp: (WebCore::WebInjectedScriptHost::subtype): 2017-07-21 Said Abou-Hallawa [CG] An image should not invoke many system calls before confirming its format is supported https://bugs.webkit.org/show_bug.cgi?id=174692 Reviewed by Tim Horton. We should be careful when invoking system calls before confirming that the image type is available and it is one of the whitelist formats. Otherwise we will be calling the parsers of the unsupported formats. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::setImageDataBuffer): The check isAllowedImageUTI() is now done in ImageDecoder::encodedDataStatus() which will return Error if there is an error in the data or "isAllowedImageUTI() returns false." * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::dataChanged): Avoid calling canUseAsyncDecodingForLargeImages() before confirming the image type is available and it's supported by WebKit. canUseAsyncDecodingForLargeImages() tries to cache the first frame of the image to know its size. Asking the ImageFrameCache to destroy its decoded frames is not needed unless ImageFrameCache::decodedSize() is not zero. * platform/graphics/cg/ImageDecoderCG.cpp: (WebCore::ImageDecoder::encodedDataStatus): Avoid calling CGImageSourceGetStatus() before knowing the UTI of the image. When knowing it, we call CGImageSourceGetStatus() and if it returns kCGImageStatusIncomplete or kCGImageStatusComplete, we check whether isAllowedImageUTI() or not. If isAllowedImageUTI() returns false, return Error which will make the CachedImage cancel loading the rest of the image. 2017-07-21 Jeremy Jones AudioTrackPrivateMediaStreamCocoa shouldn't set AudioSession::setPreferredBufferSize https://bugs.webkit.org/show_bug.cgi?id=174707 rdar://problem/33446809 Reviewed by Eric Carlson. Manually tested for audio side effects. AudioChannel::copyFrom fails when AudioChannel lengths don't match. This happens because PlatformMediaSessionManager::updateSessionState() owns and sets AudioSession::setPreferredBufferSize(). However, AudioTrackPrivateMediaStreamCocoa::createAudioUnit, when it creates an input audio unit is setting AudioSession::setPreferredBufferSize() directly to its own arbitrary value. AudioSession::setPreferredBufferSize() should be managed by the higher level PlatformMediaSessionManager, and not modified by audio unit creation, in order to keep harmony within the audio pipeline. * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit): 2017-07-21 Jeremy Jones Noise when AudioChannel lengths don't match. https://bugs.webkit.org/show_bug.cgi?id=174706 rdar://problem/33389856 Reviewed by Eric Carlson. When AudioChannel lengths don't match, copyFrom() returns early leaving uninitialized data in the audio buffer. This change zeros out the data, so there isn't objectionable noise sent to the speaker. * platform/audio/AudioChannel.cpp: (WebCore::AudioChannel::copyFrom): 2017-07-21 Sam Weinig [WebIDL] Make a few parameters non-nullable in inspector IDL files https://bugs.webkit.org/show_bug.cgi?id=174719 Reviewed by Joseph Pecoraro. * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::databaseId): (WebCore::CommandLineAPIHost::storageId): * inspector/CommandLineAPIHost.h: * inspector/CommandLineAPIHost.idl: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::storageId): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::databaseId): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::showContextMenu): (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Remove nullability from arguments that should never be null. 2017-07-21 Brady Eidson Get rid of WebCore IconDatabase code. https://bugs.webkit.org/show_bug.cgi?id=174700 Reviewed by Tim Horton. No new tests (No behavior change). Tons of red. Very little green. No further explanation. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::implicitClose): * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): (WebCore::HistoryItem::~HistoryItem): (WebCore::HistoryItem::reset): (WebCore::HistoryItem::setURLString): * inspector/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::willSendRequest): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::startIconLoading): (WebCore::DocumentLoader::iconLoadDecisionAvailable): Deleted. (WebCore::iconLoadDecisionCallback): Deleted. (WebCore::DocumentLoader::getIconLoadDecisionForIconURL): Deleted. (WebCore::DocumentLoader::continueIconLoadWithDecision): Deleted. (WebCore::iconDataCallback): Deleted. (WebCore::DocumentLoader::getIconDataForIconURL): Deleted. * loader/DocumentLoader.h: (WebCore::DocumentLoader::linkIcons): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::stop): * loader/FrameLoader.h: (WebCore::FrameLoader::subframeLoader): (WebCore::FrameLoader::icon): Deleted. * loader/FrameLoaderClient.h: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/icon/IconController.cpp: Removed. * loader/icon/IconController.h: Removed. * loader/icon/IconDatabase.cpp: Removed. * loader/icon/IconDatabase.h: Removed. * loader/icon/IconDatabaseBase.cpp: Removed. * loader/icon/IconDatabaseBase.h: Removed. * loader/icon/IconDatabaseClient.h: Removed. * loader/icon/IconLoader.cpp: (WebCore::IconLoader::IconLoader): (WebCore::IconLoader::startLoading): (WebCore::IconLoader::notifyFinished): * loader/icon/IconLoader.h: * loader/icon/IconRecord.cpp: Removed. * loader/icon/IconRecord.h: Removed. * loader/icon/PageURLRecord.cpp: Removed. * loader/icon/PageURLRecord.h: Removed. * testing/Internals.cpp: (WebCore::Internals::shortcutIconURLs): 2017-07-21 Chris Dumez Rename DOMCoreException class to DOMException https://bugs.webkit.org/show_bug.cgi?id=174698 Reviewed by Darin Adler. Rename DOMCoreException class to DOMException to match its Web-exposed name. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * Modules/quota/StorageErrorCallback.cpp: (WebCore::StorageErrorCallback::CallbackTask::CallbackTask): * Modules/quota/StorageErrorCallback.h: * Modules/quota/StorageErrorCallback.idl: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::retrieveErrorMessage): (WebCore::createDOMException): * bindings/scripts/CodeGeneratorJS.pm: (GenerateOverloadDispatcher): * css/FontFaceSet.cpp: * css/FontFaceSet.h: * dom/DOMAllInOne.cpp: * dom/DOMException.cpp: Renamed from Source/WebCore/dom/DOMCoreException.cpp. (WebCore::DOMException::create): (WebCore::DOMException::DOMException): (WebCore::DOMException::initializeDescription): * dom/DOMException.h: Renamed from Source/WebCore/dom/DOMCoreException.h. (WebCore::DOMException::create): (WebCore::DOMException::DOMException): * dom/DOMException.idl: Renamed from Source/WebCore/dom/DOMCoreException.idl. * dom/DOMExceptions.in: * dom/make_dom_exceptions.pl: (generateImplementation): 2017-07-21 Sam Weinig Follow up to https://bugs.webkit.org/show_bug.cgi?id=174659. * inspector/InspectorFrontendHost.idl: Remove unnecessary JSGenerateToJSObject noticed in review. 2017-07-20 Chris Dumez Drop legacy SVGException type https://bugs.webkit.org/show_bug.cgi?id=174695 Reviewed by Darin Adler. Drop legacy SVGException type and use DOMException instead, as per the latest SVG specification. Both Chrome and Firefox no longer expose the SVGException type. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * dom/DOMExceptions.in: * svg/SVGAllInOne.cpp: * svg/SVGCircleElement.cpp: * svg/SVGException.cpp: Removed. * svg/SVGException.h: Removed. * svg/SVGException.idl: Removed. * svg/SVGGraphicsElement.idl: * svg/SVGLocatable.cpp: (WebCore::SVGLocatable::getTransformToElement): * svg/SVGMatrixValue.h: * svg/SVGPathSegList.cpp: (WebCore::SVGPathSegList::getItem): (WebCore::SVGPathSegList::replaceItem): (WebCore::SVGPathSegList::removeItem): * svg/SVGPathSegList.h: * svg/SVGPathSegList.idl: * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: * svg/properties/SVGListProperty.h: 2017-07-20 Chris Dumez Hook up ITP quirks to the needsSiteSpecificQuirks setting https://bugs.webkit.org/show_bug.cgi?id=174691 Reviewed by Darin Adler. Hook up ITP quirks to the needsSiteSpecificQuirks setting to make it easier for Web-developers to test their fixes. * loader/ResourceLoadObserver.cpp: (WebCore::shouldEnableSiteSpecificQuirks): (WebCore::areDomainsAssociated): (WebCore::ResourceLoadObserver::logFrameNavigation): (WebCore::resourceNeedsSSOQuirk): (WebCore::ResourceLoadObserver::logSubresourceLoading): (WebCore::ResourceLoadObserver::logWebSocketLoading): 2017-07-20 Matt Lewis Unreviewed, rolling out r219700. This revision caused consistent timouts on iOS. Reverted changeset: "Turn tests at media/modern-media-controls/start-support back on" https://bugs.webkit.org/show_bug.cgi?id=174683 http://trac.webkit.org/changeset/219700 2017-07-20 David Quesada Add SPI to notify WKNavigationDelegate about client redirects https://bugs.webkit.org/show_bug.cgi?id=174680 rdar://problem/33184886 Reviewed by Brady Eidson. * loader/FrameLoader.cpp: (WebCore::FrameLoader::performClientRedirect): * loader/FrameLoader.h: Add a convenience method for NavigationScheduler that handles a FrameLoadRequest as a client redirect. Currently this means loading the request and informing the client about it. * loader/FrameLoaderClient.h: Add FrameLoaderClient::dispatchDidPerformClientRedirect() to inform the client when a client redirect occurs. * loader/NavigationScheduler.cpp: Removed ScheduledURLNavigation::fire(). This class was never instantiated directly, and all subclasses override fire(), so this was unused code. For ScheduledRedirects and ScheduledLocationChange, use FrameLoader's new method to load the request as a client redirect. 2017-07-20 Chris Dumez Drop legacy XPathException type https://bugs.webkit.org/show_bug.cgi?id=174679 Reviewed by Sam Weinig. Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome no longer expose XPathException. Test: fast/dom/DOMException/XPathException-obsolete.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * dom/DOMExceptions.in: * xml/XPathException.cpp: Removed. * xml/XPathException.h: Removed. * xml/XPathException.idl: Removed. * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): * xml/XPathParser.cpp: (WebCore::XPath::Parser::parseStatement): * xml/XPathResult.cpp: (WebCore::XPathResult::convertTo): (WebCore::XPathResult::numberValue): (WebCore::XPathResult::stringValue): (WebCore::XPathResult::booleanValue): (WebCore::XPathResult::singleNodeValue): (WebCore::XPathResult::snapshotLength): (WebCore::XPathResult::iterateNext): (WebCore::XPathResult::snapshotItem): 2017-07-20 Chris Dumez Unreviewed, rolling out r219706. Broke iOS build Reverted changeset: "Drop legacy XPathException type" https://bugs.webkit.org/show_bug.cgi?id=174679 http://trac.webkit.org/changeset/219706 2017-07-20 Chris Dumez Drop legacy XPathException type https://bugs.webkit.org/show_bug.cgi?id=174679 Reviewed by Sam Weinig. Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome no longer expose XPathException. Test: fast/dom/DOMException/XPathException-obsolete.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * dom/DOMExceptions.in: * xml/XPathException.cpp: Removed. * xml/XPathException.h: Removed. * xml/XPathException.idl: Removed. * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): * xml/XPathParser.cpp: (WebCore::XPath::Parser::parseStatement): * xml/XPathResult.cpp: (WebCore::XPathResult::convertTo): (WebCore::XPathResult::numberValue): (WebCore::XPathResult::stringValue): (WebCore::XPathResult::booleanValue): (WebCore::XPathResult::singleNodeValue): (WebCore::XPathResult::snapshotLength): (WebCore::XPathResult::iterateNext): (WebCore::XPathResult::snapshotItem): 2017-07-20 Chris Dumez Regression(ITP): May get frequently logged out of wsj.com https://bugs.webkit.org/show_bug.cgi?id=174661 Reviewed by Geoffrey Garen. Add the concept of associated domains in the ResourceLoadObserver. We previously ignore loads to and from the same domains. We now do the same if the to and from domains are associated (i.e. owned by the same entity). For now, only add domains owned by Dow Jones & Company, Inc. to the list, to address login issues on wsj.com. No new tests, verified manually on wsj.com. * loader/ResourceLoadObserver.cpp: (WebCore::areDomainsAssociated): (WebCore::ResourceLoadObserver::logFrameNavigation): (WebCore::ResourceLoadObserver::logSubresourceLoading): (WebCore::ResourceLoadObserver::logWebSocketLoading): 2017-07-20 Chris Dumez Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable https://bugs.webkit.org/show_bug.cgi?id=174660 Reviewed by Geoffrey Garen. Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable. This essentially replaces a branch to figure out if the new size is less or greater than the current size by an assertion. * Modules/gamepad/Gamepad.cpp: (WebCore::Gamepad::Gamepad): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::addReaction): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::skipBuffer): * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::finish): * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::serializeSelector): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::append): * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp: (WebCore::gcryptEncrypt): (WebCore::gcryptDecrypt): * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp: (WebCore::gcryptDerive): * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::GameControllerGamepadProvider::controllerDidConnect): * platform/gamepad/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/graphics/ImageBackingStore.h: (WebCore::ImageBackingStore::setSize): * platform/graphics/WOFFFileFormat.cpp: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::resetCueValues): (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::cfData): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::frameBufferAtIndex): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decode): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::frameBufferAtIndex): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::frameBufferAtIndex): (WebCore::PNGImageDecoder::readChunks): * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::frameBufferAtIndex): * platform/image-encoders/JPEGImageEncoder.cpp: (WebCore::compressRGBABigEndianToJPEG): * platform/text/DecodeEscapeSequences.h: (WebCore::URLEscapeSequence::decodeRun): * platform/text/SuffixTree.h: (WebCore::SuffixTree::Node::Node): * rendering/Grid.cpp: (WebCore::Grid::setNeedsItemsPlacement): * rendering/RenderTable.cpp: (WebCore::RenderTable::invalidateCachedColumns): 2017-07-20 Chris Dumez Regression(ITP): Can no longer log in on abc.go.com https://bugs.webkit.org/show_bug.cgi?id=174533 Reviewed by Geoffrey Garen. Add quirk for sp.auth.adobe.com which is used for SSO by web sites such as abc.go.com. This would otherwise cause adobe.com to be identified as a tracker and log in on abc.go.com would break. No new tests, tested manually on abc.go.com. * loader/ResourceLoadObserver.cpp: (WebCore::resourceNeedsSSOQuirk): (WebCore::ResourceLoadObserver::logSubresourceLoading): 2017-07-20 Antoine Quint Turn tests at media/modern-media-controls/start-support back on https://bugs.webkit.org/show_bug.cgi?id=174683 Reviewed by Dean Jackson. Turning those tests back on revealed a small bug that is unlikely to really affect content on the Web. In the case where the size of the video is known right away, without the need for loading its metadata, as is the case in the start-support-click-to-start.html test with a local media resource, all queued layouts are flushed at once and we may call the layout() method of the left ButtonsContainer which originally is set to contain the play/pause button, which would remove the play/pause button from the center of the media. So before we potentially set the play/pause button as the central button, we first assign the default button set for the two ButtonsContainer instances and only add the play/pause button when we're not showing the prominent play/pause button. * Modules/modern-media-controls/controls/inline-media-controls.js: (InlineMediaControls.prototype.layout): (InlineMediaControls.prototype._leftContainerButtons): 2017-07-20 Chris Dumez Drop legacy FileException type https://bugs.webkit.org/show_bug.cgi?id=174676 Reviewed by Alex Christensen. Drop legacy FileException type and use DOMException instead, as per the latest File API specification: - https://w3c.github.io/FileAPI/#ErrorAndException Both Firefox and Chrome no longer expose FileException. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * dom/DOMExceptions.in: * fileapi/FileException.cpp: Removed. * fileapi/FileException.h: Removed. * fileapi/FileException.idl: Removed. * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::FileReaderLoader): (WebCore::FileReaderLoader::failed): * fileapi/FileReaderLoader.h: (WebCore::FileReaderLoader::errorCode): * fileapi/FileReaderSync.cpp: (WebCore::errorCodeToExceptionCode): (WebCore::FileReaderSync::startLoading): 2017-07-20 Sam Weinig [WebIDL] Remove custom bindings for InspectorFrontendHost https://bugs.webkit.org/show_bug.cgi?id=174659 Reviewed by Chris Dumez. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSInspectorFrontendHostCustom.cpp: Removed. Remove JSInspectorFrontendHostCustom.cpp. * inspector/InspectorFrontendHost.cpp: (WebCore::populateContextMenu): (WebCore::InspectorFrontendHost::showContextMenu): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Re-implement showContextMenu by using an IDL defined ContextMenuItem dictionary and converting from that to a WebCore::ContextMenu in the implementation. 2017-07-20 Charlie Turner [GTK] Layout Test http/tests/media/hls/hls-progress.html is failing https://bugs.webkit.org/show_bug.cgi?id=141469 Reviewed by Xabier Rodriguez-Calvar. A work-around for getting progress information in a timely manner from live pipelines. We cannot rely on getting BUFFERING messages within the stalled time window (3s), so we have to poll for progress information somehow. Makes the following pass reliably http/tests/media/hls/hls-audio-tracks-has-audio.html passed unexpectedly http/tests/media/hls/hls-audio-tracks.html passed unexpectedly http/tests/media/hls/hls-progress.html passed unexpectedly * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::findHLSQueue): (WebCore::isHLSProgressing): (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): 2017-07-20 Andreas Kling Minor Node->Element type tightening fixes https://bugs.webkit.org/show_bug.cgi?id=174651 Reviewed by Sam Weinig. Tighten up some Node* into Element* or even better, Element&. * dom/Document.cpp: (WebCore::acceptsEditingFocus): Take a const Element&. (WebCore::Document::setFocusedElement): * editing/Editor.cpp: (WebCore::Editor::findEventTargetFrom): Return an Element*. (WebCore::Editor::findEventTargetFromSelection): Ditto. (WebCore::Editor::pasteAsPlainText): (WebCore::Editor::pasteAsFragment): (WebCore::Editor::dispatchCPPEvent): * editing/Editor.h: * page/DragController.cpp: (WebCore::DragController::dispatchTextInputEventFor): 2017-07-20 Brady Eidson WKHTTPCookieStore API tests fail on High Sierra. and https://bugs.webkit.org/show_bug.cgi?id=174666 Reviewed by Andy Estes. Covered by existing API tests. In r219567 I'd moved cookie storage observation off of NSHTTPCookieStorage and NSNotificationCenter to CFHTTPCookieStorage observation callbacks. This is because notifications were only sent for the default [NSHTTPCookieStorage sharedHTTPCookieStorage] and not any of the other ones we keep in flight. Unfortunately that SPI has been disabled in High Sierra. Fortunately we found a way we can get non-shared NSHTTPCookieStorages to send notifications that works everywhere. * platform/network/cocoa/CookieStorageObserver.h: * platform/network/cocoa/CookieStorageObserver.mm: (-[WebCookieObserverAdapter initWithObserver:]): (-[WebCookieObserverAdapter cookiesChangedNotificationHandler:]): (WebCore::CookieStorageObserver::create): (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::~CookieStorageObserver): (WebCore::CookieStorageObserver::startObserving): Use a trick to call some SPI on non-shared NSHTTPCookieStorages to get them to send notifications. (WebCore::CookieStorageObserver::stopObserving): (WebCore::cookiesChanged): Deleted. * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieStorageObserver): 2017-07-20 Miguel Gomez [GStreamer] Some layout tests issue "g_mutex_clear() called on uninitialised or locked mutex" and flaky crash in ~MediaPlayerPrivateGStreamerBase https://bugs.webkit.org/show_bug.cgi?id=173952 Reviewed by Carlos Garcia Campos. Adjust MediaPlayerPrivateGStreamerBase to avoid concurrence problems with the GStreamer thread when destroying the object. Covered by existent tests. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): (WebCore::MediaPlayerPrivateGStreamerBase::repaint): (WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint): 2017-07-19 Zan Dobersek [EME] Push CDMInstance, CDMPrivate and associated types into the Platform layer https://bugs.webkit.org/show_bug.cgi?id=174496 Reviewed by Xabier Rodriguez-Calvar. Move the CDMInstance and CDMPrivate interfaces into the platform layer, enabling implementations of specific key systems at that level, as well as integration with the MediaPlayerPrivate stack without any layering violations. While the platform layer still uses the WebCore namespace, the two interface files have now been moved under the platform/encryptedmedia/ directory and out of the Modules/encryptedmedia/ directory where the Web-facing API implementation resides. The two interfaces integrated closely with the Web-facing enumerations and dictionaries: MediaKeyMessageType, MediaKeySessionType, MediaKeyStatus, MediaKeySystemConfiguration, MediaKeySystemCapability, MediaKeysRequirement and MediaKeysRestrictions. Definitions of these types are also moved to the platform layer without any changes (apart from renaming), and the previous types now alias against the types now located in the platform layer. No new tests -- no change in behavior. * CMakeLists.txt: * Modules/encryptedmedia/CDM.cpp: * Modules/encryptedmedia/CDM.h: * Modules/encryptedmedia/MediaKeyMessageType.h: * Modules/encryptedmedia/MediaKeySessionType.h: * Modules/encryptedmedia/MediaKeyStatus.h: * Modules/encryptedmedia/MediaKeySystemAccess.cpp: * Modules/encryptedmedia/MediaKeySystemAccess.h: * Modules/encryptedmedia/MediaKeySystemConfiguration.h: * Modules/encryptedmedia/MediaKeySystemMediaCapability.h: * Modules/encryptedmedia/MediaKeysRequirement.h: * Modules/encryptedmedia/MediaKeysRestrictions.h: * platform/encryptedmedia/CDMInstance.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMInstance.h. * platform/encryptedmedia/CDMKeyStatus.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h. * platform/encryptedmedia/CDMKeySystemConfiguration.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h. * platform/encryptedmedia/CDMMediaCapability.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h. * platform/encryptedmedia/CDMMessageType.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h. * platform/encryptedmedia/CDMPrivate.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivate.h. * platform/encryptedmedia/CDMRequirement.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h. * platform/encryptedmedia/CDMRestrictions.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeysRestrictions.h. * platform/encryptedmedia/CDMSessionType.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h. 2017-07-19 Zan Dobersek Unreviewed follow-up to r219674. * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Remove the AsyncScrollingCoordinator.h header include that was added by accident. 2017-07-19 Zan Dobersek [CMake] Clean up Web Crypto build targets https://bugs.webkit.org/show_bug.cgi?id=174253 Reviewed by Alex Christensen. Gather the common WebCrypto source files in CMakeLists.txt, including them in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO build guards to exclude the code from compilation if the feature is disabled. PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove duplicated build targets. PlatformMac.cmake still lists all the Mac-specific Web Crypto build targets. PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the USE_GCRYPT variable is enabled. Both ports at the moment enable that variable though as they by default leverage a libgcrypt-based CrpytoDigest implementation in the PAL library. The new GCrypt.cmake file adds the libgcrypt-specific Web Crypto build targets to the build and also sets up libgcrypt include directiories and libraries. No new tests -- no change in behavior. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformWPE.cmake: * platform/GCrypt.cmake: Added. 2017-07-19 Sam Weinig [WebIDL] Remove custom bindings for CommandLineAPIHost https://bugs.webkit.org/show_bug.cgi?id=174642 Reviewed by Joseph Pecoraro. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSCommandLineAPIHostCustom.cpp: Removed. Remove JSCommandLineAPIHostCustom.cpp. * bindings/js/JSDOMConvertObject.h: (WebCore::JSConverter::convert): Add missing JSConverter specialization for IDLObject. * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::inspect): (WebCore::listenerEntriesFromListenerInfo): (WebCore::CommandLineAPIHost::inspectedObject): (WebCore::CommandLineAPIHost::databaseId): (WebCore::CommandLineAPIHost::storageId): (WebCore::CommandLineAPIHost::inspectImpl): Deleted. (WebCore::CommandLineAPIHost::getEventListenersImpl): Deleted. (WebCore::CommandLineAPIHost::databaseIdImpl): Deleted. (WebCore::CommandLineAPIHost::storageIdImpl): Deleted. * inspector/CommandLineAPIHost.h: * inspector/CommandLineAPIHost.idl: Replace custom bindings with modern bindings affordances: dictionaries, records and sequences. 2017-07-19 Zan Dobersek Unreviewed CoordGraphics build fix. * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeViewportConstraints): This should be defined for the ScrollingCoordinatorCoordinatedGraphics class. Also fix the setFixedToViewport() call, fishing out the GraphicsLayer object from the ScrollingStateNode's LayerRepresentation. (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints): Deleted. 2017-07-19 Chris Dumez Drop SQLException type https://bugs.webkit.org/show_bug.cgi?id=174665 Reviewed by Sam Weinig. Drop SQLException type. We never throw such exception. Also, Firefox and Chrome no longer expose this type. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * Modules/webdatabase/SQLException.cpp: Removed. * Modules/webdatabase/SQLException.h: Removed. * Modules/webdatabase/SQLException.idl: Removed. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::createDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * dom/DOMExceptions.in: 2017-07-19 Wenson Hsieh Unreviewed, tweak a comment above TemporarySelectionOptionIgnoreSelectionChanges in Editor.cpp. The comment references the UI process, but it describes an entity in WebCore. This should have been generalized to instead refer to the client layer in general (i.e. WebKit1 or WebKit2). * editing/Editor.h: 2017-07-19 Simon Fraser getBoundingClientRects not updated for programmatic scrolls https://bugs.webkit.org/show_bug.cgi?id=174538 rdar://problem/33049012 Reviewed by Tim Horton. Baidu.com has two event handlers on its , and both query the input location with getBoundingClientRect() and the current pageYOffset (via jQuery), then try to scroll the input to the top of the screen. The bug is that programmatic scrolls did not immediately update the layout viewport rect, so the second call to getBoundingClientRect() would return stale coordinates, triggering an extra scroll. To fix this, undo the fix for r219320 which tried to keep getBoundingClientRect() current during unstable scroll updates by adding a shadow layout viewport rect. Instead, almost always update the layout viewport rect on FrameView, even during unstable visible rect updates, but not if content insets are being changed interactively, since changing viewport heights cause problems with bottom-fixed elements. Also, we need to compute a new layout viewport rect in FrameView::updateLayoutViewport() for programmatic scrolls. However, always updating the layout viewport triggered issues with the scrolling tree. The scrolling state tree fossilizes layer positions relative to a specific viewport rect, and that relationship has to be maintained. There are code paths that recompute fixed/sticky viewport constraints when the layout viewport has changed but we haven't done layout or recomputed layer positions (e.g. updating viewport-constrained layers via updateScrollCoordinatedLayersAfterFlush()) and in these cases using a new layout viewport for those computations results in an inconsistent scrolling tree. Fix this by not updating scrolling constraints every time we have to re-register scrolling nodes. updateScrollCoordinatedLayersAfterFlush() only needs to update the layer on the scrolling node (to handle tiled/non-tiled switches), so make updateScrollCoordinatedLayer() a little more fine-grained, and only update constraints when we've just computed layer geometry. This allows for different scrolling nodes to have constraints computed at different times, with different layout viewports, which happens. Two additional fixes were required to make bottom-fixed bars behave correctly. First, FrameView::computeLayoutViewportOrigin() had a bug where rounding of half-pixel values would cause it to fall into the if (visualViewport.height() > layoutViewport.height()) clause, but then fail to clamp for rubber-banding. Second, the FrameView::unscaledMaximumScrollPosition() was wrong after zooming on iOS, since it uses visibleSize() which is affected by page scale on iOS only (and the function wants scale-independent values). Fix with a hack that should be cleaned up via webkit.org/b/174648. Tested by existing tests. * page/FrameView.cpp: (WebCore::FrameView::computeUpdatedLayoutViewportRect): (WebCore::FrameView::computeLayoutViewportOrigin): (WebCore::FrameView::setLayoutViewportOverrideRect): (WebCore::FrameView::updateLayoutViewport): (WebCore::FrameView::unscaledMaximumScrollPosition): (WebCore::FrameView::documentToClientOffset): (WebCore::FrameView::setUnstableLayoutViewportRect): Deleted. * page/FrameView.h: * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): (WebCore::AsyncScrollingCoordinator::reconcileScrollingState): (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions): (WebCore::AsyncScrollingCoordinator::updateNodeLayer): (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints): (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode): Deleted. * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingCoordinator.cpp: (WebCore::operator<<): * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::reconcileScrollingState): (WebCore::ScrollingCoordinator::updateNodeLayer): (WebCore::ScrollingCoordinator::updateNodeViewportConstraints): (WebCore::ScrollingCoordinator::updateViewportConstrainedNode): Deleted. * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::updateConstraints): * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::updateConstraints): (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect): * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitTreeState): * page/scrolling/mac/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange): * page/scrolling/mac/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush): (WebCore::RenderLayerCompositor::updateBacking): (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged): (WebCore::RenderLayerCompositor::requiresCompositingForPosition): (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus): (WebCore::RenderLayerCompositor::computeFixedViewportConstraints): (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): (WebCore::RenderLayerCompositor::didAddScrollingLayer): * rendering/RenderLayerCompositor.h: 2017-07-19 Megan Gardner Don't write file URLs to iOS Pasteboard https://bugs.webkit.org/show_bug.cgi?id=174647 Reviewed by Wenson Hsieh. Tests updated to reflect the changes. We are no longer vending file URLs in Drag & Drop and Copy/Paste. * editing/ios/EditorIOS.mm: (WebCore::Editor::writeImageToPasteboard): * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::write): 2017-07-19 Myles C. Maxfield Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap https://bugs.webkit.org/show_bug.cgi?id=174406 Reviewed by Simon Fraser. Reviewed by NOBODY. When the minimumFontSize API preference is set, we will increase the font size without increasing the line height. If the content specifies line-height as an absolute value, there can be two unfortunate results: - Adjacent lines in a paragraph can overlap - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines can be cut off and potentially indecipherable. Instead, we should use the minimum font size preference as a signal that we should increase the line-height as well as the font-size. Eventually, we will want to increase it by an amount proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize, text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause a behavior change on many webpages which use small text, so such a change would be too risky right now. Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the only signal to boost the corresponding line-height. Tests: fast/text/line-height-minimumFontSize-text-zoom.html fast/text/line-height-minimumFontSize-visual.html fast/text/line-height-minimumFontSize-zoom.html fast/text/line-height-minimumFontSize.html fast/text/line-height-minimumFontSize-autosize.html * css/StyleBuilderCustom.h: (WebCore::computeBaseSpecifiedFontSize): (WebCore::computeLineHeightMultiplierDueToFontSize): (WebCore::StyleBuilderCustom::applyValueLineHeight): (WebCore::StyleBuilderCustom::applyValueFill): (WebCore::StyleBuilderCustom::applyValueStroke): (WebCore::StyleBuilderCustom::applyValueContent): * rendering/TextAutoSizing.cpp: 2017-07-18 Myles C. Maxfield Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap https://bugs.webkit.org/show_bug.cgi?id=174406 Reviewed by Simon Fraser. When the minimumFontSize API preference is set, we will increase the font size without increasing the line height. If the content specifies line-height as an absolute value, there can be two unfortunate results: - Adjacent lines in a paragraph can overlap - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines can be cut off and potentially indecipherable. Instead, we should use the minimum font size preference as a signal that we should increase the line-height as well as the font-size. Eventually, we will want to increase it by an amount proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize, text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause a behavior change on many webpages which use small text, so such a change would be too risky right now. Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the only signal to boost the corresponding line-height. Tests: fast/text/line-height-minimumFontSize-text-zoom.html fast/text/line-height-minimumFontSize-visual.html fast/text/line-height-minimumFontSize-zoom.html fast/text/line-height-minimumFontSize.html fast/text/line-height-minimumFontSize-autosize.html * css/StyleBuilderCustom.h: (WebCore::computeBaseSpecifiedFontSize): (WebCore::computeLineHeightMultiplierDueToFontSize): (WebCore::StyleBuilderCustom::applyValueLineHeight): (WebCore::StyleBuilderCustom::applyValueFill): (WebCore::StyleBuilderCustom::applyValueStroke): (WebCore::StyleBuilderCustom::applyValueContent): * rendering/TextAutoSizing.cpp: 2017-07-19 Chris Dumez DOMException should not have its own toString() https://bugs.webkit.org/show_bug.cgi?id=174630 Reviewed by Sam Weinig. DOMException should not have its own toString() and should use the one from Error.prototype.toString() instead: - https://heycam.github.io/webidl/#idl-DOMException No new tests, rebaselined existing tests. * dom/DOMCoreException.idl: 2017-07-19 Antoine Quint [iOS] REGRESSION: Scrubbing media using built-in controls does not pause media https://bugs.webkit.org/show_bug.cgi?id=174650 Reviewed by Dean Jackson. We would only pause when scrubbing on macOS because we only listened to "mousedown" events on the scrubber's backing element to identify that the user had started interacting with the scrubber. Implementing the same technique on iOS required a little more work than just listening to "touchstart" events on the same element. On top of that, we needed to make sure that we would only respond to "touchstart" events on the slider's thumb, and not on the track, since only on macOS should the user be able to click anywhere on the track to scrub. So we turn off pointer-events for the on iOS only, and turn them back on specifically for the thumb. There is also some finessing when dealing with touch events where we need to track the identifier of the touch that started the user interaction. So we keep track of it in an ivar and wait until we get a "touchend" event where the changedTouches list contains a touch with that same identifier to ensure the same touch that initiates and ends the scrubbing interaction. Finally, we fix another issue that was uncovered while turning back on the ScrubbingSupport tests where we would not trash the cached _value ivar when we initiated scrubbing, which was important since we would mistakenly use the pre-srubbing value during a scrub. * Modules/modern-media-controls/controls/slider.css: (.ios .slider > input): (.slider > input::-webkit-slider-thumb): * Modules/modern-media-controls/controls/slider.js: (Slider.prototype.handleEvent): (Slider.prototype._handleMousedownEvent): (Slider.prototype._interactionEndTarget): (Slider.prototype._handleTouchstartEvent): (Slider.prototype._valueWillStartChanging): (Slider.prototype._valueDidStopChanging): (Slider.prototype._handleMouseupEvent): (Slider.prototype._handleTouchendEvent): 2017-07-19 Nan Wang AX: Web page reloaded when a node is labelling multiple childnodes https://bugs.webkit.org/show_bug.cgi?id=174655 Reviewed by Chris Fleizach. When we are asking for the aria-labelledby attribute of a node and its sibling is also labelled by the same node, we get into an infinite loop in textUnderElement since we only ignore one child. Added checks for siblings to avoid such loop. Test: accessibility/mac/aria-labelledby-multiple-child-crash.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::textUnderElement): 2017-07-19 Andy Estes Use a cast to work around clang's false -Wobjc-literal-conversion warnings https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Dan Bernstein. Instead of ignoring -Wobjc-literal-conversion, use a cast to work around rdar://problem/33383354. * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::write): 2017-07-19 Chris Dumez Make cross-origin properties enumerable https://bugs.webkit.org/show_bug.cgi?id=174576 Reviewed by Darin Adler. Makes cross-origin properties enumerable on Window and Location objects as per: - https://github.com/whatwg/html/pull/2777 This simplifies our code quite a bit. No new tests, updated existing tests. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): (WebCore::JSDOMWindow::getOwnPropertyNames): * bindings/js/JSLocationCustom.cpp: (WebCore::getOwnPropertySlotCommon): (WebCore::JSLocation::getOwnPropertyNames): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): 2017-07-18 Carlos Alberto Lopez Perez [EME] Build failure with Clang-3.8 on InitDataRegistry.cpp https://bugs.webkit.org/show_bug.cgi?id=174628 Reviewed by Žan Doberšek. * Modules/encryptedmedia/InitDataRegistry.cpp: (WebCore::extractKeyIDsKeyids): Add an explicit cast to unsigned. 2017-07-19 Matt Lewis Unreviewed, rolling out r219646. The test added are failing on all platforms Reverted changeset: "Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap" https://bugs.webkit.org/show_bug.cgi?id=174406 http://trac.webkit.org/changeset/219646 2017-07-19 Yusuke Suzuki [WTF] Implement WTF::ThreadGroup https://bugs.webkit.org/show_bug.cgi?id=174081 Reviewed by Mark Lam. * page/ResourceUsageThread.h: 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Tim Horton. * Configurations/Base.xcconfig: * rendering/Grid.cpp: (WebCore::Grid::insert): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/SimpleLineLayoutCoverage.cpp: (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage): 2017-07-18 Yusuke Suzuki WTF::Thread should have the threads stack bounds. https://bugs.webkit.org/show_bug.cgi?id=173975 Reviewed by Mark Lam. When creating WebThread, we first allocate WebCore::ThreadGlobalData in UI thread and share it with WebThread. The problem is that WebCore::ThreadGlobalData has CachedResourceRequestInitiators. It allocates AtomicString, which requires WTFThreadData. In this patch, we call WTF::initializeThreading() before allocating WebCore::ThreadGlobalData. And we also call AtomicString::init() before calling WebCore::ThreadGlobalData since WebCore::ThreadGlobalData allocates AtomicString. * platform/ios/wak/WebCoreThread.mm: (StartWebThread): 2017-07-18 Myles C. Maxfield Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap https://bugs.webkit.org/show_bug.cgi?id=174406 Reviewed by Simon Fraser. When the minimumFontSize API preference is set, we will increase the font size without increasing the line height. If the content specifies line-height as an absolute value, there can be two unfortunate results: - Adjacent lines in a paragraph can overlap - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines can be cut off and potentially indecipherable. Instead, we should use the minimum font size preference as a signal that we should increase the line-height as well as the font-size. Eventually, we will want to increase it by an amount proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize, text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause a behavior change on many webpages which use small text, so such a change would be too risky right now. Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the only signal to boost the corresponding line-height. Tests: fast/text/line-height-minimumFontSize-text-zoom.html fast/text/line-height-minimumFontSize-visual.html fast/text/line-height-minimumFontSize-zoom.html fast/text/line-height-minimumFontSize.html fast/text/line-height-minimumFontSize-autosize.html * css/StyleBuilderCustom.h: (WebCore::computeBaseSpecifiedFontSize): (WebCore::computeLineHeightMultiplierDueToFontSize): (WebCore::StyleBuilderCustom::applyValueLineHeight): (WebCore::StyleBuilderCustom::applyValueFill): (WebCore::StyleBuilderCustom::applyValueStroke): (WebCore::StyleBuilderCustom::applyValueContent): * rendering/TextAutoSizing.cpp: 2017-07-18 Zalan Bujtas Media controls are missing content in fullscreen when document has scroll offset. https://bugs.webkit.org/show_bug.cgi?id=174644 Reviewed by Simon Fraser. If a non-user initiated scrolling (result of resize for example) is processed asynchronously, it might leapfrog other, programatic scrollings and trigger unintentional scroll offsets (and turn into unwanted clippings). This patch ensures that both resize and top content inset change are translated into programatic scrolling. Unable to test full screen video. * page/FrameView.cpp: (WebCore::FrameView::setFrameRect): (WebCore::FrameView::topContentInsetDidChange): 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Sam Weinig. * Configurations/Base.xcconfig: * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::write): 2017-07-18 Ali Juma Align quirky number parsing with other browsers https://bugs.webkit.org/show_bug.cgi?id=155874 Reviewed by Simon Fraser. Parse unit-less non-zero values for animation-duration and transition-duration as invalid time values in quirks mode. Test: fast/css/animation-transition-duration-quirksmode.html * css/parser/CSSPropertyParser.cpp: (WebCore::consumeAnimationValue): 2017-07-18 Chris Dumez HysteresisActivity cannot be used in the UIProcess https://bugs.webkit.org/show_bug.cgi?id=174643 Reviewed by Tim Horton. Port HysteresisActivity to RunLoop::Timer so that it can safely be used in the UIProcess as well. * platform/HysteresisActivity.h: 2017-07-18 Joseph Pecoraro Web Inspector: Modernize InjectedScriptSource https://bugs.webkit.org/show_bug.cgi?id=173890 Reviewed by Brian Burg. Covered by existing tests. * inspector/CommandLineAPIModuleSource.js: (CommandLineAPIImpl.prototype.copy): (CommandLineAPIImpl.prototype._inspect): Use RemoteObject, a new parameter. 2017-07-18 Ryosuke Niwa REGRESSION(r218910): Crash when password field changes to text field https://bugs.webkit.org/show_bug.cgi?id=174560 Reviewed by Zalan Bujtas. The crash was caused by textMarkerDataForFirstPositionInTextControl accessing a nullptr returned by getOrCreate. Unfortunately, in order to this fix bug while preserving the exact behavior would require synchronously creating a renderer for the editing host when the input type changed since we can't create an accessbility object out of a renderer-less node. Instead, revert back to pre-r218910 behavior of always using the text control element's axID when notifying the value change. While this is inconsistent with the way editing commands report content changes, I've since learned that VoiceOver has code to deal with this exact situation. Test: accessibility/mac/input-type-change-crash-2.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl): 2017-07-18 Matt Baker Web Inspector: Refactoring: replace InspectorCanvasAgent::CanvasEntry with a helper class https://bugs.webkit.org/show_bug.cgi?id=174311 Reviewed by Devin Rousso. This patch adds a helper class for tracking canvases and their data. The current approach of defining a helper structure in the agent's header is awkward to use and maintain, and won't scale well as more canvas instrumentation points and data are added. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: New file. * inspector/InspectorCanvas.cpp: Added. (WebCore::InspectorCanvas::create): (WebCore::InspectorCanvas::InspectorCanvas): (WebCore::InspectorCanvas::buildObjectForCanvas): * inspector/InspectorCanvas.h: Added. * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::enable): (WebCore::InspectorCanvasAgent::requestNode): (WebCore::InspectorCanvasAgent::requestContent): (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes): (WebCore::InspectorCanvasAgent::resolveCanvasContext): (WebCore::InspectorCanvasAgent::frameNavigated): (WebCore::InspectorCanvasAgent::didCreateCSSCanvas): (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes): (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext): (WebCore::InspectorCanvasAgent::didChangeCanvasMemory): (WebCore::InspectorCanvasAgent::canvasDestroyed): (WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired): (WebCore::InspectorCanvasAgent::clearCanvasData): (WebCore::InspectorCanvasAgent::unbindCanvas): (WebCore::InspectorCanvasAgent::assertInspectorCanvas): (WebCore::InspectorCanvasAgent::findInspectorCanvas): (WebCore::InspectorCanvasAgent::getCanvasEntry): Deleted. (WebCore::InspectorCanvasAgent::buildObjectForCanvas): Deleted. * inspector/InspectorCanvasAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): Remove unused constructor argument. 2017-07-18 Basuke Suzuki [Curl] Move detail implementation from ResourceHandle to ResourceHandleInternal https://bugs.webkit.org/show_bug.cgi?id=174641 After moving stuff from ResourceHandleManager to ResourceHandle on https://bugs.webkit.org/show_bug.cgi?id=173630, still there're many violation remains between ResourceHandle and ResourceHandleInternal classes. Many of implementation detail should be move to ResourceHandleInternal to improve build speed. Reviewed by Alex Christensen. * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandleInternal::~ResourceHandleInternal): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::cancel): (WebCore::ResourceHandleInternal::initialize): (WebCore::ResourceHandleInternal::applyAuthentication): (WebCore::ResourceHandleInternal::setupPUT): (WebCore::ResourceHandleInternal::setupPOST): (WebCore::ResourceHandleInternal::setupFormData): (WebCore::ResourceHandle::platformSetDefersLoading): (WebCore::ResourceHandleInternal::didFinish): (WebCore::ResourceHandleInternal::didFail): (WebCore::ResourceHandleInternal::calculateWebTimingInformations): (WebCore::ResourceHandleInternal::handleLocalReceiveResponse): (WebCore::ResourceHandleInternal::willPrepareSendData): (WebCore::ResourceHandleInternal::didReceiveHeaderLine): (WebCore::ResourceHandleInternal::didReceiveAllHeaders): (WebCore::ResourceHandleInternal::didReceiveContentData): (WebCore::ResourceHandleInternal::readCallback): (WebCore::ResourceHandleInternal::headerCallback): (WebCore::ResourceHandleInternal::writeCallback): (WebCore::ResourceHandle::platformLoadResourceSynchronously): (WebCore::ResourceHandleInternal::dispatchSynchronousJob): (WebCore::ResourceHandleInternal::handleDataURL): (WebCore::ResourceHandle::initialize): Deleted. (WebCore::ResourceHandle::applyAuthentication): Deleted. (WebCore::ResourceHandle::setupPUT): Deleted. (WebCore::ResourceHandle::setupPOST): Deleted. (WebCore::ResourceHandle::setupFormData): Deleted. (WebCore::ResourceHandle::didFinish): Deleted. (WebCore::ResourceHandle::didFail): Deleted. (WebCore::ResourceHandle::calculateWebTimingInformations): Deleted. (WebCore::ResourceHandle::handleLocalReceiveResponse): Deleted. (WebCore::ResourceHandle::willPrepareSendData): Deleted. (WebCore::ResourceHandle::didReceiveHeaderLine): Deleted. (WebCore::ResourceHandle::didReceiveAllHeaders): Deleted. (WebCore::ResourceHandle::didReceiveContentData): Deleted. (WebCore::ResourceHandle::readCallback): Deleted. (WebCore::ResourceHandle::headerCallback): Deleted. (WebCore::ResourceHandle::writeCallback): Deleted. (WebCore::ResourceHandle::dispatchSynchronousJob): Deleted. (WebCore::ResourceHandle::handleDataURL): Deleted. 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: 2017-07-18 Antoine Quint [macOS] Mouse pointer does not hide during fullscreen playback https://bugs.webkit.org/show_bug.cgi?id=174638 Reviewed by Dean Jackson. Test: media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html The user-agent stylesheet sets the "-webkit-cursor-visibility" to "auto-hide" for fullscreen