[webkit-changes] [WebKit/WebKit] 17d4f1: Cherry-pick 3891a934a192. rdar://problem/107153896

Wenson Hsieh noreply at github.com
Wed Oct 25 13:53:15 PDT 2023


  Branch: refs/heads/safari-7615.1.26.10-branch
  Home:   https://github.com/WebKit/WebKit
  Commit: 17d4f1cb4c019037063b1d9d66805f93a0c50b9d
      https://github.com/WebKit/WebKit/commit/17d4f1cb4c019037063b1d9d66805f93a0c50b9d
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h
    M Source/WebKit/GPUProcess/GPUProcess.cpp
    M Source/WebKit/GPUProcess/GPUProcess.h
    M Source/WebKit/GPUProcess/GPUProcess.messages.in
    M Source/WebKit/Shared/GPUProcessConnectionParameters.h
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.h
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.h

  Log Message:
  -----------
  Cherry-pick 3891a934a192. rdar://problem/107153896

    Verify WebGPU is enabled in GPUConnectionToWebProcess::createRemoteGPU
    https://bugs.webkit.org/show_bug.cgi?id=254373
    rdar://107153896

    Reviewed by Myles C. Maxfield, Geoffrey Garen and Chris Dumez.

    Have the GPUConnectionToWebProcess keep a boolean to keep track of whether
    WebGPU is enabled for any Page in that process.  Update the boolean when
    adding or removing a Page.  If we get a message to use the entry point of
    WebGPU and WebGPU is disabled, then terminate the web content process
    from which the message came instead of creating a RemoteGPU.

    * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
    (WebKit::m_webGPUEnabled):
    (WebKit::GPUConnectionToWebProcess::createRemoteGPU):
    (WebKit::m_routingArbitrator): Deleted.
    * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h:
    (WebKit::GPUConnectionToWebProcess::updateWebGPUEnabled):
    * Source/WebKit/GPUProcess/GPUProcess.cpp:
    (WebKit::GPUProcess::updateWebGPUEnabled):
    * Source/WebKit/GPUProcess/GPUProcess.h:
    * Source/WebKit/GPUProcess/GPUProcess.messages.in:
    * Source/WebKit/Shared/GPUProcessConnectionParameters.h:
    (WebKit::GPUProcessConnectionParameters::encode const):
    (WebKit::GPUProcessConnectionParameters::decode):
    * Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:
    (WebKit::GPUProcessProxy::updateWebGPUEnabled):
    * Source/WebKit/UIProcess/GPU/GPUProcessProxy.h:
    * Source/WebKit/UIProcess/WebProcessPool.cpp:
    (WebKit::WebProcessPool::createGPUProcessConnection):
    * Source/WebKit/UIProcess/WebProcessProxy.cpp:
    (WebKit::WebProcessProxy::addExistingWebPage):
    (WebKit::WebProcessProxy::removeWebPage):
    (WebKit::WebProcessProxy::updateWebGPUEnabledStateInGPUProcess):
    * Source/WebKit/UIProcess/WebProcessProxy.h:

    Canonical link: https://commits.webkit.org/259548.478@safari-7615-branch

Identifier: 259548.384 at safari-7615.1.26.10-branch


  Commit: deddb5074e959a9858e9f7ae05b4d31cd4a07b15
      https://github.com/WebKit/WebKit/commit/deddb5074e959a9858e9f7ae05b4d31cd4a07b15
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

  Log Message:
  -----------
  Apply patch. rdar://problem/106142457

    REGRESSION iOS 16.4 beta selects ultra-wide for facingMode: environment
    https://bugs.webkit.org/show_bug.cgi?id=253186
    rdar://problem/106142457

    Reviewed by Jer Noble.

    For ultra wide back cameras, add a zoomn factor of 2 so that a zoom of 1 corresponds to a standard FOV.
    We compute this factor once and we then divide by this factor for capabilities and multiply by this factor for settings.
    Manually tested on device.

    * Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:
    * Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
    (WebCore::AVVideoCaptureSource::computeMinZoom const):
    (WebCore::AVVideoCaptureSource::computeMaxZoom const):
    (WebCore::cameraZoomScaleFactor):
    (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
    (WebCore::AVVideoCaptureSource::setFrameRateAndZoomWithPreset):
    (WebCore::AVVideoCaptureSource::generatePresets):
    (WebCore::computeMaxZoom): Deleted.

    Canonical link: https://commits.webkit.org/261877@main

Identifier: 259548.385 at safari-7615.1.26.10-branch


  Commit: 87a46c614d2707786c44ae0dced1a181cf78fe79
      https://github.com/WebKit/WebKit/commit/87a46c614d2707786c44ae0dced1a181cf78fe79
  Author: Myah Cobbs <mcobbs at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Configurations/Version.xcconfig

  Log Message:
  -----------
  Versioning.

WebKit-7615.1.26.10.24

Identifier: 259548.386 at safari-7615.1.26.10-branch


  Commit: acc4e1f53e4fec79a65476e0587a539cd22c465e
      https://github.com/WebKit/WebKit/commit/acc4e1f53e4fec79a65476e0587a539cd22c465e
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

  Log Message:
  -----------
  Apply patch. rdar://problem/106142457

    REGRESSION iOS 16.4 beta selects ultra-wide for facingMode: environment
    https://bugs.webkit.org/show_bug.cgi?id=253186
    rdar://problem/106142457

    Reviewed by Jer Noble.

    For ultra wide back cameras, add a zoomn factor of 2 so that a zoom of 1 corresponds to a standard FOV.
    We compute this factor once and we then divide by this factor for capabilities and multiply by this factor for settings.
    Manually tested on device.

    * Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:
    * Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
    (WebCore::AVVideoCaptureSource::computeMinZoom const):
    (WebCore::AVVideoCaptureSource::computeMaxZoom const):
    (WebCore::cameraZoomScaleFactor):
    (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
    (WebCore::AVVideoCaptureSource::setFrameRateAndZoomWithPreset):
    (WebCore::AVVideoCaptureSource::generatePresets):
    (WebCore::computeMaxZoom): Deleted.

    Canonical link: https://commits.webkit.org/261877@main

Identifier: 259548.387 at safari-7615.1.26.10-branch


  Commit: e5a9c4ee3b406bc54e99925ca7825b7dbce01d78
      https://github.com/WebKit/WebKit/commit/e5a9c4ee3b406bc54e99925ca7825b7dbce01d78
  Author: Mark Lam <mark.lam at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/heap/Heap.cpp
    M Source/JavaScriptCore/heap/Heap.h
    M Source/JavaScriptCore/heap/HeapInlines.h
    M Source/JavaScriptCore/runtime/ArgList.cpp
    M Source/JavaScriptCore/runtime/ArgList.h
    M Source/WebCore/Modules/webaudio/AudioWorkletProcessor.cpp
    M Source/WebCore/Modules/webaudio/AudioWorkletProcessor.h
    M Source/WebCore/bindings/js/SerializedScriptValue.cpp

  Log Message:
  -----------
  Cherry-pick 2c49ff7b0481. rdar://problem/107369977

    CloneDeserializer::deserialize() should store cell pointers in a MarkedVector.
    https://bugs.webkit.org/show_bug.cgi?id=254797
    rdar://107369977

    Reviewed by Justin Michaud.

    Previously, CloneDeserializer::deserialize() was storing pointers to newly created objects
    in a few Vectors.  This is problematic because the GC is not aware of Vectors, and cannot
    scan them.  In this patch, we refactor the MarkedArgumentBuffer class into a MarkedVector
    template class that offer 2 enhancements:

    1. It can be configured to store specific types of cell pointer types.  This avoids us
       having to constantly cast JSValues into these pointers.

    2. It allows us to specify the type of OverflowHandler we want to use.  In this case,
       we want to use CrashOnOverflow.  The previous MarkedArgumentBuffer always assumes
       RecordOnOverflow.  This allows us to avoid having to manually check for overflows,
       or have to use appendWithCrashOnOverflow.  For our current needs, MarkedVector can be
       used as a drop in replacement for Vector.

    And we fix the CloneDeserializer::deserialize() issue by replacing the use of Vectors
    with MarkedVector instead.

    * Source/JavaScriptCore/heap/Heap.cpp:
    (JSC::Heap::addCoreConstraints):
    * Source/JavaScriptCore/heap/Heap.h:
    * Source/JavaScriptCore/heap/HeapInlines.h:
    * Source/JavaScriptCore/runtime/ArgList.cpp:
    (JSC::MarkedVectorBase::addMarkSet):
    (JSC::MarkedVectorBase::markLists):
    (JSC::MarkedVectorBase::slowEnsureCapacity):
    (JSC::MarkedVectorBase::expandCapacity):
    (JSC::MarkedVectorBase::slowAppend):
    (JSC::MarkedArgumentBufferBase::addMarkSet): Deleted.
    (JSC::MarkedArgumentBufferBase::markLists): Deleted.
    (JSC::MarkedArgumentBufferBase::slowEnsureCapacity): Deleted.
    (JSC::MarkedArgumentBufferBase::expandCapacity): Deleted.
    (JSC::MarkedArgumentBufferBase::slowAppend): Deleted.
    * Source/JavaScriptCore/runtime/ArgList.h:
    (JSC::MarkedVectorWithSize::MarkedVectorWithSize):
    (JSC::MarkedVectorWithSize::at const):
    (JSC::MarkedVectorWithSize::clear):
    (JSC::MarkedVectorWithSize::append):
    (JSC::MarkedVectorWithSize::appendWithCrashOnOverflow):
    (JSC::MarkedVectorWithSize::last const):
    (JSC::MarkedVectorWithSize::takeLast):
    (JSC::MarkedVectorWithSize::ensureCapacity):
    (JSC::MarkedVectorWithSize::hasOverflowed):
    (JSC::MarkedVectorWithSize::fill):
    (JSC::MarkedArgumentBufferWithSize::MarkedArgumentBufferWithSize): Deleted.
    * Source/WebCore/Modules/webaudio/AudioWorkletProcessor.cpp:
    (WebCore::AudioWorkletProcessor::buildJSArguments):
    * Source/WebCore/Modules/webaudio/AudioWorkletProcessor.h:
    * Source/WebCore/bindings/js/SerializedScriptValue.cpp:
    (WebCore::CloneDeserializer::deserialize):

    Canonical link: https://commits.webkit.org/259548.530@safari-7615-branch

Identifier: 259548.388 at safari-7615.1.26.10-branch


  Commit: 2aa37025ddd2058625357304943760c09c2b32c3
      https://github.com/WebKit/WebKit/commit/2aa37025ddd2058625357304943760c09c2b32c3
  Author: Myah Cobbs <mcobbs at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

  Log Message:
  -----------
  Revert "Apply patch. rdar://problem/106142457"
Revert "Apply patch. rdar://problem/106142457"

This reverts commit acc4e1f53e4fec79a65476e0587a539cd22c465e.
This reverts commit deddb5074e959a9858e9f7ae05b4d31cd4a07b15.

Identifier: 259548.389 at safari-7615.1.26.10-branch


  Commit: a431724b9ad126cc7ae90f81977002d055f6d427
      https://github.com/WebKit/WebKit/commit/a431724b9ad126cc7ae90f81977002d055f6d427
  Author: Russell Epstein <repstein at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

  Log Message:
  -----------
  Cherry-pick a0366a917abe. rdar://problem/106142457

    Cherry-pick 261877 at main (1ed9893d3737). rdar://problem/106142457

        To get a standard FOV, we set zoom to 2 for virtual wide angle cameras.

        Reviewed by Youenn Fablet.

        * Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::isVirtualWideCamera):
        (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):

        Canonical link: https://commits.webkit.org/261877@main

    Canonical link: https://commits.webkit.org/259548.492@safari-7615-branch

    Identifier: 259548.492 at safari-7615-branch

Identifier: 259548.390 at safari-7615.1.26.10-branch


  Commit: ec53dde6ef0918b42fb76d97a3c61493223c62e2
      https://github.com/WebKit/WebKit/commit/ec53dde6ef0918b42fb76d97a3c61493223c62e2
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

  Log Message:
  -----------
  Cherry-pick b59d14452d4b. rdar://problem/107490241

    [iOS] Rakuten cellular data activation portal is sometimes clipped when presented in a web sheet
    https://bugs.webkit.org/show_bug.cgi?id=254846
    rdar://107301827

    Reviewed by Chris Dumez.

    When activating a Rakuten cellular plan on Apple Watch via the Watch app on iOS 16.4, the web view
    can end up in a state where both `vw` and `vh` units are always 0. This causes main, scrollable
    container element with `height: 100vh;` on the page to become much, much shorter than intended,
    which makes interacting with the activation portal difficult.

    Some more important context: in the Watch app, the web view starts out at size `(0, 0)`, and is
    resized to fill the entire window only after the first navigation is complete. Rakuten's portal
    redirects cross-origin from a landing page, such that this size adjustment races against the second
    cross-origin navigation (which initiates a process swap).

    While the immediate cause of this is still unknown, the root cause is that during a process swap
    (in this particular case, from <login.account.rakuten.com> to <entitlement.devicem.rm-n.jp>), it's
    possible for UIKit to call `-setFrame:` with the first non-empty frame after the new web process has
    been launched and `WebPageCreationParameters` are created, but before the process swap actually
    finishes. This causes:

    1. A viewport size of `(0, 0)` to be sent to the newly created page via `WebPageCreationParameters`.
    2. The newly updated, non-zero viewport size to be sent to the *old* page, via an IPC message.

    As such, the new webpage is stuck in a state where it thinks the viewport size is still `(0, 0)`. To
    fix this, we simply propagate the new viewport layout size to a provisional page upon process swap.

    Test: ProcessSwap.ChangeViewSizeDuringNavigationActionPolicyDecision

    * Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
    (WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize):
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

    Canonical link: https://commits.webkit.org/262453@main

Identifier: 259548.391 at safari-7615.1.26.10-branch


Compare: https://github.com/WebKit/WebKit/compare/33e184057040...ec53dde6ef09


More information about the webkit-changes mailing list