[webkit-changes] [WebKit/WebKit] dc3ea3: Merge 254290 at main - link elements should be able t...

Adrian Perez noreply at github.com
Tue Sep 13 04:13:22 PDT 2022


  Branch: refs/heads/webkitglib/2.38
  Home:   https://github.com/WebKit/WebKit
  Commit: dc3ea3705f189415574f19e4808c92adde0fc9d5
      https://github.com/WebKit/WebKit/commit/dc3ea3705f189415574f19e4808c92adde0fc9d5
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt
    A LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once.html
    A LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once-expected.txt
    A LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once.html
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events-expected.txt
    A LayoutTests/platform/mac-wk1/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt
    A LayoutTests/platform/win/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt
    M Source/WebCore/html/HTMLLinkElement.cpp
    M Source/WebCore/html/HTMLLinkElement.h
    M Source/WebCore/html/LinkRelAttribute.h

  Log Message:
  -----------
  Merge 254290 at main - link elements should be able to fire more than one load / error event
https://bugs.webkit.org/show_bug.cgi?id=232309

Reviewed by Darin Adler.

Based on a patch written by Chris Dumez.

This patch makes link element emit more than one load event each time resource is loaded,
and fixes the bug that setting rel content attribute to the same value resulted in the resource to be reloaded.
New behavior matches that of Chrome and Firefox.

* LayoutTests/TestExpectations: Unskip now passing tests.
* LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt: Added.
* LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once.html: Added.
* LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once-expected.txt: Added.
* LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events-expected.txt:
* LayoutTests/platform/mac-wk1/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt:
* LayoutTests/platform/win/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt:

* Source/WebCore/html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::didFinishInsertingNode): We need to resolve URL again once this element is connected.
(WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
* Source/WebCore/html/HTMLLinkElement.h:
* Source/WebCore/html/LinkRelAttribute.h:
(WebCore::operator==): Added.
(WebCore::operator!=): Added.

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

(cherry picked from commit 3775c2edb2307598e53c311c623d3c2d7583066c)


  Commit: 4af52c661213b3fc48085860262795fe21b23af0
      https://github.com/WebKit/WebKit/commit/4af52c661213b3fc48085860262795fe21b23af0
  Author: Darin Adler <darin at apple.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M LayoutTests/js/script-tests/string-includes.js
    M LayoutTests/js/string-includes-expected.txt
    M Source/JavaScriptCore/runtime/StringPrototype.cpp

  Log Message:
  -----------
  Merge 254319 at main - String.prototype.includes incorrectly returns false when string is empty and position is past end of string
https://bugs.webkit.org/show_bug.cgi?id=244196

Reviewed by Alexey Shvayka.

Added length clamping to the Int32 special case of the startsWith
and includes functions. These functions could be optimized for all sorts
of cases including not fetching string lengths multiple times, and even
optimizing rope cases to not require resolving the whole rope, but for now
didn't worry about any of that, just added that bit of extra checking.

* LayoutTests/js/script-tests/string-includes.js: Added test cases.
* LayoutTests/js/string-includes-expected.txt: Added expected result.

* Source/JavaScriptCore/runtime/StringPrototype.cpp:
(JSC::stringProtoFuncStartsWith): Added clamping to the Int32 special case.
(JSC::stringProtoFuncEndsWith): Refactored clamping to match startsWith
and includes, which removes one redudant clamp.
(JSC::stringIncludesImpl): Added clamping to the Int32 special case.

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

(cherry picked from commit ebf196ed572433cb92280dac2a1d62a57ce773b5)


  Commit: 1e133d70aa789b49ed621546e978381fc7318275
      https://github.com/WebKit/WebKit/commit/1e133d70aa789b49ed621546e978381fc7318275
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M Source/WTF/wtf/text/StringCommon.cpp

  Log Message:
  -----------
  Merge 254349 at main - Fix SIMD loop stop condition for length=0
https://bugs.webkit.org/show_bug.cgi?id=245017
<rdar://99768369>

Reviewed by Mark Lam.

We should stop the loop when the remaining length becomes zero.
Tested via guarded malloc bots.

* Source/WTF/wtf/text/StringCommon.cpp:
(WTF::find16AlignedImpl):
(WTF::find32AlignedImpl):
(WTF::find64AlignedImpl):
(WTF::findFloatAlignedImpl):
(WTF::findDoubleAlignedImpl):
(WTF::find8NonASCIIAlignedImpl):
(WTF::find16NonASCIIAlignedImpl):

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

(cherry picked from commit 4528a8ead9b4d7cc80e92f7f969e3ae674c2bd57)


  Commit: 1dce416eca8bddb600273eb5c03fabfba14c1357
      https://github.com/WebKit/WebKit/commit/1dce416eca8bddb600273eb5c03fabfba14c1357
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    A LayoutTests/fast/images/hidpi-img-cloned-from-template-expected.html
    A LayoutTests/fast/images/hidpi-img-cloned-from-template.html
    A LayoutTests/fast/images/hidpi-img-from-dom-parser-expected.html
    A LayoutTests/fast/images/hidpi-img-from-dom-parser.html
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt
    M Source/WebCore/html/HTMLImageElement.cpp

  Log Message:
  -----------
  Merge 254361 at main - Incorrect image srcset candidate chosen for <img> cloned from <template>
https://bugs.webkit.org/show_bug.cgi?id=211620

Reviewed by Simon Fraser.

The bug was caused by HTMLImageElement not selecting the correct candidate
if it was initially created in a document without a browsing context.

* LayoutTests/fast/images/hidpi-img-cloned-from-template-expected.html: Added.
* LayoutTests/fast/images/hidpi-img-cloned-from-template.html: Added.
* LayoutTests/fast/images/hidpi-img-from-dom-parser-expected.html: Added.
* LayoutTests/fast/images/hidpi-img-from-dom-parser.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt:
  Rebaselined now that all test cases are passing.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt: Removed.

* Source/WebCore/html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::didMoveToNewDocument):

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

(cherry picked from commit ebdff21ed51676ee81de66302692042d5bf8d6c4)


  Commit: e45c8d8bcedec5389215ee1da3bd6a990851d45e
      https://github.com/WebKit/WebKit/commit/e45c8d8bcedec5389215ee1da3bd6a990851d45e
  Author: Philippe Normand <philn at igalia.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp

  Log Message:
  -----------
  Merge 254373 at main - [GStreamer][Debug] 2 mediastream tests hitting asserts
https://bugs.webkit.org/show_bug.cgi?id=245047

Reviewed by Xabier Rodriguez-Calvar.

The GstStream is now stored as GRefPtr<T> in TrackPrivateBaseGStreamer, so that we're sure the
underlying pointer is never dangling. In the player, we're now a bit more cautious when querying the
tags from the video track as well.

* Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer):
(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromTags):
(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::AudioTrackPrivateGStreamer::kind const):
(WebCore::AudioTrackPrivateGStreamer::disconnect):
* Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
(WebCore::TrackPrivateBaseGStreamer::stream const):
* Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromTags):
(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::VideoTrackPrivateGStreamer::kind const):
(WebCore::VideoTrackPrivateGStreamer::disconnect):

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

(cherry picked from commit a7b5bc7a6c120e3a824981e725e12f8befa2a0dc)


  Commit: 2236cbcf7528b4e76d68d637256d802af97d7082
      https://github.com/WebKit/WebKit/commit/2236cbcf7528b4e76d68d637256d802af97d7082
  Author: Patrick Angle <pangle at apple.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  -----------
  Merge 254386 at main - WebDriver: Automation session terminates during navigation process swap
https://bugs.webkit.org/show_bug.cgi?id=245011
rdar://90824741

Reviewed by Devin Rousso and Brent Fulgham.

WebPageProxy::commitProvisionalPage is crashing during some WebDriver sessions due to having a `nullptr` for
`m_provisionalPage` after calling `WebPageProxy::resetStateAfterProcessTermination`. This was occuring because we were
indiscriminately terminating the WebDriver session at that point, but we should not do so when resetting state for a
navigation process swap, as the automation session is very much expected to continue to exist. The reason we end up
without a `m_provisionalPage` is because terminating the automation session cleans up (e.g. closes) the windows under
automation, which in turn is cleaning up the `m_provisionalPage`, since it will no longer exist once the window is gone.

This resolves numerous test crashes in WPT, including encoding/encodeInto.any.serviceworker.html, as well as fixing
issues navigating to `youtube.com` and `twitter.com`.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessTermination):

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

(cherry picked from commit d65e9089f3a1e059ca3373052d58221df04b0209)


  Commit: 67d683c8b73869ff63fd207d5a52b60d363c09d9
      https://github.com/WebKit/WebKit/commit/67d683c8b73869ff63fd207d5a52b60d363c09d9
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M Source/ThirdParty/ANGLE/CMakeLists.txt

  Log Message:
  -----------
  Merge 254426 at main - [ANGLE] Build broken when targeting Android
https://bugs.webkit.org/show_bug.cgi?id=245093

Reviewed by Kimmo Kinnunen.

* Source/ThirdParty/ANGLE/CMakeLists.txt: Choose the appropriate
  translator symbol table sources on Android.

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

(cherry picked from commit 67af852f97b2994d601132f9f2cbeec7b78261b1)


  Commit: 575970dc8aa1bc5b7f2bf1a1f8c0a5be418ace49
      https://github.com/WebKit/WebKit/commit/575970dc8aa1bc5b7f2bf1a1f8c0a5be418ace49
  Author: Vitaly Dyachkov <vitaly at igalia.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.h

  Log Message:
  -----------
  Merge 254424 at main - [ATSPI] ASSERTION FAILED: isTableComponent(*child) || isTableComponent(*this) || child->parentObject() == this
https://bugs.webkit.org/show_bug.cgi?id=245071

Reviewed by Carlos Garcia Campos.

This happens running test
accessibility/anonymous-render-block-in-continuation-causes-crash.html
with assertions enabled. In ATSPI we always add the list item marker as
the first child of the list item, no matter where the marker actually is
in the tree.

* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::parentObject const):
(WebCore::AccessibilityRenderObject::parentObjectUnignored const): Deleted.
* Source/WebCore/accessibility/AccessibilityRenderObject.h:

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

(cherry picked from commit 0357edf07e3b0b8eb6aa0c2217b5a0404fe720e8)


  Commit: cad61bb445124d24169e683dae91738c43840609
      https://github.com/WebKit/WebKit/commit/cad61bb445124d24169e683dae91738c43840609
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/cors/preflight-cache-expected.txt
    M Source/WebCore/loader/CrossOriginPreflightResultCache.cpp

  Log Message:
  -----------
  Merge 254410 at main - Fix parsing of negative age values in CORS prefetch responses
https://bugs.webkit.org/show_bug.cgi?id=244959

Reviewed by Darin Adler.

This aligns our behavior with Blink and Gecko.

* LayoutTests/imported/w3c/web-platform-tests/cors/preflight-cache-expected.txt:
* Source/WebCore/loader/CrossOriginPreflightResultCache.cpp:
(WebCore::parseAccessControlMaxAge):

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

(cherry picked from commit 46bb54071fc38dbc58e9d96598c04fdd898f9484)


  Commit: 9df8686fb9995f724be1c2e8ba46afa6faf4d36e
      https://github.com/WebKit/WebKit/commit/9df8686fb9995f724be1c2e8ba46afa6faf4d36e
  Author: Vitaly Dyachkov <vitaly at igalia.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp

  Log Message:
  -----------
  Merge 254427 at main - Assert that `ThreadedCompositor::targetRefreshRateDidChange` is called only from the main thread.
https://bugs.webkit.org/show_bug.cgi?id=242575

Reviewed by Miguel Gomez.

* Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::targetRefreshRateDidChange):

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

(cherry picked from commit e8982cd006743388b0a9204010bf3dc3bbb57cfa)


Compare: https://github.com/WebKit/WebKit/compare/a19ddac90cec...9df8686fb999


More information about the webkit-changes mailing list