⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jul 4, 2019:

10:44 PM Changeset in webkit [247147] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[ContentChangeObserver] didFinishTransition triggers a nested style recalc via isConsideredClickable
https://bugs.webkit.org/show_bug.cgi?id=199506
<rdar://problem/52656221>

Reviewed by Ryosuke Niwa.

Source/WebCore:

isConsideredClickable() may trigger style update through Node::computeEditability. Let's adjust the observer state in the next runloop.

Test: fast/events/touch/ios/content-observation/animation-end-with-visiblity-change-and-recursive-update-style.html

  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::didFinishTransition):

  • page/ios/ContentChangeObserver.h:

LayoutTests:

  • fast/events/touch/ios/content-observation/animation-end-with-visiblity-change-and-recursive-update-style-expected.txt: Added.
  • fast/events/touch/ios/content-observation/animation-end-with-visiblity-change-and-recursive-update-style.html: Added.
4:53 PM Changeset in webkit [247146] by Chris Dumez
  • 12 edits
    4 deletes in trunk/Source/WebKit

Simplify logic that handles registering WebProcessProxy objects with their WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=199412
<rdar://problem/51899751>

Reviewed by Ryosuke Niwa.

Simplify logic that handles registering WebProcessProxy objects with their WebsiteDataStore to make
it more maintainable and less error-prone (avoid bugs like <rdar://problem/51899751>).

The following changes were made:

  1. The WebProcess now registers / unregisters itself directly with its WebsiteDataStore when needed, instead of having the WebPageProxy/ProvisionalPageProxy be in charge of calling the right WebProcessLifetimeTracker / WebProcessLifetimeObserver abstractions.
  2. The WebProcessLifetimeTracker / WebProcessLifetimeObserver abstractions were dropped. The WebsiteDataStore was the only observer.
  3. The WebProcessProxy is now registered with its WebsiteDataStore as soon as it has a page (provisional or not) instead of waiting until the process has finished launching. This simplifies the logic a lot and waiting until the process has launched is not needed by the WebsiteDataStore.
  • Sources.txt:
  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::m_resetRecentCrashCountTimer):
(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidTerminate):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::CachedProcess::CachedProcess):

  • UIProcess/WebProcessLifetimeObserver.cpp: Removed.
  • UIProcess/WebProcessLifetimeObserver.h: Removed.
  • UIProcess/WebProcessLifetimeTracker.cpp: Removed.
  • UIProcess/WebProcessLifetimeTracker.h: Removed.
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::setWebsiteDataStore):
(WebKit::WebProcessProxy::updateRegistrationWithDataStore):
(WebKit::WebProcessProxy::addProvisionalPageProxy):
(WebKit::WebProcessProxy::removeProvisionalPageProxy):
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::processWillShutDown):
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::registerProcess):
(WebKit::WebsiteDataStore::unregisterProcess):

(WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):
Drop change that was added in r246097 to work around the fact that WebProcessProxy objects
were only registering themselves with their data store after their process had finished
launching.

(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::processPools const):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::processes const):

  • WebKit.xcodeproj/project.pbxproj:
3:32 PM Changeset in webkit [247145] by Alan Bujtas
  • 11 edits
    1 copy
    1 add in trunk

[ContentChangeObserver] Limit mouseOut dispatching after synthetic click to YouTube.com
https://bugs.webkit.org/show_bug.cgi?id=199497
<rdar://problem/52361019>

Reviewed by Wenson Hsieh.

Source/WebCore:

r242798 introduced synthetic mouseOut dispatching soon after sythentic click to dismiss certain type of content (e.g. video control bar on YouTube).
However on many sites, it resulted in dismissing useful content, like menu panes and other, non-clickable but informative content.
This patch limits the mouseOut dispatching to YouTube.com.

Test: fast/events/touch/ios/content-observation/mouse-out-event-should-not-fire-on-click.html

  • page/Quirks.cpp:

(WebCore::Quirks::needsYouTubeMouseOutQuirk const):

  • page/Quirks.h:
  • page/Settings.yaml:
  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldDispatchSyntheticMouseOutAfterSyntheticClick):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::completeSyntheticClick):

LayoutTests:

  • fast/events/touch/ios/content-observation/mouse-out-event-should-fire-on-click.html:
  • fast/events/touch/ios/content-observation/mouse-out-event-should-not-fire-on-click-expected.txt: Added.
  • fast/events/touch/ios/content-observation/mouse-out-event-should-not-fire-on-click.html: Copied from LayoutTests/fast/events/touch/ios/content-observation/mouse-out-event-should-fire-on-click.html.
11:53 AM Changeset in webkit [247144] by Ryan Haddad
  • 8 edits in trunk/Source/WebCore

Unreviewed, rolling out r247127.

Broke the watchOS build.

Reverted changeset:

"[WHLSL] Remove the phase resolveCallsInFunctions"
https://bugs.webkit.org/show_bug.cgi?id=199474
https://trac.webkit.org/changeset/247127

10:30 AM Changeset in webkit [247143] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Remove GTK and WPE queue from old EWS and dashboard
https://bugs.webkit.org/show_bug.cgi?id=199458

Reviewed by Michael Catanzaro.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
  • QueueStatusServer/config/queues.py:
9:30 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
9:30 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
9:16 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
9:12 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
9:10 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
9:10 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
8:39 AM WebKitGTK/GCCRequirement edited by Michael Catanzaro
(diff)
7:53 AM Changeset in webkit [247142] by Simon Fraser
  • 3 edits
    2 adds in trunk

Some layers inside overflow:scroll don't move back to correct positions when the contents are shrunk
https://bugs.webkit.org/show_bug.cgi?id=199464
rdar://problem/52613285

Reviewed by Sam Weinig.
Source/WebCore:

When an overflow scroller's content shrink and it becomes non-scrollable, the 'boundsOrigin' in
the ancestor clipping stacks of related layers wouldn't get reset to zero, leaving layers in
the wrong place, so always set boundsOrigin to zero on the clipping layers of non-overflow entries
in the ancestor clipping stack.

Test: compositing/scrolling/async-overflow-scrolling/become-non-scrollable-with-child.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

LayoutTests:

  • compositing/scrolling/async-overflow-scrolling/become-non-scrollable-with-child-expected.html: Added.
  • compositing/scrolling/async-overflow-scrolling/become-non-scrollable-with-child.html: Added.
6:54 AM Changeset in webkit [247141] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

HyphenationLibHyphen: Include GLib-related headers only for PLATFORM(GTK)
https://bugs.webkit.org/show_bug.cgi?id=199469

Reviewed by Michael Catanzaro.

Also added compile guard for a couple of functions used only in GTK port.

  • platform/text/hyphen/HyphenationLibHyphen.cpp:
6:53 AM Changeset in webkit [247140] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Fix browserperfdash script after r239522
https://bugs.webkit.org/show_bug.cgi?id=199496

Reviewed by Michael Catanzaro.

  • Scripts/webkitpy/browserperfdash/browserperfdash_runner.py:

(BrowserPerfDashRunner.run): Pass None for the new required BenchmarkRunner constructor.

6:28 AM Changeset in webkit [247139] by clopez@igalia.com
  • 2 edits in trunk/Tools

[webkitpy] test-webkitpy is broken on Linux since r246662
https://bugs.webkit.org/show_bug.cgi?id=199493

Reviewed by Michael Catanzaro.

  • Scripts/webkitpy/test/main.py:

(_supports_building_and_running_lldb_tests): Add a check for None before calling startswith().

3:52 AM Changeset in webkit [247138] by clopez@igalia.com
  • 5 edits in trunk/Tools

[GTK][WPE] Not longer needed to build woff2 on the JHBuild
https://bugs.webkit.org/show_bug.cgi?id=199406

Reviewed by Michael Catanzaro.

Install the Woff2 libraries and headers from the system package
and stop building them on the JHBuild.

  • gtk/install-dependencies:
  • gtk/jhbuild.modules:
  • wpe/install-dependencies:
  • wpe/jhbuild.modules:
3:50 AM Changeset in webkit [247137] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE][CMake] The CMake cache should be clean when the JHBuild is rebuilt
https://bugs.webkit.org/show_bug.cgi?id=199449

Reviewed by Michael Catanzaro.

  • Scripts/webkitdirs.pm:

(shouldRemoveCMakeCache): Clean the CMake cache if we detect that the JHBuild has been rebuilt.

3:41 AM Changeset in webkit [247136] by clopez@igalia.com
  • 1 edit in trunk/Tools/Scripts/webkitpy/common/config/contributors.json

Update my status in contributors.json

Due to inactivity I lost my previous status as reviewer in r244705
but I still have svn access, so update my status temporally to
reflect the reality (checked with Alexey)

12:30 AM Changeset in webkit [247135] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed, GTK a11y tests fix after r247071

Patch by Philippe Normand <pnormand@igalia.com> on 2019-07-01

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::popupValue const):

Jul 3, 2019:

8:39 PM Changeset in webkit [247134] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit

Crash in WebDragClient::startDrag because GraphicsContext is nullptr
https://bugs.webkit.org/show_bug.cgi?id=199491

Reviewed by Wenson Hsieh.

Added a nullptr check.

Unfortunately no new tests since we don't have a reproducible test case.

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::convertImageToBitmap):

8:23 PM Changeset in webkit [247133] by eric.carlson@apple.com
  • 4 edits in trunk/Source/WebCore

[MSE] Add more debug and error logging
https://bugs.webkit.org/show_bug.cgi?id=199473
<rdar://problem/52615882>

Reviewed by Jer Noble.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::provideMediaData): Log if we don't enqueue every buffer.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Log if we return
without starting playback.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Log if
prerollDecodeWithCompletionHandler fails.

7:35 PM Changeset in webkit [247132] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Data Detectors are not working for context menus in clients that use the legacy preview API
https://bugs.webkit.org/show_bug.cgi?id=199486
<rdar://problem/52117322>

Reviewed by Dean Jackson.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView assignLegacyDataForContextMenuInteraction]):
The Data Detectors code in the legacy preview path is guarded by a
#define that did not survive upstreaming. Remove it.

6:45 PM Changeset in webkit [247131] by aakash_jain@apple.com
  • 6 edits in trunk/Tools

[ews-build] Enable WPE and GTK queues on new EWS
https://bugs.webkit.org/show_bug.cgi?id=199234

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json: Enabled the triggers for GTK and WPE builders.
  • BuildSlaveSupport/ews-build/factories.py: Added required build steps for GTKFactory and WPEFactory.
  • BuildSlaveSupport/ews-build/steps.py:

(CompileWebKit.evaluateCommand): Added InstallGtkDependencies/InstallWpeDependencies step before Compiling WebKit without patch.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble): Enable gtk and wpe status-bubbles.

6:30 PM Changeset in webkit [247130] by Justin Fan
  • 4 edits in trunk/LayoutTests

[WHLSL] Support float4x4 in test harness
https://bugs.webkit.org/show_bug.cgi?id=199484

Reviewed by Myles C. Maxfield.

Support WHLSL float4x4 parameters in the WHLSL test harness.

  • webgpu/js/whlsl-test-harness.js:

(isScalar):
(convertTypeToArrayType):
(convertTypeToWHLSLType):
(Data):
(makeFloat4):
(makeFloat4x4):
(processArrays):
(async.callFloat4x4Function):
(isVectorType): Deleted. Replaced with isScalar.

Add some float4x4 sanity checks:

  • webgpu/whlsl-test-harness-test-expected.txt:
  • webgpu/whlsl-test-harness-test.html:
6:29 PM Changeset in webkit [247129] by Simon Fraser
  • 4 edits
    2 adds in trunk

RELEASE_ASSERT in WebCore: WebCore::ScrollingStateTree::insertNode()
https://bugs.webkit.org/show_bug.cgi?id=199479
rdar://problem/52392556

Reviewed by Zalan Bujtas.
Source/WebCore:

Certain compositing tree updates could leave a layer with a ScrollingProxy role, but having an
AncestorClippingStack with no overflow scrolling layers - for example, a related scroller could become
scrollable, but we failed to mark the layer with the ancestor clippings stack as needing a geometry update.

When this happened updateScrollingNodeForScrollingProxyRole() would return 0, causing the next child to be
inserted with a parent of 0 (which should only happen for the root), and triggering a release assert in
ScrollingStateTree::insertNode().

Fix by ensuring that updateScrollingNodeForScrollingProxyRole() always returns the existing parentNodeID if we
don't have a new node to insert.

Test: scrollingcoordinator/scrolling-tree/scrolling-proxy-with-no-scrolling-layer.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateAncestorClippingStack):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):

LayoutTests:

  • scrollingcoordinator/scrolling-tree/scrolling-proxy-with-no-scrolling-layer-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/scrolling-proxy-with-no-scrolling-layer.html: Added.
6:18 PM Changeset in webkit [247128] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

RenderLayerCompositor.cpp should include RenderImage.h
https://bugs.webkit.org/show_bug.cgi?id=199478

Reviewed by Michael Catanzaro.

  • rendering/RenderLayerCompositor.cpp:
6:15 PM Changeset in webkit [247127] by rmorisset@apple.com
  • 8 edits in trunk/Source/WebCore

[WHLSL] Remove the phase resolveCallsInFunctions
https://bugs.webkit.org/show_bug.cgi?id=199474

Reviewed by Myles C. Maxfield.

This pass only stores into each property access and call expression vectors of all the functions it might be calling, for use by the Checker afterwards.
But the checker is perfectly able to compute a pointer to these vectors by itself.
So by removing this pass, we gain the following:

  • One less pass over the AST
  • No need to copy these vectors (which can be large for heavily overloaded functions, of which there are quite a few in the stdlib)
  • No need to have these vectors in the expressions, saving 24 bytes per CallExpression and 72 bytes per PropertyAccessExpression
  • No need to allocate and then destroy these vectors.

No new tests as there is no intended functional change.

  • Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:

(WebCore::WHLSL::AST::CallExpression::castReturnType):

  • Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
  • Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:

(WebCore::WHLSL::AutoInitialize::visit):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::resolveFunction):
(WebCore::WHLSL::Checker::finishVisiting):
(WebCore::WHLSL::Checker::visit):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::NameResolver):
(WebCore::WHLSL::NameResolver::visit):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:
  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::prepareShared):

6:13 PM Changeset in webkit [247126] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

StorageManager::suspend() sometimes fails to call its completion handler
https://bugs.webkit.org/show_bug.cgi?id=199482

Reviewed by Youenn Fablet.

Make sure the completion handler gets called in the early return cases.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::suspend):

6:10 PM Changeset in webkit [247125] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Make CacheStorage::Engine directory listing operations in a background thread
https://bugs.webkit.org/show_bug.cgi?id=199470

Reviewed by Chris Dumez.

Use the io work queue to get the list of directories.
Then go back to main thread and trigger clear/fetch operation as currently done.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::ReadOriginsTaskCounter::create):
(WebKit::CacheStorage::ReadOriginsTaskCounter::ReadOriginsTaskCounter):
(WebKit::CacheStorage::Engine::getDirectories):
(WebKit::CacheStorage::Engine::fetchEntries):
(WebKit::CacheStorage::Engine::fetchDirectoryEntries):
(WebKit::CacheStorage::Engine::clearCachesForOriginFromDisk):
(WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):

  • NetworkProcess/cache/CacheStorageEngine.h:
6:06 PM Changeset in webkit [247124] by rmorisset@apple.com
  • 7 edits
    1 delete in trunk/Source/WebCore

[WHLSL] Make the destructor of VariableDeclaration non-virtual
https://bugs.webkit.org/show_bug.cgi?id=199460

Reviewed by Myles C. Maxfield.

Three steps:

  • Remove WHLSL::AST::Value, inlining it into its children (it is trivial, it just has one field m_origin with a getter and nothing else)
  • Mark WHLSL::AST::VariableDeclaration final
  • Now that it inherits from nothing and nothing can inherit from it, there is no reason for it to have any virtual method, including its destructor.

This not only saves 8 bytes from every variable declaration (for the virtual table pointer), it also should make destructing the AST at the end of compilation a bit faster by removing the virtual destructor call.

No new tests as there is no intended functional change.

  • Modules/webgpu/WHLSL/AST/WHLSLAST.h:
  • Modules/webgpu/WHLSL/AST/WHLSLExpression.h:

(WebCore::WHLSL::AST::Expression::Expression):
(WebCore::WHLSL::AST::Expression::origin const):

  • Modules/webgpu/WHLSL/AST/WHLSLStatement.h:

(WebCore::WHLSL::AST::Statement::Statement):
(WebCore::WHLSL::AST::Statement::origin const):

  • Modules/webgpu/WHLSL/AST/WHLSLValue.h: Removed.
  • Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
  • Modules/webgpu/WHLSL/WHLSLParser.h:
  • WebCore.xcodeproj/project.pbxproj:
5:58 PM Changeset in webkit [247123] by sihui_liu@apple.com
  • 12 edits in trunk

Only allow fetching and removing session credentials from WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=199385

Reviewed by Alex Christensen.

Source/WebCore:

Fetch and remove only session credentials from NSURLCredentialStorage.

Modified existing API tests: WKWebsiteDataStore.FetchPersistentCredentials

  • platform/network/CredentialStorage.cpp:

(WebCore::CredentialStorage::originsWithCredentials const):
(WebCore::CredentialStorage::originsWithSessionCredentials):
(WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
(WebCore::CredentialStorage::clearSessionCredentials):

  • platform/network/CredentialStorage.h:
  • platform/network/mac/CredentialStorageMac.mm:

(WebCore::CredentialStorage::originsWithSessionCredentials):
(WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
(WebCore::CredentialStorage::clearSessionCredentials):
(WebCore::CredentialStorage::originsWithPersistentCredentials): Deleted.

Source/WebKit:

Stop sending an extra message to network process for fetching or removing persistent credentials.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::originsWithPersistentCredentials): Deleted.
(WebKit::NetworkProcess::removeCredentialsWithOrigins): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::originsWithPersistentCredentials): Deleted.
(WebKit::NetworkProcess::removeCredentialsWithOrigins): Deleted.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::computeWebProcessAccessTypeForDataRemoval):
(WebKit::WebsiteDataStore::removeData):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):

5:57 PM Changeset in webkit [247122] by aakash_jain@apple.com
  • 2 edits in trunk/Websites/webkit.org

Added a domain check for validation URLs in Apple Pay demo.
https://bugs.webkit.org/show_bug.cgi?id=199433

Patch by Jon Davis <Jon Davis> on 2019-07-03
Reviewed by David Kilzer.

  • demos/payment-request/merchant-validation.php:
5:49 PM Changeset in webkit [247121] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

The destructor of CSSAnimationControllerPrivate must explicitly clear the composite animations
https://bugs.webkit.org/show_bug.cgi?id=199415

Reviewed by Simon Fraser.

After the destructor of CSSAnimationControllerPrivate exists, the non
static members are deleted. When the HashMap m_compositeAnimations is
deleted, its entries are deleted. The destructor of CompositeAnimation
calls the method CSSAnimationControllerPrivate::animationWillBeRemoved()
back through its back reference m_animationController. The non static
members of CSSAnimationControllerPrivate are being deleted and it is
incorrect to try to use any of these members after exiting the destructor.

We need to explicitly clear the composite animations before exiting the
destructor of CSSAnimationControllerPrivate.

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):

5:42 PM Changeset in webkit [247120] by timothy_horton@apple.com
  • 5 edits in trunk

UI process exception when dragging an <attachment> with no content type
https://bugs.webkit.org/show_bug.cgi?id=199480
<rdar://problem/44351353>

Reviewed by Wenson Hsieh.

Source/WebKit:

  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:

(API::Attachment::mimeType const):
(API::Attachment::utiType const):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::startDrag):
Make null or empty contentType fail the drag, instead of crashing.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):
Add a test; before the change, it crashes.

5:23 PM Changeset in webkit [247119] by Chris Dumez
  • 9 edits in trunk/Source/WebKit

Clarify threading model for WebResourceLoadStatisticsStore::dumpResourceLoadStatistics()
https://bugs.webkit.org/show_bug.cgi?id=199468

Reviewed by Youenn Fablet.

Our convention is that the WebResourceLoadStatisticsStore is always created, used and
destroyed on the main thread, while the ResourceLoadStatisticsStore is always created,
used and destroyed on the background queue.

r245517 broke this convention by introducing a tryDumpResourceLoadStatistics() method
to WebResourceLoadStatisticsStore which gets called on the background queue. This patch
fixes this since this has been a huge source of thread-safety bugs in the past.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::removeDataRecords):

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:

(WebKit::ResourceLoadStatisticsStore::dataRecordsBeingRemoved const):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::dumpResourceLoadStatistics):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
5:08 PM Changeset in webkit [247118] by jer.noble@apple.com
  • 6 edits in trunk/Source/WebCore

HTMLMediaElement can hold onto display sleep assertion while process is suspended.
https://bugs.webkit.org/show_bug.cgi?id=199471
<rdar://problem/52124320>

If the WebContent process is suspended before HTMLMediaElement gets a callback telling it
that the MediaPlayer has stopped playing, the SleepDisabler may stay set (and hold a display
or system sleep assertion) for the entire duration the process is suspended, causing excess
power drain.

Add a PlatformMediaSessionClient method (and an implementation in HTMLMediaElement) which will
be called during the preperation for process suspension, and in this callback, clear the
SleepDisabler token.

Reviewed by Eric Carlson.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::shouldDisableSleep const):
(WebCore::HTMLMediaElement::processIsSuspendedChanged):

  • html/HTMLMediaElement.h:
  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSessionClient::processIsSuspendedChanged):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::processWillSuspend):
(WebCore::PlatformMediaSessionManager::processDidResume):

  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::processIsSuspended const):

4:26 PM Changeset in webkit [247117] by Jonathan Bedard
  • 18 edits
    4 adds in trunk

[Catalina] Enable WebKit build
https://bugs.webkit.org/show_bug.cgi?id=199209

Reviewed by Darin Adler.

Source/WebCore:

No new tests, Catalina test expectations will be migrated in the near future.

  • WebCorePrefix.h: Exclude the header which declares SecTrustedApplicationCreateFromPath unavailable on Mac.
  • crypto/mac/SerializedCryptoKeyWrapMac.mm: Ensure that we define SecTrustedApplicationCreateFromPath

before other headers declare it unavailable on Mac.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h: Add new NSURLSessionConfiguration SPI.
  • pal/spi/mac/AVFoundationSPI.h: resourceConservationLevelWhilePaused should

be defined after AVPlayerResourceConservationLevel.

  • pal/spi/mac/NSViewSPI.h: Add subviewsIvar.

Source/WebKit:

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h: AppSSO is SPI.
  • WebKit2Prefix.h: SecTask.h declares SecTaskGetCodeSignStatus(...) unavailable

on Mac, exclude this header.

Source/WebKitLegacy:

  • mac/WebView/WebHTMLView.mm: Move NSView declaration to SPI header.
  • mac/WebView/WebView.mm: Use _subviewsIvar instead of _subviews.

Source/WTF:

  • wtf/spi/cocoa/SecuritySPI.h: Declare SecTrustedApplicationCreateFromPath(...).

Tools:

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Add Mac framework stubs.

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/Mac: Added.
  • WebKitPrivateFrameworkStubs/Mac/101500: Added.
  • WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework: Added.
  • WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework/AuthKit.tbd: Added.
4:22 PM Changeset in webkit [247116] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION (r246817): fast/events/ios/key-events-comprehensive/key-events-{control, control-shift}.html are failing
https://bugs.webkit.org/show_bug.cgi?id=199465
<rdar://problem/52613496>

Reviewed by Wenson Hsieh.

Don't advertise that WebKit can perform cursor movements when there isn't some kind of selection.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformAction:withSender:]):

3:52 PM Changeset in webkit [247115] by mmaxfield@apple.com
  • 24 edits
    3 copies
    3 adds in trunk

[WHLSL] Standard library is too big to directly include in WebCore
https://bugs.webkit.org/show_bug.cgi?id=198186
<rdar://problem/51288898>

Reviewed by Saam Barati.

Source/WebCore:

This patch adds almost the entire remainder of the standard library. There are a few
pieces missing:

There were two problems with adding so many standard library functions:

  • We didn't want to increase the WebCore binary size that much
  • Compiling all the functions at runtime took 7 seconds, which is much too long

This patch addresses the first problem by gzipping the standard library before including it in the binary.
At runtime, we use libcompression to unzip it.

To address the second problem, we did some analysis and found that 14% of that 7 seconds was simply
destroying all the AST nodes. Even if we eliminated all processing of the AST, simply having the AST
of the entire standard library built and destroyed would still be too slow. Therefore, this patch limits
which parts of the standard library get parsed in the first place. All the functions in the standard library
file are sorted by name, and each group of functions with the same name are preceeded by a comment of the
form /* Functions named xyz */. At build time, a Python script looks for all these comments, and builds a
map from function name to character offset inside the file where those functions begin. At run time, we
parse the user program first, look for all function calls within it, and look up those function call names
in the map to see which part of the standard library holds those functions. We then parse just that part.
Because the standard library can call other functions in the standard library, we do this in a loop until
we have exhausted all the functions.

Covered by existing tests.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make: gzip the standard library, and add a build step to generate the offset map.
  • Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:

(WebCore::WHLSL::AST::CallExpression::setOverloads):
(WebCore::WHLSL::AST::CallExpression::function): Every caller of this ASSERT()s the result. Might as well
move the ASSERT() into the function.
(WebCore::WHLSL::AST::CallExpression::setFunction):

  • Modules/webgpu/WHLSL/Cocoa/WHLSLStandardLibraryUtilities.cpp: Added.

(WebCore::WHLSL::decompressStandardLibrary): Use libcompression. This is why this file is in a Cocoa/
subfolder, and is listed in SourcesCocoa.txt instead of Sources.txt.
(WebCore::WHLSL::decompressAndDecodeStandardLibrary):
(WebCore::WHLSL::NameFinder::takeFunctionNames):
(WebCore::WHLSL::includeStandardLibrary): Include only the bits of the standard library which are relevant,
as described above.

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Only emit MSL code for functions which are actually

reached. The MSL compiler is a significant amount of our compile time, so reducing the size of the emitted
program can significantly improve compile times.
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
(WebCore::WHLSL::Metal::sharedMetalFunctions):
(WebCore::WHLSL::Metal::metalFunctions):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::writeNativeFunction):

  • Change how load() and store() are written. We need explicit functions because we have explicit atomic types, which HLSL doesn't have. load() and store() aren't present in HLSL.
  • Delete f16tof32 because they're probably not important and are not obvious how to implement. We can re-add them again later if necessary.
  • Various fixes to make us generate the correct MSL code for each standard library function.
  • Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py: Added. Build the function map as described

above.

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::resolveByInstantiation): Previously, the standard library included an operator== for two
pointers. However, that function should be generated by the compiler instead. This fixes the bug in the
compiler which allows the compiler to correctly generate the right function. This also prompted me to file
https://bugs.webkit.org/show_bug.cgi?id=199335
(WebCore::WHLSL::checkOperatorOverload):
(WebCore::WHLSL::Checker::visit):

  • Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp: Update to the new function() signature.
  • Modules/webgpu/WHLSL/WHLSLLexer.h: Add a new position() method to the lexer. This isn't actually used

in this patch, but it's useful when doing some analysis during parsing.
(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::peek const):
(WebCore::WHLSL::Lexer::peekFurther const):
(WebCore::WHLSL::Lexer::position const):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::isFullyConsumed const): Fixes a bug where isFullyConsumed() might return true even
when there is a token in the ring buffer.
(WebCore::WHLSL::Lexer::peek): Deleted.
(WebCore::WHLSL::Lexer::peekFurther): Deleted.

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::visit): Drive-by partial fix of https://bugs.webkit.org/show_bug.cgi?id=199347

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp: Call includeStandardLibrary().

(WebCore::WHLSL::prepareShared):

  • Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
  • Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
  • Modules/webgpu/WHLSL/WHLSLStandardLibraryFunctionMap.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp.
  • Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp.
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

The standard library doesn't include any matrix constructors that broadcast a single value
to every field in a matrix. https://bugs.webkit.org/show_bug.cgi?id=199333

  • webgpu/whlsl-matrix.html:
3:42 PM Changeset in webkit [247114] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

Skip the test added in r246810 as it requires the simulator to be preconfigured with a Pinyin keyboard
<rdar://problem/52608620>

We will remove this prerequisite in <https://bugs.webkit.org/show_bug.cgi?id=199472>.

  • platform/ios/TestExpectations:
3:16 PM Changeset in webkit [247113] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Exception thrown from -[AVSampleBufferRenderSynchronizer addRenderer:], not a valid renderer.
https://bugs.webkit.org/show_bug.cgi?id=199419
<rdar://problem/52141139>

Reviewed by Eric Carlson.

Sometimes, -[AVSampleBufferDisplayLayer init] will return nil. When that happens, passing a nil
pointer to -addRenderer: will throw an exception.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):

3:16 PM Changeset in webkit [247112] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Fix a couple of thread safety issues in ResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=199463

Reviewed by Alex Christensen.

The ResourceLoadStatisticsStore object is constructed / used / destroyed on a background queue.
It is therefore not safe to use a WeakPtr to the ResourceLoadStatisticsStore on the main thread.

The safe pattern is to have the ResourceLoadStatisticsStore capture a Ref<> of its m_store before
dispatching to the main thread and use this store on the main thread instead of weakThis->m_store.
ResourceLoadStatisticsStore's m_store is constructed / used / destroyed on the main thread.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords):

3:14 PM Changeset in webkit [247111] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Isolate CacheStorage::Engine path when hopping to a background thread
https://bugs.webkit.org/show_bug.cgi?id=199461

Reviewed by Chris Dumez.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::initialize):

3:11 PM Changeset in webkit [247110] by rmorisset@apple.com
  • 15 edits in trunk/Source/WebCore

[WHLSL] "Semantic" should be held by a unique_ptr, not an Optional
https://bugs.webkit.org/show_bug.cgi?id=199462

Reviewed by Myles C. Maxfield.

Most StructureElement, FunctionDeclaration and (especially) VariableDeclaration don't have a 'Semantic' field.
Using an Optional<Semantic> to represent this is a major memory waste, as Semantic is 56 bytes, so Optional<Semantic> is 64 bytes!
Putting one level of indirection through a unique_ptr thus saves 56 bytes for each VariableDeclaration (and FunctionDeclaration and StructureElement) that does not have a Semantic,
at the low cost of one pointer dereference when accessing the field for those that have one.

This patch also reorders the fields of FunctionDefinition to save another 8 bytes.

No new tests as there is no intended functional change.

  • Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:

(WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
(WebCore::WHLSL::AST::FunctionDeclaration::semantic):

  • Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:

(WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):

  • Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:

(WebCore::WHLSL::AST::StructureElement::StructureElement):
(WebCore::WHLSL::AST::StructureElement::semantic):

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

(WebCore::WHLSL::AST::VariableDeclaration::VariableDeclaration):
(WebCore::WHLSL::AST::VariableDeclaration::semantic):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::resolveWithOperatorAnderIndexer):
(WebCore::WHLSL::resolveWithOperatorLength):
(WebCore::WHLSL::resolveWithReferenceComparator):

  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:

(WebCore::WHLSL::Gatherer::visit):
(WebCore::WHLSL::gatherEntryPointItems):

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::parseSemantic):

  • Modules/webgpu/WHLSL/WHLSLParser.h:
  • Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:

(WebCore::WHLSL::preserveVariableLifetimes):

  • Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:

(WebCore::WHLSL::wrapAnderCallArgument):
(WebCore::WHLSL::modify):
(WebCore::WHLSL::PropertyResolver::visit):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:

(WebCore::WHLSL::synthesizeArrayOperatorLength):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:

(WebCore::WHLSL::synthesizeConstructors):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:

(WebCore::WHLSL::synthesizeEnumerationFunctions):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:

(WebCore::WHLSL::synthesizeStructureAccessors):

2:59 PM Changeset in webkit [247109] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebKit

Unreviewed, rolling out r246053.

This changeset caused media playback to break when the hosting app was backgrounded.

  • UIProcess/ApplicationStateTracker.mm:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _scheduleReleaseTask]):
(-[WKProcessAssertionBackgroundTaskManager _cancelPendingReleaseTask]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):

2:43 PM Changeset in webkit [247108] by Alan Coon
  • 1 edit in tags/Safari-608.1.33.1/Source/WTF/wtf/Platform.h

Apply patch. rdar://problem/52001635

2:38 PM Changeset in webkit [247107] by Alan Coon
  • 7 edits in tags/Safari-608.1.33.1/Source

Versioning.

2:36 PM Changeset in webkit [247106] by Alan Coon
  • 1 copy in tags/Safari-608.1.33.1

New tag.

2:20 PM Changeset in webkit [247105] by rmorisset@apple.com
  • 17 edits
    1 move in trunk/Source/WebCore

[WHLSL] WHLSL::AST::Node is useless
https://bugs.webkit.org/show_bug.cgi?id=199391

Reviewed by Dean Jackson.

It has no member, no non-trivial method, and we never access an AST node completely generically.
So WHLSL::AST::Node can be removed, as a first step towards removing the virtual table pointer from most AST nodes (and avoiding a virtual destructor call at the end of the compiler).

No new test because there is no functional change.

  • Modules/webgpu/WHLSL/AST/WHLSLAST.h:
  • Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
  • Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
  • Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
  • Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
  • Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLReplaceWith.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNode.h.

(WebCore::WHLSL::AST::replaceWith):

  • Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
  • Modules/webgpu/WHLSL/AST/WHLSLType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
  • Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLValue.h:
  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
  • Modules/webgpu/WHLSL/WHLSLParser.h:
  • Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
  • Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
  • WebCore.xcodeproj/project.pbxproj:
2:16 PM Changeset in webkit [247104] by youenn@apple.com
  • 8 edits in trunk/Source/WebCore

Strengthen updating/removing of registrations from the database
https://bugs.webkit.org/show_bug.cgi?id=199450
rdar://problem/51891395

Reviewed by Chris Dumez.

SWServerWorker is ref counted and has a ref to its SWServer.
There is thus a possibility for SWServerWorker to live longer than its SWServer.
To mitigate this, have SWServerWorker use a WeakPtr<SWServer> and
check whether SWServer is null when receiving messages from WebProcess.
Make also sure that RegistrationStore updated registration map does not get corrupted by checking
the registration keys explicitly.

Covered by existing tests.

  • workers/service/ServiceWorkerRegistrationKey.h:

(WebCore::ServiceWorkerRegistrationKey::operator!= const):
(WebCore::ServiceWorkerRegistrationKey::isEmpty const):

  • workers/service/server/RegistrationStore.cpp:

(WebCore::RegistrationStore::updateRegistration):
(WebCore::RegistrationStore::removeRegistration):
(WebCore::RegistrationStore::addRegistrationFromDatabase):

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

(WebCore::SWServer::workerByID const):
(WebCore::SWServer::removeRegistration):

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

(WebCore::SWServerWorker::SWServerWorker):
(WebCore::m_scriptResourceMap):
(WebCore::SWServerWorker::contextData const):
(WebCore::SWServerWorker::terminate):
(WebCore::SWServerWorker::scriptContextFailedToStart):
(WebCore::SWServerWorker::scriptContextStarted):
(WebCore::SWServerWorker::didFinishInstall):
(WebCore::SWServerWorker::didFinishActivation):
(WebCore::SWServerWorker::contextTerminated):
(WebCore::SWServerWorker::findClientByIdentifier const):
(WebCore::SWServerWorker::matchAll):
(WebCore::SWServerWorker::userAgent const):
(WebCore::SWServerWorker::claim):
(WebCore::SWServerWorker::skipWaiting):
(WebCore::SWServerWorker::setHasPendingEvents):
(WebCore::SWServerWorker::setState):

  • workers/service/server/SWServerWorker.h:

(WebCore::SWServerWorker::server):

2:01 PM Changeset in webkit [247103] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Use smarter pointers in WKDownloadProgress
https://bugs.webkit.org/show_bug.cgi?id=199456
<rdar://problem/51392926>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-03
Reviewed by Chris Dumez.

There's still a problem related to our use of raw pointers. Let's just not use raw pointers.

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::publishProgress):

  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.h:
  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:

(-[WKDownloadProgress performCancel]):
(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
(-[WKDownloadProgress progressCancelled]): Deleted.

1:46 PM Changeset in webkit [247102] by weinig@apple.com
  • 33 edits in trunk

Adopt simple structured bindings in more places
https://bugs.webkit.org/show_bug.cgi?id=199247

Reviewed by Alex Christensen.

Replaces simple uses of std::tie() with structured bindings. Does not touch
uses of std::tie() that are not initial declarations, use std::ignore or in
case where the binding is captured by a lambda, as structured bindings don't
work for those cases yet.

Source/JavaScriptCore:

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::doWork):

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):

  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::createSourceBufferFromValue):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyValidateFunc):

Source/WebCore:

  • css/StyleResolver.cpp:

(WebCore::checkForOrientationChange):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowInlineScript const):
(WebCore::ContentSecurityPolicy::allowInlineStyle const):

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • platform/graphics/PathUtilities.cpp:

(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::createFontPlatformData):
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::lastResortFallbackFont):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

  • platform/network/SocketStreamHandleImpl.cpp:

(WebCore::cookieDataForHandshake):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::selectionState):
(WebCore::createMarkedTextFromSelectionInBox):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paintSelectionBackground):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::constructAttributeName const):

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::printSpeculativeLoadingDiagnosticMessageCounts):

  • NetworkProcess/cache/PrefetchCache.cpp:

(WebKit::PrefetchCache::clearExpiredEntries):

  • Platform/IPC/MessageReceiverMap.cpp:

(IPC::MessageReceiverMap::removeMessageReceiver):

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:

(WebKit::PlaybackSessionManagerProxy::invalidate):

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::invalidate):
(WebKit::VideoFullscreenManagerProxy::requestHideAndExitFullscreen):
(WebKit::VideoFullscreenManagerProxy::hasMode const):
(WebKit::VideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture const):
(WebKit::VideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen const):
(WebKit::VideoFullscreenManagerProxy::applicationDidBecomeActive):
(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

  • UIProcess/ios/SmartMagnificationController.mm:

(WebKit::SmartMagnificationController::zoomFactorForTargetRect):
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
(WebKit::SmartMagnificationController::magnify):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit:: const):

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):

  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionManager::~PlaybackSessionManager):
(WebKit::PlaybackSessionManager::removeContext):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::~VideoFullscreenManager):
(WebKit::VideoFullscreenManager::removeContext):
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::requestVideoContentLayer):
(WebKit::VideoFullscreenManager::didSetupFullscreen):
(WebKit::VideoFullscreenManager::willExitFullscreen):
(WebKit::VideoFullscreenManager::didEnterFullscreen):
(WebKit::VideoFullscreenManager::didCleanupFullscreen):
(WebKit::VideoFullscreenManager::setVideoLayerFrameFenced):

Source/WebKitLegacy/mac:

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController _animationControllerForText]):

Tools:

  • TestWebKitAPI/ios/PreferredContentMode.mm:

(TestWebKitAPI::TEST):

1:25 PM Changeset in webkit [247101] by keith_miller@apple.com
  • 10 edits in trunk/Source

PACCage should first cage leaving PAC bits intact then authenticate
https://bugs.webkit.org/show_bug.cgi?id=199372

Reviewed by Saam Barati.

Source/bmalloc:

  • bmalloc/ProcessCheck.mm:

(bmalloc::shouldProcessUnconditionallyUseBmalloc):

Source/JavaScriptCore:

This ordering prevents someone from taking a signed pointer from
outside the gigacage and using it in a struct that expects a caged
pointer. Previously, the PACCaging just double checked that the PAC
bits were valid for the original pointer.

+---------------------------+
| | | |
| "PAC" | "base" | "offset" +----+
| | | | |
+---------------------------+ | Caging

| |
| |
| v
| +---------------------------+
| | | | |
| Bit Merge | 00000 | base | "offset" |
| | | | |
| +---------------------------+
| |
| |
v | Bit Merge

+---------------------------+ |
| | | | |
| "PAC" | base | "offset" +<--------+
| | | |
+---------------------------+

|
|
| Authenticate
|
v

+---------------------------+
| | | |
| Auth | base | "offset" |
| | | |
+---------------------------+

The above ascii art graph shows how the PACCage system works. The
key take away is that even if someone passes in a valid, signed
pointer outside the cage it will still fail to authenticate as the
"base" bits will change before authentication.

  • assembler/MacroAssemblerARM64E.h:
  • assembler/testmasm.cpp:

(JSC::testCagePreservesPACFailureBit):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cageConditionally):

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

  • wtf/CagedPtr.h:

(WTF::CagedPtr::get const):
(WTF::CagedPtr::getMayBeNull const):
(WTF::CagedPtr::mergePointers):

12:59 PM Changeset in webkit [247100] by Wenson Hsieh
  • 3 edits
    2 moves
    2 adds in trunk

REGRESSION (iOS 13): Tapping an element with a click event handler no longer clears the selection
https://bugs.webkit.org/show_bug.cgi?id=199430

Reviewed by Tim Horton.

Source/WebCore:

After <trac.webkit.org/r245067>, we no longer immediately clear the text selection when recognizing a single tap
in WKContentView, and instead only clear it out in the case where the single tap didn't result in a click event
in the web process. This fixed an issue wherein the text selection would be prematurely cleared when tapping,
but also made it such that tapping on an element with a click event handler would not cause the selection to
change, even if preventDefault() is not called on mousedown. On web pages that add a click event listener to
document.body, it's nearly impossible to dismiss text selections by tapping elsewhere in the body.

On macOS, this works because EventHandler::handleMousePressEventSingleClick contains logic to modify the
selection when handling a mousedown, as a part of default behavior. However, there is platform-specific logic
added in <trac.webkit.org/r233311> that avoids changing the selection when handling a synthetic mousedown on
iOS; this is because we defer to the single tap text interaction gesture on iOS, which (among other things)
provides additional support for moving the selection to word boundaries, instead of the editing position
directly under the click.

However, no such platform-specific text interaction single tap gesture exists for non-editable text, so there's
no reason we need to bail in the case where the root editable element is null. We can fix this bug without
breaking the fix in r233311 by matching macOS behavior and not bailing via early return in the case where the
single tap would move selection into non-editable text.

Tests: editing/selection/ios/clear-selection-after-tapping-on-element-with-click-handler.html

editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEventSingleClick):

LayoutTests:

Add and adjust layout tests to verify that calling preventDefault() on mousedown on iOS causes an existing
selection to not be cleared, and that tapping in an element with a click handler clears out the selection.

  • editing/selection/ios/clear-selection-after-tapping-on-element-with-click-handler-expected.txt: Added.
  • editing/selection/ios/clear-selection-after-tapping-on-element-with-click-handler.html: Added.
  • editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler-expected.txt: Renamed.
  • editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html:

Renamed from LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html,
and adjusted to call preventDefault() on mousedown events instead of click events. Also, remove a bit of
trailing whitespace.

12:53 PM Changeset in webkit [247099] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/events/ios/keydown-keyup-special-keys-in-non-editable-element.html
https://bugs.webkit.org/show_bug.cgi?id=199459

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-07-03

  • fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt:
12:53 PM Changeset in webkit [247098] by Alan Bujtas
  • 6 edits
    2 copies
    2 adds in trunk

Source/WebKit:
[ContentChangeObserver] REGRESSION (r244356): Drop down menus collapse without user input - Ebay.com
https://bugs.webkit.org/show_bug.cgi?id=199457
<rdar://problem/52386563>

Reviewed by Simon Fraser.

There's a fixed, 32ms window for observing content changes after the tap is committed. r244356 introduced the fast-click behavior on form elements by omitting this fixed window and
dispatch the synthetic click on the target node.
This patch preserves the fast-click behavior, but now we stay at hover if the mouseMove event triggers a synchronous actionable visiblity change (as opposed to always proceed with click).

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):

LayoutTests:
REGRESSION (r244356): Drop down menus collapse without user input - Ebay.com
https://bugs.webkit.org/show_bug.cgi?id=199457
<rdar://problem/52386563>

Reviewed by Simon Fraser.

  • fast/events/touch/ios/content-observation/tap-on-input-type-button-element-with-async-clickable-change-expected.txt: Added.
  • fast/events/touch/ios/content-observation/tap-on-input-type-button-element-with-async-clickable-change.html: Copied from LayoutTests/fast/events/touch/ios/content-observation/tap-on-input-type-button-element.html.
  • fast/events/touch/ios/content-observation/tap-on-input-type-button-element-with-clickable-change-expected.txt: Added.
  • fast/events/touch/ios/content-observation/tap-on-input-type-button-element-with-clickable-change.html: Copied from LayoutTests/fast/events/touch/ios/content-observation/tap-on-input-type-button-element.html.
  • fast/events/touch/ios/content-observation/tap-on-input-type-button-element.html:
12:52 PM Changeset in webkit [247097] by commit-queue@webkit.org
  • 9 edits
    6 adds in trunk/Source/JavaScriptCore

Refactoring of architectural Register Information
https://bugs.webkit.org/show_bug.cgi?id=198604

Patch by Paulo Matos <Paulo Matos> on 2019-07-03
Reviewed by Keith Miller.

The goal of this patch is to centralize the register information per platform
but access it in a platform independent way. The patch as been implemented for all
known platforms: ARM64, ARMv7, MIPS, X86 and X86_64. Register information has
been centralized in an architecture per-file: each file is called assembler/<arch>Registers.h.

RegisterInfo.h is used as a forwarding header to choose which register information to load.
assembler/<arch>Assembler.h and jit/RegisterSet.cpp use this information in a platform
independent way.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::gprName): Use register names from register info file.
(JSC::ARM64Assembler::sprName): likewise.
(JSC::ARM64Assembler::fprName): likewise.

  • assembler/ARM64Registers.h: Added.
  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::gprName): Use register names from register info file.
(JSC::ARMv7Assembler::sprName): likewise.
(JSC::ARMv7Assembler::fprName): likewise.

  • assembler/ARMv7Registers.h: Added.
  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::gprName): Use register names from register info file.
(JSC::MIPSAssembler::sprName): likewise.
(JSC::MIPSAssembler::fprName): likewise.

  • assembler/MIPSRegisters.h: Added.
  • assembler/RegisterInfo.h: Added.
  • assembler/X86Assembler.h:

(JSC::X86Assembler::gprName): Use register names from register info file.
(JSC::X86Assembler::sprName): likewise.
(JSC::X86Assembler::fprName): likewise.

  • assembler/X86Registers.h: Added.
  • assembler/X86_64Registers.h: Added.
  • jit/GPRInfo.h: Fix typo in comment (s/basline/baseline).
  • jit/RegisterSet.cpp:

(JSC::RegisterSet::reservedHardwareRegisters): Use register properties from register info file.
(JSC::RegisterSet::calleeSaveRegisters): likewise.

12:50 PM Changeset in webkit [247096] by commit-queue@webkit.org
  • 4 edits
    2 deletes in trunk/Source/WebKit

[GTK][WPE] Remove Flatpak sandbox
https://bugs.webkit.org/show_bug.cgi?id=199416

Patch by Patrick Griffis <Patrick Griffis> on 2019-07-03
Reviewed by Michael Catanzaro.

The flatpak-spawn based sandbox was only a proof of concept and
lacks flexibility for our needs so we ended up using it with very
permissive permissions and it still imposed limitations that our main
bubblewrap sandbox didn't have.

So in order to get as many applications using the sandbox as possible we
will just remove this for now and focus on bubblewrap. At some point
it may be possible to improve flatpak-spawn to fit our needs.

  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Launcher/glib/FlatpakLauncher.cpp: Removed.
  • UIProcess/Launcher/glib/FlatpakLauncher.h: Removed.
  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess):

11:11 AM Changeset in webkit [247095] by Ryan Haddad
  • 8 edits in trunk/Source

Unreviewed, rolling out r246616.

Caused http/tests/inspector/network/har/har-page.html to fail
on Catalina.

Reverted changeset:

"Web Inspector: Network: replace CFNetwork SPI with new API
where able"
https://bugs.webkit.org/show_bug.cgi?id=198762
https://trac.webkit.org/changeset/246616

10:48 AM Changeset in webkit [247094] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Crash under WTF::RefCounted<WebKit::TaskCounter>::deref()
https://bugs.webkit.org/show_bug.cgi?id=199453
<rdar://problem/51991477>

Reviewed by Youenn Fablet.

The crash was caused by StorageManager::suspend() getting called on the main thread but calling
its completion handler on a background queue. The completion handler was capturing a TaskCounter
object which is RefCounted (not ThreadSafeRefCounted).

Address the issue by making sure StorageManager::suspend() calls its completion handler on the
main thread. Also get rid of TaskCounter and use a WTF::CallbackAggregator instead.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::TaskCounter::TaskCounter): Deleted.
(WebKit::TaskCounter::~TaskCounter): Deleted.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::suspend):

10:40 AM Changeset in webkit [247093] by commit-queue@webkit.org
  • 5 edits in trunk

Safari hanging while loading pages - WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
https://bugs.webkit.org/show_bug.cgi?id=199434
<rdar://problem/52475140>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-07-03
Reviewed by Chris Fleizach.

Source/WebCore:

Tests were disabled until underlying bug is fixed.

Rolling out a workaround for CharacterIterator::advance bug because it
seems to be causing a hang in Safari.

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator):

LayoutTests:

Disabled the tests that were passing for workaround. The workaround had
to be roll out cause it is hanging Safari.

10:28 AM Changeset in webkit [247092] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Make sure to cross-thread copy in StorageManager when hopping back to the main thread
https://bugs.webkit.org/show_bug.cgi?id=199423

Reviewed by Chris Dumez.

Make sure to isolate copy some strings that may not be isolated in case of ephemeral sessions.
Small refactoring to use crossThreadCopy instead of doing vector copy ourselves.

  • NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:

(WebKit::LocalStorageDatabaseTracker::OriginDetails::isolatedCopy const):

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):

5:26 AM Changeset in webkit [247091] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Unreviewed follow-up fix to r247049, default the platform to '*' when platform property is not set.

  • BuildSlaveSupport/ews-build/steps.py:

(PrintConfiguration.run):

1:04 AM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
12:00 AM Changeset in webkit [247090] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebKit

Unreviewed. Fix build break introduced in r247058.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-07-02

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
Note: See TracTimeline for information about the timeline view.