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 Feb 5, 2023

  1. [WebGPU] Non-owning getters have the wrong lifetime

    https://bugs.webkit.org/show_bug.cgi?id=250958
    rdar://104518638
    
    Reviewed by Dean Jackson.
    
    There are 2 places in WebGPU where objects have getter methods that return internally-retained objects:
    1. Device::getQueue() is supposed to return the same queue object every time you call it, and
    2. PresentationContext::getCurrentTexture() is supposed to return the same texture object every time you call it within
           the same frame.
    
    Let's call this pattern "Owner" and "Owned." The Owner is supposed to retain its Owned. Easy peasy, right?
    
    Well, it gets trickier because:
    1. We have a corresponding set of Impl objects in PAL, each of which is supposed to maintain a strong reference to its
           corresponding object in WebGPU.framework.
    2. Objects exposed by WebGPU.framework are not reference counted.
    
    So, naively, we would have:
    
      +-----------+
      | OwnerImpl |
      +-----------+
            |     \
            |      \
            |       \
            |        V
            |        +-----------+
            |        | OwnedImpl |
            |        +-----------+
            |             |
    ~~~~~~~~|~~~~~~~~~~~~~|~~~~~~~~~~ WebGPU.framework boundary
            V             |
        +-------+         |
        | Owner |         |
        +-------+         |
                 \        |
                  \       |
                   \      |
                    V     V  BANG!!! EXPLOSION!!!
                     +-------+
                     | Owned |
                     +-------+
    
    The above design can't actually work, because Owned isn't reference counted. So, instead, we can introduce a reference-
    counted facade on top of Owner, to look like this:
    
      +-----------+
      | OwnerImpl |
      +-----------+
            |     \
            |      \
            |       \
            |        V
            |        +-----------+
            |        | OwnedImpl |
            |        +-----------+
            |          |
            |          |
            V          V
          +--------------+
          | OwnerWrapper |
          +--------------+
            |
            |
    ~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~ WebGPU.framework boundary
            V
        +-------+
        | Owner |
        +-------+
                 \
                  \
                   \
                    V
                     +-------+
                     | Owned |
                     +-------+
    
    This design has all the properties we want:
    1. All WebGPU.framework objects have a single owner
    2. Any strong reference to the OwnerImpl keeps the Owner alive
    3. Any strong reference to the OwnedImpl keeps the Owned alive
    4. There are no reference cycles
    
    The OwnedImpl doesn't actually call any functions on the OwnerWrapper; the only reason it refs it is to make the above
    requirements hold.
    
    There are 2 other possible designs which satisfy the requirements: 1. Have OwnedImpl delegate its ref() and deref()
    calls to the OwnerImpl, and 2. Make WebGPU.framework objects reference counted. I chose this patch's design over (1)
    because (1) is significantly more complicated and I'm more likely to make a mistake with that design. I chose this
    patch's design over (2) because I didn't want to change the semantic behavior of the WebGPU.h objects.
    
    * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
    * Source/WebCore/PAL/pal/CMakeLists.txt:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
    (PAL::WebGPU::DeviceImpl::DeviceImpl):
    (PAL::WebGPU::DeviceImpl::destroy):
    (PAL::WebGPU::DeviceImpl::createBuffer):
    (PAL::WebGPU::DeviceImpl::createTexture):
    (PAL::WebGPU::DeviceImpl::createSurfaceTexture):
    (PAL::WebGPU::DeviceImpl::createSampler):
    (PAL::WebGPU::DeviceImpl::createBindGroupLayout):
    (PAL::WebGPU::DeviceImpl::createPipelineLayout):
    (PAL::WebGPU::DeviceImpl::createBindGroup):
    (PAL::WebGPU::DeviceImpl::createShaderModule):
    (PAL::WebGPU::DeviceImpl::createComputePipeline):
    (PAL::WebGPU::DeviceImpl::createRenderPipeline):
    (PAL::WebGPU::DeviceImpl::createComputePipelineAsync):
    (PAL::WebGPU::DeviceImpl::createRenderPipelineAsync):
    (PAL::WebGPU::DeviceImpl::createCommandEncoder):
    (PAL::WebGPU::DeviceImpl::createRenderBundleEncoder):
    (PAL::WebGPU::DeviceImpl::createQuerySet):
    (PAL::WebGPU::DeviceImpl::pushErrorScope):
    (PAL::WebGPU::DeviceImpl::popErrorScope):
    (PAL::WebGPU::DeviceImpl::setLabelInternal):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceWrapper.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceHolderImpl.cpp.
    (PAL::WebGPU::DeviceWrapper::DeviceWrapper):
    (PAL::WebGPU::DeviceWrapper::~DeviceWrapper):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceWrapper.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceHolderImpl.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUPresentationContextImpl.cpp:
    (PAL::WebGPU::PresentationContextImpl::~PresentationContextImpl):
    (PAL::WebGPU::PresentationContextImpl::configure):
    (PAL::WebGPU::PresentationContextImpl::unconfigure):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUPresentationContextImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp:
    (PAL::WebGPU::QueueImpl::QueueImpl):
    (PAL::WebGPU::QueueImpl::~QueueImpl):
    (PAL::WebGPU::QueueImpl::submit):
    (PAL::WebGPU::QueueImpl::onSubmittedWorkDone):
    (PAL::WebGPU::QueueImpl::writeBuffer):
    (PAL::WebGPU::QueueImpl::writeTexture):
    (PAL::WebGPU::QueueImpl::setLabelInternal):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainWrapper.cpp: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceHolderImpl.cpp.
    (PAL::WebGPU::SwapChainWrapper::SwapChainWrapper):
    (PAL::WebGPU::SwapChainWrapper::~SwapChainWrapper):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainWrapper.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceHolderImpl.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUTextureImpl.cpp:
    (PAL::WebGPU::TextureImpl::TextureImpl):
    (PAL::WebGPU::TextureImpl::~TextureImpl):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUTextureImpl.h:
    
    Canonical link: https://commits.webkit.org/259867@main
    litherum committed Feb 5, 2023
  2. [WebGPU] getBindGroupLayout() is actually supposed to have "create" s…

    …emantics
    
    https://bugs.webkit.org/show_bug.cgi?id=251732
    rdar://105030025
    
    Reviewed by Dean Jackson.
    
    This is a partial revert of 259609@main. You would think that, because the name of "getBindGroupLayout()"
    starts with the word "get," that it would have "get" semantics. However, the spec actually explicitly
    describes that it has "create" semantics. This patch updates the implementation to have those semantics.
    
    The spec specifically says "A new GPUBindGroupLayout wrapper is returned each time."
    
    gpuweb/gpuweb#3804 is a PR to the spec to rename the functions, to be more clear
    about their behavior.
    
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUComputePipelineImpl.cpp:
    (PAL::WebGPU::ComputePipelineImpl::getBindGroupLayout):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUComputePipelineImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderPipelineImpl.cpp:
    (PAL::WebGPU::RenderPipelineImpl::getBindGroupLayout):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderPipelineImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePipeline.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPipeline.h:
    * Source/WebGPU/WebGPU/APIConversions.h:
    (WebGPU::releaseToAPI):
    * Source/WebGPU/WebGPU/ComputePipeline.h:
    * Source/WebGPU/WebGPU/ComputePipeline.mm:
    (WebGPU::ComputePipeline::getBindGroupLayout):
    (wgpuComputePipelineGetBindGroupLayout):
    * Source/WebGPU/WebGPU/RenderPipeline.h:
    * Source/WebGPU/WebGPU/RenderPipeline.mm:
    (WebGPU::RenderPipeline::getBindGroupLayout):
    (wgpuRenderPipelineGetBindGroupLayout):
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePipeline.cpp:
    (WebKit::RemoteComputePipeline::getBindGroupLayout):
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPipeline.cpp:
    (WebKit::RemoteRenderPipeline::getBindGroupLayout):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp:
    (WebKit::WebGPU::RemoteComputePipelineProxy::getBindGroupLayout):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp:
    (WebKit::WebGPU::RemoteRenderPipelineProxy::getBindGroupLayout):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp:
    (WebKit::WebGPU::RemoteShaderModuleProxy::compilationInfo):
    
    Canonical link: https://commits.webkit.org/259866@main
    litherum committed Feb 5, 2023
  3. Stop importing <UIKit/UIDragging.h> when using the Apple internal SDK

    https://bugs.webkit.org/show_bug.cgi?id=251745
    rdar://103142281
    
    Reviewed by Aditya Keerthi.
    
    Stop importing this header; there's nothing in this header that we need anymore, which isn't already
    covered by including `UIDragInteraction.h` or `UIDropInteraction.h`.
    
    * Source/WebKit/Platform/spi/ios/UIKitSPI.h:
    
    Canonical link: https://commits.webkit.org/259865@main
    whsieh committed Feb 5, 2023
  4. Work around ASAN linker issue with currentStackPointer().

    https://bugs.webkit.org/show_bug.cgi?id=251746
    rdar://105047685
    
    Reviewed by Alex Christensen.
    
    For unknown reasons, the linker is not able to see exported inline asm functions
    for ASAN builds.  As a work around, we'll use the generic currentStackPointer()
    when ASAN_ENABLED.
    
    * Source/WTF/wtf/StackPointer.h:
    
    Canonical link: https://commits.webkit.org/259864@main
    Mark Lam committed Feb 5, 2023
  5. [IFC] Use computed LineBox geometry in InlineDisplayLineBuilder::build

    https://bugs.webkit.org/show_bug.cgi?id=251342
    
    Reviewed by Antti Koivisto.
    
    We already compute these (logical top/left/width) values for LineBox. Let's not compute them again.
    This is also in preparation for fixing webkit.org/b/251313.
    
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
    (WebCore::Layout::InlineDisplayLineBuilder::build const):
    
    Canonical link: https://commits.webkit.org/259863@main
    alanbaradlay committed Feb 5, 2023
  6. [Filters] Generate serializers for Filter and FilterEffects

    https://bugs.webkit.org/show_bug.cgi?id=250220
    rdar://103960558
    
    Reviewed by Alex Christensen.
    
    Also remove FilterReference and replace it with Ref<Filter> and move the superclass
    coders to WebCoreArgumentCoders.
    
    * Source/WebCore/Headers.cmake:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    * Source/WebCore/platform/graphics/filters/DistantLightSource.h:
    (WebCore::DistantLightSource::encode const): Deleted.
    (WebCore::DistantLightSource::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEBlend.h:
    (WebCore::FEBlend::encode const): Deleted.
    (WebCore::FEBlend::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEColorMatrix.h:
    (WebCore::FEColorMatrix::encode const): Deleted.
    (WebCore::FEColorMatrix::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEComponentTransfer.h:
    (WebCore::ComponentTransferFunction::encode const): Deleted.
    (WebCore::ComponentTransferFunction::decode): Deleted.
    (WebCore::FEComponentTransfer::encode const): Deleted.
    (WebCore::FEComponentTransfer::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEComposite.h:
    (WebCore::FEComposite::encode const): Deleted.
    (WebCore::FEComposite::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h:
    (WebCore::FEConvolveMatrix::encode const): Deleted.
    (WebCore::FEConvolveMatrix::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEDiffuseLighting.cpp:
    * Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h:
    (WebCore::FEDiffuseLighting::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEDisplacementMap.h:
    (WebCore::FEDisplacementMap::encode const): Deleted.
    (WebCore::FEDisplacementMap::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEDropShadow.h:
    (WebCore::FEDropShadow::encode const): Deleted.
    (WebCore::FEDropShadow::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEFlood.h:
    (WebCore::FEFlood::encode const): Deleted.
    (WebCore::FEFlood::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEGaussianBlur.h:
    (WebCore::FEGaussianBlur::encode const): Deleted.
    (WebCore::FEGaussianBlur::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEImage.h:
    (WebCore::FEImage::encode const): Deleted.
    (WebCore::FEImage::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FELighting.h:
    (WebCore::FELighting::lightSource const):
    (WebCore::FELighting::encode const): Deleted.
    (WebCore::FELighting::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEMerge.h:
    (WebCore::FEMerge::encode const): Deleted.
    (WebCore::FEMerge::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEMorphology.h:
    (WebCore::FEMorphology::encode const): Deleted.
    (WebCore::FEMorphology::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FEOffset.h:
    (WebCore::FEOffset::encode const): Deleted.
    (WebCore::FEOffset::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FESpecularLighting.cpp:
    * Source/WebCore/platform/graphics/filters/FESpecularLighting.h:
    (WebCore::FESpecularLighting::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/FETurbulence.h:
    (WebCore::FETurbulence::encode const): Deleted.
    (WebCore::FETurbulence::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/Filter.h:
    (isType):
    * Source/WebCore/platform/graphics/filters/PointLightSource.h:
    (WebCore::PointLightSource::encode const): Deleted.
    (WebCore::PointLightSource::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/SpotLightSource.h:
    (WebCore::SpotLightSource::encode const): Deleted.
    (WebCore::SpotLightSource::decode): Deleted.
    * Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.cpp:
    (WebCore::FELightingSoftwareApplier::apply const):
    * Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp:
    (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
    * Source/WebCore/svg/SVGFESpecularLightingElement.cpp:
    (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
    * Source/WebCore/svg/graphics/filters/SVGFilterExpression.h:
    * Source/WebCore/svg/graphics/filters/SVGFilterExpressionReference.h: Copied from Source/WebCore/svg/graphics/filters/SVGFilterExpression.h.
    (WebCore::SVGFilterExpressionNode::encode const):
    (WebCore::SVGFilterExpressionNode::decode):
    * Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
    (WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):
    * Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
    * Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
    * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
    (WebKit::RemoteRenderingBackend::getFilteredImageForImageBuffer):
    * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h:
    * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in:
    * Source/WebKit/Platform/IPC/FilterReference.h: Removed.
    * Source/WebKit/Scripts/webkit/messages.py:
    (types_that_cannot_be_forward_declared):
    * Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
    (IPC::ArgumentCoder<LightSource>::encode):
    (IPC::ArgumentCoder<LightSource>::decode):
    (IPC::ArgumentCoder<FilterFunction>::encode):
    (IPC::ArgumentCoder<FilterFunction>::decode):
    (IPC::ArgumentCoder<FilterEffect>::encode):
    (IPC::ArgumentCoder<FilterEffect>::decode):
    (IPC::ArgumentCoder<CSSFilter>::encode):
    (IPC::ArgumentCoder<CSSFilter>::decode):
    (IPC::ArgumentCoder<SVGFilter>::encode):
    (IPC::ArgumentCoder<SVGFilter>::decode):
    (IPC::ArgumentCoder<Filter>::encode):
    (IPC::ArgumentCoder<Filter>::decode):
    * Source/WebKit/Shared/WebCoreArgumentCoders.h:
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    * Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
    (WebKit::RemoteDisplayListRecorderProxy::recordDrawFilteredImageBuffer):
    * Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
    (WebKit::RemoteRenderingBackendProxy::getFilteredImage):
    
    Canonical link: https://commits.webkit.org/259862@main
    shallawa authored and Said Abou-Hallawa committed Feb 5, 2023
  7. DisplayList::ItemBuffer wastes a lot of vector capacity

    https://bugs.webkit.org/show_bug.cgi?id=251700
    <rdar://problem/105011333>
    
    Reviewed by Wenson Hsieh.
    
    The Vector<ItemBufferHandle, 2> ItemBuffer::m_readOnlyBuffers gets allocated for every GlyphDisplayListCache
    entry, but is never used there. It's also very rarely used with GPU process rendering (I never saw use of
    m_readOnlyBuffers running MotionMark), so give it default capacity 0, and capacity 2 when it does get allocated.
    
    * Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.h:
    
    Canonical link: https://commits.webkit.org/259861@main
    smfr committed Feb 5, 2023

Commits on Feb 4, 2023

  1. Unreviewed, reverting r259856@main.

    https://bugs.webkit.org/show_bug.cgi?id=251743
    
    Caused test crashes on debug bots
    
    Reverted changeset:
    
    "Move implicit mapping out of CSSPrimitiveValue"
    https://bugs.webkit.org/show_bug.cgi?id=251567
    https://commits.webkit.org/259856@main
    
    Canonical link: https://commits.webkit.org/259860@main
    webkit-commit-queue authored and smfr committed Feb 4, 2023
  2. Add allowsFirstPartyForCookies in WebSharedWorkerServerConnection::re…

    …questSharedWorker
    
    https://bugs.webkit.org/show_bug.cgi?id=251720
    rdar://105018668
    
    Reviewed by Alex Christensen.
    
    We need to add allowsFirstPartyForCookies when requesting shared worker
    so that a compromised web process doesn't access cookies its not
    supposed to.
    
    * Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.cpp:
    (WebKit::WebSharedWorkerServerConnection::requestSharedWorker):
    
    Canonical link: https://commits.webkit.org/259859@main
    chirags27 committed Feb 4, 2023
  3. Reduce sizeof(FetchOptions)

    https://bugs.webkit.org/show_bug.cgi?id=251734
    
    Reviewed by Youenn Fablet.
    
    Remove std::optional padding and the ProcessIdentifier part of
    the ScriptExecutionContextIdentifiers stored in FetchOptions.
    The ProcessIdentifiers were only used in WebSWServerConnection::controlClient
    and we can pass in the ProcessIdentifier of the process that
    caused the load to happen.
    
    * Source/WebCore/loader/DocumentLoader.cpp:
    (WebCore::DocumentLoader::loadMainResource):
    * Source/WebCore/loader/FetchOptions.h:
    (WebCore::FetchOptions::FetchOptions):
    * Source/WebCore/loader/WorkerThreadableLoader.cpp:
    (WebCore::m_contextIdentifier):
    * Source/WebCore/loader/cache/CachedResourceRequest.cpp:
    (WebCore::CachedResourceRequest::setClientIdentifierIfNeeded):
    * Source/WebCore/workers/WorkerScriptLoader.cpp:
    (WebCore::WorkerScriptLoader::loadAsynchronously):
    * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
    (WebKit::NetworkResourceLoader::transferToNewWebProcess):
    * Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
    (WebKit::WebSWServerConnection::controlClient):
    (WebKit::WebSWServerConnection::createFetchTask):
    (WebKit::WebSWServerConnection::transferServiceWorkerLoadToNewWebProcess):
    * Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h:
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    * Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:
    (WebKit::WebSWClientConnection::setServiceWorkerClientIsControlled):
    
    Canonical link: https://commits.webkit.org/259858@main
    Alex Christensen authored and achristensen07 committed Feb 4, 2023
  4. REGRESSION (iOS 16): sina.cn: Find on Page highlights obscure the tex…

    …t behind them
    
    https://bugs.webkit.org/show_bug.cgi?id=251707
    rdar://102302792
    
    Reviewed by Wenson Hsieh.
    
    sina.cn contains elements with "-webkit-user-select: none". Prior to iOS 16,
    any text found within these elements would count towards the number of results,
    but would not be highlighted.
    
    Find-in-page logic was refactored in iOS 16 to support UIKit's new Find & Replace
    API. As part of these changes, find-in-page began storing/restoring ranges, rather
    than simply updating selection. Consequently, the `TextIndicator` used to draw
    highlights is created from a `SimpleRange`, rather than the current selection.
    The previously used constructor would early return if the selection was empty
    (as is the case when attempting to select a "-webkit-user-select: none" element),
    resulting the the pre-iOS 16 behavior described above.
    
    `TextIndicator` does not know how to take snapshots of "-webkit-user-select: none"
    content. Consequently, the highlight is painted without any text, leading to
    found text getting obscured.
    
    For now, restore the pre-iOS 16 behavior, and do not draw highlights if the
    selection is empty. In the longer term, `TextIndicator` should be taught to
    draw this content (tracked in webkit.org/b/251709). Note that following this
    change, there is still a net progression over pre-iOS 16 behavior, where
    WebKit will indicate found results with "-webkit-user-select: none" by drawing
    "holes".
    
    * Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
    (WebKit::WebFoundTextRangeController::drawRect):
    
    Additionally, move the use of `GraphicsContext` closer to the painting logic to
    avoid running unnecessary code.
    
    Canonical link: https://commits.webkit.org/259857@main
    pxlcoder committed Feb 4, 2023
  5. Move implicit mapping out of CSSPrimitiveValue

    https://bugs.webkit.org/show_bug.cgi?id=251567
    rdar://104946191
    
    Reviewed by Tim Nguyen.
    
    Our automatically generated style building code depends on implicitly
    converting CSSValue objects to various destination types. That was done
    by a conversion operator in CSSPrimitiveValue, but it's better if the
    conversion operator is separate, so the conversion can't be done by
    accident in normal uses of CSSPrimitiveValue. At the very least, such
    unintentional conversions can lead to confusing compiler errors.
    
    * Source/WebCore/css/CSSFontFace.cpp:
    (WebCore::CSSFontFace::setDisplay): Use fromCSSValue.
    
    * Source/WebCore/css/CSSPrimitiveValue.h: Deleted all the conversion
    operators, including the ones for numeric types, and the template.
    
    * Source/WebCore/css/CSSPrimitiveValueMappings.h:
    (WebCore::fromCSSValue): Added.
    (WebCore::TypeDeducingCSSValueMapper::TypeDeducingCSSValueMapper): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator TargetType const): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator const CSSPrimitiveValue& const): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator unsigned short const): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator int const): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator unsigned const): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator float const): Added.
    (WebCore::TypeDeducingCSSValueMapper::operator double const): Added.
    (WebCore::TypeDeducingCSSValueMapper::numericValue const): Added.
    (WebCore::fromCSSValueDeducingType): Added.
    (WebCore::fromCSSValue): Replaced CSSPrimitiveValue specialization for LineClampValue with
    fromCSSValue specialization.
    (WebCore::CSSPrimitiveValue::operator ColumnSpan const): Deleted. This was not needed because we
    no longer allow a number for column-span; when we removed support in the parser we missed this.
    (WebCore::fromCSSValueID): Remove unneeded specializations for OptionSet<HangingPunctuation>,
    OptionSet<TextDecorationLine>, and OptionSet<TouchAction>, using
    DEFINE_TO_FROM_CSS_VALUE_ID_FUNCTIONS instead.
    
    * Source/WebCore/css/CSSToStyleMap.cpp:
    (WebCore::CSSToStyleMap::mapFillClip): Use fromCSSValue.
    (WebCore::CSSToStyleMap::mapFillComposite): Ditto.
    (WebCore::CSSToStyleMap::mapFillBlendMode): Ditto.
    (WebCore::CSSToStyleMap::mapFillOrigin): Ditto.
    (WebCore::CSSToStyleMap::mapFillXPosition): Ditto.
    (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
    
    * Source/WebCore/css/parser/CSSPropertyParserHelpers.h: Updated since the underlying
    type for BoxOrient is bool instead of uint8_t.
    
    * Source/WebCore/css/process-css-properties.py:
    (GenerationContext.generate_heading): Tweak comment.
    (GenerateCSSPropertyNames): Use fromCSSValueDeducingType.
    
    * Source/WebCore/editing/ios/EditorIOS.mm:
    (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection): Use propertyAsValueID,
    CSSValueID, and nameString.
    
    * Source/WebCore/html/HTMLTextFormControlElement.cpp:
    (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const): Use propertyAsValueID
    and fromCSSValueID.
    
    * Source/WebCore/rendering/style/RenderStyleConstants.cpp:
    (WebCore::operator<<): Removed support for HangingPunctuation::None.
    
    * Source/WebCore/rendering/style/RenderStyleConstants.h: Converted all two-value enumerations
    to be based on bool instead of uint8_t. Removed HangingPunctuation::None.
    
    * Source/WebCore/style/StyleBuilderConverter.h:
    (WebCore::Style::BuilderConverter::convertTextDecorationLine): Use fromCSSValue.
    (WebCore::Style::BuilderConverter::convertTextAlign): Ditto.
    (WebCore::Style::BuilderConverter::convertTextAlignLast): Ditto.
    (WebCore::Style::BuilderConverter::convertPathOperation): Ditto.
    (WebCore::Style::BuilderConverter::convertResize): Ditto.
    (WebCore::Style::BuilderConverter::convertTextUnderlinePosition): Ditto.
    (WebCore::Style::BuilderConverter::convertReflection): Ditto.
    (WebCore::Style::BuilderConverter::convertShapeValue): Ditto.
    (WebCore::Style::BuilderConverter::convertScrollSnapType): Ditto.
    (WebCore::Style::BuilderConverter::convertScrollSnapAlign): Ditto.
    (WebCore::Style::BuilderConverter::convertScrollSnapStop): Ditto.
    (WebCore::Style::BuilderConverter::convertTouchAction): Ditto.
    (WebCore::Style::BuilderConverter::convertSelfOrDefaultAlignmentData): Ditto.
    (WebCore::Style::BuilderConverter::convertSpeakAs): Ditto.
    (WebCore::Style::BuilderConverter::convertHangingPunctuation): Ditto.
    
    * Source/WebCore/style/StyleBuilderCustom.h:
    (WebCore::Style::BuilderCustom::applyValueDirection): Ditto.
    (WebCore::Style::BuilderCustom::applyValueVerticalAlign): Ditto.
    (WebCore::Style::BuilderCustom::applyValueListStyleType): Ditto.
    (WebCore::Style::BuilderCustom::applyValueOutlineStyle): Ditto.
    (WebCore::Style::BuilderCustom::applyValueWritingMode): Ditto.
    (WebCore::Style::BuilderCustom::applyValueTextOrientation): Ditto.
    (WebCore::Style::BuilderCustom::applyValueDisplay): Ditto.
    (WebCore::Style::BuilderCustom::applyValueTextEmphasisStyle): Ditto.
    (WebCore::Style::BuilderCustom::applyValueCursor): Ditto.
    
    * Source/WebCore/svg/SVGElement.cpp:
    (WebCore::SVGElement::colorInterpolation const): Ditto.
    
    Canonical link: https://commits.webkit.org/259856@main
    darinadler committed Feb 4, 2023
  6. Ensure WebFullScreenManager is removed as EventListener when page closes

    https://bugs.webkit.org/show_bug.cgi?id=251566
    rdar://103823114
    
    Reviewed by Youenn Fablet.
    
    When the page close, break the cycles with WebFullScreenManager and ensure
    WebFullScreenManager is no longer registered as event listener.
    
    * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
    (WebKit::WebFullScreenManager::~WebFullScreenManager):
    (WebKit::WebFullScreenManager::invalidate):
    (WebKit::WebFullScreenManager::element):
    * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h:
    * Source/WebKit/WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::close):
    
    Canonical link: https://commits.webkit.org/259855@main
    jyavenard committed Feb 4, 2023
  7. [WebGPU] indirect-first-instance feature is unimplemented

    https://bugs.webkit.org/show_bug.cgi?id=251665
    <radar://104992912>
    
    Reviewed by Myles C. Maxfield.
    
    The API supports this, but we didn't return the feature
    as supported.
    
    * Source/WebGPU/WebGPU/HardwareCapabilities.mm:
    (WebGPU::baseFeatures):
    
    Canonical link: https://commits.webkit.org/259854@main
    mwyrzykowski committed Feb 4, 2023
  8. [GTK][WPE] Expose webkit_web_context_get_network_session_for_automati…

    …on() in new API
    
    https://bugs.webkit.org/show_bug.cgi?id=251682
    
    Reviewed by Michael Catanzaro.
    
    It's currently private. Applications code is simpler if they can access
    the automation network session.
    
    * Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp:
    (webkitAutomationSessionCreate):
    * Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:
    (webkit_web_context_get_network_session_for_automation):
    (webkitWebContextGetNetworkSessionForAutomation): Deleted.
    * Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in:
    * Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h:
    * Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:
    (webkitWebViewConstructed):
    * Tools/MiniBrowser/gtk/BrowserWindow.c:
    (browser_window_new):
    * Tools/MiniBrowser/gtk/main.c:
    (activate):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
    
    Canonical link: https://commits.webkit.org/259853@main
    carlosgcampos committed Feb 4, 2023
  9. [GTK][WPE] Add new JavaScript execution APIs

    https://bugs.webkit.org/show_bug.cgi?id=241420
    
    Reviewed by Adrian Perez de Castro and Michael Catanzaro.
    
    Add webkit_web_view_evaluate_javascript() and
    webkit_web_view_call_async_javascript_function() and deprecate all other
    JavaScript execution funtions. The new functions add a length parameter
    to allow running code containing null characters and the source URI that
    is shown in exception messages.
    
    * Source/WebKit/UIProcess/API/glib/WebKitError.h.in:
    * Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:
    (webkitWebViewRunJavaScriptWithParams):
    (webkitWebViewRunJavascriptWithoutForcedUserGestures):
    (webkit_web_view_evaluate_javascript):
    (webkit_web_view_evaluate_javascript_finish):
    (parseAsyncFunctionArguments):
    (webkit_web_view_call_async_javascript_function):
    (webkit_web_view_call_async_javascript_function_finish):
    (webkit_web_view_run_javascript):
    (webkit_web_view_run_javascript_in_world):
    (webkit_web_view_run_async_javascript_function_in_world):
    (resourcesStreamReadCallback):
    * Source/WebKit/UIProcess/API/glib/WebKitWebView.h.in:
    * Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
    (WebKit::RemoteInspectorProtocolHandler::updateTargetList):
    * Tools/MiniBrowser/gtk/BrowserTab.c:
    (browser_tab_load_uri):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestBackForwardList.cpp:
    (testWebKitWebViewSessionStateWithFormData):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:
    (testWebViewSyncRequestOnMaxConns):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:
    (WebSocketTest::connectToServerAndWaitForEvents):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
    (FormSubmissionTest::runJavaScriptAndWaitUntilFormSubmitted):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
    (isStyleSheetInjectedForURLAtPath):
    (isScriptInjectedForURLAtPath):
    (UserScriptMessageTest::postMessageAndWaitUntilReceived):
    (UserScriptMessageTest::runAsyncJavaScriptFinished):
    (UserScriptMessageTest::postMessageAndWaitForPromiseResolved):
    (testUserContentManagerScriptMessageInWorldReceived):
    (testUserContentManagerScriptMessageWithReplyReceived):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
    (ProxyTest::createWebSocketAndWaitUntilConnected):
    * Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
    (testWebViewRunJavaScript):
    * Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
    (runJavaScriptReadyCallback):
    (runAsyncJavaScriptFunctionInWorldReadyCallback):
    (WebViewTest::runJavaScriptAndWaitUntilFinished):
    (WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished):
    (WebViewTest::runJavaScriptInWorldAndWaitUntilFinished):
    (WebViewTest::runAsyncJavaScriptFunctionInWorldAndWaitUntilFinished):
    (WebViewTest::runJavaScriptWithoutForcedUserGesturesAndWaitUntilFinished):
    (WebViewTest::runJavaScriptAndWait):
    (runJavaScriptFromGResourceReadyCallback): Deleted.
    (runJavaScriptInWorldReadyCallback): Deleted.
    * Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
    
    Canonical link: https://commits.webkit.org/259852@main
    carlosgcampos committed Feb 4, 2023
  10. Disable use of __uint128_t on arm64_32 builds

    https://bugs.webkit.org/show_bug.cgi?id=251546
    
    Reviewed by Yusuke Suzuki.
    
    This works around rdar://104929594 to prevent future issues like rdar://104223231.
    
    * Source/WTF/wtf/PlatformHave.h:
    
    Canonical link: https://commits.webkit.org/259851@main
    Alex Christensen authored and achristensen07 committed Feb 4, 2023
  11. [RTL/bidi/vertical] Incorrect content truncation when "text-overflow"…

    … is "ellipsis"
    
    https://bugs.webkit.org/show_bug.cgi?id=251608
    
    Reviewed by Antti Koivisto.
    
    In this patch inline content truncation (overflow: hidden + text-overflow: ellipsis) is moved from logical to visual space.
    It ensures that the truncation happens _after_ bidi reordering and also _after_ applying writing-mode.
    
    Now instead of running truncation as part of the trailing content handling in LineBuilder::close right after we figured the breaking position for
    the inline content, we do it after constructing the display boxes (and the associated display line).
    
    1. Remove truncation code from Line::Run and all the related code all the way to display line construction.
    2. Introduce truncateOverflowingDisplayBoxes. It applies truncation on display box in visual order (the truncation logic is actually moved from Line::Run, nothing really new here).
    
    * LayoutTests/fast/inline/text_overflow_ellipsis_simple-expected.html: Added.
    * LayoutTests/fast/inline/text_overflow_ellipsis_simple.html: Added.
    * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
    (WebCore::Layout::lineEndingEllipsisPolicy):
    (WebCore::Layout::InlineFormattingContext::lineLayout):
    (WebCore::Layout::InlineFormattingContext::createDisplayContentForLine):
    * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
    * Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
    (WebCore::Layout::Line::initialize):
    (WebCore::Layout::Line::Run::detachTrailingWhitespace):
    (WebCore::Layout::Line::truncate): Deleted.
    (WebCore::Layout::Line::Run::truncate): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
    (WebCore::Layout::Line::isContentTruncated const): Deleted.
    (WebCore::Layout::Line::Run::isTruncated const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
    (WebCore::Layout::LineBuilder::layoutInlineContent):
    (WebCore::Layout::LineBuilder::computedIntrinsicWidth):
    (WebCore::Layout::LineBuilder::close):
    * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
    (WebCore::InlineDisplay::Box::Text::setPartiallyVisibleContentLength):
    (WebCore::InlineDisplay::Box::Box):
    (WebCore::InlineDisplay::Box::setLeft):
    (WebCore::InlineDisplay::Box::setIsFullyTruncated):
    (WebCore::InlineDisplay::Box::Text::Text):
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
    (WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
    (WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
    (WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
    (WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
    (WebCore::Layout::InlineDisplayContentBuilder::rootStyle const):
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h:
    (WebCore::InlineDisplay::Line::setEllipsisVisualRect):
    (WebCore::InlineDisplay::Line::Line):
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
    (WebCore::Layout::flipLogicalLineRectToVisualForWritingMode):
    (WebCore::Layout::InlineDisplayLineBuilder::build const):
    (WebCore::Layout::truncateOverflowingDisplayBoxes):
    (WebCore::Layout::InlineDisplayLineBuilder::trailingEllipsisVisualRect):
    (WebCore::Layout::InlineDisplayLineBuilder::trailingEllipsisRect const): Deleted.
    (WebCore::Layout::InlineDisplayLineBuilder::flipLogicalLineRectToVisualForWritingMode const): Deleted.
    * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h:
    
    Canonical link: https://commits.webkit.org/259850@main
    alanbaradlay committed Feb 4, 2023
  12. [ macOS ] webaudio/AudioBuffer/huge-buffer.html is a flaky time out

    https://bugs.webkit.org/show_bug.cgi?id=251710
    rdar://105028032
    
    Unreviewed test gardening.
    
    * LayoutTests/platform/mac-wk1/TestExpectations:
    * LayoutTests/platform/mac/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259849@main
    btashawn committed Feb 4, 2023
  13. [run-webkit-tests] Handle diverse WatchOS device types

    https://bugs.webkit.org/show_bug.cgi?id=251723
    rdar://105021853
    
    Reviewed by Ryan Haddad.
    
    * Tools/Scripts/webkitpy/xcode/device_type.py:
    (DeviceType.standardize_hardware_type): Refactor to allow invocation without a class instance,
    add a check for WatchOS variants.
    (DeviceType.standardized_hardware_type): Invoke refactored function
    * Tools/Scripts/webkitpy/xcode/device_type_unittest.py:
    (DeviceTypeTest.test_watch_standardization):
    * Tools/Scripts/webkitpy/xcode/simulated_device.py:
    (SimulatedDeviceManager._get_device_identifier_for_type): Invoke DeviceType.standardize_hardware_type
    instead of re-implimenting the function.
    
    Canonical link: https://commits.webkit.org/259848@main
    JonWBedard committed Feb 4, 2023
  14. Add timezone version reporting to configure step in test runs

    https://bugs.webkit.org/show_bug.cgi?id=251556
    rdar://problem/104437369
    
    Reviewed by Jonathan Bedard.
    
    This is to add the timezone database version to our configure logs so we could easily track regressions based on timezone changes.
    
    * Tools/CISupport/build-webkit-org/steps.py:
    (PrintConfiguration):
    * Tools/CISupport/build-webkit-org/steps_unittest.py:
    * Tools/CISupport/ews-build/steps.py:
    (PrintConfiguration):
    * Tools/CISupport/ews-build/steps_unittest.py:
    
    Canonical link: https://commits.webkit.org/259847@main
    robert-jenner committed Feb 4, 2023
  15. Unreviewed, Fix ASSERTION FAILED: mode == ManualOperandSpeculation ||…

    … edge.useKind() == HeapBigIntUse
    
    https://bugs.webkit.org/show_bug.cgi?id=251722
    rdar://105021476
    
    Since it is now KnownCellUse, use lowCell.
    
    * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
    (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
    
    Canonical link: https://commits.webkit.org/259846@main
    Constellation committed Feb 4, 2023

Commits on Feb 3, 2023

  1. [WPE] Gardening accessibility/custom-elements/table.html

    Unreviewed test gardening.
    
    * LayoutTests/accessibility/custom-elements/table.html:
    *
    LayoutTests/platform/glib/accessibility/custom-elements/table-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/custom-elements/table-expected.txt.
    
    Canonical link: https://commits.webkit.org/259845@main
    obyknovenius authored and aperezdc committed Feb 3, 2023
  2. [WebGPU] forceFallbackAdapter CTS test fails (251629)

    https://bugs.webkit.org/show_bug.cgi?id=251629
    <radar://104976449>
    
    Reviewed by Myles C. Maxfield.
    
    The spec says to return nullptr from requestAdapter if the
    forceFallback adapter is not supported.
    
    Now we get 0 failures (3 skips, 6 passes), on the requestAdapter
    CTS tests.
    
    * Source/WebCore/Modules/WebGPU/GPU.cpp:
    (WebCore::GPU::requestAdapter):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
    (PAL::WebGPU::GPUImpl::requestAdapter):
    * Source/WebGPU/WebGPU/Adapter.mm:
    (WebGPU::Adapter::requestDevice):
    * Source/WebGPU/WebGPU/Instance.mm:
    (WebGPU::Instance::requestAdapter):
    (wgpuInstanceRequestAdapter):
    (wgpuInstanceRequestAdapterWithBlock):
    
    Canonical link: https://commits.webkit.org/259844@main
    mwyrzykowski committed Feb 3, 2023
  3. [GLIB] Gardening css3/filters/effect-* after 254408@main

    Unreviewed test gardening.
    
    `css3/filters/effect-*` are now reference tests.
    
    * LayoutTests/css3/filters/effect-blur-hw.html:
    * LayoutTests/css3/filters/effect-opacity-hw.html:
    * LayoutTests/platform/glib/css3/filters/effect-combined-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-combined-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-contrast-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-contrast-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-grayscale-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-grayscale-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-hue-rotate-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-hue-rotate-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-invert-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-invert-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-opacity-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-opacity-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-saturate-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-saturate-hw-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-sepia-expected.txt: Removed.
    * LayoutTests/platform/glib/css3/filters/effect-sepia-hw-expected.txt: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-blur-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-blur-expected.txt: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-blur-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-blur-hw-expected.txt: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-combined-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-combined-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-contrast-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-contrast-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-grayscale-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-grayscale-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-hue-rotate-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-hue-rotate-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-invert-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-invert-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-opacity-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-opacity-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-saturate-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-saturate-hw-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-sepia-expected.png: Removed.
    * LayoutTests/platform/gtk/css3/filters/effect-sepia-hw-expected.png: Removed.
    * LayoutTests/platform/wpe/css3/filters/effect-blur-expected.txt: Removed.
    * LayoutTests/platform/wpe/css3/filters/effect-blur-hw-expected.txt: Removed.
    * LayoutTests/platform/wpe/css3/filters/effect-brightness-expected.txt: Removed.
    * LayoutTests/platform/wpe/css3/filters/effect-brightness-hw-expected.txt: Removed.
    * LayoutTests/platform/wpe/css3/filters/effect-drop-shadow-expected.txt: Removed.
    * LayoutTests/platform/wpe/css3/filters/effect-drop-shadow-hw-expected.txt: Removed.
    
    Canonical link: https://commits.webkit.org/259843@main
    obyknovenius authored and aperezdc committed Feb 3, 2023
  4. [WPE] Switch to use always complex text code path

    https://bugs.webkit.org/show_bug.cgi?id=251579
    
    Reviewed by Carlos Garcia Campos.
    
    It's been a default on GTK since `https://commits.webkit.org/200076@main`.
    It fixes a lot of WPE tests and lets us reuse already existing baselines
    for passing GTK tests.
    
    Canonical link: https://commits.webkit.org/259842@main
    obyknovenius authored and aperezdc committed Feb 3, 2023
  5. Ref document in Document::postTask() lambda to make sure it stays ali…

    …ve during the task execution
    
    https://bugs.webkit.org/show_bug.cgi?id=251695
    
    Reviewed by Ryosuke Niwa.
    
    * Source/WebCore/dom/Document.cpp:
    (WebCore::Document::postTask):
    (WebCore::Document::pendingTasksTimerFired):
    
    Canonical link: https://commits.webkit.org/259841@main
    cdumez committed Feb 3, 2023
  6. Web Inspector: inspectable API doesn't have a correct Objective-C g…

    …etter
    
    https://bugs.webkit.org/show_bug.cgi?id=251702
    rdar://105012093
    
    Reviewed by Tim Horton.
    
    Boolean getters should have an `is` prefix. Currently `inspectable` is not adhering to this rule. The current getter
    also doesn't match the approved API design. This API has not yet shipped, and there is no internal usage of
    `[webView inspectable]`, so this change will not break existing clients. `webView.inspectable` remains correct and
    unchanged.
    
    * Source/JavaScriptCore/API/JSContext.h:
    * Source/JavaScriptCore/API/JSContext.mm:
    (-[JSContext isInspectable]):
    (-[JSContext inspectable]): Deleted.
    * Source/WebKit/UIProcess/API/Cocoa/WKWebView.h:
    * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
    (-[WKWebView isInspectable]):
    (-[WKWebView inspectable]): Deleted.
    
    Canonical link: https://commits.webkit.org/259840@main
    patrickangle committed Feb 3, 2023
  7. Fix variable liveness for try catch in DFG

    https://bugs.webkit.org/show_bug.cgi?id=239758
    rdar://92654142
    
    Reviewed by Yusuke Suzuki.
    
    There is no successor and predecessor relationship between try and catch
    block in DFG, in other words node flags cannot be passed from catch block
    to its `predecessors`. If a variable defined outside the try catch block
    but only be used in the catch block, then our compiler would mis-analyze
    the liveness of the varible w.r.t the catch block. Therefore,
    `LiveCatchVariablePreservationPhase` should be to performed before backwards propagation.
    
    * JSTests/stress/try-catch-backwards-propagation.js: Added.
    (throwFunction):
    (foo1):
    (foo2):
    (foo3):
    (foo4):
    (foo5):
    (foo6):
    (foo7):
    (foo8):
    (foo9):
    (foo10):
    (foo11):
    (foo12):
    (opt):
    * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
    (JSC::DFG::ByteCodeParser::parse):
    * Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp:
    (JSC::DFG::LiveCatchVariablePreservationPhase::LiveCatchVariablePreservationPhase):
    (JSC::DFG::LiveCatchVariablePreservationPhase::handleBlockForTryCatch):
    (JSC::DFG::performLiveCatchVariablePreservationPhase):
    * Source/JavaScriptCore/dfg/DFGPlan.cpp:
    (JSC::DFG::Plan::compileInThreadImpl):
    
    Canonical link: https://commits.webkit.org/259839@main
    Yijia Huang committed Feb 3, 2023
  8. [web-animations] clean up the keyframe recomputation code on style ch…

    …ange
    
    https://bugs.webkit.org/show_bug.cgi?id=251674
    
    Reviewed by Antti Koivisto.
    
    We landed a fair few changes recently to recompute keyframes when style changes while animations are
    active. The ever-increasing list of parameters passed to Style::Resolver::keyframeStylesForAnimation()
    as well as the ever-growing list of change checks made in KeyframeEffectStack::applyKeyframeEffects()
    could do with some cleaning up.
    
    We add a new KeyframeList::updatePropertiesMetadata() method which takes in a StyleProperties
    and gathers information on the rule's StyleProperties relevant to keyframe recomputation: whether
    "inherit" or "currentcolor" values are set, whether CSS variable values are used, whether a relative
    font-weight value is set. This replaces duplicated logic found in Style::Resolver (in the CSS Animations
    case) and KeyframeEffect (in the JS-originated case) when computing keyframes.
    
    This method is called in Style::Resolver::keyframeStylesForAnimation() and KeyframeEffect::updateBlendingKeyframes().
    This allows us to remove the matching information previously stored on KeyframeEffect.
    
    We move all the logic from KeyframeEffectStack::applyKeyframeEffects() related to checking
    whether some properties change to a new KeyframeEffect::recomputeKeyframesIfNecessary() which
    will query the KeyframeList.
    
    The code is now clearer and any future change to recompute keyframes will no longer require code
    duplication.
    
    Doing this refactor also uncovered a small error in the animation wrapper for text-indent which would
    not check for the RenderStyle::textIndentLine() and RenderStyle::textIndentType() bits to determine
    whether two text-indent were equal. This was likely due to change in the order of functions we use to check
    whether a recomputation is required in the new KeyframeEffect::recomputeKeyframesIfNecessary().
    
    * Source/WebCore/animation/CSSPropertyAnimation.cpp:
    * Source/WebCore/animation/KeyframeEffect.cpp:
    (WebCore::KeyframeEffect::updateBlendingKeyframes):
    (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
    (WebCore::KeyframeEffect::recomputeKeyframesIfNecessary):
    (WebCore::KeyframeEffect::animatesDirectionAwareProperty const): Deleted.
    (WebCore::KeyframeEffect::propertyAffectingKeyframeResolutionDidChange): Deleted.
    (WebCore::KeyframeEffect::hasPropertySetToCurrentColor const): Deleted.
    (WebCore::KeyframeEffect::hasColorSetToCurrentColor const): Deleted.
    * Source/WebCore/animation/KeyframeEffect.h:
    (WebCore::KeyframeEffect::inheritedProperties const): Deleted.
    (WebCore::KeyframeEffect::containsCSSVariableReferences const): Deleted.
    (WebCore::KeyframeEffect::hasExplicitlyInheritedKeyframeProperty const): Deleted.
    (WebCore::KeyframeEffect::hasRelativeFontWeight const): Deleted.
    * Source/WebCore/animation/KeyframeEffectStack.cpp:
    (WebCore::KeyframeEffectStack::applyKeyframeEffects):
    * Source/WebCore/css/CSSKeyframeRule.cpp:
    (WebCore::StyleRuleKeyframe::containsCSSVariableReferences const): Deleted.
    * Source/WebCore/css/CSSKeyframeRule.h:
    * Source/WebCore/rendering/style/KeyframeList.cpp:
    (WebCore::KeyframeList::clear):
    (WebCore::KeyframeList::usesRelativeFontWeight const):
    (WebCore::KeyframeList::hasCSSVariableReferences const):
    (WebCore::KeyframeList::hasColorSetToCurrentColor const):
    (WebCore::KeyframeList::hasPropertySetToCurrentColor const):
    (WebCore::KeyframeList::propertiesSetToInherit const):
    (WebCore::KeyframeList::updatePropertiesMetadata):
    * Source/WebCore/rendering/style/KeyframeList.h:
    * Source/WebCore/style/StyleResolver.cpp:
    (WebCore::Style::Resolver::keyframeStylesForAnimation):
    * Source/WebCore/style/StyleResolver.h:
    
    Canonical link: https://commits.webkit.org/259838@main
    graouts committed Feb 3, 2023
  9. [web-animations] KeyframeEffect::setBlendingKeyframes() should take i…

    …n an rvalue reference
    
    https://bugs.webkit.org/show_bug.cgi?id=251717
    
    Reviewed by Simon Fraser.
    
    This method's purpose is to provide a KeyframeList that KeyframeEffect will take
    ownership of, so it should be an rvalue reference.
    
    * Source/WebCore/animation/KeyframeEffect.cpp:
    (WebCore::KeyframeEffect::copyPropertiesFromSource):
    (WebCore::KeyframeEffect::updateBlendingKeyframes):
    (WebCore::KeyframeEffect::setBlendingKeyframes):
    (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
    (WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes):
    * Source/WebCore/animation/KeyframeEffect.h:
    
    Canonical link: https://commits.webkit.org/259837@main
    graouts committed Feb 3, 2023
  10. SVGLengthValue::fromCSSPrimitiveValue() doesn't have enough context t…

    …o resolve font-relative units
    
    https://bugs.webkit.org/show_bug.cgi?id=204826
    
    Reviewed by Antti Koivisto.
    
    Pass a CSSToLengthConversionData argument to SVGLengthValue::fromCSSPrimitiveValue() such that we
    may call computeLength() on the provided primitive value to resolve font-relative units.
    
    This also changes the behavior of baseline-shift which now accounts for ex units, so
    adjusting the relevant test to include a font to have reliable measurements across platforms
    and a new expected value.
    
    * LayoutTests/imported/w3c/web-platform-tests/svg/painting/parsing/stroke-dasharray-computed-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/strokeDasharray-expected.txt:
    * LayoutTests/svg/css/scientific-numbers-expected.txt:
    * LayoutTests/svg/css/scientific-numbers.html:
    * Source/WebCore/style/StyleBuilderConverter.h:
    (WebCore::Style::BuilderConverter::convertSVGLengthValue):
    * Source/WebCore/style/StyleBuilderCustom.h:
    (WebCore::Style::BuilderCustom::applyValueBaselineShift):
    * Source/WebCore/svg/SVGLengthValue.cpp:
    (WebCore::SVGLengthValue::fromCSSPrimitiveValue):
    * Source/WebCore/svg/SVGLengthValue.h:
    
    Canonical link: https://commits.webkit.org/259836@main
    graouts committed Feb 3, 2023
  11. Move SecItemShim to the Network Process subdirectory

    https://bugs.webkit.org/show_bug.cgi?id=251678
    rdar://105002389
    
    Reviewed by Alex Christensen.
    
    The SecItemShim is only required in the Network Process, so move the
    code out of shared and into the Network Process specific directory.
    
    * Source/WebKit/Shared/mac/SecItemShim.cpp: Removed.
    * Source/WebKit/Shared/mac/SecItemShim.h: Removed.
    * Source/WebKit/SourcesCocoa.txt:
    * Source/WebKit/UIProcess/WebProcessProxy.cpp:
    (WebKit::WebProcessProxy::connectionWillOpen):
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    
    Canonical link: https://commits.webkit.org/259835@main
    gavin-apple committed Feb 3, 2023
  12. ContextMenuTests.SharePopoverDoesNotClearSelection times out in some …

    …versions of macOS
    
    https://bugs.webkit.org/show_bug.cgi?id=251690
    rdar://104987312
    
    Reviewed by Aditya Keerthi.
    
    After some refactoring in system share sheet, `SHKSharingServicePicker` no longer shows a popover if
    it can't find a presenting view, by asking the menu item's `NSMenu` for its `-_presentingView`.
    However, in the case where the menu item is programmatically invoked, the presenting view seems to
    be `nil`, which breaks this API test, since it needs to verify that presenting the share sheet
    popover does not erroneously clear out the active text selection.
    
    To keep this test passing after these recent system changes, we swizzle `-[NSMenu _presentingView]`
    to force the share sheet popover to appear next to the web view.
    
    * Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
    * Tools/TestWebKitAPI/Tests/mac/ContextMenuTests.mm:
    (TestWebKitAPI::TEST):
    
    Canonical link: https://commits.webkit.org/259834@main
    whsieh committed Feb 3, 2023
Older