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. Unreviewed, reverting r259421@main.

    https://bugs.webkit.org/show_bug.cgi?id=251295
    
    Regressed JetStream2/gcc-loop-wasm startup score
    
    Reverted changeset:
    
    "[WASM-Function-References] Fix block signature parsing for reftypes"
    https://bugs.webkit.org/show_bug.cgi?id=247383
    https://commits.webkit.org/259421@main
    
    Canonical link: https://commits.webkit.org/259510@main
    webkit-commit-queue authored and Constellation committed Jan 27, 2023
  2. Remove unused PaginateDuringLayoutEnabled flag

    https://bugs.webkit.org/show_bug.cgi?id=251283
    <rdar://problem/104753907>
    
    Reviewed by Alan Baradlay.
    
    During review of the WebKit feature flags, we discovered that PaginateDuringLayoutEnabled
    is not read or written to anywhere in the WebKit engine, and should be removed.
    
    The C API stubs are marked as Deprecated, but left in place to avoid breaking any
    existing code still calling the functions.
    
    * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
    * Source/WebKit/UIProcess/API/C/WKPreferences.cpp:
    (WKPreferencesSetPaginateDuringLayoutEnabled):
    (WKPreferencesGetPaginateDuringLayoutEnabled):
    * Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h:
    * Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h:
    * Source/WebKitLegacy/mac/WebView/WebPreferences.mm:
    (-[WebPreferences paginateDuringLayoutEnabled]): Deleted.
    (-[WebPreferences setPaginateDuringLayoutEnabled:]): Deleted.
    * Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h:
    
    Canonical link: https://commits.webkit.org/259509@main
    Brent Fulgham committed Jan 27, 2023
  3. [WebGPU] Unify Surface and SwapChain into a single class

    https://bugs.webkit.org/show_bug.cgi?id=251248
    rdar://104729119
    
    Reviewed by Dean Jackson.
    
    The WebGPU spec has unified GPUCanvasContext and GPUSwapChain into a single type, so that's
    what this patch does. However, I want to leave the door open for us to be able to implement
    browser features that have nothing to do with canvas using WebGPU, so I named this unified
    class PresentationContext instead of CanvasContext. This matches the same unification that
    I did in https://commits.webkit.org/258984@main.
    
    The previous model was:
    - You create a Surface using a descriptor
    - With the surface you could create a Swap Chain, using a descriptor
    - The Swap Chain could be destroyed
    
    The new model is:
    - You create a PresentationContext using a descriptor (this part is almost unchanged)
    - You configure the PresentationContext using a configuration. The configuration takes the
          place of the previous second descriptor.
    - You can unconfigure the PresentationContext.
    
    This patch doesn't modify WebGPU.h, and there's a pretty straightforward mapping between
    the two models in pal/graphics/WebGPU/Impl.
    
    * Source/WebCore/Modules/WebGPU/GPU.cpp:
    (WebCore::GPU::createPresentationContext):
    (WebCore::GPU::createSurface): Deleted.
    * Source/WebCore/Modules/WebGPU/GPU.h:
    * Source/WebCore/Modules/WebGPU/GPUDevice.cpp:
    (WebCore::GPUDevice::createSurfaceTexture):
    (WebCore::GPUDevice::createSwapChain): Deleted.
    * Source/WebCore/Modules/WebGPU/GPUDevice.h:
    * Source/WebCore/Modules/WebGPU/GPUPresentationConfiguration.h: Renamed from Source/WebCore/Modules/WebGPU/GPUSwapChainDescriptor.h.
    (WebCore::GPUPresentationConfiguration::convertToBacking const):
    * Source/WebCore/Modules/WebGPU/GPUPresentationContext.cpp: Renamed from Source/WebCore/Modules/WebGPU/GPUSwapChain.cpp.
    (WebCore::GPUPresentationContext::configure):
    (WebCore::GPUPresentationContext::unconfigure):
    (WebCore::GPUPresentationContext::getCurrentTexture):
    (WebCore::GPUPresentationContext::prepareForDisplay):
    * Source/WebCore/Modules/WebGPU/GPUPresentationContext.h: Renamed from Source/WebCore/Modules/WebGPU/GPUSwapChain.h.
    (WebCore::GPUPresentationContext::create):
    (WebCore::GPUPresentationContext::backing):
    (WebCore::GPUPresentationContext::backing const):
    (WebCore::GPUPresentationContext::GPUPresentationContext):
    * Source/WebCore/Modules/WebGPU/GPUPresentationContextDescriptor.h: Renamed from Source/WebCore/Modules/WebGPU/GPUSurfaceDescriptor.h.
    (WebCore::GPUPresentationContextDescriptor::convertToBacking const):
    * Source/WebCore/Modules/WebGPU/GPUSurface.cpp: Removed.
    * Source/WebCore/Modules/WebGPU/GPUSurface.h: Removed.
    * Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp:
    * Source/WebCore/Modules/highlight/AppHighlightStorage.h:
    * Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp:
    * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
    * Source/WebCore/PAL/pal/CMakeLists.txt:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
    (PAL::WebGPU::DeviceImpl::createSurfaceTexture):
    (PAL::WebGPU::DeviceImpl::createSwapChain): Deleted.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.cpp:
    (PAL::WebGPU::DowncastConvertToBackingContext::convertToBacking):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
    (PAL::WebGPU::GPUImpl::createPresentationContext):
    (PAL::WebGPU::GPUImpl::createSurface): Deleted.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUPresentationContextImpl.cpp: Added.
    (PAL::WebGPU::PresentationContextImpl::PresentationContextImpl):
    (PAL::WebGPU::PresentationContextImpl::~PresentationContextImpl):
    (PAL::WebGPU::PresentationContextImpl::drawingBuffer const):
    (PAL::WebGPU::PresentationContextImpl::configure):
    (PAL::WebGPU::PresentationContextImpl::unconfigure):
    (PAL::WebGPU::PresentationContextImpl::getCurrentTexture):
    (PAL::WebGPU::PresentationContextImpl::prepareForDisplay):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUPresentationContextImpl.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSurfaceImpl.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSurfaceImpl.cpp: Removed.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainImpl.cpp: Removed.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainImpl.h: Removed.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDevice.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPresentationConfiguration.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSwapChainDescriptor.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPresentationContext.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSwapChain.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPresentationContextDescriptor.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSurfaceDescriptor.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSurface.h: Removed.
    * Source/WebCore/Sources.txt:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    * Source/WebCore/html/canvas/GPUCanvasContextCocoa.cpp:
    (WebCore::GPUCanvasContextCocoa::reshape):
    (WebCore::GPUCanvasContextCocoa::createPresentationContextIfNeeded):
    (WebCore::GPUCanvasContextCocoa::getCurrentTexture):
    (WebCore::GPUCanvasContextCocoa::prepareForDisplay):
    (WebCore::GPUCanvasContextCocoa::createSwapChainIfNeeded): Deleted.
    * Source/WebCore/html/canvas/GPUCanvasContextCocoa.h:
    * Source/WebKit/CMakeLists.txt:
    * Source/WebKit/DerivedSources-input.xcfilelist:
    * Source/WebKit/DerivedSources-output.xcfilelist:
    * Source/WebKit/DerivedSources.make:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp:
    (WebKit::RemoteDevice::createSurfaceTexture):
    (WebKit::RemoteDevice::createSwapChain): Deleted.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.messages.in:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp:
    (WebKit::RemoteGPU::createPresentationContext):
    (WebKit::RemoteGPU::createSurface): Deleted.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.messages.in:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.cpp: Renamed from Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSwapChain.cpp.
    (WebKit::RemotePresentationContext::RemotePresentationContext):
    (WebKit::RemotePresentationContext::stopListeningForIPC):
    (WebKit::RemotePresentationContext::configure):
    (WebKit::RemotePresentationContext::unconfigure):
    (WebKit::RemotePresentationContext::getCurrentTexture):
    (WebKit::RemotePresentationContext::prepareForDisplay):
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.h: Renamed from Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSwapChain.h.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.messages.in: Renamed from Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSwapChain.messages.in.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSurface.cpp: Removed.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSurface.h: Removed.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSurface.messages.in: Removed.
    * Source/WebKit/GPUProcess/graphics/WebGPU/WebGPUObjectHeap.cpp:
    (WebKit::WebGPU::ObjectHeap::addObject):
    (WebKit::WebGPU::ObjectHeap::convertPresentationContextFromBacking):
    (WebKit::WebGPU::ObjectHeap::ObjectHeap): Deleted.
    (WebKit::WebGPU::ObjectHeap::~ObjectHeap): Deleted.
    (WebKit::WebGPU::ObjectHeap::convertSurfaceFromBacking): Deleted.
    (WebKit::WebGPU::ObjectHeap::convertSwapChainFromBacking): Deleted.
    * Source/WebKit/GPUProcess/graphics/WebGPU/WebGPUObjectHeap.h:
    * Source/WebKit/Scripts/webkit/messages.py:
    (headers_for_type):
    * Source/WebKit/Shared/WebGPU/WebGPUConvertFromBackingContext.h:
    * Source/WebKit/Shared/WebGPU/WebGPUConvertToBackingContext.h:
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationConfiguration.cpp: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSwapChainDescriptor.cpp.
    (WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
    (WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationConfiguration.h: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSwapChainDescriptor.h.
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationConfiguration.serialization.in: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSwapChainDescriptor.serialization.in.
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationContextDescriptor.cpp: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSurfaceDescriptor.cpp.
    (WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
    (WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationContextDescriptor.h: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSurfaceDescriptor.h.
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationContextDescriptor.serialization.in: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSurfaceDescriptor.serialization.in.
    * Source/WebKit/Sources.txt:
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp:
    (WebKit::WebGPU::RemoteDeviceProxy::createSurfaceTexture):
    (WebKit::WebGPU::RemoteDeviceProxy::createSwapChain): Deleted.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:
    (WebKit::RemoteGPUProxy::createPresentationContext):
    (WebKit::RemoteGPUProxy::createSurface): Deleted.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.cpp: Renamed from Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSwapChainProxy.cpp.
    (WebKit::WebGPU::RemotePresentationContextProxy::RemotePresentationContextProxy):
    (WebKit::WebGPU::RemotePresentationContextProxy::configure):
    (WebKit::WebGPU::RemotePresentationContextProxy::unconfigure):
    (WebKit::WebGPU::RemotePresentationContextProxy::getCurrentTexture):
    (WebKit::WebGPU::RemotePresentationContextProxy::prepareForDisplay):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSurfaceProxy.h.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSurfaceProxy.cpp: Removed.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSwapChainProxy.h: Removed.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp:
    (WebKit::WebGPU::DowncastConvertToBackingContext::convertToBacking):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.h:
    
    Canonical link: https://commits.webkit.org/259508@main
    litherum committed Jan 27, 2023
  4. Gamepad.vibrationActuator: Add support for "trigger-rumble" effect type

    https://bugs.webkit.org/show_bug.cgi?id=250352
    rdar://104315486
    
    Reviewed by Brent Fulgham and Geoffrey Garen.
    
    Gamepad.vibrationActuator: Add support for "trigger-rumble" effect type:
    -  https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/GamepadHapticsActuatorTriggerRumble/explainer.md
    
    It allows vibrating the triggers (which the XBox controller supports), while the
    existing "dual-rumble" only makes the handles vibrate.
    
    This isn't yet part of the specification at:
    - https://w3c.github.io/gamepad/extensions.html#dom-gamepadhapticeffecttype
    
    However, it is supported by Blink and used by XBox cloud games.
    
    I am adding support behind an experimental feature flag, off by default.
    
    * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
    * Source/WebCore/Modules/gamepad/GamepadEffectParameters.h:
    * Source/WebCore/Modules/gamepad/GamepadEffectParameters.idl:
    * Source/WebCore/Modules/gamepad/GamepadHapticActuator.cpp:
    (WebCore::GamepadHapticActuator::canPlayEffectType const):
    (WebCore::GamepadHapticActuator::playEffect):
    (WebCore::GamepadHapticActuator::stopEffects):
    (WebCore::GamepadHapticActuator::document const):
    (WebCore::GamepadHapticActuator::promiseForEffectType):
    * Source/WebCore/Modules/gamepad/GamepadHapticActuator.h:
    * Source/WebCore/Modules/gamepad/GamepadHapticEffectType.idl:
    * Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm:
    (WebCore::GameControllerGamepad::setupElements):
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.h:
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.mm:
    (WebCore::GameControllerHapticEffect::create):
    (WebCore::GameControllerHapticEffect::GameControllerHapticEffect):
    (WebCore::GameControllerHapticEffect::start):
    (WebCore::GameControllerHapticEffect::stop):
    (WebCore::GameControllerHapticEffect::leftEffectFinishedPlaying):
    (WebCore::GameControllerHapticEffect::rightEffectFinishedPlaying):
    (WebCore::GameControllerHapticEffect::strongEffectFinishedPlaying): Deleted.
    (WebCore::GameControllerHapticEffect::weakEffectFinishedPlaying): Deleted.
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.h:
    (WebCore::GameControllerHapticEngines::leftHandleEngine):
    (WebCore::GameControllerHapticEngines::rightHandleEngine):
    (WebCore::GameControllerHapticEngines::leftTriggerEngine):
    (WebCore::GameControllerHapticEngines::rightTriggerEngine):
    (WebCore::GameControllerHapticEngines::strongEngine): Deleted.
    (WebCore::GameControllerHapticEngines::weakEngine): Deleted.
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.mm:
    (WebCore::GameControllerHapticEngines::GameControllerHapticEngines):
    (WebCore::GameControllerHapticEngines::currentEffectForType):
    (WebCore::GameControllerHapticEngines::playEffect):
    (WebCore::GameControllerHapticEngines::stopEffects):
    (WebCore::GameControllerHapticEngines::ensureStarted):
    (WebCore::GameControllerHapticEngines::stop):
    * Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.h:
    * Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.mm:
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    
    Canonical link: https://commits.webkit.org/259507@main
    cdumez committed Jan 27, 2023
  5. Detect complex custom property cycles involving multiple loops

    https://bugs.webkit.org/show_bug.cgi?id=251269
    <rdar://problem/104744972>
    
    Reviewed by Simon Fraser.
    
    We fail in some complex cycle cases.
    
    * LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cycles-expected.txt:
    * Source/WebCore/style/StyleBuilder.cpp:
    (WebCore::Style::Builder::applyCustomProperty):
    
    Track property cycles with a separate m_inCycleCustomProperties map instead of eagerly computing them to
    an invalid value on first detection. This allows the detection of multiple cycles passing through
    the same property. It also simplifies the code.
    
    * Source/WebCore/style/StyleBuilderState.h:
    
    Canonical link: https://commits.webkit.org/259506@main
    anttijk committed Jan 27, 2023
  6. [REBASELINE][ iOS Release arm64 ] fast/forms/linebox-overflow-in-text…

    …area-padding-simple-lines.html is a constant image failure. (251188)
    
    https://bugs.webkit.org/show_bug.cgi?id=251188
    rdar://104676357
    
    Unreviewed test gardening.
    
    Adjusting pixel tolerance to accomodate running iOS simulators on apple silicon hardware.
    
    * LayoutTests/fast/forms/linebox-overflow-in-textarea-padding-simple-lines.html:
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259505@main
    robert-jenner committed Jan 27, 2023
  7. Interaction regions should support occlusions

    https://bugs.webkit.org/show_bug.cgi?id=250860
    <rdar://103928196>
    
    Reviewed by Tim Horton.
    
    Maintain a separate layer tree for Interaction Regions on top of the
    content. This "mirror layer tree" includes layers for occlusions and now
    comes with clear ordering rules.
    
    * LayoutTests/interaction-region/click-handler-dynamically-added-expected.txt:
    * LayoutTests/interaction-region/click-handler-expected.txt:
    * LayoutTests/interaction-region/click-handler-in-shadowed-layer-expected.txt:
    * LayoutTests/interaction-region/event-region-overflow-expected.txt:
    * LayoutTests/interaction-region/icon-inside-button-single-region-expected.txt:
    * LayoutTests/interaction-region/inline-link-dark-background-expected.txt:
    * LayoutTests/interaction-region/inline-link-expected.txt:
    * LayoutTests/interaction-region/inline-link-in-composited-iframe-expected.txt:
    * LayoutTests/interaction-region/inline-link-in-layer-expected.txt:
    * LayoutTests/interaction-region/inline-link-in-non-composited-iframe-expected.txt:
    * LayoutTests/interaction-region/inline-link-with-pointer-events-none-content-expected.txt:
    * LayoutTests/interaction-region/input-type-file-region-expected.txt:
    * LayoutTests/interaction-region/input-type-range-region-expected.txt:
    * LayoutTests/interaction-region/paused-video-regions-expected.txt:
    * LayoutTests/interaction-region/split-inline-link-expected.txt:
    * LayoutTests/interaction-region/wrapped-inline-link-expected.txt:
    Update expectations with the new dump format.
    
    * LayoutTests/interaction-region/layer-tree-expected.txt: Added.
    * LayoutTests/interaction-region/layer-tree.html: Added.
    Add test covering the final RemoteLayerTree structure.
    
    * LayoutTests/interaction-region/overlay-expected.txt: Renamed from LayoutTests/interaction-region/inline-link-in-aria-hidden-subtree-expected.txt.
    * LayoutTests/interaction-region/overlay.html: Renamed from LayoutTests/interaction-region/inline-link-in-aria-hidden-subtree.html.
    Remove the aria-hidden test.
    Add test for the occlusions detection.
    
    * LayoutTests/interaction-region/region-area-overflow-does-not-crash-expected.txt:
    * LayoutTests/interaction-region/region-area-overflow-does-not-crash.html:
    Update test to also include a big occlusion region.
    
    * LayoutTests/resources/ui-helper.js:
    (window.UIHelper.getCALayerTree):
    * Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
    * Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:
    (WTR::UIScriptController::caLayerTreeAsText const):
    * Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
    * Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
    (WTR::UIScriptControllerCocoa::caLayerTreeAsText const):
    * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
    * Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
    (-[WKWebView _caLayerTreeAsText]):
    (dumpCALayer):
    Introduce a new test helper to get the full remote layer hierarchy.
    
    * Source/WebCore/page/InteractionRegion.cpp:
    (WebCore::interactionRegionForRenderedRegion):
    Remove the aria-hidden check. It was too strict and is not needed
    anymore.
    Generate regions for elements likely to occlude interactions.
    (WebCore::operator<<):
    Update the dump format to differentiate interactions and occlusions.
    
    * Source/WebCore/page/InteractionRegion.h:
    (WebCore::operator==):
    (WebCore::InteractionRegion::encode const):
    (WebCore::InteractionRegion::decode):
    Add a `type` enum to the InteractionRegion struct to differentiate
    interactions and occlusions.
    
    * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
    (WebKit::applyGeometryPropertiesToLayer):
    (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
    Extract the geometry related properties application code to a new
    method.
    (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
    Only update geometry and event region properties for Interaction Regions
    layers.
    (WebKit::applyInteractionRegionsHierarchyUpdate):
    (WebKit::RemoteLayerTreePropertyApplier::applyHierarchyUpdates):
    Apply all hierarchy updates to the Interaction Regions mirror layer tree.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
    (WebKit::RemoteLayerTreeHost::updateLayerTree):
    Keep the Interaction Regions mirror layer tree on top of the content after
    each layer tree update.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.h:
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm:
    (WebKit::isInteractionLayer):
    (WebKit::isOcclusionLayer):
    (WebKit::isAnyInteractionRegionLayer):
    (WebKit::isInteractionRegionLayer): Deleted.
    (WebKit::setInteractionRegionOcclusion):
    Update utility functions to differentiate interactions and occlusions.
    (WebKit::insertInteractionRegionLayersForLayer):
    (WebKit::appendInteractionRegionLayersForLayer): Deleted.
    Insert the Interaction Regions back at the beginning of the sublayers array.
    (WebKit::updateLayersForInteractionRegions):
    Maintain the following order when updating Interaction Regions layers:
    1. Occlusions always come first (in no particular order).
    2. Interactions come next, ordered by area (biggest to smallest).
    3. Other siblings come last, in the same order as the content layers they mirror.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
    (WebKit::RemoteLayerTreeNode::interactionRegionsLayer const):
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
    (WebKit::RemoteLayerTreeNode::detachFromParent):
    (WebKit::RemoteLayerTreeNode::initializeLayer):
    Add an `interactionRegionsLayer` property to the RemoteLayerTreeNode.
    
    Canonical link: https://commits.webkit.org/259504@main
    Etienne Segonzac authored and hortont424 committed Jan 27, 2023
  8. AX: Make element-reflection-arialabelledby.html and element-reflectio…

    …n-ariadescribedby.html async so they can pass in ITM
    
    https://bugs.webkit.org/show_bug.cgi?id=251175
    rdar://problem/104667374
    
    Reviewed by Andres Gonzalez.
    
    This patch also updates accessibility-isolated-tree/TestExpectations to
    mark a bunch of failures that have been broken for a long time (for
    example, see build https://build.webkit.org/#/builders/562/builds/6282).
    
    * LayoutTests/accessibility/element-reflection-ariadescribedby-expected.txt:
    * LayoutTests/accessibility/element-reflection-ariadescribedby.html:
    * LayoutTests/accessibility/element-reflection-arialabelledby-expected.txt:
    * LayoutTests/accessibility/element-reflection-arialabelledby.html:
    * LayoutTests/accessibility-isolated-tree/TestExpectations
    * LayoutTests/platform/glib/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259503@main
    twilco committed Jan 27, 2023
  9. [ews-build.webkit.org] Delete BugzillaMixin.create_bug

    https://bugs.webkit.org/show_bug.cgi?id=251280
    rdar://104751558
    
    Reviewed by Aakash Jain.
    
    * Tools/CISupport/ews-build/steps.py:
    (BugzillaMixin.create_bug): Deleted.
    
    Canonical link: https://commits.webkit.org/259502@main
    JonWBedard committed Jan 27, 2023
  10. [git-webkit] Support --skip-ews option

    https://bugs.webkit.org/show_bug.cgi?id=251273
    rdar://104746176
    
    Reviewed by Geoffrey Garen.
    
    * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
    * Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py:
    (NoAction.__call__): Add --skip prefix.
    * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
    (PullRequest.parser): Add --skip-ews.
    
    Canonical link: https://commits.webkit.org/259501@main
    JonWBedard committed Jan 27, 2023
  11. Add WeakListHashSet

    https://bugs.webkit.org/show_bug.cgi?id=251181
    
    Reviewed by Chris Dumez.
    
    Added WeakPtr version of ListHashSet.
    
    * Source/WTF/WTF.xcodeproj/project.pbxproj:
    * Source/WTF/wtf/CMakeLists.txt:
    * Source/WTF/wtf/WeakListHashSet.h: Added.
    (WTF::WeakListHashSet): Added.
    * Source/WTF/wtf/WeakPtr.h:
    * Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
    (TestWebKitAPI::computeSizeOfWeakListHashSet):
    (WTF_WeakPtr.WeakListHashSetBasic):
    (WTF_WeakPtr.WeakListHashMapConstObjects):
    (WTF_WeakPtr.WeakListHashSetRemoveIterator):
    (WTF_WeakPtr.WeakListHashSetExpansion):
    (WTF_WeakPtr.WeakListHashSetIsEmptyIgnoringNullReferences):
    (WTF_WeakPtr.WeakListHashSetRemoveNullReferences):
    (TestWebKitAPI::collectItemsInWeakListHashSet):
    (WTF_WeakPtr.WeakListHashSetIterators):
    (WTF_WeakPtr.WeakListHashSetAppendOrMoveToLast):
    (WTF_WeakPtr.WeakListHashSetPrependOrMoveToFirst):
    
    Canonical link: https://commits.webkit.org/259500@main
    rniwa committed Jan 27, 2023
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. [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
  19. [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
  20. 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
  21. 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
  22. 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
  23. [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
  24. [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
  25. 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
  26. [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
  27. 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
  28. 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
  29. [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
  30. [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
  31. [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
  32. [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
  33. 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
  34. [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
  35. [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
Older