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
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
<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
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
<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
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
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
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
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
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
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
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
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
<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
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
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
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
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
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
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
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
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