WebKit-https.git
14 months agoUnreviewed, speculative build fix for WinCairo, part 2
ysuzuki@apple.com [Fri, 16 Aug 2019 07:54:43 +0000 (07:54 +0000)]
Unreviewed, speculative build fix for WinCairo, part 2
https://bugs.webkit.org/show_bug.cgi?id=200526

* Modules/indexeddb/server/IDBSerializationContext.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248764 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed, speculative build fix for WinCairo
ysuzuki@apple.com [Fri, 16 Aug 2019 07:46:06 +0000 (07:46 +0000)]
Unreviewed, speculative build fix for WinCairo
https://bugs.webkit.org/show_bug.cgi?id=200526

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED...
ysuzuki@apple.com [Fri, 16 Aug 2019 06:53:36 +0000 (06:53 +0000)]
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part
https://bugs.webkit.org/show_bug.cgi?id=200620

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Three patches including this one were originally one patch. I split it into three pieces to make roll-out easy.
This part, we annotate classes / structs with WTF_MAKE_FAST_ALLOCATED and WTF_MAKE_STRUCT_FAST_ALLOCATED if
they are allocated from std::make_unique. The second patch will switch `std::make_unique` to `WTF::makeUnique` and
the third patch will insert a static_assert that makeUnique-allocated class T is FastMalloc-ed.
One insight from this patch is that we tend to forget adding WTF_MAKE_STRUCT_FAST_ALLOCATED if it is just a data struct.

* debugger/Debugger.h:
* inspector/scripts/codegen/objc_generator_templates.py:
* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/should-strip-comments.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
* inspector/scripts/tests/generic/expected/version.json-result:
* inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Source/WebCore:

* Modules/encryptedmedia/legacy/LegacyCDM.h:
(WebCore::LegacyCDM::keySystem const): Deleted.
(WebCore::LegacyCDM::client const): Deleted.
(WebCore::LegacyCDM::setClient): Deleted.
* Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
* Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
* Modules/webaudio/AsyncAudioDecoder.h:
(WebCore::AsyncAudioDecoder::DecodingTask::audioData): Deleted.
(WebCore::AsyncAudioDecoder::DecodingTask::sampleRate const): Deleted.
(WebCore::AsyncAudioDecoder::DecodingTask::successCallback): Deleted.
(WebCore::AsyncAudioDecoder::DecodingTask::errorCallback): Deleted.
(WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer): Deleted.
* Modules/webauthn/AuthenticatorCoordinator.h:
* Modules/webdatabase/SQLStatement.h:
(WebCore::SQLStatement::hasStatementCallback const): Deleted.
(WebCore::SQLStatement::hasStatementErrorCallback const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
* Modules/webgpu/WHLSL/WHLSLResolvingType.h:
* bindings/js/DOMPromiseProxy.h:
* bindings/js/GCController.h:
* bridge/jsc/BridgeJSC.h:
* contentextensions/ContentExtensionsBackend.h:
* dom/FullscreenManager.h:
(WebCore::FullscreenManager::document): Deleted.
(WebCore::FullscreenManager::document const): Deleted.
(WebCore::FullscreenManager::topDocument const): Deleted.
(WebCore::FullscreenManager::page const): Deleted.
(WebCore::FullscreenManager::frame const): Deleted.
(WebCore::FullscreenManager::documentElement const): Deleted.
(WebCore::FullscreenManager::hasLivingRenderTree const): Deleted.
(WebCore::FullscreenManager::pageCacheState const): Deleted.
(WebCore::FullscreenManager::scheduleFullStyleRebuild): Deleted.
(WebCore::FullscreenManager::fullscreenElement const): Deleted.
(WebCore::FullscreenManager::isFullscreen const): Deleted.
(WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const): Deleted.
(WebCore::FullscreenManager::currentFullscreenElement const): Deleted.
* dom/Microtasks.h:
(WebCore::MicrotaskQueue::vm const): Deleted.
* editing/CompositeEditCommand.h:
* editing/mac/AlternativeTextUIController.h:
* html/HTMLMediaElement.h:
* inspector/InspectorFrontendClientLocal.h:
* inspector/agents/WebHeapAgent.cpp:
* layout/displaytree/DisplayRun.h:
* layout/inlineformatting/InlineItem.h:
* layout/inlineformatting/InlineLine.h:
* layout/tableformatting/TableGrid.h:
* loader/FrameLoader.h:
(WebCore::FrameLoader::frame const): Deleted.
(WebCore::FrameLoader::policyChecker const): Deleted.
(WebCore::FrameLoader::history const): Deleted.
(WebCore::FrameLoader::notifier const): Deleted.
(WebCore::FrameLoader::subframeLoader const): Deleted.
(WebCore::FrameLoader::mixedContentChecker const): Deleted.
(WebCore::FrameLoader::urlSelected): Deleted.
(WebCore::FrameLoader::reload): Deleted.
(WebCore::FrameLoader::requestedHistoryItem const): Deleted.
(WebCore::FrameLoader::documentLoader const): Deleted.
(WebCore::FrameLoader::policyDocumentLoader const): Deleted.
(WebCore::FrameLoader::provisionalDocumentLoader const): Deleted.
(WebCore::FrameLoader::state const): Deleted.
(WebCore::FrameLoader::shouldReportResourceTimingToParentFrame const): Deleted.
(WebCore::FrameLoader::client const): Deleted.
(WebCore::FrameLoader::forceSandboxFlags): Deleted.
(WebCore::FrameLoader::hasOpenedFrames const): Deleted.
(WebCore::FrameLoader::setLoadsSynchronously): Deleted.
(WebCore::FrameLoader::loadsSynchronously const): Deleted.
(WebCore::FrameLoader::stateMachine): Deleted.
(WebCore::FrameLoader::quickRedirectComing const): Deleted.
(WebCore::FrameLoader::pageDismissalEventBeingDispatched const): Deleted.
(WebCore::FrameLoader::previousURL const): Deleted.
(WebCore::FrameLoader::setOverrideCachePolicyForTesting): Deleted.
(WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting): Deleted.
(WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting): Deleted.
(WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting): Deleted.
(WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL const): Deleted.
(WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Deleted.
(WebCore::FrameLoader::isReloadingFromOrigin const): Deleted.
(WebCore::FrameLoader::setAlwaysAllowLocalWebarchive): Deleted.
(WebCore::FrameLoader::alwaysAllowLocalWebarchive const): Deleted.
(WebCore::FrameLoader::loadWithDocumentLoader): Deleted.
(WebCore::FrameLoader::loadWithNavigationAction): Deleted.
(WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const): Deleted.
* loader/NavigationDisabler.h:
* loader/NavigationScheduler.h:
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocumentReference.h:
(WebCore::CachedSVGDocumentReference::loadRequested const): Deleted.
(WebCore::CachedSVGDocumentReference::document): Deleted.
* loader/ios/PreviewLoader.h:
* page/CaptionUserPreferences.h:
* page/PrewarmInformation.h:
* page/ResizeObserver.h:
* page/SuspendableTimer.h:
* page/csp/ContentSecurityPolicyDirective.h:
* page/ios/ContentChangeObserver.h:
* page/ios/DOMTimerHoldingTank.h:
* page/linux/ResourceUsageOverlayLinux.cpp:
* page/mac/TextIndicatorWindow.h:
* page/scrolling/ScrollSnapOffsetsInfo.h:
* page/scrolling/ScrollingMomentumCalculator.h:
* platform/CPUMonitor.h:
* platform/FileMonitor.h:
* platform/ScrollAnimation.h:
* platform/SuddenTermination.h:
* platform/audio/AudioBus.h:
(WebCore::AudioBus::numberOfChannels const): Deleted.
(WebCore::AudioBus::channel): Deleted.
(WebCore::AudioBus::channel const): Deleted.
(WebCore::AudioBus::length const): Deleted.
(WebCore::AudioBus::sampleRate const): Deleted.
(WebCore::AudioBus::setSampleRate): Deleted.
(WebCore::AudioBus::reset): Deleted.
(WebCore::AudioBus::AudioBus): Deleted.
* platform/audio/AudioChannel.h:
(WebCore::AudioChannel::AudioChannel): Deleted.
(WebCore::AudioChannel::set): Deleted.
(WebCore::AudioChannel::length const): Deleted.
(WebCore::AudioChannel::mutableData): Deleted.
(WebCore::AudioChannel::data const): Deleted.
(WebCore::AudioChannel::zero): Deleted.
(WebCore::AudioChannel::clearSilentFlag): Deleted.
(WebCore::AudioChannel::isSilent const): Deleted.
* platform/audio/AudioFIFO.h:
(WebCore::AudioFIFO::framesInFifo const): Deleted.
(WebCore::AudioFIFO::updateIndex): Deleted.
* platform/audio/AudioPullFIFO.h:
* platform/audio/AudioResampler.h:
(WebCore::AudioResampler::rate const): Deleted.
* platform/audio/AudioResamplerKernel.h:
* platform/audio/AudioSession.cpp:
* platform/audio/AudioSession.h:
(WebCore::AudioSession::isActive const): Deleted.
* platform/audio/Biquad.h:
* platform/audio/Cone.h:
(WebCore::ConeEffect::setInnerAngle): Deleted.
(WebCore::ConeEffect::innerAngle const): Deleted.
(WebCore::ConeEffect::setOuterAngle): Deleted.
(WebCore::ConeEffect::outerAngle const): Deleted.
(WebCore::ConeEffect::setOuterGain): Deleted.
(WebCore::ConeEffect::outerGain const): Deleted.
* platform/audio/DenormalDisabler.h:
(WebCore::DenormalDisabler::DenormalDisabler): Deleted.
(WebCore::DenormalDisabler::~DenormalDisabler): Deleted.
(WebCore::DenormalDisabler::flushDenormalFloatToZero): Deleted.
(WebCore::DenormalDisabler::getCSR): Deleted.
(WebCore::DenormalDisabler::setCSR): Deleted.
* platform/audio/DirectConvolver.h:
* platform/audio/Distance.h:
(WebCore::DistanceEffect::model): Deleted.
(WebCore::DistanceEffect::setModel): Deleted.
(WebCore::DistanceEffect::setRefDistance): Deleted.
(WebCore::DistanceEffect::setMaxDistance): Deleted.
(WebCore::DistanceEffect::setRolloffFactor): Deleted.
(WebCore::DistanceEffect::refDistance const): Deleted.
(WebCore::DistanceEffect::maxDistance const): Deleted.
(WebCore::DistanceEffect::rolloffFactor const): Deleted.
* platform/audio/DownSampler.h:
* platform/audio/DynamicsCompressor.h:
(WebCore::DynamicsCompressor::sampleRate const): Deleted.
(WebCore::DynamicsCompressor::nyquist const): Deleted.
(WebCore::DynamicsCompressor::tailTime const): Deleted.
(WebCore::DynamicsCompressor::latencyTime const): Deleted.
* platform/audio/DynamicsCompressorKernel.h:
(WebCore::DynamicsCompressorKernel::latencyFrames const): Deleted.
(WebCore::DynamicsCompressorKernel::sampleRate const): Deleted.
(WebCore::DynamicsCompressorKernel::meteringGain const): Deleted.
* platform/audio/EqualPowerPanner.h:
* platform/audio/FFTConvolver.h:
(WebCore::FFTConvolver::fftSize const): Deleted.
* platform/audio/HRTFDatabase.h:
(WebCore::HRTFDatabase::numberOfAzimuths): Deleted.
(WebCore::HRTFDatabase::sampleRate const): Deleted.
* platform/audio/HRTFElevation.h:
(WebCore::HRTFElevation::HRTFElevation): Deleted.
(WebCore::HRTFElevation::kernelListL): Deleted.
(WebCore::HRTFElevation::kernelListR): Deleted.
(WebCore::HRTFElevation::elevationAngle const): Deleted.
(WebCore::HRTFElevation::numberOfAzimuths const): Deleted.
(WebCore::HRTFElevation::sampleRate const): Deleted.
* platform/audio/HRTFPanner.h:
(WebCore::HRTFPanner::fftSize const): Deleted.
(WebCore::HRTFPanner::sampleRate const): Deleted.
* platform/audio/MultiChannelResampler.h:
* platform/audio/PlatformAudioData.h:
* platform/audio/Reverb.h:
(WebCore::Reverb::impulseResponseLength const): Deleted.
* platform/audio/ReverbAccumulationBuffer.h:
(WebCore::ReverbAccumulationBuffer::readIndex const): Deleted.
(WebCore::ReverbAccumulationBuffer::readTimeFrame const): Deleted.
* platform/audio/ReverbConvolver.h:
(WebCore::ReverbConvolver::impulseResponseLength const): Deleted.
(WebCore::ReverbConvolver::inputBuffer): Deleted.
(WebCore::ReverbConvolver::useBackgroundThreads const): Deleted.
* platform/audio/ReverbConvolverStage.h:
(WebCore::ReverbConvolverStage::inputReadIndex const): Deleted.
* platform/audio/ReverbInputBuffer.h:
(WebCore::ReverbInputBuffer::writeIndex const): Deleted.
* platform/audio/SincResampler.h:
* platform/audio/UpSampler.h:
* platform/audio/ZeroPole.h:
(WebCore::ZeroPole::ZeroPole): Deleted.
(WebCore::ZeroPole::reset): Deleted.
(WebCore::ZeroPole::setZero): Deleted.
(WebCore::ZeroPole::setPole): Deleted.
(WebCore::ZeroPole::zero const): Deleted.
(WebCore::ZeroPole::pole const): Deleted.
* platform/audio/cocoa/WebAudioBufferList.h:
(WebCore::WebAudioBufferList::list const): Deleted.
(WebCore::WebAudioBufferList::operator AudioBufferList& const): Deleted.
(WebCore::WebAudioBufferList::kind const): Deleted.
* platform/audio/ios/AudioSessionIOS.mm:
* platform/audio/mac/CARingBuffer.h:
* platform/encryptedmedia/clearkey/CDMClearKey.h:
* platform/gamepad/mac/HIDGamepad.h:
* platform/graphics/FloatPoint.h:
* platform/graphics/Font.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/GraphicsContextImpl.h:
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/LegacyCDMSession.h:
* platform/graphics/Region.h:
* platform/graphics/VelocityData.h:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
* platform/graphics/avfoundation/CDMFairPlayStreaming.h:
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
* platform/graphics/cairo/PlatformContextCairo.h:
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
* platform/graphics/cv/ImageRotationSessionVT.h:
(WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const): Deleted.
(WebCore::ImageRotationSessionVT::transform const): Deleted.
(WebCore::ImageRotationSessionVT::rotationProperties const): Deleted.
(WebCore::ImageRotationSessionVT::size): Deleted.
(WebCore::ImageRotationSessionVT::rotatedSize): Deleted.
* platform/graphics/cv/PixelBufferConformerCV.h:
* platform/graphics/cv/TextureCacheCV.h:
* platform/graphics/cv/VideoTextureCopierCV.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
* platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
* platform/graphics/iso/ISOBox.h:
* platform/graphics/iso/ISOOriginalFormatBox.h:
* platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
* platform/graphics/iso/ISOSchemeInformationBox.h:
* platform/graphics/iso/ISOSchemeTypeBox.h:
* platform/graphics/iso/ISOTrackEncryptionBox.h:
* platform/graphics/iso/ISOVTTCue.cpp:
(WebCore::ISOStringBox::contents): Deleted.
* platform/graphics/iso/ISOVTTCue.h:
(WebCore::ISOWebVTTCue::boxTypeName): Deleted.
(WebCore::ISOWebVTTCue::presentationTime const): Deleted.
(WebCore::ISOWebVTTCue::duration const): Deleted.
(WebCore::ISOWebVTTCue::sourceID const): Deleted.
(WebCore::ISOWebVTTCue::id const): Deleted.
(WebCore::ISOWebVTTCue::originalStartTime const): Deleted.
(WebCore::ISOWebVTTCue::settings const): Deleted.
(WebCore::ISOWebVTTCue::cueText const): Deleted.
* platform/graphics/nicosia/NicosiaPaintingOperation.h:
* platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
* platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h:
* platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h:
* platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
* platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.h:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/graphics/texmap/coordinated/Tile.h:
* platform/graphics/win/FontCustomPlatformData.h:
* platform/graphics/win/FullScreenController.cpp:
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
* platform/graphics/win/PlatformContextDirect2D.h:
* platform/graphics/win/WKCAImageQueue.cpp:
* platform/gtk/PasteboardHelper.cpp:
* platform/ios/LegacyTileGrid.h:
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
* platform/mediastream/gstreamer/GStreamerAudioData.h:
(WebCore::GStreamerAudioData::GStreamerAudioData): Deleted.
(WebCore::GStreamerAudioData::getSample): Deleted.
(WebCore::GStreamerAudioData::getAudioInfo): Deleted.
(WebCore::GStreamerAudioData::kind const): Deleted.
* platform/mediastream/gstreamer/GStreamerCapturer.h:
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.h:
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
* platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
* platform/mock/MediaPlaybackTargetPickerMock.h:
* platform/mock/RTCDataChannelHandlerMock.h:
* platform/network/ResourceErrorBase.h:
* platform/network/curl/CookieJarDB.h:
* platform/network/curl/CurlCacheEntry.h:
* platform/network/curl/CurlContext.h:
* platform/network/curl/CurlMultipartHandle.h:
* platform/network/curl/CurlRequestScheduler.h:
* platform/network/curl/CurlSSLVerifier.h:
* platform/network/ios/PreviewConverter.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
* platform/vr/openvr/VRPlatformDisplayOpenVR.h:
* platform/vr/openvr/VRPlatformManagerOpenVR.h:
* rendering/HitTestResult.h:
* rendering/LayerOverlapMap.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/svg/RenderSVGResourceMasker.h:
* replay/UserInputBridge.h:
* svg/graphics/filters/SVGFilterBuilder.h:
* svg/properties/SVGAttributeAnimator.h:
* svg/properties/SVGDecoratedProperty.h:
* svg/properties/SVGPropertyAnimatorFactory.h:
* testing/InternalSettings.cpp:
* testing/LegacyMockCDM.cpp:
* testing/LegacyMockCDM.h:
* testing/MockCDMFactory.h:
* workers/WorkerEventQueue.cpp:
* workers/WorkerEventQueue.h:
* workers/service/ServiceWorkerContainer.h:
* worklets/PaintWorkletGlobalScope.h:
* xml/XMLErrors.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebDriver:

* glib/SessionHostGlib.cpp:

Source/WebKit:

* NetworkProcess/AdClickAttributionManager.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Cookies/WebCookieManager.h:
* NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
* NetworkProcess/NetworkHTTPSUpgradeChecker.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/NetworkSocketChannel.h:
* NetworkProcess/WebSocketTask.h:
* NetworkProcess/cache/PrefetchCache.h:
* NetworkProcess/cocoa/WebSocketTaskCocoa.h:
* NetworkProcess/soup/WebKitSoupRequestInputStream.cpp:
* NetworkProcess/soup/WebSocketTaskSoup.h:
* NetworkProcess/webrtc/LibWebRTCSocketClient.h:
* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
* Platform/Module.h:
* PluginProcess/PluginControllerProxy.h:
* Shared/ApplePay/WebPaymentCoordinatorProxy.h:
* Shared/Authentication/AuthenticationManager.h:
* Shared/Cocoa/SandboxExtensionCocoa.mm:
* Shared/Plugins/NPObjectMessageReceiver.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* UIProcess/API/APIAutomationClient.h:
* UIProcess/API/APIAutomationSessionClient.h:
* UIProcess/API/APIContextMenuClient.h:
* UIProcess/API/APICustomProtocolManagerClient.h:
* UIProcess/API/APIDiagnosticLoggingClient.h:
* UIProcess/API/APIDownloadClient.h:
* UIProcess/API/APIFindClient.h:
* UIProcess/API/APIFindMatchesClient.h:
* UIProcess/API/APIFormClient.h:
* UIProcess/API/APIFullscreenClient.h:
* UIProcess/API/APIGeolocationProvider.h:
* UIProcess/API/APIHistoryClient.h:
* UIProcess/API/APIIconDatabaseClient.h:
* UIProcess/API/APIIconLoadingClient.h:
* UIProcess/API/APIInjectedBundleClient.h:
* UIProcess/API/APILegacyContextHistoryClient.h:
* UIProcess/API/APILoaderClient.h:
* UIProcess/API/APINavigationClient.h:
* UIProcess/API/APIPolicyClient.h:
* UIProcess/API/APIUIClient.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageStateClient):
* UIProcess/API/Cocoa/WKUserContentController.mm:
* UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
* UIProcess/API/glib/IconDatabase.h:
* UIProcess/API/glib/WebKitAutomationSession.cpp:
* UIProcess/API/glib/WebKitIconLoadingClient.cpp:
* UIProcess/API/glib/WebKitNotificationProvider.h:
* UIProcess/API/glib/WebKitUserContentManager.cpp:
* UIProcess/API/glib/WebKitWebContext.cpp:
* UIProcess/API/glib/WebKitWebView.cpp:
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
* UIProcess/API/mac/WKView.mm:
(-[WKView maybeInstallIconLoadingClient]):
* UIProcess/API/wpe/APIViewClient.h:
* UIProcess/API/wpe/ScrollGestureController.h:
* UIProcess/ApplicationStateTracker.h:
* UIProcess/Cocoa/AutomationSessionClient.h:
* UIProcess/Cocoa/IconLoadingDelegate.h:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/HighPerformanceGraphicsUsageSampler.h:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/PageClient.h:
* UIProcess/PerActivityStateCPUUsageSampler.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.h:
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
* UIProcess/SystemPreviewController.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* UIProcess/WebNavigationState.h:
* UIProcess/WebPageInjectedBundleClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebsiteData/WebsiteDataStoreClient.h:
* UIProcess/gtk/DragAndDropHandler.h:
* UIProcess/ios/EditableImageController.h:
* UIProcess/ios/InputViewUpdateDeferrer.h:
* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
* UIProcess/mac/WKFullScreenWindowController.mm:
* UIProcess/mac/WKTextFinderClient.mm:
* WebProcess/ApplePay/WebPaymentCoordinator.h:
* WebProcess/Geolocation/GeolocationPermissionRequestManager.h:
* WebProcess/Geolocation/WebGeolocationManager.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
* WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp:
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
* WebProcess/MediaCache/WebMediaKeyStorageManager.h:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
* WebProcess/Network/webrtc/LibWebRTCResolver.h:
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Storage/WebSWOriginTable.h:
* WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/WebGeolocationClient.h:
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h:
* WebProcess/WebCoreSupport/WebNotificationClient.h:
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebCoreSupport/WebProgressTrackerClient.h:
* WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h:
* WebProcess/WebCoreSupport/WebUserMediaClient.h:
* WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h:
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
* WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
* WebProcess/WebProcess.h:
* WebProcess/cocoa/UserMediaCaptureManager.h:

Source/WebKitLegacy/ios:

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebFixedPositionContent.mm:

Source/WebKitLegacy/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.h:
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
* Plugins/WebNetscapePluginEventHandlerCocoa.h:
* Storage/WebDatabaseManagerClient.mm:
* WebCoreSupport/WebAlternativeTextClient.h:
* WebCoreSupport/WebCachedFramePlatformData.h:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebGeolocationClient.h:
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebNotificationClient.h:
* WebCoreSupport/WebSelectionServiceController.h:
* WebView/WebMediaPlaybackTargetPicker.h:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
* FullscreenVideoController.h:
* Plugins/PluginMessageThrottlerWin.h:
* WebCachedFramePlatformData.h:
* WebCoreSupport/AcceleratedCompositingContext.h:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebDesktopNotificationsDelegate.h:
* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebFrameLoaderClient.cpp:
* WebCoreSupport/WebGeolocationClient.h:
* WebCoreSupport/WebInspectorClient.h:
* WebDatabaseManager.cpp:
* WebKitQuartzCoreAdditions/CAD3DRenderer.h:
* WebNodeHighlight.h:
* WebNotificationCenter.cpp:
* WebNotificationCenter.h:

Tools:

* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/GCController.h:
* DumpRenderTree/win/DRTDataObject.cpp:
* DumpRenderTree/win/DRTDataObject.h:
* DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
* DumpRenderTree/win/DRTDropSource.h:
* DumpRenderTree/win/DraggingInfo.h:
* DumpRenderTree/win/EditingDelegate.h:
* DumpRenderTree/win/EventSender.cpp:
* DumpRenderTree/win/FrameLoadDelegate.h:
* DumpRenderTree/win/HistoryDelegate.h:
* DumpRenderTree/win/MD5.h:
* DumpRenderTree/win/PolicyDelegate.h:
* DumpRenderTree/win/ResourceLoadDelegate.h:
* DumpRenderTree/win/TextInputController.h:
* DumpRenderTree/win/UIDelegate.cpp:
* DumpRenderTree/win/UIDelegate.h:
* TestRunnerShared/UIScriptContext/UIScriptContext.h:
* TestRunnerShared/cocoa/ClassMethodSwizzler.h:
* TestRunnerShared/cocoa/InstanceMethodSwizzler.h:
* TestWebKitAPI/Counters.h:
* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/Tests/WTF/Expected.cpp:
* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::DerefObserver::ref):
(TestWebKitAPI::DerefObserver::deref):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::DerefObserver::ref):
(TestWebKitAPI::DerefObserver::deref):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/UniqueRef.cpp:
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
* TestWebKitAPI/Tests/WebCore/CalculationValue.cpp:
* TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.h:
* TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h:
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/GeolocationProviderMock.h:
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestInvocation.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248762 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[ContentChangeObserver] Rename contentVisibilityDidChange to elementDidBecomeVisible
zalan@apple.com [Fri, 16 Aug 2019 04:28:49 +0000 (04:28 +0000)]
[ContentChangeObserver] Rename contentVisibilityDidChange to elementDidBecomeVisible
https://bugs.webkit.org/show_bug.cgi?id=200780
<rdar://problem/54358330>

Reviewed by Simon Fraser.

"elementDidBecomeVisible" name is more accurate and also we'll probably start tracking changes from visible to hidden soon.

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::visibilityChangedFromHiddenToVisible):
(WebCore::ContentChangeObserver::adjustObservedState):
(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
(WebCore::ContentChangeObserver::contentVisibilityDidChange): Deleted.
* page/ios/ContentChangeObserver.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248761 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Update Esprima to support modern JavaScript language features
pecoraro@apple.com [Fri, 16 Aug 2019 03:03:32 +0000 (03:03 +0000)]
Web Inspector: Update Esprima to support modern JavaScript language features
https://bugs.webkit.org/show_bug.cgi?id=200796

Reviewed by Ross Kirsling.

Source/WebInspectorUI:

Use a fork of Esprima to support modern JavaScript language features
while going through the process to upstream support:

  ES2018 Feature: Async Iteration (for-await-of)
  https://github.com/jquery/esprima/issues/1990

  ES2019 Feature: Numeric Separator
  https://github.com/jquery/esprima/issues/1989

  ES2019 Feature: Optional catch binding
  https://github.com/jquery/esprima/issues/1953

  ES2020 Feature: BigInt
  https://github.com/jquery/esprima/issues/1988

ESTree compatible AST changes are summarized as:

  - CatchClause `param` property is now nullable
  - ForOfStatement now has a boolean `await` property
  - Literal can be a `"bigint"` type (works if the environment has BigInt or not)

The pretty printer only needed to have additional handling for `for-await-of`.

* UserInterface/External/Esprima/esprima.js:
New version. Typescript output expects a modern JavaScript environment
instead of just ES6.

* Tools/Formatting/index.html:
Update the formatting tool for easier use in case of errors.

* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):

* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.passOrFail):
Convenience for pass/fail with the same message based on a condition.

* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Ensure a space after `await` in `for await` syntax.

LayoutTests:

* inspector/formatting/resources/javascript-tests/classes-expected.js:
* inspector/formatting/resources/javascript-tests/classes.js:
* inspector/formatting/resources/javascript-tests/for-statements-expected.js:
* inspector/formatting/resources/javascript-tests/for-statements.js:
* inspector/formatting/resources/javascript-tests/generators-expected.js:
* inspector/formatting/resources/javascript-tests/generators.js:
* inspector/formatting/resources/javascript-tests/numbers-expected.js: Added.
* inspector/formatting/resources/javascript-tests/numbers.js: Added.
* inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js:
* inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js:
* inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js:
* inspector/formatting/resources/javascript-tests/unary-binary-expressions.js:
Test formatting of new JavaScript language features.

* inspector/formatting/formatting-css-expected.txt:
* inspector/formatting/formatting-javascript-expected.txt:
* inspector/formatting/formatting-javascript.html:
* inspector/formatting/resources/utilities.js:
(TestPage.registerInitializer.async.runFormattingTest):
(TestPage.registerInitializer.window.addFormattingTests):
(TestPage.registerInitializer):
Cleaner output and better handling for debugging failures.

* inspector/model/parse-script-syntax-tree.html:
Test new AST permutations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248760 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[ContentChangeObserver] Keep track of all the visibility candidates.
zalan@apple.com [Fri, 16 Aug 2019 02:20:57 +0000 (02:20 +0000)]
[ContentChangeObserver] Keep track of all the visibility candidates.
https://bugs.webkit.org/show_bug.cgi?id=200777
<rdar://problem/54356331>

Reviewed by Simon Fraser.

Source/WebCore:

In order to find out whether a visible (and actionable) content change happened, we need to keep track of all the candidate elements.

Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::reset):
(WebCore::ContentChangeObserver::rendererWillBeDestroyed):
(WebCore::ContentChangeObserver::contentVisibilityDidChange):
(WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
* page/ios/ContentChangeObserver.h:

Source/WTF:

* wtf/WeakHashSet.h:

LayoutTests:

* fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2-expected.txt: Added.
* fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248759 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: REGRESSION(r244268): "Show Scope Chain on pause" setting has no effect
drousso@apple.com [Fri, 16 Aug 2019 02:08:29 +0000 (02:08 +0000)]
Web Inspector: REGRESSION(r244268): "Show Scope Chain on pause" setting has no effect
https://bugs.webkit.org/show_bug.cgi?id=200797

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DebuggerTabContentView.js:
(WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels):
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
When the sidebar panel isn't visible `parentSidebar` is `null`. Use `WI.DetailsSidebar` instead.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248758 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Uncaught Exception: TypeError: null is not an object (evaluating ...
drousso@apple.com [Fri, 16 Aug 2019 01:58:38 +0000 (01:58 +0000)]
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._resource.initiatorSourceCodeLocation')
https://bugs.webkit.org/show_bug.cgi?id=200798

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype.set resource):
(WI.ResourceDetailsSidebarPanel.prototype.layout):
Cancel the `Throttler` whenever the `_resource` is updated, as otherwise the `Throttler` may
fire later on with an unset `_resource`.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248757 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Add unary plus
mmaxfield@apple.com [Fri, 16 Aug 2019 01:54:20 +0000 (01:54 +0000)]
[WHLSL] Add unary plus
https://bugs.webkit.org/show_bug.cgi?id=200753

Reviewed by Saam Barati.

Source/WebCore:

HLSL has these, so we should too.

Test: webgpu/whlsl/vector-matrix-addition-subtraction.html

* Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

* webgpu/whlsl/vector-matrix-addition-subtraction-expected.txt: Added.
* webgpu/whlsl/vector-matrix-addition-subtraction.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248756 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[FTW] Enable CoreFoundation use if building for Apple target
bfulgham@apple.com [Fri, 16 Aug 2019 01:50:05 +0000 (01:50 +0000)]
[FTW] Enable CoreFoundation use if building for Apple target
https://bugs.webkit.org/show_bug.cgi?id=200799

Reviewed by Alex Christensen.

Source/JavaScriptCore:

* PlatformFTW.cmake: Add missing files.

Source/WebKit:

Fix the build and remove an unused method.

* PlatformFTW.cmake:
* Shared/ShareableBitmap.h:
* Shared/win/ShareableBitmapDirect2D.cpp:
(WebKit::ShareableBitmap::createDirect2DSurface):
(WebKit::ShareableBitmap::releaseSurfaceData): Deleted.

Source/WebKitLegacy:

* PlatformFTW.cmake:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
(FullscreenVideoController::FullscreenVideoController):
(FullscreenVideoController::enterFullscreen):
(FullscreenVideoController::exitFullscreen):
(FullscreenVideoController::createHUDWindow):
* FullscreenVideoController.h:
* WebView.cpp:
(WebView::exitFullscreenIfNeeded):

Source/WTF:

* wtf/PlatformFTW.cmake: Add missing files.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248755 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Matrices should have constructors that take a flattened list of scalars
mmaxfield@apple.com [Fri, 16 Aug 2019 01:39:34 +0000 (01:39 +0000)]
[WHLSL] Matrices should have constructors that take a flattened list of scalars
https://bugs.webkit.org/show_bug.cgi?id=200804

Reviewed by Saam Barati.

Source/WebCore:

HLSL has them, so we should too.

Test: webgpu/whlsl/matrix-constructors-list-of-scalars.html

* Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

* webgpu/whlsl/matrix-constructors-list-of-scalars-expected.txt: Added.
* webgpu/whlsl/matrix-constructors-list-of-scalars.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248754 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Sources: provide a way to create an arbitrary Inspector Style Sheet
drousso@apple.com [Fri, 16 Aug 2019 00:43:11 +0000 (00:43 +0000)]
Web Inspector: Sources: provide a way to create an arbitrary Inspector Style Sheet
https://bugs.webkit.org/show_bug.cgi?id=200425

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Right now, the only way to create an Inspector Style Sheet is by creating a new rule in the
Styles sidebar of the Elements Tab. This is unnecessarily restrictive, especially for those
who don't use the Elements tab.

Add a + button after the filter bar in the Navigation sidebar. Clicking on the + button will
show a menu with the following (more likely to be added later):
 - Inspector Style Sheet
 - Frames (if there are subframes)
   - (name of subframe)
      - Inspector Style Sheet

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject): Added.
(WI.SourcesNavigationSidebarPanel.prototype._filterByResourcesWithIssues): Added.
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
(WI.SourcesNavigationSidebarPanel.prototype._handleFrameWasAdded): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange): Deleted.
* UserInterface/Views/GeneralTreeElement.js:
(WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
Drive-by: sort `WI.ResourceTreeElement`s alongside `WI.FolderTreeElement`s for easier readability.
* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.onpopulate):
Add all `inspectorStyleSheetsForFrame` instead of just the preferred one so that they all
are visible/selectable for editing.

* UserInterface/Views/FilterBar.js:
(WI.FilterBar):
* UserInterface/Views/FilterBar.css:
(.filter-bar > .navigation-bar > .item):
(.filter-bar > input[type="search"]):
(.filter-bar > .navigation-bar + input[type="search"]): Added.
(.filter-bar > input[type="search"] + .navigation-bar:empty): Added.
Move the position of the filter bar buttons to be after the filter bar itself, so that other
parents can add action items before the filter bar to keep a consistent positioning.
 - to the left of the filter bar are action items (e.g. "+")
 - the filter bar itself
 - to the right of the filter bar are filter buttons (e.g. "filter by resoure with issue")

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.get frames):
Drive-by: use `Array.from`, instead of `[...map.values()]`.
* UserInterface/Models/Frame.js:
(WI.Frame.prototype.get url):
(WI.Frame.prototype.get urlComponents): Added.

* UserInterface/Base/URLUtilities.js.js:
(parseURL):
Calculate and include the `origin` string with the output.

* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
Remove `doNotCreateIfMissing` now that the last caller has been removed.

* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

* inspector/unit-tests/url-utilities.html:
* inspector/unit-tests/url-utilities-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248753 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoTidy up some event stream helpers in basic-gestures.js
wenson_hsieh@apple.com [Fri, 16 Aug 2019 00:37:20 +0000 (00:37 +0000)]
Tidy up some event stream helpers in basic-gestures.js
https://bugs.webkit.org/show_bug.cgi?id=200783

Reviewed by Tim Horton.

* resources/basic-gestures.js:

Make a few small adjustments:
(1) Invoke uiScriptComplete within the completion callback of sendEventStream. This actually doesn't result in
    any behavior differences, since UIScriptController will, by default, wait for non-persistent asynchronous
    tasks to finish before allowing the UI-side script invocation to finish.
(2) Fix some minor indentation issues in longPressAndHoldAtPoint, touchAndDragFromPointToPoint, holdAtPoint,
    and continueTouchAndDragFromPointToPoint.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248752 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUse one VM per thread for IDB serialization work in network process
sihui_liu@apple.com [Fri, 16 Aug 2019 00:12:42 +0000 (00:12 +0000)]
Use one VM per thread for IDB serialization work in network process
https://bugs.webkit.org/show_bug.cgi?id=200526

Reviewed by Geoffrey Garen.

We had one static VM in UniqueIDBDatabase for serialization/deserialization in MemoryObjectStore. This VM was
never destroyed and could be used on different background threads.

We also had one VM per SQLiteIDBBackingStore for serialization/deserialization in SQLiteIDBBackingStore. If
there were multiple IndexedDB databases of the same session opened, we would have multiple VMs created
on the same thread. Each VM has its memory allocator and garbage collector, which takes up memory.

To be more memory efficient and safe, we can use one VM per thread in the network process, and create/destroy
the VMs on demand.

* Modules/indexeddb/server/IDBSerializationContext.cpp: Added.
(WebCore::IDBServer::IDBSerializationContext::getOrCreateIDBSerializationContext):
(WebCore::IDBServer::IDBSerializationContext::~IDBSerializationContext):
(WebCore::IDBServer::IDBSerializationContext::initializeVM):
(WebCore::IDBServer::IDBSerializationContext::vm):
(WebCore::IDBServer::IDBSerializationContext::execState):
(WebCore::IDBServer::IDBSerializationContext::IDBSerializationContext):
* Modules/indexeddb/server/IDBSerializationContext.h: Added.
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::createBackingStore):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::create):
(WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::create):
(WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
* Modules/indexeddb/server/MemoryObjectStore.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::initializeVM): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::vm): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::globalObject): Deleted.
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Sources.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248751 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[ContentChangeObserver] Dispatch synthetic click when the visibility candidate elemen...
zalan@apple.com [Thu, 15 Aug 2019 22:18:56 +0000 (22:18 +0000)]
[ContentChangeObserver] Dispatch synthetic click when the visibility candidate element becomes hidden again.
https://bugs.webkit.org/show_bug.cgi?id=200773
<rdar://problem/54351728>

Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes the case when the candidate element (going from hidden to visible) becomes hidden by the end of the observation window. It essentially means that no visible change has happened
and we should proceed with dispatching the synthetic click event.
We now keep track of the candidate element and reset the visiblity state when it loses its renderer.

Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::didAddTransition):
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::didInstallDOMTimer):
(WebCore::ContentChangeObserver::reset):
(WebCore::ContentChangeObserver::rendererWillBeDestroyed):
(WebCore::ContentChangeObserver::contentVisibilityDidChange):
(WebCore::ContentChangeObserver::touchEventDidStart):
(WebCore::ContentChangeObserver::touchEventDidFinish):
(WebCore::ContentChangeObserver::mouseMovedDidStart):
(WebCore::ContentChangeObserver::mouseMovedDidFinish):
(WebCore::ContentChangeObserver::adjustObservedState):
(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
(WebCore::ContentChangeObserver::hasDeterminateState const): Deleted.
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::hasObservedTransition const):
(WebCore::ContentChangeObserver::setTouchEventIsBeingDispatched):
(WebCore::ContentChangeObserver::isTouchEventBeingDispatched const):
(WebCore::ContentChangeObserver::setMouseMovedEventIsBeingDispatched):
(WebCore::ContentChangeObserver::isMouseMovedEventBeingDispatched const):
(WebCore::ContentChangeObserver::isObservingContentChanges const):

LayoutTests:

* fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden-expected.html: Added.
* fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248750 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed suggested patch follow-up to https://bugs.webkit.org/show_bug.cgi?id=200740.
justin_fan@apple.com [Thu, 15 Aug 2019 22:15:29 +0000 (22:15 +0000)]
Unreviewed suggested patch follow-up to https://bugs.webkit.org/show_bug.cgi?id=200740.

* platform/graphics/gpu/GPURequestAdapterOptions.h:
(): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[FTW] Support web fonts
bfulgham@apple.com [Thu, 15 Aug 2019 21:49:01 +0000 (21:49 +0000)]
[FTW] Support web fonts
https://bugs.webkit.org/show_bug.cgi?id=200771
<rdar://problem/54350291>

Reviewed by Dean Jackson.

The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite.

This patch does the following:
1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we
   can share code in more places.
2. After adding the font to GDI, it adds the font information to the DirectWrite font cache.
3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used
   for downloaded fonts.

* PlatformFTW.cmake: Add DirectWriteUtilities.cpp
* css/CSSFontFaceSource.cpp:
* loader/cache/CachedFont.cpp:
* loader/cache/CachedSVGFont.cpp:
* platform/graphics/Font.cpp:
* platform/graphics/Font.h:
* platform/graphics/FontCache.cpp:
* platform/graphics/FontPlatformData.cpp:
* platform/graphics/FontPlatformData.h:
* platform/graphics/opentype/OpenTypeUtilities.cpp:
(WebCore::renameAndActivateFont):
* platform/graphics/win/DirectWriteUtilities.cpp: Added.
* platform/graphics/win/DirectWriteUtilities.h: Added.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::createGDIFont):
* platform/graphics/win/FontCascadeDirect2D.cpp:
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontPlatformDataDirect2D.cpp:
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::createFallbackFont):
* platform/graphics/win/FontPlatformDataWin.cpp:
* platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/graphics/win/SimpleFontDataDirect2D.cpp:
(WebCore::Font::systemDWriteFactory): Deleted.
(WebCore::Font::systemDWriteGdiInterop): Deleted.
* platform/graphics/win/SimpleFontDataWin.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248748 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[Cocoa] Adopt -preventDisplaySleepForVideoPlayback
jer.noble@apple.com [Thu, 15 Aug 2019 21:39:32 +0000 (21:39 +0000)]
[Cocoa] Adopt -preventDisplaySleepForVideoPlayback
https://bugs.webkit.org/show_bug.cgi?id=200774

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248747 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Don't accept operator&& or operator|| in the Lexer
rmorisset@apple.com [Thu, 15 Aug 2019 21:18:11 +0000 (21:18 +0000)]
[WHLSL] Don't accept operator&& or operator|| in the Lexer
https://bugs.webkit.org/show_bug.cgi?id=200785

Reviewed by Saam Barati.

Source/WebCore:

Implementing && or || as function calls would lose us short-circuiting.

2 new tests in LayoutTests/webgpu/whlsl/lexing.html

* Modules/webgpu/WHLSL/WHLSLLexer.cpp:
(WebCore::WHLSL::Lexer::consumeTokenFromStream):

LayoutTests:

* webgpu/whlsl/lexing.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248746 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoYellow Lookup highlight gets stuck over Mail messages
timothy_horton@apple.com [Thu, 15 Aug 2019 20:21:05 +0000 (20:21 +0000)]
Yellow Lookup highlight gets stuck over Mail messages
https://bugs.webkit.org/show_bug.cgi?id=200778
<rdar://problem/53868514>

Reviewed by Wenson Hsieh.

* WebView/WebView.mm:
(-[WebView _showDictionaryLookupPopup:]):
Add a dismissal callback so that when Reveal hides the panel, it also
dismisses the yellow indicator. This matches the behavior in modern WebKit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248741 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed. Debug build fix after r248730.
sbarati@apple.com [Thu, 15 Aug 2019 20:13:14 +0000 (20:13 +0000)]
Unreviewed. Debug build fix after r248730.

* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::inlineNativeFunction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248740 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: CodeMirror still inserts a tab even when "Prefer indent using" is...
drousso@apple.com [Thu, 15 Aug 2019 19:32:14 +0000 (19:32 +0000)]
Web Inspector: CodeMirror still inserts a tab even when "Prefer indent using" is set to "Spaces"
https://bugs.webkit.org/show_bug.cgi?id=200770

Reviewed by Ross Kirsling.

* UserInterface/Views/CodeMirrorAdditions.js:
Remap the `insertTab` command to use `insertSoftTab` when "Prefer indent using" is set to
"Spaces" so that CodeMirror inserts the number of spaces that would match a tab ("\t") being
inserted at the same spot.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248739 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoDateConversion::formatDateTime incorrectly formats negative years
commit-queue@webkit.org [Thu, 15 Aug 2019 19:31:13 +0000 (19:31 +0000)]
DateConversion::formatDateTime incorrectly formats negative years
https://bugs.webkit.org/show_bug.cgi?id=199964

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-08-15
Reviewed by Ross Kirsling.

JSTests:

* test262/expectations.yaml: Mark 6 test cases as passing.

Source/JavaScriptCore:

Currently, year is always padded to max length of 4, including the minus sign "-".
With this change, only absolute value of year is padded to max length of 4 and
preceded by minus sign "-" if the year is negative.
(steps 6-10 of https://tc39.es/ecma262/#sec-datestring)

* runtime/DateConversion.cpp:
(JSC::appendNumber):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Sources: the "No Filter Results" message sits on top of all of the...
drousso@apple.com [Thu, 15 Aug 2019 19:18:43 +0000 (19:18 +0000)]
Web Inspector: Sources: the "No Filter Results" message sits on top of all of the content, preventing any interaction
https://bugs.webkit.org/show_bug.cgi?id=200755

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .resources-container): Added.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Added.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .call-stack-container):
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .breakpoints-container):
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .resources-container): Added.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources)): Deleted.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .resources): Deleted.
Wrap the resources `WI.TreeOutline` in a <div> so the empty message placeholder that gets
inserted after it can be constrained to the size of the `WI.TreeOutline`.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248737 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: support `console.screenshot` with detached <canvas>
drousso@apple.com [Thu, 15 Aug 2019 19:16:04 +0000 (19:16 +0000)]
Web Inspector: support `console.screenshot` with detached <canvas>
https://bugs.webkit.org/show_bug.cgi?id=200723

Reviewed by Joseph Pecoraro.

Source/WebCore:

* page/PageConsoleClient.cpp:
(WebCore::snapshotCanvas): Added.
(WebCore::PageConsoleClient::screenshot):

LayoutTests:

* inspector/console/console-screenshot.html:
* inspector/console/console-screenshot-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248736 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Layers: background of 3D area doesn't update when transitioning to...
drousso@apple.com [Thu, 15 Aug 2019 19:13:21 +0000 (19:13 +0000)]
Web Inspector: Layers: background of 3D area doesn't update when transitioning to/from Dark mode
https://bugs.webkit.org/show_bug.cgi?id=200775

Reviewed by Ross Kirsling.

* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.initialLayout):
Add a `matchMedia` listener for `(prefers-color-scheme: dark)` and update the clear color
of the WebGL renderer whenever it changes.

* UserInterface/Views/ErrorObjectView.css:
(@media (prefers-color-scheme: dark)): Added.
(@media (prefers-dark-interface)): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(@media (prefers-color-scheme: dark)): Added.
(@media (prefers-dark-interface)): Deleted.
Drive-by: replace older `prefers-dark-interface` with modern `prefers-color-scheme: dark`.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248735 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoSome improvements on web storage
sihui_liu@apple.com [Thu, 15 Aug 2019 18:41:53 +0000 (18:41 +0000)]
Some improvements on web storage
https://bugs.webkit.org/show_bug.cgi?id=200373

Reviewed by Geoffrey Garen.
Source/WebCore:

Remove storage type EphemeralLocalStorage, which is used for localStorage in ephemeral session, and use
LocalStorage instead.

Add SessionID to StorageNamespace to make StorageNamespace session-specific.

No new test, updating existing tests for new behavior.

* loader/EmptyClients.cpp:
(WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.

* page/Chrome.cpp:
(WebCore::Chrome::createWindow const): ephemeral localStorage of different windows will connect to the same
StorageArea in network process, so no need to copy from parent window to child window.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::prewarmLocalStorageIfNecessary): localStorage will be prewarmed in network process in the
initialization of StorageAreaMap.

* page/Page.cpp:
(WebCore::m_applicationManifest):
(WebCore::Page::~Page):
(WebCore::Page::setSessionID):
(WebCore::Page::ephemeralLocalStorage): Deleted.
(WebCore::Page::setEphemeralLocalStorage): Deleted.
(WebCore::Page::setStorageNamespaceProvider): Deleted.
* page/Page.h:
(WebCore::Page::storageNamespaceProvider):
* storage/Storage.cpp:
(WebCore::Storage::prewarm): Deleted.
* storage/Storage.h:
* storage/StorageArea.h:
(WebCore::StorageArea::closeDatabaseIfIdle):
(WebCore::StorageArea::prewarm): Deleted.
* storage/StorageNamespace.h:
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::~StorageNamespaceProvider):
(WebCore::StorageNamespaceProvider::localStorageArea):
(WebCore::StorageNamespaceProvider::localStorageNamespace):
(WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
(WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): change SessionID of storageNamespace
and update every StorageArea in this namespace.
(WebCore::StorageNamespaceProvider::addPage): Deleted.
(WebCore::StorageNamespaceProvider::removePage): Deleted.
* storage/StorageNamespaceProvider.h:
* storage/StorageType.h:
(WebCore::isLocalStorage):

Source/WebKit:

Fix some issues in web storage architecture. For example, sessionStorageNameSpace for web page is prepared and
destroyed in the network process when the page comes and goes, even though the page may not use sessionStorage
at all. The messages about page state sent from web process to network process can be waste.

Here are some general ideas of this patch:
1. Network process owns the web storage, and web process keeps a small local copy (based on session and
origins that are visited). There is a virtual connection from the local copy in the web process to the original
copy in the network process. The connection is created by web process when some page asks for web storage.
2. If connection is lost because network process is gone, storage in memory will be lost. The local copy in web
processs will be discarded.
3. (SessionID, StorageNamespaceID, SecurityOrigin) is used to identify a storage area. If session is changed in
web process (like enabling private browsing in layout test now), a re-connection with different sessionID would
suffice to load another copy of storage.
4. localStorage in ephemeral session has the same behavior as localStorage instead of sessionStorage, which
means different pages in the same ephemeral session share the same localStorage.

Also, this patch introduces StorageManagerSet to network process. It handles web storage stuff, including
receiving storage messages from web process, on one background thread. Previously each session has its own
StorageManager and each StorageManager has its own WorkQueue.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:

* NetworkProcess/NetworkConnectionToWebProcess.cpp: remove message handlers that are no longer needed. Network
process no longer needs to know page states from web process.
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::webPageWasAdded): Deleted.
(WebKit::NetworkConnectionToWebProcess::webPageWasRemoved): Deleted.
(WebKit::NetworkConnectionToWebProcess::webProcessSessionChanged): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* NetworkProcess/NetworkProcess.cpp: NetworkProcess uses StorageManagerSet instead of StorageManager from
different sessions to deal with web storage.
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess): StorageManagerSet starts handling
StorageManagerSet messages from the new connection.
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::hasLocalStorage):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::syncLocalStorage):
(WebKit::NetworkProcess::clearLegacyPrivateBrowsingLocalStorage): added for clearing in-memory ephemeral
localStorage.
(WebKit::NetworkProcess::getLocalStorageOriginDetails):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::webPageWasAdded): Deleted.
(WebKit::NetworkProcess::webPageWasRemoved): Deleted.
(WebKit::NetworkProcess::webProcessWasDisconnected): Deleted.
(WebKit::NetworkProcess::webProcessSessionChanged): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:

* NetworkProcess/NetworkSession.cpp: StorageManager is moved out of NetworkSession. It is now managed by
StorageManagerSet.
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::storageManager): Deleted.

* NetworkProcess/NetworkSessionCreationParameters.cpp: creation parameters of StorageManager is moved out of
NetworkSessionCreationParameters.
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:

* NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::updateDatabase): remove an assertion that is no longer true as we can force an
update with syncLocalStorage now.
* NetworkProcess/WebStorage/LocalStorageDatabase.h: make updateDatabase public for syncLocalStorage.

* NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: LocalStorageDatabaseTracker is created on the
background thread now, so it does not hold WorkQueue to do the file operation.
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
* NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:
* NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
(WebKit::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::LocalStorageNamespace::cloneTo): Deleted.
* NetworkProcess/WebStorage/LocalStorageNamespace.h:
* NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
(WebKit::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::SessionStorageNamespace::addAllowedConnection): Deleted.
(WebKit::SessionStorageNamespace::removeAllowedConnection): Deleted.
* NetworkProcess/WebStorage/SessionStorageNamespace.h:
(WebKit::SessionStorageNamespace::allowedConnections const): Deleted.

* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::generateStorageAreaIdentifier): each StorageArea has an identifier. StorageAreaMap in web process uses
this identifier to indicate which StorageArea it is connecting to.
(WebKit::StorageArea::StorageArea):
(WebKit::StorageArea::~StorageArea): StorageArea may still have listeners because StorageArea should be
destroyed by requests from UI process, and listeners are connections to web processses.
(WebKit::StorageArea::addListener): load localStorageDatabase in advance if there is some connection to this
LocalStorage area.
(WebKit::StorageArea::removeListener):
(WebKit::StorageArea::hasListener const):
(WebKit::StorageArea::clear):
(WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
(WebKit::StorageArea::dispatchEvents const):
(WebKit::StorageArea::syncToDatabase):
(WebKit::StorageArea::setItems): Deleted. Stop syncing from web process to network process after network process
is relaunched.
* NetworkProcess/WebStorage/StorageArea.h:
(WebKit::StorageArea::identifier):
(WebKit::StorageArea::setWorkQueue):

* NetworkProcess/WebStorage/StorageManager.cpp: StorageManager should be accessed by only background thread now.
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::~StorageManager):
(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::destroySessionStorageNamespace): this is not used now but keep it for future
improvement to remove in-memory sessionStorage in network process if we know some web page is gone forever.
(WebKit::StorageManager::cloneSessionStorageNamespace): previously each page had its own ephemeral
localStorageNamespace and now all pages in the same session share one localStorage, so we don't need to clone
localStorageNamespace.
(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::createLocalStorageArea):
(WebKit::StorageManager::createTransientLocalStorageArea):
(WebKit::StorageManager::createSessionStorageArea):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateSessionStorageNamespace):
(WebKit::StorageManager::clearStorageNamespaces):
(WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection): Deleted.
(WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection): Deleted.
(WebKit::StorageManager::processDidCloseConnection): Deleted.
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin): Deleted.
(WebKit::StorageManager::createLocalStorageMap): Deleted.
(WebKit::StorageManager::createTransientLocalStorageMap): Deleted.
(WebKit::StorageManager::createSessionStorageMap): Deleted.
(WebKit::StorageManager::destroyStorageMap): Deleted.
(WebKit::StorageManager::prewarm): Deleted.
(WebKit::StorageManager::getValues): Deleted.
(WebKit::StorageManager::setItem): Deleted.
(WebKit::StorageManager::setItems): Deleted.
(WebKit::StorageManager::removeItem): Deleted.
(WebKit::StorageManager::clear): Deleted.
(WebKit::StorageManager::waitUntilTasksFinished): Deleted.
(WebKit::StorageManager::suspend): Deleted.
(WebKit::StorageManager::resume): Deleted.
(WebKit::StorageManager::findStorageArea const): Deleted.
* NetworkProcess/WebStorage/StorageManager.h:
(WebKit::StorageManager::workQueue const): Deleted.
(): Deleted.

* NetworkProcess/WebStorage/StorageManager.messages.in: Removed. Moved to StorageManagerSet.messages.in.

* NetworkProcess/WebStorage/StorageManagerSet.cpp: Added.
(WebKit::StorageManagerSet::create):
(WebKit::StorageManagerSet::StorageManagerSet):
(WebKit::StorageManagerSet::~StorageManagerSet):
(WebKit::StorageManagerSet::add):
(WebKit::StorageManagerSet::remove):
(WebKit::StorageManagerSet::contains):
(WebKit::StorageManagerSet::addConnection):
(WebKit::StorageManagerSet::removeConnection):
(WebKit::StorageManagerSet::waitUntilTasksFinished):
(WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished):
(WebKit::StorageManagerSet::suspend):
(WebKit::StorageManagerSet::resume):
(WebKit::StorageManagerSet::getSessionStorageOrigins):
(WebKit::StorageManagerSet::deleteSessionStorage):
(WebKit::StorageManagerSet::deleteSessionStorageForOrigins):
(WebKit::StorageManagerSet::getLocalStorageOrigins):
(WebKit::StorageManagerSet::deleteLocalStorageModifiedSince):
(WebKit::StorageManagerSet::deleteLocalStorageForOrigins):
(WebKit::StorageManagerSet::getLocalStorageOriginDetails):
(WebKit::StorageManagerSet::connectToLocalStorageArea):
(WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
(WebKit::StorageManagerSet::connectToSessionStorageArea):
(WebKit::StorageManagerSet::disconnectFromStorageArea):
(WebKit::StorageManagerSet::getValues):
(WebKit::StorageManagerSet::setItem):
(WebKit::StorageManagerSet::removeItem):
(WebKit::StorageManagerSet::clear):
(WebKit::StorageManagerSet::cloneSessionStorageNamespace):
* NetworkProcess/WebStorage/StorageManagerSet.h: Added.
* NetworkProcess/WebStorage/StorageManagerSet.messages.in: Added.

* Shared/WebsiteDataStoreParameters.cpp: creation parameters of StorageManager are moved to
WebsiteDataStoreParameters.
(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
(WebKit::WebsiteDataStoreParameters::privateSessionParameters):
* Shared/WebsiteDataStoreParameters.h:
* Sources.txt:

* UIProcess/API/C/WKContext.cpp: add SPI for tests.
(WKContextSyncLocalStorage):
(WKContextClearLegacyPrivateBrowsingLocalStorage):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreRemoveLocalStorage):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::syncLocalStorage):
(WebKit::WebProcessPool::clearLegacyPrivateBrowsingLocalStorage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parameters):
* WebKit.xcodeproj/project.pbxproj:

* WebProcess/InjectedBundle/InjectedBundle.cpp: session change of web storage is done via
WebStorageNamespaceProvider instead of WebProcess now.
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/WebProcess.cpp: web process no longer sends messsages about page state to network process.
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::removeWebPage):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::storageAreaMap const):
(WebKit::WebProcess::enablePrivateBrowsingForTesting): Deleted. This was used for changing session via
WebProcess.
* WebProcess/WebProcess.h:
* WebProcess/WebStorage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::length):
(WebKit::StorageAreaImpl::key):
(WebKit::StorageAreaImpl::item):
(WebKit::StorageAreaImpl::setItem):
(WebKit::StorageAreaImpl::removeItem):
(WebKit::StorageAreaImpl::clear):
(WebKit::StorageAreaImpl::contains):
(WebKit::StorageAreaImpl::storageType const):
(WebKit::StorageAreaImpl::incrementAccessCount):
(WebKit::StorageAreaImpl::decrementAccessCount):
(WebKit::StorageAreaImpl::prewarm): Deleted.
(WebKit::StorageAreaImpl::securityOrigin const): Deleted.

* WebProcess/WebStorage/StorageAreaImpl.h: make StorageAreaImpl hold a weak reference to StorageAreaMap and
StorageNamespaceImpl hold a strong reference. In this way lifeime of localStorage StorageAreraMap stays align
with StorageNameSpaceProvider and Page.

* WebProcess/WebStorage/StorageAreaMap.cpp: identifier of StorageAreaMap is the same as identifier of
StorageArea it connects to. If the identifier is 0, it means the StorageAreaMap is disconnected.
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::~StorageAreaMap):
(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
(WebKit::StorageAreaMap::resetValues):
(WebKit::StorageAreaMap::loadValuesIfNeeded):
(WebKit::StorageAreaMap::applyChange):
(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
(WebKit::StorageAreaMap::connect):
(WebKit::StorageAreaMap::disconnect):
(WebKit::generateStorageMapID): Deleted.
(WebKit::StorageAreaMap::prewarm): Deleted.
(WebKit::StorageAreaMap::didGetValues): Deleted. This is useless as GetValues is a synchronous operation.
* WebProcess/WebStorage/StorageAreaMap.h:
(): Deleted.

* WebProcess/WebStorage/StorageAreaMap.messages.in: there are two synchronous messages, one for connection and
one for getting values. We may merge them into one in future improvement.
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::setSessionIDForTesting):
(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace): Deleted.
* WebProcess/WebStorage/StorageNamespaceImpl.h:
* WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
* WebProcess/WebStorage/WebStorageNamespaceProvider.h:

Source/WebKitLegacy:

Do some clean-up and add support for session change of web storage in layout tests.

* Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::sessionChanged):
* Storage/StorageAreaImpl.h:
(): Deleted.

* Storage/StorageAreaSync.h: make sure StorageAreaSync is destructed on the main thread, as it can be
dereferenced in StorageAreaImpl::sessionChanged and its last reference for final sync could be released on the
background thread.

* Storage/StorageNamespaceImpl.cpp: replace EphemeralLocalStorage with LocalStorage, and store SessionID in
StorageNamespace.
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::close):
(WebKit::StorageNamespaceImpl::setSessionIDForTesting):
(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace): Deleted.
* Storage/StorageNamespaceImpl.h:
* Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
* Storage/WebStorageNamespaceProvider.h:

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): notify storageNamespaceProvider about session change.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(TEST): update expectation for behavior change.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: new SPI to synchronously flush localStorage to
database file.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::syncLocalStorage):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

* WebKitTestRunner/TestController.cpp: clear local storage between test runs to make each test isolated.
(WTR::TestController::resetStateToConsistentValues):
(WTR::StorageVoidCallbackContext::StorageVoidCallbackContext):
(WTR::StorageVoidCallback):
(WTR::TestController::clearIndexedDatabases):
(WTR::TestController::clearLocalStorage):
(WTR::TestController::syncLocalStorage):
(WTR::RemoveAllIndexedDatabasesCallbackContext::RemoveAllIndexedDatabasesCallbackContext): Deleted. Replaced
with StorageVoidCallbackContext for general usage.
(WTR::RemoveAllIndexedDatabasesCallback): Deleted. Replaced with StorageVoidCallback.
(WTR::TestController::ClearIndexedDatabases): Deleted. Use lowercase for consistent style.
* WebKitTestRunner/TestController.h:

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): add handler for new message
SyncLocalStorage.

LayoutTests:

Modify tests for a behavior change: sessionStorage will be lost when network process crashes.

For tests which use sessionStorage to store items, crash network process, then read from sessionStorage and
expect items to be in sessionStorage, replace sessionStorage with localStorage. Also, to make sure localStorage
is stored persistently before network process gets terminated, adopt a newly introduced SPI to
synchronously flush localStorage content to disk before terminating network process.

* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt:
* storage/indexeddb/IDBObject-leak.html:
* storage/indexeddb/modern/opendatabase-after-storage-crash-expected.txt:
* storage/indexeddb/modern/opendatabase-after-storage-crash.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoOccasional hang under -[UIKeyboardTaskQueue lockWhenReadyForMainThread] when long...
wenson_hsieh@apple.com [Thu, 15 Aug 2019 18:39:32 +0000 (18:39 +0000)]
Occasional hang under -[UIKeyboardTaskQueue lockWhenReadyForMainThread] when long-pressing non-editable text
https://bugs.webkit.org/show_bug.cgi?id=200731
<rdar://problem/54315371>

Reviewed by Tim Horton.

Source/WebKit:

When handling a single tap in non-editable content, keyboards logic in UIKit may attempt to wait for all
pending tasks in UIKeyboardTaskQueue to finish executing (e.g. by calling -waitUntilAllTasksAreFinished]). If
the task queue has a pending task at this moment - for example, a text selection update that is waiting for a
response from the web process - this will result in a permanent deadlock, since the main thread will be blocked,
and therefore cannot receive any IPC communication from the web process.

One way to trigger this is to activate both the loupe gesture and non-editable text tap gesture simultaneously,
by tapping in a non-editable part of the web page, while an ongoing loupe gesture is driving selection updates
(see the layout test for more details).

To avoid getting into this scenario, prevent the text tap gesture recognizer from firing in a few edge cases
that could lead to hangs under keyboard code in UIKit. See comments below.

Test: editing/selection/ios/tap-during-loupe-gesture.html

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Don't allow the text tap gesture recognizer to fire if the user is actively modifying the text selection using
the loupe gesture, or if there's other pending selection change updates that are pending responses from the web
content process.

(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):

Increment and decrement _suppressNonEditableSingleTapTextInteractionCount while handling these selection
updates.

LayoutTests:

Add a layout test to verify that tapping the page while handling a text loupe gesture doesn't cause the UI
process to hang indefinitely.

* editing/selection/ios/tap-during-loupe-gesture-expected.txt: Added.
* editing/selection/ios/tap-during-loupe-gesture.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248733 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Update Esprima to trunk (minor fixes)
joepeck@webkit.org [Thu, 15 Aug 2019 18:14:45 +0000 (18:14 +0000)]
Web Inspector: Update Esprima to trunk (minor fixes)
https://bugs.webkit.org/show_bug.cgi?id=200691
<rdar://problem/54276170>

Rubber-stamped by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/External/Esprima/esprima.js:
Updated to jquery/esprima@5e55171feb5adbc2b1d28ef4b2628d5ea9af0848.

* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WI.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WI.ScriptSyntaxTree.prototype._recurse):
(WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WI.ScriptSyntaxTree):
* UserInterface/Workers/Formatter/ESTreeWalker.js:
(ESTreeWalker.prototype._walkChildren):
(ESTreeWalker):
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
- SpreadProperty => SpreadElement.
- RestProperty => RestElement.

Source/WebInspectorUI/../../LayoutTests:

* inspector/model/parse-script-syntax-tree-expected.txt:
* inspector/model/parse-script-syntax-tree.html:
- SpreadProperty => SpreadElement.
- RestProperty => RestElement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248732 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed, rolling out r248440.
commit-queue@webkit.org [Thu, 15 Aug 2019 18:02:34 +0000 (18:02 +0000)]
Unreviewed, rolling out r248440.
https://bugs.webkit.org/show_bug.cgi?id=200772

Introduced regressions related to loading of local files.
(Requested by perarne on #webkit).

Reverted changeset:

"[Mac] Use the PID of the WebContent process when issuing
local file read sandbox extensions"
https://bugs.webkit.org/show_bug.cgi?id=200543
https://trac.webkit.org/changeset/248440

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248731 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Make length, clamp, operator+, operator-, operator*, operator/, operator...
sbarati@apple.com [Thu, 15 Aug 2019 18:01:16 +0000 (18:01 +0000)]
[WHLSL] Make length, clamp, operator+, operator-, operator*, operator/, operator[], operator[]=, operator.xy, operator.xy=, native
https://bugs.webkit.org/show_bug.cgi?id=200700

Reviewed by Robin Morisset.

Source/WebCore:

This makes us 50% faster in compute_boids.

Tests: webgpu/whlsl/clamp-stdlib.html
       webgpu/whlsl/length-stdlib.html
       webgpu/whlsl/operator-div.html
       webgpu/whlsl/operator-minus.html
       webgpu/whlsl/operator-plus.html
       webgpu/whlsl/operator-times.html
       webgpu/whlsl/operator-vector-assign.html
       webgpu/whlsl/operator-vector-load.html
       webgpu/whlsl/operator-xy.html

* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::inlineNativeFunction):
* Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
* Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
(WebCore::WHLSL::includeStandardLibrary):

LayoutTests:

* webgpu/whlsl/clamp-stdlib-expected.txt: Added.
* webgpu/whlsl/clamp-stdlib.html: Added.
* webgpu/whlsl/length-stdlib-expected.txt: Added.
* webgpu/whlsl/length-stdlib.html: Added.
* webgpu/whlsl/operator-div-expected.txt: Added.
* webgpu/whlsl/operator-div.html: Added.
* webgpu/whlsl/operator-minus-expected.txt: Added.
* webgpu/whlsl/operator-minus.html: Added.
* webgpu/whlsl/operator-plus-expected.txt: Added.
* webgpu/whlsl/operator-plus.html: Added.
* webgpu/whlsl/operator-times-expected.txt: Added.
* webgpu/whlsl/operator-times.html: Added.
* webgpu/whlsl/operator-vector-assign-expected.txt: Added.
* webgpu/whlsl/operator-vector-assign.html: Added.
* webgpu/whlsl/operator-vector-load-expected.txt: Added.
* webgpu/whlsl/operator-vector-load.html: Added.
* webgpu/whlsl/operator-xy-expected.txt: Added.
* webgpu/whlsl/operator-xy.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248730 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Trivial clean-up of the MSL code generated
rmorisset@apple.com [Thu, 15 Aug 2019 17:49:38 +0000 (17:49 +0000)]
[WHLSL] Trivial clean-up of the MSL code generated
https://bugs.webkit.org/show_bug.cgi?id=200525

Reviewed by Darin Adler.

Emit simpler code for ternary expressions
Remove duplicate {} around functions

No new tests as it is covered by the existing ones.

* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248729 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoAlways create a Document with a valid SessionID
youenn@apple.com [Thu, 15 Aug 2019 17:44:07 +0000 (17:44 +0000)]
Always create a Document with a valid SessionID
https://bugs.webkit.org/show_bug.cgi?id=200727

Reviewed by Alex Christensen.

Source/WebCore:

Pass a valid SessionID to the Document constructor.
This allows getting us closer to use SessionID like ObjectIdentifier.
Add a SessionID getter from Frame and use it when constructing a Document.
Otherwise, retrieve the SessionID from the corresponding context.
No change of behavior.

* dom/DOMImplementation.cpp:
(WebCore::createXMLDocument):
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementation::createHTMLDocument):
* dom/DOMImplementation.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::m_undoManager):
(WebCore::Document::create):
(WebCore::Document::createNonRenderedPlaceholder):
(WebCore::Document::cloneDocumentWithoutChildren const):
(WebCore::Document::ensureTemplateDocument):
* dom/Document.h:
(WebCore::Document::create):
(WebCore::Document::createNonRenderedPlaceholder): Deleted.
* dom/XMLDocument.h:
(WebCore::XMLDocument::create):
(WebCore::XMLDocument::createXHTML):
(WebCore::XMLDocument::XMLDocument):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
* html/FTPDirectoryDocument.h:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::createSynthesizedDocument):
(WebCore::HTMLDocument::HTMLDocument):
(WebCore::HTMLDocument::cloneDocumentWithoutChildren const):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::create):
(WebCore::HTMLDocument::createSynthesizedDocument): Deleted.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::ImageDocument):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
* html/MediaDocument.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocument::PluginDocument):
* html/PluginDocument.h:
* html/TextDocument.cpp:
(WebCore::TextDocument::TextDocument):
* html/TextDocument.h:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchDocument):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDocument):
(WebCore::DocumentWriter::begin):
* loader/SinkDocument.cpp:
(WebCore::SinkDocument::SinkDocument):
* loader/SinkDocument.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading):
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::ensureCustomFontData):
* page/Frame.cpp:
(WebCore::Frame::sessionID const):
* page/Frame.h:
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::SVGDocument):
(WebCore::SVGDocument::cloneDocumentWithoutChildren const):
* svg/SVGDocument.h:
(WebCore::SVGDocument::create):
* xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):
* xml/DOMParser.h:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.cpp:
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):

Source/WebKitLegacy/mac:

Implement WebKit1 sessionID getter like done for WebKit2.
Either the loader client has a page in which case the page session ID is used
or the client has no page, in which case the default session ID is used.
This is the same behavior as CachedResourceLoader.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::sessionID const):

Source/WebKitLegacy/win:

Implement WebKit1 sessionID getter like done for WebKit2.
Either the loader client has a page in which case the page session ID is used
or the client has no page, in which case the default session ID is used.
This is the same behavior as CachedResourceLoader.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::sessionID const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248728 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoresults.webkit.org: Add content hook to FlaskRequestsResponse
jbedard@apple.com [Thu, 15 Aug 2019 17:35:02 +0000 (17:35 +0000)]
results.webkit.org: Add content hook to FlaskRequestsResponse
https://bugs.webkit.org/show_bug.cgi?id=200721

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/flask_support/flask_testcase.py:
(FlaskRequestsResponse):
(FlaskRequestsResponse.content): Return the encoded raw bytes value of the
Response, conforming to request's API.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248727 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoNegative size box with border radius causes hang under WebCore::approximateAsRegion
antti@apple.com [Thu, 15 Aug 2019 17:20:20 +0000 (17:20 +0000)]
Negative size box with border radius causes hang under WebCore::approximateAsRegion
https://bugs.webkit.org/show_bug.cgi?id=200769
<rdar://problem/53380674>

Reviewed by Alex Christensen.

Source/WebCore:

If a box's width or height computes negative the rounded border rect will also be negative.
This caused near-infinite loop during rounded border region approximation.

Test: fast/css/border-radius-negative-size.html

* platform/graphics/RoundedRect.cpp:
(WebCore::approximateAsRegion):

Bail out if the region is empty (which includes negative sizes).
For safety also limit the number of rectangles we generate for corner arc approximation.

LayoutTests:

* fast/css/border-radius-negative-size-expected.txt: Added.
* fast/css/border-radius-negative-size.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248722 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[GStreamer] Deal with slow buffer consumption in GStreamerMediaStreamSource
commit-queue@webkit.org [Thu, 15 Aug 2019 17:17:52 +0000 (17:17 +0000)]
[GStreamer] Deal with slow buffer consumption in GStreamerMediaStreamSource
https://bugs.webkit.org/show_bug.cgi?id=200633

Refactoring the GStreamerMediaStreamSource factoring out streams specific
data in a dedicated structure.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-08-15
Reviewed by Philippe Normand.

No new tests, since I do not see how to reproduce that in a test in a simple way,
this aims at enhancing user experience when running under high load.

* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::_WebKitMediaStreamSrc::SourceData::reset):
(WebCore::_WebKitMediaStreamSrc::SourceData::src):
(WebCore::_WebKitMediaStreamSrc::SourceData::setSrc):
(WebCore::_WebKitMediaStreamSrc::SourceData::isUsed):
(WebCore::_WebKitMediaStreamSrc::SourceData::pushSample):
(WebCore::webkitMediaStreamSrcDispose):
(WebCore::webkit_media_stream_src_init):
(WebCore::webkitMediaStreamSrcNeedDataCb):
(WebCore::webkitMediaStreamSrcEnoughDataCb):
(WebCore::webkitMediaStreamSrcSetupAppSrc):
(WebCore::webkitMediaStreamSrcRemoveTrackByType):
(WebCore::webkitMediaStreamSrcPushVideoSample):
(WebCore::webkitMediaStreamSrcPushAudioSample):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248721 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Uncaught Exception: Content request failed.
drousso@apple.com [Thu, 15 Aug 2019 17:15:15 +0000 (17:15 +0000)]
Web Inspector: Uncaught Exception: Content request failed.
https://bugs.webkit.org/show_bug.cgi?id=200704
<rdar://problem/54279372>

Reviewed by Brian Burg.

* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.requestContentFromBackend): Added.
Add an "assert not reached", as WebSocket resources don't really have "content", instead
having a list of send/receive frames.

* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
Don't attempt to request the content of any `WI.WebSocketResource` for the reason above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248720 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoMake mock libwebrtc tests run with unified plan
youenn@apple.com [Thu, 15 Aug 2019 17:12:52 +0000 (17:12 +0000)]
Make mock libwebrtc tests run with unified plan
https://bugs.webkit.org/show_bug.cgi?id=200713

Reviewed by Alex Christensen.

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:

Source/WebCore:

Update mock endpoint to pass mock webrtc tests with unified plan.
This requires implementing support for mock transceivers.
Covered by existing tests.

* testing/Internals.cpp:
(WebCore::Internals::useMockRTCPeerConnectionFactory):
Update assert to mandate unified plan.
* testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::MockLibWebRTCPeerConnection::~MockLibWebRTCPeerConnection):
(WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
(WebCore::MockLibWebRTCPeerConnection::AddTrack):
(WebCore::MockLibWebRTCPeerConnection::RemoveTrack):
(WebCore::MockLibWebRTCPeerConnection::CreateOffer):
(WebCore::MockLibWebRTCPeerConnection::CreateAnswer):
* testing/MockLibWebRTCPeerConnection.h:
(WebCore::MockRtpSender::MockRtpSender):
(WebCore::MockRtpReceiver::id const):
(WebCore::MockRtpReceiver::GetParameters const):
(WebCore::MockRtpReceiver::SetParameters):
(WebCore::MockRtpReceiver::SetObserver):
(WebCore::MockRtpTransceiver::MockRtpTransceiver):
(WebCore::MockLibWebRTCPeerConnection::MockLibWebRTCPeerConnection):
(WebCore::MockLibWebRTCPeerConnection::gotLocalDescription):

LayoutTests:

Enable unified plan.

* fast/mediastream/RTCPeerConnection-icecandidate-event.html:
* fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html:
* fast/mediastream/RTCPeerConnection-inspect-answer.html:
* fast/mediastream/RTCPeerConnection-inspect-offer.html:
* fast/mediastream/RTCPeerConnection-media-setup-single-dialog.html:
* fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html:
* fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html:
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html:
* webrtc/libwebrtc/release-while-creating-offer.html:
* webrtc/libwebrtc/release-while-getting-stats.html:
* webrtc/libwebrtc/release-while-setting-local-description.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWKUIDelegate's webView:contextMenuDidEndForElement: should be called when context...
commit-queue@webkit.org [Thu, 15 Aug 2019 16:34:00 +0000 (16:34 +0000)]
WKUIDelegate's webView:contextMenuDidEndForElement: should be called when context menus end
https://bugs.webkit.org/show_bug.cgi?id=200750
<rdar://problem/54232261> and <rdar://problem/52355829>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-15
Reviewed by Tim Horton.

Source/WebKit:

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
(-[TestContextMenuUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuUIDelegate webView:contextMenuForElement:willCommitWithAnimator:]):
(-[TestContextMenuUIDelegate webView:contextMenuDidEndForElement:]):
(contextMenuWebViewDriver):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoMore missing exception checks in String.prototype.
mark.lam@apple.com [Thu, 15 Aug 2019 16:31:19 +0000 (16:31 +0000)]
More missing exception checks in String.prototype.
https://bugs.webkit.org/show_bug.cgi?id=200762
<rdar://problem/54333896>

Reviewed by Michael Saboff.

JSTests:

* stress/missing-exception-check-in-string-lastIndexOf.js: Added.
* stress/missing-exception-check-in-string-toLower.js: Added.
* stress/missing-exception-check-in-string-toUpper.js: Added.

Source/JavaScriptCore:

* runtime/StringPrototype.cpp:
(JSC::replaceUsingRegExpSearch):
(JSC::operationStringProtoFuncReplaceRegExpString):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248716 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Automation: mouse buttons are not correctly printed in SimulatedInputDispatcher...
bburg@apple.com [Thu, 15 Aug 2019 16:02:26 +0000 (16:02 +0000)]
Web Automation: mouse buttons are not correctly printed in SimulatedInputDispatcher log spew
https://bugs.webkit.org/show_bug.cgi?id=200729

Reviewed by Devin Rousso.

This was printing out gibberish because it was trying to decode a WebMouseEvent button
as an Automation protocol button. The logging was less useful because of it.

To fix this, push usage of Automation protocol-based MouseButton type alias all the way
to the platform-specific methods. The mouse buttons are the same for WebMouseEvent::Button
and the Automation protocol type, except the automation type has an auto-generated toString.

* UIProcess/Automation/SimulatedInputDispatcher.h:
* UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
(WebKit::SimulatedInputDispatcher::run):
Fix types.

* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::simulateMouseInteraction):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performInteractionSequence):
(WebKit::protocolMouseButtonToWebMouseEventButton): Deleted.
Fix types.

* UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::automationMouseButtonToPlatformMouseButton):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
* UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
(WebKit::mouseButtonToGdkButton):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
* UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:
(WebKit::mouseButtonToWPEButton):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
Move translation between MouseButton and native button values to platform methods.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed WinCairo build fix after r248713.
cdumez@apple.com [Thu, 15 Aug 2019 15:56:52 +0000 (15:56 +0000)]
Unreviewed WinCairo build fix after r248713.

* platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248714 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUse ObjectIdentifier<FrameIdentifierType> for frameIDs
simon.fraser@apple.com [Thu, 15 Aug 2019 15:35:35 +0000 (15:35 +0000)]
Use ObjectIdentifier<FrameIdentifierType> for frameIDs
https://bugs.webkit.org/show_bug.cgi?id=199986

Reviewed by Ryosuke Niwa.

Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* loader/CookieJar.cpp:
(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):
* loader/CookieJar.h:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* loader/NavigationAction.cpp:
* loader/NavigationAction.h:
(WebCore::NavigationAction::Requester::frameID const):
* page/ChromeClient.h:
* page/GlobalFrameIdentifier.h:
(WebCore::GlobalFrameIdentifier::decode):
* platform/network/CookieRequestHeaderFieldProxy.h:
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::hasStorageAccess const):
(WebCore::NetworkStorageSession::grantStorageAccess):
(WebCore::NetworkStorageSession::removeStorageAccessForFrame):
* platform/network/NetworkStorageSession.h:
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::cookiesForURL):
(WebCore::cookiesForSession):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::getRawCookies const):

Source/WebKit:

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal):
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkCORSPreflightChecker.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
(WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
(WebKit::NetworkConnectionToWebProcess::requestStorageAccess):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::convertToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::escapeIDForJSON):
(WebKit::logBlockedCookieInformation):
(WebKit::logCookieInformationInternal):
(WebKit::NetworkResourceLoader::logCookieInformation):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
* Scripts/webkit/messages.py:
* Shared/API/APIFrameHandle.cpp:
(API::FrameHandle::create):
(API::FrameHandle::createAutoconverting):
(API::FrameHandle::FrameHandle):
(API::FrameHandle::decode):
* Shared/API/APIFrameHandle.h:
(API::FrameHandle::frameID const):
* Shared/API/Cocoa/_WKFrameHandle.mm:
(-[_WKFrameHandle hash]):
(-[_WKFrameHandle _frameID]):
(-[_WKFrameHandle initWithCoder:]):
(-[_WKFrameHandle encodeWithCoder:]):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Authentication/AuthenticationManager.h:
* Shared/FrameInfoData.h:
* UIProcess/API/C/WKFrameHandleRef.cpp:
(WKFrameHandleGetFrameID):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _printOperationWithPrintInfo:forFrame:]):
(-[WKWebView _canChangeFrameLayout:]):
* UIProcess/API/Cocoa/_WKInspector.mm:
(-[_WKInspector showMainResourceForFrame:]):
* UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputDispatcher::run):
* UIProcess/Automation/SimulatedInputDispatcher.h:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::webFrameIDForHandle):
(WebKit::WebAutomationSession::handleForWebFrameID):
(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::waitForNavigationToComplete):
(WebKit::findPageForFrameID):
(WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::selectOptionElement):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
(WebKit::WebAutomationSession::takeScreenshot):
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
* UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
(-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
(WebKit::NetworkProcessProxy::requestStorageAccessConfirm):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::validateInput):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didPerformClientRedirect):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
(WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):
(WebKit::ProvisionalPageProxy::didPerformServerRedirect):
(WebKit::ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync):
(WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
* UIProcess/ProvisionalPageProxy.h:
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge):
* UIProcess/ServiceWorkerProcessProxy.h:
* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
* UIProcess/SuspendedPageProxy.h:
* UIProcess/UserMediaPermissionCheckProxy.cpp:
(WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy):
* UIProcess/UserMediaPermissionCheckProxy.h:
(WebKit::UserMediaPermissionCheckProxy::create):
(WebKit::UserMediaPermissionCheckProxy::frameID const):
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const):
(WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
(WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::mainFrameID const):
(WebKit::UserMediaPermissionRequestProxy::frameID const):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::WebFrameProxy):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::create):
(WebKit::WebFrameProxy::frameID const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::suspendCurrentPageIfPossible):
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::WebPageProxy::runJavaScriptInFrame):
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didExplicitOpenForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didChangeMainDocument):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didPerformServerRedirectShared):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestStorageSpace):
(WebKit::WebPageProxy::makeStorageSpaceRequest):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess):
(WebKit::WebPageProxy::requestStorageAccessConfirm):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::webFrame const):
(WebKit::WebProcessProxy::canCreateFrame const):
(WebKit::WebProcessProxy::frameCreated):
(WebKit::WebProcessProxy::didDestroyFrame):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _wk_pageCountForPrintFormatter:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::evaluateJavaScriptCallback):
(WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::didEvaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::focusFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):
* WebProcess/Automation/WebAutomationSessionProxy.h:
* WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
(WebKit::WebResourceLoader::didBlockAuthenticationChallenge):
(WebKit::WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
(WebKit::WebResourceLoader::didReceiveResource):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedFrameChanged):
(WebKit::WebChromeClient::contentsSizeChanged const):
(WebKit::WebChromeClient::hasStorageAccess):
(WebKit::WebChromeClient::requestStorageAccess):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::frameID const):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebCookieJar.cpp:
(WebKit::WebCookieJar::cookies const):
(WebKit::WebCookieJar::setCookies):
(WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
(WebKit::WebCookieJar::getRawCookies const):
* WebProcess/WebPage/WebCookieJar.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::WebFrame):
(WebKit::generateFrameID): Deleted.
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::frameID const):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::showMainResourceForFrame):
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadURLInFrame):
(WebKit::WebPage::loadDataInFrame):
(WebKit::WebPage::stopLoadingFrame):
(WebKit::WebPage::didReceivePolicyDecision):
(WebKit::WebPage::continueWillSubmitForm):
(WebKit::WebPage::runJavaScriptInFrame):
(WebKit::WebPage::getSourceForFrame):
(WebKit::WebPage::getMainResourceDataOfFrame):
(WebKit::WebPage::getResourceDataFromFrame):
(WebKit::WebPage::getWebArchiveOfFrame):
(WebKit::WebPage::addConsoleMessage):
(WebKit::WebPage::sendCSPViolationReport):
(WebKit::WebPage::enqueueSecurityPolicyViolationEvent):
(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::computePagesForPrinting):
(WebKit::WebPage::computePagesForPrintingImpl):
(WebKit::WebPage::drawRectToImage):
(WebKit::WebPage::drawPagesToPDF):
(WebKit::WebPage::drawPagesToPDFImpl):
(WebKit::WebPage::drawPagesForPrinting):
(WebKit::WebPage::frameBecameRemote):
(WebKit::WebPage::hasStorageAccess):
(WebKit::WebPage::requestStorageAccess):
(WebKit::WebPage::shouldAllowDeviceOrientationAndMotionAccess):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::computePagesForPrintingPDFDocument):
(WebKit::WebPage::computePagesForPrintingAndDrawToPDF):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::computePagesForPrintingPDFDocument):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::webFrame const):
(WebKit::WebProcess::addWebFrame):
(WebKit::WebProcess::removeWebFrame):
* WebProcess/WebProcess.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::frameID const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248713 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[GStreamer][WebRTC]: openh264 encoder bitrate is in bits per second
commit-queue@webkit.org [Thu, 15 Aug 2019 13:38:27 +0000 (13:38 +0000)]
[GStreamer][WebRTC]: openh264 encoder bitrate is in bits per second
https://bugs.webkit.org/show_bug.cgi?id=200578

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-08-15
Reviewed by Philippe Normand.

Not really testable as is.

* platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
(gst_webrtc_video_encoder_class_init):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248712 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agofor-await-of has bad error message if used in non-async function
pecoraro@apple.com [Thu, 15 Aug 2019 08:40:05 +0000 (08:40 +0000)]
for-await-of has bad error message if used in non-async function
https://bugs.webkit.org/show_bug.cgi?id=200758

Reviewed by Ross Kirsling.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseForStatement):
Improve error message.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[JSC] Air does not appropriately propagate ConstFloatValue to stackmap
ysuzuki@apple.com [Thu, 15 Aug 2019 06:39:28 +0000 (06:39 +0000)]
[JSC] Air does not appropriately propagate ConstFloatValue to stackmap
https://bugs.webkit.org/show_bug.cgi?id=200759

Reviewed by Saam Barati.

In B3MoveConstant phase, we convert ConstFloatValue and ConstDoubleValue to memory access to the table
to avoid large immediates *except for* stackmap argument case. This is because materializing constant doubles
and floats as memory-access before passing it to stackmap is wasteful: the stackmap may not use it actually, or
stackmap can do better job if it knows the parameter is constant.

Based on the above operation, B3LowerToAir phase strongly assumes that all ConstFloatValue and ConstDoubleValue
are removed except for the case used for parameter of stackmap. With r192377, B3LowerToAir catch this case, and
propagate constant double value as ValueRep in stackmap. While B3LowerToAir does this correctly for ConstDoubleValue,
we missed adding this support for ConstFloatValue.

This patch adds r192377's support for ConstFloatValue to propagate ConstFloatValue correctly to the stackmap.
This issue starts appearing since Wasm BBQ-B3 OSR starts putting ConstFloatValue to OSR-tier-up patchpoint.

* b3/B3LowerToAir.cpp:
* b3/B3ValueKey.h:
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::floatValue const):
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::constantFloat):
(JSC::B3::ValueRep::floatValue const):
* b3/testb3.h:
* b3/testb3_1.cpp:
(run):
* b3/testb3_5.cpp:
(testPatchpointManyWarmAnyImms):
(testPatchpointManyColdAnyImms):
(testPatchpointManyImms): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoJSTests:
mark.lam@apple.com [Thu, 15 Aug 2019 06:20:11 +0000 (06:20 +0000)]
JSTests:
ProxyObject should not be allow to access its target's private properties.
https://bugs.webkit.org/show_bug.cgi?id=200739
<rdar://problem/53972768>

Reviewed by Yusuke Suzuki.

* stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js: Added.
* stress/proxy-with-private-symbols.js: Rebased.

Source/JavaScriptCore:
Remove support for macOS < 10.13
https://bugs.webkit.org/show_bug.cgi?id=200694
<rdar://problem/54278851>

Patch by Keith Rollin <krollin@apple.com> on 2019-08-14
Reviewed by Youenn Fablet.

Update conditionals that reference __MAC_OS_X_VERSION_MIN_REQUIRED and
__MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=
101300. This means that expressions like
"__MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
"__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.

* API/WebKitAvailability.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248709 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoError thrown during "acceptNode" lookup is overridden
commit-queue@webkit.org [Thu, 15 Aug 2019 06:11:35 +0000 (06:11 +0000)]
Error thrown during "acceptNode" lookup is overridden
https://bugs.webkit.org/show_bug.cgi?id=200735

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-08-14
Reviewed by Ross Kirsling.

LayoutTests/imported/w3c:

* web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-expected.txt:

Source/WebCore:

Test: imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-expected.html

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback): Catch and return exception of callback->get call.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248708 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Variables shouldn't be able to have void type
mmaxfield@apple.com [Thu, 15 Aug 2019 03:36:22 +0000 (03:36 +0000)]
[WHLSL] Variables shouldn't be able to have void type
https://bugs.webkit.org/show_bug.cgi?id=200751

Reviewed by Robin Morisset.

Source/WebCore:

Trivial fix. Found by https://github.com/gpuweb/WHLSL/issues/320.

Test: webgpu/whlsl/void-variable-parameter.html

* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::Checker::visit):

LayoutTests:

* webgpu/whlsl/void-variable-parameter-expected.txt: Added.
* webgpu/whlsl/void-variable-parameter.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRe-sync web-platform-tests/dom/traversal from upstream
commit-queue@webkit.org [Thu, 15 Aug 2019 02:36:47 +0000 (02:36 +0000)]
Re-sync web-platform-tests/dom/traversal from upstream
https://bugs.webkit.org/show_bug.cgi?id=200737

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-08-14
Reviewed by Ryosuke Niwa.

Re-sync web-platform-tests/dom/traversal from upstream 91adbef87678.

* resources/import-expectations.json:
* web-platform-tests/dom/traversal/*: Updated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248705 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WebGPU] Use of WebGPU should not force discrete GPU
justin_fan@apple.com [Thu, 15 Aug 2019 02:34:25 +0000 (02:34 +0000)]
[WebGPU] Use of WebGPU should not force discrete GPU
https://bugs.webkit.org/show_bug.cgi?id=200740

Reviewed by Myles C. Maxfield.

Request a low-power device from Metal by default.

No change in testable behavior.

* platform/graphics/gpu/GPURequestAdapterOptions.h:
* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::tryCreate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoPotentially non thread-safe usage of WebCore::MediaSample
cdumez@apple.com [Thu, 15 Aug 2019 02:20:54 +0000 (02:20 +0000)]
Potentially non thread-safe usage of WebCore::MediaSample
https://bugs.webkit.org/show_bug.cgi?id=200734

Reviewed by Eric Carlson.

ImageSource is a main thread object but ends up getting passed to a background queue for image
decoding. In some cases, the background queue ends up being the last one holding a ref to the
ImageSource which ends up destroying the ImageSource on a background thread. Doing so is not
safe as shown by the crash.

To address the issue, have ImageSource subclass ThreadSafeRefCounted<ImageSource, WTF::DestructionThread::Main>
so that it is always destroyed on the main thread.

No new tests, currently crashing on the debug bots.

* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ImageSource):
(WebCore::ImageSource::~ImageSource):
* platform/graphics/ImageSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248703 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoFileSystem::deleteFile should log error status (178347)
commit-queue@webkit.org [Thu, 15 Aug 2019 01:58:06 +0000 (01:58 +0000)]
FileSystem::deleteFile should log error status (178347)
https://bugs.webkit.org/show_bug.cgi?id=178347

Patch by Kate Cheney <katherine_cheney@apple.com> on 2019-08-14
Reviewed by Brent Fulgham.

I added logging to the FileSystem::deleteFile function so that the debugger will
be able to see the associated errno string and better understand the reason for an
unlink failure or will know if the fileSystemRepresentation call was not
successful (or returned null).

* wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::deleteFile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[iOS](REGRESSION: r200487): WebKit.RequestActivatedElementInfoForRotatedImage fails...
commit-queue@webkit.org [Thu, 15 Aug 2019 01:17:30 +0000 (01:17 +0000)]
[iOS](REGRESSION: r200487): WebKit.RequestActivatedElementInfoForRotatedImage fails on iOS 13
https://bugs.webkit.org/show_bug.cgi?id=200726

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-14
Reviewed by Simon Fraser.

To get the pixels as an array of colors, draw the image into a memory
context. The backing memory buffer can then be accessed to get the image
pixels' colors.

* TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove m_blockRectForTextSelection (along with related code)
wenson_hsieh@apple.com [Thu, 15 Aug 2019 00:54:50 +0000 (00:54 +0000)]
Remove m_blockRectForTextSelection (along with related code)
https://bugs.webkit.org/show_bug.cgi?id=200695

Reviewed by Megan Gardner.

This member variable was consulted by block selection codepaths which no longer exist.
No change in behavior.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::selectionBoxForRange): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed, rolling out r248526.
ryanhaddad@apple.com [Thu, 15 Aug 2019 00:30:51 +0000 (00:30 +0000)]
Unreviewed, rolling out r248526.

Caused two IndexedDB perf tests to fail

Reverted changeset:

"Remove IDB-specific quota"
https://bugs.webkit.org/show_bug.cgi?id=196545
https://trac.webkit.org/changeset/248526

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248699 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoFix the build when ENABLE(APPLE_PAY) is false.
aestes@apple.com [Thu, 15 Aug 2019 00:18:27 +0000 (00:18 +0000)]
Fix the build when ENABLE(APPLE_PAY) is false.

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248698 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove support for macOS < 10.13
krollin@apple.com [Thu, 15 Aug 2019 00:17:55 +0000 (00:17 +0000)]
Remove support for macOS < 10.13
https://bugs.webkit.org/show_bug.cgi?id=200694
<rdar://problem/54278851>

Reviewed by Youenn Fablet.

Update conditionals that reference __MAC_OS_X_VERSION_MIN_REQUIRED and
__MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=
101300. This means that expressions like
"__MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
"__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.

PerformanceTests:

* StitchMarker/wtf/Platform.h:
* StitchMarker/wtf/dependencies/bmalloc/BPlatform.h:
* StitchMarker/wtf/text/icu/TextBreakIteratorICU.h:
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::caretRules): Deleted.

Source/JavaScriptCore:

* API/WebKitAvailability.h:

Source/ThirdParty/libwebrtc:

* Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
* WebKit/libwebrtc.diff:

Source/WebCore:

No new tests -- no added or changed functionality.

* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):
* WebCorePrefix.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
* editing/cocoa/WebContentReaderCocoa.mm:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
* platform/PlatformScreen.h:
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::initialize):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::fontForPostScriptName):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::FontCache::lastResortFallbackFont):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::cascadeToLastResortAndVariationsFontDescriptor):
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::setGPUByRegistryID):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::screenDidChange):
(WebCore::setGPUByDisplayMask): Deleted.
* platform/graphics/cv/VideoTextureCopierCV.cpp:
* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::isAcceptableDevice):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::platformFontWithFamilySpecialCase):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/mac/DragImageMac.mm:
(WebCore::LinkImageLayout::LinkImageLayout):
(WebCore::createDragImageForLink):
* platform/mac/PlatformScreenMac.mm:
(WebCore::collectScreenProperties):
(WebCore::gpuIDForDisplayMask):
* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(toAVTouchBarMediaSelectionOptionType):
(mediaSelectionOptions):
(-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]): Deleted.
(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]): Deleted.
(-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]): Deleted.
(-[WebPlaybackControlsManager beginFunctionBarScrubbing]): Deleted.
(-[WebPlaybackControlsManager endFunctionBarScrubbing]): Deleted.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const):
(WebCore::RenderThemeMac::systemColor const):

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
* pal/spi/cocoa/AVKitSPI.h:
* pal/spi/cocoa/CommonCryptoSPI.h:
* pal/spi/cocoa/IOSurfaceSPI.h:
* pal/spi/cocoa/NEFilterSourceSPI.h:
* pal/spi/cocoa/NSAttributedStringSPI.h:
* pal/spi/cocoa/NSKeyedArchiverSPI.h:
* pal/spi/cocoa/NSTouchBarSPI.h:
* pal/spi/cocoa/PassKitSPI.h:
* pal/spi/mac/AVFoundationSPI.h:

Source/WebKit:

* NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:
(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultCustomPasteboardDataEnabled):
* Shared/WebPreferencesDefaultValues.h:
* Shared/mac/AuxiliaryProcessMac.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKTextTouchBarItemController itemForIdentifier:]):
(WebKit::WebViewImpl::mediaPlaybackControlsView const):
(WebKit::WebViewImpl::updateMediaTouchBar):
* UIProcess/mac/WebColorPickerMac.mm:
* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginAccessibilityObject setPdfLayerController:]):
(-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
(-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
(-[WKPDFPluginAccessibilityObject accessibilityAssociatedControlForAnnotation:]):
(-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
(WebKit::PDFPlugin::pdfDocumentDidLoad):
(WebKit::PDFPlugin::handleMouseEvent):
(WebKit::PDFPlugin::handleMouseEnterEvent):
(WebKit::PDFPlugin::handleContextMenuEvent):
(WebKit::PDFPlugin::pluginHandlesContentOffsetForAccessibilityHitTest const):
(WebKit::PDFPlugin::accessibilityAssociatedPluginParentForElement const):
(WebKit::PDFPlugin::updateCursor): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebEditorClient.mm:
* WebView/PDFViewSPI.h:
* WebView/WebHTMLView.mm:
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:]):
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:shouldChangeFontReferenceColor:]):
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inContext:topView:]): Deleted.
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]): Deleted.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebView.mm:
(-[WebView performDragOperation:]):
(LayerFlushController::flushLayers):
(-[WebView updateMediaTouchBar]):
* WebView/WebViewData.h:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/mac/AppKitCompatibilityDeclarations.h:
* wtf/spi/darwin/SandboxSPI.h:

Tools:

* MiniBrowser/AppKitCompatibilityDeclarations.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController init]):
* TestWebKitAPI/Tests/WebCore/FontCache.cpp:
(TestWebKitAPI::FontCacheTest::SetUp): Deleted.
(TestWebKitAPI::createPlatformFont): Deleted.
(TestWebKitAPI::compareFonts): Deleted.
(TestWebKitAPI::TEST_F): Deleted.
* TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths):
* TestWebKitAPI/mac/NSFontPanelTesting.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248697 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoREGRESSION(r245320): Web Automation: Perform Actions hangs when pointerdown happens...
bburg@apple.com [Wed, 14 Aug 2019 23:57:06 +0000 (23:57 +0000)]
REGRESSION(r245320): Web Automation: Perform Actions hangs when pointerdown happens near top of page
https://bugs.webkit.org/show_bug.cgi?id=200728
<rdar://problem/54260518>

Reviewed by Devin Rousso.

In the last major refactoring for this code, it seems that the argument to
platformSimulateMouseInteraction was not unified to use viewport coordinates
in all code paths. This patch fixes both callers to *not* add in topContentInset,
and instead this is added back in when doing platform-specific event simulation.

This has no effect on iOS since it's guarded by ENABLE(WEBDRIVER_MOUSE_INTERACTIONS),
which is only built on macOS.

* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::performMouseInteraction):
* UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248696 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[ContentChangeObserver] Any previously destroyed renderer should not be considered...
zalan@apple.com [Wed, 14 Aug 2019 23:53:14 +0000 (23:53 +0000)]
[ContentChangeObserver] Any previously destroyed renderer should not be considered a candidate for content observation.
https://bugs.webkit.org/show_bug.cgi?id=200732
<rdar://problem/54319654>

Reviewed by Simon Fraser.

Source/WebCore:

A visible element should not be considered a candidate to content change observation when it loses the visiblity status momentarily.
This patch extends the check of re-constructed renderers for the duration of the content change observation (as opposed to just a single render tree update cycle)

Test: fast/events/touch/ios/content-observation/visible-content-gains-new-renderer2.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::reset):
(WebCore::ContentChangeObserver::rendererWillBeDestroyed):
(WebCore::ContentChangeObserver::adjustObservedState):
(WebCore::ContentChangeObserver::renderTreeUpdateDidStart): Deleted.
(WebCore::ContentChangeObserver::renderTreeUpdateDidFinish): Deleted.
(WebCore::ContentChangeObserver::stopContentObservation): Deleted.
(WebCore::ContentChangeObserver::willDestroyRenderer): Deleted.
(WebCore::ContentChangeObserver::RenderTreeUpdateScope::RenderTreeUpdateScope): Deleted.
(WebCore::ContentChangeObserver::RenderTreeUpdateScope::~RenderTreeUpdateScope): Deleted.
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::isObservingContentChanges const):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::tearDownRenderers):

LayoutTests:

* fast/events/touch/ios/content-observation/visible-content-gains-new-renderer2-expected.txt: Added.
* fast/events/touch/ios/content-observation/visible-content-gains-new-renderer2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoMissing exception check in string compare.
mark.lam@apple.com [Wed, 14 Aug 2019 23:36:28 +0000 (23:36 +0000)]
Missing exception check in string compare.
https://bugs.webkit.org/show_bug.cgi?id=200743
<rdar://problem/53975356>

Reviewed by Michael Saboff.

JSTests:

* stress/missing-exception-check-in-string-compare.js: Added.

Source/JavaScriptCore:

* runtime/JSString.cpp:
(JSC::JSString::equalSlowCase const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248694 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed, rolling out r248638.
ryanhaddad@apple.com [Wed, 14 Aug 2019 23:33:24 +0000 (23:33 +0000)]
Unreviewed, rolling out r248638.

These test expectations aren't necessary

Reverted changeset:

"Unreviewed test gardening, land test expectations for
rdar://49790831."
https://trac.webkit.org/changeset/248638

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248693 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[Cocoa] Add some WKA extension points
aestes@apple.com [Wed, 14 Aug 2019 22:55:30 +0000 (22:55 +0000)]
[Cocoa] Add some WKA extension points
https://bugs.webkit.org/show_bug.cgi?id=200506
<rdar://problem/51682474>

Reviewed by Tim Horton.

Source/WebCore:

* Modules/applepay/ApplePayPayment.h:
* Modules/applepay/ApplePayPaymentMethod.h:
* Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::finishConverting):
(WebCore::convertAndValidate):
* Modules/applepay/ApplePayRequestBase.h:
* Modules/applepay/ApplePaySessionPaymentRequest.h:
* Modules/applepay/PaymentCoordinatorClient.cpp:
(WebCore::PaymentCoordinatorClient::supportsVersion):
* Modules/applepay/cocoa/PaymentCocoa.mm:
(WebCore::convert):
* Modules/applepay/cocoa/PaymentMethodCocoa.mm:
(WebCore::finishConverting):
(WebCore::convert):

Source/WebKit:

* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::finishCreating):
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::finishDecoding):
(IPC::finishEncoding):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
* Shared/WebCoreArgumentCoders.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248692 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agov3: CrashTracer: Regression : MobileSafari at UIKitCore: -[UITargetedPreview initWith...
dino@apple.com [Wed, 14 Aug 2019 22:13:08 +0000 (22:13 +0000)]
v3: CrashTracer: Regression : MobileSafari at UIKitCore: -[UITargetedPreview initWithView:parameters:]
https://bugs.webkit.org/show_bug.cgi?id=200634

Patch by Luming Yin <luming_yin@apple.com> on 2019-08-14
Reviewed by Simon Fraser.

Under rare race conditions, the WKContentView may no longer have an associated window. However,
UIContextMenuInteraction may still attempt initialize a UITargetedPreview with the orphaned
WKContentView. Speculative fix for crashes under such scenarios, so that we can continue without
a context menu configuration to prevent the UIKit exception.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView continueContextMenuInteraction:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUnreviewed, build fix for MacroAssemblerARM64E change
ysuzuki@apple.com [Wed, 14 Aug 2019 22:08:11 +0000 (22:08 +0000)]
Unreviewed, build fix for MacroAssemblerARM64E change
https://bugs.webkit.org/show_bug.cgi?id=200703

* assembler/MacroAssemblerARM64E.h:
(JSC::MacroAssemblerARM64E::farJump):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248689 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: support `console.screenshot` with dataURL strings
drousso@apple.com [Wed, 14 Aug 2019 21:59:24 +0000 (21:59 +0000)]
Web Inspector: support `console.screenshot` with dataURL strings
https://bugs.webkit.org/show_bug.cgi?id=199307

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/console/console-screenshot.html

* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::screenshot):

LayoutTests:

* inspector/console/console-screenshot.html:
* inspector/console/console-screenshot-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[JSC] Less contended MetaAllocator
ysuzuki@apple.com [Wed, 14 Aug 2019 20:33:14 +0000 (20:33 +0000)]
[JSC] Less contended MetaAllocator
https://bugs.webkit.org/show_bug.cgi?id=200278

Reviewed by Mark Lam.

Source/JavaScriptCore:

The profiler result of JetStream2/bomb-workers shows that we are having contention under MetaAllocator::currentStatistics.
This function is called in ExecutableAllocator::memoryPressureMultiplier, and it is called from ExecutableCounter's threshold
calculation. But MetaAllocator::currentStatistics takes a global lock inside MetaAllocator and causes contention. However,
we do not need to have a lock actually: clients of MetaAllocator::currentStatistics typically use bytesReserved and bytesAllocated
information. However, since our executable allocator is fixed-sized, bytesReserved is always the fixed size. So just reading bytesAllocated
racily is enough.

This patch attempts to reduce the contention by the following two things.

1. Read bytesAllocated racily instead of calling MetaAllocator::currentStatistics. Then ExecutableCounter does not need to take a lock.
2. page lifetime management APIs of MetaAllocator should take a second `count` parameter to batch the system calls.

* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutableAllocator::memoryPressureMultiplier):
(JSC::ExecutableAllocator::allocate):
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator): Deleted.
(JSC::FixedVMPoolExecutableAllocator::memoryStart): Deleted.
(JSC::FixedVMPoolExecutableAllocator::memoryEnd): Deleted.
(JSC::FixedVMPoolExecutableAllocator::isJITPC): Deleted.
(JSC::FixedVMPoolExecutableAllocator::initializeSeparatedWXHeaps): Deleted.
(JSC::FixedVMPoolExecutableAllocator::jitWriteThunkGenerator): Deleted.
(JSC::FixedVMPoolExecutableAllocator::genericWriteToJITRegion): Deleted.

Source/WTF:

* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/MetaAllocator.h:

Tools:

Update the interface.

* TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248687 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[JSC] Make PAC jump and return more explicit
ysuzuki@apple.com [Wed, 14 Aug 2019 20:15:04 +0000 (20:15 +0000)]
[JSC] Make PAC jump and return more explicit
https://bugs.webkit.org/show_bug.cgi?id=200703

Reviewed by Mark Lam.

This patch refactors our macro assembler, mainly related to PAC.

1. Make far-jump explicit by renaming `jump` to `farJump`.
2. Remove unused makeTailRecursiveCall and tailRecursiveCall.
3. Do not make `ARM64EAssembler::ret` as `retab`. MacroAssemblerARM64E should call `retab` explicitly instead.

* assembler/ARM64EAssembler.h:
(JSC::ARM64EAssembler::ret): Deleted.
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::farJump):
(JSC::MacroAssemblerARM64::makeTailRecursiveCall): Deleted.
(JSC::MacroAssemblerARM64::tailRecursiveCall): Deleted.
* assembler/MacroAssemblerARM64E.h:
(JSC::MacroAssemblerARM64E::farJump):
(JSC::MacroAssemblerARM64E::ret):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::farJump):
(JSC::MacroAssemblerARMv7::relativeTableJump):
(JSC::MacroAssemblerARMv7::tailRecursiveCall): Deleted.
(JSC::MacroAssemblerARMv7::makeTailRecursiveCall): Deleted.
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::farJump):
(JSC::MacroAssemblerMIPS::tailRecursiveCall): Deleted.
(JSC::MacroAssemblerMIPS::makeTailRecursiveCall): Deleted.
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::farJump):
(JSC::MacroAssemblerX86::jump): Deleted.
(JSC::MacroAssemblerX86::tailRecursiveCall): Deleted.
(JSC::MacroAssemblerX86::makeTailRecursiveCall): Deleted.
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::farJump):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::farJump):
(JSC::MacroAssemblerX86_64::jump): Deleted.
(JSC::MacroAssemblerX86_64::tailRecursiveCall): Deleted.
(JSC::MacroAssemblerX86_64::makeTailRecursiveCall): Deleted.
* b3/B3LowerMacros.cpp:
* b3/testb3_6.cpp:
(testInterpreter):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::adjustAndJumpToTarget):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):
(JSC::DFG::SpeculativeJIT::emitSwitchImm):
(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::jumpToExceptionHandler):
* jit/JIT.cpp:
(JSC::JIT::emitEnterOptimizationCheck):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
* jit/ThunkGenerators.cpp:
(JSC::slowPathFor):
(JSC::virtualThunkFor):
* llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmThunks.cpp:
(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::emitThrowWasmToJSException):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::loadFromFrameAndJump):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248686 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[ContentChangeObserver] Stop content change observation explicitly.
zalan@apple.com [Wed, 14 Aug 2019 19:47:23 +0000 (19:47 +0000)]
[ContentChangeObserver] Stop content change observation explicitly.
https://bugs.webkit.org/show_bug.cgi?id=200689
<rdar://problem/54274887>

Reviewed by Simon Fraser.

Source/WebCore:

This helps to clean up some temporary state. There are 2 exit points when content observation needs to stop.
1. Soon after the synthetic mouseMove event when we decide not to continue with further observation (see WebPage::handleSyntheticClick)
2. When we asynchronously notify the client about the visible content change after all pending events have been processed.

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::stopContentObservation):
(WebCore::ContentChangeObserver::adjustObservedState):
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::stopContentObservation const):
(WebCore::ContentChangeObserver::isObservingContentChanges const):
(WebCore::ContentChangeObserver::observedContentChange const): Deleted.

Source/WebKit:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248685 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoresults.webkit.org: 500 errors on API endpoints don't return JSON
jbedard@apple.com [Wed, 14 Aug 2019 19:16:02 +0000 (19:16 +0000)]
results.webkit.org: 500 errors on API endpoints don't return JSON
https://bugs.webkit.org/show_bug.cgi?id=200722

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/controller/api_routes.py:
(APIRoutes.response_500): We should return the response, instead of abort.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248684 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Elements: Computed: move the Box Model section to the top
drousso@apple.com [Wed, 14 Aug 2019 18:45:05 +0000 (18:45 +0000)]
Web Inspector: Elements: Computed: move the Box Model section to the top
https://bugs.webkit.org/show_bug.cgi?id=200555

Reviewed by Joseph Pecoraro.

For nodes that use a lot of different CSS properties, having the Box Model section all the
way at the bottom isn't as useful for taking a quick glance at the node's box model data.

* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248683 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Elements: Computed: the collapsed state of the Variables section shoul...
drousso@apple.com [Wed, 14 Aug 2019 18:43:07 +0000 (18:43 +0000)]
Web Inspector: Elements: Computed: the collapsed state of the Variables section should be separate from the collapsed state of the Properties section
https://bugs.webkit.org/show_bug.cgi?id=200725

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
Use a different identifier string for the Variable section so it preserves its own collapsed
collapsed state independent of the Properties section.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Elements: Computed: the background of the Properties/Variables section...
drousso@apple.com [Wed, 14 Aug 2019 18:41:11 +0000 (18:41 +0000)]
Web Inspector: Elements: Computed: the background of the Properties/Variables sections should match the Box Model section when expanded
https://bugs.webkit.org/show_bug.cgi?id=200724

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed > .details-section:not(.collapsed) > :matches(.header, .content)): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property:hover .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) > .content): Added.
(.details-section:matches(.computed-style-properties, .computed-style-box-model):not(.collapsed) > :matches(.header, .content)): Deleted.
(.computed-style-properties): Deleted.
(.computed-style-properties .property .go-to-arrow): Deleted.
(.computed-style-properties .property:hover .go-to-arrow): Deleted.
(.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
(.details-section.computed-style-properties > .content): Deleted.
(@media (prefers-color-scheme: dark)): Deleted.
Use more specific selectors to match overall Web Inspector style.

* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item.expanded):
Darken the background of any expanded computed property in light mode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248681 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoWeb Inspector: Remove bad semicolon in generation of ObjC methods
pecoraro@apple.com [Wed, 14 Aug 2019 18:20:17 +0000 (18:20 +0000)]
Web Inspector: Remove bad semicolon in generation of ObjC methods
https://bugs.webkit.org/show_bug.cgi?id=200655

Reviewed by Devin Rousso.

* inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:
(ObjCFrontendDispatcherImplementationGenerator._generate_event_dispatcher_implementations):
Do not include a semicolon in the method implementation.

* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
Updated results.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WebAuthN] Enable LocalAuthenticator for macOS
ryanhaddad@apple.com [Wed, 14 Aug 2019 18:13:39 +0000 (18:13 +0000)]
[WebAuthN] Enable LocalAuthenticator for macOS
https://bugs.webkit.org/show_bug.cgi?id=182772

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations: Skip two more tests that are only expected to run on internal bots.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248679 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoresults.webkit.org: Don't save configuration multiple times in upload
jbedard@apple.com [Wed, 14 Aug 2019 18:05:23 +0000 (18:05 +0000)]
results.webkit.org: Don't save configuration multiple times in upload
https://bugs.webkit.org/show_bug.cgi?id=200719

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/model/upload_context.py:
(UploadContext.upload_test_results): Move registering of the configuration out
of the branch loop.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248678 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove use of emptySessionID from NetworkLoadParameters
youenn@apple.com [Wed, 14 Aug 2019 17:24:17 +0000 (17:24 +0000)]
Remove use of emptySessionID from NetworkLoadParameters
https://bugs.webkit.org/show_bug.cgi?id=200712

Reviewed by Alex Christensen.

Make NetworkLoadParameters constructor take a session ID.
Update call sites accordingly.

* NetworkProcess/AdClickAttributionManager.cpp:
(WebKit::AdClickAttributionManager::fireConversionRequest):
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/NetworkCORSPreflightChecker.cpp:
(WebKit::NetworkCORSPreflightChecker::startPreflight):
* NetworkProcess/NetworkLoadParameters.h:
(WebKit::NetworkLoadParameters::NetworkLoadParameters):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::preconnectTo):
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoUpdate Worker::notifyFinished to not use emptySessionID
youenn@apple.com [Wed, 14 Aug 2019 17:21:15 +0000 (17:21 +0000)]
Update Worker::notifyFinished to not use emptySessionID
https://bugs.webkit.org/show_bug.cgi?id=200710

Reviewed by Alex Christensen.

No change of behavior.

Exit early if context is gone since we should not dispatch events or create worker.
Make sure to unset pending activity using a ScopeExit.

* workers/Worker.cpp:
(WebCore::Worker::notifyFinished):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove use of emptySessionID from WebPageCreationParameters
youenn@apple.com [Wed, 14 Aug 2019 17:16:58 +0000 (17:16 +0000)]
Remove use of emptySessionID from WebPageCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=200708

Reviewed by Alex Christensen.

Make WebPageCreationParameters constructor take a SessionID.
Update constructor call sites.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
(WebKit::WebPageCreationParameters::WebPageCreationParameters):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248675 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove API::PageConfiguration::m_sessionID
youenn@apple.com [Wed, 14 Aug 2019 17:12:58 +0000 (17:12 +0000)]
Remove API::PageConfiguration::m_sessionID
https://bugs.webkit.org/show_bug.cgi?id=200670

Reviewed by Alex Christensen.

We can remove this member since it is only accessed for a debug assertion that can be removed without any harm.

* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::PageConfiguration):
(API::PageConfiguration::copy const):
(API::PageConfiguration::setWebsiteDataStore):
* UIProcess/API/APIPageConfiguration.h:
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248674 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoReenable Update ContentFiltering.LazilyLoadPlatformFrameworks test for NetworkExtension
youenn@apple.com [Wed, 14 Aug 2019 17:10:08 +0000 (17:10 +0000)]
Reenable Update ContentFiltering.LazilyLoadPlatformFrameworks test for NetworkExtension
https://bugs.webkit.org/show_bug.cgi?id=200706

Reviewed by Alex Christensen.

Libwebrtc is now soft-linked so we can reenable this test.

* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(-[LazilyLoadPlatformFrameworksController expectParentalControlsLoaded:networkExtensionLoaded:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248673 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[JSCOnly] JSCOnly port doesn't build on macOS
commit-queue@webkit.org [Wed, 14 Aug 2019 16:39:15 +0000 (16:39 +0000)]
[JSCOnly] JSCOnly port doesn't build on macOS
https://bugs.webkit.org/show_bug.cgi?id=200667

spi/darwin/ProcessMemoryFootprint.h is required by jsc.cpp so we add it to the WTF_PUBLIC_HEADERS.

Patch by Samuel GroƟ <saelo@google.com> on 2019-08-14
Reviewed by Alex Christensen.

* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[LFC][TFC] Implement TableFormattingContext::computePreferredWidthForColumns
zalan@apple.com [Wed, 14 Aug 2019 15:39:23 +0000 (15:39 +0000)]
[LFC][TFC] Implement TableFormattingContext::computePreferredWidthForColumns
https://bugs.webkit.org/show_bug.cgi?id=200701
<rdar://problem/54287828>

Reviewed by Antti Koivisto.

Compute cells' min/max width first.

* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
* layout/tableformatting/TableGrid.cpp:
(WebCore::Layout::TableGrid::slot):
(WebCore::Layout::TableGrid::appendCell):
* layout/tableformatting/TableGrid.h:
(WebCore::Layout::TableGrid::cells):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248671 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoThreadableBlobRegistry::blobSize should take a SessionID as parameter
youenn@apple.com [Wed, 14 Aug 2019 13:42:37 +0000 (13:42 +0000)]
ThreadableBlobRegistry::blobSize should take a SessionID as parameter
https://bugs.webkit.org/show_bug.cgi?id=200671

Source/WebCore:

Reviewed by Alex Christensen.

Update FormData to compute its byte size based on a SessionID.
We keep a WK1 byte length computation for FormDataElement.
Update FormData call sites accordingly.
Update CacheStorageConnection to implement a SessionID getter.
No change of behavior.

* Modules/cache/CacheStorageConnection.cpp:
(WebCore::CacheStorageConnection::computeRealBodySize):
(WebCore::computeRealBodySize): Deleted.
* Modules/cache/CacheStorageConnection.h:
* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::sessionID const):
* Modules/cache/WorkerCacheStorageConnection.h:
* fileapi/Blob.cpp:
(WebCore::Blob::size const):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::blobSize):
* fileapi/ThreadableBlobRegistry.h:
* loader/cache/KeepaliveRequestTracker.cpp:
(WebCore::KeepaliveRequestTracker::tryRegisterRequest):
(WebCore::KeepaliveRequestTracker::registerRequest):
(WebCore::KeepaliveRequestTracker::unregisterRequest):
* page/CacheStorageProvider.h:
(WebCore::CacheStorageProvider::createCacheStorageConnection):
* platform/network/BlobRegistry.h:
* platform/network/FormData.cpp:
(WebCore::computeLengthInBytes):
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormData::lengthInBytes const):
* platform/network/FormData.h:
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::createHTTPBodyCFReadStream):
* platform/network/curl/CurlFormDataStream.cpp:
(WebCore::m_sessionID):
(WebCore::CurlFormDataStream::computeContentLength):
(WebCore::CurlFormDataStream::CurlFormDataStream): Deleted.
* platform/network/curl/CurlFormDataStream.h:
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::CurlRequest):
* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::create):

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

Source/WebKit:

Reviewed by Alex Christensen.

Update WebCacheStorageConnection to implement sessionID getter.
Update NetworkConnectionToWebProcess to get a sessionID as parameter to blobSize computation.

* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::createCurlRequest):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

Reviewed by ALex Christensen.

* WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKitLegacy/win:

Reviewed by Alex Christensen.

* WebCoreSupport/WebPlatformStrategies.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove TouchActionData
antti@apple.com [Wed, 14 Aug 2019 11:54:05 +0000 (11:54 +0000)]
Remove TouchActionData
https://bugs.webkit.org/show_bug.cgi?id=199668

* dom/Element.cpp:
(WebCore::Element::nearestScrollingNodeIDUsingTouchOverflowScrolling const): Deleted.

As a follow-up also remove this now-unused function.

* dom/Element.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248669 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRemove SessionID default constructor
youenn@apple.com [Wed, 14 Aug 2019 11:06:27 +0000 (11:06 +0000)]
Remove SessionID default constructor
https://bugs.webkit.org/show_bug.cgi?id=200669

Reviewed by Alex Christensen.

Source/WebCore:

Remove SessionID default constructor

Update CookieRequestHeaderFiledProxy decoder to use an Optional<SessionID>.
Update ServiceWorkerContextData accordingly.
Update RegistrationStore/RegistrationDatabase to store a map of changed registration as follows:
- The RegistrationStore map contains an Optional value. In case of removing, the map will contain WTF::nullopt.
- RegistrationDatabase computes two vectors for removed registrations and updated registrations.

No change of behavior.

* dom/Document.cpp:
* loader/CookieJar.cpp:
(WebCore::CookieJar::cookieRequestHeaderFieldProxy):
* platform/network/CookieRequestHeaderFieldProxy.h:
(WebCore::CookieRequestHeaderFieldProxy::decode):
* workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
* workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::decode):
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::pushChanges):
(WebCore::RegistrationDatabase::doPushChanges):
* workers/service/server/RegistrationDatabase.h:
* workers/service/server/RegistrationStore.cpp:
(WebCore::RegistrationStore::pushChangesToDatabase):
(WebCore::RegistrationStore::clearAll):
(WebCore::RegistrationStore::flushChanges):
(WebCore::RegistrationStore::startSuspension):
(WebCore::RegistrationStore::removeRegistration):
* workers/service/server/RegistrationStore.h:

Source/WebCore/PAL:

* pal/SessionID.h:

Source/WebKit:

Update IPC decoder to use an Optional<SessionID>.
Update PageConfiguration to use emptySessionID instead of default constructor.

* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::PageConfiguration):
(API::PageConfiguration::sessionID): Deleted.
(API::PageConfiguration::setSessionID): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248668 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoMake privateBrowsingStateDidChange take an explicit SessionID
youenn@apple.com [Wed, 14 Aug 2019 10:25:00 +0000 (10:25 +0000)]
Make privateBrowsingStateDidChange take an explicit SessionID
https://bugs.webkit.org/show_bug.cgi?id=200666

Reviewed by Alex Christensen.

Instead of stating that the page session ID changed and get it from the page,
pass it directly to privateBrowsingStateDidChange.
No change of behavior.

* dom/Document.cpp:
(WebCore::Document::privateBrowsingStateDidChange):
* dom/Document.h:
* dom/Element.h:
(WebCore::Element::privateBrowsingStateDidChange):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::privateBrowsingStateDidChange):
* html/HTMLMediaElement.h:
* page/Page.cpp:
(WebCore::Page::setSessionID):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248667 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoMake WebSWOriginStore::m_webSWServerConnections a WeakHashSet
youenn@apple.com [Wed, 14 Aug 2019 10:13:55 +0000 (10:13 +0000)]
Make WebSWOriginStore::m_webSWServerConnections a WeakHashSet
https://bugs.webkit.org/show_bug.cgi?id=200661

Reviewed by Alex Christensen.

* NetworkProcess/ServiceWorker/WebSWOriginStore.cpp:
(WebKit::WebSWOriginStore::importComplete):
(WebKit::WebSWOriginStore::registerSWServerConnection):
(WebKit::WebSWOriginStore::unregisterSWServerConnection):
(WebKit::WebSWOriginStore::didInvalidateSharedMemory):
* NetworkProcess/ServiceWorker/WebSWOriginStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoNetworkProcess::m_swServerConnections should use WeakPtr
youenn@apple.com [Wed, 14 Aug 2019 10:11:11 +0000 (10:11 +0000)]
NetworkProcess::m_swServerConnections should use WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=200660

Reviewed by Geoffrey Garen.

Use WeakPtr for SWServer connections as an extra safety measure.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::postMessageToServiceWorkerClient):
(WebKit::NetworkProcess::postMessageToServiceWorker):
(WebKit::NetworkProcess::registerSWServerConnection):
(WebKit::NetworkProcess::unregisterSWServerConnection):
* NetworkProcess/NetworkProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoMove some WebRTC runtime flags from experimental to internal
youenn@apple.com [Wed, 14 Aug 2019 09:40:17 +0000 (09:40 +0000)]
Move some WebRTC runtime flags from experimental to internal
https://bugs.webkit.org/show_bug.cgi?id=200672

Reviewed by Eric Carlson.

* Shared/WebPreferences.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248664 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoFail decoding an invalid SessionID
youenn@apple.com [Wed, 14 Aug 2019 09:27:00 +0000 (09:27 +0000)]
Fail decoding an invalid SessionID
https://bugs.webkit.org/show_bug.cgi?id=200663

Reviewed by Alex Christensen.

* pal/SessionID.h:
(PAL::SessionID::isValid const):
(PAL::SessionID::isValidSessionIDValue):
(PAL::SessionID::encode const):
Add a release assert to catch bad sessionID senders.
(PAL::SessionID::decode):
Fail decoding if session ID is not a valid value.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248663 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[iPadOS] slides.google.com: Cannot dismiss the context menu by tapping on the canvas
graouts@webkit.org [Wed, 14 Aug 2019 06:06:52 +0000 (06:06 +0000)]
[iPadOS] slides.google.com: Cannot dismiss the context menu by tapping on the canvas
https://bugs.webkit.org/show_bug.cgi?id=200219
<rdar://problem/53650423>

Reviewed by Zalan Bujtas.

While the code change for this bug is all in code private to Safari, we add tests that check that removing implicit pointer capture
or removing the original target element while the pointer is active correctly fires the "pointerup" event at the element that hit tests
at the touch release point.

* pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt: Added.
* pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html: Added.
* pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt: Added.
* pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoAdd a way to opt out of kern TCSM for layout tests
sbarati@apple.com [Wed, 14 Aug 2019 03:38:07 +0000 (03:38 +0000)]
Add a way to opt out of kern TCSM for layout tests
https://bugs.webkit.org/show_bug.cgi?id=200649
<rdar://problem/51304923>

Reviewed by Alexey Proskuryakov.

* assembler/CPU.cpp:
(JSC::isKernTCSMAvailable):
* runtime/Options.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248661 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoFix the WPE build.
weinig@apple.com [Wed, 14 Aug 2019 03:17:39 +0000 (03:17 +0000)]
Fix the WPE build.

* platform/libwpe/PlatformKeyboardEventLibWPE.cpp:
(WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::singleCharacterString):
Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248660 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoRename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32)...
weinig@apple.com [Wed, 14 Aug 2019 03:15:02 +0000 (03:15 +0000)]
Rename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32) to avoid accidental change in behavior when replacing append with flexibleAppend
https://bugs.webkit.org/show_bug.cgi?id=200675

Reviewed by Darin Adler.

Source/JavaScriptCore:

* yarr/YarrParser.h:
(JSC::Yarr::Parser::tryConsumeGroupName):
(JSC::Yarr::Parser::tryConsumeUnicodePropertyExpression):
Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

Source/WebCore:

* bindings/js/JSDOMConvertStrings.cpp:
(WebCore::stringToUSVString):
* css/CSSMarkup.cpp:
(WebCore::serializeCharacter):
(WebCore::serializeIdentifier):
(WebCore::serializeString):
* css/parser/CSSTokenizer.cpp:
(WebCore::CSSTokenizer::consumeStringTokenUntil):
(WebCore::CSSTokenizer::consumeUrlToken):
(WebCore::CSSTokenizer::consumeName):
* html/parser/HTMLEntityParser.cpp:
(WebCore::HTMLEntityParser::consumeNamedEntity):
* platform/mock/mediasource/MockBox.cpp:
(WebCore::MockBox::peekType):
(WebCore::MockTrackBox::MockTrackBox):
* rendering/RenderText.cpp:
(WebCore::capitalize):
* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::consumeCharacterReference):
Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

Source/WTF:

When we switch StringBuilder::append(...) to be based on the StringConcatenate/makeString flexibleAppend
implementation, if we don't change anything, the behavior of StringBuilder::append(UChar32) will go from
appending a character to appending a stringified number.

To work around this, we can rename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32)
and update all the call sites.

* wtf/text/StringBuilder.h:
(WTF::StringBuilder::appendCharacter):
Renamed StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

* wtf/FileSystem.cpp:
(WTF::FileSystemImpl::decodeFromFilename):
Update for new name.

Tools:

* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::TEST):
Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248659 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Make lexing faster
sbarati@apple.com [Wed, 14 Aug 2019 03:00:49 +0000 (03:00 +0000)]
[WHLSL] Make lexing faster
https://bugs.webkit.org/show_bug.cgi?id=200596

Reviewed by Myles C. Maxfield.

Source/WebCore:

Previously, our lexer would just branch on a series of string compares.
We'd have code like this to match keywords:
```
...
if (matchCurrent("false"))
    return FalseToken;
if (matchCurrent("true"))
    return TrueToken;
...
```

However, this is extremely inefficient. We now lex using a trie, which means
we never backtrack in the lexer.

This patch is a 3ms speedup in compute_boids.

Tests: webgpu/whlsl/lexing.html
       webgpu/whlsl/literals.html

* Modules/webgpu/WHLSL/WHLSLLexer.cpp:
(WebCore::WHLSL::isValidIdentifierStart):
(WebCore::WHLSL::isValidNonStartingIdentifierChar):
(WebCore::WHLSL::isHexadecimalCharacter):
(WebCore::WHLSL::isDigit):
(WebCore::WHLSL::Lexer::consumeTokenFromStream):
(WebCore::WHLSL::Lexer::recognizeKeyword): Deleted.
(WebCore::WHLSL::Lexer::coreDecimalIntLiteral const): Deleted.
(WebCore::WHLSL::Lexer::decimalIntLiteral const): Deleted.
(WebCore::WHLSL::Lexer::decimalUintLiteral const): Deleted.
(WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const): Deleted.
(WebCore::WHLSL::Lexer::hexadecimalIntLiteral const): Deleted.
(WebCore::WHLSL::Lexer::hexadecimalUintLiteral const): Deleted.
(WebCore::WHLSL::Lexer::intLiteral const): Deleted.
(WebCore::WHLSL::Lexer::uintLiteral const): Deleted.
(WebCore::WHLSL::Lexer::digit const): Deleted.
(WebCore::WHLSL::Lexer::digitStar const): Deleted.
(WebCore::WHLSL::Lexer::character const): Deleted.
(WebCore::WHLSL::Lexer::coreFloatLiteralType1 const): Deleted.
(WebCore::WHLSL::Lexer::coreFloatLiteral const): Deleted.
(WebCore::WHLSL::Lexer::floatLiteral const): Deleted.
(WebCore::WHLSL::Lexer::validIdentifier const): Deleted.
(WebCore::WHLSL::Lexer::identifier const): Deleted.
(WebCore::WHLSL::Lexer::completeOperatorName const): Deleted.
* Modules/webgpu/WHLSL/WHLSLLexer.h:
(WebCore::WHLSL::Lexer::string const): Deleted.

LayoutTests:

* webgpu/whlsl/lexing-expected.txt: Added.
* webgpu/whlsl/lexing.html: Added.
* webgpu/whlsl/literals-expected.txt: Added.
* webgpu/whlsl/literals.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months agoshouldRespectImageOrientation should be a value in ImageOrientation
commit-queue@webkit.org [Wed, 14 Aug 2019 01:58:53 +0000 (01:58 +0000)]
shouldRespectImageOrientation should be a value in ImageOrientation
https://bugs.webkit.org/show_bug.cgi?id=200553

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-13
Reviewed by Simon Fraser.

Source/WebCore:

This patch is a step towards implementing the css image-orientation.

Instead of having ImageOrientationEnum, ImageOrientationDescription,
ImageOrientation and RespectImageOrientationEnum we are going to have a
single structure named 'ImageOrientation' which is a wrapper for the enum
type "Orientation".

This structure will have a constructor and casting operator such that
assigning an enum value and comparing with an enum value will be done
implicitly.

RespectImageOrientation is represented as a new enum value 'FromImage'.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ImageOrientation const):
(WebCore::CSSPrimitiveValue::operator ImageOrientationEnum const): Deleted.
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::createDragImage const):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer const):
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* platform/DragImage.cpp:
(WebCore::createDragImageFromSnapshot):
(WebCore::createDragImageFromImage):
* platform/DragImage.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::drawPattern):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::draw):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::draw):
* platform/graphics/CustomPaintImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::draw):
* platform/graphics/GradientImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
* platform/graphics/GraphicsContext.h:
(WebCore::ImagePaintingOptions::ImagePaintingOptions):
* platform/graphics/GraphicsContextImpl.cpp:
(WebCore::GraphicsContextImpl::drawImageImpl):
(WebCore::GraphicsContextImpl::drawTiledImageImpl):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
* platform/graphics/ImageFrame.h:
* platform/graphics/ImageOrientation.cpp: Removed.
* platform/graphics/ImageOrientation.h:
(WebCore::ImageOrientation::ImageOrientation):
(WebCore::ImageOrientation::fromEXIFValue):
(WebCore::ImageOrientation::operator Orientation const):
(WebCore::ImageOrientation::usesWidthAsHeight const):
(WebCore::ImageOrientation::transformFromDefault const):
(WebCore::ImageOrientation::isValidOrientation):
(WebCore::ImageOrientation::isValidEXIFOrientation):
(WebCore::ImageOrientationDescription::ImageOrientationDescription): Deleted.
(WebCore::ImageOrientationDescription::setRespectImageOrientation): Deleted.
(WebCore::ImageOrientationDescription::respectImageOrientation): Deleted.
(WebCore::ImageOrientationDescription::setImageOrientationEnum): Deleted.
(WebCore::ImageOrientationDescription::imageOrientation): Deleted.
(WebCore::ImageOrientation::operator ImageOrientationEnum const): Deleted.
(WebCore::ImageOrientation::operator== const): Deleted.
(WebCore::ImageOrientation::operator!= const): Deleted.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::dump):
* platform/graphics/NamedImageGeneratedImage.cpp:
(WebCore::NamedImageGeneratedImage::draw):
* platform/graphics/NamedImageGeneratedImage.h:
* platform/graphics/NativeImage.h:
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::frameOrientationAtIndex const):
* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawShadowLayerBuffer):
(WebCore::Cairo::drawShadowImage):
(WebCore::Cairo::drawNativeImage):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::drawNativeImage):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::orientationFromProperties):
(WebCore::ImageDecoderCG::frameOrientationAtIndex const):
* platform/graphics/cg/NativeImageCG.cpp:
(WebCore::drawNativeImage):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::draw):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
(WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
* platform/graphics/win/Direct2DOperations.cpp:
(WebCore::Direct2D::drawNativeImage):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoderDirect2D::frameOrientationAtIndex const):
* platform/graphics/win/ImageDirect2D.cpp:
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/NativeImageDirect2D.cpp:
(WebCore::drawNativeImage):
* platform/gtk/DragImageGtk.cpp:
(WebCore::createDragImageFromImage):
* platform/image-decoders/ScalableImageDecoderFrame.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::readImageOrientation):
* platform/ios/DragImageIOS.mm:
(WebCore::createDragImageFromImage):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* platform/win/DragImageCGWin.cpp:
(WebCore::createDragImageFromImage):
* platform/win/DragImageCairoWin.cpp:
(WebCore::createDragImageFromImage):
* platform/win/DragImageDirect2D.cpp:
(WebCore::createDragImageFromImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::imageOrientation const):
(WebCore::RenderElement::shouldRespectImageOrientation const): Deleted.
* rendering/RenderElement.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage const):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setImageOrientation):
(WebCore::RenderStyle::initialImageOrientation):
(WebCore::RenderStyle::imageOrientation const):
* rendering/style/StyleRareInheritedData.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::nativeImageForCurrentFrame):
(WebCore::SVGImage::nativeImage):
(WebCore::SVGImage::draw):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::draw):
* svg/graphics/SVGImageForContainer.h:

Source/WebKit:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::imagePositionInformation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248657 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Move Qualifiers and Semantic from VariableDeclaration to VariableDeclaration...
rmorisset@apple.com [Wed, 14 Aug 2019 01:36:26 +0000 (01:36 +0000)]
[WHLSL] Move Qualifiers and Semantic from VariableDeclaration to VariableDeclaration::RareData
https://bugs.webkit.org/show_bug.cgi?id=200696

Reviewed by Myles C. Maxfield.

Shrinking VariableDeclaration by 16 bytes in the common case.

No new tests as there is no intended functional change.

* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248656 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[WHLSL] Don't generate empty comma expressions for bare ';'
rmorisset@apple.com [Wed, 14 Aug 2019 01:05:27 +0000 (01:05 +0000)]
[WHLSL] Don't generate empty comma expressions for bare ';'
https://bugs.webkit.org/show_bug.cgi?id=200681

Reviewed by Myles C. Maxfield.

Currently we emit a comma expression with no sub-expression for bare ';', as well as for the initialization of for loops with no initializers.
This crashes the Checker, as it tries to access the last sub-expression of comma expressions.
Instead we should generate an empty statement block for that case.

This problem was found (and originally fixed before the commit was reverted) in https://bugs.webkit.org/show_bug.cgi?id=199726.
I am just isolating the fix here for easier review and debugging.

New test: LayoutTests/webgpu/whlsl/for-loop.html

* Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
* Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
(WebCore::WHLSL::ASTDumper::visit):
* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::Checker::visit):
* Modules/webgpu/WHLSL/WHLSLParser.cpp:
(WebCore::WHLSL::Parser::parseForLoop):
(WebCore::WHLSL::Parser::parseStatement):
(WebCore::WHLSL::Parser::parseEffectfulExpression):
* Modules/webgpu/WHLSL/WHLSLParser.h:
* Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
(WebCore::WHLSL::Visitor::visit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 months ago[results.webkit.org Timeline] Performance improvement - Skip render offscreen canvas
zhifei_fang@apple.com [Wed, 14 Aug 2019 01:03:08 +0000 (01:03 +0000)]
[results.webkit.org Timeline] Performance improvement - Skip render offscreen canvas
https://bugs.webkit.org/show_bug.cgi?id=200456

Reviewed by Jonathan Bedard.

This patch disable use the new batch draw method to render canvas directly without any caches, this will save a lot of memory, so that we won't go into the "low memory mode".

This patch also change the axis label collision detact box from a rect to polygon, so that we can dectact click more accurate.

* resultsdbpy/resultsdbpy/view/static/library/js/Utils.js:
* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
(pointPolygonCollisionDetect): Detact
(pointRightRayLineSegmentCollisionDetect):
(ColorBatchRender):
(ColorBatchRender.prototype.lazyCreateColorSeqs):
(ColorBatchRender.prototype.addSeq):
(ColorBatchRender.prototype.batchRender):
(ColorBatchRender.prototype.clear):
(xScrollStreamRenderFactory):
(Timeline.CanvasSeriesComponent):
(offscreenCachedRenderFactory): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248649 268f45cc-cd09-0410-ab3c-d52691b4dbfc