Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Jan 27, 2023

  1. Move WEBGL_provoking_vertex out of draft

    https://bugs.webkit.org/show_bug.cgi?id=251259
    
    Reviewed by Kimmo Kinnunen.
    
    * LayoutTests/platform/ios-simulator/webgl/webgl-draft-extensions-flag-default-expected.txt:
    * LayoutTests/platform/ios-simulator/webgl/webgl-draft-extensions-flag-off-expected.txt:
    * LayoutTests/platform/ios-simulator/webgl/webgl-draft-extensions-flag-on-expected.txt:
    * LayoutTests/webgl/resources/webgl-draft-extensions-flag.js:
    * LayoutTests/webgl/webgl-draft-extensions-flag-default-expected.txt:
    * LayoutTests/webgl/webgl-draft-extensions-flag-off-expected.txt:
    * LayoutTests/webgl/webgl-draft-extensions-flag-on-expected.txt:
    * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
    (WebCore::WebGL2RenderingContext::getExtension):
    (WebCore::WebGL2RenderingContext::getSupportedExtensions):
    
    Canonical link: https://commits.webkit.org/259499@main
    lexaknyazev authored and kkinnunen-apple committed Jan 27, 2023
  2. Use WeakPtr to store RenderSVGResourceContainer

    https://bugs.webkit.org/show_bug.cgi?id=251077
    
    Reviewed by Chris Dumez.
    
    Replaced the use of raw pointers to RenderSVGResourceContainer by WeakPtr.
    
    * Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp:
    (WebCore::LegacyRenderSVGRoot::layout):
    (WebCore::LegacyRenderSVGRoot::addResourceForClientInvalidation):
    * Source/WebCore/rendering/svg/LegacyRenderSVGRoot.h:
    * Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
    (WebCore::RenderSVGRoot::layoutChildren):
    * Source/WebCore/rendering/svg/RenderSVGRoot.h:
    * Source/WebCore/rendering/svg/SVGResources.cpp:
    (WebCore::SVGResources::removeClientFromCache const):
    (WebCore::SVGResources::resourceDestroyed):
    (WebCore::SVGResources::buildSetOfResources):
    (WebCore::SVGResources::dump):
    * Source/WebCore/rendering/svg/SVGResources.h:
    (WebCore::SVGResources::clipper const):
    (WebCore::SVGResources::markerStart const):
    (WebCore::SVGResources::markerMid const):
    (WebCore::SVGResources::markerEnd const):
    (WebCore::SVGResources::masker const):
    (WebCore::SVGResources::filter const):
    (WebCore::SVGResources::fill const):
    (WebCore::SVGResources::stroke const):
    (WebCore::SVGResources::linkedResource const):
    (): Deleted.
    * Source/WebCore/rendering/svg/SVGResourcesCache.cpp:
    (WebCore::SVGResourcesCache::addResourcesFromRenderer):
    (WebCore::SVGResourcesCache::removeResourcesFromRenderer):
    * Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp:
    (WebCore::SVGResourcesCycleSolver::resourceContainsCycles const):
    (WebCore::SVGResourcesCycleSolver::resolveCycles):
    * Source/WebCore/rendering/svg/SVGResourcesCycleSolver.h:
    
    Canonical link: https://commits.webkit.org/259498@main
    rniwa committed Jan 27, 2023
  3. Fix negative shadow repaint issue

    Fix negative shadow repaint issue
    https://bugs.webkit.org/show_bug.cgi?id=251176
    
    Reviewed by Simon Fraser.
    
    Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=164709
    
    When a box with negative v-shadow changes height, the repaint rect
    is inadequate resulting some part of shadow is not repainted.
    Fix the issue by considering negative shadow-top/shadow-left.
    
    * Source/WebCore/rendering/RenderElement.cpp:
    (RenderElement::repaintAfterLayout): Add consideration for negative shadows
    * LayoutTests/fast/box-shadow/negative-shadow-box-shrink.html: Add Test Case
    * LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expected.txt: Add Test Case Expectation
    * LayoutTests/fast/box-shadow/negative-shadow-box-expand.html: Add Test Case
    * LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expand.txt: Add Test Case Expectation
    
    Canonical link: https://commits.webkit.org/259497@main
    Ahmad-S792 authored and Ahmad Saleem committed Jan 27, 2023
  4. Revert [259432@main] Move Opaque Origin Identifier from SecurityOrigi…

    …n to SecurityOriginData
    
    https://bugs.webkit.org/show_bug.cgi?id=251048
    rdar://104578586
    
    Unreviewed, revert 259432@main as it regressed ProcessSwap.GetUserMediaCaptureState API test.
    
    * Source/WTF/wtf/Markable.h:
    (WTF::add): Deleted.
    * Source/WebCore/page/SecurityOrigin.cpp:
    (WebCore::SecurityOrigin::SecurityOrigin):
    (WebCore::SecurityOrigin::isSameOriginDomain const):
    (WebCore::SecurityOrigin::isSameOriginAs const):
    (WebCore::SecurityOrigin::create):
    (WebCore::SecurityOrigin::equal const):
    * Source/WebCore/page/SecurityOrigin.h:
    (WebCore::SecurityOrigin::isOpaque const):
    (WebCore::add):
    * Source/WebCore/page/SecurityOriginData.cpp:
    (WebCore::SecurityOriginData::securityOrigin const):
    (WebCore::SecurityOriginData::isolatedCopy const):
    (WebCore::SecurityOriginData::isolatedCopy):
    (WebCore::operator==):
    * Source/WebCore/page/SecurityOriginData.h:
    (WebCore::SecurityOriginData::SecurityOriginData):
    (WebCore::SecurityOriginData::isOpaque const):
    (WebCore::add):
    (): Deleted.
    (WebCore::SecurityOriginData::createOpaque): Deleted.
    (WebCore::SecurityOriginData::encode const): Deleted.
    (WebCore::SecurityOriginData::decode): Deleted.
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    
    Canonical link: https://commits.webkit.org/259496@main
    cdumez committed Jan 27, 2023
  5. Do some cleanup around screenPropertiesStateChanged() and displayReco…

    …nfigurationCallBack()
    
    https://bugs.webkit.org/show_bug.cgi?id=251233
    rdar://104719183
    
    Reviewed by Tim Horton.
    
    WebProcessPool had both screenPropertiesStateChanged() and code in displayReconfigurationCallBack()
    that did similar things, sending new screen properties to the WebProcess and, on macOS, the GPU process,
    but the code was scattered around.
    
    Clean it up by moving the code in displayReconfigurationCallBack() into a WebProcessPool member function;
    this callback tells you about a specific display and what changed, but in it we gather properties for
    all displays, but keep that behavior for now.
    
    screenPropertiesStateChanged() is called via accessibility callbacks that indicate that screen-related
    settings like "invert colors" changed. To show its relationship to WebProcessPool::displayPropertiesChanged()
    put the two functions next to each other, but it was tricky to share code because this callback doesn't
    get a displayID.
    
    Add a DisplayLink::displayPropertiesChanged() stub that will be implemented in a future patch.
    
    * Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
    (WebKit::WebProcessPool::registerNotificationObservers):
    (WebKit::WebProcessPool::screenPropertiesChanged):
    (WebKit::WebProcessPool::displayPropertiesChanged):
    (WebKit::displayReconfigurationCallBack):
    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::accessibilitySettingsDidChange):
    * Source/WebKit/UIProcess/WebProcessPool.cpp:
    (WebKit::WebProcessPool::screenPropertiesStateChanged): Deleted.
    * Source/WebKit/UIProcess/WebProcessPool.h:
    * Source/WebKit/UIProcess/mac/DisplayLink.cpp:
    (WebKit::DisplayLink::displayPropertiesChanged):
    * Source/WebKit/UIProcess/mac/DisplayLink.h:
    * Source/WebKit/UIProcess/mac/WebViewImpl.mm:
    (WebKit::WebViewImpl::screenDidChangeColorSpace):
    
    Canonical link: https://commits.webkit.org/259495@main
    smfr committed Jan 27, 2023
  6. Add mac-wk1 baseline for imported/w3c/web-platform-tests/css/selector…

    …s/dir-pseudo-on-input-element.html
    
    https://bugs.webkit.org/show_bug.cgi?id=251275
    rdar://104748241
    
    Unreviewed test gardening.
    
    This test was re-named as part of the re-sync in 258889@main, but the mac-wk1 baseline
    wasn't updated to match.
    
    * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/selectors/dir-pseudo-on-input-element-expected.txt: Renamed from LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-pseudo/dir-pseudo-on-input-element-expected.txt.
    
    Canonical link: https://commits.webkit.org/259494@main
    ryanhaddad committed Jan 27, 2023
  7. [ews] Run ValidateChange just before CompileWebKit and major steps

    https://bugs.webkit.org/show_bug.cgi?id=251222
    rdar://104710968
    
    Reviewed by Jonathan Bedard.
    
    To skip obsolete builds and PRs with skip-ews more frequently.
    
    * Tools/CISupport/ews-build/factories.py:
    (Factory.__init__):
    * Tools/CISupport/ews-build/factories_unittest.py:
    (TestExpectedBuildSteps):
    
    Canonical link: https://commits.webkit.org/259493@main
    aj062 committed Jan 27, 2023
  8. [Gardening]: REGRESSION(259484@main): [ iOS macOS Debug ] imported/w3…

    …c/web-platform-tests/fs/FileSystemFileHandle-create-sync-access-handle.https.tentative.window.html is a consistent failure
    
    webkit.org/b/251274
    
    Unreviewed test gardening.
    
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259492@main
    karlrackler committed Jan 27, 2023
  9. Elide manual auth validation check when FPAC is supported.

    https://bugs.webkit.org/show_bug.cgi?id=251244
    <rdar://problem/104725544>
    
    Reviewed by Yusuke Suzuki.
    
    With FPAC, the aut instruction will validate its own result.  Hence, the
    manual validation that we used to do after the aut is now redundant.
    
    * Source/JavaScriptCore/assembler/CPU.cpp:
    (JSC::isARM64E_FPAC):
    * Source/JavaScriptCore/assembler/CPU.h:
    (JSC::isARM64E_FPAC):
    (JSC::isARM64_LSE):
    * Source/JavaScriptCore/assembler/MacroAssemblerARM64E.h:
    (JSC::MacroAssemblerARM64E::validateUntaggedPtr):
    (JSC::MacroAssemblerARM64E::untagArrayPtr):
    (JSC::MacroAssemblerARM64E::untagArrayPtrLength64):
    * Source/JavaScriptCore/runtime/InitializeThreading.cpp:
    (JSC::initialize):
    * Source/JavaScriptCore/runtime/JSCConfig.h:
    
    Canonical link: https://commits.webkit.org/259491@main
    Mark Lam committed Jan 27, 2023
  10. Ensure FixedBitVector's WordType matches the type of BitVector::m_bit…

    …sOrPointer.
    
    https://bugs.webkit.org/show_bug.cgi?id=251251
    <rdar://problem/104731974>
    
    Reviewed by Yusuke Suzuki.
    
    The rest of FixedBitVector's code relies on this relationship.  So, let's make it explicit.
    
    Also, fixed a bug in BitMap's API tests: testBitmapConcurrentTestAndSet() and
    testBitmapConcurrentTestAndClear() were exercising testAndSet() and testAndClear()
    respectively instead of their concurrent versions.  This is now fixed.  This issue was
    originally found by Yijia Huang in https://bugs.webkit.org/show_bug.cgi?id=250847.
    
    * Source/WTF/wtf/FixedBitVector.h:
    * Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:
    (TestWebKitAPI::testBitmapConcurrentTestAndSet):
    (TestWebKitAPI::testBitmapConcurrentTestAndClear):
    
    Canonical link: https://commits.webkit.org/259490@main
    Mark Lam committed Jan 27, 2023
  11. Fix Ed25519 public key generation from private key material

    https://bugs.webkit.org/show_bug.cgi?id=251252
    rdar://problem/104733721
    
    Reviewed by Chris Dumez.
    
    Use cced25519_make_pub to generate the public key.
    
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any.worker-expected.txt:
    * Source/WebCore/crypto/mac/CryptoKeyOKPCocoa.cpp:
    (WebCore::CryptoKeyOKP::generateJwkX const):
    
    Canonical link: https://commits.webkit.org/259489@main
    youennf authored and cdumez committed Jan 27, 2023
  12. [WK2] Drop use of fixed-width types for size values in ArgumentCoder …

    …specializations
    
    https://bugs.webkit.org/show_bug.cgi?id=250777
    
    Reviewed by Kimmo Kinnunen.
    
    Instead of finding better or worse fixed-sized-type matches for size values in
    different ArgumentCoder specializations, the types of those size values should
    be used. This means simply encoding values of size_t or unsigned types.
    
    The target type of the size value should be noted in the code, just to provide
    the necessary context of what is being encoded and have it match the decoding
    side. This means the size type is explicitly used either in any temporary
    variable where the value is stored, or an additional static_cast is used to
    explicitly specify the type when the value is passed to the stream insertion
    operator.
    
    This still leaves open the possibility of using mismatched types, i.e. the
    size value type not matching what the encoding enforces. Some sort of validation
    could be implemented in the encoder class to make sure no undesired narrowing
    conversions occur.
    
    * Source/WebKit/Platform/IPC/ArgumentCoders.cpp:
    (IPC::ArgumentCoder<CString>::encode):
    (IPC::ArgumentCoder<CString>::decode):
    (IPC::ArgumentCoder<String>::encode):
    (IPC::decodeStringText):
    (IPC::ArgumentCoder<String>::decode):
    (IPC::ArgumentCoder<StringView>::encode):
    * Source/WebKit/Platform/IPC/ArgumentCoders.h:
    
    Canonical link: https://commits.webkit.org/259488@main
    zdobersek committed Jan 27, 2023
  13. [Gardening]: ipc/webpageproxy-correctionpanel-no-crash.html is a Mac-…

    …only test
    
    https://bugs.webkit.org/show_bug.cgi?id=251253
    rdar://104698580
    
    Unreviewed test gardening.
    
    Skipping playform-specific directory.
    
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259487@main
    karlrackler committed Jan 27, 2023
  14. Spelling fix for errorMessageForTransfer function

    https://bugs.webkit.org/show_bug.cgi?id=251250
    
    Reviewed by Yusuke Suzuki.
    
    Noticed incorrect spelling while browsing the code today.
    Update errorMesasgeForTransfer to errorMessageForTransfer.
    
    * Source/JavaScriptCore/runtime/ArrayBuffer.cpp:
    (JSC::errorMessageForTransfer):
    (JSC::errorMesasgeForTransfer): Deleted.
    * Source/JavaScriptCore/runtime/ArrayBuffer.h:
    * Source/WebCore/bindings/js/SerializedScriptValue.cpp:
    (WebCore::SerializedScriptValue::create):
    
    Canonical link: https://commits.webkit.org/259486@main
    stwrt committed Jan 27, 2023
  15. [iOS] fast/events/iOS/rotation are failing

    https://bugs.webkit.org/show_bug.cgi?id=251227
    rdar://104203486
    
    Reviewed by Wenson Hsieh.
    
    This seems to have regressed with 255459@main, which updated the logic
    to restore portrait orientation between tests when we added support
    for the screen orientation API.
    
    There are 2 ways to restore the orientation:
    1. Call [UIScene requestGeometryUpdateWithPreferences:]
    2. Lock the orientation to portrait then unlock
    
    In 255459@main, I had replaced method 1 with method 2 because method 1
    didn't work properly with the screen orientation lock tests. However,
    it broke the tests in fast/events/iOS/rotation which rely on
    `[UIScene requestGeometryUpdateWithPreferences:]` to simulate screen
    rotation during the tests.
    
    After several hours of trying to find a common mechanism to restore
    orientation that would work for both screen rotation and orientation
    lock tests, I still wasn't able to make it work.
    
    For this reason, in my this, I am using method 2 only for tests that
    lock the screen orientation and keep using the old method 1 for all
    other tests. As a result, this restores pre-255459@main behavior and
    fixes existing tests. It also doesn't regress the screen orientation
    lock tests which were added in 255459@main.
    
    * Tools/WebKitTestRunner/TestController.h:
    * Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
    (-[WindowDidRotateObserver initWithCallback:]):
    (-[WindowDidRotateObserver dealloc]):
    (-[WindowDidRotateObserver _windowDidRotate]):
    (WTR::TestController::restorePortraitOrientationIfNeeded):
    (WTR::TestController::lockScreenOrientation):
    
    Canonical link: https://commits.webkit.org/259485@main
    cdumez committed Jan 27, 2023
  16. AX: Fix for crash in AXIsolatedTree::removeNode.

    https://bugs.webkit.org/show_bug.cgi?id=251045
    rdar://103361530
    
    Reviewed by Chris Fleizach.
    
    Covered by existing tests.
    
    The crash happens in ITM because AXObjectCache::remove updates the isolated tree by calling AXIsolatedTree::removeNode, that calls parentObjectUnignored(), which results in a call to textUnderElement which cannot be called during a layout. The solution in this patch is to make the removal of the object in question asynchronously.
    Some code cleanup by splitting the handling of an element's renderer creation from AXObjectCache::get(Node*).
    
    * Source/WebCore/accessibility/AXObjectCache.cpp:
    (WebCore::AXObjectCache::get):
    (WebCore::AXObjectCache::onRendererCreated):
    (WebCore::AXObjectCache::handleLiveRegionCreated):
    (WebCore::AXObjectCache::performDeferredCacheUpdate):
    (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): Deleted.
    * Source/WebCore/accessibility/AXObjectCache.h:
    (WebCore::AXObjectCache::onRendererCreated):
    (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): Deleted.
    * Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
    (WebCore::RenderTreeUpdater::createRenderer):
    
    Canonical link: https://commits.webkit.org/259484@main
    AndresGonzalezApple committed Jan 27, 2023
  17. Unreviewed. Fix the build with clang after 259482@main

    * Source/WTF/wtf/glib/GWeakPtr.h:
    (WTF::GWeakPtr::operator=): Add missing std::
    
    Canonical link: https://commits.webkit.org/259483@main
    carlosgcampos authored and philn committed Jan 27, 2023
  18. [GTK][WPE] Add GWeakPtr to WTF and use it instead of explicit g_objec…

    …t_add|remove_weak_pointer
    
    https://bugs.webkit.org/show_bug.cgi?id=251258
    
    Reviewed by Michael Catanzaro and Adrian Perez de Castro.
    
    It's very common to forget to remove a weak references, GWeakPtr ensures
    weak references are always removed and makes easier to create weak
    GObjects.
    
    * Source/WTF/wtf/PlatformGTK.cmake:
    * Source/WTF/wtf/PlatformWPE.cmake:
    * Source/WTF/wtf/glib/GWeakPtr.h: Added.
    (WTF::GWeakPtr::GWeakPtr):
    (WTF::GWeakPtr::~GWeakPtr):
    (WTF::GWeakPtr::get const):
    (WTF::GWeakPtr::reset):
    * Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp:
    (webkitDownloadCreate):
    (webkit_download_get_web_view):
    (_WebKitDownloadPrivate::~_WebKitDownloadPrivate): Deleted.
    * Source/WebKit/UIProcess/API/glib/WebKitFaviconDatabase.cpp:
    (webkitFaviconDatabaseGetLoadDecisionForIcon):
    * Source/WebKit/UIProcess/API/glib/WebKitIconLoadingClient.cpp:
    * Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:
    (UIClient::~UIClient): Deleted.
    * Tools/TestWebKitAPI/PlatformGTK.cmake:
    * Tools/TestWebKitAPI/PlatformWPE.cmake:
    * Tools/TestWebKitAPI/Tests/WTF/glib/GWeakPtr.cpp: Added.
    (TestWebKitAPI::TEST):
    
    Canonical link: https://commits.webkit.org/259482@main
    carlosgcampos committed Jan 27, 2023
  19. [ews] Improve github status-bubble hover-over text when build is skip…

    …ped because of skip-ews label (follow-up)
    
    https://bugs.webkit.org/show_bug.cgi?id=251221
    <rdar://problem/104708261>
    
    Unreviewed follow-up fix.
    
    * Tools/CISupport/ews-app/ews/common/github.py:
    (GitHubEWS.github_status_for_queue):
    
    Canonical link: https://commits.webkit.org/259481@main
    aj062 committed Jan 27, 2023
  20. [GTK][WPE] WebsiteDataManger created by persistent network session sh…

    …ould never return NULL for base cache and data directories
    
    https://bugs.webkit.org/show_bug.cgi?id=251255
    
    Reviewed by Adrian Perez de Castro.
    
    When NULL is passed to network session constructor the default directory
    is provided to website data manager to ensure the getters don't return
    NULL.
    
    * Source/WebKit/UIProcess/API/glib/WebKitNetworkSession.cpp:
    (webkitNetworkSessionSetProperty):
    (webkitNetworkSessionConstructed):
    * Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
    (webkitWebsiteDataManagerSetProperty):
    (webkitWebsiteDataManagerConstructed):
    (webkitWebsiteDataManagerGetDataStore):
    (webkitWebsiteDataManagerCreate):
    (webkit_website_data_manager_get_base_data_directory):
    (webkit_website_data_manager_get_base_cache_directory):
    (webkitWebsiteDataManagerGetFaviconDatabasePath):
    * Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h:
    * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:
    * Source/WebKit/UIProcess/glib/WebsiteDataStoreGLib.cpp:
    (WebKit::WebsiteDataStore::defaultBaseCacheDirectory):
    (WebKit::WebsiteDataStore::defaultBaseDataDirectory):
    (WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
    (WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
    (testWebsiteDataConfiguration):
    
    Canonical link: https://commits.webkit.org/259480@main
    carlosgcampos committed Jan 27, 2023
  21. [WPE] Add support for generating a cross toolchain, images and cross …

    …building easily for a set of curated embedded targets with Yocto
    
    https://bugs.webkit.org/show_bug.cgi?id=249604
    
    Reviewed by Philippe Normand.
    
    This adds a new script named 'cross-toolchain-helper' that
    automates the process of building a cross-toolchain and an
    image with Yocto.
    
    The script also is able to automatically deploy the Yocto
    workdir and set the target build configs from a set of
    configuration files.
    
    The main configuration file for this script is at the path
    'Tools/yocto/targets.conf'. Inside this file several targets
    can be defined. Each target defines a set of Yocto layers
    and local.conf configurations. It can be also defined the
    default WebKit parameters for each target.
    
    The following WebKit tool scripts are also patched to be
    aware of the cross-target builds:
      - Tools/Scripts/update-webkitwpe-libs
      - Tools/Scripts/update-webkitgtk-libs
      - Tools/Scripts/build-webkit
      - Tools/CISupport/built-product-archive
    
    To enable the cross-target builds the flag '--cross-target=target_name'
    should be passed. Alternatively the environment variable
    'WEBKIT_CROSS_TARGET' can be used instead.
    
    The list of targets defined at 'Tools/yocto/targets.conf'
    is curated and is expected to build and work without issues.
    In the near future a post-commit bot will be checking this.
    
    The tool is designed to automatically wipe and recreate the
    cross-toolchain and images when it detects the configuration
    for any target has changed. However, this behaviour can be
    overriden by optional parameters.
    
    For more info (including examples on how to use this) check the file:
    Tools/yocto/README.md
    
    * Tools/CISupport/built-product-archive:
    * Tools/Scripts/build-webkit:
    * Tools/Scripts/cross-toolchain-helper: Added.
    * Tools/Scripts/update-webkitgtk-libs:
    * Tools/Scripts/update-webkitwpe-libs:
    * Tools/Scripts/webkitdirs.pm:
    (determineCrossTarget):
    (determineConfigurationProductDir):
    (determinePassedConfiguration):
    (runInCrossTargetEnvironment):
    (inCrossTargetEnvironment):
    (getCrossTargetName):
    (shouldBuildForCrossTarget):
    (wrapperPrefixIfNeeded):
    (shouldUseFlatpak):
    (cmakeCachePath):
    (cmakeFilesPath):
    (shouldRemoveCMakeCache):
    (cmakeGeneratedBuildfile):
    (generateBuildSystemFromCMakeProject):
    (productDirForCMake):
    (buildCMakeGeneratedProject):
    (cleanCMakeGeneratedProject):
    * Tools/yocto/README.md: Added.
    * Tools/yocto/rpi/bblayers.conf: Added.
    * Tools/yocto/rpi/fix-nativesdk-image-defs.patch: Added.
    * Tools/yocto/rpi/local-rpi3-32bits-mesa.conf: Added.
    * Tools/yocto/rpi/local-rpi3-32bits-userland.conf: Added.
    * Tools/yocto/rpi/local-rpi3-64bits-mesa.conf: Added.
    * Tools/yocto/rpi/local-rpi4-32bits-mesa.conf: Added.
    * Tools/yocto/rpi/local-rpi4-64bits-mesa.conf: Added.
    * Tools/yocto/rpi/manifest.xml: Added.
    * Tools/yocto/targets.conf: Added.
    
    Canonical link: https://commits.webkit.org/259479@main
    clopez committed Jan 27, 2023
  22. Safari local video element pauses after bluetooth audioinput is disco…

    …nnected
    
    https://bugs.webkit.org/show_bug.cgi?id=231787
    rdar://problem/84529041
    
    Reviewed by Eric Carlson.
    
    We receive a remote pause command when BT is disconnected.
    We also get remote commands from keyboard and the current heuristic does not work well with video conference websites
    that have multiple media elements playing at the same time.
    We introduce a new heuristic in that case, where instead of pausing/playing media elements, we mute/unmute capture and audio rendering.
    This allow users for instance to restart capture/audio using Safari UI.
    
    We update WebPlaybackControlsManager setPlaying to always send an IPC message since calling playing may unmute WebProcess.
    
    Covered by API test.
    
    * Source/WebCore/dom/Document.cpp:
    (WebCore::Document::updateIsPlayingMedia):
    * Source/WebCore/dom/Document.h:
    (WebCore::Document::activeMediaElementsWithMediaStreamCount const):
    * Source/WebCore/html/MediaElementSession.cpp:
    (WebCore::isDocumentPlayingSeveralMediaStreams):
    (WebCore::processRemoteControlCommandIfPlayingMediaStreams):
    (WebCore::MediaElementSession::didReceiveRemoteControlCommand):
    (WebCore::MediaElementSession::nowPlayingInfo const):
    * Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:
    (-[WebPlaybackControlsManager setPlaying:]):
    * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote.html: Added.
    
    Canonical link: https://commits.webkit.org/259478@main
    youennf committed Jan 27, 2023
  23. [WGSL] Add a pass to rewrite globals

    https://bugs.webkit.org/show_bug.cgi?id=251205
    <rdar://problem/104691861>
    
    Reviewed by Myles C. Maxfield.
    
    Add a new pass that removes global variables and creates structs compatible
    with Metal argument buffers. For now, the pass only generates the structs based
    on the globals available in the source program, but we should use the pipeline
    layout in the future. Fow now what it does is:
    
    1. Find all the globals in the source and remove them
    2. Creates a struct per bind group to receive the globals
    3. Traverse the call graph and identify which functions use which globals
    4. Insert parameters in the functions that need to receive the globals
    5. Rewrite the global accesses with struct accesses to load the globals from
       the structs received via the parameters.
    
    In order for this patch to work correct, GlobalVariableRewriter needs to be updated
    to use a ReferenceType, which is being introduce in PR #9174.
    
    This PR also includes a fair amount of FIXMEs, but it was getting pretty large so I
    paused here and will upload follow up patches shortly.
    
    * Source/WebGPU/WGSL/AST/ASTFunctionDecl.h:
    * Source/WebGPU/WGSL/AST/ASTIdentifierExpression.h:
    * Source/WebGPU/WGSL/AST/ASTStructureDecl.h:
    * Source/WebGPU/WGSL/GlobalVariableRewriter.cpp: Added.
    (WGSL::RewriteGlobalVariables::RewriteGlobalVariables):
    (WGSL::RewriteGlobalVariables::run):
    (WGSL::RewriteGlobalVariables::visit):
    (WGSL::replace):
    (WGSL::RewriteGlobalVariables::collectGlobals):
    (WGSL::RewriteGlobalVariables::visitEntryPoint):
    (WGSL::RewriteGlobalVariables::requiredGroups):
    (WGSL::RewriteGlobalVariables::insertStructs):
    (WGSL::RewriteGlobalVariables::insertParameters):
    (WGSL::RewriteGlobalVariables::def):
    (WGSL::RewriteGlobalVariables::read):
    (WGSL::RewriteGlobalVariables::argumentBufferParameterName):
    (WGSL::RewriteGlobalVariables::argumentBufferStructName):
    (WGSL::rewriteGlobalVariables):
    * Source/WebGPU/WGSL/GlobalVariableRewriter.h: Added.
    * Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
    (WGSL::Metal::FunctionDefinitionWriter::visit):
    (WGSL::Metal::FunctionDefinitionWriter::visitArgumentBufferParameter):
    * Source/WebGPU/WGSL/WGSL.cpp:
    (WGSL::prepare):
    * Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
    
    Canonical link: https://commits.webkit.org/259477@main
    tadeuzagallo committed Jan 27, 2023
  24. [WK2] Remove WantsConnection IPC message attribute

    https://bugs.webkit.org/show_bug.cgi?id=251030
    
    Reviewed by Kimmo Kinnunen.
    
    The 'WantsConnection' IPC message attribute imposed using the wants-connection
    variants of IPC::handleMessage(), passing the Connection reference as the first
    argument to the method handling a given IPC message.
    
    The attribute can be removed, along with the relevant IPC::handleMessage()
    variants. Instead, the initial Connection reference parameter on the handler
    method can be indicated on the MethodSignatureValidation template class that's
    already used for validation purposes. Existing variants do a constexpr check and
    adjust the method invocation to pass the Connection reference as the first
    argument to the method when necessary.
    
    * Source/WebKit/NetworkProcess/NetworkBroadcastChannelRegistry.messages.in:
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in:
    * Source/WebKit/Platform/IPC/HandleMessage.h:
    (IPC::handleMessage):
    (IPC::handleMessageSynchronous):
    (IPC::handleMessageAsync):
    (IPC::handleMessageWantsConnection): Deleted.
    (IPC::handleMessageSynchronousWantsConnection): Deleted.
    (IPC::handleMessageAsyncWantsConnection): Deleted.
    * Source/WebKit/Scripts/webkit/messages.py:
    (async_message_statement):
    (sync_message_statement):
    * Source/WebKit/Scripts/webkit/model.py:
    * Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiver.messages.in:
    * Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:
    (WebKit::TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage):
    * Source/WebKit/Scripts/webkit/tests/TestWithSuperclass.messages.in:
    * Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:
    (WebKit::TestWithSuperclass::didReceiveMessage):
    * Source/WebKit/Scripts/webkit/tests/TestWithoutAttributes.messages.in:
    * Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:
    (WebKit::TestWithoutAttributes::didReceiveSyncMessage):
    * Source/WebKit/Shared/IPCTester.messages.in:
    * Source/WebKit/Shared/Notifications/NotificationManagerMessageHandler.messages.in:
    * Source/WebKit/UIProcess/WebGeolocationManagerProxy.messages.in:
    * Source/WebKit/UIProcess/WebPageProxy.messages.in:
    * Source/WebKit/UIProcess/WebPasteboardProxy.messages.in:
    * Source/WebKit/UIProcess/WebProcessPool.messages.in:
    
    Canonical link: https://commits.webkit.org/259476@main
    zdobersek committed Jan 27, 2023
  25. ipc/webpageproxy-correctionpanel-no-crash.html is a Mac-only test

    https://bugs.webkit.org/show_bug.cgi?id=251253
    rdar://104698580
    
    Unreviewed.
    
    Update Test Expectations to skip tests except in mac-wk2.
    
    * LayoutTests/TestExpectations:
    * LayoutTests/platform/mac-wk2/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259475@main
    youennf committed Jan 27, 2023
  26. [WGSL] Add reference types

    https://bugs.webkit.org/show_bug.cgi?id=251202
    <rdar://problem/104689979>
    
    Reviewed by Myles C. Maxfield.
    
    Remove the existing `TypeReference` node, which was a workaround to have a node
    that points to another type node, but it's now no longer necessary.
    
    Replace it with a `ReferenceType` node. The similar name is a bit confusing,
    but this actually refers to a reference to type, i.e. `T&` in source.
    
    The node still isn't used in this patch, but another patch will follow this one.
    
    * Source/WebGPU/WGSL/AST/ASTForward.h:
    * Source/WebGPU/WGSL/AST/ASTNode.h:
    * Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
    (WGSL::AST::StringDumper::visit):
    * Source/WebGPU/WGSL/AST/ASTStringDumper.h:
    * Source/WebGPU/WGSL/AST/ASTTypeDecl.h:
    (isType):
    * Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
    (WGSL::AST::Visitor::visit):
    * Source/WebGPU/WGSL/AST/ASTVisitor.h:
    * Source/WebGPU/WGSL/EntryPointRewriter.cpp:
    (WGSL::EntryPointRewriter::getResolvedType):
    (WGSL::EntryPointRewriter::constructInputStruct):
    * Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
    (WGSL::Metal::FunctionDefinitionWriter::visit):
    
    Canonical link: https://commits.webkit.org/259474@main
    tadeuzagallo committed Jan 27, 2023
  27. [GStreamer][WebRTC] Missing null/zero checks in 1.22 code paths

    https://bugs.webkit.org/show_bug.cgi?id=251145
    
    Reviewed by Xabier Rodriguez-Calvar.
    
    * Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
    (WebCore::GStreamerMediaEndpoint::addRemoteStream): The msid property can be null, so needs checking.
    (WebCore::GStreamerMediaEndpoint::requestAuxiliarySender): Remove auxiliary sender caching. This
    code is called once per transport stream, ownership of the sender is passed to the caller.
    
    Canonical link: https://commits.webkit.org/259473@main
    philn committed Jan 27, 2023
  28. [WGSL] Keep source alive for as long as AST is alive

    https://bugs.webkit.org/show_bug.cgi?id=251204
    <rdar://problem/104691207>
    
    Reviewed by Myles C. Maxfield.
    
    The `Identifier`s generated by the parser keep a reference and offset to the input source,
    but no references are kept to make sure the source stays around, which resulted in it
    being deallocated while the AST was still in use. I added a test that crashes if Guard Malloc
    is enabled.
    
    * Source/WebGPU/WGSL/AST/ASTShaderModule.h:
    * Source/WebGPU/WGSL/Parser.cpp:
    (WGSL::parse):
    (WGSL::Parser<Lexer>::parseShader):
    * Source/WebGPU/WGSL/Parser.h:
    * Source/WebGPU/WGSL/ParserPrivate.h:
    * Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp:
    (TestWGSLAPI::TEST):
    
    Canonical link: https://commits.webkit.org/259472@main
    tadeuzagallo committed Jan 27, 2023
  29. [Buildstream SDK] Junction missing patches

    https://bugs.webkit.org/show_bug.cgi?id=251254
    
    Unreviewed, follow-up from 259429@main listing all the required patches for the FDO SDK junction.
    
    * Tools/buildstream/elements/freedesktop-sdk.bst:
    
    Canonical link: https://commits.webkit.org/259471@main
    philn committed Jan 27, 2023
  30. Disambiguate Interpreter::execute() methods.

    https://bugs.webkit.org/show_bug.cgi?id=251249
    <rdar://problem/104730730>
    
    Reviewed by Yusuke Suzuki.
    
    Most Interpreter execute methods already have unique names e.g. executeProgram, executeCall,
    etc.  The only 2 that are still not disambiguated this way are for eval and cached calls.
    Rename these to executeEval and executeCachedCall so that they are more easily grep'able.
    
    * Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp:
    (JSC::DebuggerCallFrame::evaluateWithScopeExtension):
    * Source/JavaScriptCore/interpreter/CachedCall.h:
    (JSC::CachedCall::call):
    * Source/JavaScriptCore/interpreter/Interpreter.cpp:
    (JSC::eval):
    (JSC::Interpreter::executeEval):
    (JSC::Interpreter::execute): Deleted.
    * Source/JavaScriptCore/interpreter/Interpreter.h:
    * Source/JavaScriptCore/interpreter/InterpreterInlines.h:
    (JSC::Interpreter::executeCachedCall):
    (JSC::Interpreter::execute): Deleted.
    * Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:
    (JSC::JSC_DEFINE_HOST_FUNCTION):
    * Source/JavaScriptCore/runtime/ShadowRealmPrototype.cpp:
    (JSC::JSC_DEFINE_HOST_FUNCTION):
    
    Canonical link: https://commits.webkit.org/259470@main
    Mark Lam committed Jan 27, 2023
  31. [WebGL] Move WebGLStateTracker to html/canvas

    https://bugs.webkit.org/show_bug.cgi?id=251236
    rdar://problem/104721662
    
    Reviewed by Matt Woodrow.
    
    Move WebGLStateTracker files to the same location as the rest of WebGL.
    
    * Source/WebCore/Headers.cmake:
    * Source/WebCore/Sources.txt:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    * Source/WebCore/html/canvas/WebGLStateTracker.cpp: Renamed from Source/WebCore/platform/WebGLStateTracker.cpp.
    (WebCore::WebGLStateTracker::WebGLStateTracker):
    (WebCore::m_stateChangeHandler):
    (WebCore::WebGLStateTracker::token):
    (WebCore::WebGLStateTracker::updateWebGLState):
    * Source/WebCore/html/canvas/WebGLStateTracker.h: Renamed from Source/WebCore/platform/WebGLStateTracker.h.
    
    Canonical link: https://commits.webkit.org/259469@main
    djg committed Jan 27, 2023
  32. [Style Guide] Only use the arrow for function return types if it allo…

    …ws you to omit redundant information
    
    https://bugs.webkit.org/show_bug.cgi?id=251239
    rdar://104722324
    
    Reviewed by Ryosuke Niwa.
    
    We probably don't want people using -> in function signatures all over the place where it isn't necessary.
    
    * Websites/webkit.org/code-style.md:
    
    Canonical link: https://commits.webkit.org/259468@main
    litherum committed Jan 27, 2023
  33. [UI-side compositing] Hide native scrollbars for layout tests

    https://bugs.webkit.org/show_bug.cgi?id=251235
    rdar://104720292
    
    Reviewed by Simon Fraser.
    
    Since layout tests use mock scrollbars, we also need to hide native scrollbars for this case.
    To do so we check DeprecatedGlobalSettings::mockScrollbarsEnabled in
    Scrollbar::nativeScrollbarVisibility. We also refactor some of the code that handles turning off
    the native scrollbars to use the getters on ScrollingTreeScrollingNode.
    
    * Source/WebCore/page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
    (WebCore::ScrollingTreeScrollingNodeDelegate::getScrollbarLayersForStateNode): Deleted.
    * Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
    * Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
    (WebCore::ScrollingTreeScrollingNodeDelegateMac::getScrollbarLayersForStateNode): Deleted.
    * Source/WebCore/platform/Scrollbar.cpp:
    (WebCore::Scrollbar::nativeScrollbarVisibility):
    * Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
    (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::commitStateBeforeChildren):
    * Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:
    (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::commitStateBeforeChildren):
    
    Canonical link: https://commits.webkit.org/259467@main
    nmoucht committed Jan 27, 2023
  34. The Clear-Site-Data HTTP header should obey origin partition

    https://bugs.webkit.org/show_bug.cgi?id=251094
    
    Reviewed by Youenn Fablet.
    
    The Clear-Site-Data HTTP header should obey origin partition. If shouldn't be
    possible for an iframe of origin A under top origin B to be able to clear site
    data from top origin A (and vice-versa).
    
    Our storages are partitioned and the request to clear site data should respect
    that.
    
    * LayoutTests/http/wpt/clear-site-data/partitioning-expected.txt: Added.
    * LayoutTests/http/wpt/clear-site-data/partitioning.html: Added.
    * LayoutTests/http/wpt/clear-site-data/resources/partitioning-popup.html: Added.
    * LayoutTests/imported/w3c/web-platform-tests/clear-site-data/support/test_utils.sub.js:
    * Source/WebCore/loader/cache/MemoryCache.cpp:
    (WebCore::MemoryCache::removeResourcesWithOrigin):
    * Source/WebCore/loader/cache/MemoryCache.h:
    * Source/WebCore/platform/network/NetworkStorageSession.cpp:
    (WebCore::NetworkStorageSession::deleteCookies):
    * Source/WebCore/platform/network/NetworkStorageSession.h:
    * Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm:
    (WebCore::NetworkStorageSession::deleteCookiesMatching):
    (WebCore::NetworkStorageSession::deleteCookies):
    (WebCore::NetworkStorageSession::deleteCookiesForHostnames):
    * Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp:
    (WebCore::ServiceWorkerRegistrationKey::matchesOriginWithCachePartition const):
    * Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:
    * Source/WebCore/workers/service/server/SWServer.cpp:
    (WebCore::SWServer::clear):
    (WebCore::SWServer::clearInternal):
    * Source/WebCore/workers/service/server/SWServer.h:
    * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
    (WebKit::NetworkConnectionToWebProcess::deleteWebsiteDataForOrigin):
    (WebKit::NetworkConnectionToWebProcess::deleteWebsiteDataForOrigins): Deleted.
    * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
    * Source/WebKit/NetworkProcess/NetworkProcess.cpp:
    (WebKit::NetworkProcess::deleteWebsiteDataForOrigin):
    * Source/WebKit/NetworkProcess/NetworkProcess.h:
    * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
    (WebKit::NetworkResourceLoader::processClearSiteDataHeader):
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
    (WebKit::NetworkStorageManager::deleteData):
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
    * Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp:
    (WebKit::NetworkProcessConnection::deleteWebsiteDataForOrigin):
    (WebKit::NetworkProcessConnection::deleteWebsiteDataForOrigins): Deleted.
    * Source/WebKit/WebProcess/Network/NetworkProcessConnection.h:
    * Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in:
    * Source/WebKit/WebProcess/WebProcess.cpp:
    (WebKit::WebProcess::deleteWebsiteDataForOrigin):
    * Source/WebKit/WebProcess/WebProcess.h:
    
    Canonical link: https://commits.webkit.org/259466@main
    cdumez committed Jan 27, 2023
  35. Update alternativeIndexV implementation based on feedback from standa…

    …rd library proposal
    
    https://bugs.webkit.org/show_bug.cgi?id=251228
    rdar://104717280
    
    Reviewed by Yusuke Suzuki.
    
    http://wg21.link/P2527 and an upcoming r2 have shifted the design slightly to use std::integral_constant
    and remove inline.  This PR just uses the latest changes to gain some "implementation experience" and
    verify it can be used in practice.
    
    * Source/WTF/wtf/StdLibExtras.h:
    
    Canonical link: https://commits.webkit.org/259465@main
    achristensen07 committed Jan 27, 2023
Older