Timeline



Sep 7, 2019:

11:10 PM Changeset in webkit [249629] by Chris Dumez
  • 15 edits in trunk

Add support for postMessage buffering between the service worker and window
https://bugs.webkit.org/show_bug.cgi?id=201169

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/service-workers/service-worker/postmessage-to-client-message-queue.https-expected.txt:

Source/WebCore:

As per the Service Worker specification, a service worker client's message
queue is initially disabled and only gets enabled after:

  • The DOMContentLoaded event has been fired

or

  • The client sets the navigator.serviceWorker.onmessage event handler

or

  • navigator.serviceWorker.startMessages() is called

While the message queue is disabled, messages posted by the service worker
to the client simply get queued and only get processed once the queue gets
enabled.

No new tests, rebaselined existing test.

  • dom/Document.cpp:

(WebCore::Document::finishedParsing):
Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
been fired.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):

  • dom/ScriptExecutionContext.h:
  • workers/service/SWClientConnection.cpp:

(WebCore::SWClientConnection::postMessageToServiceWorkerClient):
Fix a bug where a service worker would not be able to post a message to a client until
that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
when a message is received from the service worker. Previously, messages were just
getting dropped.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
When the ServiceWorkerContainer is constructed, suspend its message queue if its context
document is still parsing.

(WebCore::ServiceWorkerContainer::startMessages):
Resume the message queue when startMessages() is called.

(WebCore::ServiceWorkerContainer::postMessage):
Enqueue the event instead of firing it right away.

(WebCore::ServiceWorkerContainer::addEventListener):
if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
startMessages().

  • workers/service/ServiceWorkerContainer.h:

LayoutTests:

Unskip test that is no longer timing out.

  • resources/testharnessreport.js:

(self.testRunner.add_completion_callback):
Use testRunner.forceImmediateCompletion() instead of notifyDone() for WPT tests.
testRunner.notifyDone() does not work in case of load error or when the load
does not finish. The WPT test was timing out because the load does not finish for
testing purposes.

10:57 PM Changeset in webkit [249628] by david_quesada@apple.com
  • 3 edits in trunk/Source/WTF

REGRESSION(r248533): Unable to use WTF::RefCounted when building in a debug configuration against a non-debug WebKit
https://bugs.webkit.org/show_bug.cgi?id=201585
rdar://problem/55153369

Reviewed by Chris Dumez.

Export WTF::RefCountedBase::areThreadingChecksEnabledGlobally regardless of whether or not assertions
are enabled for the WTF being built. This allows WebKit-based projects to use RefCounted for their own
objects in a debug configuration without requiring a debug build of WebKit.

  • wtf/RefCounted.cpp:
  • wtf/RefCounted.h:
10:42 PM Changeset in webkit [249627] by Chris Dumez
  • 15 edits in trunk

[Service Workers] Drop support for registration resurrection
https://bugs.webkit.org/show_bug.cgi?id=201584

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Re-sync a couple of outdated WPT tests from upstream 820f0f86047e6e.

  • web-platform-tests/service-workers/service-worker/unregister-then-register-new-script.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/unregister-then-register-new-script.https.html:
  • web-platform-tests/service-workers/service-worker/unregister-then-register.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/unregister-then-register.https.html:

Source/WebCore:

Drop support for registration resurrection (Unregistering then quickly re-registering would resurrect
the original registration instead of creating a new one). This behavior is no longer in the
specification (No more "isUninstalling" flag on the registration, and the registration is removed
from the "scope to registration map" right away upon unregistering).

This resurrection behavior was causing a lot of flakiness in the tests so it is likely we will be able
to unskip some tests. This is also what was causing the flakiness that caused Bug 201169 to be rolled
out.

No new tests, updated existing tests.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::activeWorkerFromRegistrationID):
(WebCore::SWServer::getRegistration):
(WebCore::SWServer::addRegistration):
(WebCore::SWServer::removeRegistration):
(WebCore::SWServer::getRegistrations):
(WebCore::SWServer::clearAll):
(WebCore::SWServer::clear):
(WebCore::SWServer::terminatePreinstallationWorker):
(WebCore::SWServer::didFinishActivation):
(WebCore::SWServer::claim):
(WebCore::SWServer::addClientServiceWorkerRegistration):
(WebCore::SWServer::removeClientServiceWorkerRegistration):
(WebCore::SWServer::installContextData):
(WebCore::SWServer::runServiceWorker):
(WebCore::SWServer::doRegistrationMatching):
(WebCore::SWServer::registrationFromServiceWorkerIdentifier):
(WebCore::SWServer::registerServiceWorkerClient):
(WebCore::SWServer::unregisterServiceWorkerClient):
(WebCore::SWServer::removeFromScopeToRegistrationMap):
(WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::runRegisterJob):
(WebCore::SWServerJobQueue::runUnregisterJob):
(WebCore::SWServerJobQueue::runUpdateJob):

  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::clear):
(WebCore::SWServerRegistration::handleClientUnload):
(WebCore::SWServerRegistration::isUnregistered const):

  • workers/service/server/SWServerRegistration.h:

(WebCore::SWServerRegistration::scopeURLWithoutFragment const):

  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::SWServerWorker):
(WebCore::m_scriptResourceMap):
(WebCore::SWServerWorker::contextData const):
(WebCore::SWServerWorker::skipWaiting):
(WebCore::SWServerWorker::setHasPendingEvents):
(WebCore::SWServerWorker::setState):
(WebCore::SWServerWorker::registration const):

  • workers/service/server/SWServerWorker.h:
10:26 PM Changeset in webkit [249626] by Chris Dumez
  • 6 edits
    3 deletes in trunk

Rewrite http/tests/workers/service/serviceworker-private-browsing.https.html as an API test
https://bugs.webkit.org/show_bug.cgi?id=201574

Reviewed by Alex Christensen.

Source/WebKit:

Update Service Workers so that they obey the "secureContextChecksEnabled" preference.
This was needed to allow my service worker to access self.caches in my API test.

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::updatePreferencesStore):

Tools:

Rewrite http/tests/workers/service/serviceworker-private-browsing.https.html as an API test so that
we truly test private browsing. testRunner.setPrivateBrowsingEnabled_DEPRECATED() is a hack which
does not work well for WK2.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

LayoutTests:

Drop legacy test which was replaced by an API test.

  • http/tests/workers/service/serviceworker-private-browsing-worker.js: Removed.
  • http/tests/workers/service/serviceworker-private-browsing.https-expected.txt: Removed.
  • http/tests/workers/service/serviceworker-private-browsing.https.html: Removed.
10:11 PM Changeset in webkit [249625] by Chris Dumez
  • 5 edits
    4 deletes in trunk

Rewrite storage/domstorage/localstorage/private-browsing-affects-storage.html as an API test
https://bugs.webkit.org/show_bug.cgi?id=201547

Reviewed by Alex Christensen.

Tools:

Rewrite storage/domstorage/localstorage/private-browsing-affects-storage.html as an API test so
it can use a true ephemeral session instead of the testRunner.setPrivateBrowsingEnabled_DEPRECATED()
hack.

  • TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:

(-[LocalStorageNavigationDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]):
(-[LocalStorageNavigationDelegate webView:didFinishNavigation:]):
(TEST):

LayoutTests:

Drop outdated test.

  • storage/domstorage/localstorage/private-browsing-affects-storage.html: Removed.
  • storage/domstorage/localstorage/resources/private-browsing-1.html: Removed.
  • storage/domstorage/localstorage/resources/private-browsing-2.html: Removed.
9:17 PM Changeset in webkit [249624] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Marking up a note on iOS results in a PDF with no contents
https://bugs.webkit.org/show_bug.cgi?id=201530
<rdar://problem/53686019>

Unreviewed follow-up.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _waitForDrawToPDFCallback]):
Remove an ASSERT_NOT_REACHED that fires if the synchronous wait for printing
times out. This is a totally legitimite situation that can occur if the process
crashes; there's no need for an assert there.

8:58 PM Changeset in webkit [249623] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Null check m_client in NetworkDataTask::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=201587
<rdar://problem/54743444>

Reviewed by Chris Dumez.

clearClient can be called at any time. We null check it everyhere else we use it,
and we are seeing crashes at this call site. Let's not crash.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::didReceiveResponse):

7:29 PM Changeset in webkit [249622] by achristensen@apple.com
  • 17 edits in trunk

Remove WebsiteDataStore::legacyDefaultDataStoreConfiguration
https://bugs.webkit.org/show_bug.cgi?id=200054

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Its last needed use was removed in rdar://problem/47030981
This changes WKContextConfigurationCreateWithLegacyOptions to be equal to WKContextConfigurationCreate,
but it has no remaining clients so it is only being retained for binary compabibility.
This also changes WKContextCreateWithInjectedBundlePath and WKContextCreate to be equal to WKContextCreateWithConfiguration,
and after rdar://problem/47030981 there are no meaningful clients of those functions, also.
There is one existing client of WKContextCreateWithInjectedBundlePath in rdar://problem/50323967 but our current implementation
is compatible enough for them because it uses their injected bundle still.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):
(API::ProcessPoolConfiguration::createWithLegacyOptions): Deleted.

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::createLegacy): Deleted.
(API::WebsiteDataStore::legacyDefaultDataStoreConfiguration): Deleted.

  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextCreate):
(WKContextCreateWithInjectedBundlePath):
(WKContextGetWebsiteDataStore):

  • UIProcess/API/C/WKContextConfigurationRef.cpp:

(WKContextConfigurationCreate):
(WKContextConfigurationCreateWithLegacyOptions):

  • UIProcess/API/C/WKContextConfigurationRef.h:
  • UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:

(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): Deleted.

  • UIProcess/API/Cocoa/WKProcessGroup.mm:

(-[WKProcessGroup initWithInjectedBundleURL:]):

  • UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:

(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): Deleted.

  • UIProcess/API/win/APIWebsiteDataStoreWin.cpp:

(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory): Deleted.
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): Deleted.

  • UIProcess/WebInspectorUtilities.cpp:

(WebKit::inspectorProcessPool):

  • UIProcess/WebProcessPool.cpp:

(WebKit::m_webProcessCache):
(WebKit::legacyWebsiteDataStoreConfiguration): Deleted.

  • UIProcess/WebProcessPool.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

This test relied on the default data store having been instantiated.

6:19 PM Changeset in webkit [249621] by mark.lam@apple.com
  • 2 edits in trunk/Source/bmalloc

[Follow up fix] Harden protection of the Gigacage Config parameters.
https://bugs.webkit.org/show_bug.cgi?id=201570
<rdar://problem/55134229>

Reviewed by Saam Barati.

The previously landed hardening measures is failing the assertion in
forbidDisablingPrimitiveGigacage() when a replacement heap (e.g. gmalloc) is
used.

  1. forbidDisablingPrimitiveGigacage() should just ensureGigacage() so that we know that the Gigacage is properly configured (whether enabled or disabled).
  2. Strengthen the assertion in forbidDisablingPrimitiveGigacage() to ensure that we have already determined if the Gigacage should be enabled.
  • bmalloc/Gigacage.cpp:

(Gigacage::forbidDisablingPrimitiveGigacage):

3:56 PM Changeset in webkit [249620] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix Windows build
https://bugs.webkit.org/show_bug.cgi?id=201517

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
3:54 PM Changeset in webkit [249619] by achristensen@apple.com
  • 8 edits in trunk

Remove calls to WKContextGetWebsiteDataStore missed in r249614
https://bugs.webkit.org/show_bug.cgi?id=200050

Source/WebKit:

It turns out I didn't need to introduce another way of clearing all cookies between tests.
I just needed to make the call to WKHTTPCookieStoreDeleteAllCookies use the right WebsiteDataStore.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::clearCachedCredentials):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::clearCredentials):
(WebKit::NetworkSession::clearCookies): Deleted.

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::clearCookies): Deleted.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::invoke):

3:45 PM Changeset in webkit [249618] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix Windows build.
https://bugs.webkit.org/show_bug.cgi?id=200050

  • PlatformWin.cmake:
3:26 PM Changeset in webkit [249617] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix Windows build.
https://bugs.webkit.org/show_bug.cgi?id=201517

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
2:45 PM Changeset in webkit [249616] by achristensen@apple.com
  • 2 edits in trunk/Tools

Remove invalid assertion added in r249614
https://bugs.webkit.org/show_bug.cgi?id=200050

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::cocoaResetStateToConsistentValues):
Something is instantiating the default data store, which is no problem right now.

1:20 PM Changeset in webkit [249615] by Ryan Haddad
  • 16 edits in trunk

Unreviewed, rolling out r249353.

The test for this change is a flaky failure.

Reverted changeset:

"Add support for postMessage buffering between the service
worker and window"
https://bugs.webkit.org/show_bug.cgi?id=201169
https://trac.webkit.org/changeset/249353

9:04 AM Changeset in webkit [249614] by achristensen@apple.com
  • 33 edits
    2 adds in trunk

Deprecate WKContextGetWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=200050

Reviewed by Geoff Garen.

Source/WebCore:

  • platform/network/CacheValidation.cpp:

(WebCore::collectVaryingRequestHeaders):
(WebCore::verifyVaryingRequestHeaders):

  • platform/network/CacheValidation.h:

Replace a few NetworkStorageSession& with NetworkStorageSession*
so I can replace defaultStorageSession with the correct NetworkStorageSession in NetworkCache.cpp.

Source/WebKit:

The last use of it was removed in rdar://problem/47030981
In order to remove its use in WebKitTestRunner, I needed to make WKWebsiteDataStoreConfigurationRef
to replace the WKContextConfigurationRef members that should've been associated with the WebsiteDataStore the whole time.
There is one use of WKContextGetWebsiteDataStore in TestWebKitAPI still I'll investigate later.

  • Shared/API/c/WKBase.h:
  • Sources.txt:
  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::create):

  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextGetApplicationCacheManager):
(WKContextGetKeyValueStorageManager):
(WKContextGetResourceCacheManager):

  • UIProcess/API/C/WKContext.h:
  • UIProcess/API/C/WKContextConfigurationRef.cpp:

(WKContextConfigurationCopyDiskCacheDirectory):
(WKContextConfigurationSetDiskCacheDirectory):
(WKContextConfigurationCopyApplicationCacheDirectory):
(WKContextConfigurationSetApplicationCacheDirectory):
(WKContextConfigurationCopyIndexedDBDatabaseDirectory):
(WKContextConfigurationSetIndexedDBDatabaseDirectory):
(WKContextConfigurationCopyLocalStorageDirectory):
(WKContextConfigurationSetLocalStorageDirectory):
(WKContextConfigurationCopyWebSQLDatabaseDirectory):
(WKContextConfigurationSetWebSQLDatabaseDirectory):
(WKContextConfigurationCopyMediaKeysStorageDirectory):
(WKContextConfigurationSetMediaKeysStorageDirectory):
(WKContextConfigurationCopyResourceLoadStatisticsDirectory):
(WKContextConfigurationSetResourceLoadStatisticsDirectory):

  • UIProcess/API/C/WKContextConfigurationRef.h:
  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp: Added.

(WKWebsiteDataStoreConfigurationGetTypeID):
(WKWebsiteDataStoreConfigurationCreate):
(WKWebsiteDataStoreConfigurationCopyApplicationCacheDirectory):
(WKWebsiteDataStoreConfigurationSetApplicationCacheDirectory):
(WKWebsiteDataStoreConfigurationCopyNetworkCacheDirectory):
(WKWebsiteDataStoreConfigurationSetNetworkCacheDirectory):
(WKWebsiteDataStoreConfigurationCopyIndexedDBDatabaseDirectory):
(WKWebsiteDataStoreConfigurationSetIndexedDBDatabaseDirectory):
(WKWebsiteDataStoreConfigurationCopyLocalStorageDirectory):
(WKWebsiteDataStoreConfigurationSetLocalStorageDirectory):
(WKWebsiteDataStoreConfigurationCopyWebSQLDatabaseDirectory):
(WKWebsiteDataStoreConfigurationSetWebSQLDatabaseDirectory):
(WKWebsiteDataStoreConfigurationCopyMediaKeysStorageDirectory):
(WKWebsiteDataStoreConfigurationSetMediaKeysStorageDirectory):
(WKWebsiteDataStoreConfigurationCopyResourceLoadStatisticsDirectory):
(WKWebsiteDataStoreConfigurationSetResourceLoadStatisticsDirectory):

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h: Added.
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreCreateWithConfiguration):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::updateProxySettings):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::generateContextConfiguration const):
(WTR::TestController::websiteDataStore):
(WTR::TestController::generatePageConfiguration):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::platformAdjustContext):
(WTR::TestController::clearServiceWorkerRegistrations):
(WTR::TestController::clearDOMCache):
(WTR::TestController::clearDOMCaches):
(WTR::TestController::ClearIndexedDatabases):
(WTR::TestController::hasDOMCache):
(WTR::TestController::domCacheSize):
(WTR::TestController::setStatisticsDebugMode):
(WTR::TestController::setStatisticsPrevalentResourceForDebugMode):
(WTR::TestController::setStatisticsLastSeen):
(WTR::TestController::setStatisticsPrevalentResource):
(WTR::TestController::setStatisticsVeryPrevalentResource):
(WTR::TestController::dumpResourceLoadStatistics):
(WTR::TestController::isStatisticsPrevalentResource):
(WTR::TestController::isStatisticsVeryPrevalentResource):
(WTR::TestController::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestController::setStatisticsHasHadUserInteraction):
(WTR::TestController::isStatisticsHasHadUserInteraction):
(WTR::TestController::setStatisticsGrandfathered):
(WTR::TestController::isStatisticsGrandfathered):
(WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin):
(WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin):
(WTR::TestController::setStatisticsSubresourceUniqueRedirectTo):
(WTR::TestController::setStatisticsSubresourceUniqueRedirectFrom):
(WTR::TestController::setStatisticsTopFrameUniqueRedirectTo):
(WTR::TestController::setStatisticsTopFrameUniqueRedirectFrom):
(WTR::TestController::setStatisticsCrossSiteLoadWithLinkDecoration):
(WTR::TestController::setStatisticsTimeToLiveUserInteraction):
(WTR::TestController::statisticsProcessStatisticsAndDataRecords):
(WTR::TestController::statisticsUpdateCookieBlocking):
(WTR::TestController::statisticsSubmitTelemetry):
(WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned):
(WTR::TestController::setStatisticsIsRunningTest):
(WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
(WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured):
(WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval):
(WTR::TestController::setStatisticsGrandfatheringTime):
(WTR::TestController::setStatisticsMaxStatisticsEntries):
(WTR::TestController::setStatisticsPruneEntriesDownTo):
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestController::statisticsDeleteCookiesForHost):
(WTR::TestController::isStatisticsHasLocalStorage):
(WTR::TestController::setStatisticsCacheMaxAgeCap):
(WTR::TestController::statisticsResetToConsistentState):
(WTR::TestController::setWebAuthenticationMockConfiguration):
(WTR::TestController::clearAdClickAttributionsThroughWebsiteDataRemoval):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):

LayoutTests:

Rebase some accessibility tests that were printing the SessionID since we're using SessionID 2 for testing now.

  • accessibility/mac/document-attributes-expected.txt:
  • platform/mac/accessibility/parent-delete-expected.txt:
8:01 AM Changeset in webkit [249613] by mark.lam@apple.com
  • 7 edits in trunk/Source

performJITMemcpy() source buffer should not be in the Gigacage.
https://bugs.webkit.org/show_bug.cgi?id=201577
<rdar://problem/55142606>

Reviewed by Michael Saboff.

Source/bmalloc:

  1. Add the Gigacage start address and totalSize to the Config.
  2. Add a contains() function that uses the start address and totalSize to check if a given pointer is in the Gigacage's address range.
  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::verifyGigacageIsEnabled):

  • bmalloc/Gigacage.h:

(Gigacage::contains):

Source/JavaScriptCore:

Add a RELEASE_ASSERT in performJITMemcpy() to ensure that the passed in source
buffer is not in the Gigacage.

  • jit/ExecutableAllocator.h:

(JSC::performJITMemcpy):

Source/WTF:

  • wtf/Gigacage.h:

(Gigacage::contains):

7:53 AM Changeset in webkit [249612] by mark.lam@apple.com
  • 6 edits in trunk

The jsc shell should allow disabling of the Gigacage for testing purposes.
https://bugs.webkit.org/show_bug.cgi?id=201579

Reviewed by Michael Saboff.

JSTests:

Unskip the tests now.

  • stress/disable-gigacage-arrays.js:
  • stress/disable-gigacage-strings.js:
  • stress/disable-gigacage-typed-arrays.js:

Source/JavaScriptCore:

Check for the same GIGACAGE_ENABLED env var that is checked by Gigacage code. If
this env var is present and it has a falsy value, then do not
forbidDisablingPrimitiveGigacage() in the jsc shell.

  • jsc.cpp:

(jscmain):

3:13 AM Changeset in webkit [249611] by mark.lam@apple.com
  • 4 edits in trunk/JSTests

Gardening: temporarily skipping these tests until the fix can be reviewed and landed.

Not reviewed.

See https://bugs.webkit.org/show_bug.cgi?id=201579 for the fix.

  • stress/disable-gigacage-arrays.js:
  • stress/disable-gigacage-strings.js:
  • stress/disable-gigacage-typed-arrays.js:
2:50 AM Changeset in webkit [249610] by mark.lam@apple.com
  • 2 edits in trunk/JSTests

Gardening: speculative test fix to green bots [attempt #2].
https://bugs.webkit.org/show_bug.cgi?id=201529
<rdar://problem/53935772>

Not reviewed.

  • stress/test-out-of-memory.js:

Sep 6, 2019:

10:59 PM Changeset in webkit [249609] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

[FTW] Minor cleanups to avoid crashes during web browsing
https://bugs.webkit.org/show_bug.cgi?id=201572

Reviewed by Alexey Proskuryakov.

This patch addresses a few crashes seen when doing general web browsing using
the FTW build of WebKit:

  1. ImageBuffer::sinkIntoImage was attempting to use a render target after WTFMoving it elsewhere.
  2. ImageBuffer::copyNativeImage was not properly checking the type of the render target to make sure it was suitable for Bitmap operations.
  3. BackingStoreBackendDirect2DImpl::scroll would crash if the scroll offset was outside the bounds of the current view. In that case, it would attempt to allocate a zero-size texture, which triggered a crash.
  • platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:

(WebCore::BackingStoreBackendDirect2DImpl::scroll):

  • platform/graphics/win/ImageBufferDirect2D.cpp:

(WebCore::ImageBuffer::sinkIntoImage):
(WebCore::ImageBuffer::copyNativeImage const):

10:42 PM Changeset in webkit [249608] by mark.lam@apple.com
  • 11 edits in trunk/Source

Harden protection of the Gigacage Config parameters.
https://bugs.webkit.org/show_bug.cgi?id=201570
<rdar://problem/55134229>

Reviewed by Saam Barati.

Source/bmalloc:

  1. Rename protectGigacageBasePtrs() and unprotectGigacageBasePtrs() to freezeGigacageConfig() and unfreezeGigacageConfig() respectively.

Also move the alignment check in protectGigacageBasePtrs() into ensureGigacage().
There's no need to check it more than once.

  1. Introduce permanentlyFreezeGigacageConfig() which permanently makes the Config ReadOnly. Once invoked, the Config cannot be made writable again.

This is made possible by using vm_protect with a true set_maximum argument.
We also add a g_gigacageConfig.isPermanentlyFrozen flag that we assert.
Note: this permanence is only true for OS(DARWIN) since vm_protect is Mach API.

  1. Rename disableDisablingPrimitiveGigacageIfShouldBeEnabled() to forbidDisablingPrimitiveGigacage() because "disablingDisabling" is a tongue twister.

Also, we don't want to make it conditional on "IfShouldBeEnabled". We want
forbidDisablingPrimitiveGigacage() to be irreversible. It is up to the client
to ensure that the Gigacage is already initialized (if possible) before
invoking forbidDisablingPrimitiveGigacage(). Conceptually, the forbidding
isn't about guaranteeing that the Gigacage is enabled. It only takes away the
option to disable it.

That said, forbidDisablingPrimitiveGigacage() is only invoked by clients that
care about keeping the Gigacage enabled. So, it does a sanity check (with an
assertion) that if !GIGACAGE_ALLOCATION_CAN_FAIL, then the Gigacage should be
have been initialized and enabled before invoking it.

We also make sure that forbidDisablingPrimitiveGigacage() calls
permanentlyFreezeGigacageConfig() unconditionally. It is safe to call it more
than once. This guarantees that the Config is permanently frozen after this,
even if a bug should inadvertantly set the
g_gigacageConfig.disablingPrimitiveGigacageIsForbidden flag before
forbidDisablingPrimitiveGigacage() is invoked.

  1. Assert that ensureGigacage() is only called once.
  1. Assert that shouldBeEnabled() is only called once. Also moved its cached result into the Config so that it can be frozen.
  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::freezeGigacageConfig):
(Gigacage::bmalloc::unfreezeGigacageConfig):
(Gigacage::bmalloc::permanentlyFreezeGigacageConfig):
(Gigacage::bmalloc::UnfreezeGigacageConfigScope::UnfreezeGigacageConfigScope):
(Gigacage::bmalloc::UnfreezeGigacageConfigScope::~UnfreezeGigacageConfigScope):
(Gigacage::ensureGigacage):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::verifyGigacageIsEnabled):
(Gigacage::forbidDisablingPrimitiveGigacage):
(Gigacage::isDisablingPrimitiveGigacageForbidden):
(Gigacage::shouldBeEnabled):
(Gigacage::bmalloc::protectGigacageBasePtrs): Deleted.
(Gigacage::bmalloc::unprotectGigacageBasePtrs): Deleted.
(Gigacage::bmalloc::UnprotectGigacageBasePtrsScope::UnprotectGigacageBasePtrsScope): Deleted.
(Gigacage::bmalloc::UnprotectGigacageBasePtrsScope::~UnprotectGigacageBasePtrsScope): Deleted.
(Gigacage::primitiveGigacageDisabled): Deleted.
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): Deleted.
(Gigacage::isDisablingPrimitiveGigacageDisabled): Deleted.

  • bmalloc/Gigacage.h:

(Gigacage::isPrimitiveGigacagePermanentlyEnabled):
(Gigacage::canPrimitiveGigacageBeDisabled):
(Gigacage::forbidDisablingPrimitiveGigacage):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): Deleted.

Source/JavaScriptCore:

Just renaming some function names here.

  • assembler/testmasm.cpp:

(JSC::testCagePreservesPACFailureBit):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cageConditionally):

  • jsc.cpp:

(jscmain):

Source/WebKit:

Just renaming a function name here.

  • WebProcess/WebProcess.cpp:

Source/WTF:

Just renaming some function names here.

  • wtf/Gigacage.h:

(Gigacage::forbidDisablingPrimitiveGigacage):
(Gigacage::isDisablingPrimitiveGigacageForbidden):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): Deleted.
(Gigacage::isDisablingPrimitiveGigacageDisabled): Deleted.

9:19 PM Changeset in webkit [249607] by Devin Rousso
  • 5 edits in trunk

Web Inspector: CSS Formatter: the closing } of nested @media aren't indented
https://bugs.webkit.org/show_bug.cgi?id=201560

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Workers/Formatter/FormatterContentBuilder.js:

(FormatterContentBuilder.prototype.removeLastNewline):
It's possible that there were multiple newlines in a row, so we should update _startOfLine
to be true if the previous line was empty.

LayoutTests:

  • inspector/formatting/resources/css-tests/media-query.css:
  • inspector/formatting/resources/css-tests/media-query-expected.css:
8:19 PM Changeset in webkit [249606] by bshafiei@apple.com
  • 1 copy in tags/Safari-608.2.11.1.3

Tag Safari-608.2.11.1.3.

7:58 PM Changeset in webkit [249605] by Wenson Hsieh
  • 16 edits
    5 adds in trunk

Incorrect selection rect revealed after pasting images in a contenteditable element
https://bugs.webkit.org/show_bug.cgi?id=201549
<rdar://problem/50956429>

Reviewed by Simon Fraser.

Source/WebCore:

Editor::replaceSelectionWithFragment currently scrolls to reveal the selection after inserting the given
DocumentFragment. However, this scrolling occurs before any inserted images have loaded yet, which causes the
wrong caret rect to be revealed, since all image elements inserted during paste will be empty.

To fix this, we defer revealing the selection after inserting the fragment until after all images that have
been inserted are done loading. While waiting for images to load, if any layers which may be scrolled as a
result of revealing the selection are scrolled, we additionally cancel the deferred selection reveal. See
comments below for more detail.

Tests: editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll.html

editing/pasteboard/reveal-selection-after-pasting-images.html
PasteImage.RevealSelectionAfterPastingImage

  • editing/Editing.cpp:

(WebCore::visibleImageElementsInRangeWithNonLoadedImages):

Add a new helper to iterate through a range and collect all image elements in that range, that contain cached
images that have not finished loading yet.

  • editing/Editing.h:
  • editing/Editor.cpp:

(WebCore::Editor::replaceSelectionWithFragment):

Instead of always immediately revealing the selection after applying the ReplaceSelectionCommand, collect the
image elements that were just inserted, and avoid immediately revealing the selection if any of these images
have non-null cached images, but are not loaded yet. Instead, hold on to these images in a set, remove them once
they finish loading using the new method below, and once all images are removed, reveal the selection.

(WebCore::Editor::revealSelectionIfNeededAfterLoadingImageForElement):
(WebCore::Editor::renderLayerDidScroll):

Called whenever a scrollable RenderLayer is scrolled (or in the case of FrameView, the root layer). In the case
where Editor is waiting to reveal the selection, we check to see if the scrolled layer is an ancestor of the
layer enclosing the start of the selection.

(WebCore::Editor::respondToChangedSelection):

If the selection changes between pasting and waiting for pasted images to load, just cancel waiting to reveal
the selection after pasting.

  • editing/Editor.h:
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::insertedContentRange const):

Add a helper method to grab the Range of content inserted after applying the command.

  • editing/ReplaceSelectionCommand.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollPositionChanged):

  • page/FrameView.h:
  • page/Page.cpp:

(WebCore::Page::didFinishLoadingImageForElement):

Notify Editor after an image finishes loading.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):

Source/WebKit:

Tweak some existing logic to use the new visibleImageElementsInRangeWithNonLoadedImages helper function. See
WebCore for more details.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didConcludeEditDrag):

Tools:

Add an API test to exercise the scenario where we scroll to reveal the selection after pasting an image that was
directly written to the pasteboard.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:

LayoutTests:

Add a couple of new layout tests.

  • editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll-expected.txt: Added.
  • editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll.html: Added.

This test verifies that we don't try to scroll to reveal the caret after pasting, if the scroll position was
changed before the images finished loading.

  • editing/pasteboard/reveal-selection-after-pasting-images-expected.txt: Added.
  • editing/pasteboard/reveal-selection-after-pasting-images.html: Added.
  • platform/ios/editing/pasteboard/reveal-selection-after-pasting-images-expected.txt: Added.

This test verifies that we reveal the caret after loading multiple pasted images in a selection, and dispatch a
scroll event in the process.

7:39 PM Changeset in webkit [249604] by Brent Fulgham
  • 5 edits in trunk/Source/WebCore

PathDirect2D Cleanups
https://bugs.webkit.org/show_bug.cgi?id=201534

Reviewed by Fujii Hironori.

  1. Add a COMPtr<> move operator.
  2. Reduce copying ID2D1Geometry objects.
  3. Protect against using the ID2D1PathGeometry after the ID2D1GeometrySink's Close operation is used.
  4. Add a debug-only 'refCount' function to COMPtr to help track down memory errors.
  • platform/graphics/Path.h:

(WebCore::Path::activePath const): Deleted.

  • platform/graphics/win/Direct2DOperations.cpp:

(WebCore::Direct2D::fillPath):
(WebCore::Direct2D::drawPath):

  • platform/graphics/win/PathDirect2D.cpp:
  • platform/win/COMPtr.h:

(COMPtr::COMPtr):
(=):
(refCount):

6:53 PM Changeset in webkit [249603] by Chris Dumez
  • 11 edits
    1 copy
    1 add in trunk/Source

Move the ResourceLoadObserver logic to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=201517

Reviewed by Brent Fulgham.

Move the ResourceLoadObserver logic to WebKit2 since it is not used by WebKit1. This allows us to simplify
code.

In a follow-up patch, I will simplify the code even further by leveraging the fact that a WebContent process
is always associated with a single WebsiteDataStore / sessionID:

  • No need for a HashMap of sessionIDs
  • No need to even allocate the ResourceLoadObserver if the WebProcess is associated with an ephemeral session.

Source/WebCore:

  • dom/Document.h:
  • loader/ResourceLoadObserver.cpp:

(WebCore::sharedObserver):
(WebCore::ResourceLoadObserver::setShared):
(WebCore::ResourceLoadObserver::shared):

  • loader/ResourceLoadObserver.h:

(WebCore::ResourceLoadObserver::~ResourceLoadObserver):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):
(WebCore::ResourceLoadObserver::statisticsForURL):
(WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
(WebCore::ResourceLoadObserver::clearState):
(WebCore::ResourceLoadObserver::setShouldLogUserInteraction):

  • page/DeprecatedGlobalSettings.h:

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp: Copied from Source/WebCore/loader/ResourceLoadObserver.cpp.

(WebKit::is3xxRedirect):
(WebKit::WebResourceLoadObserver::WebResourceLoadObserver):
(WebKit::WebResourceLoadObserver::shouldLog const):
(WebKit::WebResourceLoadObserver::requestStorageAccessUnderOpener):
(WebKit::WebResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebKit::WebResourceLoadObserver::scheduleNotificationIfNeeded):
(WebKit::WebResourceLoadObserver::updateCentralStatisticsStore):
(WebKit::WebResourceLoadObserver::statisticsForURL):
(WebKit::WebResourceLoadObserver::takeStatistics):
(WebKit::WebResourceLoadObserver::clearState):
(WebKit::WebResourceLoadObserver::nonNullOwnerURL const):
(WebKit::WebResourceLoadObserver::logFontLoad):
(WebKit::WebResourceLoadObserver::logCanvasRead):
(WebKit::WebResourceLoadObserver::logCanvasWriteOrMeasure):
(WebKit::WebResourceLoadObserver::logNavigatorAPIAccessed):
(WebKit::WebResourceLoadObserver::logScreenAPIAccessed):
(WebKit::WebResourceLoadObserver::logSubresourceLoading):
(WebKit::WebResourceLoadObserver::logWebSocketLoading):
(WebKit::WebResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.h: Added.
  • WebProcess/WebProcess.cpp:
5:42 PM Changeset in webkit [249602] by Matt Lewis
  • 4 edits
    2 deletes in trunk/Tools

Unreviewed, rolling out r249582.

This caused results.html fail to be created on internal
testers.

Reverted changeset:

"run-webkit-test: Allow results to be uploaded without scm
checkout"
https://bugs.webkit.org/show_bug.cgi?id=200787
https://trac.webkit.org/changeset/249582

5:24 PM Changeset in webkit [249601] by Justin Fan
  • 117 edits
    8 moves in trunk

[WebGPU] Update several interface and enum names to match spec
https://bugs.webkit.org/show_bug.cgi?id=201564

Reviewed by Dean Jackson.

Rename GPUShaderStageBit -> GPUShaderStage.
Rename GPUColorWriteBits -> GPUColorWrite.
Rename TRANSFER_SRC/DST -> COPY_SRC/DST.
Source/WebCore:

Rename GPUPipelineStageDescriptor -> GPUProgrammableStageDescriptor.

Existing tests trivially updated to match.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webgpu/GPUBindGroupLayoutBinding.h:
  • Modules/webgpu/GPUBufferUsage.idl:
  • Modules/webgpu/GPUColorStateDescriptor.idl:
  • Modules/webgpu/GPUColorWrite.idl: Renamed from Source/WebCore/Modules/webgpu/GPUColorWriteBits.idl.
  • Modules/webgpu/GPUShaderStage.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.h.
  • Modules/webgpu/GPUShaderStage.idl: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.idl.
  • Modules/webgpu/GPUTextureUsage.idl:
  • Modules/webgpu/WebGPUComputePipelineDescriptor.cpp:

(WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):

  • Modules/webgpu/WebGPUComputePipelineDescriptor.h:
  • Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
  • Modules/webgpu/WebGPUDevice.cpp:
  • Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.cpp.

(WebCore::WebGPUProgrammableStageDescriptor::tryCreateGPUProgrammableStageDescriptor const):

  • Modules/webgpu/WebGPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h.
  • Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl.
  • Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:

(WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):

  • Modules/webgpu/WebGPURenderPipelineDescriptor.h:
  • Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • platform/graphics/gpu/GPUBuffer.h:

(WebCore::GPUBuffer::isCopySource const):
(WebCore::GPUBuffer::isCopyDestination const):
(WebCore::GPUBuffer::isTransferSource const): Deleted.
(WebCore::GPUBuffer::isTransferDestination const): Deleted.

  • platform/graphics/gpu/GPUBufferUsage.h:
  • platform/graphics/gpu/GPUColorStateDescriptor.h:
  • platform/graphics/gpu/GPUColorWrite.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUColorWriteBits.h.
  • platform/graphics/gpu/GPUComputePipelineDescriptor.h:

(WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):

  • platform/graphics/gpu/GPUPipelineDescriptorBase.h:
  • platform/graphics/gpu/GPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUPipelineStageDescriptor.h.

(WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):

  • platform/graphics/gpu/GPURenderPipelineDescriptor.h:

(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):

  • platform/graphics/gpu/GPUTexture.h:

(WebCore::GPUTexture::isCopySource const):
(WebCore::GPUTexture::isCopyDestination const):
(WebCore::GPUTexture::isReadOnly const):
(WebCore::GPUTexture::isTransferSource const): Deleted.
(WebCore::GPUTexture::isTransferDestination const): Deleted.

  • platform/graphics/gpu/GPUTextureUsage.h:
  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:

(WebCore::GPUBindGroupLayout::tryCreate):

  • platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:

(WebCore::GPUBindGroup::tryCreate):

  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
  • platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:

(WebCore::GPUCommandBuffer::copyBufferToBuffer):
(WebCore::GPUCommandBuffer::copyBufferToTexture):
(WebCore::GPUCommandBuffer::copyTextureToBuffer):
(WebCore::GPUCommandBuffer::copyTextureToTexture):

  • platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:

(WebCore::trySetFunctions):

  • platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp:

(WebCore::convertShaderStageFlags):

  • platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:

(WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
(WebCore::trySetFunctions):

  • platform/graphics/gpu/cocoa/GPUTextureMetal.mm:

(WebCore::mtlTextureUsageForGPUTextureUsageFlags):

LayoutTests:

  • webgpu/bind-groups.html:
  • webgpu/blend-color-triangle-strip.html:
  • webgpu/blit-commands.html:
  • webgpu/buffer-errors.html:
  • webgpu/color-write-mask-triangle-strip.html:
  • webgpu/pipeline-layouts.html:
  • webgpu/render-pipelines.html:
  • webgpu/texture-triangle-strip.html:
  • webgpu/textures-textureviews.html:
  • webgpu/whlsl/arbitrary-vertex-attribute-locations.html:
  • webgpu/whlsl/buffer-fragment.html:
  • webgpu/whlsl/buffer-length.html:
  • webgpu/whlsl/buffer-vertex.html:
  • webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables.html:
  • webgpu/whlsl/compute.html:
  • webgpu/whlsl/dereference-pointer-should-type-check.html:
  • webgpu/whlsl/device-proper-type-checker.html:
  • webgpu/whlsl/do-while-loop-break.html:
  • webgpu/whlsl/do-while-loop-continue.html:
  • webgpu/whlsl/do-while-loop.html:
  • webgpu/whlsl/dont-crash-parsing-enum.html:
  • webgpu/whlsl/dot-expressions.html:
  • webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors.html:
  • webgpu/whlsl/ensure-proper-variable-lifetime-2.html:
  • webgpu/whlsl/ensure-proper-variable-lifetime-3.html:
  • webgpu/whlsl/ensure-proper-variable-lifetime.html:
  • webgpu/whlsl/huge-array.html:
  • webgpu/whlsl/js/test-harness.js:

(Harness.prototype.async.callTypedFunction):
(Harness.prototype._clearResults):
(Harness.prototype._setUpArguments):

  • webgpu/whlsl/loops-break.html:
  • webgpu/whlsl/loops-continue.html:
  • webgpu/whlsl/loops.html:
  • webgpu/whlsl/make-array-reference.html:
  • webgpu/whlsl/matrix-2.html:
  • webgpu/whlsl/matrix-alignment.html:
  • webgpu/whlsl/matrix-memory-layout.html:
  • webgpu/whlsl/matrix.html:
  • webgpu/whlsl/nested-dot-expression-rvalue.html:
  • webgpu/whlsl/nested-loop.html:
  • webgpu/whlsl/oob-access.html:
  • webgpu/whlsl/read-modify-write-high-zombies.html:
  • webgpu/whlsl/return-local-variable.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules.html:
  • webgpu/whlsl/simple-arrays.html:
  • webgpu/whlsl/store-to-property-updates-properly.html:
  • webgpu/whlsl/textures-load.html:
  • webgpu/whlsl/textures-sample-bias.html:
  • webgpu/whlsl/textures-sample-grad.html:
  • webgpu/whlsl/textures-sample-level.html:
  • webgpu/whlsl/textures-sample.html:
  • webgpu/whlsl/two-dimensional-array.html:
  • webgpu/whlsl/while-loop-break.html:
  • webgpu/whlsl/while-loop-continue.html:
  • webgpu/whlsl/whlsl.html:
  • webgpu/whlsl/zero-initialize-values-2.html:
  • webgpu/whlsl/zero-initialize-values.html:
5:08 PM Changeset in webkit [249600] by jiewen_tan@apple.com
  • 4 edits in trunk/Source/WebKit

[WebAuthn] Make WebAuthn default off and let clients turn it on at will
https://bugs.webkit.org/show_bug.cgi?id=201439
<rdar://problem/54998154>

Reviewed by Youenn Fablet.

This patch makes WebAuthn default off such that clients that have the right entitlements
could turn it on and we don't risk at turning on a Web API that does nothing by default.

This patch doesn't add any SPI to turn the feature on as it is currently doable via

  • [WKPreferencesPrivate _setEnabled:forExperimentalFeature:].
  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultWebAuthenticationEnabled): Deleted.

  • Shared/WebPreferencesDefaultValues.h:
4:09 PM Changeset in webkit [249599] by mark.lam@apple.com
  • 2 edits in trunk/JSTests

Gardening: speculative test fix to green bots.
https://bugs.webkit.org/show_bug.cgi?id=201529
<rdar://problem/53935772>

Not reviewed.

  • stress/test-out-of-memory.js:
3:59 PM Changeset in webkit [249598] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Status bubble should only display important messages in pop-over - part 2
https://bugs.webkit.org/show_bug.cgi?id=201557

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble): Add few more strings to STEPS_TO_HIDE.

3:49 PM Changeset in webkit [249597] by Ross Kirsling
  • 8 edits in trunk

Math.round() produces wrong result for value prior to 0.5
https://bugs.webkit.org/show_bug.cgi?id=185115

Reviewed by Saam Barati.

JSTests:

  • stress/math-round-basics.js:

Add positive/negative test cases.

  • test262/expectations.yaml:

Mark test passing.

Source/JavaScriptCore:

Our Math.round implementation goes in the wrong direction for double values like 0.49999999999999994.
This requires just a subtle adjustment for three of our four versions; only baseline JIT needed a full rewrite.

Specifically:

  • While 0.49999999999999994 is representable, 1 - 0.49999999999999994 is not (it turns into 0.5), so taking the difference between ceil(value) and value` is problematic.
  • The baseline implementation was doing floor(x + 0.5) for positive doubles and slowpathing negative ones (by falling back to jsRound). This patch gives baseline a legitimate implementation too.
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithRounding):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArithRound):

  • jit/ThunkGenerators.cpp:

(JSC::roundThunkGenerator):

  • runtime/MathCommon.cpp:
3:34 PM Changeset in webkit [249596] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: CSS Formatter: links to CSS resources don't map to the right line after pretty printing if the line is after a multiline comment
https://bugs.webkit.org/show_bug.cgi?id=201559

Reviewed by Joseph Pecoraro.

Newlines in multiline comments weren't added as line endings, so they weren't considered
when a source code location updated after pretty printing.

  • UserInterface/Workers/Formatter/CSSFormatter.js:

(CSSFormatter.prototype._format):

3:23 PM Changeset in webkit [249595] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
https://bugs.webkit.org/show_bug.cgi?id=201550

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Mark the test as flaky to speed up EWS while we investigate the root cause.
3:15 PM Changeset in webkit [249594] by commit-queue@webkit.org
  • 8 edits
    2 adds in trunk

REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction
https://bugs.webkit.org/show_bug.cgi?id=201402

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-06
Reviewed by Youenn Fablet and Daniel Bates.

Source/WebCore:

Add the static functions resolvePromises() and rejectPromises(). These
functions take an lvalue reference to a Vector of promises. Inside them,
the lvalue reference argument are exchanged with an empty Vector of
promises then the promises are processed. This clears m_decodingPromises
and fixes the leak.

Add an internal API which returns the count of the pending promises of
an HTMLImageElement. This internal API will be used in the attached test.

Test: fast/images/decode-resolve-reject-no-leak.html

  • html/HTMLImageElement.h:

(WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const):

  • loader/ImageLoader.cpp:

(WebCore::resolvePromises):
ImageLoader::decode() calls BitmapImage::decode() and moves m_decodingPromises
in capture. When decoding finishes, this function is called to resolve the
promises. But ImageLoader might get deleted before the image decoding
finishes. So this function has to be static.

(WebCore::rejectPromises):
(WebCore::ImageLoader::resolveDecodePromises):
(WebCore::ImageLoader::rejectDecodePromises):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::decode):
(WebCore::resolveDecodePromises): Deleted.
(WebCore::rejectDecodePromises): Deleted.

  • loader/ImageLoader.h:

(WebCore::ImageLoader::pendingDecodePromisesCountForTesting const):

  • testing/Internals.cpp:

(WebCore::Internals::imagePendingDecodePromisesCountForTesting):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • fast/images/decode-resolve-reject-no-leak-expected.txt: Added.
  • fast/images/decode-resolve-reject-no-leak.html: Added.
2:57 PM Changeset in webkit [249593] by commit-queue@webkit.org
  • 3 edits
    4 adds in trunk

Prefer null namespace 'href' over 'xlink:href' on SVG elements
https://bugs.webkit.org/show_bug.cgi?id=195802

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-06
Reviewed by Youenn Fablet.

Source/WebCore:

-- When the attribute "href" is set, its value is always reflected in

SVGURIReference::m_href.

-- When the attribute "href" is removed, the value of the attribute

"xlink:href" is always reflected in SVGURIReference::m_href.

-- When the "xlink:href" is set, its value is reflected in

SVGURIReference::m_href only if the attribute "href" is not set.

Tests: svg/custom/href-xlink-href-gradient-element-expected.svg

svg/custom/href-xlink-href-gradient-element.svg
svg/custom/href-xlink-href-use-element-expected.svg
svg/custom/href-xlink-href-use-element.svg

  • svg/SVGURIReference.cpp:

(WebCore::SVGURIReference::parseAttribute):

LayoutTests:

  • svg/custom/href-xlink-href-gradient-element-expected.svg: Added.
  • svg/custom/href-xlink-href-gradient-element.svg: Added.
  • svg/custom/href-xlink-href-use-element-expected.svg: Added.
  • svg/custom/href-xlink-href-use-element.svg: Added.
2:19 PM Changeset in webkit [249592] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Better position for Sources tab when enabling the experimental setting
https://bugs.webkit.org/show_bug.cgi?id=201539

Reviewed by Devin Rousso.

  • UserInterface/Views/SettingsTabContentView.js:

Place the Sources tab where the Debugger tab was.

2:08 PM Changeset in webkit [249591] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Set computed row width.
https://bugs.webkit.org/show_bug.cgi?id=201533
<rdar://problem/55098828>

Reviewed by Antti Koivisto.

Decouple cell box layout/display box setup and set the computed row width.

  • layout/Verification.cpp:

(WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layout):

1:51 PM Changeset in webkit [249590] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] A formatting context root is always a containing block for relative: static boxes.
https://bugs.webkit.org/show_bug.cgi?id=201554
<rdar://problem/55123295>

Reviewed by Antti Koivisto.

"For other elements, if the element's position is 'relative' or 'static', the containing block is formed by the content
edge of the nearest ancestor box that is a block container or which establishes a formatting context."

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::containingBlock const):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

1:42 PM Changeset in webkit [249589] by achristensen@apple.com
  • 26 edits
    2 adds
    1 delete in trunk

Deprecate all WKCookieManagerRef functions
https://bugs.webkit.org/show_bug.cgi?id=201473

Reviewed by Chris Dumez.

Source/WebKit:

Their use was removed in rdar://problem/55039275
Created replacement C API that more closely resembles the public ObjC API for WebKitTestRunner.

  • Shared/API/c/WKBase.h:
  • Sources.txt:
  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::deleteAllCookies):
(API::HTTPCookieStore::setHTTPCookieAcceptPolicy):
(API::HTTPCookieStore::deleteCookiesInDefaultUIProcessCookieStore):
(API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore):

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextSetStorageAccessAPIEnabled):

  • UIProcess/API/C/WKContext.h:
  • UIProcess/API/C/WKCookieManager.cpp:

(WKCookieManagerGetTypeID):
(WKCookieManagerSetClient):
(WKCookieManagerGetHostnamesWithCookies):
(WKCookieManagerDeleteCookiesForHostname):
(WKCookieManagerDeleteAllCookies):
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
(WKCookieManagerSetHTTPCookieAcceptPolicy):
(WKCookieManagerGetHTTPCookieAcceptPolicy):
(WKCookieManagerSetStorageAccessAPIEnabled):
(WKCookieManagerStartObservingCookieChanges):
(WKCookieManagerStopObservingCookieChanges):

  • UIProcess/API/C/WKCookieManager.h:
  • UIProcess/API/C/WKHTTPCookieStoreRef.cpp: Added.

(WKHTTPCookieStoreGetTypeID):
(WKHTTPCookieStoreDeleteAllCookies):
(WKHTTPCookieStoreSetHTTPCookieAcceptPolicy):

  • UIProcess/API/C/WKHTTPCookieStoreRef.h: Added.
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreGetHTTPCookieStore):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:

(API::HTTPCookieStore::deleteCookiesInDefaultUIProcessCookieStore):
(API::toNSHTTPCookieAcceptPolicy):
(API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore):

  • UIProcess/WebCookieManagerProxy.cpp:

(WebKit::WebCookieManagerProxy::setStorageAccessAPIEnabled): Deleted.

  • UIProcess/WebCookieManagerProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Adopt replacement C API in WebKitTestRunner.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/CookieManager.cpp: Removed, because the functions it tests were removed.
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::invoke):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):

1:23 PM Changeset in webkit [249588] by mark.lam@apple.com
  • 4 edits in trunk/Source/bmalloc

Use FailureAction everywhere in bmalloc instead of a crashOnFailure boolean.
https://bugs.webkit.org/show_bug.cgi?id=201553

Reviewed by Yusuke Suzuki.

  • bmalloc/Cache.cpp:

(bmalloc::Cache::tryAllocateSlowCaseNullCache):
(bmalloc::Cache::allocateSlowCaseNullCache):
(bmalloc::Cache::tryReallocateSlowCaseNullCache):
(bmalloc::Cache::reallocateSlowCaseNullCache):

  • bmalloc/DebugHeap.cpp:

(bmalloc::DebugHeap::malloc):
(bmalloc::DebugHeap::memalign):
(bmalloc::DebugHeap::realloc):

  • bmalloc/DebugHeap.h:
1:08 PM Changeset in webkit [249587] by mark.lam@apple.com
  • 1 edit
    1 move in trunk/JSTests

Move web-assembly-constructors-should-not-override-global-object-property.js below JSTests/wasm/stress.
https://bugs.webkit.org/show_bug.cgi?id=201551

Reviewed by Tadeu Zagallo.

Ports that don't support WASM will always fail this test if it stays in JSTests/stress.

  • stress/web-assembly-constructors-should-not-override-global-object-property.js: Removed.
  • wasm/stress/web-assembly-constructors-should-not-override-global-object-property.js: Copied from JSTests/stress/web-assembly-constructors-should-not-override-global-object-property.js.
12:11 PM Changeset in webkit [249586] by Joseph Pecoraro
  • 5 edits
    2 copies
    2 moves
    17 adds
    4 deletes in trunk

Tail Deleted Frames shown in Web Inspector are sometimes incorrect (Shadow Chicken)
https://bugs.webkit.org/show_bug.cgi?id=201366

Reviewed by Saam Barati.

Source/JavaScriptCore:

It is possible for the log buffer to be full right as someone is trying to
log a function prologue. In such a case the machine stack has already been
updated to include the new JavaScript call frame, but the prologue packet
cannot be included in the update because the log is full. This would mean
that the update fails to rationalize the machine stack with the shadow
log / stack. Namely, the current JavaScript call frame is unable to
find a matching prologue (the one we are holding to include after the update)
and inserts a questionable value into the stack; and in the process
missing and removing real potential tail calls.

For example:

"use strict";
function third() { return 1; }
function second() { return third(); }
function first() { return second(); }
function start() { return first(); }

If the the log fills up just as we are entering b then we may have a list
full log of packets looking like:

Shadow Log:

...
{ prologue-packet: entering start ... }
{ prologue-packet: entering first ... }
{ tail-packet: leaving first with a tail call }

Incoming Packet:

{ prologue-packet: entering second ... }

Current JS Stack:

second
start

Since the Current JavaScript stack already has second, if we process the
log without the prologue for second then we push a confused entry on the
shadow stack and clear the log such that we eventually lose the tail-call
information for first to second.

This patch solves this issue by providing enough extra space in the log
to always process the incoming packet when that forces an update. This way
clients can continue to behave exactly as they are.

--

We also document a corner case in some circumstances where the shadow
log may currently be insufficient to know how to reconcile:

For example:

"use strict";
function third() { return 1; }
function second() { return third(); }
function first() { return second(); }
function doNothingTail() { return Math.random() }
function start() {

for (i=0;i<1000;++i) doNothingTail();
return first();

}

In this case the ShadowChicken log may be processed multiple times due
to the many calls to doNothingTail / Math.random(). When calling the
Native function no prologue packet is emitted, so it is unclear that we
temporarly go deeper and come back out on the stack, so the log appears
to have lots of doNothingTail calls reusing the same frame:

Shadow Log:

...
, [123] {callee = 0x72a21aee0, frame = 0x7ffeef897270, callerFrame = 0x7ffeef8972e0, name = start}
, [124] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [125] tail-packet:{frame = 0x7ffeef8971f0}
, [126] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [127] tail-packet:{frame = 0x7ffeef8971f0}
...
, [140] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [141] tail-packet:{frame = 0x7ffeef8971f0}
, [142] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [143] tail-packet:{frame = 0x7ffeef8971f0}
, [144] {callee = 0x72a21aeb0, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = first}
, [145] tail-packet:{frame = 0x7ffeef8971f0}
, [146] {callee = 0x72a21ae80, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = second}
...

This log would seem to be indistinguishable from real tail recursion, such as:

"use strict";
function third() { return 1; }
function second() { return third(); }
function first() { return second(); }
function doNothingTail(n) {

return n ? doNothingTail(n-1) : first();

}
function start() {

return doNothingTail(1000);

}

Likewise there are more cases where the shadow log appears to be ambiguous with determining
the appropriate parent call frame with intermediate function calls. In practice this may
not be too problematic, as this is a best effort reconstruction of tail deleted frames.
It seems likely we would only show additional frames that did in fact happen serially
between JavaScript call frames, but may not actually be the proper parent frames
heirachy in the stack.

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::Packet::dump const):
(JSC::ShadowChicken::Frame::dump const):
(JSC::ShadowChicken::dump const):
Improved debugging output. Especially for functions.

(JSC::ShadowChicken::ShadowChicken):
Make space in the log for 1 additional packet to process when we slow log.

(JSC::ShadowChicken::log):
Include this packet in our update.

(JSC::ShadowChicken::update):
Address an edge case where we can eliminate tail-deleted frames that don't make sense.

LayoutTests:

  • inspector/debugger/tail-deleted-frames-expected.txt: Removed.
  • inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt: Removed.
  • inspector/debugger/tail-deleted-frames-from-vm-entry.html: Removed.
  • inspector/debugger/tail-deleted-frames-this-value-expected.txt: Removed.
  • inspector/debugger/tail-deleted-frames-this-value.html: Removed.
  • inspector/debugger/tail-deleted-frames.html: Removed.

Remove legacy tests that are difficult to read.

  • inspector/debugger/tail-deleted-frames/resources/stack-trace-utilities.js: Added.

(TestPage.registerInitializer.window.getAsyncStackTrace):
(TestPage.registerInitializer.async.logThisObject):
(TestPage.registerInitializer.async.logScope):
(TestPage.registerInitializer.async.logCallFrame):
(TestPage.registerInitializer):

  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-intermediate-frames.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-intermediate-native-tail-deleted-calls.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-intermediate-tail-deleted-frames.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-scopes.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-this-value.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-vm-entry.js: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-frames-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-frames.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-tail-deleted-frames-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-tail-deleted-frames.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-scopes-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-scopes.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-this-value-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-this-value.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-vm-entry-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-vm-entry.html: Added.

Include modern tests that are easier to read.

  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-native-tail-deleted-calls-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-native-tail-deleted-calls.html: Added.

Include a test that is known to produce bad output, since we have reproductive steps.

  • platform/mac/TestExpectations:

Updated pathes.

12:03 PM Changeset in webkit [249585] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION(iOS 12): Keyboard dismissal leaves WKWebView viewport-fit=cover content offscreen
https://bugs.webkit.org/show_bug.cgi?id=192564

Patch by Darryl Pogue <darryl@dpogue.ca> on 2019-09-06
Reviewed by Tim Horton.

Source/WebKit:

The new keyboard height was being read into a variable after the scrollview had already been
adjusted. This worked when the keyboard was opening, because the scrollview is adjusted with
the correct value a second time when the keyboard animation has finished. However, when the
keyboard is closed, the adjustment was being made before the correct height was stored,
leading to the scrollview being positioned as if the keyboard were still open.

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _adjustForAutomaticKeyboardInfo:animated:lastAdjustment:]):

LayoutTests:

Added tests to verify scrolling properly adapts to the keyboard insets on iOS.

  • fast/scrolling/ios/scrollview-adjusts-to-keyboard-insets-expected.txt: Added.
  • fast/scrolling/ios/scrollview-adjusts-to-keyboard-insets.html: Added.
11:46 AM Changeset in webkit [249584] by timothy_horton@apple.com
  • 6 edits
    1 add in trunk

Marking up a note on iOS results in a PDF with no contents
https://bugs.webkit.org/show_bug.cgi?id=201530
<rdar://problem/53686019>

Reviewed by Andy Estes.

Source/WebKit:

  • Platform/IPC/Connection.cpp:

(IPC::Connection::Connection):
(IPC::Connection::waitForMessage):
(IPC::Connection::connectionDidClose):

  • Platform/IPC/Connection.h:

If the main thread is blocked when the Web Content process dies, and
something eventually calls waitForAndDispatchImmediately without
returning control to the main run loop, we will wait for the full timeout,
because a) the code to mark the connection invalid is dispatched
to the main thread, and b) the secondary thread that is informed of
the Web Content process dying did not yet have a "waiting for" message
to mark as interrupted (because it wasn't waiting yet).

Fix this race by adding a bit that is set under the waitForMessage lock
on the secondary thread when the connection is invalidated, identically
to m_shouldWaitForSyncReplies, which solves the same problem for sync
messages.

Read the new bit when we are about to start waiting, and bail if it is set.
It's OK to not read it inside the loop because we are guaranteed to have
waitForMessage set at that point, so the normal interruption bit will work.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _processDidExit]):
Reset _isPrintingToPDF; the Web Content process is never going to get
back to us if it crashes.

(-[WKContentView _wk_pageCountForPrintFormatter:]):
Do not bail from starting a printing operation if one is already occurring.
This fixes the original bug, because Markup ends up invalidating the page
count at least one extra time before asking for the printed document.
Instead of maintaining the fragile requirement that you cannot recompute
the page count while printing, just let it happen. In order to make this
work safely, synchronously wait for the previous printed result before
continuing with the next print.

We could do more coalescing here if need be, but calls to -_recalcPageCount
are not high in volume.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewPrintFormatter.mm:

Add some tests for WKWebViewPrintFormatter; specifically that it is
possible to _recalcPageCount twice in quick succession, and that
we don't hang if we start painting the printed content immediately
after a Web Content process crash.

11:28 AM Changeset in webkit [249583] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebCore

IndexedDB: use SQL COUNT statement for count operation
https://bugs.webkit.org/show_bug.cgi?id=201465

Reviewed by Geoffrey Garen.

We did count operation by moving objectStore/index iterator from begin to end and counting the steps. We can
utilize the SQL COUNT statement, and improve the performance further by caching the statement.

Tested on release build minibrowser. Without the change, the mean time to complete one iteration in
PerformanceTests/IndexedDB/basic/index-count.html and PerformanceTests/IndexedDB/basic/objectStore-count.html is
about 50ms. With the change it is about 2ms.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement):
(WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
11:10 AM Changeset in webkit [249582] by Matt Lewis
  • 4 edits
    2 adds in trunk/Tools

run-webkit-test: Allow results to be uploaded without scm checkout
https://bugs.webkit.org/show_bug.cgi?id=200787

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/checkout/scm/detection.py:

(SCMDetector.detect_scm_system): Added in detection of stub repository.

  • Scripts/webkitpy/common/checkout/scm/stub_repository.py: Added.

(StubRepository):
(StubRepository.init):
(StubRepository._find_parent_path_matching_callback_condition): Checks up the path given to
find the directory containing the checkout_information.json of the stub repository.
(StubRepository.in_working_directory): Required functions to be implemented.
(StubRepository.svn_revision): Required functions to be implemented.
(StubRepository.native_revision): Required functions to be implemented.
(StubRepository.native_branch): Required functions to be implemented.
(StubRepository._decode_json): Decodes checkout_information.json.
(StubRepository.find_checkout_root): Required functions to be implemented.

  • Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py: Added.

(StubRepositoryTest): Unit test for stub_repository SCM.
(StubRepositoryTest.mock_host_for_stub_repository):
(StubRepositoryTest.test_in_working_directory):
(StubRepositoryTest.test_native_revision):
(StubRepositoryTest.test_native_branch):
(StubRepositoryTest.test_svn_revision):
(StubRepositoryTest.test_find_checkout_root):

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(JSONResultsGenerator._get_svn_revision): Removed unnecessary scm initialization.

  • Scripts/webkitpy/port/base.py:

(Port.commits_for_upload): Removed unnecessary scm initialization.

11:05 AM Changeset in webkit [249581] by Simon Fraser
  • 4 edits
    2 adds in trunk

REGRESSION (iOS 13): If an overflow:hidden with a non-zero scroll position is toggled to overflow:scroll, some other scroll causes its scroll position to get reset
https://bugs.webkit.org/show_bug.cgi?id=201528
rdar://problem/55044885

Reviewed by Frédéric Wang.
Source/WebCore:

If, when an overflow scrolling node is created, the scroller has non-zero scroll
position (for example, via toggling to overflow:hidden, setting scrollTop, then toggling
to overflow:scroll), then on the next update its scroll position will reset back to zero.

The bug was that newly created ScrollingTreeScrollingNodes didn't set m_currentScrollPosition
to the scroll position coming from the state node, so a subsequent update could cause
the 0,0 currentScrollPosition to get applied. If we're making a new node, and there's no
requestedScrollPosition, then initialize m_currentScrollPosition.

Test: scrollingcoordinator/ios/scroller-initial-scroll-position.html

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):

  • page/scrolling/ScrollingTreeScrollingNode.h:

LayoutTests:

  • scrollingcoordinator/ios/scroller-initial-scroll-position-expected.html: Added.
  • scrollingcoordinator/ios/scroller-initial-scroll-position.html: Added.
11:02 AM Changeset in webkit [249580] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix unused argument warning from GCC.

  • Platform/IPC/ArgumentCoders.h:

(IPC::TupleDecoder<0>::decode):
There was indeed an unused argument.

10:16 AM Changeset in webkit [249579] by Said Abou-Hallawa
  • 3 edits in trunk/LayoutTests

Unreviewed, fix typo in r249216

Also change the <desc> element to be <text> element so the purpose of
the test is visible once it is opened.

  • svg/custom/href-svg-namespace-animate-target-expected.svg:
  • svg/custom/href-svg-namespace-animate-target.svg:
10:04 AM Changeset in webkit [249578] by mark.lam@apple.com
  • 10 edits
    2 adds in trunk

Fix bmalloc::Allocator:tryAllocate() to return null on failure to allocate.
https://bugs.webkit.org/show_bug.cgi?id=201529
<rdar://problem/53935772>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/test-out-of-memory.js: Added.

Source/bmalloc:

In this implementation, we pass FailureAction in as a runtime option. If this
proves to be a perf issue, we can easily fix this by passing it as a template
argument. That will also automatically elide unneeded code paths. We'll defer
that exercise until we have evidence that it is warranted.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocateImpl):
(bmalloc::Allocator::refillAllocatorSlowCase):
(bmalloc::Allocator::refillAllocator):
(bmalloc::Allocator::allocateLarge):
(bmalloc::Allocator::allocateLogSizeClass):
(bmalloc::Allocator::allocateSlowCase):
(bmalloc::Allocator::tryAllocate): Deleted.
(bmalloc::Allocator::allocate): Deleted.
(bmalloc::Allocator::reallocate): Deleted.
(bmalloc::Allocator::tryReallocate): Deleted.

  • bmalloc/Allocator.h:

(bmalloc::Allocator::tryAllocate):
(bmalloc::Allocator::allocate):
(bmalloc::Allocator::tryReallocate):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::allocateImpl):

  • bmalloc/BumpAllocator.h:
  • bmalloc/FailureAction.h: Added.
  • bmalloc/Heap.cpp:

(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateSmallBumpRangesByMetadata):
(bmalloc::Heap::allocateSmallBumpRangesByObject):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::tryAllocateLarge): Deleted.

  • bmalloc/Heap.h:

(bmalloc::Heap::allocateSmallBumpRanges):

  • bmalloc/bmalloc.cpp:

(bmalloc::api::tryLargeZeroedMemalignVirtual):

10:03 AM Changeset in webkit [249577] by Ryan Haddad
  • 5 edits
    2 copies
    4 adds
    1 delete in trunk

Unreviewed, rolling out r249566.

Causes inspector layout test crashes under GuardMalloc

Reverted changeset:

"Tail Deleted Frames shown in Web Inspector are sometimes
incorrect (Shadow Chicken)"
https://bugs.webkit.org/show_bug.cgi?id=201366
https://trac.webkit.org/changeset/249566

9:56 AM Changeset in webkit [249576] by guijemont@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

testmasm: save r6 in JIT'ed code on ARM_THUMB2
https://bugs.webkit.org/show_bug.cgi?id=201138

Reviewed by Mark Lam.

MacroAssemblerArmv7 uses r6 as a temporary register, and it is a
callee-saved register. The JITs use
AssemblyHelpers::emitSaveCalleeSaves() and friends to save
callee-saved registers, but there is no such mechanism in testmasm,
which seems to make the assumption that the macroassembler does not
use callee-saved registers (which I guess is true for all other
architectures, but not for Armv7).

This issue means that testmasm crashes on Armv7 since code generated
by gcc uses r6, and it gets modified by JIT'ed code.

This change makes sure that we save and restore r6 for all code
compiled by testmasm on Armv7.

  • assembler/testmasm.cpp:

(JSC::emitFunctionPrologue):
(JSC::emitFunctionEpilogue):
(JSC::testSimple):
(JSC::testGetEffectiveAddress):
(JSC::testBranchTruncateDoubleToInt32):
(JSC::testBranchTestBit32RegReg):
(JSC::testBranchTestBit32RegImm):
(JSC::testBranchTestBit32AddrImm):
(JSC::testBranchTestBit64RegReg):
(JSC::testBranchTestBit64RegImm):
(JSC::testBranchTestBit64AddrImm):
(JSC::testCompareDouble):
(JSC::testMul32WithImmediates):
(JSC::testMul32SignExtend):
(JSC::testCompareFloat):
(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):
(JSC::testProbePreservesGPRS):
(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesProgramCounter):
(JSC::testProbeModifiesStackValues):
(JSC::testByteSwap):
(JSC::testMoveDoubleConditionally32):
(JSC::testMoveDoubleConditionally64):
(JSC::testCagePreservesPACFailureBit):

9:19 AM Changeset in webkit [249575] by achristensen@apple.com
  • 20 edits in trunk

When disabling legacy private browsing for testing, change the SessionID back to what it was, not the defaultSessionID
https://bugs.webkit.org/show_bug.cgi?id=201480

Reviewed by Youenn Fablet.

Source/WebCore:

No change in behavior, but this blocks bug 200050 which will make WebKitTestRunner use a persistent, non-default session.
Without this change, that change causes lots of test failures because we are switching from the legacy private browsing session
to the default session instead of the session we were using.

  • page/Page.cpp:

(WebCore::Page::enableLegacyPrivateBrowsing): Deleted.

  • page/Page.h:
  • page/PageGroup.cpp:

(WebCore::PageGroup::addPage):
(WebCore::PageGroup::setSessionIDForTesting):
(WebCore::PageGroup::enableLegacyPrivateBrowsingForTesting): Deleted.

  • page/PageGroup.h:
  • storage/StorageNamespaceProvider.cpp:

(WebCore::StorageNamespaceProvider::setSessionIDForTesting):
(WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): Deleted.

  • storage/StorageNamespaceProvider.h:

Source/WebKit:

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

  • WebProcess/InjectedBundle/InjectedBundle.h:

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setPrivateBrowsingEnabled):

8:49 AM Changeset in webkit [249574] by youenn@apple.com
  • 9 edits in trunk

Remove MediaStreamPrivate::scheduleDeferredTask
https://bugs.webkit.org/show_bug.cgi?id=200975

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-streams/MediaStream-finished-add.https-expected.txt:

Source/WebCore:

All calls to scheduleDeferredTask are done on the main thread.
This was initially done to trigger less reconfiguration.
But this makes the implementation significantly more complex.

For instance, we have to wait for the document to update its media state
and send it to UIProcess before calling the allow completion handler.

Covered by existing tests.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::MediaStream):
Make sure to update the document media state once the tracks have been added, similarly to the other constructor.
This ensures the document media state is computed with the new MediaStreamTrack.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::isMediaStreamCorrectlyStarted):
(WebCore::UserMediaRequest::allow):
(WebCore::UserMediaRequest::stop):
(WebCore::UserMediaRequest::mediaStreamDidFail):

  • Modules/mediastream/UserMediaRequest.h:
  • page/MediaProducer.h:

(WebCore::MediaProducer::isCapturing):
Make sure to include getDisplayMedia as part of capture check.

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::trackMutedChanged):
(WebCore::MediaStreamPrivate::trackEnabledChanged):
(WebCore::MediaStreamPrivate::trackStarted):
(WebCore::MediaStreamPrivate::trackEnded):

  • platform/mediastream/MediaStreamPrivate.h:
6:05 AM Changeset in webkit [249573] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.26/Source/WebKit

Unreviewed. Disable PSON in GTK port

There are some issues causing problems in applications.

  • Shared/WebPreferencesDefaultValues.h:
5:38 AM WebKitGTK/2.26.x edited by Michael Catanzaro
(diff)
5:27 AM Changeset in webkit [249572] by commit-queue@webkit.org
  • 34 edits
    23 adds
    2 deletes in trunk

LayoutTests/imported/w3c:
Implement MathMLIDL / HTMLOrForeignElement
https://bugs.webkit.org/show_bug.cgi?id=200470

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-06
Reviewed by Ryosuke Niwa.

Add tests for functionality exposed by HTMLOrForeignElement.
Import WPT tests as of 6e83b23bb962c97687b6573c378963208219ad1b (origin/master).

  • resources/import-expectations.json:
  • web-platform-tests/mathml/relations/html5-tree/class-1.html:
  • web-platform-tests/mathml/relations/html5-tree/class-2.html:
  • web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt: Added.
  • web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/color-attributes-1.html:
  • web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative-expected.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative-expected.txt: Added.
  • web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/display-1-expected.txt:
  • web-platform-tests/mathml/relations/html5-tree/display-1.html:
  • web-platform-tests/mathml/relations/html5-tree/dynamic-1.html:
  • web-platform-tests/mathml/relations/html5-tree/href-click-1.html:
  • web-platform-tests/mathml/relations/html5-tree/href-click-2.html:
  • web-platform-tests/mathml/relations/html5-tree/href-click-3.html:
  • web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative-expected.txt: Added.
  • web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/integration-point-1.html:
  • web-platform-tests/mathml/relations/html5-tree/integration-point-2.html:
  • web-platform-tests/mathml/relations/html5-tree/integration-point-3.html:
  • web-platform-tests/mathml/relations/html5-tree/integration-point-4-expected.txt: Added.
  • web-platform-tests/mathml/relations/html5-tree/integration-point-4.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: Added.
  • web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html: Added.
  • web-platform-tests/mathml/relations/html5-tree/required-extensions-1-expected.txt: Removed.
  • web-platform-tests/mathml/relations/html5-tree/required-extensions-1.html: Removed.
  • web-platform-tests/mathml/relations/html5-tree/required-extensions-2.html:
  • web-platform-tests/mathml/relations/html5-tree/unique-identifier-1.html:
  • web-platform-tests/mathml/relations/html5-tree/unique-identifier-2.html:
  • web-platform-tests/mathml/relations/html5-tree/unique-identifier-3.html:
  • web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
  • web-platform-tests/mathml/support/attribute-values.js: Added.

(AttributeValueTransforms.lowercase):
(AttributeValueTransforms.uppercase):
(AttributeValueTransforms.alternate_case):
(TransformAttributeValues):

  • web-platform-tests/mathml/support/box-comparison.js: Added.

(spaceBetween):
(measureSpaceAround):
(compareSpaceWithAndWithoutStyle):
(compareSizeWithAndWithoutStyle):

  • web-platform-tests/mathml/support/layout-comparison.js: Added.

(getWritingMode):
(compareSize):
(participateToParentLayout):
(childrenParticipatingToLayout):
(compareLayout):

  • web-platform-tests/mathml/support/mathml-fragments.js: Added.

(FragmentHelper.createElement):
(FragmentHelper.isValidChildOfMrow):
(FragmentHelper.isEmpty):
(FragmentHelper.element):
(FragmentHelper.appendChild):
(FragmentHelper.forceNonEmptyElement):

  • web-platform-tests/mathml/support/w3c-import.log: Added.

Source/WebCore:
Implement MathML DOM
https://bugs.webkit.org/show_bug.cgi?id=200470

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-06
Reviewed by Ryosuke Niwa.

Expose MathML DOM as specified here [1].

[1] https://mathml-refresh.github.io/mathml-core/#dom-mathmlelement

Tests: imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html

imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative.html
imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html
imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html
imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-4.html
imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html
mathml/focus-event-handling.html
mathml/tabindex-order.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSElementCustom.cpp:

(WebCore::createNewElementWrapper):

  • bindings/js/JSNodeCustom.cpp:

(WebCore::createWrapperInline):

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::parseAttribute):

  • mathml/MathMLElement.idl: Copied from Source/WebCore/html/HTMLOrForeignElement.idl.
  • mathml/MathMLMathElement.idl: Copied from Source/WebCore/html/HTMLOrForeignElement.idl.
  • mathml/mathtags.in:

LayoutTests:
Implement MathML DOM
https://bugs.webkit.org/show_bug.cgi?id=200470

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-06
Reviewed by Ryosuke Niwa.

Extend existing tests to also test focus for MathML. Add a standalone test for MathML
based on svg/custom/tabindex-order.html. Add a test for mouse clicks and focus handling
based on svg/custom/focus-event-handling.xhtml.

  • fast/dom/tabindex-defaults-expected.txt:
  • fast/dom/tabindex-defaults.html:
  • mathml/focus-event-handling-expected.txt: Added.
  • mathml/focus-event-handling.html: Added.
  • mathml/tabindex-order-expected.txt: Added.
  • mathml/tabindex-order.html: Added.
  • platform/ios-wk2/TestExpectations:
3:01 AM Changeset in webkit [249571] by commit-queue@webkit.org
  • 16 edits in trunk

Add runtime flag for lazy image loading
https://bugs.webkit.org/show_bug.cgi?id=199794

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-06
Reviewed by Frédéric Wang.

Remove parts of r248409 that were meant for WK1 since
lazy image loading is WK2 only.

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences lazyImageLoadingEnabled]): Deleted.
(-[WebPreferences setLazyImageLoadingEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::setResizeObserverEnabled):
(WebPreferences::lazyImageLoadingEnabled): Deleted.
(WebPreferences::setLazyImageLoadingEnabled): Deleted.

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):

2:14 AM Changeset in webkit [249570] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: Error response headers summary has wrong color border
https://bugs.webkit.org/show_bug.cgi?id=201538
<rdar://problem/55104469>

Reviewed by Devin Rousso.

  • UserInterface/Views/ResourceHeadersContentView.css:

(body[dir] .resource-headers > section.error > .details):
Re-apply an error style for resource-header sections.

2:00 AM Changeset in webkit [249569] by Patrick Griffis
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Do not enable the sandbox in Snap
https://bugs.webkit.org/show_bug.cgi?id=201486

Reviewed by Carlos Garcia Campos.

Running inside of Snap adds its own complications and is simply
not supported for now.

Also update isInsideFlatpak() for consistency.

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::isInsideFlatpak):
(WebKit::isInsideSnap):
(WebKit::ProcessLauncher::launchProcess):

1:51 AM Changeset in webkit [249568] by zandobersek@gmail.com
  • 5 edits in trunk/Source/WebCore

[GStreamer] YUV buffers on iMX platforms have to be treated as RGBA
https://bugs.webkit.org/show_bug.cgi?id=201537

Reviewed by Philippe Normand.

The imxvpudecoder element on iMX platforms decodes YUV data in a
platform-specific way, gathering the YUV data in a single texture and
then relying on the sampler in the Vivante graphics drivers to
automagically decode that YUV data into RGBA values.

To correctly display such decoded data, we have to represent that
single texture as an RGBA texture, even when the GStreamer buffer is
crafted as containing planar YUV data.

  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::platformLayerBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1:22 AM Changeset in webkit [249567] by Joseph Pecoraro
  • 5 edits in trunk

Web Inspector: Crashes when intercept response is a 404
https://bugs.webkit.org/show_bug.cgi?id=201514

Reviewed by Alex Christensen.

Source/WebKit:

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveResponse):
Ensure the WebResourceLoader stays around during intercepts.

(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
Only perform the work if the m_coreLoader is still alive.

LayoutTests:

  • http/tests/inspector/network/local-resource-override-basic-expected.txt:
  • http/tests/inspector/network/local-resource-override-basic.html:

Add a test for a 404 response override.

1:14 AM Changeset in webkit [249566] by Joseph Pecoraro
  • 5 edits
    2 copies
    2 moves
    17 adds
    4 deletes in trunk

Tail Deleted Frames shown in Web Inspector are sometimes incorrect (Shadow Chicken)
https://bugs.webkit.org/show_bug.cgi?id=201366

Reviewed by Saam Barati.

Source/JavaScriptCore:

It is possible for the log buffer to be full right as someone is trying to
log a function prologue. In such a case the machine stack has already been
updated to include the new JavaScript call frame, but the prologue packet
cannot be included in the update because the log is full. This would mean
that the update fails to rationalize the machine stack with the shadow
log / stack. Namely, the current JavaScript call frame is unable to
find a matching prologue (the one we are holding to include after the update)
and inserts a questionable value into the stack; and in the process
missing and removing real potential tail calls.

For example:

"use strict";
function third() { return 1; }
function second() { return third(); }
function first() { return second(); }
function start() { return first(); }

If the the log fills up just as we are entering b then we may have a list
full log of packets looking like:

Shadow Log:

...
{ prologue-packet: entering start ... }
{ prologue-packet: entering first ... }
{ tail-packet: leaving first with a tail call }

Incoming Packet:

{ prologue-packet: entering second ... }

Current JS Stack:

second
start

Since the Current JavaScript stack already has second, if we process the
log without the prologue for second then we push a confused entry on the
shadow stack and clear the log such that we eventually lose the tail-call
information for first to second.

This patch solves this issue by providing enough extra space in the log
to always process the incoming packet when that forces an update. This way
clients can continue to behave exactly as they are.

--

We also document a corner case in some circumstances where the shadow
log may currently be insufficient to know how to reconcile:

For example:

"use strict";
function third() { return 1; }
function second() { return third(); }
function first() { return second(); }
function doNothingTail() { return Math.random() }
function start() {

for (i=0;i<1000;++i) doNothingTail();
return first();

}

In this case the ShadowChicken log may be processed multiple times due
to the many calls to doNothingTail / Math.random(). When calling the
Native function no prologue packet is emitted, so it is unclear that we
temporarly go deeper and come back out on the stack, so the log appears
to have lots of doNothingTail calls reusing the same frame:

Shadow Log:

...
, [123] {callee = 0x72a21aee0, frame = 0x7ffeef897270, callerFrame = 0x7ffeef8972e0, name = start}
, [124] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [125] tail-packet:{frame = 0x7ffeef8971f0}
, [126] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [127] tail-packet:{frame = 0x7ffeef8971f0}
...
, [140] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [141] tail-packet:{frame = 0x7ffeef8971f0}
, [142] {callee = 0x72a21af10, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = doNothingTail}
, [143] tail-packet:{frame = 0x7ffeef8971f0}
, [144] {callee = 0x72a21aeb0, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = first}
, [145] tail-packet:{frame = 0x7ffeef8971f0}
, [146] {callee = 0x72a21ae80, frame = 0x7ffeef8971f0, callerFrame = 0x7ffeef897270, name = second}
...

This log would seem to be indistinguishable from real tail recursion, such as:

"use strict";
function third() { return 1; }
function second() { return third(); }
function first() { return second(); }
function doNothingTail(n) {

return n ? doNothingTail(n-1) : first();

}
function start() {

return doNothingTail(1000);

}

Likewise there are more cases where the shadow log appears to be ambiguous with determining
the appropriate parent call frame with intermediate function calls. In practice this may
not be too problematic, as this is a best effort reconstruction of tail deleted frames.
It seems likely we would only show additional frames that did in fact happen serially
between JavaScript call frames, but may not actually be the proper parent frames
heirachy in the stack.

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::Packet::dump const):
(JSC::ShadowChicken::Frame::dump const):
(JSC::ShadowChicken::dump const):
Improved debugging output. Especially for functions.

(JSC::ShadowChicken::ShadowChicken):
Make space in the log for 1 additional packet to process when we slow log.

(JSC::ShadowChicken::log):
Include this packet in our update.

(JSC::ShadowChicken::update):
Address an edge case where we can eliminate tail-deleted frames that don't make sense.

LayoutTests:

  • inspector/debugger/tail-deleted-frames-expected.txt: Removed.
  • inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt: Removed.
  • inspector/debugger/tail-deleted-frames-from-vm-entry.html: Removed.
  • inspector/debugger/tail-deleted-frames-this-value-expected.txt: Removed.
  • inspector/debugger/tail-deleted-frames-this-value.html: Removed.
  • inspector/debugger/tail-deleted-frames.html: Removed.

Remove legacy tests that are difficult to read.

  • inspector/debugger/tail-deleted-frames/resources/stack-trace-utilities.js: Added.

(TestPage.registerInitializer.window.getAsyncStackTrace):
(TestPage.registerInitializer.async.logThisObject):
(TestPage.registerInitializer.async.logScope):
(TestPage.registerInitializer.async.logCallFrame):
(TestPage.registerInitializer):

  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-intermediate-frames.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-intermediate-native-tail-deleted-calls.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-intermediate-tail-deleted-frames.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-scopes.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-this-value.js: Added.
  • inspector/debugger/tail-deleted-frames/resources/tail-deleted-frames-vm-entry.js: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-frames-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-frames.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-tail-deleted-frames-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-tail-deleted-frames.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-scopes-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-scopes.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-this-value-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-this-value.html: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-vm-entry-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-vm-entry.html: Added.

Include modern tests that are easier to read.

  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-native-tail-deleted-calls-expected.txt: Added.
  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-intermediate-native-tail-deleted-calls.html: Added.

Include a test that is known to produce bad output, since we have reproductive steps.

  • platform/mac/TestExpectations:

Updated pathes.

12:06 AM Changeset in webkit [249565] by commit-queue@webkit.org
  • 5 edits in trunk

AccessibilityRenderObject::setSelectedTextRange fails to set the selection passed an empty line.
https://bugs.webkit.org/show_bug.cgi?id=201518
<rdar://problem/54835122>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-09-06
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: accessibility/set-selected-text-range-after-newline.html

In the case of an empty line, the CharacterIterator range start and end
were not equal, thus we were not advancing the iterator and returning
the iterator range end, which is not correct. With this change we are
always advancing the iterator if its text is just '\n'. This covers all
the cases we fixed before plus empty lines.

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator):

LayoutTests:

Extended this test to set the selection range passed an empty line.

  • accessibility/set-selected-text-range-after-newline-expected.txt:
  • accessibility/set-selected-text-range-after-newline.html:

Sep 5, 2019:

10:57 PM Changeset in webkit [249564] by Chris Dumez
  • 5 edits in trunk

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in imported/w3c/IndexedDB-private-browsing
https://bugs.webkit.org/show_bug.cgi?id=201519

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Drop Webkit-specific changes to WPT tests.

  • IndexedDB-private-browsing/support.js:

Tools:

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in imported/w3c/IndexedDB-private-browsing
as it does not truly enable private browsing for WebKit2. Instead, have WKTR / DRT set the
TestOption::useEphemeralSession flag based on the test folder.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(shouldUseEphemeralSession):
(runTest):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::shouldUseEphemeralSession):
(WTR::TestOptions::TestOptions):

10:06 PM Changeset in webkit [249563] by Chris Dumez
  • 308 edits in trunk

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in js-test.js
https://bugs.webkit.org/show_bug.cgi?id=201522

Reviewed by Alex Christensen.

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in js-test.js.
Instead, use the new useEphemeralSession WKTR flag added in r249542.

  • resources/js-test.js:
  • storage/indexeddb/aborted-versionchange-closes-private.html:
  • storage/indexeddb/basics-private.html:
  • storage/indexeddb/clone-exception-private.html:
  • storage/indexeddb/closed-cursor-private.html:
  • storage/indexeddb/connection-leak-private.html:
  • storage/indexeddb/create-and-remove-object-store-private.html:
  • storage/indexeddb/create-object-store-options-private.html:
  • storage/indexeddb/createIndex-after-failure-private.html:
  • storage/indexeddb/createObjectStore-name-argument-required-private.html:
  • storage/indexeddb/createObjectStore-null-name-private.html:
  • storage/indexeddb/cursor-added-bug-private.html:
  • storage/indexeddb/cursor-advance-private.html:
  • storage/indexeddb/cursor-basics-private.html:
  • storage/indexeddb/cursor-cast-private.html:
  • storage/indexeddb/cursor-continue-dir-private.html:
  • storage/indexeddb/cursor-continue-private.html:
  • storage/indexeddb/cursor-continue-validity-private.html:
  • storage/indexeddb/cursor-delete-private.html:
  • storage/indexeddb/cursor-finished-private.html:
  • storage/indexeddb/cursor-inconsistency-private.html:
  • storage/indexeddb/cursor-index-delete-private.html:
  • storage/indexeddb/cursor-key-order-private.html:
  • storage/indexeddb/cursor-leak-private.html:
  • storage/indexeddb/cursor-overloads-private.html:
  • storage/indexeddb/cursor-prev-no-duplicate-private.html:
  • storage/indexeddb/cursor-primary-key-order-private.html:
  • storage/indexeddb/cursor-properties-private.html:
  • storage/indexeddb/cursor-request-cycle-private.html:
  • storage/indexeddb/cursor-reverse-bug-private.html:
  • storage/indexeddb/cursor-skip-deleted-private.html:
  • storage/indexeddb/cursor-update-private.html:
  • storage/indexeddb/cursor-update-value-argument-required-private.html:
  • storage/indexeddb/cursor-value-private.html:
  • storage/indexeddb/database-basics-private.html:
  • storage/indexeddb/database-close-private.html:
  • storage/indexeddb/database-closepending-flag-private.html:
  • storage/indexeddb/database-deletepending-flag-private.html:
  • storage/indexeddb/database-name-undefined-private.html:
  • storage/indexeddb/database-odd-names-private.html:
  • storage/indexeddb/database-quota-private.html:
  • storage/indexeddb/database-wrapper-private.html:
  • storage/indexeddb/delete-closed-database-object-private.html:
  • storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html:
  • storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html:
  • storage/indexeddb/delete-range-private.html:
  • storage/indexeddb/deleteIndex-bug110792-private.html:
  • storage/indexeddb/deleteIndex-private.html:
  • storage/indexeddb/deleteObjectStore-name-argument-required-private.html:
  • storage/indexeddb/deleteObjectStore-null-name-private.html:
  • storage/indexeddb/deleted-objects-private.html:
  • storage/indexeddb/deletedatabase-blocked-private.html:
  • storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html:
  • storage/indexeddb/deletedatabase-not-blocked-private.html:
  • storage/indexeddb/deletedatabase-transaction-private.html:
  • storage/indexeddb/dont-commit-on-blocked-private.html:
  • storage/indexeddb/dont-wedge-private.html:
  • storage/indexeddb/duplicates-private.html:
  • storage/indexeddb/error-causes-abort-by-default-private.html:
  • storage/indexeddb/events-private.html:
  • storage/indexeddb/exception-in-event-aborts-private.html:
  • storage/indexeddb/exceptions-private.html:
  • storage/indexeddb/factory-cmp-private.html:
  • storage/indexeddb/factory-deletedatabase-private.html:
  • storage/indexeddb/get-keyrange-private.html:
  • storage/indexeddb/index-basics-private.html:
  • storage/indexeddb/index-count-private.html:
  • storage/indexeddb/index-cursor-private.html:
  • storage/indexeddb/index-duplicate-keypaths-private.html:
  • storage/indexeddb/index-get-key-argument-required-private.html:
  • storage/indexeddb/index-multientry-private.html:
  • storage/indexeddb/index-population-private.html:
  • storage/indexeddb/index-unique-private.html:
  • storage/indexeddb/interfaces-private.html:
  • storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private.html:
  • storage/indexeddb/intversion-bad-parameters-private.html:
  • storage/indexeddb/intversion-blocked-private.html:
  • storage/indexeddb/intversion-close-between-events-private.html:
  • storage/indexeddb/intversion-close-in-oncomplete-private.html:
  • storage/indexeddb/intversion-close-in-upgradeneeded-private.html:
  • storage/indexeddb/intversion-encoding-private.html:
  • storage/indexeddb/intversion-gated-on-delete-private.html:
  • storage/indexeddb/intversion-long-queue-private.html:
  • storage/indexeddb/intversion-omit-parameter-private.html:
  • storage/indexeddb/intversion-open-in-upgradeneeded-private.html:
  • storage/indexeddb/intversion-open-with-version-private.html:
  • storage/indexeddb/intversion-pending-version-changes-ascending-private.html:
  • storage/indexeddb/intversion-pending-version-changes-descending-private.html:
  • storage/indexeddb/intversion-pending-version-changes-same-private.html:
  • storage/indexeddb/intversion-persistence-private.html:
  • storage/indexeddb/intversion-revert-on-abort-private.html:
  • storage/indexeddb/intversion-two-opens-no-versions-private.html:
  • storage/indexeddb/intversion-upgrades-private.html:
  • storage/indexeddb/invalid-keys-private.html:
  • storage/indexeddb/key-generator-private.html:
  • storage/indexeddb/key-sort-order-across-types-private.html:
  • storage/indexeddb/key-sort-order-date-private.html:
  • storage/indexeddb/key-type-array-private.html:
  • storage/indexeddb/key-type-binary-private.html:
  • storage/indexeddb/key-type-infinity-private.html:
  • storage/indexeddb/keypath-arrays-private.html:
  • storage/indexeddb/keypath-basics-private.html:
  • storage/indexeddb/keypath-edges-private.html:
  • storage/indexeddb/keypath-fetch-key-private.html:
  • storage/indexeddb/keypath-intrinsic-properties-private.html:
  • storage/indexeddb/keyrange-private.html:
  • storage/indexeddb/keyrange-required-arguments-private.html:
  • storage/indexeddb/lazy-index-population-private.html:
  • storage/indexeddb/lazy-index-types-private.html:
  • storage/indexeddb/legacy-constants-private.html:
  • storage/indexeddb/list-ordering-private.html:
  • storage/indexeddb/metadata-private.html:
  • storage/indexeddb/metadata-race-private.html:
  • storage/indexeddb/modern/abort-objectstore-info-private.html:
  • storage/indexeddb/modern/abort-requests-cancelled-private.html:
  • storage/indexeddb/modern/aborted-put-private.html:
  • storage/indexeddb/modern/autoincrement-abort-private.html:
  • storage/indexeddb/modern/basic-add-private.html:
  • storage/indexeddb/modern/basic-put-private.html:
  • storage/indexeddb/modern/binary-keys-1-private.html:
  • storage/indexeddb/modern/blocked-open-db-requests-private.html:
  • storage/indexeddb/modern/create-index-failures-private.html:
  • storage/indexeddb/modern/createobjectstore-basic-private.html:
  • storage/indexeddb/modern/createobjectstore-failures-private.html:
  • storage/indexeddb/modern/cursor-1-private.html:
  • storage/indexeddb/modern/cursor-2-private.html:
  • storage/indexeddb/modern/cursor-3-private.html:
  • storage/indexeddb/modern/cursor-4-private.html:
  • storage/indexeddb/modern/cursor-5-private.html:
  • storage/indexeddb/modern/cursor-6-private.html:
  • storage/indexeddb/modern/cursor-7-private.html:
  • storage/indexeddb/modern/cursor-8-private.html:
  • storage/indexeddb/modern/date-basic-private.html:
  • storage/indexeddb/modern/deletedatabase-1-private.html:
  • storage/indexeddb/modern/deletedatabase-2-private.html:
  • storage/indexeddb/modern/deletedatabase-null-name-exception-private.html:
  • storage/indexeddb/modern/deletedatabase-request-event-private.html:
  • storage/indexeddb/modern/deletedatabase-request-private.html:
  • storage/indexeddb/modern/deleteindex-1-private.html:
  • storage/indexeddb/modern/deleteindex-2-private.html:
  • storage/indexeddb/modern/deleteindex-3-private.html:
  • storage/indexeddb/modern/deleteindex-4-private.html:
  • storage/indexeddb/modern/deleteobjectstore-1-private.html:
  • storage/indexeddb/modern/double-abort-private.html:
  • storage/indexeddb/modern/double-open-private.html:
  • storage/indexeddb/modern/gc-closes-database-private.html:
  • storage/indexeddb/modern/get-index-failures-private.html:
  • storage/indexeddb/modern/get-keyrange-private.html:
  • storage/indexeddb/modern/idbcursor-continue-primary-key-1-private.html:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-private.html:
  • storage/indexeddb/modern/idbdatabase-transaction-failures-private.html:
  • storage/indexeddb/modern/idbindex-getall-1-private.html:
  • storage/indexeddb/modern/idbindex-getallkeys-1-private.html:
  • storage/indexeddb/modern/idbindex-properties-basic-private.html:
  • storage/indexeddb/modern/idbkey-array-equality-private.html:
  • storage/indexeddb/modern/idbobjectstore-clear-1-private.html:
  • storage/indexeddb/modern/idbobjectstore-clear-2-private.html:
  • storage/indexeddb/modern/idbobjectstore-count-1-private.html:
  • storage/indexeddb/modern/idbobjectstore-count-failures-private.html:
  • storage/indexeddb/modern/idbobjectstore-delete-1-private.html:
  • storage/indexeddb/modern/idbobjectstore-delete-2-private.html:
  • storage/indexeddb/modern/idbobjectstore-delete-failures-private.html:
  • storage/indexeddb/modern/idbobjectstore-get-failures-private.html:
  • storage/indexeddb/modern/idbobjectstore-getall-1-private.html:
  • storage/indexeddb/modern/idbobjectstore-getallkeys-1-private.html:
  • storage/indexeddb/modern/idbobjectstore-getkey-1-private.html:
  • storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-private.html:
  • storage/indexeddb/modern/idbtransaction-objectstore-failures-private.html:
  • storage/indexeddb/modern/idbtransaction-objectstores-1-private.html:
  • storage/indexeddb/modern/index-1-private.html:
  • storage/indexeddb/modern/index-2-private.html:
  • storage/indexeddb/modern/index-3-private.html:
  • storage/indexeddb/modern/index-4-private.html:
  • storage/indexeddb/modern/index-5-private.html:
  • storage/indexeddb/modern/index-cursor-1-private.html:
  • storage/indexeddb/modern/index-cursor-2-private.html:
  • storage/indexeddb/modern/index-cursor-3-private.html:
  • storage/indexeddb/modern/index-get-count-basic-private.html:
  • storage/indexeddb/modern/index-get-count-failures-private.html:
  • storage/indexeddb/modern/index-rename-1-private.html:
  • storage/indexeddb/modern/keypath-basic-private.html:
  • storage/indexeddb/modern/memory-index-not-deleted-with-objectstore-private.html:
  • storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-private.html:
  • storage/indexeddb/modern/objectstore-attributes-private.html:
  • storage/indexeddb/modern/objectstore-cursor-advance-failures-private.html:
  • storage/indexeddb/modern/objectstore-cursor-continue-failures-private.html:
  • storage/indexeddb/modern/objectstore-rename-1-private.html:
  • storage/indexeddb/modern/opencursor-failures-private.html:
  • storage/indexeddb/modern/opendatabase-request-event-private.html:
  • storage/indexeddb/modern/opendatabase-request-private.html:
  • storage/indexeddb/modern/opendatabase-success-after-versionchange-private.html:
  • storage/indexeddb/modern/opendatabase-versions-private.html:
  • storage/indexeddb/modern/request-readystate-private.html:
  • storage/indexeddb/modern/single-entry-index-invalid-key-crash-private.html:
  • storage/indexeddb/modern/transaction-scheduler-1-private.html:
  • storage/indexeddb/modern/transaction-scheduler-2-private.html:
  • storage/indexeddb/modern/transaction-scheduler-3-private.html:
  • storage/indexeddb/modern/transaction-scheduler-4-private.html:
  • storage/indexeddb/modern/transaction-scheduler-5-private.html:
  • storage/indexeddb/modern/transaction-scheduler-6-private.html:
  • storage/indexeddb/modern/transactions-stop-on-navigation-private.html:
  • storage/indexeddb/modern/versionchange-abort-then-reopen-private.html:
  • storage/indexeddb/modern/versionchange-event-private.html:
  • storage/indexeddb/mozilla/add-twice-failure-private.html:
  • storage/indexeddb/mozilla/autoincrement-indexes-private.html:
  • storage/indexeddb/mozilla/bad-keypath-private.html:
  • storage/indexeddb/mozilla/clear-private.html:
  • storage/indexeddb/mozilla/create-index-unique-private.html:
  • storage/indexeddb/mozilla/create-index-with-integer-keys-private.html:
  • storage/indexeddb/mozilla/create-objectstore-basics-private.html:
  • storage/indexeddb/mozilla/create-objectstore-null-name-private.html:
  • storage/indexeddb/mozilla/cursor-mutation-objectstore-only-private.html:
  • storage/indexeddb/mozilla/cursor-mutation-private.html:
  • storage/indexeddb/mozilla/cursor-update-updates-indexes-private.html:
  • storage/indexeddb/mozilla/cursors-private.html:
  • storage/indexeddb/mozilla/delete-result-private.html:
  • storage/indexeddb/mozilla/event-source-private.html:
  • storage/indexeddb/mozilla/global-data-private.html:
  • storage/indexeddb/mozilla/index-prev-no-duplicate-private.html:
  • storage/indexeddb/mozilla/indexes-private.html:
  • storage/indexeddb/mozilla/key-requirements-delete-null-key-private.html:
  • storage/indexeddb/mozilla/key-requirements-inline-and-passed-private.html:
  • storage/indexeddb/mozilla/key-requirements-private.html:
  • storage/indexeddb/mozilla/key-requirements-put-no-key-private.html:
  • storage/indexeddb/mozilla/key-requirements-put-null-key-private.html:
  • storage/indexeddb/mozilla/object-cursors-private.html:
  • storage/indexeddb/mozilla/object-identity-private.html:
  • storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-private.html:
  • storage/indexeddb/mozilla/object-store-remove-values-private.html:
  • storage/indexeddb/mozilla/objectstorenames-private.html:
  • storage/indexeddb/mozilla/odd-result-order-private.html:
  • storage/indexeddb/mozilla/open-database-null-name-private.html:
  • storage/indexeddb/mozilla/put-get-values-private.html:
  • storage/indexeddb/mozilla/readonly-transactions-private.html:
  • storage/indexeddb/mozilla/readwrite-transactions-private.html:
  • storage/indexeddb/mozilla/readyState-private.html:
  • storage/indexeddb/mozilla/remove-index-private.html:
  • storage/indexeddb/mozilla/remove-objectstore-private.html:
  • storage/indexeddb/mozilla/versionchange-abort-private.html:
  • storage/indexeddb/mutating-cursor-private.html:
  • storage/indexeddb/object-lookups-in-versionchange-private.html:
  • storage/indexeddb/objectStore-required-arguments-private.html:
  • storage/indexeddb/objectstore-autoincrement-private.html:
  • storage/indexeddb/objectstore-basics-private.html:
  • storage/indexeddb/objectstore-clear-private.html:
  • storage/indexeddb/objectstore-count-private.html:
  • storage/indexeddb/objectstore-cursor-private.html:
  • storage/indexeddb/objectstore-removeobjectstore-private.html:
  • storage/indexeddb/odd-strings-private.html:
  • storage/indexeddb/open-bad-versions-private.html:
  • storage/indexeddb/open-cursor-private.html:
  • storage/indexeddb/open-during-transaction-private.html:
  • storage/indexeddb/open-ordering-private.html:
  • storage/indexeddb/opencursor-key-private.html:
  • storage/indexeddb/optional-arguments-private.html:
  • storage/indexeddb/pending-activity-private.html:
  • storage/indexeddb/pending-version-change-on-exit-private.html:
  • storage/indexeddb/pending-version-change-stuck-private.html:
  • storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html:
  • storage/indexeddb/persistence-private.html:
  • storage/indexeddb/prefetch-bugfix-108071-private.html:
  • storage/indexeddb/prefetch-invalidation-private.html:
  • storage/indexeddb/prefetch-race-private.html:
  • storage/indexeddb/primary-key-unique-to-objectstore-private.html:
  • storage/indexeddb/queued-commands-private.html:
  • storage/indexeddb/readonly-private.html:
  • storage/indexeddb/readonly-properties-private.html:
  • storage/indexeddb/removed-private.html:
  • storage/indexeddb/request-continue-abort-private.html:
  • storage/indexeddb/request-event-propagation-private.html:
  • storage/indexeddb/request-leak-private.html:
  • storage/indexeddb/request-result-cache-private.html:
  • storage/indexeddb/set_version_blocked-private.html:
  • storage/indexeddb/setversion-blocked-by-versionchange-close-private.html:
  • storage/indexeddb/setversion-not-blocked-private.html:
  • storage/indexeddb/structured-clone-private.html:
  • storage/indexeddb/transaction-abort-private.html:
  • storage/indexeddb/transaction-active-flag-private.html:
  • storage/indexeddb/transaction-after-close-private.html:
  • storage/indexeddb/transaction-and-objectstore-calls-private.html:
  • storage/indexeddb/transaction-basics-private.html:
  • storage/indexeddb/transaction-complete-with-js-recursion-cross-frame-private.html:
  • storage/indexeddb/transaction-complete-with-js-recursion-private.html:
  • storage/indexeddb/transaction-complete-workers-private.html:
  • storage/indexeddb/transaction-coordination-across-databases-private.html:
  • storage/indexeddb/transaction-coordination-within-database-private.html:
  • storage/indexeddb/transaction-crash-in-tasks-private.html:
  • storage/indexeddb/transaction-crash-on-abort-private.html:
  • storage/indexeddb/transaction-error-private.html:
  • storage/indexeddb/transaction-event-propagation-private.html:
  • storage/indexeddb/transaction-ordering-private.html:
  • storage/indexeddb/transaction-overlapping-private.html:
  • storage/indexeddb/transaction-read-only-private.html:
  • storage/indexeddb/transaction-readwrite-exclusive-private.html:
  • storage/indexeddb/transaction-rollback-private.html:
  • storage/indexeddb/transaction-scope-sequencing-private.html:
  • storage/indexeddb/transaction-storeNames-required-private.html:
  • storage/indexeddb/unblocked-version-changes-private.html:
  • storage/indexeddb/unprefix-private.html:
  • storage/indexeddb/value-undefined-private.html:
  • storage/indexeddb/values-odd-types-private.html:
  • storage/indexeddb/version-change-abort-private.html:
  • storage/indexeddb/version-change-event-basic-private.html:
  • storage/indexeddb/version-change-event-private.html:
  • storage/indexeddb/version-change-exclusive-private.html:
  • storage/indexeddb/versionchangerequest-activedomobject-private.html:
9:51 PM Changeset in webkit [249562] by Chris Dumez
  • 3 edits
    1 copy
    1 add in trunk/LayoutTests

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/cache/disk-cache/disk-cache-vary-cookie.html
https://bugs.webkit.org/show_bug.cgi?id=201524

Reviewed by Alex Christensen.

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() as it does not do the right thing for WebKit2.
Instead, use the new useEphemeralSession WKTR flag added in r249542.

  • http/tests/cache/disk-cache/disk-cache-vary-cookie-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-vary-cookie-private-expected.txt: Added.
  • http/tests/cache/disk-cache/disk-cache-vary-cookie-private.html: Copied from LayoutTests/http/tests/cache/disk-cache/disk-cache-vary-cookie.html.
  • http/tests/cache/disk-cache/disk-cache-vary-cookie.html:
9:37 PM Changeset in webkit [249561] by Chris Dumez
  • 5 edits
    2 adds in trunk/LayoutTests

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in plugins/private-browsing-mode.html
https://bugs.webkit.org/show_bug.cgi?id=201523

Reviewed by Alex Christensen.

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in plugins/private-browsing-mode.html
since it does not do the right thing for WebKit2. Instead, use the new useEphemeralSession
WKTR flag.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • plugins/non-private-browsing-mode-expected.txt: Added.
  • plugins/non-private-browsing-mode.html: Added.
  • plugins/private-browsing-mode-expected.txt:
  • plugins/private-browsing-mode.html:
7:38 PM Changeset in webkit [249560] by Fujii Hironori
  • 5 edits in trunk/Source

[Win] Add support for MouseEvent.buttons
https://bugs.webkit.org/show_bug.cgi?id=201445

Reviewed by Brent Fulgham.

Source/WebCore:

Spec: <https://www.w3.org/TR/uievents/#dom-mouseevent-buttons>

  • platform/win/GDIUtilities.h:

(buttonsForEvent): Added.

  • platform/win/PlatformMouseEventWin.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent):
Set m_buttons.

Source/WebKit:

  • Shared/win/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebMouseEvent):
Set m_buttons.

6:48 PM Changeset in webkit [249559] by Fujii Hironori
  • 5 edits in trunk

[Win] Support Per-Monitor (V2) DPI Awareness
https://bugs.webkit.org/show_bug.cgi?id=201450

Reviewed by Don Olmstead.

Source/WebCore:

  • platform/win/GDIUtilities.cpp:

(WebCore::deviceScaleFactorForWindow): Use GetDpiForWindow if available by using soft linking.

Tools:

  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::WndProc): Set the window position suggested by WM_DPICHANGED.

  • MiniBrowser/win/WinMain.cpp:

(wWinMain): Call SetProcessDpiAwarenessContext by using soft linking.

6:45 PM Changeset in webkit [249558] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy/win

[WinCairo][WK1] ASSERTION FAILED: !isAcceleratedCompositing() in WebView::updateBackingStore
https://bugs.webkit.org/show_bug.cgi?id=201493

Reviewed by Don Olmstead.

WebView::paint switches painting code path by checking accelerated
compositing enabled. However, accelerated compositing could be
enabled after the checking.

WebView::paint called WebView::paintCompositedContentToHDC and
WebCore::Page::updateRendering.
WebView::paintCompositedContentToHDC checks accelerated
compositing enabled. Then, WebCore::Page::updateRendering executes
JavaScript and accelerated compositing could be enabled.

  • WebView.cpp:

(WebView::paint): Call WebCore::Page::updateRendering the
beginning of the function.

6:07 PM Changeset in webkit [249557] by Chris Dumez
  • 5 edits in trunk

REGRESSION: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html and http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=201440
<rdar://problem/54998427>

Reviewed by Alex Christensen.

Source/WebKit:

Add private WKBundlePage API to query if the WebPage is currently suspended or not.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageIsSuspended):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

Since r249350, it is now possible for a WebContent process to have a suspended WebPage for the current web view.
This was confusing InjectedBundle::page() in WebKitTestRunner which was assuming that the WebPage that was first
created in the WebContent process is the one that is currently running the test and that we want to talk to.
Update InjectedBundle::page() to ignore suspended WebPages in order to address the issue.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::page const):

5:03 PM Changeset in webkit [249556] by mark.lam@apple.com
  • 12 edits in trunk/Source

Refactor the Gigacage code to require less pointer casting.
https://bugs.webkit.org/show_bug.cgi?id=201521

Reviewed by Saam Barati.

Source/bmalloc:

  1. Define a Gigacage::Config struct instead of hacking around a g_gigacageBasePtrs array of bytes.
  2. Change Gigacage::basePtr() to return a pointer instead of a reference to the requested basePtr. Instead, make it explicit when the client is trying to take the address of the basePtr, or setting it.
  3. Renamed wasEnabled() to isEnabled() because it returns the present state of the flag, not some past state.
  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::protectGigacageBasePtrs):
(Gigacage::bmalloc::unprotectGigacageBasePtrs):
(Gigacage::bmalloc::runwaySize):
(Gigacage::ensureGigacage):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::primitiveGigacageDisabled):

  • bmalloc/Gigacage.h:

(Gigacage::name):
(Gigacage::Config::basePtr const):
(Gigacage::Config::setBasePtr):
(Gigacage::isEnabled):
(Gigacage::basePtr):
(Gigacage::addressOfBasePtr):
(Gigacage::size):
(Gigacage::caged):
(Gigacage::wasEnabled): Deleted.
(Gigacage::setWasEnabled): Deleted.
(Gigacage::basePtrs): Deleted.

  • bmalloc/HeapKind.h:

(bmalloc::heapKind):
(bmalloc::isActiveHeapKindAfterEnsuringGigacage):
(bmalloc::mapToActiveHeapKindAfterEnsuringGigacage):

Source/JavaScriptCore:

Change LLInt's loadCagedJSValue() to skip the caging if Gigacage is not enabled
in the build. This allows us to remove the unneeded stubs in WTF Gigacage.h.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cageConditionally):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/VM.h:

(JSC::VM::gigacageAuxiliarySpace):

Source/WTF:

Remove some unneeded stubs in WTF Gigacage.h.

  • wtf/Gigacage.cpp:
  • wtf/Gigacage.h:

(Gigacage::name):
(Gigacage::isEnabled):
(Gigacage::basePtr): Deleted.
(Gigacage::basePtrs): Deleted.

4:42 PM Changeset in webkit [249555] by Justin Fan
  • 7 edits
    1 add in trunk/LayoutTests

[WebGPU] Fix new test results after adding console warnings
https://bugs.webkit.org/show_bug.cgi?id=201526

Unreviewed test expectation updates.

  • webgpu/buffer-errors-expected.txt:
  • webgpu/map-read-buffers-expected.txt:
  • webgpu/map-write-buffers-expected.txt:
  • webgpu/render-pipelines.html: Fix WHLSL compile error.
  • webgpu/uncaptured-errors-expected.txt: Added.
  • webgpu/whlsl/use-undefined-variable-2-expected.txt:
  • webgpu/whlsl/use-undefined-variable-expected.txt:
4:37 PM Changeset in webkit [249554] by Jonathan Bedard
  • 5 edits in trunk/Tools

results.webkit.org: Assign notifyRerender before calling
https://bugs.webkit.org/show_bug.cgi?id=201510

Reviewed by Aakash Jain.

Timelines should define notifyRerender to an empty function,
rename notifiyRerender to notifyRerender.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:
  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
  • resultsdbpy/resultsdbpy/view/templates/search.html:
  • resultsdbpy/resultsdbpy/view/templates/suite_results.html:
4:21 PM Changeset in webkit [249553] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=181837

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as flaky.
  • platform/mac/TestExpectations: Ditto.
4:21 PM Changeset in webkit [249552] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, follow-up after r249530 and r249509
https://bugs.webkit.org/show_bug.cgi?id=201495

Rename FTLOutput::weakPointer to alreadyRegisteredWeakPointer and alreadyRegisteredFrozenPointer.

  • builtins/PromiseConstructor.js:

(nakedConstructor.Promise.resolve):
(nakedConstructor.Promise.reject):
(nakedConstructor.Promise):
(nakedConstructor.InternalPromise.resolve):
(nakedConstructor.InternalPromise.reject):
(nakedConstructor.InternalPromise):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::weakPointer):
(JSC::FTL::DFG::LowerDFGToB3::frozenPointer):
(JSC::FTL::DFG::LowerDFGToB3::weakStructure):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::alreadyRegisteredWeakPointer):
(JSC::FTL::Output::alreadyRegisteredFrozenPointer):
(JSC::FTL::Output::weakPointer): Deleted.

4:16 PM Changeset in webkit [249551] by Kocsen Chung
  • 3 edits
    2 adds in branches/safari-608.2.11.1-branch

Cherry-pick r249534. rdar://problem/55084674

AX: children cache are not re-computed if tab index is removed
https://bugs.webkit.org/show_bug.cgi?id=201502

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: accessibility/tabindex-removed.html

If the tabindex changes, it can potentially affect whether an element is accessible. If we don't update the children cache
information can be stale and lead to incorrect navigation with VoiceOver.

  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAttributeChange):

LayoutTests:

  • accessibility/tabindex-removed-expected.txt: Added.
  • accessibility/tabindex-removed.html: Added.

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

4:08 PM Changeset in webkit [249550] by Kocsen Chung
  • 8 edits
    2 adds in branches/safari-608-branch

Apply patch. rdar://problem/55001140

Treat a two-finger single tap as if the user tapped with the Cmd key pressed https://bugs.webkit.org/show_bug.cgi?id=201420 <rdar://problem/53207786>

Reviewed by Simon Fraser.

Source/WebKit:

Set the metaKey modifier to true when generating a click event based on a two-finger single tap. This is important so that sites like Google and DuckDuckGo
correctly open links in their search results page in a new tab in Safari on iOS. This currently doesn't work because those sites will call preventDefault()
if the metaKey flag isn't set on a "click" event, and if it is set, they let the browser handle the navigation themselves.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _twoFingerSingleTapGestureRecognized:]):

Tools:

Add a new twoFingerSingleTapAtPoint() method to UIScriptController, which just calls into the existing (but unused)
-[HIDEventGenerator twoFingerTap:completionBlock:].

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::twoFingerSingleTapAtPoint):
  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::twoFingerSingleTapAtPoint):

LayoutTests:

Add a new event that checks that a two-finger single tap on a clickable element yields a "click" event with the metaKey flag set to true.

  • fast/events/ios/click-event-two-finger-single-tap-meta-key-expected.txt: Added.
  • fast/events/ios/click-event-two-finger-single-tap-meta-key.html: Added.
4:03 PM Changeset in webkit [249549] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Fix prepending search result on empty list
https://bugs.webkit.org/show_bug.cgi?id=201512

Reviewed by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/templates/search.html:
2:58 PM Changeset in webkit [249548] by cturner@igalia.com
  • 11 edits in trunk/Source/WebCore

[EME] Introduce a Proxy CDM for thread-safe access to CDM instances from background decryption threads
https://bugs.webkit.org/show_bug.cgi?id=201339

Reviewed by Xabier Rodriguez-Calvar.

Covered by existing tests.

  • platform/encryptedmedia/CDMInstance.h:
  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::isolatedKey):
(WebCore::ProxyCDMClearKey::isolatedKeys const):
(WebCore::CDMInstanceClearKey::CDMInstanceClearKey):

  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(handleKeyResponse):
(findAndSetKey):
(decrypt):

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(isCDMInstanceAvailable):
(sinkEventHandler):
(setContext):

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMInstance::proxyCDM const):

  • testing/MockCDMFactory.h:
2:48 PM Changeset in webkit [249547] by ysuzuki@apple.com
  • 39 edits
    1 copy
    1 add in trunk/Source/JavaScriptCore

[JSC] Generalize Get/PutPromiseInternalField for InternalFieldObjectImpl
https://bugs.webkit.org/show_bug.cgi?id=201513

Reviewed by Ross Kirsling.

This patch extracts JSPromise's internal fields mechanism as JSInternalFieldsObjectImpl, and make it reusable for the other objects.
It is preparation for using this internal fields mechanism for generators, async functions, async generators, array iterators and so on.

The profiler is telling many recompilation of Generator's resume function (including async generator's one). We are using properties
with private-symbols as a storage for internal state of generators. However, the spec defines that each generator from different generator-functions
has different Prototype. While we need to share one Generator.prototype.next function, generators tend to have different Structures due to
different Prototype and accessing internal fields with get_by_id_direct sadly becomes super megamorphic while it is not necessary.
And every time new Structure for new generator pops up, DFG/FTL code for generator resume function gets OSR exit or eventually this function gets
emits super generic code unfortunately. By using internal fields for storing these state, we can avoid this performance problem.

Bytecodes and corresponding DFG nodes are just renamed. JSPromise is now inheriting JSInternalFieldsObjectImpl, which can holds specified
number of internal fields. And op_get_internal_field / op_put_internal_field can access these internal fields.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/Opcode.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetInternalField):
(JSC::BytecodeGenerator::emitPutInternalField):
(JSC::BytecodeGenerator::emitGetPromiseInternalField): Deleted.
(JSC::BytecodeGenerator::emitPutPromiseInternalField): Deleted.

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_getPromiseInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putPromiseInternalField):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasInternalFieldIndex):
(JSC::DFG::Node::hasHeapPrediction):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetInternalField):
(JSC::DFG::SpeculativeJIT::compilePutInternalField):
(JSC::DFG::SpeculativeJIT::compileCreatePromise):
(JSC::DFG::SpeculativeJIT::compileNewPromise):
(JSC::DFG::SpeculativeJIT::compileGetPromiseInternalField): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutPromiseInternalField): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewPromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileGetInternalField):
(JSC::FTL::DFG::LowerDFGToB3::compilePutInternalField):
(JSC::FTL::DFG::LowerDFGToB3::compileGetPromiseInternalField): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compilePutPromiseInternalField): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
(JSC::JIT::emit_op_get_promise_internal_field): Deleted.
(JSC::JIT::emit_op_put_promise_internal_field): Deleted.

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
(JSC::JIT::emit_op_get_promise_internal_field): Deleted.
(JSC::JIT::emit_op_put_promise_internal_field): Deleted.

  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSInternalFieldObjectImpl.h: Copied from Source/JavaScriptCore/runtime/JSPromise.h.

(JSC::JSInternalFieldObjectImpl::allocationSize):
(JSC::JSInternalFieldObjectImpl::internalField const):
(JSC::JSInternalFieldObjectImpl::internalField):
(JSC::JSInternalFieldObjectImpl::offsetOfInternalFields):
(JSC::JSInternalFieldObjectImpl::offsetOfInternalField):
(JSC::JSInternalFieldObjectImpl::JSInternalFieldObjectImpl):

  • runtime/JSInternalFieldObjectImplInlines.h: Added.

(JSC::JSInternalFieldObjectImpl<passedNumberOfInternalFields>::visitChildren):

  • runtime/JSPromise.cpp:

(JSC::JSPromise::finishCreation):
(JSC::JSPromise::visitChildren):
(JSC::JSPromise::status const):
(JSC::JSPromise::result const):
(JSC::JSPromise::isHandled const):

  • runtime/JSPromise.h:

(JSC::JSPromise::allocationSize): Deleted.
(JSC::JSPromise::offsetOfInternalFields): Deleted.
(JSC::JSPromise::offsetOfInternalField): Deleted.
(): Deleted.

2:44 PM Changeset in webkit [249546] by Jonathan Bedard
  • 4 edits in trunk/Tools

results.webkit.org: Retain certain parameters when following menu links
https://bugs.webkit.org/show_bug.cgi?id=201463

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/site_menu.py:

(SiteMenu.add_endpoint): Allow added endpoints to define parameters to be retained.

  • resultsdbpy/resultsdbpy/view/templates/base.html: When clicking on a site-menu link,

retain the specified parameters

  • resultsdbpy/resultsdbpy/view/view_routes.py:

(ViewRoutes.init):

2:29 PM Changeset in webkit [249545] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC] LayoutState should not need the initial containing block
https://bugs.webkit.org/show_bug.cgi?id=201511
<rdar://problem/55079241>

Reviewed by Antti Koivisto.

Throw-away layouts should just be able to initialize a dedicated LayoutState without passing in the ICB.

  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::markNeedsUpdate):
(WebCore::Layout::LayoutState::run):
(WebCore::Layout::LayoutState::LayoutState): Deleted.

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::initialContainingBlock const): Deleted.

  • layout/Verification.cpp:

(WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):

  • layout/floats/FloatingContext.cpp: Fix a (very sad)typo.

(WebCore::Layout::FloatingContext::constraints const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::printLayoutTreeForLiveDocuments):

2:19 PM Changeset in webkit [249544] by russell_e@apple.com
  • 3 edits in trunk/LayoutTests

Layout Test media/audio-concurrent-supported.html is a flaky failure.
rdar://55081191

Unreviewed Test Gardening.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
2:13 PM Changeset in webkit [249543] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r247463.
https://bugs.webkit.org/show_bug.cgi?id=201515

JetStream2 code-load related regression (Requested by
yusukesuzuki on #webkit).

Reverted changeset:

"Keyword lookup can use memcmp to get around unaligned load
undefined behavior"
https://bugs.webkit.org/show_bug.cgi?id=199650
https://trac.webkit.org/changeset/247463

2:12 PM Changeset in webkit [249542] by Chris Dumez
  • 62 edits in trunk

[WK2] Add proper layout test support for ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=201475

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • IndexedDB-private-browsing/support.js:

Tools:

Add proper layout test support for ephemeral sessions via:
<!-- webkit-test-runner [ useEphemeralSession=true ] -->

This actually creates a new WebView using an ephemeral data store to load the test which
is *true* private browsing.

testRunner.setPrivateBrowsingEnabled() merely overrides the Page's sessionID in the WebContent
process, which is a hack and does not truly enable private browsing because the UIProcess and
the NetworkProcess are not properly updated on WK2. This patch renames testRunner.setPrivateBrowsingEnabled()
to testRunner.setPrivateBrowsingEnabled_DEPRECATED() to discourage its use since I am try to
get rid of it.

Note that WK2 does not support using a WebContent process for different sessions / data stores.
Each WebContent process has a single associated data store and testRunner.setPrivateBrowsingEnabled()
is currently the only exception to that. This leads to additional complexity in our code base (e.g. in ITP),
simply to support testRunner.setPrivateBrowsingEnabled().

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestRunner.cpp:

(TestRunner::staticFunctions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setPrivateBrowsingEnabled_DEPRECATED):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::generatePageConfiguration):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView):

LayoutTests:

Update existing layout tests to either switch to the new mechanism when trivial or to rename
setPrivateBrowsingEnabled() to setPrivateBrowsingEnabled_DEPRECATED() when it is not.

  • crypto/subtle/rsa-indexeddb-non-exportable-private.html:
  • crypto/subtle/rsa-indexeddb-private.html:
  • http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html:
  • http/tests/adClickAttribution/resources/util.js:

(tearDownAndFinish):

  • http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html:
  • http/tests/cache-storage/cache-persistency.https.html:
  • http/tests/cache-storage/cache-representation.https.html:
  • http/tests/cache/disk-cache/disk-cache-vary-cookie.html:
  • http/tests/cookies/private-cookie-storage.html:
  • http/tests/media/now-playing-info-private-browsing.html:
  • http/tests/security/appcache-in-private-browsing.html:
  • http/tests/security/appcache-switching-private-browsing.html:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.php:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.php:
  • http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.php:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.php:
  • http/tests/security/cookies/resources/first-party-cookie-allow.xsl:
  • http/tests/security/cookies/resources/third-party-cookie-blocking.xsl:
  • http/tests/security/cookies/third-party-cookie-blocking-main-frame.html:
  • http/tests/security/cookies/third-party-cookie-blocking-redirect.html:
  • http/tests/security/cookies/third-party-cookie-blocking-user-action.html:
  • http/tests/security/cookies/third-party-cookie-blocking.html:
  • http/tests/security/cross-frame-access-private-browsing.html:
  • http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed.html:
  • http/tests/security/cross-origin-plugin-private-browsing-toggled.html:
  • http/tests/security/private-browsing-http-auth.html:
  • http/tests/security/storage-blocking-loosened-private-browsing-plugin.html:
  • http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html:
  • http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html:
  • http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode.html:
  • http/tests/storageAccess/has-storage-access-true-if-feature-off.html:
  • http/tests/workers/service/resources/basic-register.js:

(async.test):

  • http/tests/workers/service/serviceworker-private-browsing.https.html:
  • http/wpt/fetch/dnt-header-after-redirection.html:
  • platform/wk2/TestExpectations:
  • plugins/private-browsing-mode-2.html:
  • plugins/private-browsing-mode.html:
  • resources/js-test.js:
  • storage/domstorage/localstorage/private-browsing-affects-storage.html:
  • storage/domstorage/localstorage/resources/private-browsing-1.html:
  • storage/domstorage/localstorage/resources/private-browsing-2.html:
  • storage/indexeddb/open-db-private-browsing.html:
  • storage/indexeddb/resources/open-db-private-browsing.js:
  • storage/websql/private-browsing-noread-nowrite.html:
  • storage/websql/private-browsing-open-disabled.html:
2:01 PM Changeset in webkit [249541] by Kocsen Chung
  • 1 copy in tags/Safari-609.1.3.2

Tag Safari-609.1.3.2.

1:55 PM Changeset in webkit [249540] by Kocsen Chung
  • 7 edits in tags/Safari-609.1.3.1/Source

Versioning.

12:21 PM Changeset in webkit [249539] by Justin Fan
  • 22 edits
    4 copies
    1 add in trunk

[WebGPU] Implement GPUUncapturedErrorEvent
https://bugs.webkit.org/show_bug.cgi?id=199676

Reviewed by Dean Jackson.

Source/WebCore:

Implement GPUUncapturedErrorEvent and "uncapturederror" event name.
Add the onuncapturederror EventHandler attribute to GPUDevice.

Test: webgpu/uncaptured-errors.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webgpu/GPUUncapturedErrorEvent.cpp:

(WebCore::GPUUncapturedErrorEvent::create):
(WebCore::GPUUncapturedErrorEvent::GPUUncapturedErrorEvent):
(WebCore::GPUUncapturedErrorEvent::eventInterface const):

  • Modules/webgpu/GPUUncapturedErrorEvent.h:
  • Modules/webgpu/GPUUncapturedErrorEvent.idl:
  • Modules/webgpu/WebGPUAdapter.cpp: Must now provide ScriptExecutionContext to any created GPUDevice.

(WebCore::WebGPUAdapter::requestDevice const):

  • Modules/webgpu/WebGPUAdapter.h:
  • Modules/webgpu/WebGPUAdapter.idl:
  • Modules/webgpu/WebGPUDevice.cpp: Is now an EventTarget.

(WebCore::WebGPUDevice::tryCreate):
(WebCore::WebGPUDevice::WebGPUDevice):
(WebCore::printValidationErrorToConsole):
(WebCore::WebGPUDevice::dispatchUncapturedError): Events should only be fired from the main thread.

  • Modules/webgpu/WebGPUDevice.h:
  • Modules/webgpu/WebGPUDevice.idl:
  • Modules/webgpu/WebGPUDeviceEventHandler.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/EventNames.h:
  • dom/EventNames.in:
  • dom/EventTargetFactory.in:
  • platform/graphics/gpu/GPUError.cpp: GPUErrors can only be created internally; creation should never fail.

(WebCore::createError):

  • platform/graphics/gpu/GPUError.h:
  • platform/graphics/gpu/GPUErrorScopes.cpp:

(WebCore::GPUErrorScopes::create):
(WebCore::GPUErrorScopes::GPUErrorScopes):
(WebCore::GPUErrorScopes::generateError): Use a callback for now, since GPUErrorScopes is still under platform.

  • platform/graphics/gpu/GPUErrorScopes.h:

(WebCore::GPUErrorScopes::create): Deleted.

LayoutTests:

Add a test to ensure GPUUncapturedErrorEvents work.

  • webgpu/uncaptured-errors.html: Added.
11:47 AM Changeset in webkit [249538] by Tadeu Zagallo
  • 5 edits
    1 add in trunk

LazyClassStructure::setConstructor should not store the constructor to the global object
https://bugs.webkit.org/show_bug.cgi?id=201484
<rdar://problem/50400451>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/web-assembly-constructors-should-not-override-global-object-property.js: Added.

Source/JavaScriptCore:

LazyClassStructure::setConstructor sets the constructor as a property of the global object.
This became a problem when it started being used for WebAssembly constructors, such as Module
and Instance, since they are properties of the WebAssembly object, not the global object. That
resulted in properties of the global object replaced whenever a lazy WebAssembly constructor
was first accessed. e.g.

globalThis.Module = x;
WebAssembly.Module;
globalThis.Module === WebAssembly.Module;

  • runtime/LazyClassStructure.cpp:

(JSC::LazyClassStructure::Initializer::setConstructor):

  • runtime/LazyClassStructure.h:
  • runtime/Lookup.h:

(JSC::reifyStaticProperty):

11:29 AM Changeset in webkit [249537] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] Layout Test imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html is failing
https://bugs.webkit.org/show_bug.cgi?id=201509

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations: Mark test as failing.
11:03 AM Changeset in webkit [249536] by Antti Koivisto
  • 6 edits in trunk

Generate event region for both the main graphics layer and the scrolled contents layer
https://bugs.webkit.org/show_bug.cgi?id=201487

Reviewed by Simon Fraser.

Source/WebCore:

We currently generate region for one of them only. With borders both need it.

Also share more code with painting paths.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateEventRegion):

Generate region for both layers.

(WebCore::RenderLayerBacking::paintIntoLayer):

Add event region context parameter so we can use this function for event region update too.

  • rendering/RenderLayerBacking.h:

LayoutTests:

  • pointerevents/ios/touch-action-region-backing-sharing-expected.txt:
  • pointerevents/ios/touch-action-region-overflow-expected.txt:
10:44 AM Changeset in webkit [249535] by rniwa@webkit.org
  • 8 edits
    3 adds in trunk

REGRESSION (iOS 13): Bulleted list copied from Notes to Mail results in Times New Roman
https://bugs.webkit.org/show_bug.cgi?id=201490

Reviewed by Daniel Bates.

Source/WebCore:

The bug was caused by an element in the pasted content not having any explicit font name resolving
to use the font-family value of -webkit-standard. When such an inline style is inserted into
Mail's WKWebView which sets a different font family, ReplaceSelectionCommand would fail to strip away,
making the pasted content using the default font family of Times New Roman.

Fixed the bug by stripping away font-family set to -webkit-standard in the sanitization document
since that's indicative of the pasted content not having any font family being specified.

In the future, we should consider making regular copy (as opposed to the copy for sanitization)
resolve generic font family names to concrete font names since different WKWebView might be using
different concrete font names. Unfortuantely, such a change is quite involved and risky since various
paste side code in EditingStyle that removes redundant inline styles (i.e. redundant font-family)
need to be aware of this special font family resolution.

Tests: editing/pasteboard/paste-cocoa-writer-markup-with-webkit-standard-font-family.html

PasteHTML.DoesNotAddStandardFontFamily

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::EditingStyle::wrappingStyleForSerialization):
(WebCore::familyNameFromCSSPrimitiveValue): Added.
(WebCore::loneFontFamilyName): Extracted from usesForbiddenSystemFontAsOnlyFontFamilyName. Fixed
a bug that it was not handling the case when font-family property's value is a CSSPrimitiveValue
instead of a CSSValueList.
(WebCore::usesForbiddenSystemFontAsOnlyFontFamilyName): Deleted.
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization): Remove font-family property when
StandardFontFamilySerializationMode::Strip is specified and its value is -webkit-standard.

  • editing/EditingStyle.h:
  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Added
StandardFontFamilySerializationMode as an argument.
(WebCore::StyledMarkupAccumulator::appendStartTag):
(WebCore::StyledMarkupAccumulator::serializeNodes):
(WebCore::serializePreservingVisualAppearanceInternal): Ditto.
(WebCore::serializePreservingVisualAppearance): Use StandardFontFamilySerializationMode::Keep
to preserve the pre-existing behavior.
(WebCore::sanitizedMarkupForFragmentInDocument): Use StandardFontFamilySerializationMode::Strip
as this is the code used by sanitization code.

Tools:

Added a test.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/cocoa-writer-markup-with-lists.html: Added.

LayoutTests:

Added a test to make sure -webkit-standard font family name isn't stripped away when sanitization is not in effect.

  • editing/pasteboard/paste-cocoa-writer-markup-with-webkit-standard-font-family-expected.txt: Added.
  • editing/pasteboard/paste-cocoa-writer-markup-with-webkit-standard-font-family.html: Added.
10:27 AM Changeset in webkit [249534] by Chris Fleizach
  • 3 edits
    2 adds in trunk

AX: children cache are not re-computed if tab index is removed
https://bugs.webkit.org/show_bug.cgi?id=201502

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: accessibility/tabindex-removed.html

If the tabindex changes, it can potentially affect whether an element is accessible. If we don't update the children cache
information can be stale and lead to incorrect navigation with VoiceOver.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChange):

LayoutTests:

  • accessibility/tabindex-removed-expected.txt: Added.
  • accessibility/tabindex-removed.html: Added.
10:11 AM Changeset in webkit [249533] by sihui_liu@apple.com
  • 10 edits in trunk/Source/WebKit

Remove StorageArea pointers in StorageManagerSet when removing StorageManagers that own them
https://bugs.webkit.org/show_bug.cgi?id=201324

Reviewed by Alex Christensen.

  • NetworkProcess/WebStorage/LocalStorageNamespace.cpp:

(WebKit::LocalStorageNamespace::storageAreaIdentifiers const):

  • NetworkProcess/WebStorage/LocalStorageNamespace.h:
  • NetworkProcess/WebStorage/SessionStorageNamespace.cpp:

(WebKit::SessionStorageNamespace::storageAreaIdentifiers const):

  • NetworkProcess/WebStorage/SessionStorageNamespace.h:
  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::allStorageAreaIdentifiers const):

  • NetworkProcess/WebStorage/StorageManager.h:
  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::remove):

  • NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:

(WebKit::TransientLocalStorageNamespace::storageAreaIdentifiers const):

  • NetworkProcess/WebStorage/TransientLocalStorageNamespace.h:
10:01 AM Changeset in webkit [249532] by Michael Catanzaro
  • 1 edit in trunk/Tools/Scripts/webkitpy/common/config/contributors.json

Unreviewed, update contributors.json

People are having trouble CCing me on Bugzilla.

I'm still at Igalia, but no longer working on WebKit.

  • Scripts/webkitpy/common/config/contributors.json:
9:56 AM Changeset in webkit [249531] by Konstantin Tokarev
  • 3 edits in trunk/Source/WebCore

Don't call PlatformMediaSessionManager methods when neither VIDEO nor WEB_AUDIO is enabled
https://bugs.webkit.org/show_bug.cgi?id=201508

Reviewed by Jer Noble.

Definitions of these methods are guarded with #if ENABLE(VIDEO)
ENABLE(WEB_AUDIO),

so calling them causes linking errors.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldDeactivateAudioSession):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::processWillSuspend):
(WebCore::Internals::processDidResume):
(WebCore::Internals::setIsPlayingToAutomotiveHeadUnit):

8:51 AM Changeset in webkit [249530] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Do not use FTLOutput::weakPointer directly
https://bugs.webkit.org/show_bug.cgi?id=201495

Reviewed by Filip Pizlo.

JSTests:

  • stress/create-promise-weak-pointer.js: Added.

(foo):

Source/JavaScriptCore:

FTLOutput::weakPointer does not register the cell as a weak pointer.
CreatePromise's implementation is accidentally using m_out.weakPointer and hits the debug assertion.
While the current implementation is not posing correctness issue since these cells are live so long as JSGlobalObject is live,
and we register JSGlobalObject as a weakPointer, we should always use FTLLowerDFGToB3's helper function.
For FrozenValue, we should use frozenPointer helper function.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayBuffer):

7:48 AM Changeset in webkit [249529] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

REGRESSION(r249275): [GTK][WPE] wrong page ID returned by webkit_web_view_get_page_id()
https://bugs.webkit.org/show_bug.cgi?id=201504

Reviewed by Michael Catanzaro.

We want to return the page identifier not the web page proxy id.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_get_page_id):

7:21 AM Changeset in webkit [249528] by Pablo Saavedra
  • 2 edits in trunk/Source/WebKit

Build failure after r249501 for ports with SERVICE_WORKER set OFF
https://bugs.webkit.org/show_bug.cgi?id=201503

Reviewed by Youenn Fablet.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

3:53 AM Changeset in webkit [249527] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Fix implicit conversion that loses precision
https://bugs.webkit.org/show_bug.cgi?id=201476
<rdar://problem/55043129>

Reviewed by Youenn Fablet, Alex Christensen.

Building for watchOS results in the following error:

.../Source/WebCore/fileapi/NetworkSendQueue.cpp:66:42: error: implicit conversion loses integer precision: 'unsigned long long' to 'unsigned int' [-Werror,-Wshorten-64-to-32]

enqueue(JSC::ArrayBuffer::create(byteLength, 1), 0, 0);

Fix this by replacing byteLength (which is known to be zero at this
point) with 0U.

No new tests -- no new or changed functionality.

  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::enqueue):

2:01 AM Changeset in webkit [249526] by youenn@apple.com
  • 17 edits
    2 adds in trunk

Introduce WorkerSWClientConnection to make SWClientConnection mono-thread
https://bugs.webkit.org/show_bug.cgi?id=201430

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Remove inserted iframes to make test outputs more stable.

  • web-platform-tests/service-workers/service-worker/activation.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/activation.https.html:
  • web-platform-tests/service-workers/service-worker/detached-context.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/detached-context.https.html:

Source/WebCore:

Make SWClientConnection RefCounted.
Add a WorkerSWClientConnection dedicated to be used by worker/service worker contexts.
Simplify ServiceWorkerContainer logic based on this refactoring.

Covered by existing tests.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::swClientConnection):

  • workers/WorkerGlobalScope.h:
  • workers/service/SWClientConnection.cpp:

(WebCore::SWClientConnection::scheduleJob):
(WebCore::SWClientConnection::failedFetchingScript):
(WebCore::SWClientConnection::postTaskForJob):

  • workers/service/SWClientConnection.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::mainThreadConnection):
(WebCore::ServiceWorkerContainer::ready):
(WebCore::ServiceWorkerContainer::scheduleJob):
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::updateRegistrationState):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::notifyRegistrationIsSettled):
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):
(WebCore::ServiceWorkerContainer::ensureSWClientConnection):
(WebCore::ServiceWorkerContainer::stop):

  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerFetchResult.h:

(WebCore::ServiceWorkerFetchResult::isolatedCopy const):

  • workers/service/WorkerSWClientConnection.cpp: Added.

(WebCore::WorkerSWClientConnection::WorkerSWClientConnection):
(WebCore::WorkerSWClientConnection::~WorkerSWClientConnection):
(WebCore::WorkerSWClientConnection::matchRegistration):
(WebCore::WorkerSWClientConnection::getRegistrations):
(WebCore::WorkerSWClientConnection::whenRegistrationReady):
(WebCore::WorkerSWClientConnection::addServiceWorkerRegistrationInServer):
(WebCore::WorkerSWClientConnection::removeServiceWorkerRegistrationInServer):
(WebCore::WorkerSWClientConnection::didResolveRegistrationPromise):
(WebCore::WorkerSWClientConnection::postMessageToServiceWorker):
(WebCore::WorkerSWClientConnection::serverConnectionIdentifier const):
(WebCore::WorkerSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
(WebCore::WorkerSWClientConnection::syncTerminateWorker):
(WebCore::WorkerSWClientConnection::registerServiceWorkerClient):
(WebCore::WorkerSWClientConnection::unregisterServiceWorkerClient):
(WebCore::WorkerSWClientConnection::finishFetchingScriptInServer):
(WebCore::WorkerSWClientConnection::isThrottleable const):
(WebCore::WorkerSWClientConnection::updateThrottleState):
(WebCore::WorkerSWClientConnection::scheduleJob):
(WebCore::WorkerSWClientConnection::scheduleJobInServer):

  • workers/service/WorkerSWClientConnection.h: Added.
12:47 AM Changeset in webkit [249525] by rniwa@webkit.org
  • 2 edits
    1 delete in trunk/Tools

Remove unused SPI that accesses MemoryCache directly
https://bugs.webkit.org/show_bug.cgi?id=201468

Reviewed by Youenn Fablet.

Removed the API test.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/MemoryCacheAddImageToCacheIOS.mm: Removed.

Sep 4, 2019:

11:02 PM Changeset in webkit [249524] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win][Clang] InspectorNetworkAgent.cpp(1122,20): error: cannot decompose this type; 'std::tuple_size<const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WTF::JSONImpl::Value, WTF::DumbPtrTraits<WTF::JSONImpl::Value> > >>::value' is not a valid integral const
https://bugs.webkit.org/show_bug.cgi?id=201489

Unreviewed build fix for clang-cl.

clang-cl 8 can't use a structured binding for a const struct.

No behavior change.

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::interceptWithResponse): Not to use a structured binding for a const struct.

10:51 PM Changeset in webkit [249523] by ysuzuki@apple.com
  • 16 edits in trunk/Source/JavaScriptCore

Unreviewed, partial roll out r249372 due to JetStream2/Basic ~10% regression
https://bugs.webkit.org/show_bug.cgi?id=201373

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitLoopHint):
(JSC::BytecodeGenerator::emitCheckTraps):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • jit/JIT.cpp:

(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_check_traps):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::emitSlow_op_enter): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_enter):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
10:24 PM Changeset in webkit [249522] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[AppleWin] fast/block/float/float-with-anonymous-previous-sibling.html is failing as flaky ImageOnlyFailure
https://bugs.webkit.org/show_bug.cgi?id=201491

Unreviewed test gardening.

  • platform/win/TestExpectations: Marked it.
9:12 PM Changeset in webkit [249521] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview/Safari Technology Preview 91

Added a tag for Safari Technology Preview release 91.

9:01 PM Changeset in webkit [249520] by ysuzuki@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

Unreviewed, rebaseline builtin generator test results
https://bugs.webkit.org/show_bug.cgi?id=200898

Rebaseline the result files.

  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result:
  • Scripts/tests/builtins/expected/WebCore-AnotherGuardedInternalBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result:
8:00 PM Changeset in webkit [249519] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, another build fix after r249501.

  • loader/EmptyFrameLoaderClient.h:
7:52 PM Changeset in webkit [249518] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] FunctionOverrides should have a lock to ensure concurrent access to hash table does not happen
https://bugs.webkit.org/show_bug.cgi?id=201485

Reviewed by Tadeu Zagallo.

FunctionOverrides is a per-process singleton for registering overrides information. But we are accessing
it without taking a lock. If multiple threads with multiple VMs are accessing this concurrently, we have
a race issue like,

  1. While one thread is adding overrides information,
  2. Another thread is accessing this hash table.

This patch adds a lock to make sure that only one thread can access this registry.

  • tools/FunctionOverrides.cpp:

(JSC::FunctionOverrides::FunctionOverrides):
(JSC::FunctionOverrides::reinstallOverrides):
(JSC::FunctionOverrides::initializeOverrideFor):
(JSC::FunctionOverrides::parseOverridesInFile):

  • tools/FunctionOverrides.h:

(JSC::FunctionOverrides::clear):

7:52 PM Changeset in webkit [249517] by timothy@apple.com
  • 15 edits
    3 adds in trunk

Mail appears to be double inverting code copied from Notes, Xcode, or Terminal.
https://bugs.webkit.org/show_bug.cgi?id=201368
rdar://problem/40529867

Reviewed by Ryosuke Niwa.

Source/WebCore:

Dark mode content that is pasted should have the inline styles inverse color
transformed by the color filter to match the color filtered document contents.

Layout Test: editing/pasteboard/paste-dark-mode-color-filtered.html
API Tests: PasteHTML.TransformColorsOfDarkContent, PasteHTML.DoesNotTransformColorsOfLightContent,

PasteRTFD.TransformColorsOfDarkContent, PasteRTFD.DoesNotTransformColorsOfLightContent

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::inverseTransformColorIfNeeded): Added caret-color to the transformed properties.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::fragmentNeedsColorTransformed): Added.
(WebCore::ReplaceSelectionCommand::inverseTransformColor): Added.
(WebCore::ReplaceSelectionCommand::doApply): Call fragmentNeedsColorTransformed() and inverseTransformColor().

  • editing/ReplaceSelectionCommand.h:

Tools:

Added Tests: PasteHTML.TransformColorsOfDarkContent, PasteHTML.DoesNotTransformColorsOfLightContent,

PasteRTFD.TransformColorsOfDarkContent, PasteRTFD.DoesNotTransformColorsOfLightContent

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:

(createWebViewWithCustomPasteboardDataSetting): Added argument to enable color filter.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:

(createWebViewWithCustomPasteboardDataEnabled): Added argument to enable color filter.

  • TestWebKitAPI/Tests/WebKitCocoa/rich-color-filtered.html: Added.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView forceDarkMode]):

LayoutTests:

  • TestExpectations:
  • editing/pasteboard/paste-dark-mode-color-filtered-expected.txt: Added.
  • editing/pasteboard/paste-dark-mode-color-filtered.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
7:38 PM Changeset in webkit [249516] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, drop extra whitespace added in r249515.

  • loader/EmptyFrameLoaderClient.h:
7:36 PM Changeset in webkit [249515] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r249501.

r249501 seems to have exposed the fact that EmptyFrameLoaderClient.h is missing a #pragma once.

  • loader/EmptyFrameLoaderClient.h:
7:36 PM Changeset in webkit [249514] by Wenson Hsieh
  • 5 edits in trunk

MobileSafari may crash when invoking the C++ lambda in -[WKContentView _shareForWebView:]
https://bugs.webkit.org/show_bug.cgi?id=201479
<rdar://problem/51511834>

Reviewed by Tim Horton.

Source/WebKit:

Fix the crash by making -_shareForWebView: robust in the case where there are no selection rects
known in the UI process when -[WKContentView _share:] is invoked.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _shareForWebView:]):

Tools:

Add a test to verify that the UI process doesn't crash when invoking _share: while there's no selection.

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
  • TestWebKitAPI/ios/UIKitSPI.h:
7:20 PM WebKitGTK/2.26.x edited by Patrick Griffis
(diff)
7:15 PM Changeset in webkit [249513] by Devin Rousso
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: unify the interaction of show/hide status icons in Sources and Canvas
https://bugs.webkit.org/show_bug.cgi?id=201470

Reviewed by Joseph Pecoraro.

Rather than "fading" the tree element's text when the underlying represented object is
disabled/blackboxed, we should just "fade" the icon. The "fade" shouldn't change when the
tree element is selected. The image of the status eye also shouldn't change depending on
whether the underlying represented object is disabled/blackboxed, as it being visible (even
if it's "faded") is already enough of an indicator.

It should also be possible to toggle the disabled/blackboxed state via the context menu.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForSourceCode):

  • UserInterface/Views/SourceCodeTreeElement.css:

(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed, .tree-outline .item:not(:hover) .status > .toggle-script-blackboxed:not(.blackboxed)): Added.
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed, .tree-outline .item:not(:hover, .selected) .status > .toggle-script-blackboxed:not(.blackboxed)): Deleted.

  • UserInterface/Models/ShaderProgram.js:

(WI.ShaderProgram):
(WI.ShaderProgram.prototype.get disabled): Added.
(WI.ShaderProgram.prototype.set disabled): Added.
(WI.ShaderProgram.prototype.toggleDisabled): Deleted.

  • UserInterface/Views/ShaderProgramTreeElement.js:

(WI.ShaderProgramTreeElement.prototype.onattach):
(WI.ShaderProgramTreeElement.prototype.ondetach): Added.
(WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
(WI.ShaderProgramTreeElement.prototype.populateContextMenu): Added.
(WI.ShaderProgramTreeElement.prototype._disabledImageElementClicked):
(WI.ShaderProgramTreeElement.prototype._handleShaderProgramDisabledChanged): Added.

  • UserInterface/Views/ShaderProgramTreeElement.css:

(.tree-outline .item.shader-program .status > img): Added.
(.tree-outline .item.shader-program:not(:hover, .selected, .disabled) .status > img): Added.
(.tree-outline .item.shader-program.disabled .status > img): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item.shader-program .status > img): Added.
(.item.shader-program .status > img): Deleted.
(.item.shader-program.disabled:hover .status > img): Deleted.
(.item.shader-program:not(:hover, .selected, .disabled) .status > img): Deleted.
(.item.shader-program.disabled > :not(.status)): Deleted.
(@media (prefers-color-scheme: dark) .item.shader-program .status > img): Deleted.

7:11 PM Changeset in webkit [249512] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebKit

Replace defaultCustomPasteboardDataEnabled by an equivalent macro
https://bugs.webkit.org/show_bug.cgi?id=201477

Reviewed by Wenson Hsieh.

r227282 introduced defaultCustomPasteboardDataEnabled() to disable the custom pasteboard data on
apps linked against old SDKs. However, this had a bug that the check inside WebContent process
would always return true because WebContent process is always linked against the latest SDKs.
Because WebPreferences values aren't propagated from UI process to WebContent process unless
there is a value change, it meant that custom pasteboard data is always enabled.

This patch replaces this function with a simple macro which always enables the custom pasteboard
data on iOS family and macOS as it has always been the case before and after r227282.

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCustomPasteboardDataEnabled): Deleted.

  • Shared/WebPreferencesDefaultValues.h:
6:39 PM Changeset in webkit [249511] by Simon Fraser
  • 7 edits
    2 adds in trunk

Cancelled transitions on Google image search leave content with opacity 0 sometimes
https://bugs.webkit.org/show_bug.cgi?id=201482
rdar://problem/54921036

Reviewed by Tim Horton.
Source/WebCore:

If, in a single rendering update, we started an accelerated opacity transition, and then removed
it, we'd still push the transition onto the CALayer with fillForwards and never remove it, so its
effects would last forever.

Fix by making GraphicsLayerCA::removeAnimation() remove animations from the uncomittedAnimations
list as well.

Also fix layer names in debug; if a layer's primaryLayerID changed, we'd fail to rename the
CALayer, causing confusion when logging at layer dumps. Fix by adding the layer ID just
before pushing the name to the platform layer.

Some drive-by logging cleanup.

Test: legacy-animation-engine/compositing/transitions/add-remove-transition.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::debugName const):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::debugName const):
(WebCore::GraphicsLayerCA::addAnimation):
(WebCore::GraphicsLayerCA::pauseAnimation):
(WebCore::GraphicsLayerCA::seekAnimation):
(WebCore::GraphicsLayerCA::removeAnimation):
(WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
(WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
(WebCore::GraphicsLayerCA::updateNames):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):

LayoutTests:

  • legacy-animation-engine/compositing/transitions/add-remove-transition-expected.html: Added.
  • legacy-animation-engine/compositing/transitions/add-remove-transition.html: Added.
6:33 PM Changeset in webkit [249510] by Kocsen Chung
  • 1 copy in tags/Safari-608.3.1

Tag Safari-608.3.1.

6:23 PM Changeset in webkit [249509] by ysuzuki@apple.com
  • 117 edits
    1 copy
    21 adds in trunk

[JSC] Make Promise implementation faster
https://bugs.webkit.org/show_bug.cgi?id=200898

Reviewed by Saam Barati.

JSTests:

  • ChakraCore/test/UnitTestFramework/UnitTestFramework.js:

(assert.assert.return.throws):

  • modules/breaking-builtin-promise-then-does-not-break-internal-promise.js: Added.
  • modules/breaking-builtin-promise-then-does-not-break-internal-promise/test.js: Added.
  • stress/constructor-kind-naked-should-not-be-applied-to-inner-functions.js: Added.

(shouldThrow):
(new.Promise):
(shouldThrow.Promise):

  • stress/create-promise-should-respect-promise-realm.js: Added.

(shouldBe):
(other.new.OtherPromise):
(DerivedOtherPromise):
(i.promise.new.DerivedOtherPromise):
(createPromise):

  • stress/derived-promise-constructor-class-syntax-prototype-replace-attempt.js: Added.

(shouldBe):
(DerivedPromise):
(i.array.push.new.DerivedPromise):
(promise.new.DerivedPromise):

  • stress/derived-promise-constructor-inlined.js: Added.

(shouldBe):
(DerivedPromise):
(i.array.push.new.DerivedPromise):
(DerivedPromise.all.array.then):

  • stress/derived-promise-prototype-replaced.js: Added.

(shouldBe):
(DerivedPromise):
(i.array.push.new.DerivedPromise):
(promise.new.DerivedPromise):

  • stress/internal-promise-constructor-not-confusing.js: Added.

(shouldBe):
(InternalPromise.vm.createBuiltin):
(DerivedPromise):

  • stress/internal-promise-is-not-exposed.js: Added.

(shouldBe):

  • stress/new-promise-should-respect-promise-realm.js: Added.

(shouldBe):
(other.new.OtherPromise):
(createPromise):

  • stress/promise-cannot-be-called.js:

(shouldThrow):

  • stress/promise-capability-fast-path.js: Added.

(shouldBe):
(i.array.push.new.Promise):
(i.array.i.then):

  • stress/promise-capability-slow-path.js: Added.

(shouldBe):
(Promise.prototype.then):
(i.array.push.new.Promise):
(i.array.i.then):

  • stress/promise-capability-then-slow-path.js: Added.

(shouldBe):
(DerivedPromise):
(DerivedPromise.prototype.then):
(i.array.push.new.DerivedPromise):
(i.array.i.then):

  • stress/promise-constructor-inlined.js: Added.

(shouldBe):
(i.array.push.new.Promise):
(Promise.all.array.then):

  • stress/promise-constructor-transition-from-new-promise-to-create-promise.js: Added.

(shouldBe):
(DerivedPromise):
(DerivedPromise2):
(i.array.push.new.DerivedPromise):
(i.array2.push.new.DerivedPromise2):

  • stress/without-promise-functions.js: Added.

(shouldBe):
(async):

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/JavaScriptCore:

This is the major change of the Promise implementation and it improves JetStream2/async-fs by 62%.

  1. Make JSPromise C++ friendly

Instead of using objects with private properties (properties with private symbols), we put internal fields in JSPromise.
This avoids allocating unnecessary butterflies for these private fields, and makes allocating JSPromise and accessing these
fields from C++ easy. Moreover, this patch reduces # of fields of JSPromise from 4 to 2 to make JSPromise compact. To access these internal
fields efficiently from JS, we add op_get_promise_internal_field and op_put_promise_internal_field bytecodes, and corresponding DFG/FTL
supports. They are similar to GetClosureVar / PutClosureVar implementation. These two bytecodes are intentionally generic to later expand
this support to generator and async-generator by renaming them to op_get_internal_field and op_put_internal_field. It is filed in [1].

We also add JSPromiseType as JSType. And structures for JSPromise should have that. So that now @isPromise is efficiently implemented.
This also requires adding SpecPromiseObject and PromiseObjectUse to DFG.

Further, by introducing another bit flag representing alreadyResolved to JSPromise's flags, we can remove JSPromiseDeferred. This extension
is filed in [2].

  1. Make JSPromise constructor JS friendly

The old JSPromise constructor was very inefficient: JSPromise constructor is InternalFunction in C++, and in it, it
calls initializePromise JS function. And this initializePromise function invokes executor function passed by user program.
If we can implement JSPromise constructor fully in JS, we can recognize executor and we have a chance to fully inline them.
Unfortunately, we cannot inline JSPromise constructor for now since it takes 120 bytecode cost while our inlining threshold for
construct is 100. We might want to investigate getting it inlined in the future[3].

We can avoid C++ <-> JS dance in such an important operation, allocating JSPromise. This patch introduces @nakedConstructor
annotation to builtin JS. And this is propagated as ConstructorKind::Naked. If this kind is attached, the bytecode generator
do not emit op_create_this implicitly and the constructor does not return this object implicitly. The naked constructor allows
us to emit bare-metal bytecode, specifically necessary to allocate non-final JSObject from JS constructor. We introduce op_create_promise,
which is similar to op_create_this, but it allocates JSPromise. And by using @createPromise bytecode intrinsic, we implement
JSPromise constructor fully in JS.
With this, we can start introducing object-allocation-sinking for JSPromise too. It is filed in [4].

  1. DFG supports for JSPromise operations

This patch adds four DFG nodes, CreatePromise, NewPromise, GetPromiseInternalField, and PutPromiseInternalField. CreatePromise mimics CreateThis,
and NewPromise mimics NewObject. CreatePromise can be converted to NewPromise with some condition checks and NewPromise can efficiently allocate
promises. CreatePromise and NewPromise have isInternalPromise flag so that InternalPromise is also correctly handled in DFG.
When converting CreatePromise to NewPromise, we need to get the correct structure with a specified callee.prototype. We mimic the mechanism
used in CreateThis, but we use InternalFunctionAllocationProfile instead of ObjectAllocationProfile because (1) InternalFunctionAllocationProfile
can handle non-final JSObjects and (2) we do not need to handle inline-capacity for promises. To make InternalFunctionAllocationProfile usable
in DFG, we connect watchpoint to InternalFunctionAllocationProfile's invalidation so that DFG code can notice when InternalFunctionAllocationProfile's
structure is invalidated: callee.prototype is replaced.

  1. Avoid creating unnecessary promises

Some promises are never shown to users, and they are never rejected. One example is await's promise. And some of promise creation can be avoided.
For example, when resolving a value with Promise.resolve, if a value is promise and if it's then method is the builtin then, we can avoid creating
intermediate promise. To handle these things well, we introduce @resolveWithoutPromise, @rejectWithoutPromise, and @fulfillWithoutPromise. They
take onFulfilled and onRejected handlers and they do not need an intermediate promise for resolving. This removes internal promise allocations
in major cases and makes promise / async-functions efficient. And we also expose builtin then function as @then, and insert @isPromise(xxx) && then === @then
check to take a fast path. We introduced four types of promise reactions to avoid some of object allocations. And microtask reaction is handling these four types.

  1. Avoid creating resolving-functions and promise capabilities

Resolving functions have alreadyResolved flag to prevent calling resolve and reject multiple times. For the first resolving function creation, this
patch embeds one bit flag to JSPromise itself which indicates alreadyResolved in the first created resolving functions (resolving functions can be later
created again for the same promise. In that case, we just create a usual resolving functions). By doing so, we avoid unnecessary resolving functions
and promise capability allocations. We introduce a wrapper function @resolvePromiseWithFirstResolvingFunctionCallCheck and @rejectPromiseWithFirstResolvingFunctionCallCheck.
The resolving functions which are first created with @newPromiseCapability can be mechanically replaced with the calls to these functions, e.g. replacing
promiseCapability.@resolve.@call(@undefined, value) with @resolvePromiseWithFirstResolvingFunctionCallCheck(promise, value).
This mechanism will be used to drop JSPromiseDeferred in a separate patch.

JetStream2/async-fs results.

ToT:

Running async-fs:

Startup: 116.279
Worst Case: 151.515
Average: 176.630
Score: 145.996
Wall time: 0:01.149

Patched:

Running async-fs:

Startup: 166.667
Worst Case: 267.857
Average: 299.080
Score: 237.235
Wall time: 0:00.683

[1]: https://bugs.webkit.org/show_bug.cgi?id=201159
[2]: https://bugs.webkit.org/show_bug.cgi?id=201160
[3]: https://bugs.webkit.org/show_bug.cgi?id=201452
[4]: https://bugs.webkit.org/show_bug.cgi?id=201158

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/wkbuiltins/builtins_generate_combined_header.py:

(ConstructAbility):
(ConstructorKind):

  • Scripts/wkbuiltins/builtins_generate_separate_header.py:
  • Scripts/wkbuiltins/builtins_generator.py:

(BuiltinsGenerator.generate_embedded_code_data_for_function):
(BuiltinsGenerator.generate_embedded_code_string_section_for_data):

  • Scripts/wkbuiltins/builtins_model.py:

(BuiltinFunction.init):
(BuiltinFunction.fromString):

  • Scripts/wkbuiltins/builtins_templates.py:
  • builtins/AsyncFromSyncIteratorPrototype.js:

(next.try):
(next):
(return.try):
(return):
(throw.try):
(throw):

  • builtins/AsyncFunctionPrototype.js:

(globalPrivate.asyncFunctionResume):

  • builtins/AsyncGeneratorPrototype.js:

(globalPrivate.asyncGeneratorQueueIsEmpty):
(globalPrivate.asyncGeneratorQueueEnqueue):
(globalPrivate.asyncGeneratorQueueDequeue):
(globalPrivate.asyncGeneratorReject):
(globalPrivate.asyncGeneratorResolve):
(globalPrivate.asyncGeneratorYield):
(onRejected):
(globalPrivate.awaitValue):
(onFulfilled):
(globalPrivate.doAsyncGeneratorBodyCall):
(globalPrivate.asyncGeneratorResumeNext):
(globalPrivate.asyncGeneratorEnqueue):
(globalPrivate.asyncGeneratorDequeue): Deleted.
(const.onRejected): Deleted.
(const.onFulfilled): Deleted.
(globalPrivate.asyncGeneratorResumeNext.): Deleted.

  • builtins/BuiltinExecutableCreator.h:
  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::defaultConstructorSourceCode):
(JSC::BuiltinExecutables::createDefaultConstructor):
(JSC::BuiltinExecutables::createBuiltinExecutable):
(JSC::BuiltinExecutables::createExecutable):
(JSC::createBuiltinExecutable): Deleted.

  • builtins/BuiltinExecutables.h:
  • builtins/BuiltinNames.h:
  • builtins/BuiltinUtils.h:
  • builtins/ModuleLoader.js:

(forceFulfillPromise):

  • builtins/PromiseConstructor.js:

(nakedConstructor.Promise.resolve):
(nakedConstructor.Promise.reject):
(nakedConstructor.Promise):
(nakedConstructor.InternalPromise.resolve):
(nakedConstructor.InternalPromise.reject):
(nakedConstructor.InternalPromise):

  • builtins/PromiseOperations.js:

(globalPrivate.newPromiseReaction):
(globalPrivate.newPromiseCapability):
(globalPrivate.newHandledRejectedPromise):
(globalPrivate.triggerPromiseReactions):
(globalPrivate.resolvePromise):
(globalPrivate.rejectPromise):
(globalPrivate.fulfillPromise):
(globalPrivate.resolvePromiseWithFirstResolvingFunctionCallCheck):
(globalPrivate.rejectPromiseWithFirstResolvingFunctionCallCheck):
(globalPrivate.createResolvingFunctions.resolve):
(globalPrivate.createResolvingFunctions.reject):
(globalPrivate.createResolvingFunctions):
(globalPrivate.promiseReactionJobWithoutPromise):
(globalPrivate.resolveWithoutPromise):
(globalPrivate.rejectWithoutPromise):
(globalPrivate.fulfillWithoutPromise):
(resolve):
(reject):
(globalPrivate.createResolvingFunctionsWithoutPromise):
(globalPrivate.promiseReactionJob):
(globalPrivate.promiseResolveThenableJobFast):
(globalPrivate.promiseResolveThenableJobWithoutPromiseFast):
(globalPrivate.promiseResolveThenableJob):
(globalPrivate.isPromise): Deleted.
(globalPrivate.newPromiseCapability.executor): Deleted.
(globalPrivate.initializePromise): Deleted.

  • builtins/PromisePrototype.js:

(then):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/Opcode.h:
  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):
(JSC::speculationFromClassInfo):
(JSC::speculationFromJSType):
(JSC::speculationFromString):

  • bytecode/SpeculatedType.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitGetPromiseInternalField):
(JSC::BytecodeGenerator::emitPutPromiseInternalField):
(JSC::BytecodeGenerator::emitCreatePromise):
(JSC::BytecodeGenerator::emitNewPromise):
(JSC::BytecodeGenerator::emitReturn):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::promiseRegister):
(JSC::BytecodeGenerator::emitIsPromise):
(JSC::BytecodeGenerator::promiseCapabilityRegister): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::promiseInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getPromiseInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putPromiseInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isPromise):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_createPromise):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_newPromise):
(JSC::FunctionNode::emitBytecode):

  • dfg/DFGAbstractHeap.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToNewPromise):
(JSC::DFG::Node::hasIsInternalPromise):
(JSC::DFG::Node::isInternalPromise):
(JSC::DFG::Node::hasInternalFieldIndex):
(JSC::DFG::Node::internalFieldIndex):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasStructure):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGPromotedHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGPromotedHeapLocation.h:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):
(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
(JSC::DFG::SpeculativeJIT::speculatePromiseObject):
(JSC::DFG::SpeculativeJIT::speculate):
(JSC::DFG::SpeculativeJIT::compileGetPromiseInternalField):
(JSC::DFG::SpeculativeJIT::compilePutPromiseInternalField):
(JSC::DFG::SpeculativeJIT::compileCreatePromise):
(JSC::DFG::SpeculativeJIT::compileNewPromise):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • dfg/DFGUseKind.cpp:

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::isCell):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileNewPromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileGetPromiseInternalField):
(JSC::FTL::DFG::LowerDFGToB3::compilePutPromiseInternalField):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculatePromiseObject):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_promise_internal_field):
(JSC::JIT::emit_op_put_promise_internal_field):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_promise_internal_field):
(JSC::JIT::emit_op_put_promise_internal_field):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseFunctionInfo):

  • parser/Parser.h:

(JSC::parse):

  • parser/ParserModes.h:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/ConstructAbility.h:
  • runtime/ConstructorKind.h: Copied from Source/JavaScriptCore/runtime/ConstructAbility.h.
  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::FunctionRareData):
(JSC::FunctionRareData::initializeObjectAllocationProfile):
(JSC::FunctionRareData::clear):

  • runtime/FunctionRareData.h:
  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::createSubclassStructureSlow):

  • runtime/InternalFunction.h:

(JSC::InternalFunction::createSubclassStructure):

  • runtime/JSCast.h:
  • runtime/JSGlobalObject.cpp:

(JSC::enqueueJob):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayProtoValuesFunction const):
(JSC::JSGlobalObject::promiseProtoThenFunction const):
(JSC::JSGlobalObject::initializePromiseFunction const): Deleted.

  • runtime/JSInternalPromise.cpp:

(JSC::JSInternalPromise::createStructure):

  • runtime/JSInternalPromiseConstructor.cpp:

(JSC::JSInternalPromiseConstructor::create):
(JSC::JSInternalPromiseConstructor::createStructure):
(JSC::JSInternalPromiseConstructor::JSInternalPromiseConstructor):
(JSC::constructPromise): Deleted.

  • runtime/JSInternalPromiseConstructor.h:
  • runtime/JSInternalPromisePrototype.cpp:

(JSC::JSInternalPromisePrototype::create):

  • runtime/JSMicrotask.cpp:

(JSC::createJSMicrotask):
(JSC::JSMicrotask::run):

  • runtime/JSMicrotask.h:
  • runtime/JSPromise.cpp:

(JSC::JSPromise::createStructure):
(JSC::JSPromise::finishCreation):
(JSC::JSPromise::visitChildren):
(JSC::JSPromise::status const):
(JSC::JSPromise::result const):
(JSC::JSPromise::isHandled const):
(JSC::JSPromise::initialize): Deleted.

  • runtime/JSPromise.h:

(JSC::JSPromise::allocationSize):
(JSC::JSPromise::offsetOfInternalFields):
(JSC::JSPromise::offsetOfInternalField):

  • runtime/JSPromiseConstructor.cpp:

(JSC::JSPromiseConstructor::create):
(JSC::JSPromiseConstructor::createStructure):
(JSC::JSPromiseConstructor::JSPromiseConstructor):
(JSC::JSPromiseConstructor::finishCreation):
(JSC::constructPromise): Deleted.
(JSC::callPromise): Deleted.

  • runtime/JSPromiseConstructor.h:
  • runtime/JSPromisePrototype.cpp:

(JSC::JSPromisePrototype::create):
(JSC::JSPromisePrototype::finishCreation):
(JSC::JSPromisePrototype::addOwnInternalSlots):

  • runtime/JSPromisePrototype.h:
  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:

Source/WebCore:

  • Modules/streams/ReadableStream.js:

(pipeThrough):

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamError):
(readableStreamReaderGenericRelease):

LayoutTests:

  • inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-full-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt:
  • inspector/console/message-stack-trace-expected.txt:
  • inspector/console/queryHolders-expected.txt:
  • js/Promise-types-expected.txt:
  • js/dom/Promise-resolve-with-itself-expected.txt:
  • js/dom/Promise-resolve-with-itself.html:
  • js/script-tests/Promise-types.js:
6:17 PM Changeset in webkit [249508] by Wenson Hsieh
  • 5 edits in trunk

-[WKContentView selectedText] returns an empty string when selecting more than 200 characters
https://bugs.webkit.org/show_bug.cgi?id=201471
<rdar://problem/55039227>

Reviewed by Tim Horton.

Source/WebKit:

The fix for <rdar://problem/54308019> is contingent on -[WKContentView selectedText] returning a non-empty
result in the case where text is selected. However, in WebKit, if more than 200 characters are selected,
-selectedText ends up returning nothing.

This is due to logic added in trac.webkit.org/r167624 that was intended to return the selected text in
PostLayoutData's wordAtSelection, up to a maximum of 200 characters, likely for performance and/or security
reasons. However, instead of truncating at 200 characters, the change simply drops wordAtSelection altogether.
This patch fixes this issue by taking the first 200 characters of the selected text.

Test: EditorStateTests.SelectedText

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::platformEditorState const):

Tools:

Add an API test to ensure that -selectedText is non-empty in the case where more than 200 characters are
selected.

  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/UIKitSPI.h:
6:02 PM Changeset in webkit [249507] by timothy_horton@apple.com
  • 3 edits
    2 adds in trunk

Line artifacts in note body after viewing note with <attachment>s
https://bugs.webkit.org/show_bug.cgi?id=201474
<rdar://problem/51306108>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/attachment/attachment-border-should-stay-inside-attachment.html

  • rendering/RenderThemeIOS.mm:

(WebCore::attachmentBorderPath):
(WebCore::paintAttachmentBorder):
Inset the border rect by half the width, so that <attachment> doesn't
paint out-of-bounds.

LayoutTests:

  • fast/attachment/attachment-border-should-stay-inside-attachment-expected.html: Added.
  • fast/attachment/attachment-border-should-stay-inside-attachment.html: Added.

Add a test that ensures that <attachment> stays inside its bounds.

5:47 PM Changeset in webkit [249506] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Fix mobile vs desktop mode
https://bugs.webkit.org/show_bug.cgi?id=201441

Rubber-stamped by Aakash Jain.

We should unconditionally use desktop mode if the device screen-width
is large enough.

  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:
5:45 PM Changeset in webkit [249505] by Kocsen Chung
  • 7 edits in branches/safari-608.2.11.1-branch/Source

Versioning.

4:35 PM Changeset in webkit [249504] by Joseph Pecoraro
  • 77 edits
    11 copies
    23 adds in trunk

Web Inspector: Local Overrides - Provide substitution content for resource loads (URL based)
https://bugs.webkit.org/show_bug.cgi?id=201262
<rdar://problem/13108764>

Reviewed by Devin Rousso.

Source/JavaScriptCore:

When interception is enabled, Network requests that match any of the configured
interception patterns will be paused on the backend and allowed to be modified
by the frontend.

Currently the only time a network request can be intercepted is during the
HTTP response. However, this intercepting interface is mean to extend to
HTTP requests as well.

When a response is to be intercepted a new event is sent to the frontend:

Network.responseIntercepted event

With a requestId to identify that network request. The frontend
must respond with one of the following commands to continue:

Network.interceptContinue - proceed with the response unmodified
Network.interceptWithResponse - provide a response

The response is paused in the meantime.

  • inspector/protocol/Network.json:

New interfaces for intercepting network responses and suppling override content.

  • Scripts/generate-combined-inspector-json.py:
  • inspector/scripts/generate-inspector-protocol-bindings.py:

(generate_from_specification.load_specification):
Complete allowing comments in JSON protocol files.

  • inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:

(ObjCBackendDispatcherImplementationGenerator._generate_invocation_for_command):

  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:

Allow optional enums in ObjC interfaces.

Source/WebCore:

Tests: http/tests/inspector/network/local-resource-override-basic.html

http/tests/inspector/network/local-resource-override-main-resource.html
http/tests/inspector/network/local-resource-override-script-tag.html
http/tests/inspector/network/resource-response-inspector-override.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Headers.cmake:

New files.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willInterceptRequestImpl):
(WebCore::InspectorInstrumentation::shouldInterceptResponseImpl):
(WebCore::InspectorInstrumentation::interceptResponseImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::hasFrontends):
(WebCore::InspectorInstrumentation::willInterceptRequest):
(WebCore::InspectorInstrumentation::shouldInterceptResponse):
(WebCore::InspectorInstrumentation::interceptResponse):
(WebCore::InspectorInstrumentation::frontendCreated):
(WebCore::InspectorInstrumentation::frontendDeleted):

  • inspector/InspectorInstrumentationPublic.cpp:
  • inspector/InspectorInstrumentationPublic.h:
  • inspector/InspectorInstrumentationWebKit.cpp:

(WebCore::InspectorInstrumentationWebKit::shouldInterceptResponseInternal):
(WebCore::InspectorInstrumentationWebKit::interceptResponseInternal):

  • inspector/InspectorInstrumentationWebKit.h: Added.

(WebCore::InspectorInstrumentationWebKit::shouldInterceptResponse):
(WebCore::InspectorInstrumentationWebKit::interceptResponse):
Provide a slim InspectorInstrumentation API that can be used in the WebKit
layer without a ton of includes.

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::responseSource):
(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::continuePendingResponses):
(WebCore::InspectorNetworkAgent::setInterceptionEnabled):
(WebCore::InspectorNetworkAgent::addInterception):
(WebCore::InspectorNetworkAgent::removeInterception):
(WebCore::InspectorNetworkAgent::willInterceptRequest):
(WebCore::InspectorNetworkAgent::shouldInterceptResponse):
(WebCore::InspectorNetworkAgent::interceptResponse):
(WebCore::InspectorNetworkAgent::interceptContinue):
(WebCore::InspectorNetworkAgent::interceptWithResponse):
Manage a list of URLs that will be intercepted and send
intercepts to an active frontend for response content.

  • inspector/agents/InspectorNetworkAgent.h:

(WebCore::InspectorNetworkAgent::PendingInterceptResponse::PendingInterceptResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::~PendingInterceptResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::originalResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::respondWithOriginalResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::respond):
Callback for an eventual intercept response.

  • platform/network/ResourceResponseBase.h:

New ResponseSource - Inspector Override.

  • loader/DocumentLoader.cpp:

(WebCore::logResourceResponseSource):

  • testing/Internals.cpp:

(WebCore::responseSourceToString):
Handle new response sources.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):
Avoid preloading or using the cache for URLs that would be intercepted
by an active Inspector frontend.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::remove):
Assertion to help detect if we ever get override content into the MemoryCache.

  • loader/ResourceLoader.h:

(WebCore::DocumentLoader::responseReceived):

  • loader/ResourceLoader.cpp:

Fix typos.

Source/WebInspectorUI:

This adds a new "Local Overrides" section to the Sources tab sidebar
which will allow users to provide their own resource content for text
resources. Users can clone a resource, and provide their own content
(by editing in Web Inspector) and new requests for those particular
URLs will get the substitute content.

Overrides are based on a particular URL (ignoring fragment). They
can override: status code, status text, response headers, content,
and MIME Type (Content-Type).

  • Tools/CodeMirrorModes/index.html: Added.
  • Tools/CodeMirrorModes/styles.css: Added.

Debug tool for CodeMirror editors and our custom CodeMirror modes.

  • UserInterface/Main.html:
  • UserInterface/Test.html:
  • Localizations/en.lproj/localizedStrings.js:

New files and strings.

  • UserInterface/Base/HTTPUtilities.js: Added.

(WI.httpStatusTextForStatusCode):
Translate between typical status codes and status text.

  • UserInterface/Base/ObjectStore.js:

(WI.ObjectStore._open):
New persistent store for local resource overrides.

  • UserInterface/Base/Main.js:

(WI.showLocalResourceOverride):
Convenience for showing an override file.

  • UserInterface/Base/URLUtilities.js:

(parseURL):
Avoid uncaught exceptions with the URL constructor for common WebKit internal sourceURL strings.

(WI.urlWithoutFragment):
Strip a fragment from a URL.

  • UserInterface/Controllers/HARBuilder.js:

(WI.HARBuilder.fetchType):
(WI.HARBuilder.responseSourceFromHARFetchType):
Handle new custom response types.

  • UserInterface/Protocol/NetworkObserver.js:

(WI.NetworkObserver.prototype.responseIntercepted):
(WI.NetworkObserver):
New events.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager):
(WI.NetworkManager.supportsLocalResourceOverrides):
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get localResourceOverrides):
(WI.NetworkManager.prototype.get interceptionEnabled):
(WI.NetworkManager.prototype.set interceptionEnabled):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.localResourceOverrideForURL):
(WI.NetworkManager.prototype.canBeOverridden):
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceContentDidChange):
(WI.NetworkManager.prototype._persistLocalResourceOverrideSoonAfterContentChange):
(WI.NetworkManager.prototype._saveLocalResourceOverrides):
(WI.NetworkManager.prototype._extraDomainsActivated):
(WI.NetworkManager.prototype.localResourceForURL): Deleted.
Handle saving and restoring local resource overrides.
Handle responding to a responseIntercepted Network protocol event.

  • UserInterface/Models/LocalResource.js:

(WI.LocalResource.fromJSON):
(WI.LocalResource.prototype.toJSON):
(WI.LocalResource.prototype.get localContent):
(WI.LocalResource.prototype.get localContentIsBase64Encoded):
(WI.LocalResource.prototype.isLocalResourceOverride):
(WI.LocalResource.prototype.updateOverrideContent):
Allow a LocalResource to identify itself as an "override".

  • UserInterface/Models/LocalResourceOverride.js: Added.

(WI.LocalResourceOverride.prototype.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get url):
(WI.LocalResourceOverride.prototype.get localResource):
(WI.LocalResourceOverride.prototype.get disabled):
(WI.LocalResourceOverride.prototype.set disabled):
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):
(WI.LocalResourceOverride):
Model object for a LocalResourceOverride. This has LocalResource content
and an enabled/disabled state.

  • UserInterface/Models/Resource.js:

(WI.Resource.classNamesForResource):
(WI.Resource.responseSourceFromPayload):
(WI.Resource.prototype.isLocalResourceOverride):
(WI.Resource.prototype.async.createLocalResourceOverride):
(WI.Resource.classNameForResource): Deleted.
Convenience functions and icon updates.

  • UserInterface/Views/SourcesTabContentView.js:

(WI.SourcesTabContentView.prototype.canShowRepresentedObject):

  • UserInterface/Views/ContentView.js:

(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.resolvedRepresentedObjectForRepresentedObject):
(WI.ContentView.isViewable):
Handle new represented object type.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissEventBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissURLBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._removeLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideRemoved):

  • UserInterface/Views/SourcesNavigationSidebarPanel.css:

(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
Hide and show Local Overrides section.

  • UserInterface/Views/LocalResourceOverrideTreeElement.css:

(.item.resource.override .status > div):

  • UserInterface/Views/LocalResourceOverrideTreeElement.js: Added.

(WI.LocalResourceOverrideTreeElement):
(WI.LocalResourceOverrideTreeElement.prototype.canSelectOnMouseDown):
(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
TreeElement for a Local Resource Override.

  • UserInterface/Views/CodeMirrorLocalOverrideURLMode.css:

(.cm-s-default .cm-local-override-url-bad-scheme):
(.cm-s-default .cm-local-override-url-fragment):

  • UserInterface/Views/CodeMirrorLocalOverrideURLMode.js: Added.

(tokenBase):
(return.startState):
(return.token):

  • UserInterface/Views/ContentBrowserTabContentView.js:

(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):

  • UserInterface/Views/ContextMenu.js:

(WI.ContextMenu.prototype._itemSelected):
(WI.ContextMenu):
Better debugging for exceptions in context menu handlers.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForSourceCode):
(WI.appendContextMenuItemsForURL):
Context menu items for Local Resource Overrides.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid.prototype.startEditingNode):
(WI.DataGrid.prototype._startEditingNodeAtColumnIndex):
(WI.DataGrid.prototype._startEditing):
(WI.DataGrid.prototype._contextMenuInDataTable):

  • UserInterface/Views/DataGridNode.js:

(WI.DataGridNode):
(WI.DataGridNode.prototype.get editable):
(WI.DataGridNode.prototype.set editable):
Improve DataGrid editing functionality.
Allow a node to not be editable.
Allow adding a new node and starting to edit in one action.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
Do not provide overrides in the Debugger tab.

  • UserInterface/Views/LocalResourceOverrideLabelView.css:

(.local-resource-override-label-view):
(.local-resource-override-label-view > div):
(.local-resource-override-label-view > div > .label):
(.local-resource-override-label-view > div > .url):
(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/LocalResourceOverrideLabelView.js:

(WI.LocalResourceOverrideLabelView):
(WI.LocalResourceOverrideLabelView.prototype.initialLayout):

  • UserInterface/Views/LocalResourceOverridePopover.css: Added.

(.popover .local-resource-override-popover-content):
(.popover .local-resource-override-popover-content > label.toggle):
(.popover .local-resource-override-popover-content > table):
(.popover .local-resource-override-popover-content > table > tr > th):
(.popover .local-resource-override-popover-content > table > tr > td):
(.popover .local-resource-override-popover-content .editor):
(.popover .local-resource-override-popover-content .editor > .CodeMirror):
(.popover .local-resource-override-popover-content .editor.url):
(.popover .local-resource-override-popover-content .editor.mime):
(.popover .local-resource-override-popover-content .editor.status):
(.popover .local-resource-override-popover-content .editor.status-text):
(.popover .local-resource-override-popover-content .add-header):
(@media (prefers-color-scheme: dark)):
New banner view for a local resource override itself.
Shows the URL being overriden.

  • UserInterface/Views/LocalResourceOverrideWarningView.css:

(.local-resource-override-warning-view):
(.local-resource-override-warning-view[hidden]):
(.local-resource-override-warning-view > div):
(.local-resource-override-warning-view > div > button):
(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/LocalResourceOverrideWarningView.js: Added.

(WI.LocalResourceOverrideWarningView):
(WI.LocalResourceOverrideWarningView.prototype.attached):
(WI.LocalResourceOverrideWarningView.prototype.detached):
(WI.LocalResourceOverrideWarningView.prototype._updateContent):
(WI.LocalResourceOverrideWarningView.prototype._handleLocalResourceOverrideChanged):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.pruneStaleResourceTreeElements):
New banner view for a resource that has been overridden.
Allows jumping to the override itself.

  • UserInterface/Views/LocalResourceOverridePopover.js: Added.

(WI.LocalResourceOverridePopover):
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show.addDataGridNodeForHeader):
(WI.LocalResourceOverridePopover.prototype.show):
(WI.LocalResourceOverridePopover.prototype._createEditor):
(WI.LocalResourceOverridePopover.prototype._defaultURL):
(WI.LocalResourceOverridePopover.prototype._presentOverTargetElement):
New popover for creating or editing a Local Resource Override.

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel.prototype.performSearch):
Consider searching overrides.

  • UserInterface/Views/Variables.css:

(:root):

  • UserInterface/Views/SearchSidebarPanel.css:

(.sidebar > .panel.navigation.search.changed > .banner):

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger .warning-banner):

  • UserInterface/Views/ConsoleMessageView.css:

(.console-warning-level):
Use a new variable for a common warning color.

  • UserInterface/Images/NavigationItemNetworkOverride.svg: Added.
  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.canBeFormatted):
(WI.SourceCodeTextEditor.prototype.get _supportsDebugging):

  • UserInterface/Views/SourcesNavigationSidebarPanel.css:

(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.

  • UserInterface/Views/TextEditor.css:

(.text-editor):

  • UserInterface/Views/TextResourceContentView.css:

(.content-view.resource.text):
(.content-view.resource.text > .text-editor):

  • UserInterface/Views/TextResourceContentView.js:

(WI.TextResourceContentView):
(WI.TextResourceContentView.prototype.get navigationItems):
(WI.TextResourceContentView.prototype.closed):
(WI.TextResourceContentView.prototype._contentWillPopulate):
(WI.TextResourceContentView.prototype._contentDidPopulate):
(WI.TextResourceContentView.prototype.async._handleCreateLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleRemoveLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleLocalResourceOverrideChanged):
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
(WI.TextResourceContentView.prototype._shouldBeEditable):
Allow Text resources to create a local resource override.
Support for Image resources will come separately.

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
Handle new response type.

  • UserInterface/Controllers/CSSManager.js:

Avoid extra handling for Local Resource Overrides.

  • UserInterface/Views/ResourceIcons.css:

(.resource-icon.override .icon):

  • UserInterface/Views/ResourceSizesContentView.js:

(WI.ResourceSizesContentView.prototype.initialLayout):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WI.ResourceTimelineDataGridNode.prototype.iconClassNames):

  • UserInterface/Views/ResourceTreeElement.js:

(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype._updateIcon):
(WI.ResourceTreeElement.prototype._responseReceived):
(WI.ResourceTreeElement):

  • UserInterface/Views/TimelineDataGridNode.js:

(WI.TimelineDataGridNode.prototype.createCellContent):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._populateTransferSizeCell):
(WI.NetworkTableContentView.prototype._generateSortComparator):
Better Resource icons all over for overrides.

  • UserInterface/Views/URLBreakpointPopover.js:

(WI.URLBreakpointPopover.prototype._createEditor):
Code cleanup.

Source/WebKit:

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

New sources.

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
On receiving a response, check with the inspector if an active
frontend will override the response content.

  • WebProcess/Network/WebResourceInterceptController.h:
  • WebProcess/Network/WebResourceInterceptController.cpp:

(WebKit::WebResourceInterceptController::isIntercepting const):
(WebKit::WebResourceInterceptController::beginInterceptingResponse):
(WebKit::WebResourceInterceptController::continueResponse):
(WebKit::WebResourceInterceptController::interceptedResponse):
(WebKit::WebResourceInterceptController::defer):
Buffer networking callbacks for an ongoing intercept.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::havePerformedSecurityChecks const):
Handle new response source.

LayoutTests:

  • http/tests/inspector/network/local-resource-override-basic-expected.txt: Added.
  • http/tests/inspector/network/local-resource-override-basic.html: Added.
  • http/tests/inspector/network/local-resource-override-main-resource-expected.txt: Added.
  • http/tests/inspector/network/local-resource-override-main-resource.html: Added.
  • http/tests/inspector/network/local-resource-override-script-tag-expected.txt: Added.
  • http/tests/inspector/network/local-resource-override-script-tag.html: Added.
  • http/tests/inspector/network/resource-response-inspector-override-expected.txt: Added.
  • http/tests/inspector/network/resource-response-inspector-override.html: Added.
  • http/tests/inspector/network/resources/override.js: Added.
  • http/tests/inspector/network/resources/override.txt: Added.
  • inspector/network/local-resource-override-continue-response-expected.txt: Added.
  • inspector/network/local-resource-override-continue-response.html: Added.

Tests for overrides.

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

Test WI.urlWithoutFragment.

  • platform/mac-wk1/TestExpectations:

WebKitLegacy does not support overrides.

4:20 PM Changeset in webkit [249503] by Kocsen Chung
  • 1 copy in tags/Safari-608.2.11.1.2

Tag Safari-608.2.11.1.2.

4:13 PM Changeset in webkit [249502] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed minor follow-up fix after r249501 to address crashes in debug.

  • NetworkProcess/cache/NetworkCache.h:

(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::constructDeletedValue):
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::isDeletedValue):

3:57 PM Changeset in webkit [249501] by Chris Dumez
  • 52 edits in trunk/Source

Expose WebPageProxy identifier to the Network Process
https://bugs.webkit.org/show_bug.cgi?id=201467

Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/EmptyFrameLoaderClient.h:

(isType):

  • loader/FrameLoaderClient.h:

Source/WebKit:

Expose WebPageProxy identifier to the Network Process (similarly to WebPage / WebFrame identifiers)
so that it can use it whenever it IPCs the UIProcess. The IPCs from the network process were the
last one requiring the UIProcess to lookup a WebPageProxy object from a WebPageIdentifier (rather
than a WebPageProxyIdentifier).

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::testProcessIncomingSyncMessagesWhenWaitingForSyncReply):
(WebKit::NetworkConnectionToWebProcess::requestStorageAccess):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didCommitCrossSiteLoadWithDataTransfer):
(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didReceiveResponse):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::didReceiveChallenge):

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::GlobalFrameID::hash const):
(WebKit::NetworkCache::operator==):
(WTF::GlobalFrameIDHash::hash):
(WTF::GlobalFrameIDHash::equal):
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::emptyValue):
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::constructDeletedValue):
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::isDeletedValue):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::shouldCoalesceChallenge const):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
(WebKit::NetworkProcessProxy::logDiagnosticMessage):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):
(WebKit::NetworkProcessProxy::requestStorageAccessConfirm):
(WebKit::NetworkProcessProxy::didCommitCrossSiteLoadWithDataTransfer):
(WebKit::NetworkProcessProxy::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource):
(WebKit::NetworkProcessProxy::testProcessIncomingSyncMessagesWhenWaitingForSyncReply):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/ServiceWorkerProcessProxy.cpp:

(WebKit::ServiceWorkerProcessProxy::start):

  • UIProcess/ServiceWorkerProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::isServiceWorkerPageID const):
(WebKit::WebProcessPool::didCommitCrossSiteLoadWithDataTransfer):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:
  • UIProcess/WebProcessProxy.h:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
(WebKit::ServiceWorkerFrameLoaderClient::createDocumentLoader):
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
(WebKit::WebSWContextManagerConnection::installServiceWorker):

  • WebProcess/Storage/WebSWContextManagerConnection.h:

(isType):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::testProcessIncomingSyncMessagesWhenWaitingForSyncReply):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::webPageProxyID const):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestStorageAccess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
2:25 PM Changeset in webkit [249500] by Jonathan Bedard
  • 3 edits in trunk/Tools

run-api-tests: Add support for specifying additional environment variables
https://bugs.webkit.org/show_bug.cgi?id=201311
<rdar://problem/54852698>

Reviewed by Daniel Bates.

  • Scripts/webkitpy/api_tests/run_api_tests.py:

(parse_args): Add --additional-env-var flag.

  • Scripts/webkitpy/port/base.py:

(Port._append_value_colon_separated): Use os.pathsep instead of ':'.
(Port.environment_for_api_tests): Add the values from --additional-env-var to the
environment.

2:12 PM Changeset in webkit [249499] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Structure::storedPrototype() and storedPrototypeObject() should assert with isCompilationThread(), not !isMainThread().
https://bugs.webkit.org/show_bug.cgi?id=201449

Reviewed by Yusuke Suzuki.

Using !isMainThread() in the assertion also disables the assertion for the mutator
of worker threads. This is not what we intended.

  • runtime/StructureInlines.h:

(JSC::Structure::storedPrototype const):
(JSC::Structure::storedPrototypeObject const):

2:11 PM Changeset in webkit [249498] by achristensen@apple.com
  • 6 edits in trunk/Source

Remove unused SPI that accesses MemoryCache directly
https://bugs.webkit.org/show_bug.cgi?id=201468

Reviewed by Tim Horton.

Source/WebCore:

  • loader/cache/MemoryCache.cpp:

(WebCore::dummyCachedImageClient): Deleted.
(WebCore::MemoryCache::addImageToCache): Deleted.
(WebCore::MemoryCache::removeImageFromCache): Deleted.

  • loader/cache/MemoryCache.h:

Source/WebKitLegacy/mac:

  • Misc/WebCache.h:
  • Misc/WebCache.mm:

(+[WebCache addImageToCache:forURL:]): Deleted.
(+[WebCache addImageToCache:forURL:forFrame:]): Deleted.
(+[WebCache removeImageFromCacheForURL:]): Deleted.
(+[WebCache removeImageFromCacheForURL:forFrame:]): Deleted.

1:42 PM Changeset in webkit [249497] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC] Assert on FormattingContext escaping
https://bugs.webkit.org/show_bug.cgi?id=201464
<rdar://problem/55029574>

Reviewed by Antti Koivisto.

This patch asserts on accidental formatting context escaping. This is only a correctness issue at the moment,
since we don't support multithreaded subtree layout yet.
Normally we should not need to access display boxes in different formatting contexts during layout, but there are a few, justified cases when it is required.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::displayBoxForLayoutBox const):

  • layout/FormattingContext.h:

(WebCore::Layout::FormattingContext::displayBoxForLayoutBox const): Deleted.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
(WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
(WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

1:09 PM Changeset in webkit [249496] by Kocsen Chung
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r249430. rdar://problem/55027550

[macOS] Correct sandbox violation in Flash plugin
https://bugs.webkit.org/show_bug.cgi?id=201228
<rdar://problem/54347503>

Reviewed by Alex Christensen.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

1:08 PM Changeset in webkit [249495] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Disambiguate a symbol used in JSDollarVM.
https://bugs.webkit.org/show_bug.cgi?id=201466
<rdar://problem/51826672>

Reviewed by Tadeu Zagallo.

This was causing a build issue on some internal build.

  • tools/JSDollarVM.cpp:
12:53 PM Changeset in webkit [249494] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC] FormattingContext::map* functions are too generic.
https://bugs.webkit.org/show_bug.cgi?id=201447
<rdar://problem/55005733>

Reviewed by Antti Koivisto.

We don't need such generic mapping functions yet. This patch is also in preparation for
asserting on formatting context escaping.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
(WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
(WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
(WebCore::Layout::FormattingContext::mapLeftToAncestor const): Deleted.
(WebCore::Layout::FormattingContext::mapRightToAncestor const): Deleted.
(WebCore::Layout::FormattingContext::mapBoxToAncestor const): Deleted.
(WebCore::Layout::FormattingContext::mapTopToAncestor const): Deleted.
(WebCore::Layout::FormattingContext::mapPointToAncestor const): Deleted.
(WebCore::Layout::FormattingContext::mapPointToDescendent const): Deleted.

  • layout/FormattingContext.h:
  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
(WebCore::Layout::FloatingContext::constraints const):
(WebCore::Layout::FloatingContext::append):
(WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
(WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
(WebCore::Layout::mapToFormattingContextRoot): Deleted.

  • layout/floats/FloatingContext.h:
  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

12:38 PM Changeset in webkit [249493] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[iPadOS] Unable to change sheets on Airtable.com
https://bugs.webkit.org/show_bug.cgi?id=201456
<rdar://problem/51557377>

Patch by Antoine Quint <Antoine Quint> on 2019-09-04
Reviewed by Dean Jackson.

Simulated mouse events are required to be able to manipulate cells and and columns on Airtable.com. However, dispatching a "mousedown" event on
tabs allowing to pick a different sheet ends up calling preventDefault() and prevent "click" events from being dispatched, which makes it
impossible to change sheet. We now limit the dispatch of simulated mouse events to the grid.

  • page/Quirks.cpp:

(WebCore::Quirks::simulatedMouseEventTypeForTarget const):

12:37 PM Changeset in webkit [249492] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

macCatalyst: Re-enable iOS WKWebView printing API
https://bugs.webkit.org/show_bug.cgi?id=201392
<rdar://problem/54690252>

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _webViewPrintFormatter]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/_WKWebViewPrintFormatter.mm:
  • UIProcess/_WKWebViewPrintFormatterInternal.h:
  • UIProcess/ios/WKContentView.mm:

_WKWwebViewPrintFormatter was disabled during bringup because requisite
UIKit bits were missing, but they are not anymore (and have not been for
quite some time), so remove these unnecessary platform ifdefs.

12:23 PM Changeset in webkit [249491] by Kocsen Chung
  • 1 edit in branches/safari-608-branch/Tools/WebKitTestRunner/TestOptions.h

Unreviewed build fix.

12:19 PM Changeset in webkit [249490] by Kocsen Chung
  • 2 edits in branches/safari-608.2.11.1-branch/Source/WebKit

Cherry-pick r249430. rdar://problem/55031098

[macOS] Correct sandbox violation in Flash plugin
https://bugs.webkit.org/show_bug.cgi?id=201228
<rdar://problem/54347503>

Reviewed by Alex Christensen.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

11:28 AM Changeset in webkit [249489] by commit-queue@webkit.org
  • 17 edits in trunk/LayoutTests

Address review comments after r249364
https://bugs.webkit.org/show_bug.cgi?id=201432

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

Fix the <img> CSS width properties by adding the "px" units.

  • fast/images/exif-orientation-background-expected.html:
  • fast/images/exif-orientation-canvas-expected.html:
  • fast/images/exif-orientation-canvas.html:
  • fast/images/exif-orientation-composited-expected.html:
  • fast/images/exif-orientation-composited.html:

Remove the CSS border to enable the composited image code path.

  • fast/images/exif-orientation-content-expected.html:
  • fast/images/exif-orientation-element-expected.html:
  • fast/images/exif-orientation-element.html:
  • fast/images/exif-orientation-image-document-expected.html:
  • fast/images/exif-orientation-image-document.html:
  • fast/images/exif-orientation-image-object-expected.html:
  • fast/images/exif-orientation-image-object.html:
  • fast/images/exif-orientation-svg-feimage-expected.html:
  • fast/images/exif-orientation-svg-feimage.html:
  • fast/images/exif-orientation-svg-image-expected.html:
  • fast/images/exif-orientation-svg-image.html:
11:15 AM Changeset in webkit [249488] by mark.lam@apple.com
  • 2 edits in branches/safari-608-branch/Source/JavaScriptCore

Cherry-pick 249345. rdar://problem/55000994

2019-08-30 Mark Lam <mark.lam@apple.com>

Fix a bug in SlotVisitor::reportZappedCellAndCrash() and also capture more information.
https://bugs.webkit.org/show_bug.cgi?id=201345

Reviewed by Yusuke Suzuki.

This patch fixes a bug where SlotVisitor::reportZappedCellAndCrash() was using
the wrong pointer for capture the cell headerWord and zapReason. As a result,
we get junk for those 2 values.

Previously, we were only capturing the upper 32-bits of the cell header slot,
and the lower 32-bit of the next slot in the zapped cell. We now capture the
full 64-bits of both slots. If the second slot did not contain a zapReason as we
expect, the upper 32-bits might give us a clue as to what type of value the slot
contains.

This patch also adds capturing of the found MarkedBlock address for the zapped
cell, as well as some state bit values.

  • heap/SlotVisitor.cpp: (JSC::SlotVisitor::reportZappedCellAndCrash):
11:13 AM Changeset in webkit [249487] by Patrick Griffis
  • 2 edits in trunk/Source/WebKit

[WPE][GTK] Fix sandbox parsing DISPLAY on X11
https://bugs.webkit.org/show_bug.cgi?id=201462

Reviewed by Michael Catanzaro.

On some setups the DISPLAY env var was incorrectly parsed.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bindX11):

11:08 AM Changeset in webkit [249486] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Selenium test 'interactions_tests.py::testContextClick' is hanging
https://bugs.webkit.org/show_bug.cgi?id=201161
<rdar://problem/54728541>

Reviewed by Chris Dumez.

A web page should not show native context menus if user interactions are being simulated for WebDriver.
Showing a native context menu spawns a nested run loop. Since there's no way to interact
with native UI via WebDriver, the test will hang until the context menu is manually dismissed.

To fix this, pretend to show the context menu in UIProcess and dismiss it immediately.
This is necessary to trigger oncontextmenu events appropriately and resume handling mouse events.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::showContextMenu): Hook into isControlledByAutomation here.
We could short circuit this on the WebProcess side, but the check would be more crude
and suppress context menus even if user interaction isn't being simulated. This would be
problematic for a user who wants to interrupt their test session and interact with it.
The main use case for this is right clicking on the test page and choose "Inspect".

11:06 AM Changeset in webkit [249485] by Kocsen Chung
  • 7 edits in branches/safari-608.2.11.1-branch/Source

Versioning.

11:01 AM Changeset in webkit [249484] by mark.lam@apple.com
  • 22 edits in branches/safari-608-branch

Source/JavaScriptCore:
Cherry-pick 248143, 248162. rdar://problem/55000992

Also deleted an unused function. This is needed to resolve a merge conflict for
this patch.

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::zap): Deleted.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::Handle::zap): Deleted.

2019-08-02 Mark Lam <mark.lam@apple.com>

Gardening: build fix.
https://bugs.webkit.org/show_bug.cgi?id=200149
<rdar://problem/53570112>

Not reviewed.

  • assembler/CPU.cpp: (JSC::hwPhysicalCPUMax):

2019-08-01 Mark Lam <mark.lam@apple.com>

Add crash diagnostics for debugging unexpected zapped cells.
https://bugs.webkit.org/show_bug.cgi?id=200149
<rdar://problem/53570112>

Reviewed by Yusuke Suzuki.

Add a check for zapped cells in SlotVisitor::appendToMarkStack() and
SlotVisitor::visitChildren(). If a zapped cell is detected, we will crash with
some diagnostic info.

To facilitate this, we've made the following changes:

  1. Changed FreeCell to preserve the 1st 8 bytes. This is fine to do because all cells are at least 16 bytes long.
  2. Changed HeapCell::zap() to only zap the structureID. Leave the rest of the cell header info intact (including the cell JSType).
  3. Changed HeapCell::zap() to record the reason for zapping the cell. We stash the reason immediately after the first 8 bytes. This is the same location as FreeCell::scrambledNext. However, since a cell is not expected to be zapped and on the free list at the same time, it is also fine to do this.
  4. Added a few utility functions to MarkedBlock for checking if a cell points into the block.
  5. Added VMInspector and JSDollarVM utilities to dump in-use subspace hashes.
  6. Added some comments to document the hashes of known subspaces.
  7. Added Options::dumpZappedCellCrashData() to make this check conditional. We use this option to disable this check for slower machines so that their PLT5 performance is not impacted.
  • assembler/CPU.cpp: (JSC::hwL3CacheSize): (JSC::hwPhysicalCPUMax):
  • assembler/CPU.h: (JSC::hwL3CacheSize): (JSC::hwPhysicalCPUMax):
  • heap/FreeList.h: (JSC::FreeCell::offsetOfScrambledNext):
  • heap/HeapCell.h: (JSC::HeapCell::zap): (JSC::HeapCell::isZapped const):
  • heap/MarkedBlock.cpp: (JSC::MarkedBlock::Handle::stopAllocating):
  • heap/MarkedBlock.h: (JSC::MarkedBlock::Handle::start const): (JSC::MarkedBlock::Handle::end const): (JSC::MarkedBlock::Handle::contains const):
  • heap/MarkedBlockInlines.h: (JSC::MarkedBlock::Handle::specializedSweep):
  • heap/MarkedSpace.h: (JSC::MarkedSpace::forEachSubspace):
  • heap/SlotVisitor.cpp: (JSC::SlotVisitor::appendToMarkStack): (JSC::SlotVisitor::visitChildren): (JSC::SlotVisitor::reportZappedCellAndCrash):
  • heap/SlotVisitor.h:
  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
  • runtime/Options.cpp: (JSC::Options::initialize):
  • runtime/Options.h:
  • runtime/VM.cpp: (JSC::VM::VM):
  • tools/JSDollarVM.cpp: (JSC::functionDumpSubspaceHashes): (JSC::JSDollarVM::finishCreation):
  • tools/VMInspector.cpp: (JSC::VMInspector::dumpSubspaceHashes):
  • tools/VMInspector.h:

Source/WebCore:
Cherry-pick 248143. rdar://problem/55000992

2019-08-01 Mark Lam <mark.lam@apple.com>

Add crash diagnostics for debugging unexpected zapped cells.
https://bugs.webkit.org/show_bug.cgi?id=200149
<rdar://problem/53570112>

Reviewed by Yusuke Suzuki.

No new tests because this is a feature for debugging crashes. It has been tested
manually by modifying the code to force a crash at the point of interest.

Added some comments to document the hashes of known subspaces.

  • bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::JSVMClientData):
10:27 AM Changeset in webkit [249483] by aakash_jain@apple.com
  • 11 edits in trunk

EWS bubbles should indicate builder vs tester
https://bugs.webkit.org/show_bug.cgi?id=201253

Reviewed by Jonathan Bedard.

Tools:

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble._build_bubble): Add icons to the bubbles appropriately.
(StatusBubble._is_tester_queue): Method to determine if the queue is tester queue.
(StatusBubble._is_builder_queue): Method to determine if the queue is builder queue.
(StatusBubble.get):

  • BuildSlaveSupport/ews-app/ews/common/buildbot.py:

(Buildbot.fetch_config): Method to fetch the config from Buildbot server.
(Buildbot.update_icons_for_queues_mapping): Method to update the icons for queues mapping.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(FetchLoop.run): Update the icons for queues mapping.

  • BuildSlaveSupport/ews-build/config.json: Add icon information for the queues.
  • BuildSlaveSupport/ews-build/loadConfig.py: Remove 'icon' key from builder before passing it to Buildbot.
  • BuildSlaveSupport/ews-build/loadConfig_unittest.py: .

(test_builder_keys): Update unit-test accordingly. Also minor drive-by fix to improve failure string formatting.

Websites/bugs.webkit.org:

  • code-review.js: Do not display the icons in status-bubbles on this page.
  • template/en/default/attachment/edit.html.tmpl: Ditto.
  • template/en/default/attachment/reviewform.html.tmpl: Ditto.
10:05 AM Changeset in webkit [249482] by Kocsen Chung
  • 1 edit in branches/safari-608-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

Unreviewed build fix.

9:46 AM Changeset in webkit [249481] by youenn@apple.com
  • 7 edits
    3 adds in trunk/Source

Abstract out WebSocketChannel message queue
https://bugs.webkit.org/show_bug.cgi?id=201359

Reviewed by Alex Christensen.

Source/WebCore:

Move BlobLoader in its own file.
Introduce NetworkSendQueue class to handle the sending of messages, some of them being blobs.
This class ensures that messages will be sent in order, even though blob data is resolved asynchronously.

Covered by existing tests.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • fileapi/BlobLoader.h: Added.

(WebCore::BlobLoader::BlobLoader):
(WebCore::BlobLoader::~BlobLoader):
(WebCore::BlobLoader::didFinishLoading):
(WebCore::BlobLoader::didFail):
(WebCore::BlobLoader::complete):

  • fileapi/NetworkSendQueue.cpp: Added.

(WebCore::NetworkSendQueue::NetworkSendQueue):
(WebCore::NetworkSendQueue::enqueue):
(WebCore::NetworkSendQueue::clear):
(WebCore::NetworkSendQueue::processMessages):

  • fileapi/NetworkSendQueue.h: Added.

Source/WebKit:

Make use of newly added NetworkSendQueue.

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::createMessageQueue):
(WebKit::WebSocketChannel::WebSocketChannel):
(WebKit::WebSocketChannel::send):
(WebKit::WebSocketChannel::disconnect):

  • WebProcess/Network/WebSocketChannel.h:
8:19 AM Changeset in webkit [249480] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Allow checking whether image was created from JavaScript
https://bugs.webkit.org/show_bug.cgi?id=200662

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-04
Reviewed by Darin Adler.

No behavior change.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::create):

  • html/HTMLImageElement.h:

(WebCore::HTMLImageElement::createdByParser const):

  • html/HTMLTagNames.in:
5:46 AM Changeset in webkit [249479] by youenn@apple.com
  • 29 edits
    2 moves in trunk/Source

Move MessageRegistry to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=201299

Reviewed by Alex Christensen.

Move message registry to NetworkProcess.
Take benefit of this move to use async reply IPC as much as possible.
This also allows to remove the IPC message to UIProcess when doing postMessage with service workers.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createNewMessagePortChannel):
(WebKit::NetworkConnectionToWebProcess::entangleLocalPortInThisProcessToRemote):
(WebKit::NetworkConnectionToWebProcess::messagePortDisentangled):
(WebKit::NetworkConnectionToWebProcess::messagePortClosed):
(WebKit::NetworkConnectionToWebProcess::nextMessageBatchIdentifier):
(WebKit::NetworkConnectionToWebProcess::takeAllMessagesForPort):
(WebKit::NetworkConnectionToWebProcess::didDeliverMessagePortMessages):
(WebKit::NetworkConnectionToWebProcess::postMessageToRemote):
(WebKit::NetworkConnectionToWebProcess::checkRemotePortForActivity):
(WebKit::NetworkConnectionToWebProcess::checkProcessLocalPortForActivity):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkMessagePortChannelProvider.cpp: Added.

(WebKit::NetworkMessagePortChannelProvider::NetworkMessagePortChannelProvider):
(WebKit::NetworkMessagePortChannelProvider::createNewMessagePortChannel):
(WebKit::NetworkMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote):
(WebKit::NetworkMessagePortChannelProvider::messagePortDisentangled):
(WebKit::NetworkMessagePortChannelProvider::messagePortClosed):
(WebKit::NetworkMessagePortChannelProvider::takeAllMessagesForPort):
(WebKit::NetworkMessagePortChannelProvider::postMessageToRemote):
(WebKit::NetworkMessagePortChannelProvider::checkRemotePortForActivity):
(WebKit::NetworkMessagePortChannelProvider::checkProcessLocalPortForActivity):

  • NetworkProcess/NetworkMessagePortChannelProvider.h: Added.
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::m_messagePortChannelProvider):
(WebKit::NetworkProcess::webProcessConnection const):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::messagePortChannelRegistry):

  • Sources.txt:
  • UIProcess/Downloads/DownloadProxyMap.cpp:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessPool.messages.in:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::shutDown):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::initializeSWClientConnection):
(WebKit::NetworkProcessConnection::messagesAvailableForPort):
(WebKit::NetworkProcessConnection::checkProcessLocalPortForActivity):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Network/NetworkProcessConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::postMessageToServiceWorker):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):

  • WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:

(WebKit::networkProcessConnection):
(WebKit::WebMessagePortChannelProvider::createNewMessagePortChannel):
(WebKit::WebMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote):
(WebKit::WebMessagePortChannelProvider::messagePortDisentangled):
(WebKit::WebMessagePortChannelProvider::messagePortClosed):
(WebKit::WebMessagePortChannelProvider::takeAllMessagesForPort):
(WebKit::WebMessagePortChannelProvider::postMessageToRemote):
(WebKit::WebMessagePortChannelProvider::checkRemotePortForActivity):

  • WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h:
  • WebProcess/WebProcess.cpp:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
5:27 AM Changeset in webkit [249478] by zandobersek@gmail.com
  • 1 edit
    2 deletes in trunk/Source/WebCore

Remove unused ScrollingTreeOverflowScrollProxyNode implementation
https://bugs.webkit.org/show_bug.cgi?id=201376

Reviewed by Simon Fraser.

Remove the unused ScrollingTreeOverflowScrollProxyNode implementation
and header files that were added in r246723 but are not included in any
build. Cocoa-specific implementation remains untouched, and other
scrolling systems should be providing their own (as is the case with
other types of nodes).

  • page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Removed.
  • page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Removed.
2:10 AM WebKitGTK/2.24.x edited by berto@igalia.com
(diff)
2:09 AM WebKitGTK/2.24.x edited by berto@igalia.com
(diff)
2:04 AM Changeset in webkit [249477] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] Sound is down-pitched when playing video from YLE Areena
https://bugs.webkit.org/show_bug.cgi?id=201399

Reviewed by Xabier Rodriguez-Calvar.

If the FDK-AAC decoder is available, promote it and downrank the
libav AAC decoders, due to their broken LC support, as reported in:
https://ffmpeg.org/pipermail/ffmpeg-devel/2019-July/247063.html

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::initializeGStreamer):

1:37 AM Changeset in webkit [249476] by Kocsen Chung
  • 7 edits in branches/safari-608-branch/Source

Versioning.

1:35 AM Changeset in webkit [249475] by Kocsen Chung
  • 11 edits
    6 adds in branches/safari-608-branch

Cherry-pick r249368. rdar://problem/55001166

Long presses that interrupt accelerated scrolling dispatch clicks on apps linked against iOS 12 or earlier
https://bugs.webkit.org/show_bug.cgi?id=201346
<rdar://problem/54885784>

Reviewed by Dean Jackson.

Source/WebKit:

For apps that are linked on or after iOS 13, we add a context menu interaction to the content view, which
requires us to disable (or avoid adding) the highlight long press gesture recognizer. However, for apps that are
linked on the iOS 12 SDK or prior, this gesture is still present, and fires when long pressing for (roughly) up
to 0.75 seconds if a tap gesture was not recognized instead. Firing this gesture sends a click event to the
page; this brings back some form of <rdar://problem/53889373>, but only when holding for slightly longer than a
normal tap, and also only in apps linked on iOS 12 or earlier. To fix this, we apply a similar solution as in
r248433 and detect whether a long press gesture interrupted scroll view deceleration in
-gestureRecognizerShouldBegin:. If so, we return NO to avoid clicking. See per-method comments below for more
details.

Testing this bug as-is was tricky, since there's no way in layout tests to simulate being linked on or before a
given SDK version. Luckily, recall that:

  1. This bug occurs when the highlight gesture recognizer is enabled and added to the content view.
  2. The highlight gesture recognizer only needs to be disabled or removed when context menu interaction is added. As such, we should be able to restore the highlight gesture recognizer by suppressing the context menu interaction in an app linked-on-or-after iOS 13, by setting allowsLinkPreview to NO. Unfortunately, this doesn't quite work, since we currently always avoid adding the highlight gesture recognizer if the app is linked on iOS 13 or later.

However, this means that the highlight gesture recognizer is absent from the content view in apps linked against
iOS 13 that disable link previews, even though its absence is not required. This means that long pressing a
clickable element in a web view that disables link previews does not show a tap highlight on iOS 13, whereas it
would on iOS 12; this is a regression, albeit a very subtle one. To fix this subtle issue and make it possible
to write a test for this bug, we refactor some logic for creating and configuring the highlight long press
gesture, such that we now unconditionally add the highlight gesture, but only enable it in apps linked on or
after iOS 13 if link previews (i.e. context menu interaction) are not allowed.

Test: fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-overflow.html

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView setAllowsLinkPreview:]):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]):

Refactor our gesture setup logic to always create and add the long press and highlight long press gestures, but
conditionally disable them based on whether or not (1) the context menu is available, and (2) WKWebView's
allowsLinkPreview property.

(-[WKContentView _didChangeLinkPreviewAvailability]):
(-[WKContentView _updateLongPressAndHighlightLongPressGestures]):

Add a new helper to update the enabled state of the long press and highlight long press gestures, by consulting
-_shouldUseContextMenu and -allowsLinkPreview. This is called when setting up the gestures, as well as whenever
-allowsLinkPreview changes.

(-[WKContentView gestureRecognizerShouldBegin:]):

Factor out logic to ascend the view hierarchy in search of a UIScrollView that was interrupted while
decelerating into a local lambda function; use this for both the highlight gesture and the single tap gesture,
to determine whether they should begin.

  • UIProcess/ios/WKHighlightLongPressGestureRecognizer.h: Added.
  • UIProcess/ios/WKHighlightLongPressGestureRecognizer.mm: Added.

In order to remember the UIScrollView (if any) tracked by the highlight long press gesture, we subclass
_UIWebHighlightLongPressGestureRecognizer. While UILongPressGestureRecognizer does have SPI to ask for a list of
UITouches, by the time the gesture has been recognized and the gesture delegates are invoked, these UITouches
no longer correspond to UIViews. As such, the only time we have access to the list of UITouches with their
UIViews is during the touches* subclass hooks.

(-[WKHighlightLongPressGestureRecognizer reset]):

Clear out the tracked UIScrollView here, when the gesture is reset (i.e. after ending, or being canceled).

(-[WKHighlightLongPressGestureRecognizer touchesBegan:withEvent:]):

Remember the last touched UIScrollView here.

(-[WKHighlightLongPressGestureRecognizer lastTouchedScrollView]):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Add a new test option to allow tests to disable link previews.

  • WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader):
  • WebKitTestRunner/TestOptions.h:

Drive-by fix: also check enableLazyImageLoading when determining whether two TestOptions are the same.

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView):

LayoutTests:

Add a couple of new layout tests to verify that using a long press gesture to interrupt momentum scrolling in a
web view that uses API to disable link previews does not result in a click.

  • fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-main-frame-expected.txt: Added.
  • fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-main-frame.html: Added.
  • fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-overflow-expected.txt: Added.
  • fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-overflow.html: Added.

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

1:29 AM Changeset in webkit [249474] by Pablo Saavedra
  • 4 edits in trunk/Source/WebCore

[GTK] Build failure in Debian Stable and Ubuntu LTS bots after r249427
https://bugs.webkit.org/show_bug.cgi?id=201434

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::GstVideoFrameHolder::waitForCPUSync):

1:20 AM Changeset in webkit [249473] by Kocsen Chung
  • 8 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249147. rdar://problem/55001178

Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
https://bugs.webkit.org/show_bug.cgi?id=201101
<rdar://problem/54164587>

Reviewed by Eric Carlson.

Source/WebCore:

Test: fullscreen/full-screen-request-removed-with-raf.html

Add a new state variable, m_pendingFullscreenElement, to track which element is about to
become the fullscreen element, so that when elements are removed or cancelFullscreen() is
called, the state machine inside the fullscreen algorithm can cancel effectively.

  • dom/FullscreenManager.cpp: (WebCore::FullscreenManager::requestFullscreenForElement): (WebCore::FullscreenManager::cancelFullscreen): (WebCore::FullscreenManager::exitFullscreen): (WebCore::FullscreenManager::willEnterFullscreen): (WebCore::FullscreenManager::willExitFullscreen): (WebCore::FullscreenManager::didExitFullscreen): (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval): (WebCore::FullscreenManager::clear): (WebCore::FullscreenManager::fullscreenElementRemoved): Deleted.
  • dom/FullscreenManager.h:

Source/WebKit:

Add more state to track in which direction the animation is flowing to allow in-process
animations to be cancelled more gracefully.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (-[WKFullScreenWindowController enterFullScreen]): (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): (-[WKFullScreenWindowController requestExitFullScreen]): (-[WKFullScreenWindowController exitFullScreen]):
  • WebProcess/cocoa/VideoFullscreenManager.h: (WebKit::VideoFullscreenInterfaceContext::animationState const): (WebKit::VideoFullscreenInterfaceContext::setAnimationState): (WebKit::VideoFullscreenInterfaceContext::isAnimating const): Deleted. (WebKit::VideoFullscreenInterfaceContext::setIsAnimating): Deleted.
  • WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement): (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement): (WebKit::VideoFullscreenManager::didEnterFullscreen): (WebKit::VideoFullscreenManager::didCleanupFullscreen):

LayoutTests:

  • fullscreen/full-screen-request-removed-with-raf-expected.txt: Added.
  • fullscreen/full-screen-request-removed-with-raf.html: Added.

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

1:20 AM Changeset in webkit [249472] by Kocsen Chung
  • 4 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r249140. rdar://problem/55001152

Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio
https://bugs.webkit.org/show_bug.cgi?id=201171
<rdar://problem/54671275>

Reviewed by Tim Horton.

Augments an existing app-specific hack to include the Mail composition service, in addition to Mail.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isMailCompositionService):

Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService).

  • platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::informationForItemAtIndex):

Only plumb the preferred presentation height through to the web process if the application is neither Mail nor
the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only
expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail-
compose-like" web app has img { max-width: 100%; } in their stylesheet).

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

1:20 AM Changeset in webkit [249471] by Kocsen Chung
  • 8 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249339. rdar://problem/55001170

Caret does not appear in text field inside a transformed, overflow: hidden container
https://bugs.webkit.org/show_bug.cgi?id=201317
<rdar://problem/54859264>

Reviewed by Simon Fraser.

Source/WebCore:

This patch refactors the heuristic for determining whether to suppress selection gestures and UI in a way that
fixes the corner case encountered in this bug. To understand why this test case fails with our existing
heuristic, consider the below test case.

Let's say we have an input field inside an "overflow: hidden;" container, which is positioned in such a way that
it is completely clipped by its enclosing container which is also "overflow: hidden". Our existing logic would
appropriately identify this as a hidden editable element.

However, let's now apply a transform to the input field's closest "overflow: hidden" ancestor, such that the
field is now visible. Since RenderLayer::offsetFromAncestor doesn't take transforms into account when we try to
find the offset of the "overflow: hidden" layer relative to the root view, we end up passing an offsetFromRoot
of (0, 100vw) to RenderLayer::calculateClipRects, which computes a background clip rect of (0, 0, 100vw, 100vh).

This means that at the end of RenderLayer::calculateClipRects, we end up intersecting the background clip rect
(0, 0, 100vw, 100vh) against (100vw, 0, 100vw, 100vh), which results in the empty rect, and subsequently makes
us believe we're editing a hidden editable element.

Instead of tacking on more logic to isTransparentOrFullyClippedRespectingParentFrames, we can fix this by using
RenderObject::computeVisibleRectInContainer instead, performing a similar walk up the render tree to compute the
visible rect of each focused element or subframe relative to its root. This is capable of taking transforms into
account. See comments below for more details.

Test: editing/selection/ios/show-selection-in-transformed-container-2.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::isTransparentRespectingParentFrames const):

Split out isTransparentOrFullyClippedRespectingParentFrames into two methods: RenderLayer's
isTransparentRespectingParentFrames, and RenderObject's hasNonEmptyVisibleRectRespectingParentFrames. The
transparency check starts at the enclosing layer and walks up the layer tree, while the non-empty visible rect
check looks for renderers that are completely empty relative to their root views.

  • rendering/RenderLayer.h:
  • rendering/RenderObject.cpp: (WebCore::RenderObject::hasNonEmptyVisibleRectRespectingParentFrames const):

Rewrite logic for detecting completely clipped editable areas (that formerly lived in
isTransparentOrFullyClippedRespectingParentFrames) to use computeVisibleRectInContainer instead.

  • rendering/RenderObject.h:

Source/WebKit:

Adjust isTransparentOrFullyClipped to use the new methods in RenderLayer and RenderObject. See WebCore ChangeLog
for more details.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::isTransparentOrFullyClipped const):

LayoutTests:

Add a new layout test that covers this scenario. See WebCore ChangeLog for additional detail.

  • editing/selection/ios/show-selection-in-transformed-container-2-expected.txt: Added.
  • editing/selection/ios/show-selection-in-transformed-container-2.html: Added.

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

1:19 AM Changeset in webkit [249470] by Kocsen Chung
  • 3 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249296. rdar://problem/55001174

[iOS 13] Caret does not appear in text field if the body element is translated completely out of the viewport
https://bugs.webkit.org/show_bug.cgi?id=201287
<rdar://problem/54780864>

Reviewed by Tim Horton.

Source/WebKit:

During EditorState computation, we use the hidden editable element heuristic to determine whether we should
begin suppressing selection gestures and UI. Currently, we use the editable root of the selection range to
determine where in the layer tree we should start our ascent, in search of a completely transparent or
completely clipped container.

However, in the case where the selection is inside a focused text field, this causes us to walk up the layer
tree starting at the RenderLayer corresponding to the text field's inner contenteditable div, which is different
than the text field's enclosing RenderLayer in the case where the containing block is transformed, such that no
part of it is within the visible viewport. This scenario is exercised by the below test case, in which the caret
after transforming the body horizontally by -100vw is hidden due to a false positive in the hidden editable area
heuristic.

Fix this by starting the layer tree ascent from the enclosing layer of the text form control if applicable,
instead of the inner editable area under the shadow root of the form control.

Test: editing/selection/ios/show-selection-in-transformed-container.html

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::platformEditorState const):

LayoutTests:

Add a new layout test that covers this scenario. See WebKit ChangeLog for additional detail.

  • editing/selection/ios/show-selection-in-transformed-container-expected.txt: Added.
  • editing/selection/ios/show-selection-in-transformed-container.html: Added.

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

1:19 AM Changeset in webkit [249469] by Kocsen Chung
  • 4 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249230. rdar://problem/55001168

Reloading a web view with a fixed-width viewport and variable content width restores the previous page scale, shouldn't
https://bugs.webkit.org/show_bug.cgi?id=201256
<rdar://problem/54809509>

Reviewed by Simon Fraser.

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::restorePageState): When restoring page state from a history item, if the saved scale was equal to the initial scale at the time it was saved, ignore the saved scale and use the current initial scale instead.

Normally this doesn't matter because a given page's initial scale doesn't usually change
between loads, but it totally can! See the test for one example of a way an API client
might cause this; you could also imagine something similar happening if the actual
page content changed.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/long-email-viewport.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ReloadWithDifferingInitialScale.mm: Added. (TestWebKitAPI::TEST): Add a test. I left many comments because I had a great deal of trouble writing this test and wanted to document my findings.

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

1:19 AM Changeset in webkit [249468] by Kocsen Chung
  • 4 edits
    1 add in branches/safari-608-branch

Cherry-pick r249115. rdar://problem/55001212

Don't compute upconverted characters twice in buildQuery() in DataDetection.mm
<https://webkit.org/b/201144>
<rdar://problem/54689399>

Reviewed by Brent Fulgham.

Source/WebCore:

  • editing/cocoa/DataDetection.mm: (WebCore::buildQuery): Extract common variables to prevent double conversion for 8-bit strings.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add DataDetectorsTestIOS.mm to the project.
  • TestWebKitAPI/Tests/ios/DataDetectorsTestIOS.mm: Add a new test for Data Detectors for phone numbers.

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

1:19 AM Changeset in webkit [249467] by Kocsen Chung
  • 3 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249026. rdar://problem/55001375

Crash may happen when an SVG <feImage> element references the root <svg> element
https://bugs.webkit.org/show_bug.cgi?id=201014

Reviewed by Ryosuke Niwa.

Source/WebCore:

When an <feImage> references an <svg> element as its target image but
this <svg> element is also one of the ancestors of the <feImage>, the
parent <filter> should not be applied.

Test: svg/filters/filter-image-ref-root.html

  • svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build const):

LayoutTests:

Ensure the cyclic reference between the <feImage> renderer and its
ancestor <svg> root renderer is broken.

  • svg/filters/filter-image-ref-root-expected.txt: Added.
  • svg/filters/filter-image-ref-root.html: Added.

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

1:19 AM Changeset in webkit [249466] by Kocsen Chung
  • 8 edits in branches/safari-608-branch/Source/JavaScriptCore

Cherry-pick r248824. rdar://problem/55001142

[JSC] WebAssembly BBQ should switch compile mode for size of modules
https://bugs.webkit.org/show_bug.cgi?id=200807

Reviewed by Mark Lam.

Some webpages use very large Wasm module, and it exhausts all executable memory in ARM64 devices since the size of executable memory region is 128MB.
The long term solution should be introducing Wasm interpreter. But as a short term solution, we introduce heuristics switching back to BBQ B3 at
the sacrifice of start-up time, since BBQ Air bloats such lengthy code, and thereby consumes a large amount of executable memory.

Currently, I picked 10MB since the reported website is using 11MB wasm module.

  • runtime/Options.h:
  • wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::parseAndCompileAir):
  • wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile):
  • wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::compileFunctions):
  • wasm/WasmModuleInformation.h:
  • wasm/WasmSectionParser.cpp: (JSC::Wasm::SectionParser::parseCode):
  • wasm/WasmStreamingParser.cpp: (JSC::Wasm::StreamingParser::parseCodeSectionSize):

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

1:19 AM Changeset in webkit [249465] by Kocsen Chung
  • 3 edits
    1 add in branches/safari-608-branch

Cherry-pick r248793. rdar://problem/55001191

[JSC] Promise.prototype.finally should accept non-promise objects
https://bugs.webkit.org/show_bug.cgi?id=200829

Reviewed by Mark Lam.

JSTests:

  • stress/promise-finally-should-accept-non-promise-objects.js: Added. (shouldBe): (Thenable): (Thenable.prototype.then):

Source/JavaScriptCore:

According to the Promise.prototype.finally spec step 2[1], we should check @isObject instead of @isPromise,
since Promise.prototype.finally should accept thenable objects that are defined by user libraries (like, bluebird for example).
This patch changes this check to the specified one.

[1]: https://tc39.es/proposal-promise-finally/

  • builtins/PromisePrototype.js: (finally):

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

1:19 AM Changeset in webkit [249464] by Kocsen Chung
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r248698. rdar://problem/55001378

Fix the build when ENABLE(APPLE_PAY) is false.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

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

1:19 AM Changeset in webkit [249463] by Kocsen Chung
  • 13 edits in branches/safari-608-branch/Source

Cherry-pick r248692. rdar://problem/55001378

[Cocoa] Add some WKA extension points
https://bugs.webkit.org/show_bug.cgi?id=200506
<rdar://problem/51682474>

Reviewed by Tim Horton.

Source/WebCore:

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

Source/WebKit:

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

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

1:19 AM Changeset in webkit [249462] by Kocsen Chung
  • 10 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248275. rdar://problem/55001373

[WebIDL] Support partial dictionaries and conditional dictionary members
https://bugs.webkit.org/show_bug.cgi?id=200441

Reviewed by Alex Christensen.

Added new bindings tests.

  • bindings/scripts/CodeGeneratorJS.pm: (GenerateDictionaryImplementationContent):
  • bindings/scripts/IDLParser.pm: (parsePartialDefinition): (parsePartialInterface): Deleted. (parsePartialDictionary): Deleted.
  • bindings/scripts/generate-bindings.pl: (generateBindings):
  • bindings/scripts/preprocess-idls.pl: (getPartialNamesFromIDL): (getPartialInterfaceNameFromIDL): Deleted.
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::convertDictionary<TestEventConstructor::Init>):
  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: (WebCore::convertDictionary<DictionaryImplName>): (WebCore::convertDictionaryToJS):
  • bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
  • bindings/scripts/test/TestStandaloneDictionary.idl:
  • bindings/scripts/test/TestSupplemental.idl:

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

1:16 AM Changeset in webkit [249461] by ysuzuki@apple.com
  • 13 edits in trunk

[bmalloc] IsoTLSLayout and AllIsoHeaps registration is racy with derived class initialization with virtual functions
https://bugs.webkit.org/show_bug.cgi?id=201448

Reviewed by Mark Lam.

Source/bmalloc:

In the base class of IsoTLSEntry and IsoHeapImplBase, we register each instance with the per-process linked-list singleton to
offer a way to iterate all these instances. But since derived classes of IsoTLSEntry and IsoHeapImplBase have virtual functions,
the instance is not fully instantiated yet when executing the base constructor! In particular, the register instance needs vtable pointer
initialization in the derived constructor.

So, there is a race condition,

  1. IsoTLSEntry adds itself to the global linked-list.
  2. IsoTLSEntry's derived class is initializing the instance including vtable pointer, this happens because base and derived classes have virtual functions.
  3. While doing (2), other thread iterates instances through (1)'s linked-list and call virtual functions

Then, crash happens because the instance vtable pointer hasn't been set to the derived class' vtable yet. IsoHeapImpl has the same problem.
This issue causes some crashes in bmalloc::Scavenger::scavenge / bmalloc::IsoTLS::ensureEntries.

In this patch,

  1. We introduce IsoTLSEntryHolder, which initialize the TLS entry. And after fully initializing it, the holder registers the entry with the IsoTLSLayout singleton.
  2. We call IsoHeapImplBase::addToAllIsoHeaps after IsoHeapImpl is fully initialized.
  3. We put memory barrier in IsoTLSLayout since IsoTLSLayout::head does not take a lock.
  4. We add unit-test that reliably reproduces IsoHeapImpl crash if we run this test ~10 times!
  • bmalloc/AllIsoHeaps.h:
  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:

(bmalloc::IsoHeapImpl<Config>::IsoHeapImpl):
(bmalloc::IsoHeapImpl<Config>::allocatorOffset):
(bmalloc::IsoHeapImpl<Config>::deallocatorOffset):

  • bmalloc/IsoHeapInlines.h:

(bmalloc::api::IsoHeap<Type>::initialize):

  • bmalloc/IsoTLSAllocatorEntry.h:
  • bmalloc/IsoTLSDeallocatorEntry.h:
  • bmalloc/IsoTLSEntry.cpp:

(bmalloc::IsoTLSEntry::IsoTLSEntry):

  • bmalloc/IsoTLSEntry.h:

(bmalloc::IsoTLSEntryHolder::IsoTLSEntryHolder):
(bmalloc::IsoTLSEntryHolder::operator* const):
(bmalloc::IsoTLSEntryHolder::operator*):
(bmalloc::IsoTLSEntryHolder::operator-> const):
(bmalloc::IsoTLSEntryHolder::operator->):

  • bmalloc/IsoTLSLayout.cpp:

(bmalloc::IsoTLSLayout::add):

  • bmalloc/IsoTLSLayout.h:

Tools:

  • TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp:

(TEST):

1:14 AM Changeset in webkit [249460] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION (r249364): Layout Test webgpu/texture-triangle-strip.html is Failing
https://bugs.webkit.org/show_bug.cgi?id=201425

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-04
Reviewed by Myles C. Maxfield.

The orientation of webgpu/resources/blue-checkered.png is OriginRightTop.
Because r249364 made the image orientation respected everywhere including
the canvas drawImage(), the expected result does not match the output of
the test anymore.

The fix is to change the the expected result to match the image drawing
when the image orientation is respected.

  • webgpu/js/webgpu-functions.js:

(drawGreenAndBlueCheckerboardInSoftware):

Sep 3, 2019:

11:31 PM Changeset in webkit [249459] by Kocsen Chung
  • 7 edits in tags/Safari-609.1.3.1/Source

Versioning.

11:13 PM Changeset in webkit [249458] by mark.lam@apple.com
  • 5 edits
    1 add in trunk

Assertions in JSArrayBufferView::byteOffset() are only valid for the mutator thread.
https://bugs.webkit.org/show_bug.cgi?id=201309
<rdar://problem/54832121>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/JSArrayBufferView-byteOffset-is-racy-from-compiler-thread.js: Added.

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • runtime/JSArrayBufferView.h:
  • runtime/JSArrayBufferViewInlines.h:

(JSC::JSArrayBufferView::possiblySharedBufferImpl):
(JSC::JSArrayBufferView::possiblySharedBuffer):
(JSC::JSArrayBufferView::byteOffsetImpl):
(JSC::JSArrayBufferView::byteOffset):
(JSC::JSArrayBufferView::byteOffsetConcurrently):

11:13 PM Changeset in webkit [249457] by Kocsen Chung
  • 1 copy in tags/Safari-609.1.3.1

New tag.

10:15 PM Changeset in webkit [249456] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[macCatalyst] Unable to upload non-image files using drag and drop
https://bugs.webkit.org/show_bug.cgi?id=201438

Reviewed by Tim Horton.

On recent builds of macOS 10.15, NSItemProviders that are produced when dropping files from Finder into a
macCatalyst app no longer contain kUTTypeFileURL as a registered type identifier. This means that the current
heuristic for figuring out whether or not an item provider can be represented as a file upload is broken, since
it thinks all dropped content is inline data.

On iOS, we treat an NSItemProvider as an "uploaded" file as long as it hasn't been explicitly marked as inline
data, such as a dragged selection from a native text field. However, on macCatalyst, all item providers return
preferredPresentationStyle of UIPreferredPresentationStyleUnspecified, regardless of the source, so this check
is useless on macCatalyst since it would consider all dropped content as a file upload (text selections, plain
URLs, etc.).

Luckily, NSItemProvider's -suggestedName is now populated in recent macOS builds, which means we have a much
stronger (and more robust) hint that a dropped item provider is actually a file. For the time being, use this
instead of always returning NO.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):

Make a minor tweak to move the UIPreferredPresentationStyleInline check to shared code, such that when
<rdar://55002929> is fixed, our code will automatically correctly treat inline item providers that have been
explicitly marked as such.

9:54 PM Changeset in webkit [249455] by Antti Koivisto
  • 17 edits in trunk/Source

Remove redundant painting phase arguments from GraphicsLayerClient functions
https://bugs.webkit.org/show_bug.cgi?id=201443

Reviewed by Simon Fraser.

Source/WebCore:

It is available from the GraphicsLayer.

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::paintContents):

  • page/PageOverlayController.h:
  • page/mac/ServicesOverlayController.h:
  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::paintContents):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::paintGraphicsLayerContents):

  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::paintContents):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintFlagsForLayer const):

Factor into a function.

(WebCore::RenderLayerBacking::paintContents):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::paintContents):

  • rendering/RenderLayerCompositor.h:

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::paintContents):

  • WebView.h:
9:11 PM Changeset in webkit [249454] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Unable to open local file from favorites bar
https://bugs.webkit.org/show_bug.cgi?id=201444

Reviewed by Brent Fulgham.

The sandbox extension handle should be created providing the pid of the receiving process.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):

8:30 PM Changeset in webkit [249453] by mmaxfield@apple.com
  • 6 edits
    6 adds in trunk

[WHLSL] Implement SampleLevel(), SampleBias(), and SampleGrad()
https://bugs.webkit.org/show_bug.cgi?id=201385

Reviewed by Dean Jackson.

Source/WebCore:

These are used in the Babylon.js demo.

Tests: webgpu/whlsl/textures-sample-bias.html

webgpu/whlsl/textures-sample-grad.html
webgpu/whlsl/textures-sample-level.html

  • Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::sampleType):
(WebCore::WHLSL::Metal::inlineNativeFunction):

  • Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:

(WebCore::WHLSL::Intrinsics::addFullTexture):
(WebCore::WHLSL::Intrinsics::addDepthTexture):

  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

  • webgpu/whlsl/textures-sample-bias-expected.html: Added.
  • webgpu/whlsl/textures-sample-bias.html: Added.
  • webgpu/whlsl/textures-sample-grad-expected.html: Added.
  • webgpu/whlsl/textures-sample-grad.html: Added.
  • webgpu/whlsl/textures-sample-level-expected.html: Added.
  • webgpu/whlsl/textures-sample-level.html: Added.
8:13 PM Changeset in webkit [249452] by Chris Dumez
  • 9 edits in trunk/Source

FrameLoader::FrameProgressTracker::progressCompleted() does not need a pageID
https://bugs.webkit.org/show_bug.cgi?id=201431

Reviewed by Antti Koivisto.

Source/WebCore:

FrameLoader::FrameProgressTracker::progressCompleted() does not need to request a pageID
from the client. It can merely pass the Page object and the upper layers can very easily
get the identifier of that page.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::FrameProgressTracker::progressCompleted):

  • loader/LoaderStrategy.h:

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::pageLoadCompleted):

  • WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::pageLoadCompleted):

  • WebCoreSupport/WebResourceLoadScheduler.h:
7:57 PM Changeset in webkit [249451] by Devin Rousso
  • 10 edits
    2 copies
    2 moves
    1 add
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: provide a way to view XML/HTML/SVG resource responses as a DOM tree
https://bugs.webkit.org/show_bug.cgi?id=201046
<rdar://problem/54446087>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype.showRequest):
(WI.ResourceClusterContentView.prototype.showResponse):
(WI.ResourceClusterContentView.prototype.get customRequestDOMContentView): Added.
(WI.ResourceClusterContentView.prototype.get customRequestJSONContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseDOMContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseJSONContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseTextContentView): Added.
(WI.ResourceClusterContentView.prototype._createPathComponent): Added.
(WI.ResourceClusterContentView.prototype._canShowCustomRequestContentView):
(WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
(WI.ResourceClusterContentView.prototype._pathComponentForContentView):
(WI.ResourceClusterContentView.prototype._identifierForContentView):
(WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
(WI.ResourceClusterContentView.prototype._canUseDOMContentViewForContent): Added.
(WI.ResourceClusterContentView.prototype._normalizeMIMETypeForDOM): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentViews): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentViews): Added.
(WI.ResourceClusterContentView.createPathComponent): Deleted.
(WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentView): Deleted.
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView): Deleted.

  • UserInterface/Base/Main.js:

(WI.showResourceRequest):

  • UserInterface/Views/PathComponentIcons.css:

(.object-icon .icon): Added.

  • UserInterface/Main.html:
  • UserInterface/Views/SVGImageResourceClusterContentView.js: Removed.

Reworked to allow more than one custom request/response content view at the same time. As
such, merge the WI.SVGImageResourceClusterContentView into this class.

  • UserInterface/Views/LocalRemoteObjectContentView.js: Added.

(WI.LocalRemoteObjectContentView):
(WI.LocalRemoteObjectContentView.prototype.get expression):
(WI.LocalRemoteObjectContentView.prototype.renderRemoteObject):
(WI.LocalRemoteObjectContentView.prototype.initialLayout):
(WI.LocalRemoteObjectContentView.prototype.attached):
(WI.LocalRemoteObjectContentView.prototype.closed):

  • UserInterface/Views/LocalRemoteObjectContentView.css: Added.

(.content-view.local-remote-object):

  • UserInterface/Views/LocalDOMContentView.js: Added.

(WI.LocalDOMContentView):
(WI.LocalDOMContentView.prototype.get expression):
(WI.LocalDOMContentView.prototype.renderRemoteObject):

  • UserInterface/Views/LocalJSONContentView.js: Added.

(WI.LocalJSONContentView):
(WI.LocalJSONContentView.prototype.get expression):
(WI.LocalJSONContentView.prototype.renderRemoteObject):

  • UserInterface/Views/JSONContentView.js: Removed.
  • UserInterface/Views/JSONContentView.css: Removed.

Rework WI.JSONContentView into a more generic set of classes that render an object we send
to the inspected page for instrumentation.

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.populateContextMenu):
(WI.DOMTreeOutline.prototype._onmousemove):
(WI.DOMTreeOutline.prototype._onmouseout):
(WI.DOMTreeOutline.prototype._ondragstart):
(WI.DOMTreeOutline.prototype._ondragover):
(WI.DOMTreeOutline.prototype._ondragleave):
(WI.DOMTreeOutline.prototype._ondragend):
(WI.DOMTreeOutline.prototype._hideElements):

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForDOMNode):
Ensure that interactions that would modify the DOM tree only happen when editable. If the
WI.DOMTreeOutline represents a "local" WI.DOMNode (one that's been sent to the inspected
page for instrumentation, and shouldn't be part of the main #document), don't allow any
editing actions to be performed.

  • UserInterface/Views/TextContentView.js:

(WI.TextContentView):
Allow a representedObject object to be provided and used instead of the given string.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Images/Object.svg: Added.
7:26 PM Changeset in webkit [249450] by Devin Rousso
  • 21 edits
    3 adds in trunk

Web Inspector: implement blackboxing of script resources
https://bugs.webkit.org/show_bug.cgi?id=17240
<rdar://problem/5732847>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When a script is blackboxed and the debugger attempts to pause in that script, the pause
reason/data will be saved and execution will continue until it has left the blackboxed
script. Once outside, execution is paused with the saved reason/data.

This is especially useful when debugging issues using libraries/frameworks, as it allows the
developer to "skip" the internal logic of the library/framework and instead focus only on
how they're using it.

  • inspector/protocol/Debugger.json:

Add setShouldBlackboxURL command.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::enable):
(Inspector::InspectorDebuggerAgent::updatePauseReasonAndData): Added.
(Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::cancelPauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::setShouldBlackboxURL): Added.
(Inspector::InspectorDebuggerAgent::setPauseForInternalScripts):
(Inspector::InspectorDebuggerAgent::didParseSource):
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::didContinue):
(Inspector::InspectorDebuggerAgent::breakProgram):
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
(Inspector::InspectorDebuggerAgent::clearPauseDetails): Added.
(Inspector::InspectorDebuggerAgent::clearBreakDetails): Deleted.
Renamed "break" to "pause" to match Debugger naming.

  • debugger/Debugger.h:
  • debugger/Debugger.cpp:

(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::setBlackboxType): Added.
(JSC::Debugger::clearBlackbox): Added.
(JSC::Debugger::isBlacklisted const): Deleted.
(JSC::Debugger::addToBlacklist): Deleted.
(JSC::Debugger::clearBlacklist): Deleted.

Source/WebInspectorUI:

When a script is blackboxed and the debugger attempts to pause in that script, the pause
reason/data will be saved and execution will continue until it has left the blackboxed
script. Once outside, execution is paused with the saved reason/data.

This is especially useful when debugging issues using libraries/frameworks, as it allows the
developer to "skip" the internal logic of the library/framework and instead focus only on
how they're using it.

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager):
(WI.DebuggerManager.prototype.initializeTarget):
(WI.DebuggerManager.supportsBlackboxingScripts): Added.
(WI.DebuggerManager.pauseReasonFromPayload): Added.
(WI.DebuggerManager.prototype.isScriptBlackboxed): Added.
(WI.DebuggerManager.prototype.setShouldBlackboxScript): Added.
(WI.DebuggerManager.prototype._pauseReasonFromPayload):
(WI.DebuggerManager.prototype._pauseReasonFromPayload): Deleted.

  • UserInterface/Models/SourceCode.js:

(WI.SourceCode.prototype.get isScript): Added.
(WI.SourceCode.prototype.get supportsScriptBlackboxing): Added.

  • UserInterface/Models/Script.js:

(WI.Script.prototype.get isScript): Added.

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.get isScript): Added.
Provide a more straightforward way of determining if a WI.SourceCode is a script.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype._updatePauseReason):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
Display the original pause reason and breakpoint (if applicable) when pausing after leaving
a blackboxed script.

  • UserInterface/Views/SourceCodeTreeElement.js:

(WI.SourceCodeTreeElement.prototype.canSelectOnMouseDown): Added.
(WI.SourceCodeTreeElement.prototype.updateStatus): Added.
(WI.SourceCodeTreeElement.prototype._updateSourceCode):
(WI.SourceCodeTreeElement.prototype._updateToggleBlackboxImageElementState): Added.
(WI.SourceCodeTreeElement.prototype._handleToggleBlackboxedImageElementClick): Added.

  • UserInterface/Views/SourceCodeTreeElement.css: Added.

(.tree-outline .item .status > .toggle-script-blackboxed):
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed,):
(.tree-outline:focus .item.selected .status > .toggle-script-blackboxed):
(.tree-outline .item .status > .toggle-script-blackboxed.blackboxed):
(@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackboxed):

  • UserInterface/Views/ResourceTreeElement.js:

(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype.updateStatus): Added.
(WI.ResourceTreeElement.prototype._updateStatus): Deleted.
Make sure that the loading indicator doesn't override the blackbox toggle.

  • UserInterface/Base/Setting.js:

(WI.Setting.prototype.set value):
(WI.Setting.prototype.save): Added.
When modifying an array value, that doesn't go through WI.Setting.prototype.set value, so
we need a more "manual" way of saving the new value.

  • UserInterface/Main.html:
  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Test/TestHarness.js:

(TestHarness.prototype.newline): Added.
(TestHarness.prototype.expectException):
Add a special case for logging error message objects when running protocol tests.

LayoutTests:

  • inspector/debugger/setShouldBlackboxURL.html: Added.
  • inspector/debugger/setShouldBlackboxURL-expected.txt: Added.
  • inspector/model/remote-object-api-expected.txt:

Update output since WI.TestHarness.prototype.expectException now logs the .constructor.name.

6:47 PM Changeset in webkit [249449] by mark.lam@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

Remove the need to pass performJITMemcpy as a pointer.
https://bugs.webkit.org/show_bug.cgi?id=201413

Reviewed by Michael Saboff.

We want performJITMemcpy to always be inlined. In this patch, we also clean up
some template parameters to use enums instead of booleans to better document the
intent of the code.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::fillNops):
(JSC::ARM64Assembler::linkJump):
(JSC::ARM64Assembler::linkCall):
(JSC::ARM64Assembler::relinkJump):
(JSC::ARM64Assembler::relinkCall):
(JSC::ARM64Assembler::link):
(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):
(JSC::ARM64Assembler::relinkJumpOrCall):
(JSC::ARM64Assembler::CopyFunction::CopyFunction): Deleted.
(JSC::ARM64Assembler::CopyFunction::operator()): Deleted.

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::fillNops):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::linkJumpT1):
(JSC::ARMv7Assembler::linkJumpT2):
(JSC::ARMv7Assembler::linkJumpT3):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkConditionalJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkConditionalBX):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::emitNops):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::fillNops):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::link):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::link):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::fillNops):

  • jit/ExecutableAllocator.h:

(JSC::performJITMemcpy):

  • runtime/JSCPtrTag.h:
5:39 PM Changeset in webkit [249448] by dino@apple.com
  • 2 edits in trunk/Tools

Test for ContextMenus with images
https://bugs.webkit.org/show_bug.cgi?id=201437

Reviewed by Wenson Hsieh.

Add a test for ContextMenus that trigger on images, and make
sure that they ask for alternate URLs (added in r249171).

  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(contextMenuWebViewDriver):
(-[TestContextMenuImageUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuImageUIDelegate _webView:alternateURLFromImage:userInfo:]):
(-[TestContextMenuImageUIDelegate webView:contextMenuWillPresentForElement:]):
(-[TestContextMenuImageUIDelegate webView:contextMenuForElement:willCommitWithAnimator:]):
(-[TestContextMenuImageUIDelegate webView:contextMenuDidEndForElement:]):
(TEST):

5:35 PM Changeset in webkit [249447] by Devin Rousso
  • 2 edits in trunk/LayoutTests

REGRESSION (r249132): [macOS WK2] Layout Test inspector/layers/layerTreeDidChange.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=201435

Reviewed by Joseph Pecoraro.

r249132 changed the InspectorLayerTreeAgent to reset the flag that controls whether the
frontend should be notified about layer changes when disable is called, which happens when
Web Inspector disconnects.

Sometimes, a layer change event can be "in flight" when this happens, meaning that the Web
Inspector frontend can receive a layer change event before it requests the new layer data.

This is normally handled by the Web Inspector UI, as the associated DOM node would no longer
exist, so the UI paths would early return.

  • inspector/layers/layerTreeDidChange.html:

Only listen for layer change events once we've triggered a guaranteed layer update, as any
"in flight" events from previous tests could be incorrectly logged as part of this test.

5:20 PM Changeset in webkit [249446] by Justin Fan
  • 2 edits
    2 adds in trunk/Websites/webkit.org

[WebGPU] Add compute-boids to WebGPU demo page
https://bugs.webkit.org/show_bug.cgi?id=201416

Reviewed by Dean Jackson.

Add the compute-boids demo for use with STP 91.

  • demos/webgpu/compute-boids.html: Added.
  • demos/webgpu/index.html:
  • demos/webgpu/resources/compute-boids.png: Added.
4:37 PM Changeset in webkit [249445] by Devin Rousso
  • 10 edits in trunk

REGRESSION (r249078): Flaky crash in com.apple.JavaScriptCore: Inspector::InjectedScriptModule::ensureInjected
https://bugs.webkit.org/show_bug.cgi?id=201201
<rdar://problem/54771560>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/InjectedScriptSource.js:

(let.InjectedScript.prototype.injectModule):
(let.InjectedScript.prototype._evaluateOn):
(CommandLineAPI):
(let.InjectedScript.prototype.setInspectObject): Deleted.
(let.InjectedScript.prototype.addCommandLineAPIGetter): Deleted.
(let.InjectedScript.prototype.addCommandLineAPIMethod.func.toString): Deleted.
(let.InjectedScript.prototype.addCommandLineAPIMethod): Deleted.
(InjectedScript.CommandLineAPI): Deleted.
Allow injected script "extensions" (e.g. CommandLineAPIModuleSource.js) to modify objects
directly, instead of having them call functions.

  • inspector/InjectedScriptModule.cpp:

(Inspector::InjectedScriptModule::ensureInjected):
Make sure to reset hadException to false before making another call.

Source/WebCore:

Tests: inspector/debugger/tail-deleted-frames-this-value.html

inspector/heap/getRemoteObject.html

  • inspector/CommandLineAPIModuleSource.js:

Avoid executing functions when injecting. Instead, modify the CommandLineAPI directly.

LayoutTests:

  • inspector/debugger/tail-deleted-frames-this-value.html:
  • inspector/debugger/tail-deleted-frames-this-value-expected.txt:
  • inspector/debugger/resources/tail-deleted-frames-this-value.js:
  • inspector/timeline/line-column-expected.txt:
4:21 PM Changeset in webkit [249444] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Null deref under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]'s handler block
https://bugs.webkit.org/show_bug.cgi?id=201436
<rdar://problem/40640475>

Reviewed by Simon Fraser.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView dealloc]):
(-[WKWebView _addUpdateVisibleContentRectPreCommitHandler]):
We crash sending a message to a deallocated WKWebView inside the handler block
passed to +[CATransaction addCommitHandler:]. This seems impossible, because
we carefully retain it, but it's possible that it could be the result of
the handler block being installed under -dealloc (in which case retaining
the WKWebView wouldn't actually extend its lifetime). -[WKWebView dealloc]
is fairly sizable, and it's hard to follow all paths from it, so instead
add a RELEASE_LOG_FAULT, so we'll get simulated crash logs, and bail,
so we'll stop actually crashing (if this is the cause).

This is just a speculative fix, but a hopeful one, since intentionally calling
-_addUpdateVisibleContentRectPreCommitHandler: from dealloc yields a similar-looking
crash under the handler block.

2:52 PM Changeset in webkit [249443] by Jonathan Bedard
  • 9 edits in trunk/Tools

results.webkit.org: Move legend into sidebar
https://bugs.webkit.org/show_bug.cgi?id=201258

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(Legend): Make the legend vertical instead of horizontal, add ToolTip to dots in the legend.

  • resultsdbpy/resultsdbpy/view/static/js/tooltip.css: Add left and right tooltip arrows.
  • resultsdbpy/resultsdbpy/view/static/js/tooltip.js:

(isPointInElement): Make bound check include borders.
(_ToolTip.toString): Add left/right cases.
(_ToolTip.prototype.setByElement): Set the tooltip location given an element.

  • resultsdbpy/resultsdbpy/view/templates/search.html: Put the legend into the sidebar.
  • resultsdbpy/resultsdbpy/view/templates/suite_results.html: Ditto.
1:35 PM Changeset in webkit [249442] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Initialize <thead><tbody><tfoot> display boxes.
https://bugs.webkit.org/show_bug.cgi?id=201235
<rdar://problem/54807060>

Reviewed by Antti Koivisto.

Set them as blank for now.

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layout const):

1:05 PM Changeset in webkit [249441] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][Floating] Replace all LayoutState::displayBoxForLayoutBox() calls with FormattingContext::displayBoxForLayoutBox()
https://bugs.webkit.org/show_bug.cgi?id=201414
<rdar://problem/54963302>

Reviewed by Antti Koivisto.

Fix the final LayoutState::displayBoxForLayoutBox() callsites. Now all displayBoxForLayoutBox() calls are directed to the
established FormattingContext.

  • layout/FormattingContext.cpp:

(WebCore::Layout::mapHorizontalPositionToAncestor):
(WebCore::Layout::FormattingContext::mapLeftToAncestor const):
(WebCore::Layout::FormattingContext::mapRightToAncestor const):
(WebCore::Layout::FormattingContext::mapBoxToAncestor const):
(WebCore::Layout::FormattingContext::mapTopToAncestor const):
(WebCore::Layout::FormattingContext::mapPointToAncestor const):
(WebCore::Layout::FormattingContext::mapPointToDescendent const):
(WebCore::Layout::FormattingContext::mapLeftToAncestor): Deleted.
(WebCore::Layout::FormattingContext::mapRightToAncestor): Deleted.
(WebCore::Layout::FormattingContext::mapBoxToAncestor): Deleted.
(WebCore::Layout::FormattingContext::mapTopToAncestor): Deleted.
(WebCore::Layout::FormattingContext::mapPointToAncestor): Deleted.
(WebCore::Layout::FormattingContext::mapPointToDescendent): Deleted.

  • layout/FormattingContext.h:

(WebCore::Layout::FormattingContext::root const):
(WebCore::Layout::FormattingContext::formattingState const):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout):
(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::mapToFormattingContextRoot):
(WebCore::Layout::FloatingContext::FloatingContext):
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
(WebCore::Layout::FloatingContext::constraints const):
(WebCore::Layout::FloatingContext::append):

  • layout/floats/FloatingContext.h:

(WebCore::Layout::FloatingContext::formattingContext const):
(WebCore::Layout::FloatingContext::root const):

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

12:55 PM Changeset in webkit [249440] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Cache "compositingAncestor" during the compositing updateBackingAndHierarchy() tree walk
https://bugs.webkit.org/show_bug.cgi?id=201403

Reviewed by Antti Koivisto.

Finding a layer's compositingAncestor requires an ancestor tree walk. We can avoid this during
compositing updates, since we're already in the middle of a paint-order tree walk, and can just
keep track of the current compositingAncestor on the way down.

Shaves a few % off time in updateCompositingLayers().

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::ComputedOffsets::ComputedOffsets):
(WebCore::ComputedOffsets::fromAncestorGraphicsLayer):
(WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const):
(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::UpdateBackingTraversalState::UpdateBackingTraversalState):
(WebCore::RenderLayerCompositor::UpdateBackingTraversalState::stateForDescendants const):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
(WebCore::RenderLayerCompositor::updateLayerCompositingState):
(WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
(WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):

  • rendering/RenderLayerCompositor.h:
12:53 PM Changeset in webkit [249439] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC] FloatingState should not need to query for display boxes.
https://bugs.webkit.org/show_bug.cgi?id=201408
<rdar://problem/54958348>

Reviewed by Antti Koivisto.

This is in preparation for transitioning the floating codebase to use the formatting context for
retrieving display boxes.
FloatingContext should be responsible for adding/removing the new/existing float boxes to the state.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::append):
(WebCore::Layout::FloatingContext::remove):

  • layout/floats/FloatingContext.h:
  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::append):
(WebCore::Layout::belongsToThisFloatingContext): Deleted.

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::FloatItem::horizontalMargin const):

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

12:48 PM Changeset in webkit [249438] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Floats] Do not pass FloatingState to FloatItem
https://bugs.webkit.org/show_bug.cgi?id=201406
<rdar://problem/54957097>

Reviewed by Antti Koivisto.

This is in preparation for transitioning the floating codebase to use the formatting context for
retrieving display boxes. Now FloatItems don't need the FloatingState to compute absolute display boxes.

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::FloatItem::FloatItem):
(WebCore::Layout::FloatingState::append):

  • layout/floats/FloatingState.h:
12:21 PM Changeset in webkit [249437] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][Floats] Do not pass FloatingState to FloatAvoider/FloatBox
https://bugs.webkit.org/show_bug.cgi?id=201405
<rdar://problem/54956381>

Reviewed by Antti Koivisto.

This is in preparation for transitioning the floating codebase to use the formatting context for
retrieving display boxes. Now FloatAvoiders/FloatBoxes don't need the FloatingState to compute absolute display boxes.

  • layout/floats/FloatAvoider.cpp:

(WebCore::Layout::FloatAvoider::FloatAvoider):
(WebCore::Layout::FloatAvoider::setHorizontalConstraints):
(WebCore::Layout::FloatAvoider::initialHorizontalPosition const):
(WebCore::Layout::FloatAvoider::overflowsContainingBlock const):
(WebCore::Layout::FloatAvoider::rectInContainingBlock const):

  • layout/floats/FloatAvoider.h:

(WebCore::Layout::FloatAvoider::floatingState const): Deleted.

  • layout/floats/FloatBox.cpp:

(WebCore::Layout::FloatBox::FloatBox):
(WebCore::Layout::FloatBox::initialVerticalPosition const):

  • layout/floats/FloatBox.h:
  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::mapToFormattingContextRoot):
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):

  • platform/graphics/LayoutPoint.h:

(WebCore::LayoutPoint::isZero const):

11:56 AM Changeset in webkit [249436] by jiewen_tan@apple.com
  • 9 edits in trunk

[WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
https://bugs.webkit.org/show_bug.cgi?id=201369
<rdar://problem/54903724>

Reviewed by Brent Fulgham.

Source/WebCore:

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isSafariViewService):
Adds a way to detect SafariViewService.

Source/WebKit:

Communications to security keys require entitlements, which are not guaranteed to be present in third party
WKWebView clients. Therefore, only enable WebAuthn by default for MobileSafari and SafariViewService.

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultWebAuthenticationEnabled):

  • Shared/WebPreferencesDefaultValues.h:

LayoutTests:

  • http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:

Imporves the test a bit.

11:37 AM Changeset in webkit [249435] by Chris Dumez
  • 39 edits in trunk/Source/WebKit

Rename WebPage::pageID() to WebPage::identifier()
https://bugs.webkit.org/show_bug.cgi?id=201428

Reviewed by Antti Koivisto.

  • Shared/API/Cocoa/WKBrowsingContextHandle.mm:

(-[WKBrowsingContextHandle _initWithPage:]):

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::WebPaymentCoordinator):
(WebKit::WebPaymentCoordinator::showPaymentUI):
(WebKit::WebPaymentCoordinator::messageSenderDestinationID const):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::clearNotifications):
(WebKit::WebNotificationManager::didDestroyNotification):

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::WebAuthenticatorCoordinator):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::windowRect):
(WebKit::WebChromeClient::focusedFrameChanged):
(WebKit::WebChromeClient::createWindow):
(WebKit::WebChromeClient::testProcessIncomingSyncMessagesWhenWaitingForSyncReply):
(WebKit::WebChromeClient::toolbarsVisible):
(WebKit::WebChromeClient::statusbarVisible):
(WebKit::WebChromeClient::menubarVisible):
(WebKit::WebChromeClient::wrapCryptoKey const):
(WebKit::WebChromeClient::unwrapCryptoKey const):
(WebKit::WebChromeClient::signedPublicKeyAndChallengeString const):

  • WebProcess/WebCoreSupport/WebColorChooser.cpp:

(WebKit::WebColorChooser::WebColorChooser):
(WebKit::WebColorChooser::reattachColorChooser):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):

  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp:

(WebKit::WebDataListSuggestionPicker::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionPicker::close):
(WebKit::WebDataListSuggestionPicker::displayWithActivationType):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::pageID const):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):

  • WebProcess/WebCoreSupport/WebPopupMenu.cpp:

(WebKit::WebPopupMenu::show):
(WebKit::WebPopupMenu::hide):

  • WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:

(WebKit::WebSearchPopupMenu::saveRecentSearches):
(WebKit::WebSearchPopupMenu::loadRecentSearches):

  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:

(WebKit::WebFrameLoaderClient::createPreviewLoaderClient):

  • WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:

(WebKit::TextCheckingControllerProxy::TextCheckingControllerProxy):
(WebKit::TextCheckingControllerProxy::~TextCheckingControllerProxy):

  • WebProcess/WebPage/Cocoa/WebRemoteObjectRegistry.cpp:

(WebKit::WebRemoteObjectRegistry::WebRemoteObjectRegistry):
(WebKit::WebRemoteObjectRegistry::close):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::addScrollingTreeForPage):
(WebKit::EventDispatcher::removeScrollingTreeForPage):
(WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
(WebKit::EventDispatcher::getQueuedTouchEventsForPage):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::RemoteScrollingCoordinator):
(WebKit::RemoteScrollingCoordinator::~RemoteScrollingCoordinator):

  • WebProcess/WebPage/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::sendMessageToBackend):
(WebKit::RemoteWebInspectorUI::changeSheetRect):
(WebKit::RemoteWebInspectorUI::startWindowDrag):
(WebKit::RemoteWebInspectorUI::bringToFront):
(WebKit::RemoteWebInspectorUI::closeWindow):
(WebKit::RemoteWebInspectorUI::reopen):
(WebKit::RemoteWebInspectorUI::resetState):
(WebKit::RemoteWebInspectorUI::openInNewTab):
(WebKit::RemoteWebInspectorUI::save):
(WebKit::RemoteWebInspectorUI::append):
(WebKit::RemoteWebInspectorUI::showCertificate):

  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::~ViewGestureGeometryCollector):

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::backListCount const):
(WebKit::WebBackForwardListProxy::forwardListCount const):

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openLocalInspectorFrontend):
(WebKit::WebInspector::closeFrontendConnection):
(WebKit::WebInspector::bringToFront):
(WebKit::WebInspector::elementSelectionChanged):
(WebKit::WebInspector::timelineRecordingChanged):
(WebKit::WebInspector::setMockCaptureDevicesEnabledOverride):
(WebKit::WebInspector::updateDockingAvailability):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::m_textAutoSizingAdjustmentTimer):
(WebKit::WebPage::messageSenderDestinationID const):
(WebKit::WebPage::close):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::WebPage::setFixedLayoutSize):
(WebKit::WebPage::freezeLayerTree):
(WebKit::WebPage::unfreezeLayerTree):
(WebKit::WebPage::restoreSessionInternal):
(WebKit::WebPage::setCurrentHistoryItemForReattach):
(WebKit::WebPage::updateIsInWindow):
(WebKit::WebPage::setActivityState):
(WebKit::WebPage::mainFrameDidLayout):
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::hasStorageAccess):
(WebKit::WebPage::requestStorageAccess):
(WebKit::WebPage::textInputContextsInRect):
(WebKit::WebPage::elementForTextInputContext):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::identifier const):
(WebKit::WebPage::pageID const): Deleted.

  • WebProcess/WebPage/WebPageInspectorTarget.cpp:

(WebKit::WebPageInspectorTarget::identifier const):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase setWebPage:]):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::executeKeypressCommandsInternal):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::transformObjectsToHandles):

  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::copy):

  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):

  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionManager::PlaybackSessionManager):
(WebKit::PlaybackSessionManager::~PlaybackSessionManager):
(WebKit::PlaybackSessionManager::invalidate):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::VideoFullscreenManager):
(WebKit::VideoFullscreenManager::~VideoFullscreenManager):
(WebKit::VideoFullscreenManager::invalidate):

11:25 AM Changeset in webkit [249434] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Make "clips compositing descendants" an indirect compositing reason
https://bugs.webkit.org/show_bug.cgi?id=201381

Reviewed by Antti Koivisto.

Whether a layer has to composite to clip composited descendants is an "indirect" reason,
just like having to composite for filters if there's a composited descendant. So add
IndirectCompositingReason::Clipping, and have computeIndirectCompositingReason() compute this,
replacing the code that ran in computeCompositingRequirements().

This is some preparatory cleanup for webkit.org/b/201330.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::requiresCompositingLayer const):
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
(WebCore::RenderLayerCompositor::computeIndirectCompositingReason const):
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const): Deleted.

  • rendering/RenderLayerCompositor.h:
11:21 AM Changeset in webkit [249433] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][Floats] Move FloatingState::constraints to FloatingContext
https://bugs.webkit.org/show_bug.cgi?id=201393
<rdar://problem/54939361>

Reviewed by Antti Koivisto.

This is in preparation for transitioning the floating codebase to use the formatting context for
retrieving display boxes. Now FloatingContext (just like any other formatting context) holds on to the formatting
context root.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout):
(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
(WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::FloatingContext):
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
(WebCore::Layout::FloatingContext::constraints const):

  • layout/floats/FloatingContext.h:

(WebCore::Layout::FloatingContext::isEmpty const):
(WebCore::Layout::FloatingContext::root const):

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::constraints const): Deleted.

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::last const):
(WebCore::Layout::FloatingState::isEmpty const): Deleted.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

11:06 AM Changeset in webkit [249432] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Increase default limit for LimitSlider
https://bugs.webkit.org/show_bug.cgi?id=201424

Reviewed by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/drawer.js:

(LimitSlider): Increase the default limit, make limit slider linear instead of logarithmic.

9:38 AM Changeset in webkit [249431] by commit-queue@webkit.org
  • 8 edits
    2 adds in trunk

[iOS] Treat a two-finger single tap as if the user tapped with the Cmd key pressed
https://bugs.webkit.org/show_bug.cgi?id=201420
<rdar://problem/53207786>

Patch by Antoine Quint <Antoine Quint> on 2019-09-03
Reviewed by Simon Fraser.

Source/WebKit:

Set the metaKey modifier to true when generating a click event based on a two-finger single tap. This is important so that sites like Google and DuckDuckGo
correctly open links in their search results page in a new tab in Safari on iOS. This currently doesn't work because those sites will call preventDefault()
if the metaKey flag isn't set on a "click" event, and if it is set, they let the browser handle the navigation themselves.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _twoFingerSingleTapGestureRecognized:]):

Tools:

Add a new twoFingerSingleTapAtPoint() method to UIScriptController, which just calls into the existing (but unused)
-[HIDEventGenerator twoFingerTap:completionBlock:].

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::twoFingerSingleTapAtPoint):

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::twoFingerSingleTapAtPoint):

LayoutTests:

Add a new event that checks that a two-finger single tap on a clickable element yields a "click" event with the metaKey flag set to true.

  • fast/events/ios/click-event-two-finger-single-tap-meta-key-expected.txt: Added.
  • fast/events/ios/click-event-two-finger-single-tap-meta-key.html: Added.
9:08 AM Changeset in webkit [249430] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Correct sandbox violation in Flash plugin
https://bugs.webkit.org/show_bug.cgi?id=201228
<rdar://problem/54347503>

Reviewed by Alex Christensen.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
7:58 AM Changeset in webkit [249429] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] Add support to copy YUV video textures into images
https://bugs.webkit.org/show_bug.cgi?id=200922

Patch by Chris Lord <Chris Lord> on 2019-09-03
Reviewed by Philippe Normand and Xabier Rodriguez-Calvar.

Use gst_gl_color_convert to convert to RGB before using ImageGStreamer
with gstreamer-gl.

No new tests, not changing behavior.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::paint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
7:14 AM Changeset in webkit [249428] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[GStreamer] Add support to copy YUV video textures into platform textures
https://bugs.webkit.org/show_bug.cgi?id=200914

Patch by Chris Lord <Chris Lord> on 2019-09-03
Reviewed by Xabier Rodriguez-Calvar and Miguel Gomez.

Enable YUV (including planar and semi-planar) video texture to platform
texture copy in VideoTextureCopierGStreamer.

No new tests, not changing behavior.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::GstVideoFrameHolder::platformLayerBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

(WebCore::TextureMapperPlatformLayerBuffer::textureVariant):

7:00 AM Changeset in webkit [249427] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebCore

[Texmap][GStreamer] Add support to upload more color formats into the texture
https://bugs.webkit.org/show_bug.cgi?id=132869

Patch by Zan Dobersek <zdobersek@igalia.com> and Chris Lord <Chris Lord> on 2019-09-03
Reviewed by Xabier Rodriguez-Calvar.

Support non-interleaved YUV color for gstreamer-gl

This adds direct support for rendering I420, I444, YV12, YV21, Y42B,
NV12, NV21 and VUYA color formats using GLGL shaders when using
gstreamer-gl for video rendering. This avoids a surface copy on the GPU
in those cases.

No new tests, not changing behavior.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::waitForCPUSync):
(WebCore::GstVideoFrameHolder::hasMappedTextures const):
(WebCore::GstVideoFrameHolder::videoFrame const):
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::optionsForFilterType):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::prepareTransformationMatrixWithFlags):
(WebCore::TextureMapperGL::drawTexturePlanarYUV):
(WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
(WebCore::TextureMapperGL::drawTexturePackedYUV):
(WebCore::TextureMapperGL::drawTexturedQuadWithProgram):

  • platform/graphics/texmap/TextureMapperGL.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:

(WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
(WebCore::TextureMapperPlatformLayerBuffer::~TextureMapperPlatformLayerBuffer):
(WebCore::TextureMapperPlatformLayerBuffer::clone):
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(WebCore::TextureMapperShaderProgram::create):

  • platform/graphics/texmap/TextureMapperShaderProgram.h:
4:48 AM Changeset in webkit [249426] by commit-queue@webkit.org
  • 11 edits
    1 move
    3 adds
    3 deletes in trunk

Remove support for load/error on link=prefetch
https://bugs.webkit.org/show_bug.cgi?id=201348

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-03
Reviewed by Youenn Fablet.

Source/WebCore:

Remove support for firing load/error on link=prefetch
to address tracking concerns.

Tests: http/wpt/prefetch/load-events-dynamic.html

http/wpt/prefetch/load-events.html

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::linkLoaded):
(WebCore::HTMLLinkElement::linkLoadingErrored):

  • html/HTMLLinkElement.h:
  • testing/Internals.cpp:

(WebCore::Internals::addPrefetchLoadEventListener):

LayoutTests:

Adjust beforeload tests to also test load/error events.

  • http/tests/cache/link-prefetch-main-resource-iframe.html:
  • http/tests/cache/link-prefetch-main-resource.html:
  • http/wpt/prefetch/beforeload-dynamic-expected.txt: Removed.
  • http/wpt/prefetch/beforeload-expected.txt: Removed.
  • http/wpt/prefetch/load-events-dynamic-expected.txt: Added.
  • http/wpt/prefetch/load-events-dynamic.html: Renamed from LayoutTests/http/wpt/prefetch/beforeload-dynamic.html.
  • http/wpt/prefetch/load-events-expected.txt: Added.
  • http/wpt/prefetch/load-events.html: Renamed from LayoutTests/http/wpt/prefetch/beforeload.html.
  • http/wpt/prefetch/resources/navigate-skip-disk-cache.html:
  • http/wpt/prefetch/resources/navigate.html:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
3:46 AM Changeset in webkit [249425] by zandobersek@gmail.com
  • 2 edits in trunk/Tools

[WPE] MiniBrowser should handle the WebKitWebView::create signal
https://bugs.webkit.org/show_bug.cgi?id=201417

Reviewed by Carlos Garcia Campos.

WPE's MiniBrowser should connect to and handle the
WebKitWebView::create signal, constructing a new bit related
WebKitWebView object upon invocation.

  • MiniBrowser/wpe/main.cpp:

(webViewClose):
(createWebView):
(main):

3:45 AM Changeset in webkit [249424] by zandobersek@gmail.com
  • 5 edits in trunk/Tools

[WPE] Make view backends multi-view-friendly
https://bugs.webkit.org/show_bug.cgi?id=201415

Reviewed by Carlos Garcia Campos.

Have the Wayland EGL connection for WindowViewBackend instances managed
through a per-process singleton, allowing multiple backend objects
use it for different views. HeadlessViewBackend already does this, but
the code there is refurbished into a singleton structure.

The ViewBackend classes are adjusted to work with the backend-specific
EGLDisplay objects (as constructed through the backend-specific EGL
connection approach).

  • wpe/backends/HeadlessViewBackend.cpp:

(WPEToolingBackends::HeadlessEGLConnection::singleton):
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::getEGLDisplay): Deleted.

  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::initialize):
(WPEToolingBackends::ViewBackend::deinitialize):
(WPEToolingBackends::ViewBackend::~ViewBackend): Deleted.

  • wpe/backends/ViewBackend.h:
  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WaylandEGLConnection::singleton):
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::displayBuffer):

3:34 AM Changeset in webkit [249423] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.25.92

WebKitGTK 2.25.92

3:33 AM Changeset in webkit [249422] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.26

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.25.92 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.25.92.
3:33 AM Changeset in webkit [249421] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.26/Source/WebKit

Unreviewed. Add an env var to force single process model

WEBKIT_USE_SINGLE_WEB_PROCESS=1 can now be used to force the single process model. This is a temporary solution
for applications still depending on the single process mode behavior. It will be only available in 2.26 series.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):

3:33 AM Changeset in webkit [249420] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.26

Merge r249419 - [WPE][GTK] Deprecate nonfunctional process limit APIs
https://bugs.webkit.org/show_bug.cgi?id=193749

Reviewed by Žan Doberšek.

Source/WebKit:

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_set_process_model):
(webkit_web_context_get_process_model):
(webkit_web_context_set_web_process_count_limit):
(webkit_web_context_get_web_process_count_limit):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/wpe/WebKitWebContext.h:

Tools:

  • MiniBrowser/gtk/main.c:

(main):

  • TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp:

(beforeAll):
(testWebProcessLimit): Deleted.

2:57 AM Changeset in webkit [249419] by Carlos Garcia Campos
  • 7 edits in trunk

[WPE][GTK] Deprecate nonfunctional process limit APIs
https://bugs.webkit.org/show_bug.cgi?id=193749

Reviewed by Žan Doberšek.

Source/WebKit:

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_set_process_model):
(webkit_web_context_get_process_model):
(webkit_web_context_set_web_process_count_limit):
(webkit_web_context_get_web_process_count_limit):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/wpe/WebKitWebContext.h:

Tools:

  • MiniBrowser/gtk/main.c:

(main):

  • TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp:

(beforeAll):
(testWebProcessLimit): Deleted.

12:26 AM Changeset in webkit [249418] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Remove BytecodeGenerator::emitPopScope
https://bugs.webkit.org/show_bug.cgi?id=201395

Reviewed by Saam Barati.

Use emitGetParentScope. And this patch also removes several unnecessary mov bytecode emissions.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::popLexicalScopeInternal):
(JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration):
(JSC::BytecodeGenerator::emitPopWithScope):
(JSC::BytecodeGenerator::emitPopScope): Deleted.

  • bytecompiler/BytecodeGenerator.h:
Note: See TracTimeline for information about the timeline view.