[webkit-changes] [WebKit/WebKit] 02b27b: Merge 254544 at main - WebGL buffers maintain shadow ...

Kimmo Kinnunen noreply at github.com
Tue Sep 20 23:46:00 PDT 2022


  Branch: refs/heads/webkitglib/2.38
  Home:   https://github.com/WebKit/WebKit
  Commit: 02b27be71051afaa333e4b43ece4fdf29432c2ed
      https://github.com/WebKit/WebKit/commit/02b27be71051afaa333e4b43ece4fdf29432c2ed
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M LayoutTests/fast/canvas/webgl/largeBuffer-expected.txt
    M LayoutTests/fast/canvas/webgl/largeBuffer.html
    A LayoutTests/platform/gtk/fast/canvas/webgl/largeBuffer-expected.txt
    A LayoutTests/webgl/buffer-copysubdata-overlap-no-crash-expected.txt
    A LayoutTests/webgl/buffer-copysubdata-overlap-no-crash.html
    M LayoutTests/webgl/webgl-allow-shared-expected.txt
    M Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
    M Source/WebCore/html/canvas/WebGL2RenderingContext.h
    M Source/WebCore/html/canvas/WebGLBuffer.cpp
    M Source/WebCore/html/canvas/WebGLBuffer.h
    M Source/WebCore/html/canvas/WebGLRenderingContext.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContext.h
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.h

  Log Message:
  -----------
  Merge 254544 at main - WebGL buffers maintain shadow copy https://bugs.webkit.org/show_bug.cgi?id=245137 rdar://97453557

Reviewed by Kenneth Russell.

Remove the code caching the WebGL buffer data and size.
The data was used to assert that indices drawn with DrawElements are
in range for other buffers.
Remove the data, it is verified by ANGLE.

The size was used to assert that updates to the buffer are in range.
Since we do not check the success of the updates, we cannot cache the
size. The size is checked by ANGLE.

* LayoutTests/webgl/buffer-copysubdata-overlap-no-crash.html: Added.
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData):
(WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Deleted.
* Source/WebCore/html/canvas/WebGL2RenderingContext.h:
* Source/WebCore/html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::WebGLBuffer):
(WebCore::WebGLBuffer::associateBufferDataImpl):
(WebCore::WebGLBuffer::associateBufferSubDataImpl):
(WebCore::WebGLBuffer::associateCopyBufferSubData):
* Source/WebCore/html/canvas/WebGLBuffer.h:
* Source/WebCore/html/canvas/WebGLRenderingContext.cpp:
* Source/WebCore/html/canvas/WebGLRenderingContext.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::validateVertexAttributes):
(WebCore::WebGLRenderingContextBase::validateDrawArrays):
(WebCore::WebGLRenderingContextBase::validateDrawElements):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::getMaxIndex):

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

(cherry picked from commit be0a403feb9da4434c92bdde78e7722997268dcf)


  Commit: e0f37a483db7a44e2189ec83610991b70f949479
      https://github.com/WebKit/WebKit/commit/e0f37a483db7a44e2189ec83610991b70f949479
  Author: Diego Pino Garcia <dpino at igalia.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp

  Log Message:
  -----------
  Merge 254551 at main - Unreviewed, build fix error after 254207 at main https://bugs.webkit.org/show_bug.cgi?id=245268

254207 at main turned GCGLSpan::data attribute into member function
GCGLSpan::data().  There were still several references to GCGLSpan::data
pending to be rewritten.

* Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:
(WebCore::GraphicsContextGLOpenGL::readnPixels):
(WebCore::GraphicsContextGLOpenGL::getIntegerv):
(WebCore::GraphicsContextGLOpenGL::getShaderPrecisionFormat):
(WebCore::GraphicsContextGLOpenGL::texImage2D):

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

(cherry picked from commit 53e44f64a50c456378695b3e90ebfd0e9085bd21)


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

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigate-cross-origin-iframe-to-same-url-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigate-cross-origin-iframe-to-same-url-with-fragment-expected.txt
    R LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigate-cross-origin-iframe-to-same-url-expected.txt
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/FrameLoader.h

  Log Message:
  -----------
  Merge 254563 at main - Navigating a cross-origin iframe to the same URL should not replace the current HistoryItem https://bugs.webkit.org/show_bug.cgi?id=245246

Reviewed by Darin Adler.

Navigating a cross-origin iframe to the same URL should not replace the current HistoryItem.
This aligns our behavior with Blink and Gecko.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigate-cross-origin-iframe-to-same-url-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigate-cross-origin-iframe-to-same-url-with-fragment-expected.txt:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadArchive):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
(WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent const):
(WebCore::FrameLoader::loadSameDocumentItem):
* Source/WebCore/loader/FrameLoader.h:

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

(cherry picked from commit 778e351efb2f883b957255017712151e3fffa629)


  Commit: 363aba0f73befbfadb6cb0ea602a4cd6ea3d34cb
      https://github.com/WebKit/WebKit/commit/363aba0f73befbfadb6cb0ea602a4cd6ea3d34cb
  Author: Yacine Bandou <yacine.bandou at softathome.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h

  Log Message:
  -----------
  Merge 254550 at main - [GStreamer][MediaStream] webkitGstElementGetCurrentRunningTime should be defined in WebCore namespace https://bugs.webkit.org/show_bug.cgi?id=244665

Reviewed by Philippe Normand.

This commit fixes r254093, without this commit the build still fails for GStreamer versions < 1.18.

* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:

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

(cherry picked from commit eaadf770f39da22a3a8b6e094e4f067bc5effe30)


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

  Changed paths:
    M LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt
    M LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt
    M LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back.html
    M LayoutTests/fast/loader/stateobjects/replacestate-in-iframe-expected.txt
    M LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html
    M LayoutTests/http/tests/dom/document-fragment-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/event-order/before-load-hash-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/event-order/before-load-hash-twice-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/event-order/pushState-inside-popstate-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/007-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method-expected.txt
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h

  Log Message:
  -----------
  Merge 254519 at main - PopState event should be fired synchronously, even before the load event https://bugs.webkit.org/show_bug.cgi?id=245153

Reviewed by Brent Fulgham.

PopState event should be fired synchronously, even before the load event:
- https://github.com/whatwg/html/issues/1792

We used to delay PopState events until the load event has fired but this
doesn't match other Blink or Gecko.

* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/event-order/before-load-hash-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/event-order/before-load-hash-twice-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/event-order/pushState-inside-popstate-expected.txt:
Rebaseline WPT tests that are now passing or failing a little further. The ones that are still failing and due to the fact that
we fire the load event synchronously instead of queuing a task. As a result, it may fire before hashchange events that were
scheduled before the load has completed. I plan to look into this in a follow-up.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::implicitClose):
(WebCore::Document::statePopped):
* Source/WebCore/dom/Document.h:

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

(cherry picked from commit 9497f1badb3df074553143a369942473cf13c10d)


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

  Changed paths:
    A JSTests/stress/strcat-bigint-oom.js
    M Source/JavaScriptCore/dfg/DFGOperations.cpp

  Log Message:
  -----------
  Merge 254570 at main - [JSC] DFG strcat should handle OOM thrown from ToString(BigInt) https://bugs.webkit.org/show_bug.cgi?id=245287 <rdar://99270573>

Reviewed by Alexey Shvayka.

Our original assumption was that there is no way to throw an error from ToString(primitive-except-symbol).
But this is not true since we can generate super large BigInt and ToString(BigInt) can cause OOM.
This patch makes DFG / FTL strcat operations to handle this error correctly.
LLInt / Baseline already handle it.

* JSTests/stress/strcat-bigint-oom.js: Added.
(foo):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(cherry picked from commit ce7674d47d3cb9a16aa9eaf647dbb25531c3719d)


  Commit: 02d4b02e744848c0706fd75b11fa0470067d76d8
      https://github.com/WebKit/WebKit/commit/02d4b02e744848c0706fd75b11fa0470067d76d8
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/rendering/svg/SVGRenderSupport.cpp

  Log Message:
  -----------
  Merge 254538 at main - Update transforms on SVG shapes/groups when root element size changed https://bugs.webkit.org/show_bug.cgi?id=245120 <rdar://99854279>

Reviewed by Simon Fraser.

We need to also update transforms when the size of the RenderSVGRoot has changed, since percentage based transforms are relative to the root.

Tests:
- imported/w3c/web-platform-tests/css/css-transforms/transform-percent-010.html
- imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-001.html
- imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-003.html

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):

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

(cherry picked from commit 32128c3f2e5789599a6bcf2eb91c9f8cba54815c)


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

  Changed paths:
    M JSTests/stress/exception-in-wrap-argument-for-shadow-realm.js
    M JSTests/stress/remote-function-should-have-resolved-name-string.js
    M JSTests/stress/shadow-realm-tag-registers.js
    M LayoutTests/TestExpectations
    M Source/JavaScriptCore/runtime/OptionsList.h

  Log Message:
  -----------
  Merge 254483 at main - [JSC] Disable ShadowRealm https://bugs.webkit.org/show_bug.cgi?id=245166

Reviewed by Mark Lam.

* Source/JavaScriptCore/runtime/OptionsList.h:

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

(cherry picked from commit 06acbb88e0e92342240020f9c006a13fbe772449)


  Commit: 256c04cba3571b1ac4fa9ca0cf7d40246fbc766c
      https://github.com/WebKit/WebKit/commit/256c04cba3571b1ac4fa9ca0cf7d40246fbc766c
  Author: zhaixiang <zhaixiang at loongson.cn>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/JavaScriptCore/CMakeLists.txt
    M Source/WTF/wtf/PageBlock.h
    M Source/WTF/wtf/PlatformCPU.h
    M Source/WTF/wtf/dtoa/utils.h
    M Source/cmake/WebKitCommon.cmake

  Log Message:
  -----------
  Merge 254155 at main - Initial Linux/LoongArch64 Port https://bugs.webkit.org/show_bug.cgi?id=244664

Reviewed by Michael Catanzaro.

* Source/JavaScriptCore/CMakeLists.txt:
* Source/WTF/wtf/PageBlock.h:
* Source/WTF/wtf/PlatformCPU.h:
* Source/WTF/wtf/dtoa/utils.h:
* Source/cmake/WebKitCommon.cmake:

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

(cherry picked from commit 647e67b23883960fef8890465c0f70d7ab6e63f1)


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

  Changed paths:
    A JSTests/stress/ic-stats-concurrent.js
    M Source/JavaScriptCore/jit/ICStats.cpp
    M Source/WTF/wtf/Spectrum.h
    M Source/WTF/wtf/StackShotProfiler.h

  Log Message:
  -----------
  Merge 254585 at main - [JSC] ICStats should not copy Identifier in different thread https://bugs.webkit.org/show_bug.cgi?id=245309 rdar://98312727

Reviewed by Mark Lam.

ICStats have Spectrum<ICEvent, uint64_t> and ICEvent includes Identifier.
However since Spectrum::buildList copies ICEvent, we end up copying Identifier in the different thread
from the main thread since ICStats dump happens in a side thread.
This patch changes Spetrum so that buildList does not copy the key, and instead we keep a lock during
list iteration.

* JSTests/stress/ic-stats-concurrent.js: Added.
* Source/JavaScriptCore/jit/ICStats.cpp:
(JSC::ICStats::ICStats):
* Source/WTF/wtf/Spectrum.h:
(WTF::Spectrum::KeyAndCount::KeyAndCount):
(WTF::Spectrum::KeyAndCount::operator< const):
(WTF::Spectrum::getLock):
(WTF::Spectrum::buildList const):
* Source/WTF/wtf/StackShotProfiler.h:
(WTF::StackShotProfiler::run):

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

(cherry picked from commit d146ac52ed34ae6c89be3137789cff8133bba362)


  Commit: 21f9d70f26d5a0acf336075d082c82c16717c2f1
      https://github.com/WebKit/WebKit/commit/21f9d70f26d5a0acf336075d082c82c16717c2f1
  Author: Don Olmstead <don.olmstead at sony.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp

  Log Message:
  -----------
  Merge 254590 at main - FrameLoader using bitwise instead of logical operator on booleans https://bugs.webkit.org/show_bug.cgi?id=245318

Reviewed by Chris Dumez.

Clang 14 reported this through `-Wbitwise-instead-of-logical`.

* Source/WebCore/loader/FrameLoader.cpp:

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

(cherry picked from commit bfe70e10846662c9bc4a378a51120bdcd3d98927)


  Commit: 00bf4157789b2f900e57a0b3bc7265cc65ee06fe
      https://github.com/WebKit/WebKit/commit/00bf4157789b2f900e57a0b3bc7265cc65ee06fe
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebKit/Shared/WebUserContentControllerDataTypes.cpp
    M Source/WebKit/Shared/WebUserContentControllerDataTypes.h
    M Source/WebKit/UIProcess/UserContent/WebScriptMessageHandler.cpp
    M Source/WebKit/UIProcess/UserContent/WebScriptMessageHandler.h
    M Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp

  Log Message:
  -----------
  Merge 254599 at main - REGRESSION (iOS 16 Beta): Crash adding / removing ScriptMessageHandlers to WKUserContentController https://bugs.webkit.org/show_bug.cgi?id=243343

Reviewed by Chris Dumez.

250289 at main made WebScriptMessageHandler.m_name an AtomString instead of a String.
This makes it easier for the UI process to crash because of corrupted AtomString tables
due to either misusing APIs on background threads or constructing a JSContext before initializing threading,
which then calls SmallStrings::initializeCommonStrings in the VM constructor.
Unfortunately TestWebKitAPI initializes threading in the TestsController constructor before starting any test code,
so we don't have CI infrastructure that can prevent regressions like this right now.
I did, however, verify that the example app WKWebViewBridgeCrashJSContext asserts every time and crashes sometimes
before this fix but not after.

* Source/WebKit/Shared/WebUserContentControllerDataTypes.cpp:
(WebKit::WebScriptMessageHandlerData::decode):
* Source/WebKit/Shared/WebUserContentControllerDataTypes.h:
* Source/WebKit/UIProcess/UserContent/WebScriptMessageHandler.cpp:
(WebKit::WebScriptMessageHandler::create):
(WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
* Source/WebKit/UIProcess/UserContent/WebScriptMessageHandler.h:
(WebKit::WebScriptMessageHandler::name const):
* Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserScriptMessageHandlers):

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

(cherry picked from commit e7898844fe5a7ac2ccc907df169803ed6fad3399)


  Commit: 063a5c361c183027768d9b156fa96657bed56952
      https://github.com/WebKit/WebKit/commit/063a5c361c183027768d9b156fa96657bed56952
  Author: David Kilzer <ddkilzer at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h

  Log Message:
  -----------
  Merge 254601 at main - Unreviewed build fix for jsc-armv7, jsc-mips, etc.

* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncFill):
- Change ASSERT() to ASSERT_UNUSED() since 'count' may be unused
  if no constexpr values evaluate to true.

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

(cherry picked from commit 4c91eff44a291fd6fe03cb76a0a7cf76adee93e9)


  Commit: ce4554c16c10c1381706f8badf8f8ca1c505c273
      https://github.com/WebKit/WebKit/commit/ce4554c16c10c1381706f8badf8f8ca1c505c273
  Author: Ahmad Saleem <ahmad.saleem792 at gmail.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    A LayoutTests/fast/text/flexbox-selection-gap-painting-expected.html
    A LayoutTests/fast/text/flexbox-selection-gap-painting.html
    A LayoutTests/fast/text/grid-selection-gap-painting-expected.html
    A LayoutTests/fast/text/grid-selection-gap-painting.html
    M Source/WebCore/rendering/RenderBlock.cpp

  Log Message:
  -----------
  Merge 254602 at main - Text Selection on flex and grid box items does not work as expected https://bugs.webkit.org/show_bug.cgi?id=119878

Reviewed by Alan Bujtas.

Merge & Extend for Grid - https://src.chromium.org/viewvc/blink?view=revision&revision=171810

Webkit paints "selection gaps" that extend the selection to the bounds of the selection root.

If the selection spans two flex or grid items, and the selection root is the RenderBody, the selection gap for the first item is painted on top of the second item, obscuring its text.

By making each flex or grid item a selection root, the selection gap is painted only up to the bounds of the flex item.  This is the logic we use for table cells and positioned objects.

* Source/WebCore/rendering/RenderBlock.cpp:
(RednerBlock::isSelectionRoot) - Added isFlexItemIncludingDeprecated and isGridItem to behave similar for Selection paint as Table
* LayoutTests/fast/text/flexbox-selection-gap-painting.html: Added Test
 * LayoutTests/fast/text/flexbox-selection-gap-painting-expected.html: Added Test Expectations
* LayoutTests/fast/text/grid-selection-gap-painting.html: Added Test
* LayoutTests/fast/text/grid-selection-gap-painting-expected.html: Added Test Expectations

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

(cherry picked from commit 48936aafec37b3b17c182f210f46e65bf6df9ba9)


  Commit: 5818088bec0c1f777a89db4b32f5e40635ec8480
      https://github.com/WebKit/WebKit/commit/5818088bec0c1f777a89db4b32f5e40635ec8480
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
    M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
    M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h

  Log Message:
  -----------
  Merge 254574 at main - [iOS] Cmd-G after Cmd-E fails to highlight found result https://bugs.webkit.org/show_bug.cgi?id=245266 rdar://97791726

Reviewed by Wenson Hsieh.

Cmd-E is the keyboard shortcut for "Use Selection For Find". When followed by
Cmd-G, the selection is used to search the text.

In this flow of events, the find panel is not intended to be displayed. Instead,
the found result should simply be flashed (briefly highlighted) and selected.
This functionality is currently unsupported in `WebFoundTextRangeController` as
the highlight (text indicator) is drawn in the find overlay layer, and the layer
is only displayed when a find panel is visible.

To fix, in this scenario, display the text indicator using the UI process.

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setTextIndicator const):
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::decorateTextRangeWithStyle):

Perform the alternate logic if no find overlay layer exits. This approach
matches `UITextView`s logic to differentiate between a full find session (where
and overlay and panel are visible), and the Cmd-E / Cmd-G behavior.

(WebKit::WebFoundTextRangeController::createTextIndicatorForRange):

Factor out text indicator creation into a common method.

(WebKit::WebFoundTextRangeController::setTextIndicatorWithRange):
(WebKit::WebFoundTextRangeController::flashTextIndicatorAndUpdateSelectionWithRange):

Flash (bounce) the text indicator using the UI process via the ChromeClient.

Ensure the selection is updated in the web process.

* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setTextIndicator):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

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

(cherry picked from commit 06d20b1720047468156477322c5e301a2d2fe204)


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

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

  Log Message:
  -----------
  Merge 254610 at main - REGRESSION(254574 at main): Triggers ASSERTS when running wpt tests https://bugs.webkit.org/show_bug.cgi?id=245333

Reviewed by Michael Catanzaro.

Since 254574 at main the WebPageProxy TextIndicator methods are actually called on all ports, including
the ones not supporting this feature. Using ASSERT_NOT_REACHED() for unimplemented features is
un-common as well, usually notImplemented() is used instead, so do so for these code paths.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
(WebKit::WebPageProxy::clearTextIndicator):
(WebKit::WebPageProxy::setTextIndicatorAnimationProgress):

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

(cherry picked from commit b8caa5b21cd31bbc7cb929c59e387f9d3fb59219)


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

  Changed paths:
    M LayoutTests/TestExpectations
    R LayoutTests/http/tests/misc/redirect-to-about-blank-expected.txt
    R LayoutTests/http/tests/misc/redirect-to-about-blank.html
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/redirect-to-about.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/redirect-to-data-expected.txt
    M Source/WebCore/loader/DocumentLoader.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
    M Tools/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp

  Log Message:
  -----------
  Merge 254619 at main - Do not allow redirecting to data: or about: URLs https://bugs.webkit.org/show_bug.cgi?id=230158 <rdar://83244357>

Reviewed by Brent Fulgham.

Do not allow redirecting to data: or about: URLs, as per:
- https://github.com/whatwg/html/pull/7042

This aligns our behavior with Blink and gets us closer to Gecko.

* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/redirect-to-about.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/redirect-to-data-expected.txt:
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):

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

(cherry picked from commit cf4ebbe5d88a1c6b84cde33660c6a693e0cdfddd)


  Commit: a653470eaf6958719898e32b0ae659cdf1c27d41
      https://github.com/WebKit/WebKit/commit/a653470eaf6958719898e32b0ae659cdf1c27d41
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp

  Log Message:
  -----------
  Merge 254663 at main - Ensure key is valid when accessing m_permissionsMap in WebNotificationManager https://bugs.webkit.org/show_bug.cgi?id=245408 <rdar://100155207>

Reviewed by Chris Dumez.

* Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::didUpdateNotificationDecision):
(WebKit::WebNotificationManager::didRemoveNotificationDecisions):
(WebKit::WebNotificationManager::policyForOrigin const):

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

(cherry picked from commit 1cb2337287dc1898667e45123f89ef918ad98486)


  Commit: b465c57d277fbcc2d3e2445329ced6c12c79774b
      https://github.com/WebKit/WebKit/commit/b465c57d277fbcc2d3e2445329ced6c12c79774b
  Author: Matthieu Dubet <m_dubet at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
    M Source/WebCore/rendering/style/StyleRareInheritedData.cpp

  Log Message:
  -----------
  Merge 254627 at main - Explicitly initialize color properties. https://bugs.webkit.org/show_bug.cgi?id=245359

Reviewed by Antti Koivisto.

Before this change, those properties were implicitely
default-initialized to empty color, which is
interpreted as current color.
This change makes the current color initialization
explicit.

* Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleFillData::StyleFillData):
* Source/WebCore/rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):

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

(cherry picked from commit c00fe941b56e6b371bfc1e98d175059f269635f4)


  Commit: 6824e633e9015cdb2ce312da06d7e08b94836c60
      https://github.com/WebKit/WebKit/commit/6824e633e9015cdb2ce312da06d7e08b94836c60
  Author: Alexey Shvayka <shvaikalesh at gmail.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-toJSON-cross-realm-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-toJSON-cross-realm.html
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

  Log Message:
  -----------
  Merge 254639 at main - [WebIDL] Default toJSON() method should create result object in its realm https://bugs.webkit.org/show_bug.cgi?id=244939

Reviewed by Sam Weinig, Yusuke Suzuki, and Darin Adler.

Per ECMA-262 [1], %Object.prototype% notation points to current realm, which
is the realm of toJSON() function [2], and not the relevant one.

Aligns WebKit with Blink and Gecko.

[1] https://tc39.es/ecma262/#sec-well-known-intrinsic-objects (paragraph 2)
[2] https://webidl.spec.whatwg.org/#default-tojson-steps (step 4)

* LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-toJSON-cross-realm-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-toJSON-cross-realm.html: Added.
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateDefaultToJSONOperationDefinition):
* Source/WebCore/bindings/scripts/test/JS/*: Updated.

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

(cherry picked from commit cc81559d3d3269a2f28477738c3ec1c13dd5e8e8)


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

  Changed paths:
    A JSTests/stress/osr-exit-check-node-liveness-heap-bigint-strict-eq.js
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

  Log Message:
  -----------
  Merge 254655 at main - [JSC] HeapBigInt CompareStrictEq should call use after speculation checks https://bugs.webkit.org/show_bug.cgi?id=233682 rdar://86192953

Reviewed by Saam Barati.

Because we call use() before speculation check, in OSR exit, these nodes may be counted as dead, which can make
OSR exit recovering for these node's loc to undefined. We should call `use()` after possible OSR exit (in this case,
speculation).

* JSTests/stress/osr-exit-check-node-liveness-heap-bigint-strict-eq.js: Added.
(shouldBe):
(main.v29):
(main):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:

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

(cherry picked from commit 662e9f67690eac1d94556207cea3186159996337)


  Commit: ba4a54a01673340e4cacb5dc8bc9691229914d0e
      https://github.com/WebKit/WebKit/commit/ba4a54a01673340e4cacb5dc8bc9691229914d0e
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
    M Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.h
    M Source/WebKit/WebProcess/Cache/WebCacheStorageProvider.cpp
    M Source/WebKit/WebProcess/Cache/WebCacheStorageProvider.h
    M Source/WebKit/WebProcess/WebProcess.cpp

  Log Message:
  -----------
  Merge 254660 at main - Do not launch network process for sending WebCacheStorageConnection::reference and WebCacheStorageConnection::dereference https://bugs.webkit.org/show_bug.cgi?id=245370 <rdar://100132550>

Reviewed by Youenn Fablet.

The newly launched network process will have no information about cache identifiers used in previous network process, so
there is no point sending these messages.

* Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::open):
(WebKit::WebCacheStorageConnection::reference):
(WebKit::WebCacheStorageConnection::dereference):
(WebKit::WebCacheStorageConnection::networkProcessConnectionClosed):
* Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.h:
* Source/WebKit/WebProcess/Cache/WebCacheStorageProvider.cpp:
(WebKit::WebCacheStorageProvider::networkProcessConnectionClosed):
* Source/WebKit/WebProcess/Cache/WebCacheStorageProvider.h:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed):

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

(cherry picked from commit 8cdd7d631bd4af28ac1135be960b5554f45419f2)


  Commit: 905f859538279bc412b7a52a4cdd11d63fd39958
      https://github.com/WebKit/WebKit/commit/905f859538279bc412b7a52a4cdd11d63fd39958
  Author: Thomas Devoogdt <thomas.devoogdt at barco.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp

  Log Message:
  -----------
  Merge 254163 at main - WebNotificationManager: fix build if SERVICE_WORKER=OFF

https://bugs.webkit.org/show_bug.cgi?id=244796

Reviewed by Youenn Fablet.

/home/thomas/Documents/nd_falcon/buildroot/output/build/webkitgtk-2.37.1/Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp:139:33: error: ‘SWContextManager’ has not been declared
     else if (auto* connection = SWContextManager::singleton().connection()) {
                                 ^~~~~~~~~~~~~~~~

Signed-off-by: Thomas Devoogdt <thomas.devoogdt at barco.com>

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

(cherry picked from commit a91ffd1fa487cd535befba40a75ff538191275ec)


  Commit: 3fca55d6a28a31d61d823d984c471c9b7d1b351f
      https://github.com/WebKit/WebKit/commit/3fca55d6a28a31d61d823d984c471c9b7d1b351f
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebCore/editing/FrameSelection.cpp

  Log Message:
  -----------
  Merge 254668 at main - Fix !elementStyle.caretColor().isValid() check in FrameSelection.cpp https://bugs.webkit.org/show_bug.cgi?id=245421 <rdar://100166424>

Reviewed by Antti Koivisto.

The intent here is really to check if the value is `auto`, so using `hasAutoCaretColor()` makes it more explicit.
This also makes refactoring Color to StyleColor easier.

* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::CaretBase::computeCaretColor):

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

(cherry picked from commit ec1b260043e4f44ad017340db926319d4f75f45f)


  Commit: eef2cdff1dab3a6d9d9120140840fb0270870e1e
      https://github.com/WebKit/WebKit/commit/eef2cdff1dab3a6d9d9120140840fb0270870e1e
  Author: Michael Catanzaro <mcatanzaro at redhat.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp
    M Source/WebKit/UIProcess/gtk/KeyBindingTranslator.h

  Log Message:
  -----------
  Merge 254672 at main - [GTK] KeyBindingTranslator.m_nativeWidget is leaked
https://bugs.webkit.org/show_bug.cgi?id=245384

Reviewed by Adrian Perez de Castro.

* Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp:
(WebKit::KeyBindingTranslator::KeyBindingTranslator):
(WebKit::KeyBindingTranslator::commandsForKeyEvent):
* Source/WebKit/UIProcess/gtk/KeyBindingTranslator.h:
(WebKit::KeyBindingTranslator::widget const):

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

(cherry picked from commit 97f37b5b39e8853b1d5afdc3b3a46380ebb02336)


  Commit: b1250fd12050a5382eb0e7314a703580e58812f7
      https://github.com/WebKit/WebKit/commit/b1250fd12050a5382eb0e7314a703580e58812f7
  Author: Enrique Ocaña González <eocanha at igalia.com>
  Date:   2022-09-21 (Wed, 21 Sep 2022)

  Changed paths:
    M Source/WTF/wtf/PrintStream.h
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

  Log Message:
  -----------
  Merge 254682 at main - [GStreamer] Fix media player's duration calculation
https://bugs.webkit.org/show_bug.cgi?id=245148

Reviewed by Xabier Rodriguez-Calvar.

Videos without an initially known duration, such as https://traffic.megaphone.fm/GLT1153394917.mp3?updated=1617734730,
are currently detected as infinite videos (live streams). They should be detected as
fixed-length videos instead of as a live broadcast.

This patch changes the behaviour to return invalid time when the video is known not
to be live.

Based on a patch by: Pawel Lampe <pawel.lampe at gmail.com>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/923

* Source/WTF/wtf/PrintStream.h:
(WTF::boolForPrinting): Added overloaded function to print std::optional<bool> values.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seek): Migrate to optional m_isLiveStream preserving the previous behaviour (unset means false).
(WebCore::MediaPlayerPrivateGStreamer::setRate): ditto.
(WebCore::MediaPlayerPrivateGStreamer::setPreload): ditto.
(WebCore::MediaPlayerPrivateGStreamer::buffered const): ditto.
(WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const): ditto.
(WebCore::MediaPlayerPrivateGStreamer::totalBytes const): ditto.
(WebCore::MediaPlayerPrivateGStreamer::platformDuration const): Return invalid time when the duration is unknown and we're completely sure that the video isn't live.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Migrate to optional m_isLiveStream preserving the previous behaviour (unset means false).
(WebCore::MediaPlayerPrivateGStreamer::updateStates): ditto.
(WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag): ditto.
(WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData const): ditto.
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint): ditto.
(WebCore::MediaPlayerPrivateGStreamer::movieLoadType const): ditto.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: m_isLiveStream is now std::optional<bool>.

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

(cherry picked from commit 0d46fa12c99c41a159a9ae5d394a032ec09fd165)


  Commit: 189b20b439acd784f534ffd9b5aa8905cee9003b
      https://github.com/WebKit/WebKit/commit/189b20b439acd784f534ffd9b5aa8905cee9003b
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2022-09-21 (Wed, 21 Sep 2022)

  Changed paths:
    M Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
    M Source/ThirdParty/ANGLE/CMakeLists.txt

  Log Message:
  -----------
  Merge 254687 at main - Always use ESSL translator frontend code in ANGLE
https://bugs.webkit.org/show_bug.cgi?id=245126
rdar://problem/100159739

Reviewed by Adrian Perez de Castro.

These files support input of full GLSL
SymbolTable_autogen.cpp
ImmutableString_autogen.cpp
These are useful only when ANGLE is used as (big) OpenGL
implementation.

These files support input of GLSL ES:
SymbolTable_ESSL_autogen.cpp
ImmutableString_ESSL_autogen.cpp
These should be used when ANGLE is used as WebGL or OpenGL ES
implementation.

Decreases the binary size somewhat.

* Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj:
* Source/ThirdParty/ANGLE/CMakeLists.txt:

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

(cherry picked from commit e130e44dc05dda7556e31d3cf23ba2f3e095249f)


Compare: https://github.com/WebKit/WebKit/compare/9b08ddcb6e3d...189b20b439ac


More information about the webkit-changes mailing list