Commit Graph

240929 Commits

Author SHA1 Message Date
Sihui Liu 27e7112342 Add logging for failure in getting network process connection
https://bugs.webkit.org/show_bug.cgi?id=229102

Reviewed by Geoffrey Garen.

UI process knows more about why network connection cannot be created compared to web process, so let's add
logging in UI process to help debug rdar://80760179.

* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::stateString const):
* UIProcess/AuxiliaryProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getNetworkProcessConnection):
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebProcess/WebProcess.cpp:
(WebKit::getNetworkProcessConnection):


Canonical link: https://commits.webkit.org/240555@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 18:27:16 +00:00
Eric Hutchison 3f6379ce5e [iOS wk2 Release] webrtc/peer-connection-audio-mute2.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=229154.

Unreviewed test gardening.

* platform/ios/TestExpectations:

Canonical link: https://commits.webkit.org/240554@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 18:20:38 +00:00
Philippe Normand 98a8501f96 REGRESSION(r278981): [GStreamer][Debug] Assert crashes when running media/track tests
https://bugs.webkit.org/show_bug.cgi?id=229123

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Xabier Rodriguez-Calvar.

The TrackPrivateBaseGStreamer class now includes all the common code that is used by its
subclasses. InbandTextTrackPrivateGStreamer now returns valid track IDs (fixing the issue of
this regression: ASSERTs). The patch also includes coding style fixes, removal of un-needed
includes and a few other clean-ups related with the Track support in the GStreamer platform
layer.

* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
(WebCore::InbandTextTrackPrivateGStreamer::disconnect): Deleted.
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Deleted.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Deleted.
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
(WebCore::InbandTextTrackPrivateGStreamer::create):
(WebCore::InbandTextTrackPrivateGStreamer::streamId const): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfTrack):
(WebCore::MediaPlayerPrivateGStreamer::handleTextSample):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::generateUniquePlaybin2StreamID):
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::setPad):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfStreamChanged):
(WebCore::TrackPrivateBaseGStreamer::streamChanged):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
(WebCore::TrackPrivateBaseGStreamer::setIndex):
(WebCore::TrackPrivateBaseGStreamer::stream):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:

Canonical link: https://commits.webkit.org/240553@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 18:14:04 +00:00
Ayumi Kojima 3dcb802228 [ Win EWS ] fast/forms/* tests are flaky crashing FAULTING_IP: WebKit!WebCore::FontCache::lastResortFallbackFont+ec [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\platform\graphics\win\FontCacheWin.cpp @ 424].
https://bugs.webkit.org/show_bug.cgi?id=229009

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240552@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:51:48 +00:00
David Kilzer 371a901118 ThreadSanitizer: ignore uninteresting data races for reference counting of static WTF::StringImpl objects
<https://webkit.org/b/229113>

Reviewed by Chris Dumez.

* wtf/text/StringImpl.h:
(WTF::StringImpl::isStatic const):
- Add SUPPRESS_TSAN attribute since the 0x1 bit is set at
  construction and refcounting occurs in increments of 0x2, so
  the static bit never changes.
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
- Return early for static WTF::StringImpl objects to prevent
  TSan from reporting data races for m_refCount.


Canonical link: https://commits.webkit.org/240551@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:49:55 +00:00
Alex Christensen 953d30b139 Fix Catalyst TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=229091

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-16
Reviewed by Wenson Hsieh.

* TestWebKitAPI/Configurations/Base.xcconfig:
Search the correct SDK paths.
* TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:
(TestWebKitAPI::TEST):
Use soft linking for VisionKitCore like we do elsewyere.

Canonical link: https://commits.webkit.org/240550@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:36:12 +00:00
Philippe Normand 79d0e78bb1 [WPE][GTK] Clean build broken with python3 after r280382
https://bugs.webkit.org/show_bug.cgi?id=228628

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Adrian Perez de Castro.

The webkitpy autoinstall doesn't reliably work when it's triggered from concurrent
processes. Replace webkitpy usage in apply-build-revision-to-files.py script with explicit
calls to svnversion, git svn info or git log -1, depending on the kind of SCM checkout.

* glib/apply-build-revision-to-files.py:
(get_build_revision):
(main):

Canonical link: https://commits.webkit.org/240549@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:34:44 +00:00
David Kilzer e7b2ba4278 "make analyze" should run clang static analyzer in deep mode
<https://webkit.org/b/229127>
<rdar://problem/81960587>

Reviewed by Alexey Proskuryakov.

.:

* Makefile.shared:
- Add "analyze" argument to xcodebuild command when invoking
  "make analyze" to run clang static analyzer in deep mode.
  Simplify "make analyze" since $(PATH_TO_SCAN_BUILD) does not
  need to be set.

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj:
- Treat "analyze" the same as "build" for "ACTION" environment
  variable.

Source/WebCore:

* Scripts/generate-derived-sources.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
  variable.

Source/WebKit:

* Scripts/generate-derived-sources.sh:
* WebKit.xcodeproj/project.pbxproj:
- Treat "analyze" the same as "build" for "ACTION" environment
  variable.

Source/WebKitLegacy/mac:

* migrate-headers.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
  variable.

Tools:

* DumpRenderTree/Scripts/generate-derived-sources.sh:
* WebKitTestRunner/Scripts/generate-derived-sources.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
  variable.


Canonical link: https://commits.webkit.org/240548@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:31:24 +00:00
Eric Hutchison 8606da2f62 [Win10 wk1 Release] http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=229146.

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240547@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:23:48 +00:00
Ayumi Kojima efcf9f3466 [ Win EWS ] fast/forms/input-appearance-spinbutton-size.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=229143

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240546@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:23:14 +00:00
Philippe Normand c0b3d3ecbe [GLib] Enable mediastream setting if it's enabled at build-time
https://bugs.webkit.org/show_bug.cgi?id=229134

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Adrian Perez de Castro.

Source/WebKit:

* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsConstructed):

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings):

Canonical link: https://commits.webkit.org/240545@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:18:46 +00:00
Commit Queue 63900f1a8f Unreviewed, reverting r281078.
https://bugs.webkit.org/show_bug.cgi?id=229144

broke GTK/WPE mediastream tests

Reverted changeset:

"REGRESSION(r278981): [GStreamer][Debug] Assert crashes when
running media/track tests"
https://bugs.webkit.org/show_bug.cgi?id=229123
https://commits.webkit.org/r281078

Canonical link: https://commits.webkit.org/240544@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:14:17 +00:00
Philippe Normand 5f1d361204 [GTK][WPE] Test fast/mediastream/mediastreamtrack-video-clone.html is flaky timeout since r280775
https://bugs.webkit.org/show_bug.cgi?id=229063

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Ignore redundant stream collections also in the mediastream case. Both the mediastream and
MSE source elements behave similarly regarding stream collections.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleStreamCollectionMessage):

LayoutTests:

* platform/glib/TestExpectations:

Canonical link: https://commits.webkit.org/240543@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 15:57:04 +00:00
David Kilzer 8c7b653864 Fix ASan+UBSan builds with Xcode 13
<https://webkit.org/b/229122>

Reviewed by Alexey Proskuryakov.

* Scripts/webkitdirs.pm:
(XcodeOptions):
- Use asan+ubsan.xcconfig when both are enabled.
* sanitizer/asan+ubsan.xcconfig: Add.


Canonical link: https://commits.webkit.org/240542@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 15:23:09 +00:00
David Kilzer eec8a050d9 -[WebView initWithCoder:] should use -[NSCoder decodeValueOfObjCType:at:size:]
<https://webkit.org/b/229121>
<rdar://problem/81956163>

Reviewed by Anders Carlsson.

* WebView/WebView.mm:
(-[WebView initWithCoder:]):
- Switch to -[NSCoder decodeValueOfObjCType:at:size:].


Canonical link: https://commits.webkit.org/240541@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 14:45:12 +00:00
Commit Queue 00c2d46548 Unreviewed, reverting r281077.
https://bugs.webkit.org/show_bug.cgi?id=229137

broke GTK/WPE builds

Reverted changeset:

"[WPE][GTK] Clean build broken with python3 after r280382"
https://bugs.webkit.org/show_bug.cgi?id=228628
https://commits.webkit.org/r281077

Canonical link: https://commits.webkit.org/240540@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 14:12:48 +00:00
Carlos Garcia Campos bf6f5e5866 [GTK] Test WebKitWebView/page-visibility is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=214804

Reviewed by Adrian Perez de Castro.

Do not wait for title change if the title already changed.

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewPageVisibility):
* TestWebKitAPI/glib/TestExpectations.json:
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::waitUntilTitleChangedTo):
(WebViewTest::waitUntilTitleChanged):

Canonical link: https://commits.webkit.org/240539@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 13:56:21 +00:00
Philippe Normand 8b8428fcc3 REGRESSION(r278981): [GStreamer][Debug] Assert crashes when running media/track tests
https://bugs.webkit.org/show_bug.cgi?id=229123

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Xabier Rodriguez-Calvar.

The TrackPrivateBaseGStreamer class now includes all the common code that is used by its
subclasses. InbandTextTrackPrivateGStreamer now returns valid track IDs (fixing the issue of
this regression: ASSERTs). The patch also includes coding style fixes, removal of un-needed
includes and a few other clean-ups related with the Track support in the GStreamer platform
layer.

* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
(WebCore::InbandTextTrackPrivateGStreamer::disconnect): Deleted.
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Deleted.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Deleted.
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
(WebCore::InbandTextTrackPrivateGStreamer::create):
(WebCore::InbandTextTrackPrivateGStreamer::streamId const): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfTrack):
(WebCore::MediaPlayerPrivateGStreamer::handleTextSample):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::generateUniquePlaybin2StreamID):
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::setPad):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfStreamChanged):
(WebCore::TrackPrivateBaseGStreamer::streamChanged):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
(WebCore::TrackPrivateBaseGStreamer::setIndex):
(WebCore::TrackPrivateBaseGStreamer::stream):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:

Canonical link: https://commits.webkit.org/240538@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 13:37:52 +00:00
Philippe Normand 49cabc8b26 [WPE][GTK] Clean build broken with python3 after r280382
https://bugs.webkit.org/show_bug.cgi?id=228628

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Adrian Perez de Castro.

The webkitpy autoinstall doesn't reliably work when it's triggered from concurrent
processes. Replace webkitpy usage in apply-build-revision-to-files.py script with explicit
calls to svnversion, git svn info or git log -1, depending on the kind of SCM checkout.

* glib/apply-build-revision-to-files.py:
(get_build_revision):
(main):

Canonical link: https://commits.webkit.org/240537@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 13:34:13 +00:00
Philippe Normand cffb257eea [GTK] MiniBrowser crashes when closed while capturing desktop
https://bugs.webkit.org/show_bug.cgi?id=228232
<rdar://problem/81093648>

Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Adrian Perez de Castro.

Remove explicit detach call from the UIClient. Resetting the page state in the proxy *after*
the clients have been cleared is a better fix for this crash.

* UIProcess/API/glib/WebKitUIClient.cpp:
(attachUIClientToView):
(detachUIClientFromView): Deleted.
* UIProcess/API/glib/WebKitUIClient.h:
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewDispose):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):

Canonical link: https://commits.webkit.org/240536@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 13:33:50 +00:00
Carlos Garcia Campos c919a2db86 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.33.3 release
.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

* gtk/NEWS: Add release notes for 2.33.3.

Canonical link: https://commits.webkit.org/240535@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 10:30:10 +00:00
Carlos Garcia Campos 655e1bb394 Unreviewed. Fix GTK distcheck build
* webkitglib-symbols.map: Remove symbols that are not in the library anymore.

Canonical link: https://commits.webkit.org/240534@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 10:18:32 +00:00
Carlos Garcia Campos 23a2ea0d7d Unreviewed. Fix GTK distcheck build
* gtk/manifest.txt.in: Add missingImage@3x.png to the tarball.

Canonical link: https://commits.webkit.org/240533@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 09:39:02 +00:00
Carlos Garcia Campos 3aca145b9b Move WebMAudioUtilitiesCocoa.h from Headers.cmake to PlatformMac.cmake
https://bugs.webkit.org/show_bug.cgi?id=229129

Unreviewed. Fix GTK/WPE distcheck build.

* Headers.cmake:
* PlatformMac.cmake:

Canonical link: https://commits.webkit.org/240532@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 09:08:12 +00:00
Miguel Gomez fa52cc6b54 [GTK][WPE] Add API to pass WebKitMemoryPressureHandler parameters to the network processes
https://bugs.webkit.org/show_bug.cgi?id=228227

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Added webkit_website_data_manager_set_memory_pressure_settings() API function to pass a
WebKitMemoryPressureSettings instance as the settings to use by all the network processes.

* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* UIProcess/API/glib/WebKitMemoryPressureSettings.cpp:
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkit_website_data_manager_set_memory_pressure_settings):
* UIProcess/API/gtk/WebKitWebsiteDataManager.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WebKitWebsiteDataManager.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didExceedMemoryLimit):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebProcessPool.h:
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::memoryPressureMonitorDisabled):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

Source/WTF:

Added a new method to MemoryPressureHandler to set the configuration by copying the parameter
instead of moving it.

* wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::setConfiguration):

Tools:

Added an API test for webkit_website_data_manager_set_memory_pressure_settings().

* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(MemoryPressureTest::setup):
(MemoryPressureTest::teardown):
(MemoryPressureTest::loadFailedCallback):
(MemoryPressureTest::waitUntilLoadFailed):
(testMemoryPressureSettings):
(beforeAll):


Canonical link: https://commits.webkit.org/240531@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 06:55:58 +00:00
Carlos Garcia Campos e9659f09d6 French translation of webkit.HEAD
https://bugs.webkit.org/show_bug.cgi?id=229119

Rubber-stamped by Carlos Garcia Campos.

* fr.po:

Canonical link: https://commits.webkit.org/240530@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 06:51:32 +00:00
Wenson Hsieh 8fd4a9df7a [iOS 15] editing/selection/ios/select-all-in-readonly-input-does-not-overflow.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=229126
rdar://80384801

Reviewed by Tim Horton.

Source/WebKit:

Remove the (now-unused) testing SPI `-[WKWebView _doAfterResettingSingleTapGesture:]`. See Tools/ChangeLog for
more information.

* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _doAfterResettingSingleTapGesture:]): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _doAfterResettingSingleTapGesture:]): Deleted.

Tools:

This test exercises the ability to cause platform selection views to show up after tapping the web view while a
DOM selection is set. In this codepath, selection views are installed when the web view becomes first responder,
when we call into `-[UIWKTextInteractionAssistant activateSelection]`; the call to `-becomeFirstResponder`, in
turn, comes from UIKit's internal `UITextTapRecognizer` gesture, which recognizes the single tap and makes the
content view first responder.

In the case where this test fails, the synthesized tap gesture fails to activate the text tap recognizer; this
happens because the timing of when the `UITextTapRecognizer` gets reset (i.e. `-_resetGestureRecognizer`) races
against the timing of when the synthesized touch event is sent to the gesture recognizer. When the touch is
delivered to the gesture *before* the text tap gesture is reset, we end up timing out because the text tap
gesture's action never fires and makes the content view first responder.

To ensure that we don't lose this race and time out, we augment the existing mechanism in
`UIScriptControllerIOS::waitForSingleTapToReset()` to wait for *all* enabled single tap (and single touch)
gestures to reset, instead of only waiting for the web view's synthetic click gesture. Importantly, this
includes `UITextTapRecognizer`, which ensures that the touches are delivered to the gesture only after the text
tap gesture has been reset (and transitions to Possible state).

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::waitForSingleTapToReset const):

Instead of using testing SPI (`-_doAfterResettingSingleTapGesture:`) to wait for the single tap to reset, we can
just directly iterate through all the gestures on the content view and wait for all enabled single tap gestures
to transition back to Possible state.

LayoutTests:

Update test expectations for this flaky test.

* platform/ios-14/TestExpectations:
* platform/ios/TestExpectations:


Canonical link: https://commits.webkit.org/240529@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 03:34:05 +00:00
Simon Fraser fdaeefd249 [LFC Display] Make Display::ImageBox a CachedImageClient to get image repaint working
https://bugs.webkit.org/show_bug.cgi?id=229125

Reviewed by Anders Carlsson.

Make Display::ImageBox hold a CachedResourceHandle<CachedImage> so it can register
as a client and get notified about image changes, for repainting.

* display/css/DisplayBoxFactory.cpp:
(WebCore::Display::BoxFactory::displayBoxForLayoutBox const):
* display/css/DisplayImageBox.cpp:
(WebCore::Display::ImageBox::ImageBox):
(WebCore::Display::m_cachedImage):
(WebCore::Display::ImageBox::~ImageBox):
(WebCore::Display::ImageBox::image const):
(WebCore::Display::ImageBox::imageChanged):
(WebCore::Display::ImageBox::debugDescription const):
(WebCore::Display::m_image): Deleted.
* display/css/DisplayImageBox.h:
(WebCore::Display::ImageBox::image const): Deleted.


Canonical link: https://commits.webkit.org/240528@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 20:46:16 +00:00
David Kilzer 18d3311856 Bug 229112: ThreadSanitizer: data races of WTF::String in WebResourceLoadStatisticsStore
<https://webkit.org/b/229112>
<rdar://problem/81940951>

Reviewed by Kate Cheney.

Source/WebCore:

Covered by running layout tests with TSan in:
    http/tests/privateClickMeasurement/

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
- Add WTFMove() for updated SourceSite constructor.  Verified
  that this doesn't create a use-after-move issue.

* loader/PrivateClickMeasurement.h:
(WebCore::PrivateClickMeasurement::SourceSite::SourceSite):
- Change to take rvalue reference for efficiency and to match
  AttributionDestinationSite constructor.
(WebCore::PrivateClickMeasurement::SourceSite::isolatedCopy const): Add.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::isolatedCopy const): Add.
- Add isolatedCopy() methods to use in multi-threaded scenarios.

Source/WebKit:

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::attributePrivateClickMeasurement):
- Make isolated copies of sourceSite and destinationSite to fix
  data races.
(WebKit::WebResourceLoadStatisticsStore::privateClickMeasurementToString):
- Make isolated copy of WTF::String to fix data race.


Canonical link: https://commits.webkit.org/240527@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 20:05:28 +00:00
Arcady Goldmints-Orlov 744ce53aa2 [GLIB] Update test expectations after r280077
https://bugs.webkit.org/show_bug.cgi?id=229124

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-08-15

* platform/glib/TestExpectations:
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

Canonical link: https://commits.webkit.org/240526@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 19:02:34 +00:00
Rob Buis 9d5a28c76f Remove shadow related SVG functionality
https://bugs.webkit.org/show_bug.cgi?id=228870

Patch by Rob Buis <rbuis@igalia.com> on 2021-08-15
Reviewed by Simon Fraser.

Remove shadow related SVG functionality since it was added
for the removed property -webkit-svg-shadow (see r238071).

* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::SVGRenderStyle):
(WebCore::SVGRenderStyle::operator== const):
(WebCore::SVGRenderStyle::copyNonInheritedFrom):
(WebCore::SVGRenderStyle::diff const):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialLightingColor):
(WebCore::SVGRenderStyle::baselineShiftValue const):
(WebCore::SVGRenderStyle::isolatesBlending const):
(WebCore::SVGRenderStyle::initialShadow): Deleted.
(WebCore::SVGRenderStyle::setShadow): Deleted.
(WebCore::SVGRenderStyle::shadow const): Deleted.
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::layout):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const):
(WebCore::RenderSVGRoot::updateCachedBoundaries):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
(WebCore::SVGRenderSupport::computeFloatVisibleRectInContainer):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::~SVGRenderingContext):
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGRenderingContext.h:

Canonical link: https://commits.webkit.org/240525@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 18:38:00 +00:00
Yijia Huang bd94b5eadd [ARM64] Add Pre/Post-Indexed Address Mode to Air for ARM64 (Store Instruction)
https://bugs.webkit.org/show_bug.cgi?id=228538

Reviewed by Filip Pizlo.

The previous patch has introduced the pre/post-index address mode for Load instruction,
which benefits loop program. Here, this patch adds the corresponding mode for Store
instruction. Store Register (immediate) stores a word or a doubleword from a register
to memory. The address that is used for the store is calculated from a base register
and an immediate offset.

######################################
## Pre-Index Address Mode For Store ##
######################################

STR Wt, [Xn, #imm]!

In B3 Reduction Strength, since we have this reduction rule:
    Turns this: Store(value, Add(address, offset1), offset = offset2)
    Into this: Store(value, address, offset = offset1 + offset2)

The equivalent pattern is:
    address = Add(base, offset)
    ...
    memory = Store(value, base, offset)

Here, we only consider the pattern:
    address = Add(base, offset)
    memory = Store(value, base, offset)

And, this patch directly treats it as the canonical form. Ideally, we should move
memory to just after the address like what we did for PreIndex Load in the previous
patch. But, we cannot provide a better way to do that since the value may be
used between address and memory. To move value upward, we must move all descendants
of the value along with it to prevent B3 IR index violations, which is risky and expensive.

Next, lower to Air:
    Move %base, %address
    Move %value, (%address, prefix(offset))

######################################
## Post-Index Address Mode For Load ##
######################################

STR Wt, [Xn], #imm

Then, the equivalent pattern is:
    memory = Store(value, base, 0)
    ...
    address = Add(base, offset)

First, we convert it to the canonical form:
    newOffset = Constant
    newAddress = Add(base, offset)
    memory = Store(value, base, 0) // move the offset and address to just before the memory
    ...
    offset = Identity(newOffset)
    address = Identity(newAddress)

Next, lower to Air:
    Move %base, %newAddress
    Move %value, (%newAddress, postfix(offset))

##############################################
## Test for Pre/Post-Increment Address Mode ##
##############################################

B3 IR:
------------------------------------------------------
Int64 b@0 = ArgumentReg(%x0)
Int64 b@1 = ArgumentReg(%x1)
Int64 b@2 = Const64(8)
Int64 b@3 = Add(b@0, $8(b@2))
Void  b@4 = Store(b@1, b@3, ControlDependent|Writes:Top)
Void  b@5 = Return(b@3, Terminal)
------------------------------------------------------

W/O Pre-Increment Address Mode:
------------------------------------------------------
Move  %x0, %x2,      b@0
Add64  $8, %x2, %x0, b@3
Move  %x1, 8(%x2),   b@4
Ret64 %x0,           b@5
------------------------------------------------------

W/ Pre-Increment Address Mode:
------------------------------------------------------
MoveWithIncrement64 %x1, (%x0,Pre($8)), b@4
Ret64               %x0,                b@5
------------------------------------------------------

B3 IR:
------------------------------------------------------
Int64 b@0 = ArgumentReg(%x0)
Int64 b@1 = ArgumentReg(%x1)
Void  b@2 = Store(b@1, b@0, ControlDependent|Writes:Top)
Int64 b@3 = Const64(8)
Int64 b@4 = Add(b@0, $8(b@3))
Void  b@5 = Return(b@4, Terminal)
------------------------------------------------------

W/O Post-Increment Address Mode:
------------------------------------------------------
Move  %x1, (%x0),      b@2
Add64  $8,   %x0, %x0, b@4
Ret64 %x0,             b@5
------------------------------------------------------

W/ Post-Increment Address Mode:
------------------------------------------------------
MoveWithIncrement64 %x1, (%x0,Post($8)), b@2
Ret64               %x0,                 b@5
------------------------------------------------------

* b3/B3CanonicalizePrePostIncrements.cpp:
(JSC::B3::canonicalizePrePostIncrements):
* b3/B3LowerToAir.cpp:
* b3/testb3.h:
* b3/testb3_3.cpp:
(testStorePreIndex32):
(testStorePreIndex64):
(testStorePostIndex32):
(testStorePostIndex64):
(addShrTests):


Canonical link: https://commits.webkit.org/240524@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 17:41:03 +00:00
Simon Fraser 9f87289b92 [LFC Display] Introduce type-safe rect types for the display tree
https://bugs.webkit.org/show_bug.cgi?id=220214

Reviewed by Alan Bujtas.

Introduce AbsoluteFloatRect, UnadjustedAbsoluteFloatRect and ViewFloatRect which are
type-safe float rect types for the display tree.

AbsoluteFloatRect is relative to document origin. UnadjustedAbsoluteFloatRect is similar,
but is computed before scrolling and transforms are taken into account.

ViewFloatRect is relative to the view.

* WebCore.xcodeproj/project.pbxproj:
* display/DisplayGeometryTypes.h: Copied from Source/WebCore/display/css/DisplayReplacedBox.h.
(WebCore::Display::intersection):
(WebCore::Display::unionRect):
* display/DisplayTree.cpp:
(WebCore::Display::Tree::setBoxNeedsDisplay const):
* display/DisplayTree.h:
* display/DisplayTreeBuilder.cpp:
* display/css/DisplayBox.cpp:
(WebCore::Display::Box::Box):
(WebCore::Display::Box::setNeedsDisplay):
* display/css/DisplayBox.h:
(WebCore::Display::Box::Box):
(WebCore::Display::Box::absoluteBoxRect const):
(WebCore::Display::Box::absolutePaintingExtent const):
* display/css/DisplayBoxClip.cpp:
(WebCore::Display::BoxClip::pushClip):
(WebCore::Display::BoxClip::pushRoundedClip):
* display/css/DisplayBoxClip.h:
(WebCore::Display::BoxClip::clipRect const):
* display/css/DisplayBoxDecorationPainter.cpp:
(WebCore::Display::BoxDecorationPainter::paintFillLayer const):
* display/css/DisplayBoxFactory.cpp:
(WebCore::Display::BoxFactory::displayBoxForRootBox const):
(WebCore::Display::BoxFactory::displayBoxForLayoutBox const):
(WebCore::Display::BoxFactory::displayBoxForTextRun const):
(WebCore::Display::BoxFactory::setupBoxGeometry const):
* display/css/DisplayBoxModelBox.cpp:
(WebCore::Display::BoxModelBox::BoxModelBox):
(WebCore::Display::BoxModelBox::clipForDescendants const):
(WebCore::Display::BoxModelBox::absolutePaintingExtent const):
* display/css/DisplayBoxModelBox.h:
(WebCore::Display::BoxModelBox::BoxModelBox):
(WebCore::Display::BoxModelBox::absoluteBorderBoxRect const):
(WebCore::Display::BoxModelBox::absolutePaddingBoxRect const):
(WebCore::Display::BoxModelBox::absoluteContentBoxRect const):
(WebCore::Display::BoxModelBox::setAbsolutePaddingBoxRect):
(WebCore::Display::BoxModelBox::setAbsoluteContentBoxRect):
* display/css/DisplayContainerBox.cpp:
(WebCore::Display::ContainerBox::ContainerBox):
* display/css/DisplayContainerBox.h:
* display/css/DisplayImageBox.cpp:
(WebCore::Display::ImageBox::ImageBox):
* display/css/DisplayImageBox.h:
* display/css/DisplayReplacedBox.cpp:
(WebCore::Display::ReplacedBox::ReplacedBox):
* display/css/DisplayReplacedBox.h:
(WebCore::Display::ReplacedBox::replacedContentRect const):
(WebCore::Display::ReplacedBox::setReplacedContentRect):
* display/css/DisplayStackingItem.h:
(WebCore::Display::StackingItem::paintedContentBounds const):
(WebCore::Display::StackingItem::paintedBoundsIncludingDescendantItems const):
(WebCore::Display::StackingItem::setPaintedContentBounds):
(WebCore::Display::StackingItem::setPaintedBoundsIncludingDescendantItems):
* display/css/DisplayTextBox.cpp:
(WebCore::Display::TextBox::TextBox):
* display/css/DisplayTextBox.h:


Canonical link: https://commits.webkit.org/240523@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 15:44:27 +00:00
Simon Fraser dbd82840d3 [LFC Display] Add a Display::Box flag for HasTransfrom
https://bugs.webkit.org/show_bug.cgi?id=229115

Reviewed by Alan Bujtas.

It's possible for a non-box model box to have a RenderStyle with a transform, but that
style isn't applied because transforms only apply to atomic inline or block boxes,
so store a bit on Box for boxes that have transforms.

* display/css/DisplayBox.h:
(WebCore::Display::Box::setHasTransform):
(WebCore::Display::Box::hasTransform const):
* display/css/DisplayBoxFactory.cpp:
(WebCore::Display::BoxFactory::constructBoxRareGeometry const):
(WebCore::Display::BoxFactory::setupBoxModelBox const):
* display/css/DisplayCSSPainter.cpp:
(WebCore::Display::CSSPainter::paintAtomicallyPaintedBox):


Canonical link: https://commits.webkit.org/240522@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 15:43:36 +00:00
Said Abou-Hallawa cd6256c1b2 [GPU Process] REGRESSION: WebContent often crashes when opening a Google spreadsheet with charts
https://bugs.webkit.org/show_bug.cgi?id=229106
<rdar://81806877>

Reviewed by Wenson Hsieh.

Source/WebCore:

Add a method to return the backend of the ImageBuffer.

* platform/graphics/ConcreteImageBuffer.h:
* platform/graphics/ImageBuffer.h:

Source/WebKit:

Don't resume processing the DisplayList of an ImageBuffer until its
backend is created.

* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::didAppendData):


Canonical link: https://commits.webkit.org/240521@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-14 23:22:58 +00:00
Arcady Goldmints-Orlov d9d3a13c74 [GLIB] Update baselines after r281012
https://bugs.webkit.org/show_bug.cgi?id=229108

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-08-14

* platform/glib/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: Removed.
* platform/glib/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: Removed.
* platform/glib/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt: Removed.
* platform/glib/imported/w3c/web-platform-tests/fetch/h1-parsing/status-code.window-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt: Removed.

Canonical link: https://commits.webkit.org/240520@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-14 17:38:26 +00:00
Kate Cheney ed82ab2cbd Check quarantine bits before rendering local files
https://bugs.webkit.org/show_bug.cgi?id=229073
<rdar://problem/81430251>

Reviewed by Brent Fulgham.

We shouldn't load files unless they have no quarantine flags or
have been marked user approved.

* Platform/spi/mac/QuarantineSPI.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::isQuarantinedAndNotUserApproved):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
* UIProcess/WebPageProxy.h:


Canonical link: https://commits.webkit.org/240519@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-14 04:47:04 +00:00
Chris Dumez a8487ff2be Add Cross-Origin-Embedder-Policy support for Blob URLs
https://bugs.webkit.org/show_bug.cgi?id=229041

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/html/cross-origin-embedder-policy/blob.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt:

Source/WebCore:

Add Cross-Origin-Embedder-Policy (COEP) support for Blob URLs. We do the same thing as for COOP,
we pass the COEP policy when registering the Blob URL and store it in the BlobData. When we need
the construct a Blob resource response as a result of a load, we add the right COEP headers
based on the BlobData's COEP policy.

No new tests, rebaselined existing tests.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::startLoadingBlobURL):
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registerURL):
(WebCore::Blob::Blob):
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::start):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
* fileapi/ThreadableBlobRegistry.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
* loader/CrossOriginEmbedderPolicy.cpp:
(WebCore::addCrossOriginEmbedderPolicyHeaders):
* loader/CrossOriginEmbedderPolicy.h:
(WebCore::operator==):
* loader/CrossOriginOpenerPolicy.cpp:
(WebCore::addCrossOriginOpenerPolicyHeaders):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* platform/network/BlobData.h:
(WebCore::BlobData::crossOriginEmbedderPolicy const):
(WebCore::BlobData::setCrossOriginEmbedderPolicy):
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
* platform/network/BlobRegistryImpl.h:
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKitLegacy/win:

* WebCoreSupport/WebPlatformStrategies.cpp:

LayoutTests:

Update test expectations to unskip tests that are now passing.

* TestExpectations:


Canonical link: https://commits.webkit.org/240518@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-14 02:28:19 +00:00
Wenson Hsieh 62bef7d348 [iOS 15] fast/events/touch/ios/long-press-on-link.html is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=229095
rdar://80386326

Reviewed by Tim Horton.

Source/WebKit:

This test crashes when run immediately after another test that attempts to present the context menu and ends
with the context menu still showing (in this case, fast/events/touch/ios/long-press-on-image.html). Running
these tests back to back causes us to immediately dismiss the context menu interaction while transitioning to
the second test, which triggers the context menu interaction's dismissal animation.

This animation ends in the middle of the next test (long-press-on-link.html), after the long press has begun and
the context menu interaction has already requested a targeted hint preview, but (importantly) before the context
menu peek animation actually begins (i.e. `-contextMenuInteraction:willDisplayMenuForConfiguration:animator:`).
As a result, we tear down the hint container too early (with the hint view still in the view hierarchy), and
subsequently crash with an exception when UIKit tries to perform coordinate space conversions with the now-
unparented view.

To fix this, we make two small adjustments:
1.      Avoid unparenting the context menu hint container if it still has subviews.
2.      Add plumbing to ensure that the context menu hint container is unparented once all of its subviews have
        been removed (and the container isn't being used for anything else).

* Platform/spi/ios/UIKitSPI.h:

Add an SPI declaration for the `-_didRemoveSubview:` subclassing hook.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKTargetedPreviewContainer initWithContentView:]):
(-[WKTargetedPreviewContainer _didRemoveSubview:]):

Add a new subclass for WKTargetedPreviewContainer that notifies WKContentView when its last subview has been
removed, such that WKContentView can tear down the container view if needed.

(-[WKContentView cleanUpInteraction]):
(-[WKContentView removeContextMenuViewIfPossibleForActionSheetAssistant:]):
(-[WKContentView _targetedPreviewContainerDidRemoveLastSubview:]):
(-[WKContentView _createPreviewContainerWithLayerName:]):
(-[WKContentView _removeContextMenuHintContainerIfPossible]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKContentView _removeContextMenuViewIfPossible]): Deleted.

Additionally rename `-_removeContextMenuViewIfPossible` to `-_removeContextMenuHintContainerIfPossible`, to make
it clear that this method is about removing the container view for context menu hints (and not the hints
themselves).

* UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
(-[WKDataListSuggestionsDropdown _removeContextMenuInteraction]):
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker removeContextMenuInteraction]):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel removeContextMenuInteraction]):
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKSelectPicker removeContextMenuInteraction]):

LayoutTests:

Remove the failing test expectation (and remove a passing expectation for iOS 14 which is no longer necessary
after this fix).

* platform/ios-14/TestExpectations:
* platform/ios/TestExpectations:


Canonical link: https://commits.webkit.org/240517@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-14 00:47:03 +00:00
Brent Fulgham 75525bfbc9 Unreviewed build fix after r281012
https://bugs.webkit.org/show_bug.cgi?id=228861

Add missing constructor signature when USE(CFURLCONNECTION) is true.


* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceErrorCF.cpp: Add missing constructor signature.
(WebCore::ResourceError::ResourceError):


Canonical link: https://commits.webkit.org/240516@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 22:23:15 +00:00
Jer Noble ab16810460 [Cocoa] RemoteMediaPlayerProxy does not receive acceleratedRenderingStateChanged() when video element switches sources
https://bugs.webkit.org/show_bug.cgi?id=229092
<rdar://81902163>

Reviewed by Eric Carlson.

Follow up to r280723; in that patch, a call to acceleratedRenderingStateChanged() was added to
the MediaPlayerPrivateRemote, but only for non-Cocoa ports. Add the same method to the constructor
for the Cocoa version as well.

* WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):


Canonical link: https://commits.webkit.org/240515@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 22:14:28 +00:00
Ayumi Kojima 29e75ab245 [ Win EWS ] http/tests/misc/webtiming-slow-load.py is failing.
https://bugs.webkit.org/show_bug.cgi?id=229099

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240514@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 22:04:37 +00:00
Ayumi Kojima 162434e1c5 [ Win EWS ] fast/forms/caps-lock-indicator-width.html is crashing.
https://bugs.webkit.org/show_bug.cgi?id=229098

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240513@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 21:42:42 +00:00
Alex Christensen 1b8d0221ad SandboxExtension::Handle creation should return std::optional instead of bool
https://bugs.webkit.org/show_bug.cgi?id=228875

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-13
Reviewed by Youenn Fablet.

This modernizes the code somewhat.
This makes it easier to write code that realizes that handle creation can fail.
This is a step towards removing the unnecessary abstraction HandleArray.

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
* Platform/IPC/FormDataReference.h:
(IPC::FormDataReference::encode const):
* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtension::createHandleWithoutResolvingPath):
(WebKit::SandboxExtension::createHandle):
(WebKit::createHandlesForResources):
(WebKit::SandboxExtension::createReadOnlyHandlesForFiles):
(WebKit::SandboxExtension::createHandleForReadWriteDirectory):
(WebKit::SandboxExtension::createHandleForTemporaryFile):
(WebKit::SandboxExtension::createHandleForGenericExtension):
(WebKit::SandboxExtension::createHandleForMachLookup):
(WebKit::SandboxExtension::createHandlesForMachLookup):
(WebKit::SandboxExtension::createHandleForReadByAuditToken):
(WebKit::SandboxExtension::createHandleForIOKitClassExtension):
(WebKit::SandboxExtension::createHandlesForIOKitClassExtensions):
* Shared/SandboxExtension.h:
(WebKit::SandboxExtension::createHandle):
(WebKit::SandboxExtension::createHandleWithoutResolvingPath):
(WebKit::SandboxExtension::createHandleForReadWriteDirectory):
(WebKit::SandboxExtension::createHandleForTemporaryFile):
(WebKit::SandboxExtension::createHandleForGenericExtension):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addPlatformLoadParameters):
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Deleted.
(WebKit::WebPageProxy::scrollingUpdatesDisabledForTesting): Deleted.
(WebKit::WebPageProxy::startDrag): Deleted.
(WebKit::WebPageProxy::setPromisedDataForImage): Deleted.
(WebKit::WebPageProxy::setDragCaretRect): Deleted.
(WebKit::WebPageProxy::platformRegisterAttachment): Deleted.
(WebKit::WebPageProxy::platformCloneAttachment): Deleted.
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
(WebKit::WebPageProxy::insertDictatedTextAsync): Deleted.
(WebKit::WebPageProxy::platformDictationAlternatives): Deleted.
(WebKit::WebPageProxy::errorForUnpermittedAppBoundDomainNavigation): Deleted.
(WebKit::WebPageProxy::paymentCoordinatorConnection): Deleted.
(WebKit::WebPageProxy::paymentCoordinatorBoundInterfaceIdentifier): Deleted.
(WebKit::WebPageProxy::paymentCoordinatorSourceApplicationBundleIdentifier): Deleted.
(WebKit::WebPageProxy::paymentCoordinatorSourceApplicationSecondaryIdentifier): Deleted.
(WebKit::WebPageProxy::paymentCoordinatorAddMessageReceiver): Deleted.
(WebKit::WebPageProxy::paymentCoordinatorRemoveMessageReceiver): Deleted.
(WebKit::WebPageProxy::didStartSpeaking): Deleted.
(WebKit::WebPageProxy::didFinishSpeaking): Deleted.
(WebKit::WebPageProxy::didPauseSpeaking): Deleted.
(WebKit::WebPageProxy::didResumeSpeaking): Deleted.
(WebKit::WebPageProxy::speakingErrorOccurred): Deleted.
(WebKit::WebPageProxy::boundaryEventOccurred): Deleted.
(WebKit::WebPageProxy::voicesDidChange): Deleted.
(WebKit::WebPageProxy::didCreateContextInWebProcessForVisibilityPropagation): Deleted.
(WebKit::WebPageProxy::didCreateContextInGPUProcessForVisibilityPropagation): Deleted.
(WebKit::WebPageProxy::grantAccessToPreferenceService): Deleted.
(WebKit::WebPageProxy::mediaUsageManager): Deleted.
(WebKit::WebPageProxy::addMediaUsageManagerSession): Deleted.
(WebKit::WebPageProxy::updateMediaUsageManagerSessionState): Deleted.
(WebKit::WebPageProxy::removeMediaUsageManagerSession): Deleted.
(WebKit::convertPlatformImageToBitmap): Deleted.
(WebKit::WebPageProxy::requestThumbnailWithOperation): Deleted.
(WebKit::WebPageProxy::requestThumbnailWithFileWrapper): Deleted.
(WebKit::WebPageProxy::requestThumbnailWithPath): Deleted.
(WebKit::WebPageProxy::scheduleActivityStateUpdate): Deleted.
(WebKit::WebPageProxy::addActivityStateUpdateCompletionHandler): Deleted.
(WebKit::WebPageProxy::createAppHighlightInSelectedRange): Deleted.
(WebKit::WebPageProxy::restoreAppHighlightsAndScrollToIndex): Deleted.
(WebKit::WebPageProxy::setAppHighlightsVisibility): Deleted.
(WebKit::WebPageProxy::appHighlightsVisibility): Deleted.
(WebKit::WebPageProxy::appHighlightsOverlayRect): Deleted.
(WebKit::WebPageProxy::setUpHighlightsObserver): Deleted.
(WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions): Deleted.
(WebKit::WebPageProxy::canHandleContextMenuTranslation const): Deleted.
(WebKit::WebPageProxy::handleContextMenuTranslation): Deleted.
(WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo): Deleted.
(WebKit::WebPageProxy::setLastNavigationWasAppInitiated): Deleted.
(WebKit::WebPageProxy::lastNavigationWasAppInitiated): Deleted.
(WebKit::WebPageProxy::grantAccessToAssetServices): Deleted.
(WebKit::WebPageProxy::revokeAccessToAssetServices): Deleted.
(WebKit::WebPageProxy::switchFromStaticFontRegistryToUserFontRegistry): Deleted.
(WebKit::WebPageProxy::fontdMachExtensionHandle): Deleted.
(WebKit::WebPageProxy::contentsOfUserInterfaceItem): Deleted.
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess): Deleted.
(WebKit::WebProcessPool::platformInvalidateContext): Deleted.
(WebKit::WebProcessPool::parentBundleDirectory): Deleted.
(WebKit::WebProcessPool::networkingCachesDirectory): Deleted.
(WebKit::WebProcessPool::webContentCachesDirectory): Deleted.
(WebKit::WebProcessPool::containerTemporaryDirectory): Deleted.
(WebKit::WebProcessPool::setJavaScriptConfigurationFileEnabledFromDefaults): Deleted.
(WebKit::WebProcessPool::omitPDFSupport): Deleted.
(WebKit::WebProcessPool::processSuppressionEnabled const): Deleted.
(WebKit::WebProcessPool::displayBrightness): Deleted.
(WebKit::WebProcessPool::backlightLevelDidChangeCallback): Deleted.
(WebKit::WebProcessPool::accessibilityPreferencesChangedCallback): Deleted.
(WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): Deleted.
(WebKit::WebProcessPool::colorPreferencesDidChangeCallback): Deleted.
(WebKit::WebProcessPool::remoteWebInspectorEnabledCallback): Deleted.
(WebKit::WebProcessPool::startObservingPreferenceChanges): Deleted.
(WebKit::WebProcessPool::registerNotificationObservers): Deleted.
(WebKit::WebProcessPool::unregisterNotificationObservers): Deleted.
(WebKit::WebProcessPool::isURLKnownHSTSHost const): Deleted.
(WebKit::WebProcessPool::nominalFramesPerSecondForDisplay): Deleted.
(WebKit::WebProcessPool::startDisplayLink): Deleted.
(WebKit::WebProcessPool::stopDisplayLink): Deleted.
(WebKit::WebProcessPool::stopDisplayLinks): Deleted.
(WebKit::WebProcessPool::setDisplayLinkPreferredFramesPerSecond): Deleted.
(WebKit::WebProcessPool::setDisplayLinkForDisplayWantsFullSpeedUpdates): Deleted.
(WebKit::WebProcessPool::setCookieStoragePartitioningEnabled): Deleted.
(WebKit::WebProcessPool::clearPermanentCredentialsForProtectionSpace): Deleted.
(WebKit::networkProcessLatencyQOS): Deleted.
(WebKit::networkProcessThroughputQOS): Deleted.
(WebKit::webProcessLatencyQOS): Deleted.
(WebKit::webProcessThroughputQOS): Deleted.
(WebKit::WebProcessPool::applicationIsAboutToSuspend): Deleted.
(WebKit::WebProcessPool::notifyProcessPoolsApplicationIsAboutToSuspend): Deleted.
(WebKit::WebProcessPool::initializeClassesForParameterCoding): Deleted.
(WebKit::WebProcessPool::allowedClassesForParameterCoding const): Deleted.
(WebKit::WebProcessPool::notifyPreferencesChanged): Deleted.
(WebKit::webProcessPoolHighDynamicRangeDidChangeCallback): Deleted.
(WebKit::WebProcessPool::registerHighDynamicRangeChangeCallback): Deleted.
(WebKit::WebProcessPool::systemWillSleep): Deleted.
(WebKit::WebProcessPool::systemDidWake): Deleted.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::publishProgress):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
* UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::addCameraSandboxExtensions):
(WebKit::addMicrophoneSandboxExtension):
(WebKit::addTCCDSandboxExtension):
(WebKit::gpuProcessSessionParameters):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
(WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
* UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp:
(WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::addSource):
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::willCreateMediaStream):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::webProcessDataStoreParameters):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::resumeDownload):
(WebKit::WebProcessPool::startMemorySampler):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::platformSetNetworkParameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parameters):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::load):

Canonical link: https://commits.webkit.org/240512@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 20:53:03 +00:00
Youenn Fablet dd042b29d0 Use profile auto level for WebRTC H264 encoder on Apple Silicon
https://bugs.webkit.org/show_bug.cgi?id=229071
<rdar://80345048>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

AS H264 encoder will fail if its profile is too low compared to the size of the video.
Use autolevel to prevent this.
* Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:

LayoutTests:

* platform/mac/TestExpectations:


Canonical link: https://commits.webkit.org/240511@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 19:30:44 +00:00
Keith Miller 7d7525f03c EnumeratorNextUpdatePropertyName always needs to be able to handle IndexedMode
https://bugs.webkit.org/show_bug.cgi?id=229087

Reviewed by Filip Pizlo.

JSTests:

* stress/for-in-own-structure-and-generic-with-late-add-indexed.js: Added.
(test):
(Foo):

Source/JavaScriptCore:

Right now, this operation incorrectly assumes that EnumeratorNextUpdateIndexAndMode will guarantee
the mode matches the seen mode set. But no speculation is guaranteed and adding such a guarantee
would require adding checkpoints, which is likely not worth it. Instead, this patch just makes
sure we always handle the allocation for IndexedMode.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):


Canonical link: https://commits.webkit.org/240510@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 19:29:04 +00:00
Alex Christensen 91109d4ccc Unreviewed, reverting r281009.
Timing not quite right

Reverted changeset:

"Unprefix -webkit-backface-visibility"
https://bugs.webkit.org/show_bug.cgi?id=170983
https://commits.webkit.org/r281009


Canonical link: https://commits.webkit.org/240509@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 18:58:23 +00:00
Jonathan Bedard 209de802c5 [webkitscmpy] Fix SVN relative URL parsing
https://bugs.webkit.org/show_bug.cgi?id=229075
<rdar://problem/81868773>

Reviewed by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.branch): Check if relative URL path contains local path before stripping local path.


Canonical link: https://commits.webkit.org/240508@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 17:24:16 +00:00
Ayumi Kojima 1fe5d7b1ba [ BigSur Debug wk2 EWS ] webrtc/video-interruption.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=229076

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240507@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 16:39:44 +00:00
Ayumi Kojima fe7f22ec4a REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows.
https://bugs.webkit.org/show_bug.cgi?id=228325.

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240506@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 15:57:32 +00:00