WebKit-https.git
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

14 months agoFocus rings are black
commit-queue@webkit.org [Wed, 14 Aug 2019 00:31:49 +0000 (00:31 +0000)]
Focus rings are black
https://bugs.webkit.org/show_bug.cgi?id=200593
<rdar://problem/54145925>

Patch by Daniel Bates <dabates@apple.com> on 2019-08-13
Reviewed by Wenson Hsieh.

Work around <rdar://problem/50838886> and make focus rings a pretty blue.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::platformFocusRingColor const):

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

14 months agoRe-sync web-platform-tests/dom/events from upstream
commit-queue@webkit.org [Wed, 14 Aug 2019 00:29:19 +0000 (00:29 +0000)]
Re-sync web-platform-tests/dom/events from upstream
https://bugs.webkit.org/show_bug.cgi?id=200592

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

Re-sync web-platform-tests/dom/events from upstream 1e6fef09eae3.

LayoutTests/imported/w3c:

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

LayoutTests:

* TestExpectations:
* platform/ios/TestExpectations:
* platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
* tests-options.json:

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

14 months agoAdd phase, block, and node numbers to left margin of DFG graph dumps.
mark.lam@apple.com [Tue, 13 Aug 2019 23:31:19 +0000 (23:31 +0000)]
Add phase, block, and node numbers to left margin of DFG graph dumps.
https://bugs.webkit.org/show_bug.cgi?id=200693

Reviewed by Saam Barati.

When scrolling through the DFG graph dumps, it's easy to get lost as to which phase
or block one is looking at, especially if the blocks are long.  This patch adds
node index, block number, and phase number on the left margin of the dumps.
Here's a sample:

       53:     %Bd:Function                   = 0x1079fd960:[Function, {}, NonArray, Proto:0x1079d8000, Leaf]
       53:     %Bf:Function                   = 0x1079b0700:[Function, {name:100, prototype:101, length:102, stackTraceLimit:103}, NonArray, Proto:0x1079d8000, Leaf]
       53:     %Bj:Function                   = 0x1079fd5e0:[Function, {name:100, length:101, toString:102, apply:103, call:104, bind:105, Symbol.hasInstance:106, caller:107, arguments:108, constructor:109}, NonArray, Proto:0x1079c0000, Leaf]
       53:     %CV:JSGlobalLexicalEnvironment = 0x1079fd6c0:[JSGlobalLexicalEnvironment, {}, NonArray, Leaf]

       53: Phase liveness analysis changed the IR.

       54: Beginning DFG phase OSR availability analysis.
       54: Before OSR availability analysis:

       54: DFG for foo#DXMNag:[0x1079a4850->0x1079a4130->0x1079c7600, DFGFunctionCall, 204 (NeverInline)]:
       54:   Fixpoint state: FixpointConverged; Form: SSA; Unification state: GloballyUnified; Ref count state: ExactRefCount
       54:   Argument formats for entrypoint index: 0 : FlushedJSValue, FlushedCell, FlushedJSValue

     0 54: Block #0 (bc#0): (OSR target)
     0 54:   Execution count: 1.000000
     0 54:   Predecessors:
     0 54:   Successors:
     0 54:   Dominated by: #0
     0 54:   Dominates: #0
     0 54:   Dominance Frontier:
     0 54:   Iterated Dominance Frontier:
     0 54:   Backwards dominates by: #root #0
     0 54:   Backwards dominates: #0
     0 54:   Control equivalent to: #0
     0 54:   States: StructuresAreWatched
     0 54:   Live:
     0 54:   Values
  0  0 54:   53:< 1:-> JSConstant(JS|UseAsOther, Other, Null, bc#0, ExitValid)
  1  0 54:   64:< 2:-> JSConstant(JS|UseAsOther, NonBoolInt32, Int32: 10, bc#0, ExitValid)
  2  0 54:    3:< 5:-> JSConstant(JS|PureInt, Other, Undefined, bc#0, ExitValid)
  3  0 54:   32:< 1:-> JSConstant(JS|UseAsOther, Bool, False, bc#0, ExitValid)
  4  0 54:   19:< 2:-> JSConstant(JS|UseAsOther, OtherObj, Weak:Object: 0x1079d4000 with butterfly 0x0 (Structure %CV:JSGlobalLexicalEnvironment), StructureID: 31423, bc#0, ExitValid)

The numbers in the left margin before the ':' are node index (i.e. the index of the
node in the block, not to be confused with node->index() which is the node ID), block
number, and phase number respectively.  Now, we can scroll thru the dumps quickly
and tell at a glance when we've scrolled passed the end of a phase, or block.
These sets of numbers can also serve as a positional marker that we can search for
to return to a node in the dump after scrolling away.

Currently, these numbers are only added to the DFG part.  The FTL (from lowering
to B3 onwards) does not have this feature yet.

* dfg/DFGDesiredWatchpoints.cpp:
(JSC::DFG::DesiredWatchpoints::dumpInContext const):
* dfg/DFGDesiredWatchpoints.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpCodeOrigin):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
(JSC::DFG::Prefix::dump const):
* dfg/DFGGraph.h:
(JSC::DFG::Prefix::Prefix):
(JSC::DFG::Prefix::clearBlockIndex):
(JSC::DFG::Prefix::clearNodeIndex):
(JSC::DFG::Prefix::enable):
(JSC::DFG::Prefix::disable):
(JSC::DFG::Graph::prefix):
(JSC::DFG::Graph::nextPhase):
* dfg/DFGPhase.cpp:
(JSC::DFG::Phase::beginPhase):
* dfg/DFGPhase.h:
(JSC::DFG::runAndLog):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGValueRepReductionPhase.cpp:
(JSC::DFG::ValueRepReductionPhase::convertValueRepsToDouble):

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

14 months ago[ContentChangeObserver] adjustStateAndNotifyContentChangeIfNeeded should check isObse...
zalan@apple.com [Tue, 13 Aug 2019 23:03:44 +0000 (23:03 +0000)]
[ContentChangeObserver] adjustStateAndNotifyContentChangeIfNeeded should check isObservationTimeWindowActive()
https://bugs.webkit.org/show_bug.cgi?id=200687
<rdar://problem/54271221>

Reviewed by Simon Fraser.

Move the check to adjustStateAndNotifyContentChangeIfNeeded.

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::adjustObservedState):

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

14 months agoResource Load Statistics: Switch NSURLSession on top navigation to prevalent resource...
wilander@apple.com [Tue, 13 Aug 2019 22:34:29 +0000 (22:34 +0000)]
Resource Load Statistics: Switch NSURLSession on top navigation to prevalent resource with user interaction
https://bugs.webkit.org/show_bug.cgi?id=200642
<rdar://problem/53962073>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.html
       http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.html

This patch splits m_registrableDomainsToBlockCookieFor in WebCore:NetworkStorageSession into:
- m_registrableDomainsToBlockAndDeleteCookiesFor
- m_registrableDomainsToBlockButKeepCookiesFor
... to support different network load policies based on this distinction.

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setITPSessionSwitchingEnabled):
(WebCore::RuntimeEnabledFeatures::itpSessionSwitchingEnabled const):
* page/Settings.yaml:
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor const):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockAndDeleteCookiesFor):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockButKeepCookiesFor):
(WebCore::NetworkStorageSession::removePrevalentDomains):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor): Deleted.
* platform/network/NetworkStorageSession.h:

Source/WebKit:

Since prevalent resources with user interaction get to keep their cookies and website
data, we should use a different NSURLSessions for when they are first-party websites
and have access to that data. This patch achieves that.

The WebKit::NetworkDataTaskCocoa constructor now checks with the network storage session
if the first party for this load should be isolated. The category for which this is true
is checked in the new function
WebCore:NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor()
which in turn is backed by a new split of m_registrableDomainsToBlockCookieFor into:
- m_registrableDomainsToBlockAndDeleteCookiesFor
- m_registrableDomainsToBlockButKeepCookiesFor
... in WebCore:NetworkStorageSession.

Non-isolated sessions are now picked up through the convenience function
WebKit::NetworkSessionCocoa::session() whereas isolated sessions are created lazily and
picked up through WebKit::NetworkSessionCocoa::isolatedSession().

The number of isolated NSURLSessions in memory is capped to 10. When the cap is hit,
the session that's been unused the longest is aged out.

The C API changes are test infrastructure.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::clear):
(WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlockAndDeleteCookiesFor const):
(WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlockButKeepCookiesFor const):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):
(WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlock const): Deleted.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::clear):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::updateCookieBlockingForDomains):
(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
(WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains): Deleted.
(WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains): Deleted.
    Dead code.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
(WebKit::RegistrableDomainsToBlockCookiesFor::isolatedCopy const):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
(WebKit::NetworkProcess::hasIsolatedSession const):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::shouldIsolateSessionsForPrevalentTopFrames const):
(WebKit::NetworkSession::hasIsolatedSession const):
(WebKit::NetworkSession::clearIsolatedSessions):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::session):
(WebKit::NetworkSessionCocoa::isolatedSession):
(WebKit::NetworkSessionCocoa::hasIsolatedSession const):
(WebKit::NetworkSessionCocoa::clearIsolatedSessions):
(WebKit::NetworkSessionCocoa::invalidateAndCancel):
(WebKit::NetworkSessionCocoa::clearCredentials):
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreStatisticsHasIsolatedSession):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::hasIsolatedSession):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::hasLocalStorageForTesting const):
(WebKit::WebsiteDataStore::hasIsolatedSessionForTesting const):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

This patch adds test infrastructure to query whether an origin has an
isolated NSURLSession or not.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::hasStatisticsIsolatedSession):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::hasStatisticsIsolatedSession):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-expected.txt: Added.
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.html: Added.
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-expected.txt: Added.
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.html: Added.

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

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

Unreviewed test gardening.

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

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

14 months agoUnreviewed test gardening, land test expectations for rdar://49790831.
ryanhaddad@apple.com [Tue, 13 Aug 2019 22:30:40 +0000 (22:30 +0000)]
Unreviewed test gardening, land test expectations for rdar://49790831.

* platform/ios-12/TestExpectations:
* platform/ios/TestExpectations:

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

14 months agoUncaught Exception: content.isJSON is not a function selecting image resource
pecoraro@apple.com [Tue, 13 Aug 2019 22:14:49 +0000 (22:14 +0000)]
Uncaught Exception: content.isJSON is not a function selecting image resource
https://bugs.webkit.org/show_bug.cgi?id=200680

Reviewed by Devin Rousso.

* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent):
Protect against non-string data, such as Blob response content.

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

14 months agoUpdate my status in contributors.json to committer.
zhifei_fang@apple.com [Tue, 13 Aug 2019 22:13:36 +0000 (22:13 +0000)]
Update my status in contributors.json to committer.

Reviewed by Unreviewed

* Scripts/webkitpy/common/config/contributors.json:

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

14 months ago[ContentChangeObserver] setShouldObserveDOMTimerScheduling and setShouldObserveTransi...
zalan@apple.com [Tue, 13 Aug 2019 22:12:19 +0000 (22:12 +0000)]
[ContentChangeObserver] setShouldObserveDOMTimerScheduling and setShouldObserveTransitions are always called in pairs.
https://bugs.webkit.org/show_bug.cgi?id=200685
<rdar://problem/54269778>

Reviewed by Simon Fraser.

Let's merge these 2 functions.

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::stopObservingPendingActivities):
(WebCore::ContentChangeObserver::adjustObservedState):
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::isObservingDOMTimerScheduling const):
(WebCore::ContentChangeObserver::isObservingContentChanges const):
(WebCore::ContentChangeObserver::setShouldObserveDOMTimerSchedulingAndTransitions):
(WebCore::ContentChangeObserver::setShouldObserveDOMTimerScheduling): Deleted.
(WebCore::ContentChangeObserver::setShouldObserveTransitions): Deleted.

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

14 months agoFix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInt...
cdumez@apple.com [Tue, 13 Aug 2019 21:00:49 +0000 (21:00 +0000)]
Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction()
https://bugs.webkit.org/show_bug.cgi?id=200688

Reviewed by Alex Christensen.

Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction().
It passes a RegistrableDomain to another thread without isolated copying it.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):

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

14 months agoFix potential thread safety issue under StorageManager::getSessionStorageOrigins()
cdumez@apple.com [Tue, 13 Aug 2019 20:58:19 +0000 (20:58 +0000)]
Fix potential thread safety issue under StorageManager::getSessionStorageOrigins()
https://bugs.webkit.org/show_bug.cgi?id=200684

Reviewed by Geoffrey Garen.

Fix potential thread safety issue under StorageManager::getSessionStorageOrigins(). The origins are being
passed from the background queue to the main thread without isolated copy.

* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::getSessionStorageOrigins):

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

14 months ago[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuth...
jiewen_tan@apple.com [Tue, 13 Aug 2019 20:43:00 +0000 (20:43 +0000)]
[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator
https://bugs.webkit.org/show_bug.cgi?id=191527
<rdar://problem/54237146>

Reviewed by Chris Dumez.

This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to
the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example,
CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports.

This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly.

* Sources.txt:
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp.
(WebKit::CtapAuthenticator::CtapAuthenticator):
(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapAuthenticator::getAssertion):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::tryDowngrade):
* UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
* UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
* UIProcess/WebAuthentication/fido/CtapHidDriver.h:
(WebKit::CtapHidDriver::setProtocol):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp.
(WebKit::U2fAuthenticator::U2fAuthenticator):
(WebKit::U2fAuthenticator::makeCredential):
(WebKit::U2fAuthenticator::checkExcludeList):
(WebKit::U2fAuthenticator::issueRegisterCommand):
(WebKit::U2fAuthenticator::getAssertion):
(WebKit::U2fAuthenticator::issueSignCommand):
(WebKit::U2fAuthenticator::issueNewCommand):
(WebKit::U2fAuthenticator::issueCommand):
(WebKit::U2fAuthenticator::responseReceived):
(WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h.
* WebKit.xcodeproj/project.pbxproj:

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

14 months ago[ContentChangeObserver] Scope events in adjustObservedState
zalan@apple.com [Tue, 13 Aug 2019 20:26:07 +0000 (20:26 +0000)]
[ContentChangeObserver] Scope events in adjustObservedState
https://bugs.webkit.org/show_bug.cgi?id=200679
<rdar://problem/54266172>

Reviewed by Simon Fraser.

This is in preparation for simplifying adjustObservedState.

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::adjustObservedState):
* page/ios/ContentChangeObserver.h:

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

14 months ago[WebGPU] Improve GPUBindGroup performance using one device-shared argument MTLBuffer
justin_fan@apple.com [Tue, 13 Aug 2019 19:49:40 +0000 (19:49 +0000)]
[WebGPU] Improve GPUBindGroup performance using one device-shared argument MTLBuffer
https://bugs.webkit.org/show_bug.cgi?id=200606

Reviewed by Myles C. Maxfield.

Source/WebCore:

Manage all argument buffer storage for GPUBindGroups in one large MTLBuffer for a GPUDevice.
Vastly improves GPUProgrammablePassEncoder.setBindGroup performance; in alpha MotionMark WebGPU benchmark,
score improves from ~12000 to ~90000.

No expected change in WebGPU behavior, though bind-groups.html has been updated to cover more cases.

* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroup const):
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUBindGroup.h: No longer manages one unique MTLBuffer per MTLArgumentEncoder.
(WebCore::GPUBindGroup::argumentBuffer const): Delegates to GPUBindGroupAllocator for current argument buffer.
(WebCore::GPUBindGroup::vertexArgsBuffer const): Deleted.
(WebCore::GPUBindGroup::fragmentArgsBuffer const): Deleted.
(WebCore::GPUBindGroup::computeArgsBuffer const): Deleted.
* platform/graphics/gpu/GPUBindGroupAllocator.h: Added. Allocates MTLBuffer for and assigns offsets for argument buffers.
(WebCore::GPUBindGroupAllocator::argumentBuffer const):
* platform/graphics/gpu/GPUBindGroupLayout.h:
* platform/graphics/gpu/GPUBuffer.h: Move MTLResourceUsage calculation to GPUBuffer construction.
(WebCore::GPUBuffer::platformUsage const):
* platform/graphics/gpu/GPUComputePassEncoder.h: Prevent any potiential narrowing issues, as offset can be large.
* platform/graphics/gpu/GPUDevice.cpp: Now owns a GPUBindGroupAllocator for owning all its argument buffer storage.
(WebCore::GPUDevice::tryCreateBindGroup const):
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/GPUProgrammablePassEncoder.h:
(WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
(WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
(WebCore::GPUProgrammablePassEncoder::setComputeBuffer):
* platform/graphics/gpu/GPURenderPassEncoder.h:
* platform/graphics/gpu/GPUTexture.h: Move MTLResourceUsage calculation to GPUTexture construction.
(WebCore::GPUTexture::platformUsage const):
* platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm: Added.
(WebCore::GPUBindGroupAllocator::create):
(WebCore::GPUBindGroupAllocator::GPUBindGroupAllocator):
(WebCore::GPUBindGroupAllocator::allocateAndSetEncoders): Ensures that MTLArgumentEncoders have appropriate allocation for encoding.
(WebCore::GPUBindGroupAllocator::reallocate): Create new MTLBuffer large enough for new encoder requirement, and copy over old argument buffer data.
(WebCore::GPUBindGroupAllocator::tryReset): For now, resets argument buffer if all GPUBindGroups created with this allocator are destroyed.
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
(WebCore::tryGetResourceAsBufferBinding): Add size check.
(WebCore::GPUBindGroup::tryCreate): No longer owns new MTLBuffers. Requests argument buffer space from GPUBindGroupAllocator.
(WebCore::GPUBindGroup::GPUBindGroup):
(WebCore::GPUBindGroup::~GPUBindGroup): Remind allocator to check for possible reset.
(WebCore::tryCreateArgumentBuffer): Deleted.
* platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::GPUBuffer):
* platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
(WebCore::GPUComputePassEncoder::setComputeBuffer):
* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
(WebCore::GPUProgrammablePassEncoder::setBindGroup): No need to recalculate usage every time. Set appropriate argument buffer and offsets for new bind group model.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setVertexBuffer):
(WebCore::GPURenderPassEncoder::setFragmentBuffer):
* platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
(WebCore::GPUTexture::GPUTexture):

LayoutTests:

Update bind-groups.html to better stress GPUBindGroup implementation.

* webgpu/bind-groups-expected.txt:
* webgpu/bind-groups.html:

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

14 months agoREGRESSION (r248533): JSC Command - Need to initializeMainThread() before processing...
msaboff@apple.com [Tue, 13 Aug 2019 19:35:00 +0000 (19:35 +0000)]
REGRESSION (r248533): JSC Command - Need to initializeMainThread() before processing config file
https://bugs.webkit.org/show_bug.cgi?id=200677

Reviewed by Mark Lam.

We need to initialize the main thread before calling processConfigFile() since it uses RefCounted objects
which have "is main thread" ASSERTS.

* jsc.cpp:
(jscmain):

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

14 months agoSource/WebCore:
antti@apple.com [Tue, 13 Aug 2019 19:26:22 +0000 (19:26 +0000)]
Source/WebCore:
Event region collection should take clipping into account
https://bugs.webkit.org/show_bug.cgi?id=200668
<rdar://problem/53826561>

Reviewed by Simon Fraser.

Test: pointerevents/ios/touch-action-region-clip-and-transform.html

* rendering/EventRegion.cpp:
(WebCore::EventRegionContext::pushClip):
(WebCore::EventRegionContext::popClip):

Maintain clip rect stack.

(WebCore::EventRegionContext::unite):

Apply both transforms and clipping.

* rendering/EventRegion.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::popContentsClip):

Update clip for non-self-painting layers.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::restoreClip):

Update clip for self-painting layers.

LayoutTests:
Event regions collection should take clipping into account
https://bugs.webkit.org/show_bug.cgi?id=200668
<rdar://problem/53826561>

Reviewed by Simon Fraser.

* pointerevents/ios/touch-action-region-clip-and-transform-expected.txt: Added.
* pointerevents/ios/touch-action-region-clip-and-transform.html: Added.

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

14 months agoUnreviewed, build fix for Windows
ysuzuki@apple.com [Tue, 13 Aug 2019 18:54:32 +0000 (18:54 +0000)]
Unreviewed, build fix for Windows
https://bugs.webkit.org/show_bug.cgi?id=200611

* wtf/win/GDIObject.h:

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

14 months agoWeb Inspector: Styles: show @supports CSS groupings
drousso@apple.com [Tue, 13 Aug 2019 18:28:15 +0000 (18:28 +0000)]
Web Inspector: Styles: show @supports CSS groupings
https://bugs.webkit.org/show_bug.cgi?id=200419
<rdar://problem/53971948>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/CSS.json:
Rename `CSSMedia` to `Grouping` and remove the `sourceLine` value, as it was never populated
and wasn't used by Web Inspector.

* inspector/scripts/codegen/objc_generator_templates.py:
* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator.generate_output):
Add support for including files at the end of <WebInspector/RWIProtocol.h> for compatibility
statements so that changes to the Web Inspector protocol don't break other clients.

Source/WebCore:

Test: inspector/css/getMatchedStylesForNode.html

* inspector/InspectorStyleSheet.cpp:
(WebCore::buildArrayForGroupings): Added.
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::buildMediaObject): Deleted.
(WebCore::fillMediaListChain): Deleted.

* css/MediaList.h:
* css/MediaList.cpp:
(WebCore::MediaQuerySet::MediaQuerySet):
Remove the `lastLine` as it was never set by anyone and wasn't used by Web Inspector.

Source/WebInspectorUI:

* UserInterface/Models/CSSGrouping.js: Renamed from Source/WebInspectorUI/UserInterface/Models/CSSMedia.js.
(WI.CSSGrouping):
(WI.CSSGrouping.prototype.get type):
(WI.CSSGrouping.prototype.get text):
(WI.CSSGrouping.prototype.get sourceCodeLocation):
(WI.CSSGrouping.prototype.get isMedia): Added.
(WI.CSSGrouping.prototype.get isSupports): Added.
(WI.CSSGrouping.prototype.get prefix): Added.

* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get groupings): Added.
(WI.CSSStyleDeclaration.prototype.generateCSSRuleString):
(WI.CSSStyleDeclaration.prototype.get mediaList): Deleted.

* UserInterface/Models/CSSRule.js:
(WI.CSSRule):
(WI.CSSRule.prototype.get groupings): Added.
(WI.CSSRule.prototype.update):
(WI.CSSRule.prototype._selectorResolved):
(WI.CSSRule.prototype.get mediaList): Deleted.

* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseRulePayload):
(WI.DOMNodeStyles.prototype.rulesForSelector): Deleted.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Deleted.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration :matches(.header, .header-groupings)): Added.
(.spreadsheet-css-declaration :matches(.header, .header-groupings):first-child): Added.
(.spreadsheet-css-declaration .header-groupings > .grouping): Added.
(.spreadsheet-css-declaration :matches(.header, .header-media)): Deleted.
(.spreadsheet-css-declaration :matches(.header, .header-media):first-child): Deleted.
(.spreadsheet-css-declaration .media-label): Deleted.

* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.protocolGroupingTypeToEnum): Added.
(WI.CSSManager.protocolMediaSourceToEnum): Deleted.

* UserInterface/Main.html:
* UserInterface/Test.html:

LayoutTests:

* inspector/css/getMatchedStylesForNode.html:
* inspector/css/getMatchedStylesForNode-expected.txt:

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

14 months agoAdds WebAuthn and AppSSO into watchlist
jiewen_tan@apple.com [Tue, 13 Aug 2019 18:11:41 +0000 (18:11 +0000)]
Adds WebAuthn and AppSSO into watchlist
https://bugs.webkit.org/show_bug.cgi?id=200647

Reviewed by Dewei Zhu.

* Scripts/webkitpy/common/config/watchlist:

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

14 months agoReverting change in r248379
russell_e@apple.com [Tue, 13 Aug 2019 17:34:59 +0000 (17:34 +0000)]
Reverting change in r248379
rdar://53779679

Unreviewed Test Gardening.
Removed previously set TestExpectations.

* platform/ios-12/TestExpectations:
* platform/ios/TestExpectations:

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

14 months agoIncorrect head in fast/canvas/webgl/gl-get-calls.html causes test failure
commit-queue@webkit.org [Tue, 13 Aug 2019 17:16:28 +0000 (17:16 +0000)]
Incorrect head in fast/canvas/webgl/gl-get-calls.html causes test failure
https://bugs.webkit.org/show_bug.cgi?id=200673

Patch by Chris Lord <clord@igalia.com> on 2019-08-13
Reviewed by Alexey Proskuryakov.

* fast/canvas/webgl/gl-get-calls.html:

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

14 months agoCrash under IPC::Connection::markCurrentlyDispatchedMessageAsInvalid()
cdumez@apple.com [Tue, 13 Aug 2019 17:12:43 +0000 (17:12 +0000)]
Crash under IPC::Connection::markCurrentlyDispatchedMessageAsInvalid()
https://bugs.webkit.org/show_bug.cgi?id=200674
<rdar://problem/50692748>

Reviewed by Geoff Garen.

Source/WebKit:

When the client terminates a provisional process (e.g. via the [WKWebView _killWebContentProcessAndResetState]
SPI), the WebProcessProxy would notify its associated WebPageProxy objects that it had terminated but would fail
to notify its associated ProvisionalPageProxy objects. As a result, those objects would not get destroyed and
would still think that they were in the middle of a provisional load the next time a load started. This inconsistent
state would lead to crashes such as the one in the radar.

* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::cancel):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

14 months agoMake sure UniqueIDBDatabaseConnection unregister itself from IDBServer
sihui_liu@apple.com [Tue, 13 Aug 2019 17:08:54 +0000 (17:08 +0000)]
Make sure UniqueIDBDatabaseConnection unregister itself from IDBServer
https://bugs.webkit.org/show_bug.cgi?id=200650
<rdar://problem/54236010>

Reviewed by Youenn Fablet.

We register UniqueIDBDatabaseConnection unconditionally to IDBServer but fail to unregister if UniqueIDBDatabase
of UniqueIDBDatabaseConnection is gone.

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::server):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

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

14 months ago[LFC][TFC] Introduce TableGrid
zalan@apple.com [Tue, 13 Aug 2019 17:05:20 +0000 (17:05 +0000)]
[LFC][TFC] Introduce TableGrid
https://bugs.webkit.org/show_bug.cgi?id=200656
<rdar://problem/54240833>

Reviewed by Antti Koivisto.

table grid:
A matrix containing as many rows and columns as needed to describe the position of all the table-rows
and table-cells of a table-root, as determined by the grid-dimensioning algorithm.
Each row of the grid might correspond to a table-row, and each column to a table-column.

slot of the table grid:
A slot (r,c) is an available space created by the intersection of a row r and a column c in the table grid.

https://www.w3.org/TR/css-tables-3/#terminology

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isTableHeader const):
(WebCore::Layout::Box::isTableBody const):
(WebCore::Layout::Box::isTableFooter const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::layout const):
(WebCore::Layout::TableFormattingContext::ensureTableGrid const):
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
(WebCore::Layout::TableFormattingContext::computeTableWidth const):
(WebCore::Layout::TableFormattingContext::distributeAvailabeWidth const):
(WebCore::Layout::TableFormattingContext::computeTableHeight const):
(WebCore::Layout::TableFormattingContext::distributeAvailableHeight const):
* layout/tableformatting/TableFormattingContext.h:
(WebCore::Layout::TableFormattingContext::formattingState const):
* layout/tableformatting/TableFormattingState.h:
(WebCore::Layout::TableFormattingState::tableGrid):
* layout/tableformatting/TableGrid.cpp: Added.
(WebCore::Layout::TableGrid::CellInfo::CellInfo):
(WebCore::Layout::TableGrid::SlotInfo::SlotInfo):
(WebCore::Layout::TableGrid::TableGrid):
(WebCore::Layout::TableGrid::appendCell):
(WebCore::Layout::TableGrid::insertCell):
(WebCore::Layout::TableGrid::removeCell):
* layout/tableformatting/TableGrid.h: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.

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

14 months agoJSContext Inspector: Basic CommandLineAPI doesn't work
pecoraro@apple.com [Tue, 13 Aug 2019 15:34:29 +0000 (15:34 +0000)]
JSContext Inspector: Basic CommandLineAPI doesn't work
https://bugs.webkit.org/show_bug.cgi?id=200659
<rdar://problem/54245476>

Reviewed by Brian Burg.

* inspector/InjectedScriptSource.js:
(BasicCommandLineAPI):
Use `method` directly since it already has been setup nicely and doesn't
need to be bound. Technically this allows someone to add properties to
the CommandLineAPI methods in basic mode (`dir.property = 1`) but that
seems harmless.

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

14 months ago[LFC][TFC] Add rowSpan and colSpan to Box
zalan@apple.com [Tue, 13 Aug 2019 15:11:53 +0000 (15:11 +0000)]
[LFC][TFC] Add rowSpan and colSpan to Box
https://bugs.webkit.org/show_bug.cgi?id=200654
<rdar://problem/54239281>

Reviewed by Antti Koivisto.

colSpan and rowSpan are not part of the RenderStyle. We eventually need to find a more appropriate place for the "random DOM things".

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::setRowSpan):
(WebCore::Layout::Box::setColumnSpan):
(WebCore::Layout::Box::rowSpan const):
(WebCore::Layout::Box::columnSpan const):
* layout/layouttree/LayoutBox.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):

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

14 months agoBlob registries should be keyed by session IDs
youenn@apple.com [Tue, 13 Aug 2019 10:06:16 +0000 (10:06 +0000)]
Blob registries should be keyed by session IDs
https://bugs.webkit.org/show_bug.cgi?id=200567
Source/WebCore:

<rdar://problem/54120212>

Reviewed by Alex Christensen.

Pass session IDs to all BlobRegistry methods in particular ThreadableLoaderRegistry.
The only exception is blobSize which should be dealt with a follow-up patch.
blobSize blob registry is retrieved from the connection -> sessionID map in Network Process.
Covered by existing tests.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::~FetchLoader):
(WebCore::FetchLoader::startLoadingBlobURL):
* Modules/fetch/FetchLoader.h:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::~FileReaderLoader):
(WebCore::FileReaderLoader::start):
* fileapi/FileReaderLoader.h:
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerFileBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
* fileapi/ThreadableBlobRegistry.h:
* html/PublicURLManager.cpp:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::createBlobResourceHandle):
(WebCore::loadBlobResourceSynchronously):
(WebCore::BlobRegistryImpl::filesInBlob const):
* platform/network/BlobRegistryImpl.h:
* platform/network/FormData.cpp:
(WebCore::appendBlobResolved):
(WebCore::FormData::resolveBlobReferences):
* platform/network/FormData.h:
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::createHTTPBodyCFReadStream):
* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageBody const):
(WebCore::ResourceRequest::updateSoupMessage const):

Source/WebKit:

<rdar://problem/54120212>

Reviewed by Alex Christensen.

Move blob registry to NetworkSession so that it is partitioned by session ID.
In case session ID is not given through IPC, use the connection as key to get the network session.
This is used for blobSize.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
* NetworkProcess/FileAPI/NetworkBlobRegistry.h: Removed.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
(WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
(WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
(WebKit::NetworkConnectionToWebProcess::filesInBlob):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::blobRegistry):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::blobRegistry):
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::createRequest):
* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::createWebSocketTask):
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
* WebProcess/Network/NetworkProcessConnection.h:

Source/WebKitLegacy/mac:

Reviewed by Alex Christensen.

* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createBlobRegistry):
Ignore sessionID parameter for WK1.

Source/WebKitLegacy/win:

<rdar://problem/54120212>

Reviewed by Alex Christensen.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createBlobRegistry):

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

14 months agoUser Agent and SessionID should be given to NetworkRTCProvider to set up the correct...
youenn@apple.com [Tue, 13 Aug 2019 08:54:27 +0000 (08:54 +0000)]
User Agent and SessionID should be given to NetworkRTCProvider to set up the correct proxy information
https://bugs.webkit.org/show_bug.cgi?id=200583

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Export of some symbols.

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

Source/WebCore:

Use a socket factory that is specific to the user agent and session ID.
This factory is stored in the media endpoint.
Not testable without proxy infrastructure.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::createPeerConnection):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:

Source/WebKit:

Pass session id and user agent whenever creating a TCP client socket.
Use this information to get the proxy information from NetworkSession and pass it to libwebrtc socket creation.

* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::proxyInfoFromSession):
(WebKit::NetworkRTCProvider::createClientTCPSocket):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* NetworkProcess/webrtc/NetworkRTCProvider.mm: Added.
(WebKit::NetworkRTCProvider::proxyInfoFromSession):
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::createPeerConnection):
(WebKit::LibWebRTCProvider::createSocketFactory):
* WebProcess/Network/webrtc/LibWebRTCProvider.h:
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::createServerTcpSocket):
(WebKit::LibWebRTCSocketFactory::createUdpSocket):
(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
(WebKit::LibWebRTCSocketFactory::createAsyncResolver):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:

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

14 months agoFrameLoader::open can execute scritps via style recalc in Frame::setDocument
rniwa@webkit.org [Tue, 13 Aug 2019 05:18:11 +0000 (05:18 +0000)]
FrameLoader::open can execute scritps via style recalc in Frame::setDocument
https://bugs.webkit.org/show_bug.cgi?id=200377

Reviewed by Antti Koivisto.

Source/WebCore:

Fixed the bug that FrameLoader::open can execute arbitrary author scripts via post style update callbacks
by adding PostResolutionCallbackDisabler, WidgetHierarchyUpdatesSuspensionScope, and NavigationDisabler
to CachedFrameBase::restore and FrameLoader::open.

This ensures all frames are restored from the page cache before any of them would start running scripts.

Test: fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html

* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::open):
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layout): Fixed the debug assertion. The layout of a document may be
updated while we're preparing to put a page into the page cache.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): Ditto.

LayoutTests:

Added a regression test.

* fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update-expected.txt: Added.
* fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html: Added.
* platform/win/TestExpectations: Skip the newly added test.

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

14 months agoREGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer...
drousso@apple.com [Tue, 13 Aug 2019 03:56:37 +0000 (03:56 +0000)]
REGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer adds dir="ltr" to body element
https://bugs.webkit.org/show_bug.cgi?id=200564

Reviewed by Joseph Pecoraro.

`WI.resolvedLayoutDirection` was called before `WI.runBootstrapOperations`, which is what
instantiates `WI.showDebugUISetting`. Without it, `WI.resolvedLayoutDirection` will ignore
the value of `WI.settings.debugLayoutDirection` and instead use the system.

Moving the instantiation of `WI.showDebugUISetting` outside `WI.runBootstrapOperations`
allows the setting to be created when the Bootstrap.js script is loaded, rather than after
the `DOMContentLoaded` event is fired. This means that it's guaranteed to exist before any
interface/view code runs.

* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):

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

14 months agoWeb Inspector: remove WI.DeprecatedRemoteObjectProperty
drousso@apple.com [Tue, 13 Aug 2019 03:54:38 +0000 (03:54 +0000)]
Web Inspector: remove WI.DeprecatedRemoteObjectProperty
https://bugs.webkit.org/show_bug.cgi?id=200549

Reviewed by Joseph Pecoraro.

* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.deprecatedGetOwnProperties): Deleted.
(WI.RemoteObject.prototype.deprecatedGetAllProperties): Deleted.
(WI.RemoteObject.prototype.deprecatedGetDisplayableProperties): Deleted.
(WI.RemoteObject.prototype._deprecatedGetProperties): Deleted.
(WI.RemoteObject.prototype._deprecatedGetPropertiesResolver): Deleted.
(WI.DeprecatedRemoteObjectProperty): Deleted.
(WI.DeprecatedRemoteObjectProperty.prototype.fromPrimitiveValue): Deleted.

* UserInterface/Models/CallFrame.js:
(WI.CallFrame.prototype.collectScopeChainVariableNames):

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):

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

14 months agoWeb Inspector: REGRESSION(r248201): DOMDebugger: unable to add event breakpoint when...
drousso@apple.com [Tue, 13 Aug 2019 03:52:38 +0000 (03:52 +0000)]
Web Inspector: REGRESSION(r248201): DOMDebugger: unable to add event breakpoint when All Events breakpoint is enabled
https://bugs.webkit.org/show_bug.cgi?id=200561

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):

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

14 months agoWeb Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolvi...
drousso@apple.com [Tue, 13 Aug 2019 03:50:40 +0000 (03:50 +0000)]
Web Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolving DOM breakpoints for newly added nodes
https://bugs.webkit.org/show_bug.cgi?id=200639

Reviewed by Joseph Pecoraro.

Since DOM breakpoints revolve around a given DOM node, we attempt to restore DOM breakpoints
whenever new nodes are added by matching them to the path of the DOM breakpoint. When doing
so, we should be in a "temporarily restoring breakpoints" mode so that we don't forcibly
enable all breakpoints.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._nodeInserted):

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

14 months ago[WTF] Thread::removeFromThreadGroup leaks weak pointers.
commit-queue@webkit.org [Tue, 13 Aug 2019 03:01:11 +0000 (03:01 +0000)]
[WTF] Thread::removeFromThreadGroup leaks weak pointers.
https://bugs.webkit.org/show_bug.cgi?id=199857

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-08-12
Reviewed by Yusuke Suzuki.

Source/WTF:

Fix leaking of ThreadGroup's weak pointers.

Tests: WTF.ThreadGroupRemove API tests

* wtf/Threading.cpp:
(WTF::Thread::didExit):
(WTF::Thread::addToThreadGroup):
(WTF::Thread::removeFromThreadGroup):
(WTF::Thread::numberOfThreadGroups):
* wtf/Threading.h:

Tools:

* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
(TestWebKitAPI::countThreadGroups):
(TestWebKitAPI::TEST):

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

14 months agoFix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy()
cdumez@apple.com [Tue, 13 Aug 2019 01:23:20 +0000 (01:23 +0000)]
Fix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy()
https://bugs.webkit.org/show_bug.cgi?id=200646

Reviewed by Alex Christensen.

Fix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy(). Should be a
simple RELEASE_LOG() as this is not an error.

* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):

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

14 months agoAX: Homebrew is not allowed to run any script under sudo.
commit-queue@webkit.org [Tue, 13 Aug 2019 00:52:49 +0000 (00:52 +0000)]
AX: Homebrew is not allowed to run any script under sudo.
https://bugs.webkit.org/show_bug.cgi?id=173801

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-08-12
Reviewed by Carlos Alberto Lopez Perez.

Latest versions of Homebrew throw an error when run as root.
Dependencies are successfully installed w/o `sudo` on macOS, so skip it.

* gtk/install-dependencies:

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

14 months ago[REGRESSION] run-webkit-tests: No PID defined when searching for simulator crashlogs
jbedard@apple.com [Mon, 12 Aug 2019 23:43:55 +0000 (23:43 +0000)]
[REGRESSION] run-webkit-tests: No PID defined when searching for simulator crashlogs
https://bugs.webkit.org/show_bug.cgi?id=200644

Reviewed by Aakash Jain.

* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess._start): Define system PID after launching app.

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

14 months agoReplace multiparameter overloads of append() in StringBuilder as a first step toward...
weinig@apple.com [Mon, 12 Aug 2019 23:09:06 +0000 (23:09 +0000)]
Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
https://bugs.webkit.org/show_bug.cgi?id=200614

Reviewed by Darin Adler.

Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and
StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).

Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to
StringBuilder::appendSubstring(...).

Source/JavaScriptCore:

* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* runtime/ConfigFile.cpp:
(JSC::ConfigFile::parse):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
* tools/FunctionOverrides.cpp:
(JSC::parseClause):
Update for renames.

Source/WebCore:

* dom/Range.cpp:
(WebCore::Range::toString const):
* editing/Editing.cpp:
(WebCore::stringWithRebalancedWhitespace):
* editing/MarkupAccumulator.cpp:
(WebCore::appendCharactersReplacingEntitiesInternal):
* editing/TextIterator.cpp:
(WebCore::TextIteratorCopyableText::appendToStringBuilder const):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::bufferedCharacters const):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::Substring::appendTo const):
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::decode):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::writeToStringBuilder):
Update for renames.

Source/WebKit:

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::setAndSerializeSandboxParameters):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveInvalidMessage):
Update for renames.

Source/WTF:

* wtf/HexNumber.h:
(WTF::appendUnsignedAsHexFixedSize):
Add overload that explicitly takes a StringBuilder to work around rename from append to appendCharacters.

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendCharacters):
(WTF::StringBuilder::append):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::appendCharacters):
(WTF::StringBuilder::append):
(WTF::StringBuilder::appendSubstring):
(WTF::StringBuilder::appendLiteral):
(WTF::IntegerToStringConversionTrait<StringBuilder>::flush):
Update for renames.

Tools:

* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::TEST):
Update for renames.

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

14 months agoContextual menu Hide and Show Link Previews should not have a symbol
dino@apple.com [Mon, 12 Aug 2019 22:23:03 +0000 (22:23 +0000)]
Contextual menu Hide and Show Link Previews should not have a symbol
https://bugs.webkit.org/show_bug.cgi?id=200645
<rdar://problem/54129647>

Reviewed by Wenson Hsieh.

Don't use an image on the UIMenuItem.

* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction imageForElementActionType:]): Return nil for Show/Hide Link Previews.

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

14 months agoUnreviewed, add missing WTF::initializeMainThread() call to fix some crashes on the...
cdumez@apple.com [Mon, 12 Aug 2019 21:43:00 +0000 (21:43 +0000)]
Unreviewed, add missing WTF::initializeMainThread() call to fix some crashes on the bots after r248533.

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):

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

14 months agoFix Crash in Mail Search
megan_gardner@apple.com [Mon, 12 Aug 2019 21:40:56 +0000 (21:40 +0000)]
Fix Crash in Mail Search
https://bugs.webkit.org/show_bug.cgi?id=200589
Source/WebKit:

<rdar://problem/53666720>

Reviewed by Tim Horton.

If we search in Mail backwards first, for AppKit reasons
we get a -1 for the index of the found item.
Do not try and insert data in this case.

* UIProcess/mac/WKTextFinderClient.mm:

Tools:

Reviewed by Tim Horton.

If you search backwards first in mail, we would crash,
this tests that codepath.

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

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

14 months ago[WPE][GTK] Fix building without unified sources
aperez@igalia.com [Mon, 12 Aug 2019 21:37:16 +0000 (21:37 +0000)]
[WPE][GTK] Fix building without unified sources
https://bugs.webkit.org/show_bug.cgi?id=200641

Reviewed by Žan Doberšek.

Source/JavaScriptCore:

* b3/B3PatchpointSpecial.cpp: Add missing inclusion of the B3ProcedureInlines.h header.
* heap/SlotVisitor.cpp: Add missing inclusion of the BlockDirectoryInlines.h header.

Source/WebCore:

* CMakeLists.txt: Add WebCore as the list of libraries to link into WebCoreTestSupport, to
avoid underlinking, which makes it possible to link with LDFLAGS="-Wl,--no-undefined".
* editing/WebCorePasteboardFileReader.h: Add missing inclusion of the pal/SessionID.h
header.

Source/WebKit:

* UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Add missing inclusions for headers
WebCore/GtkUtilities.h (for convertWidgetPointToScreenPoint), WebCore/IntPoint.h, and
WebPageProxy.h (the two latter to avoid usage of undefined types).
(WebKit::WebDataListSuggestionsDropdownGtk::show): Add namespace prefix to use
WebCore::IntPoint.

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

14 months ago[WTF][JSC] Make JSC and WTF aggressively-fast-malloced
ysuzuki@apple.com [Mon, 12 Aug 2019 20:57:15 +0000 (20:57 +0000)]
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced
https://bugs.webkit.org/show_bug.cgi?id=200611

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes.
After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper
function and throw a compile error if `T` is not FastMalloc annotated[1].

Putting WebKit classes in FastMalloc has many benefits.

1. Simply, it is fast.
2. vmmap can tell the amount of memory used for WebKit.
3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory
   from the memory corruption crash.

[1]: https://bugs.webkit.org/show_bug.cgi?id=200620

* API/ObjCCallbackFunction.mm:
* assembler/AbstractMacroAssembler.h:
* b3/B3PhiChildren.h:
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.h:
* b3/air/AirDisassembler.h:
* bytecode/AccessCaseSnippetParams.h:
* bytecode/CallVariant.h:
* bytecode/DeferredSourceDump.h:
* bytecode/ExecutionCounter.h:
* bytecode/GetByIdStatus.h:
* bytecode/GetByIdVariant.h:
* bytecode/InByIdStatus.h:
* bytecode/InByIdVariant.h:
* bytecode/InstanceOfStatus.h:
* bytecode/InstanceOfVariant.h:
* bytecode/PutByIdStatus.h:
* bytecode/PutByIdVariant.h:
* bytecode/ValueProfile.h:
* dfg/DFGAbstractInterpreter.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::newVariableAccessData):
* dfg/DFGFlowIndexing.h:
* dfg/DFGFlowMap.h:
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData):
* dfg/DFGMaximalFlushInsertionPhase.cpp:
(JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData):
* dfg/DFGOSRExit.h:
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGVariableAccessData.h:
* disassembler/ARM64/A64DOpcode.h:
* inspector/remote/socket/RemoteInspectorMessageParser.h:
* inspector/remote/socket/RemoteInspectorSocket.h:
* inspector/remote/socket/RemoteInspectorSocketEndpoint.h:
* jit/PCToCodeOriginMap.h:
* runtime/BasicBlockLocation.h:
* runtime/DoublePredictionFuzzerAgent.h:
* runtime/JSRunLoopTimer.h:
* runtime/PromiseDeferredTimer.h:
(JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>.
Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>).
* runtime/RandomizingFuzzerAgent.h:
* runtime/SymbolTable.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* tools/JSDollarVM.cpp:
* tools/SigillCrashAnalyzer.cpp:
* wasm/WasmFormat.h:
* wasm/WasmMemory.cpp:
* wasm/WasmSignature.h:
* yarr/YarrJIT.h:

Source/WebCore:

Changed the accessor since we changed std::unique_ptr to Ref for this field.

No behavior change.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::addTimerSetNotification):
(WebCore::WorkerScriptController::removeTimerSetNotification):

Source/WTF:

WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`.
Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED
more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited.

* wtf/Assertions.cpp:
* wtf/Atomics.h:
* wtf/AutodrainedPool.h:
* wtf/Bag.h:
(WTF::Bag::Bag): Deleted.
(WTF::Bag::~Bag): Deleted.
(WTF::Bag::clear): Deleted.
(WTF::Bag::add): Deleted.
(WTF::Bag::iterator::iterator): Deleted.
(WTF::Bag::iterator::operator! const): Deleted.
(WTF::Bag::iterator::operator* const): Deleted.
(WTF::Bag::iterator::operator++): Deleted.
(WTF::Bag::iterator::operator== const): Deleted.
(WTF::Bag::iterator::operator!= const): Deleted.
(WTF::Bag::begin): Deleted.
(WTF::Bag::begin const): Deleted.
(WTF::Bag::end const): Deleted.
(WTF::Bag::isEmpty const): Deleted.
(WTF::Bag::unwrappedHead const): Deleted.
* wtf/BitVector.h:
(WTF::BitVector::BitVector): Deleted.
(WTF::BitVector::~BitVector): Deleted.
(WTF::BitVector::operator=): Deleted.
(WTF::BitVector::size const): Deleted.
(WTF::BitVector::ensureSize): Deleted.
(WTF::BitVector::quickGet const): Deleted.
(WTF::BitVector::quickSet): Deleted.
(WTF::BitVector::quickClear): Deleted.
(WTF::BitVector::get const): Deleted.
(WTF::BitVector::contains const): Deleted.
(WTF::BitVector::set): Deleted.
(WTF::BitVector::add): Deleted.
(WTF::BitVector::ensureSizeAndSet): Deleted.
(WTF::BitVector::clear): Deleted.
(WTF::BitVector::remove): Deleted.
(WTF::BitVector::merge): Deleted.
(WTF::BitVector::filter): Deleted.
(WTF::BitVector::exclude): Deleted.
(WTF::BitVector::bitCount const): Deleted.
(WTF::BitVector::isEmpty const): Deleted.
(WTF::BitVector::findBit const): Deleted.
(WTF::BitVector::isEmptyValue const): Deleted.
(WTF::BitVector::isDeletedValue const): Deleted.
(WTF::BitVector::isEmptyOrDeletedValue const): Deleted.
(WTF::BitVector::operator== const): Deleted.
(WTF::BitVector::hash const): Deleted.
(WTF::BitVector::iterator::iterator): Deleted.
(WTF::BitVector::iterator::operator* const): Deleted.
(WTF::BitVector::iterator::operator++): Deleted.
(WTF::BitVector::iterator::isAtEnd const): Deleted.
(WTF::BitVector::iterator::operator== const): Deleted.
(WTF::BitVector::iterator::operator!= const): Deleted.
(WTF::BitVector::begin const): Deleted.
(WTF::BitVector::end const): Deleted.
(WTF::BitVector::bitsInPointer): Deleted.
(WTF::BitVector::maxInlineBits): Deleted.
(WTF::BitVector::byteCount): Deleted.
(WTF::BitVector::makeInlineBits): Deleted.
(WTF::BitVector::cleanseInlineBits): Deleted.
(WTF::BitVector::bitCount): Deleted.
(WTF::BitVector::findBitFast const): Deleted.
(WTF::BitVector::findBitSimple const): Deleted.
(WTF::BitVector::OutOfLineBits::numBits const): Deleted.
(WTF::BitVector::OutOfLineBits::numWords const): Deleted.
(WTF::BitVector::OutOfLineBits::bits): Deleted.
(WTF::BitVector::OutOfLineBits::bits const): Deleted.
(WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted.
(WTF::BitVector::isInline const): Deleted.
(WTF::BitVector::outOfLineBits const): Deleted.
(WTF::BitVector::outOfLineBits): Deleted.
(WTF::BitVector::bits): Deleted.
(WTF::BitVector::bits const): Deleted.
* wtf/Bitmap.h:
(WTF::Bitmap::size): Deleted.
(WTF::Bitmap::iterator::iterator): Deleted.
(WTF::Bitmap::iterator::operator* const): Deleted.
(WTF::Bitmap::iterator::operator++): Deleted.
(WTF::Bitmap::iterator::operator== const): Deleted.
(WTF::Bitmap::iterator::operator!= const): Deleted.
(WTF::Bitmap::begin const): Deleted.
(WTF::Bitmap::end const): Deleted.
* wtf/Box.h:
* wtf/BumpPointerAllocator.h:
* wtf/CPUTime.h:
* wtf/CheckedBoolean.h:
* wtf/CommaPrinter.h:
(WTF::CommaPrinter::CommaPrinter): Deleted.
(WTF::CommaPrinter::dump const): Deleted.
(WTF::CommaPrinter::didPrint const): Deleted.
* wtf/CompactPointerTuple.h:
(WTF::CompactPointerTuple::encodeType): Deleted.
(WTF::CompactPointerTuple::decodeType): Deleted.
(WTF::CompactPointerTuple::CompactPointerTuple): Deleted.
(WTF::CompactPointerTuple::pointer const): Deleted.
(WTF::CompactPointerTuple::setPointer): Deleted.
(WTF::CompactPointerTuple::type const): Deleted.
(WTF::CompactPointerTuple::setType): Deleted.
* wtf/CompilationThread.h:
(WTF::CompilationScope::CompilationScope): Deleted.
(WTF::CompilationScope::~CompilationScope): Deleted.
(WTF::CompilationScope::leaveEarly): Deleted.
* wtf/CompletionHandler.h:
(WTF::CompletionHandler<Out):
(WTF::Detail::CallableWrapper<CompletionHandler<Out):
(WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted.
(WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted.
(WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted.
* wtf/ConcurrentBuffer.h:
(WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted.
(WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted.
(WTF::ConcurrentBuffer::growExact): Deleted.
(WTF::ConcurrentBuffer::grow): Deleted.
(WTF::ConcurrentBuffer::array const): Deleted.
(WTF::ConcurrentBuffer::operator[]): Deleted.
(WTF::ConcurrentBuffer::operator[] const): Deleted.
(WTF::ConcurrentBuffer::createArray): Deleted.
* wtf/ConcurrentPtrHashSet.h:
(WTF::ConcurrentPtrHashSet::contains): Deleted.
(WTF::ConcurrentPtrHashSet::add): Deleted.
(WTF::ConcurrentPtrHashSet::size const): Deleted.
(WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted.
(WTF::ConcurrentPtrHashSet::hash): Deleted.
(WTF::ConcurrentPtrHashSet::cast): Deleted.
(WTF::ConcurrentPtrHashSet::containsImpl const): Deleted.
(WTF::ConcurrentPtrHashSet::addImpl): Deleted.
* wtf/ConcurrentVector.h:
(WTF::ConcurrentVector::~ConcurrentVector): Deleted.
(WTF::ConcurrentVector::size const): Deleted.
(WTF::ConcurrentVector::isEmpty const): Deleted.
(WTF::ConcurrentVector::at): Deleted.
(WTF::ConcurrentVector::at const): Deleted.
(WTF::ConcurrentVector::operator[]): Deleted.
(WTF::ConcurrentVector::operator[] const): Deleted.
(WTF::ConcurrentVector::first): Deleted.
(WTF::ConcurrentVector::first const): Deleted.
(WTF::ConcurrentVector::last): Deleted.
(WTF::ConcurrentVector::last const): Deleted.
(WTF::ConcurrentVector::takeLast): Deleted.
(WTF::ConcurrentVector::append): Deleted.
(WTF::ConcurrentVector::alloc): Deleted.
(WTF::ConcurrentVector::removeLast): Deleted.
(WTF::ConcurrentVector::grow): Deleted.
(WTF::ConcurrentVector::begin): Deleted.
(WTF::ConcurrentVector::end): Deleted.
(WTF::ConcurrentVector::segmentExistsFor): Deleted.
(WTF::ConcurrentVector::segmentFor): Deleted.
(WTF::ConcurrentVector::subscriptFor): Deleted.
(WTF::ConcurrentVector::ensureSegmentsFor): Deleted.
(WTF::ConcurrentVector::ensureSegment): Deleted.
(WTF::ConcurrentVector::allocateSegment): Deleted.
* wtf/Condition.h:
(WTF::Condition::waitUntil): Deleted.
(WTF::Condition::waitFor): Deleted.
(WTF::Condition::wait): Deleted.
(WTF::Condition::notifyOne): Deleted.
(WTF::Condition::notifyAll): Deleted.
* wtf/CountingLock.h:
(WTF::CountingLock::LockHooks::lockHook): Deleted.
(WTF::CountingLock::LockHooks::unlockHook): Deleted.
(WTF::CountingLock::LockHooks::parkHook): Deleted.
(WTF::CountingLock::LockHooks::handoffHook): Deleted.
(WTF::CountingLock::tryLock): Deleted.
(WTF::CountingLock::lock): Deleted.
(WTF::CountingLock::unlock): Deleted.
(WTF::CountingLock::isHeld const): Deleted.
(WTF::CountingLock::isLocked const): Deleted.
(WTF::CountingLock::Count::operator bool const): Deleted.
(WTF::CountingLock::Count::operator== const): Deleted.
(WTF::CountingLock::Count::operator!= const): Deleted.
(WTF::CountingLock::tryOptimisticRead): Deleted.
(WTF::CountingLock::validate): Deleted.
(WTF::CountingLock::doOptimizedRead): Deleted.
(WTF::CountingLock::tryOptimisticFencelessRead): Deleted.
(WTF::CountingLock::fencelessValidate): Deleted.
(WTF::CountingLock::doOptimizedFencelessRead): Deleted.
(WTF::CountingLock::getCount): Deleted.
* wtf/CrossThreadQueue.h:
* wtf/CrossThreadTask.h:
* wtf/CryptographicallyRandomNumber.cpp:
* wtf/DataMutex.h:
* wtf/DateMath.h:
* wtf/Deque.h:
(WTF::Deque::size const): Deleted.
(WTF::Deque::isEmpty const): Deleted.
(WTF::Deque::begin): Deleted.
(WTF::Deque::end): Deleted.
(WTF::Deque::begin const): Deleted.
(WTF::Deque::end const): Deleted.
(WTF::Deque::rbegin): Deleted.
(WTF::Deque::rend): Deleted.
(WTF::Deque::rbegin const): Deleted.
(WTF::Deque::rend const): Deleted.
(WTF::Deque::first): Deleted.
(WTF::Deque::first const): Deleted.
(WTF::Deque::last): Deleted.
(WTF::Deque::last const): Deleted.
(WTF::Deque::append): Deleted.
* wtf/Dominators.h:
* wtf/DoublyLinkedList.h:
* wtf/Expected.h:
* wtf/FastBitVector.h:
* wtf/FileMetadata.h:
* wtf/FileSystem.h:
* wtf/GraphNodeWorklist.h:
* wtf/GregorianDateTime.h:
(WTF::GregorianDateTime::GregorianDateTime): Deleted.
(WTF::GregorianDateTime::year const): Deleted.
(WTF::GregorianDateTime::month const): Deleted.
(WTF::GregorianDateTime::yearDay const): Deleted.
(WTF::GregorianDateTime::monthDay const): Deleted.
(WTF::GregorianDateTime::weekDay const): Deleted.
(WTF::GregorianDateTime::hour const): Deleted.
(WTF::GregorianDateTime::minute const): Deleted.
(WTF::GregorianDateTime::second const): Deleted.
(WTF::GregorianDateTime::utcOffset const): Deleted.
(WTF::GregorianDateTime::isDST const): Deleted.
(WTF::GregorianDateTime::setYear): Deleted.
(WTF::GregorianDateTime::setMonth): Deleted.
(WTF::GregorianDateTime::setYearDay): Deleted.
(WTF::GregorianDateTime::setMonthDay): Deleted.
(WTF::GregorianDateTime::setWeekDay): Deleted.
(WTF::GregorianDateTime::setHour): Deleted.
(WTF::GregorianDateTime::setMinute): Deleted.
(WTF::GregorianDateTime::setSecond): Deleted.
(WTF::GregorianDateTime::setUtcOffset): Deleted.
(WTF::GregorianDateTime::setIsDST): Deleted.
(WTF::GregorianDateTime::operator tm const): Deleted.
(WTF::GregorianDateTime::copyFrom): Deleted.
* wtf/HashTable.h:
* wtf/Hasher.h:
* wtf/HexNumber.h:
* wtf/Indenter.h:
* wtf/IndexMap.h:
* wtf/IndexSet.h:
* wtf/IndexSparseSet.h:
* wtf/IndexedContainerIterator.h:
* wtf/Insertion.h:
* wtf/IteratorAdaptors.h:
* wtf/IteratorRange.h:
* wtf/KeyValuePair.h:
* wtf/ListHashSet.h:
(WTF::ListHashSet::begin): Deleted.
(WTF::ListHashSet::end): Deleted.
(WTF::ListHashSet::begin const): Deleted.
(WTF::ListHashSet::end const): Deleted.
(WTF::ListHashSet::random): Deleted.
(WTF::ListHashSet::random const): Deleted.
(WTF::ListHashSet::rbegin): Deleted.
(WTF::ListHashSet::rend): Deleted.
(WTF::ListHashSet::rbegin const): Deleted.
(WTF::ListHashSet::rend const): Deleted.
* wtf/Liveness.h:
* wtf/LocklessBag.h:
(WTF::LocklessBag::LocklessBag): Deleted.
(WTF::LocklessBag::add): Deleted.
(WTF::LocklessBag::iterate): Deleted.
(WTF::LocklessBag::consumeAll): Deleted.
(WTF::LocklessBag::consumeAllWithNode): Deleted.
(WTF::LocklessBag::~LocklessBag): Deleted.
* wtf/LoggingHashID.h:
* wtf/MD5.h:
* wtf/MachSendRight.h:
* wtf/MainThreadData.h:
* wtf/Markable.h:
* wtf/MediaTime.h:
* wtf/MemoryPressureHandler.h:
* wtf/MessageQueue.h:
(WTF::MessageQueue::MessageQueue): Deleted.
* wtf/MetaAllocator.h:
* wtf/MonotonicTime.h:
(WTF::MonotonicTime::MonotonicTime): Deleted.
(WTF::MonotonicTime::fromRawSeconds): Deleted.
(WTF::MonotonicTime::infinity): Deleted.
(WTF::MonotonicTime::nan): Deleted.
(WTF::MonotonicTime::secondsSinceEpoch const): Deleted.
(WTF::MonotonicTime::approximateMonotonicTime const): Deleted.
(WTF::MonotonicTime::operator bool const): Deleted.
(WTF::MonotonicTime::operator+ const): Deleted.
(WTF::MonotonicTime::operator- const): Deleted.
(WTF::MonotonicTime::operator% const): Deleted.
(WTF::MonotonicTime::operator+=): Deleted.
(WTF::MonotonicTime::operator-=): Deleted.
(WTF::MonotonicTime::operator== const): Deleted.
(WTF::MonotonicTime::operator!= const): Deleted.
(WTF::MonotonicTime::operator< const): Deleted.
(WTF::MonotonicTime::operator> const): Deleted.
(WTF::MonotonicTime::operator<= const): Deleted.
(WTF::MonotonicTime::operator>= const): Deleted.
(WTF::MonotonicTime::isolatedCopy const): Deleted.
(WTF::MonotonicTime::encode const): Deleted.
(WTF::MonotonicTime::decode): Deleted.
* wtf/NaturalLoops.h:
* wtf/NoLock.h:
* wtf/OSAllocator.h:
* wtf/OptionSet.h:
* wtf/Optional.h:
* wtf/OrderMaker.h:
* wtf/Packed.h:
(WTF::alignof):
* wtf/PackedIntVector.h:
(WTF::PackedIntVector::PackedIntVector): Deleted.
(WTF::PackedIntVector::operator=): Deleted.
(WTF::PackedIntVector::size const): Deleted.
(WTF::PackedIntVector::ensureSize): Deleted.
(WTF::PackedIntVector::resize): Deleted.
(WTF::PackedIntVector::clearAll): Deleted.
(WTF::PackedIntVector::get const): Deleted.
(WTF::PackedIntVector::set): Deleted.
(WTF::PackedIntVector::mask): Deleted.
* wtf/PageBlock.h:
* wtf/ParallelJobsOpenMP.h:
* wtf/ParkingLot.h:
* wtf/PriorityQueue.h:
(WTF::PriorityQueue::size const): Deleted.
(WTF::PriorityQueue::isEmpty const): Deleted.
(WTF::PriorityQueue::enqueue): Deleted.
(WTF::PriorityQueue::peek const): Deleted.
(WTF::PriorityQueue::dequeue): Deleted.
(WTF::PriorityQueue::decreaseKey): Deleted.
(WTF::PriorityQueue::increaseKey): Deleted.
(WTF::PriorityQueue::begin const): Deleted.
(WTF::PriorityQueue::end const): Deleted.
(WTF::PriorityQueue::isValidHeap const): Deleted.
(WTF::PriorityQueue::parentOf): Deleted.
(WTF::PriorityQueue::leftChildOf): Deleted.
(WTF::PriorityQueue::rightChildOf): Deleted.
(WTF::PriorityQueue::siftUp): Deleted.
(WTF::PriorityQueue::siftDown): Deleted.
* wtf/RandomDevice.h:
* wtf/Range.h:
* wtf/RangeSet.h:
(WTF::RangeSet::RangeSet): Deleted.
(WTF::RangeSet::~RangeSet): Deleted.
(WTF::RangeSet::add): Deleted.
(WTF::RangeSet::contains const): Deleted.
(WTF::RangeSet::overlaps const): Deleted.
(WTF::RangeSet::clear): Deleted.
(WTF::RangeSet::dump const): Deleted.
(WTF::RangeSet::dumpRaw const): Deleted.
(WTF::RangeSet::begin const): Deleted.
(WTF::RangeSet::end const): Deleted.
(WTF::RangeSet::addAll): Deleted.
(WTF::RangeSet::compact): Deleted.
(WTF::RangeSet::overlapsNonEmpty): Deleted.
(WTF::RangeSet::subsumesNonEmpty): Deleted.
(WTF::RangeSet::findRange const): Deleted.
* wtf/RecursableLambda.h:
* wtf/RedBlackTree.h:
(WTF::RedBlackTree::Node::successor const): Deleted.
(WTF::RedBlackTree::Node::predecessor const): Deleted.
(WTF::RedBlackTree::Node::successor): Deleted.
(WTF::RedBlackTree::Node::predecessor): Deleted.
(WTF::RedBlackTree::Node::reset): Deleted.
(WTF::RedBlackTree::Node::parent const): Deleted.
(WTF::RedBlackTree::Node::setParent): Deleted.
(WTF::RedBlackTree::Node::left const): Deleted.
(WTF::RedBlackTree::Node::setLeft): Deleted.
(WTF::RedBlackTree::Node::right const): Deleted.
(WTF::RedBlackTree::Node::setRight): Deleted.
(WTF::RedBlackTree::Node::color const): Deleted.
(WTF::RedBlackTree::Node::setColor): Deleted.
(WTF::RedBlackTree::RedBlackTree): Deleted.
(WTF::RedBlackTree::insert): Deleted.
(WTF::RedBlackTree::remove): Deleted.
(WTF::RedBlackTree::findExact const): Deleted.
(WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted.
(WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted.
(WTF::RedBlackTree::first const): Deleted.
(WTF::RedBlackTree::last const): Deleted.
(WTF::RedBlackTree::size): Deleted.
(WTF::RedBlackTree::isEmpty): Deleted.
(WTF::RedBlackTree::treeMinimum): Deleted.
(WTF::RedBlackTree::treeMaximum): Deleted.
(WTF::RedBlackTree::treeInsert): Deleted.
(WTF::RedBlackTree::leftRotate): Deleted.
(WTF::RedBlackTree::rightRotate): Deleted.
(WTF::RedBlackTree::removeFixup): Deleted.
* wtf/ResourceUsage.h:
* wtf/RunLoop.cpp:
* wtf/RunLoopTimer.h:
* wtf/SHA1.h:
* wtf/Seconds.h:
(WTF::Seconds::Seconds): Deleted.
(WTF::Seconds::value const): Deleted.
(WTF::Seconds::minutes const): Deleted.
(WTF::Seconds::seconds const): Deleted.
(WTF::Seconds::milliseconds const): Deleted.
(WTF::Seconds::microseconds const): Deleted.
(WTF::Seconds::nanoseconds const): Deleted.
(WTF::Seconds::minutesAs const): Deleted.
(WTF::Seconds::secondsAs const): Deleted.
(WTF::Seconds::millisecondsAs const): Deleted.
(WTF::Seconds::microsecondsAs const): Deleted.
(WTF::Seconds::nanosecondsAs const): Deleted.
(WTF::Seconds::fromMinutes): Deleted.
(WTF::Seconds::fromHours): Deleted.
(WTF::Seconds::fromMilliseconds): Deleted.
(WTF::Seconds::fromMicroseconds): Deleted.
(WTF::Seconds::fromNanoseconds): Deleted.
(WTF::Seconds::infinity): Deleted.
(WTF::Seconds::nan): Deleted.
(WTF::Seconds::operator bool const): Deleted.
(WTF::Seconds::operator+ const): Deleted.
(WTF::Seconds::operator- const): Deleted.
(WTF::Seconds::operator* const): Deleted.
(WTF::Seconds::operator/ const): Deleted.
(WTF::Seconds::operator% const): Deleted.
(WTF::Seconds::operator+=): Deleted.
(WTF::Seconds::operator-=): Deleted.
(WTF::Seconds::operator*=): Deleted.
(WTF::Seconds::operator/=): Deleted.
(WTF::Seconds::operator%=): Deleted.
(WTF::Seconds::operator== const): Deleted.
(WTF::Seconds::operator!= const): Deleted.
(WTF::Seconds::operator< const): Deleted.
(WTF::Seconds::operator> const): Deleted.
(WTF::Seconds::operator<= const): Deleted.
(WTF::Seconds::operator>= const): Deleted.
(WTF::Seconds::isolatedCopy const): Deleted.
(WTF::Seconds::encode const): Deleted.
(WTF::Seconds::decode): Deleted.
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::~SegmentedVector): Deleted.
(WTF::SegmentedVector::size const): Deleted.
(WTF::SegmentedVector::isEmpty const): Deleted.
(WTF::SegmentedVector::at): Deleted.
(WTF::SegmentedVector::at const): Deleted.
(WTF::SegmentedVector::operator[]): Deleted.
(WTF::SegmentedVector::operator[] const): Deleted.
(WTF::SegmentedVector::first): Deleted.
(WTF::SegmentedVector::first const): Deleted.
(WTF::SegmentedVector::last): Deleted.
(WTF::SegmentedVector::last const): Deleted.
(WTF::SegmentedVector::takeLast): Deleted.
(WTF::SegmentedVector::append): Deleted.
(WTF::SegmentedVector::alloc): Deleted.
(WTF::SegmentedVector::removeLast): Deleted.
(WTF::SegmentedVector::grow): Deleted.
(WTF::SegmentedVector::clear): Deleted.
(WTF::SegmentedVector::begin): Deleted.
(WTF::SegmentedVector::end): Deleted.
(WTF::SegmentedVector::shrinkToFit): Deleted.
(WTF::SegmentedVector::deleteAllSegments): Deleted.
(WTF::SegmentedVector::segmentExistsFor): Deleted.
(WTF::SegmentedVector::segmentFor): Deleted.
(WTF::SegmentedVector::subscriptFor): Deleted.
(WTF::SegmentedVector::ensureSegmentsFor): Deleted.
(WTF::SegmentedVector::ensureSegment): Deleted.
(WTF::SegmentedVector::allocateSegment): Deleted.
* wtf/SetForScope.h:
* wtf/SingleRootGraph.h:
* wtf/SinglyLinkedList.h:
* wtf/SmallPtrSet.h:
* wtf/SpanningTree.h:
* wtf/Spectrum.h:
* wtf/StackBounds.h:
* wtf/StackShot.h:
* wtf/StackShotProfiler.h:
* wtf/StackStats.h:
* wtf/StackTrace.h:
* wtf/StreamBuffer.h:
* wtf/SynchronizedFixedQueue.h:
(WTF::SynchronizedFixedQueue::create): Deleted.
(WTF::SynchronizedFixedQueue::open): Deleted.
(WTF::SynchronizedFixedQueue::close): Deleted.
(WTF::SynchronizedFixedQueue::isOpen): Deleted.
(WTF::SynchronizedFixedQueue::enqueue): Deleted.
(WTF::SynchronizedFixedQueue::dequeue): Deleted.
(WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted.
* wtf/SystemTracing.h:
* wtf/ThreadGroup.h:
(WTF::ThreadGroup::create): Deleted.
(WTF::ThreadGroup::threads const): Deleted.
(WTF::ThreadGroup::getLock): Deleted.
(WTF::ThreadGroup::weakFromThis): Deleted.
* wtf/ThreadSpecific.h:
* wtf/ThreadingPrimitives.h:
(WTF::Mutex::impl): Deleted.
* wtf/TimeWithDynamicClockType.h:
(WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted.
(WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted.
(WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted.
(WTF::TimeWithDynamicClockType::clockType const): Deleted.
(WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted.
(WTF::TimeWithDynamicClockType::operator bool const): Deleted.
(WTF::TimeWithDynamicClockType::operator+ const): Deleted.
(WTF::TimeWithDynamicClockType::operator- const): Deleted.
(WTF::TimeWithDynamicClockType::operator+=): Deleted.
(WTF::TimeWithDynamicClockType::operator-=): Deleted.
(WTF::TimeWithDynamicClockType::operator== const): Deleted.
(WTF::TimeWithDynamicClockType::operator!= const): Deleted.
* wtf/TimingScope.h:
* wtf/TinyLRUCache.h:
* wtf/TinyPtrSet.h:
* wtf/URLParser.cpp:
* wtf/URLParser.h:
* wtf/Unexpected.h:
* wtf/Variant.h:
* wtf/WTFSemaphore.h:
(WTF::Semaphore::Semaphore): Deleted.
(WTF::Semaphore::signal): Deleted.
(WTF::Semaphore::waitUntil): Deleted.
(WTF::Semaphore::waitFor): Deleted.
(WTF::Semaphore::wait): Deleted.
* wtf/WallTime.h:
(WTF::WallTime::WallTime): Deleted.
(WTF::WallTime::fromRawSeconds): Deleted.
(WTF::WallTime::infinity): Deleted.
(WTF::WallTime::nan): Deleted.
(WTF::WallTime::secondsSinceEpoch const): Deleted.
(WTF::WallTime::approximateWallTime const): Deleted.
(WTF::WallTime::operator bool const): Deleted.
(WTF::WallTime::operator+ const): Deleted.
(WTF::WallTime::operator- const): Deleted.
(WTF::WallTime::operator+=): Deleted.
(WTF::WallTime::operator-=): Deleted.
(WTF::WallTime::operator== const): Deleted.
(WTF::WallTime::operator!= const): Deleted.
(WTF::WallTime::operator< const): Deleted.
(WTF::WallTime::operator> const): Deleted.
(WTF::WallTime::operator<= const): Deleted.
(WTF::WallTime::operator>= const): Deleted.
(WTF::WallTime::isolatedCopy const): Deleted.
* wtf/WeakHashSet.h:
(WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted.
(WTF::WeakHashSet::WeakHashSet): Deleted.
(WTF::WeakHashSet::begin const): Deleted.
(WTF::WeakHashSet::end const): Deleted.
(WTF::WeakHashSet::add): Deleted.
(WTF::WeakHashSet::remove): Deleted.
(WTF::WeakHashSet::contains const): Deleted.
(WTF::WeakHashSet::capacity const): Deleted.
(WTF::WeakHashSet::computesEmpty const): Deleted.
(WTF::WeakHashSet::hasNullReferences const): Deleted.
(WTF::WeakHashSet::computeSize const): Deleted.
(WTF::WeakHashSet::checkConsistency const): Deleted.
* wtf/WeakRandom.h:
(WTF::WeakRandom::WeakRandom): Deleted.
(WTF::WeakRandom::setSeed): Deleted.
(WTF::WeakRandom::seed const): Deleted.
(WTF::WeakRandom::get): Deleted.
(WTF::WeakRandom::getUint32): Deleted.
(WTF::WeakRandom::lowOffset): Deleted.
(WTF::WeakRandom::highOffset): Deleted.
(WTF::WeakRandom::nextState): Deleted.
(WTF::WeakRandom::generate): Deleted.
(WTF::WeakRandom::advance): Deleted.
* wtf/WordLock.h:
(WTF::WordLock::lock): Deleted.
(WTF::WordLock::unlock): Deleted.
(WTF::WordLock::isHeld const): Deleted.
(WTF::WordLock::isLocked const): Deleted.
(WTF::WordLock::isFullyReset const): Deleted.
* wtf/generic/MainThreadGeneric.cpp:
* wtf/glib/GMutexLocker.h:
* wtf/linux/CurrentProcessMemoryStatus.h:
* wtf/posix/ThreadingPOSIX.cpp:
(WTF::Semaphore::Semaphore): Deleted.
(WTF::Semaphore::~Semaphore): Deleted.
(WTF::Semaphore::wait): Deleted.
(WTF::Semaphore::post): Deleted.
* wtf/text/ASCIILiteral.h:
(WTF::ASCIILiteral::operator const char* const): Deleted.
(WTF::ASCIILiteral::fromLiteralUnsafe): Deleted.
(WTF::ASCIILiteral::null): Deleted.
(WTF::ASCIILiteral::characters const): Deleted.
(WTF::ASCIILiteral::ASCIILiteral): Deleted.
* wtf/text/AtomString.h:
(WTF::AtomString::operator=): Deleted.
(WTF::AtomString::isHashTableDeletedValue const): Deleted.
(WTF::AtomString::existingHash const): Deleted.
(WTF::AtomString::operator const String& const): Deleted.
(WTF::AtomString::string const): Deleted.
(WTF::AtomString::impl const): Deleted.
(WTF::AtomString::is8Bit const): Deleted.
(WTF::AtomString::characters8 const): Deleted.
(WTF::AtomString::characters16 const): Deleted.
(WTF::AtomString::length const): Deleted.
(WTF::AtomString::operator[] const): Deleted.
(WTF::AtomString::contains const): Deleted.
(WTF::AtomString::containsIgnoringASCIICase const): Deleted.
(WTF::AtomString::find const): Deleted.
(WTF::AtomString::findIgnoringASCIICase const): Deleted.
(WTF::AtomString::startsWith const): Deleted.
(WTF::AtomString::startsWithIgnoringASCIICase const): Deleted.
(WTF::AtomString::endsWith const): Deleted.
(WTF::AtomString::endsWithIgnoringASCIICase const): Deleted.
(WTF::AtomString::toInt const): Deleted.
(WTF::AtomString::toDouble const): Deleted.
(WTF::AtomString::toFloat const): Deleted.
(WTF::AtomString::percentage const): Deleted.
(WTF::AtomString::isNull const): Deleted.
(WTF::AtomString::isEmpty const): Deleted.
(WTF::AtomString::operator NSString * const): Deleted.
* wtf/text/AtomStringImpl.h:
(WTF::AtomStringImpl::lookUp): Deleted.
(WTF::AtomStringImpl::add): Deleted.
(WTF::AtomStringImpl::addWithStringTableProvider): Deleted.
* wtf/text/CString.h:
(WTF::CStringBuffer::data): Deleted.
(WTF::CStringBuffer::length const): Deleted.
(WTF::CStringBuffer::CStringBuffer): Deleted.
(WTF::CStringBuffer::mutableData): Deleted.
(WTF::CString::CString): Deleted.
(WTF::CString::data const): Deleted.
(WTF::CString::length const): Deleted.
(WTF::CString::isNull const): Deleted.
(WTF::CString::buffer const): Deleted.
(WTF::CString::isHashTableDeletedValue const): Deleted.
* wtf/text/ExternalStringImpl.h:
(WTF::ExternalStringImpl::freeExternalBuffer): Deleted.
* wtf/text/LineBreakIteratorPoolICU.h:
* wtf/text/NullTextBreakIterator.h:
* wtf/text/OrdinalNumber.h:
* wtf/text/StringBuffer.h:
* wtf/text/StringBuilder.h:
* wtf/text/StringConcatenateNumbers.h:
* wtf/text/StringHasher.h:
* wtf/text/StringImpl.h:
* wtf/text/StringView.cpp:
* wtf/text/StringView.h:
(WTF::StringView::left const): Deleted.
(WTF::StringView::right const): Deleted.
(WTF::StringView::underlyingStringIsValid const): Deleted.
(WTF::StringView::setUnderlyingString): Deleted.
* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted.
(WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted.
(WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted.
(WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted.
(WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted.
(WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted.
* wtf/text/SymbolRegistry.h:
* wtf/text/TextBreakIterator.h:
* wtf/text/TextPosition.h:
* wtf/text/TextStream.h:
* wtf/text/WTFString.h:
(WTF::String::swap): Deleted.
(WTF::String::adopt): Deleted.
(WTF::String::isNull const): Deleted.
(WTF::String::isEmpty const): Deleted.
(WTF::String::impl const): Deleted.
(WTF::String::releaseImpl): Deleted.
(WTF::String::length const): Deleted.
(WTF::String::characters8 const): Deleted.
(WTF::String::characters16 const): Deleted.
(WTF::String::is8Bit const): Deleted.
(WTF::String::sizeInBytes const): Deleted.
(WTF::String::operator[] const): Deleted.
(WTF::String::find const): Deleted.
(WTF::String::findIgnoringASCIICase const): Deleted.
(WTF::String::reverseFind const): Deleted.
(WTF::String::contains const): Deleted.
(WTF::String::containsIgnoringASCIICase const): Deleted.
(WTF::String::startsWith const): Deleted.
(WTF::String::startsWithIgnoringASCIICase const): Deleted.
(WTF::String::hasInfixStartingAt const): Deleted.
(WTF::String::endsWith const): Deleted.
(WTF::String::endsWithIgnoringASCIICase const): Deleted.
(WTF::String::hasInfixEndingAt const): Deleted.
(WTF::String::append): Deleted.
(WTF::String::left const): Deleted.
(WTF::String::right const): Deleted.
(WTF::String::createUninitialized): Deleted.
(WTF::String::fromUTF8WithLatin1Fallback): Deleted.
(WTF::String::isAllASCII const): Deleted.
(WTF::String::isAllLatin1 const): Deleted.
(WTF::String::isSpecialCharacter const): Deleted.
(WTF::String::isHashTableDeletedValue const): Deleted.
(WTF::String::hash const): Deleted.
(WTF::String::existingHash const): Deleted.
* wtf/text/cf/TextBreakIteratorCF.h:
* wtf/text/icu/TextBreakIteratorICU.h:
* wtf/text/icu/UTextProviderLatin1.h:
* wtf/threads/BinarySemaphore.h:
(WTF::BinarySemaphore::waitFor): Deleted.
(WTF::BinarySemaphore::wait): Deleted.
* wtf/unicode/Collator.h:
* wtf/win/GDIObject.h:
* wtf/win/PathWalker.h:
* wtf/win/Win32Handle.h:

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

14 months agoUnreviewed, fix post landing review comments for r248533 from Darin.
cdumez@apple.com [Mon, 12 Aug 2019 20:15:26 +0000 (20:15 +0000)]
Unreviewed, fix post landing review comments for r248533 from Darin.

* wtf/RefCounted.h:
(WTF::RefCountedBase::ref const):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):
(WTF::RefCountedBase::derefBase const):
(WTF::RefCountedBase::areThreadingCheckedEnabled const): Deleted.

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

14 months agoClear m_sessionStorageNamespaces on the background thread
sihui_liu@apple.com [Mon, 12 Aug 2019 19:46:40 +0000 (19:46 +0000)]
Clear m_sessionStorageNamespaces on the background thread
https://bugs.webkit.org/show_bug.cgi?id=200631
<rdar://problem/54149638>

Reviewed by Chris Dumez.

Network process receives messages about web page state from web process and destroys sessionStorageNamespace if
needed. It also receives messages about session state from UI process and destroys StorageManager, which owns
SessionStorageNamespaces, if needed. Because of the race in receiving the messages from different processes,
network process may decide to destroy StorageManager before destroying all SessionStorageNamespaces, and
SessionStorageNamespaces are destroyed with StorageManager on the main thread.

* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::waitUntilTasksFinished):

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

14 months agoRemove an assertion in ~StorageArea()
sihui_liu@apple.com [Mon, 12 Aug 2019 19:33:53 +0000 (19:33 +0000)]
Remove an assertion in ~StorageArea()
https://bugs.webkit.org/show_bug.cgi?id=200630
<rdar://problem/54097722>

Reviewed by Chris Dumez.

In r247370, we clear the LocalStorageNamespace before the destructor of LocalStorageNamespace is invoked, to
make sure StorageArea gets destroyed on the background thread.
StorageArea can get destroyed before LocalStorageNamespace, so the assertion in ~StorageArea() is not true any
more.

* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::~StorageArea):

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

14 months ago[iPadOS] Web pages sometimes load at half width in Safari
wenson_hsieh@apple.com [Mon, 12 Aug 2019 19:31:21 +0000 (19:31 +0000)]
[iPadOS] Web pages sometimes load at half width in Safari
https://bugs.webkit.org/show_bug.cgi?id=200624
<rdar://problem/52694257>

Reviewed by Simon Fraser.

Source/WebKit:

Whenever WKWebView's size changes, it normally notifies the web content process by calling into WebPageProxy::
setViewportConfigurationViewLayoutSize, which remembers this view layout size using a member variable,
m_viewportConfigurationViewLayoutSize. Later, m_viewportConfigurationViewLayoutSize is consulted as a part of
constructing the creation parameters used to set up a new page.

However, during animated resize, WKWebView avoids these calls to setViewportConfigurationViewLayoutSize via the
dynamic viewport update mode check in -[WKWebView _frameOrBoundsChanged]. Instead, the new view layout size is
pushed to the web process by calling WebPageProxy::dynamicViewportSizeUpdate.

Since dynamicViewportSizeUpdate doesn't update m_viewportConfigurationViewLayoutSize, the next
WebPageCreationParameters that are created with this WebPageProxy (e.g. after a process swap, or after
reloading, if the process was terminated) will use the size of the WKWebView prior to the most recent animated
resize.

To fix the bug, we simply make sure that m_viewportConfigurationViewLayoutSize is updated in the dynamic
viewport size update (i.e. animated resize) case as well.

Test: WebKit.CreateWebPageAfterAnimatedResize

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):

Tools:

Add an API test to verify that after performing an animated resize and killing the web process, the subsequent
web page is created using the post-animated-resize web view dimensions, rather than the original layout
dimensions.

* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:

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

14 months agoCrash under NetworkResourceLoader::start()
cdumez@apple.com [Mon, 12 Aug 2019 19:22:24 +0000 (19:22 +0000)]
Crash under NetworkResourceLoader::start()
https://bugs.webkit.org/show_bug.cgi?id=200628

Reviewed by Youenn Fablet.

Make sure the NetworkResourceLoader is still alive when the lambda passed to NetworkLoadChecker::check()
gets executed.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:

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

14 months agoWeb Inspector: Elements: Styles: add space between media query and style icon
drousso@apple.com [Mon, 12 Aug 2019 19:17:56 +0000 (19:17 +0000)]
Web Inspector: Elements: Styles: add space between media query and style icon
https://bugs.webkit.org/show_bug.cgi?id=200623

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .header:not(:first-child), .spreadsheet-css-declaration .header:not(.editing-selector) .selector, .spreadsheet-css-declaration.has-icon .header.editing-selector .selector): Added.
(.spreadsheet-css-declaration .header.editing-selector .selector): Deleted.
Ensure the selector field doesn't shift vertically when entering/exiting editing mode.

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

14 months agoMake Blob::m_size an Optional
youenn@apple.com [Mon, 12 Aug 2019 19:13:17 +0000 (19:13 +0000)]
Make Blob::m_size an Optional
https://bugs.webkit.org/show_bug.cgi?id=200617

Reviewed by Alex Christensen.

Use an Optional instead of -1 to know that m_size is initialized or not.
No change of behavior.

Refactoring to make all Blob members private.
Remove one static Blob create method.

Covered by existing tests.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::fromFormData):
* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
(WebCore::Blob::size const):
* fileapi/Blob.h:
(WebCore::Blob::setInternalURL):
* fileapi/File.cpp:
(WebCore::File::create):
(WebCore::File::File):
(WebCore::File::computeNameAndContentType):
* fileapi/File.h:
* html/FileListCreator.cpp:
(WebCore::FileListCreator::createFileList):

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

14 months agoWeb Inspector: Address some ESLint warnings
joepeck@webkit.org [Mon, 12 Aug 2019 18:49:06 +0000 (18:49 +0000)]
Web Inspector: Address some ESLint warnings
https://bugs.webkit.org/show_bug.cgi?id=200598

Reviewed by Devin Rousso.

* UserInterface/Base/Utilities.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Models/DOMNodeStyles.js:
* UserInterface/Models/LayoutTimelineRecord.js:
* UserInterface/Models/ServerTimingEntry.js:
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/Test.js:
* UserInterface/Views/CPUTimelineView.js:
* UserInterface/Views/CPUUsageCombinedView.js:
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
* UserInterface/Views/DOMTreeContentView.js:
* UserInterface/Views/DOMTreeElement.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/NetworkTableContentView.js:
* UserInterface/Views/ResourceTimingBreakdownView.js:
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
* UserInterface/Views/TreeOutline.js:

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

14 months agoWeb Inspector: Better organize manager / observer API groups
joepeck@webkit.org [Mon, 12 Aug 2019 18:45:13 +0000 (18:45 +0000)]
Web Inspector: Better organize manager / observer API groups
https://bugs.webkit.org/show_bug.cgi?id=200594

Reviewed by Devin Rousso.

* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.globalObjectCleared):
(WI.DebuggerManager.prototype.reset): Deleted.
Renamed.

* UserInterface/Protocol/DebuggerObserver.js:
(WI.DebuggerObserver.prototype.globalObjectCleared):

* UserInterface/Controllers/CSSManager.js:
* UserInterface/Controllers/CanvasManager.js:
* UserInterface/Controllers/ConsoleManager.js:
* UserInterface/Controllers/DOMManager.js:
* UserInterface/Controllers/DOMStorageManager.js:
* UserInterface/Controllers/LayerTreeManager.js:
* UserInterface/Controllers/NetworkManager.js:
* UserInterface/Controllers/TargetManager.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Controllers/WorkerManager.js:

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

14 months agoTapping buttons in Data Detectors lookup previews doesn't work (Follow-up fix)
jbedard@apple.com [Mon, 12 Aug 2019 18:42:20 +0000 (18:42 +0000)]
Tapping buttons in Data Detectors lookup previews doesn't work (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=200579
<rdar://problem/54056519>

Reviewed by Megan Gardner.

* Platform/spi/ios/UIKitSPI.h: Add _UIContextMenuStyle SPI.

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

14 months agoAdd threading assertions to RefCounted
cdumez@apple.com [Mon, 12 Aug 2019 18:10:26 +0000 (18:10 +0000)]
Add threading assertions to RefCounted
https://bugs.webkit.org/show_bug.cgi?id=200507

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
Disable threading assertions for DFG::Plan::m_inlineCallFrames while the JSC team
investigates.

Source/WebKit:

Enable new RefCounted threading assertions for WebKit2
(UIProcess + auxiliary processes).

* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/Cocoa/WebKit2InitializeCocoa.mm:
(WebKit::runInitializationCode):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(+[WebView initialize]):
Enable new RefCounted threading assertions for WebKitLegacy.

Source/WTF:

Add threading assertions to RefCounted to try and catch unsafe concurrent ref'ing / derefing of
RefCounted objects from several threads. If you hit these new assertions, it likely means you either
need to:
1. Have your class subclass ThreadSafeRefCounted instead of RefCounted
or
2. Make sure your objects always gets ref'd / deref'd from the same thread.

These assertions already found several thread safety bugs in our code base, which I fixed via
dependency bugs.

These assertions are currently enabled in WebKit (UIProcess, child processes and
WebKitLegacy), they do not apply other JavascriptCore API clients.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.cpp: Added.
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref const):
(WTF::RefCountedBase::disableThreadingChecks):
(WTF::RefCountedBase::enableThreadingChecksGlobally):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::areThreadingCheckedEnabled const):
(WTF::RefCountedBase::derefBase const):
* wtf/SizeLimits.cpp:

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

14 months agoGPUBuffer seems to be ref'd / deref'd from multiple thread concurrently but is not...
cdumez@apple.com [Mon, 12 Aug 2019 17:27:51 +0000 (17:27 +0000)]
GPUBuffer seems to be ref'd / deref'd from multiple thread concurrently but is not ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=200629

Reviewed by Geoffrey Garen.

Make sure GPUBuffer only gets ref'd / deref'd on the main thread, since it is not
ThreadSafeRefCounted.

* platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::commandBufferCommitted):
(WebCore::GPUBuffer::commandBufferCompleted):

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

14 months agoAdd a test to ensure that we dispatch keydown and keyup events when multiple keys...
dbates@webkit.org [Mon, 12 Aug 2019 17:13:55 +0000 (17:13 +0000)]
Add a test to ensure that we dispatch keydown and keyup events when multiple keys are pressed at the same time
https://bugs.webkit.org/show_bug.cgi?id=200548

Reviewed by Darin Adler.

Tools:

Expose infrastructure to simulate a literal raw key down and a literal key up event.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::rawKeyDown):
(WTR::UIScriptController::rawKeyUp):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::rawKeyDown):
(WTR::UIScriptControllerIOS::rawKeyUp):

LayoutTests:

Add a test. Skip the test for now until we have the fixes for <rdar://problem/53613454> and <rdar://problem/54001139>.

* fast/events/ios/multiple-key-press-and-release-ordering-expected.txt: Added.
* fast/events/ios/multiple-key-press-and-release-ordering.html: Added.
* platform/ios/TestExpectations:

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

14 months ago[GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
commit-queue@webkit.org [Mon, 12 Aug 2019 16:56:01 +0000 (16:56 +0000)]
[GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
https://bugs.webkit.org/show_bug.cgi?id=200584

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

Source/WebCore:

Listening to parsers warnings and error messages (synchronously so that we react
right away) and requesting keyframes from the peer.

Also simplify the decoder code by trying to make decoding happen
in one single pass, also hiding away GStreamer threading and allowing
us to react as soon as the decoder/parser fails.

* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
(WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder):
(WebCore::GStreamerVideoDecoder::pullSample):
(WebCore::H264Decoder::H264Decoder):
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

Tools:

Added a h264parse patch to post WARNING on the bus when a broken frame is detected.
Ignore style libwebrtc optionnal 'style issue'

* Scripts/webkitpy/style/checker.py:
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-bad-0001-h264parse-Post-a-WARNING-when-data-is-broken.patch: Added.

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

14 months agoUnreviewed, rolling out r248525.
cdumez@apple.com [Mon, 12 Aug 2019 16:06:02 +0000 (16:06 +0000)]
Unreviewed, rolling out r248525.

Revert new threading assertions while I work on fixing the
issues they exposed

Reverted changeset:

"Add threading assertions to RefCounted"
https://bugs.webkit.org/show_bug.cgi?id=200507
https://trac.webkit.org/changeset/248525

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

14 months agoOnly construct ComplexLineLayout when needed
antti@apple.com [Mon, 12 Aug 2019 15:31:34 +0000 (15:31 +0000)]
Only construct ComplexLineLayout when needed
https://bugs.webkit.org/show_bug.cgi?id=200625

Reviewed by Zalan Bujtas.

* rendering/ComplexLineLayout.cpp:
(WebCore::ComplexLineLayout::createInlineBoxForRenderer):
(WebCore::ComplexLineLayout::createLineBoxes):
(WebCore::ComplexLineLayout::constructLine):
(WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):

Make static so this can be invoked without constructing complex line layout (from startAlignedOffsetForLine).

(WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
(WebCore::ComplexLineLayout::checkLinesForTextOverflow):
(WebCore::ComplexLineLayout::startAlignedOffsetForLine): Deleted.

This is also used in block layout to set static positions of positioned objects.
Move to RenderBlockFlow where its only caller is.

* rendering/ComplexLineLayout.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
(WebCore::RenderBlockFlow::deleteLines):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::hasLines const):
(WebCore::RenderBlockFlow::layoutSimpleLines):
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderBlockFlow::ensureLineBoxes):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::firstRootBox const):
(WebCore::RenderBlockFlow::lastRootBox const):
(WebCore::RenderBlockFlow::complexLineLayout):
(WebCore::RenderBlockFlow::lineBoxes): Deleted.
(WebCore::RenderBlockFlow::lineBoxes const): Deleted.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::removeLineBoxFromRenderObject):
(WebCore::RootInlineBox::extractLineBoxFromRenderObject):
(WebCore::RootInlineBox::attachLineBoxToRenderObject):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::generateLineBoxTree):

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

14 months agoRemove IDBValue::m_sessionID
youenn@apple.com [Mon, 12 Aug 2019 11:39:39 +0000 (11:39 +0000)]
Remove IDBValue::m_sessionID
https://bugs.webkit.org/show_bug.cgi?id=199320

Reviewed by Alex Christensen.

Remove sessionID from IDBValue.
This does not seem to be really used in any way.
No change of behavior.

* Modules/indexeddb/IDBValue.cpp:
(WebCore::IDBValue::IDBValue):
* Modules/indexeddb/IDBValue.h:
(WebCore::IDBValue::blobURLs const):
(WebCore::IDBValue::encode const):
(WebCore::IDBValue::decode):
(WebCore::IDBValue::sessionID const): Deleted.
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::isolatedCopy):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::databaseIdentifier const):
(WebCore::IDBRequestData::decode):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueToJSValue):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
* bindings/js/SerializedScriptValue.h:
(WebCore::SerializedScriptValue::sessionID const): Deleted.

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

14 months agoRemove IDB-specific quota
youenn@apple.com [Mon, 12 Aug 2019 10:07:29 +0000 (10:07 +0000)]
Remove IDB-specific quota
https://bugs.webkit.org/show_bug.cgi?id=196545

Reviewed by Alex Christensen.

Source/WebCore:

No change of behavior as IDB specific quota is no longer used.
Instead a global quota is used. This quota currently handles IDB and Cache API.

* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::createBackingStore):
(WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted.
* Modules/indexeddb/server/IDBServer.h:
(WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted.
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createIDBServer):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::setIDBPerOriginQuota): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetIDBPerOriginQuota): Deleted.
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setIDBPerOriginQuota): Deleted.
* UIProcess/WebProcessPool.h:

Source/WebKitLegacy:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::idbConnectionToServerForSession):
(WebDatabaseProvider::deleteAllDatabases):
(WebDatabaseProvider::setIDBPerOriginQuota): Deleted.
* Storage/WebDatabaseProvider.h:

Source/WebKitLegacy/mac:

* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager setIDBPerOriginQuota:]): Deleted.
* Storage/WebDatabaseManagerPrivate.h:

Source/WebKitLegacy/win:

* Interfaces/IWebDatabaseManager.idl:
* WebDatabaseManager.cpp:
(WebDatabaseManager::setIDBPerOriginQuota): Deleted.
* WebDatabaseManager.h:

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
(setIDBPerOriginQuotaCallback): Deleted.
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setIDBPerOriginQuota): Deleted.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setIDBPerOriginQuota): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setIDBPerOriginQuota): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

14 months agoAdd threading assertions to RefCounted
cdumez@apple.com [Mon, 12 Aug 2019 02:00:30 +0000 (02:00 +0000)]
Add threading assertions to RefCounted
https://bugs.webkit.org/show_bug.cgi?id=200507

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
Disable threading assertions for DFG::Plan::m_inlineCallFrames while the JSC team
investigates.

Source/WebKit:

Enable new RefCounted threading assertions for WebKit2
(UIProcess + auxiliary processes).

* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/Cocoa/WebKit2InitializeCocoa.mm:
(WebKit::runInitializationCode):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(+[WebView initialize]):
Enable new RefCounted threading assertions for WebKitLegacy.

Source/WTF:

Add threading assertions to RefCounted to try and catch unsafe concurrent ref'ing / derefing of
RefCounted objects from several threads. If you hit these new assertions, it likely means you either
need to:
1. Have your class subclass ThreadSafeRefCounted instead of RefCounted
or
2. Make sure your objects always gets ref'd / deref'd from the same thread.

These assertions already found several thread safety bugs in our code base, which I fixed via
dependency bugs.

These assertions are currently enabled in WebKit (UIProcess, child processes and
WebKitLegacy), they do not apply other JavascriptCore API clients.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.cpp: Added.
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref const):
(WTF::RefCountedBase::disableThreadingChecks):
(WTF::RefCountedBase::enableThreadingChecksGlobally):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::areThreadingCheckedEnabled const):
(WTF::RefCountedBase::derefBase const):
* wtf/SizeLimits.cpp:

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

14 months agoWebPage and ViewportConfiguration have differing notions of viewLayoutSize
wenson_hsieh@apple.com [Sun, 11 Aug 2019 19:11:58 +0000 (19:11 +0000)]
WebPage and ViewportConfiguration have differing notions of viewLayoutSize
https://bugs.webkit.org/show_bug.cgi?id=200619

Reviewed by Tim Horton.

The notion of a "view layout size" exists on WebPage and WebPageProxy for the purpose of specifying an intrinsic
content size for the entire web view on macOS. However, it also exists in ViewportConfiguration (as
viewLayoutSize) and WebPageProxy (under the name m_viewportConfigurationViewLayoutSize) for the purposes of
specifying the minimum layout size of the page's viewport.

This is especially confusing in WebPageProxy, which has both m_viewportConfigurationViewLayoutSize and
m_viewLayoutSize. To remedy this, rename "*viewLayoutSize" for the purposes of specifying an intrinsic web view
size to "*minimumSizeForAutoLayout" instead, which is consistent with the corresponding SPI property name on
WKView.

No change in behavior.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _minimumLayoutWidth]):
(-[WKWebView _setMinimumLayoutWidth:]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
(WebKit::WebViewImpl::minimumSizeForAutoLayout const):
(WebKit::WebViewImpl::setIntrinsicContentSize):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::minimumSizeForAutoLayoutDidChange):
(WebKit::DrawingAreaProxy::viewLayoutSizeDidChange): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::minimumSizeForAutoLayout const):
(WebKit::WebPageProxy::viewLayoutSize const): Deleted.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::minimumSizeForAutoLayoutDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::viewLayoutSizeDidChange): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setMinimumSizeForAutoLayout):
(WebKit::WebPage::updateIntrinsicContentSizeIfNeeded):
(WebKit::WebPage::setViewLayoutSize): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::minimumSizeForAutoLayout const):
(WebKit::WebPage::viewLayoutSize const): Deleted.
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):

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