[webkit-changes] [WebKit/WebKit] 0ed496: Cherry-pick 258825 at main (634131b13519). https://bu...

Michael Catanzaro noreply at github.com
Mon Jan 30 06:07:09 PST 2023


  Branch: refs/heads/webkitglib/2.38
  Home:   https://github.com/WebKit/WebKit
  Commit: 0ed4964a3238559266041b0d608500360cfc86de
      https://github.com/WebKit/WebKit/commit/0ed4964a3238559266041b0d608500360cfc86de
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp

  Log Message:
  -----------
  Cherry-pick 258825 at main (634131b13519). https://bugs.webkit.org/show_bug.cgi?id=250385

    [GStreamer] Support for bitrate-mode and latency-mode configuration in the video encoder
    https://bugs.webkit.org/show_bug.cgi?id=250385

    Reviewed by Xabier Rodriguez-Calvar.

    The video encoder can now be configured to encode at constant (default) or variable bitrate. The
    default latency mode is set to realtime, for WebRTC use-cases, but can be set to "quality", if
    mandated by WebCodecs video encoder configuration.

    * Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp:
    (webrtcVideoEncoderBitrateModeGetType):
    (webrtcVideoEncoderLatencyModeGetType):
    (Encoders::registerEncoder):
    (webrtcVideoEncoderGetProperty):
    (webrtcVideoEncoderSetProperty):
    (webkit_webrtc_video_encoder_class_init):

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


  Commit: 910493e92de70dc6bea890a5ef8adbcf8c79b703
      https://github.com/WebKit/WebKit/commit/910493e92de70dc6bea890a5ef8adbcf8c79b703
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-capabilities/decodingInfo.webrtc-expected.txt
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-capabilities/encodingInfo.webrtc-expected.txt
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/platform/mediastream/gstreamer/GStreamerWebRTCProvider.cpp

  Log Message:
  -----------
  Cherry-pick 258826 at main (12eeaf78a6d4). https://bugs.webkit.org/show_bug.cgi?id=250315

    REGRESSION(258448 at main): [GStreamer] Broke imported/w3c/web-platform-tests/media-capabilities webrtc tests
    https://bugs.webkit.org/show_bug.cgi?id=250315

    Reviewed by Žan Doberšek and Xabier Rodriguez-Calvar.

    Fix WebRTC settings notifications on Page for ports not enabling LibWebRTC. Also rebaseline
    media-capabilities tests on GLib ports after recent changes in the GStreamer registry scanner.

    * LayoutTests/platform/glib/TestExpectations:
    * LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-capabilities/decodingInfo.webrtc-expected.txt:
    * LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-capabilities/encodingInfo.webrtc-expected.txt:
    * Source/WebCore/page/Page.cpp:
    (WebCore::Page::settingsDidChange):
    * Source/WebCore/platform/mediastream/gstreamer/GStreamerWebRTCProvider.cpp:
    (WebCore::GStreamerWebRTCProvider::initializeVideoEncodingCapabilities):
    (WebCore::GStreamerWebRTCProvider::initializeVideoDecodingCapabilities):

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


  Commit: db695d8faa76b8d7f168e73dd769ce0c9f8150f2
      https://github.com/WebKit/WebKit/commit/db695d8faa76b8d7f168e73dd769ce0c9f8150f2
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    A LayoutTests/fast/forms/meter-appearance-on-pseudo-element-expected.txt
    A LayoutTests/fast/forms/meter-appearance-on-pseudo-element.html
    M Source/WebCore/rendering/RenderTheme.cpp

  Log Message:
  -----------
  Cherry-pick 258843 at main (3600cce060cb). https://bugs.webkit.org/show_bug.cgi?id=250488

    Crash when using `appearance: meter` with a pseudo-element not backed by `PseudoElement`
    https://bugs.webkit.org/show_bug.cgi?id=250488
    rdar://104118606

    Reviewed by Tim Nguyen.

    257981 at main introduced a crash due to an unconditional downcast to `RenderMeter`.
    The idea behind the unconditional downcast is that `appearance: meter` should
    behave like `appearance: auto`, and only apply to `<meter>`.

    However, this behavior is currently broken for pseudo-elements not backed by
    `PseudoElement`. In this case, the `element` passed into `StyleAdjuster` is
    `null`, resulting in an early return from `RenderTheme::adjustAppearanceForElement`,
    where the effective appearance is not adjusted.

    In this scenario, `appearance: auto` should behave like `appearance: none`. Fix
    by ensuring the effective appearance of these pseudo-elements is `none`.

    * LayoutTests/fast/forms/meter-appearance-on-pseudo-element-expected.txt: Added.
    * LayoutTests/fast/forms/meter-appearance-on-pseudo-element.html: Added.
    * Source/WebCore/rendering/RenderTheme.cpp:
    (WebCore::RenderTheme::adjustAppearanceForElement const):

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


  Commit: 79cf7eb7dee6f1ed278b68954a0c895bde9ccf68
      https://github.com/WebKit/WebKit/commit/79cf7eb7dee6f1ed278b68954a0c895bde9ccf68
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M LayoutTests/storage/filesystemaccess/file-handle-getfile-expected.txt
    M LayoutTests/storage/filesystemaccess/file-handle-getfile-worker-expected.txt
    M LayoutTests/storage/filesystemaccess/resources/file-handle-getfile.js
    M Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp

  Log Message:
  -----------
  Cherry-pick 258876 at main (60a6090b4106). https://bugs.webkit.org/show_bug.cgi?id=250495

    Data written via FileSystemSyncAccessHandle disappears after creating new FileSystemFileHandle
    https://bugs.webkit.org/show_bug.cgi?id=250495
    rdar://104187327

    Reviewed by Chris Dumez.

    FileSystem::openFile truncates file when mode is FileOpenMode::Write.

    * LayoutTests/storage/filesystemaccess/file-handle-getfile-expected.txt:
    * LayoutTests/storage/filesystemaccess/file-handle-getfile-worker-expected.txt:
    * LayoutTests/storage/filesystemaccess/resources/file-handle-getfile.js:
    (async test):
    * Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp:
    (WebKit::FileSystemStorageHandle::create):

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


  Commit: f59c7c5bfff991fe1f58db1a61cc03b57466f29a
      https://github.com/WebKit/WebKit/commit/f59c7c5bfff991fe1f58db1a61cc03b57466f29a
  Author: Manuel A. Fernandez Montecelo <mafm at igalia.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Tools/TestWebKitAPI/glib/CMakeLists.txt

  Log Message:
  -----------
  Cherry-pick 258892 at main (ee71929690ce). https://bugs.webkit.org/show_bug.cgi?id=250573

    REGRESSION(258448 at main): [GTK] Missing header with libwebrtc (USE_GSTREAMER_WEBRTC=FALSE)
    https://bugs.webkit.org/show_bug.cgi?id=250573

    Reviewed by Adrian Perez de Castro.

    When using libwebrtc (USE_GSTREAMER_WEBRTC=FALSE) since commit
    9def6e6f0258ddd9171d32bec2fffb684dbc7b8b, there's a compiler error:

    ---------
    In file included from /home/build/WebKit/Source/WebKit/UIProcess/WebPreferences.h:33,
                     from /home/build/WebKit/Source/WebKit/UIProcess/API/glib/WebKitSettingsPrivate.h:31,
                     from /home/build/WebKit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:23:
    /home/build/WebKit/WebKitBuild/Release/WebCore/PrivateHeaders/WebCore/LibWebRTCProvider.h:37:10: fatal error: webrtc/api/peer_connection_interface.h: No such file or directory
       37 | #include <webrtc/api/peer_connection_interface.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    ----------

    This adds the necessary directories search for a successful
    compilation.

    * Tools/TestWebKitAPI/glib/CMakeLists.txt:

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


  Commit: 910ae2c3cb8112e91a00f6f4b702ee812047bec8
      https://github.com/WebKit/WebKit/commit/910ae2c3cb8112e91a00f6f4b702ee812047bec8
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp

  Log Message:
  -----------
  Cherry-pick 258919 at main (80a6a175ed70). https://bugs.webkit.org/show_bug.cgi?id=250277

    Potential Crash or Debug Assertion Fix - AudioNodeOutput::enable() and AudioNodeOutput::disable() should not be reentered
    https://bugs.webkit.org/show_bug.cgi?id=250277

    Reviewed by Eric Carlson.

    Merge - https://src.chromium.org/viewvc/blink?revision=181693&view=revision

    This patch is to fix potential debug assertion fix where AudioNodeOutput::disable() can be reentered
    and in order to avoid re-entry, this patch moves m_isEnabled place. Similar is done for
    AudioNodeOutput::enable() to avoid re-entry.

    * Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp:
    (AudioNodeOutput::disable): move m_isEnabled above 'for' loop
    (AudioNodeOutput::enable): Ditto

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


  Commit: 8b2013ed0502759da852b6e8dc5555d95dcf0d12
      https://github.com/WebKit/WebKit/commit/8b2013ed0502759da852b6e8dc5555d95dcf0d12
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-01-28 (Sat, 28 Jan 2023)

  Changed paths:
    A LayoutTests/storage/indexeddb/modern/objectstore-rename-abort-expected.txt
    A LayoutTests/storage/indexeddb/modern/objectstore-rename-abort-private-expected.txt
    A LayoutTests/storage/indexeddb/modern/objectstore-rename-abort-private.html
    A LayoutTests/storage/indexeddb/modern/objectstore-rename-abort.html
    A LayoutTests/storage/indexeddb/modern/resources/objectstore-rename-abort.js
    M Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp
    M Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
    M Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h

  Log Message:
  -----------
  Cherry-pick 258996 at main (3d97acaa9a17). https://bugs.webkit.org/show_bug.cgi?id=250617

    ASSERTION FAILED: !m_objectStoresByName.contains(objectStore->info().name()) in MemoryIDBBackingStore.cpp
    https://bugs.webkit.org/show_bug.cgi?id=250617
    rdar://problem/99381891

    Reviewed by Youenn Fablet.

    When transaction is aborted and object store renaming operation is reverted, m_objectStoresByName in
    MemoryIDBBackingStore should be updated accordingly (i.e. map the object store to the name used before renaming).
    Otherwise, the wrong mapping can confuse the other operations in the tranaction abort.

    Test: storage/indexeddb/modern/objectstore-rename-abort-private.html
          storage/indexeddb/modern/objectstore-rename-abort.html

    * LayoutTests/storage/indexeddb/modern/objectstore-rename-abort-expected.txt: Added.
    * LayoutTests/storage/indexeddb/modern/objectstore-rename-abort-private-expected.txt: Added.
    * LayoutTests/storage/indexeddb/modern/objectstore-rename-abort-private.html: Added.
    * LayoutTests/storage/indexeddb/modern/objectstore-rename-abort.html: Added.
    * LayoutTests/storage/indexeddb/modern/resources/objectstore-rename-abort.js: Added.
    (openDatabase):
    (onDatabaseUpgradeNeeded):
    (onTransactionAbort):
    * Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
    (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
    * Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
    (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStoreForVersionChangeAbort):
    * Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h:

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


  Commit: 7ab7760be9f9a285e5d87cf22e26ba580d0c2c8c
      https://github.com/WebKit/WebKit/commit/7ab7760be9f9a285e5d87cf22e26ba580d0c2c8c
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-01-28 (Sat, 28 Jan 2023)

  Changed paths:
    A LayoutTests/http/tests/permissions/permission-state-for-notifications-in-ephemeral-session-expected.txt
    A LayoutTests/http/tests/permissions/permission-state-for-notifications-in-ephemeral-session.html
    M LayoutTests/http/tests/push-api/permissions-ephemeral-expected.txt
    M LayoutTests/http/tests/push-api/permissions-ephemeral.html
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebNotificationClient.cpp

  Log Message:
  -----------
  Cherry-pick 259040 at main (5e4c68005fe4). https://bugs.webkit.org/show_bug.cgi?id=250686

    REGRESSION (252706 at main): zillow.com shows a Recaptcha interstitial in private browsing mode
    https://bugs.webkit.org/show_bug.cgi?id=250686
    rdar://103905006

    Reviewed by Youenn Fablet and Ben Nham.

    Currently, in private browsing mode (i.e. when using an ephemeral session) `Notification.permission`
    unconditionally returns `"denied"` (with `Notification.requestPermission` also unconditionally
    denying the request). However, the Permissions API (i.e. `navigator.permissions.query`) implements
    inconsistent behavior, and instead returns `"prompt"` in this scenario. On zillow.com, this causes
    a bot detection script to erroneously flag the UA as non-human in private browsing, and present
    interstitial Recaptcha UI to the user.

    Fix this by making the heuristics for "notifications" in `WebPageProxy::queryPermission` consistent
    with the Notifications API, such that in an ephemeral session, we return "default" or "prompt"
    unless the page has requested access (in which case we'll deny access, and then subsequently return
    "denied").

    Test: http/tests/permissions/permission-state-for-notifications-in-ephemeral-session.html

    * LayoutTests/http/tests/permissions/permission-state-for-notifications-in-ephemeral-session-expected.txt:
    * LayoutTests/http/tests/permissions/permission-state-for-notifications-in-ephemeral-session.html:
    * LayoutTests/http/tests/push-api/permissions-ephemeral-expected.txt:
    * LayoutTests/http/tests/push-api/permissions-ephemeral.html:

    Rebaseline an existing layout test.

    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::queryPermission):
    * Source/WebKit/WebProcess/WebCoreSupport/WebNotificationClient.cpp:
    (WebKit::WebNotificationClient::checkPermission):

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


  Commit: 6f6f49d26936dbb4176cfde29da0df7ade518079
      https://github.com/WebKit/WebKit/commit/6f6f49d26936dbb4176cfde29da0df7ade518079
  Author: Alejandro G. Castro <alex at igalia.com>
  Date:   2023-01-28 (Sat, 28 Jan 2023)

  Changed paths:
    M Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp

  Log Message:
  -----------
  Cherry-pick 259065 at main (7014a00d589b). https://bugs.webkit.org/show_bug.cgi?id=250783

    [GTK][WPE] Fix compilation with  ENABLE_WEBGL=OFF
    https://bugs.webkit.org/show_bug.cgi?id=250783

    Reviewed by Adrian Perez de Castro.

    Add guards to a couple of code sections that depend on WebGL
    functions.

    * Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
    (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
    * Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp:

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


  Commit: 27649d29061abc11da939493419b21233970b8f9
      https://github.com/WebKit/WebKit/commit/27649d29061abc11da939493419b21233970b8f9
  Author: Chirag M Shah <chirags2793 at gmail.com>
  Date:   2023-01-28 (Sat, 28 Jan 2023)

  Changed paths:
    A LayoutTests/http/tests/cache-storage/cache-match-invalid-url-expected.txt
    A LayoutTests/http/tests/cache-storage/cache-match-invalid-url.html
    M Source/WebCore/Modules/cache/DOMCache.cpp
    M Source/WebCore/Modules/cache/DOMCache.h

  Log Message:
  -----------
  Cherry-pick 259091 at main (99afca995277). https://bugs.webkit.org/show_bug.cgi?id=250727

    Don't crash WebContent process when passing invalid URL for cache
    https://bugs.webkit.org/show_bug.cgi?id=250727
    rdar://104294986

    Reviewed by Chris Dumez and Sihui Liu.

    Before this change, if FetchRequest::create() returned an exception, we
    never used to check for that and call releaseReturnValue() on that which
    would cause a crash. This change fixes that, so that we can correctly
    return the "URL is not valid or contains user credentials." exception.
    This change also fixes a bug where correct exception wasn't returned.

    * LayoutTests/http/tests/cache-storage/cache-match-invalid-url-expected.txt: Added.
    * LayoutTests/http/tests/cache-storage/cache-match-invalid-url.html: Added.
    * Source/WebCore/Modules/cache/DOMCache.cpp:
    (WebCore::DOMCache::doMatch):
    (WebCore::DOMCache::matchAll):
    (WebCore::DOMCache::requestFromInfo):
    * Source/WebCore/Modules/cache/DOMCache.h:

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


  Commit: 5b68415692ed186af37cf9881fe4f4288dd6dc2c
      https://github.com/WebKit/WebKit/commit/5b68415692ed186af37cf9881fe4f4288dd6dc2c
  Author: Chirag M Shah <chirags2793 at gmail.com>
  Date:   2023-01-28 (Sat, 28 Jan 2023)

  Changed paths:
    A LayoutTests/http/tests/media/video-play-without-load-expected.txt
    A LayoutTests/http/tests/media/video-play-without-load.html
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  Cherry-pick 259097 at main (56a5e513db94). https://bugs.webkit.org/show_bug.cgi?id=250810

    Fix crash when a video without source is played without loading
    https://bugs.webkit.org/show_bug.cgi?id=250810
    rdar://104278707

    Reviewed by Jer Noble.

    Before this change, we used to initialize m_currentIdentifier only when
    source was set on a HTMLElement, or when we are preloading content,
    which resulted in a crash when none of those happened because we would
    send an empty object identifier across IPC. This change fixes that.

    * LayoutTests/http/tests/media/video-play-without-load-expected.txt: Added.
    * LayoutTests/http/tests/media/video-play-without-load.html: Added.
    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::HTMLMediaElement):

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


  Commit: b2a4ff682943736cbe3acaf932aacd0ab7e21dd8
      https://github.com/WebKit/WebKit/commit/b2a4ff682943736cbe3acaf932aacd0ab7e21dd8
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate.html
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt
    M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt
    A LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt
    M Source/WebCore/html/BaseDateAndTimeInputType.cpp
    M Source/WebCore/html/ColorInputType.cpp
    M Source/WebCore/html/HTMLFormControlElement.cpp
    M Source/WebCore/html/HTMLFormControlElement.h
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLInputElement.h
    M Source/WebCore/html/HTMLTextAreaElement.cpp
    M Source/WebCore/html/HTMLTextAreaElement.h
    M Source/WebCore/html/HTMLTextFormControlElement.cpp
    M Source/WebCore/html/SearchInputType.cpp
    M Source/WebCore/html/TextFieldInputType.cpp
    M Source/WebCore/html/shadow/SliderThumbElement.cpp
    M Source/WebCore/html/shadow/TextControlInnerElements.cpp

  Log Message:
  -----------
  Cherry-pick 253321 at main (af43ca312063). https://bugs.webkit.org/show_bug.cgi?id=240343

    readonly attribute should only apply on certain input types
    https://bugs.webkit.org/show_bug.cgi?id=240343
    <rdar://93173726>

    Reviewed by Chris Dumez.

    We should only apply the readonly attribute on certain input types: https://html.spec.whatwg.org/multipage/input.html#do-not-apply
    Except in the constraint validation case (willValidate) for compat reasons, since it affects the :in-range/:out-of-range pseudo-classes, the relevant test has been updated to reflect that.
    This also was the resolution of https://github.com/whatwg/html/issues/8133 in the HTML spec triage meeting.

    Also introduce isMutable() which corresponds to the spec concept of mutable form control.

    * LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate.html:
    * LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt:
    * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:
    * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt: Added.
    * Source/WebCore/html/BaseDateAndTimeInputType.cpp:
    (WebCore::BaseDateAndTimeInputType::valueMissing const):
    (WebCore::BaseDateAndTimeInputType::handleDOMActivateEvent):
    * Source/WebCore/html/ColorInputType.cpp:
    (WebCore::ColorInputType::isKeyboardFocusable const):
    * Source/WebCore/html/HTMLFormControlElement.cpp:
    (WebCore::HTMLFormControlElement::HTMLFormControlElement):
    (WebCore::HTMLFormControlElement::parseAttribute):
    (WebCore::HTMLFormControlElement::computeWillValidate const):
    * Source/WebCore/html/HTMLFormControlElement.h:
    (WebCore::HTMLFormControlElement::supportsReadOnly const):
    (WebCore::HTMLFormControlElement::isReadOnly const):
    (WebCore::HTMLFormControlElement::isMutable const):
    (WebCore::HTMLFormControlElement::isDisabledOrReadOnly const): Deleted.
    * Source/WebCore/html/HTMLInputElement.cpp:
    (WebCore::HTMLInputElement::updateType):
    (WebCore::HTMLInputElement::supportsReadOnly const):
    (WebCore::HTMLInputElement::showPicker):
    (WebCore::HTMLInputElement::matchesReadWritePseudoClass const):
    (WebCore::HTMLInputElement::createInnerTextStyle):
    * Source/WebCore/html/HTMLInputElement.h:
    * Source/WebCore/html/HTMLTextAreaElement.cpp:
    (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass const):
    * Source/WebCore/html/HTMLTextAreaElement.h:
    * Source/WebCore/html/HTMLTextFormControlElement.cpp:
    (WebCore::HTMLTextFormControlElement::isInnerTextElementEditable const):
    * Source/WebCore/html/SearchInputType.cpp:
    (WebCore::SearchInputType::handleKeydownEvent):
    * Source/WebCore/html/TextFieldInputType.cpp:
    (WebCore::TextFieldInputType::valueMissing const):
    (WebCore::TextFieldInputType::handleKeydownEventForSpinButton):
    (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents const):
    (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const):
    (WebCore::TextFieldInputType::shouldDrawAutoFillButton const):
    * Source/WebCore/html/shadow/SliderThumbElement.cpp:
    (WebCore::SliderThumbElement::handleTouchEvent):
    * Source/WebCore/html/shadow/TextControlInnerElements.cpp:
    (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
    (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEventsWithEditability const):

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


  Commit: 9f57dc5dfb90dbdd14d5175ac55fcb788b62e912
      https://github.com/WebKit/WebKit/commit/9f57dc5dfb90dbdd14d5175ac55fcb788b62e912
  Author: Darin Adler <darin at apple.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M Source/WebCore/html/FileInputType.cpp
    M Source/WebCore/html/FormController.cpp
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLInputElement.h
    M Source/WebCore/html/HTMLTextAreaElement.cpp
    M Source/WebCore/html/HTMLTextAreaElement.h
    M Source/WebCore/html/HTMLTextFormControlElement.cpp
    M Source/WebCore/html/HTMLTextFormControlElement.h
    M Source/WebCore/html/InputType.h
    M Source/WebCore/html/TextFieldInputType.cpp
    M Source/WebCore/html/TextFieldInputType.h
    M Source/WebCore/loader/EmptyClients.cpp
    M Source/WebCore/page/Chrome.cpp
    M Source/WebCore/platform/FileChooser.cpp
    M Source/WebCore/platform/FileChooser.h
    M Source/WebKit/UIProcess/API/C/WKOpenPanelParametersRef.cpp
    M Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp
    M Source/WebKitLegacy/mac/DOM/DOMHTMLInputElement.mm
    M Source/WebKitLegacy/mac/DOM/DOMHTMLTextAreaElement.mm

  Log Message:
  -----------
  Cherry-pick 257417 at main (95861845546f). https://bugs.webkit.org/show_bug.cgi?id=248447

    Improve <textarea> validation performance
    https://bugs.webkit.org/show_bug.cgi?id=248447
    rdar://problem/102909909

    Reviewed by Ryosuke Niwa.

    Added laziness to the HTMLTextAreaElement computation of validity. Also did style
    tweaks and minor reorganization of the two text form element classes.

    * Source/WebCore/html/FileInputType.cpp: Added include of FileChooser.h.
    (WebCore::FileInputType::applyFileChooserSettings): Update to pass reference.

    * Source/WebCore/html/FormController.cpp: Added include of FileChooser.h.

    * Source/WebCore/html/HTMLInputElement.cpp:
    (WebCore::HTMLInputElement::capsLockIndicatorElement const): Deleted.
    (WebCore::HTMLInputElement::accept const): Deleted.
    (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup): Deleted.
    (WebCore::HTMLInputElement::setRangeText): Removed unneeded overload and let
    the base class version of setRangeText call the virtual one.

    * Source/WebCore/html/HTMLInputElement.h: Removed unneeded includes.
    Moved the functions for the IDL file to the top of the class, sorted in the
    order that matches the IDL. Removed a few unused functions. Made three
    public functions private. Tweaked comments.

    * Source/WebCore/html/HTMLTextAreaElement.cpp:
    (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Removed the tag name argument.
    (WebCore::HTMLTextAreaElement::create): Updated to not pass the tag name to the constructor.
    (WebCore::HTMLTextAreaElement::formControlType const): Use textareaTag so we don't need a global.
    (WebCore::HTMLTextAreaElement::collectPresentationalHintsForAttribute): Moved body of the
    shouldWrapText in.
    (WebCore::HTMLTextAreaElement::parseAttribute): Moved the bodies of maxLengthAttributeChanged,
    and minLengthAttributeChanged in.
    (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged): Deleted.
    (WebCore::HTMLTextAreaElement::minLengthAttributeChanged): Deleted.
    (WebCore::HTMLTextAreaElement::appendFormData): Tweaked coding style.
    (WebCore::HTMLTextAreaElement::hasCustomFocusLogic const): Moved to the class definition.
    (WebCore::HTMLTextAreaElement::defaultTabIndex const): Ditto.
    (WebCore::HTMLTextAreaElement::isKeyboardFocusable const): Ditto.
    (WebCore::HTMLTextAreaElement::isMouseFocusable const): Ditto.
    (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent const): Call maxLength. Merge in the
    sanitizeUserInputValue function.
    (WebCore::HTMLTextAreaElement::sanitizeUserInputValue): Deleted.
    (WebCore::HTMLTextAreaElement::rendererWillBeDestroyed): Moved to the class definition.
    (WebCore::HTMLTextAreaElement::validationMessage const): Call maxLength.
    (WebCore::HTMLTextAreaElement::valueMissing const): Pass null string for value, so the value will
    be computed lazily. In the overload that takes a StringView, get the value lazily.
    (WebCore::HTMLTextAreaElement::tooShort const): Ditto.
    (WebCore::HTMLTextAreaElement::tooLong const): Ditto.
    (WebCore::HTMLTextAreaElement::isValidValue const): Change type to StringView.
    (WebCore::HTMLTextAreaElement::shouldUseInputMethod): Moved to the class definition.
    (WebCore::HTMLTextAreaElement::placeholderElement const): Ditto.
    (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass const): Ditto.
    (WebCore::HTMLTextAreaElement::willRespondToMouseClickEventsWithEditability const): Ditto.

    * Source/WebCore/html/HTMLTextAreaElement.h: Removed unneeded include. Moved the functions for the
    IDL file to the top of the class, sorted in the order that matches the IDL. Removed some functions.
    Moved some function bodies here. Use StringView more often.

    * Source/WebCore/html/HTMLTextFormControlElement.cpp:
    (WebCore::HTMLTextFormControlElement::setRangeText): Take StringView.

    * Source/WebCore/html/HTMLTextFormControlElement.h: Changed setRangeText to take a StringView.
    Also made the single argument form non-virtual.

    * Source/WebCore/html/InputType.h:
    (WebCore::InputType::capsLockIndicatorElement const): Deleted.
    * Source/WebCore/html/TextFieldInputType.cpp:
    (WebCore::TextFieldInputType::capsLockIndicatorElement const): Deleted.
    * Source/WebCore/html/TextFieldInputType.h: Deleted capsLockIndicatorElement.

    * Source/WebCore/loader/EmptyClients.cpp: Deleted unneeded includes.
    * Source/WebCore/page/Chrome.cpp: Ditto.

    * Source/WebCore/platform/FileChooser.cpp:
    (WebCore::FileChooser::FileChooser): Take a reference.
    (WebCore::FileChooser::create): Ditto.

    * Source/WebCore/platform/FileChooser.h: Updated for the above.

    * Source/WebKitLegacy/mac/DOM/DOMHTMLInputElement.mm:
    (-[DOMHTMLInputElement setRangeText:]): Create a String explicitly since the function now
    takes a StringView.
    (-[DOMHTMLInputElement setRangeText:start:end:selectionMode:]): Ditto.
    * Source/WebKitLegacy/mac/DOM/DOMHTMLTextAreaElement.mm:
    (-[DOMHTMLTextAreaElement setRangeText:]): Ditto.
    (-[DOMHTMLTextAreaElement setRangeText:start:end:selectionMode:]): Ditto.

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


  Commit: f87f765771f135d88634914886435d07478f8ada
      https://github.com/WebKit/WebKit/commit/f87f765771f135d88634914886435d07478f8ada
  Author: Michael Catanzaro <mcatanzaro at redhat.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    A LayoutTests/fast/events/onchange-js-expected.txt
    A LayoutTests/fast/events/onchange-js.html
    M LayoutTests/fast/forms/onchange-setvalueforuser.html
    M Source/WebCore/html/HTMLInputElement.h
    M Source/WebCore/html/SearchInputType.cpp
    M Source/WebCore/html/shadow/TextControlInnerElements.cpp

  Log Message:
  -----------
  Cherry-pick 259434 at main (fd13c500871d). https://bugs.webkit.org/show_bug.cgi?id=226023

    HTMLInputElement::setValueForUser should dispatch an input event
    https://bugs.webkit.org/show_bug.cgi?id=226023
    rdar://78571564

    Reviewed by Aditya Keerthi.

    HTMLInputElement::setValueForUser is used to autofill form elements. It
    differs from setting the form value normally because it creates a change
    event to trick websites into detecting user input. However, this is not
    enough for some websites that only look for input events and not change
    events to decide whether the user modified the form. On such websites,
    the user has to enter an extra character and then delete it as a
    workaround.

    This fixes password autofill on https://my.cigna.com and
    https://myaccount.spireenergy.com in Epiphany.

    * LayoutTests/fast/events/onchange-js-expected.txt:
    * LayoutTests/fast/events/onchange-js.html: Add test to ensure change
      event is not sent until blur, since I've removed that from the
      onchange-setvalueforuser.html test.
    * LayoutTests/fast/forms/onchange-setvalueforuser.html: Change this test
      to not complain about the change event being sent before focus out.
    * Source/WebCore/html/HTMLInputElement.h:
    (WebCore::HTMLInputElement::setValueForUser): Fix the bug.
    * Source/WebCore/html/SearchInputType.cpp:
    (WebCore::SearchInputType::handleKeydownEvent): This seems to be using
    setValueForUser by mistake. Call setValue directly instead to avoid
    breaking fast/forms/search-cancel-button-events.html.
    * Source/WebCore/html/shadow/TextControlInnerElements.cpp:
    (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Ditto.

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


Compare: https://github.com/WebKit/WebKit/compare/905918081fad...f87f765771f1


More information about the webkit-changes mailing list