Timeline
May 8, 2021:
- 9:53 PM Changeset in webkit [277242] by
-
- 14 edits in trunk/Source
[GPUP] A small video element enters fullscreen with strange animations
https://bugs.webkit.org/show_bug.cgi?id=225548
Reviewed by Eric Carlson.
Use
FloatRectinstead ofIntRectto exchange video element location/size
information between WebContent processes and the UI process to avoid information
mismatch due to floating-point rounding.
Source/WebCore:
Manually tested.
- platform/ios/VideoFullscreenInterfaceAVKit.h:
- platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::setupFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreen):
(VideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(VideoFullscreenInterfaceAVKit::setInlineRect):
Source/WebKit:
Deal with the video element resizing differently for two cases:
1) Video is playing in the inline mode.
2) Video is entering fullscreen/picture-in-picture.
For the latter case,-[WKVideoLayerRemote layoutSublayers]will scale the layer
with the same factor in both X and Y direction.
- GPUProcess/media/RemoteMediaPlayerProxy.h:
- GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
- GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
(WebKit::setVideoInlineSizeIfPossible):
(WebKit::RemoteMediaPlayerProxy::setVideoInlineSizeFenced):
- UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
- UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
- UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::VideoFullscreenManagerProxy::exitFullscreen):
(WebKit::VideoFullscreenManagerProxy::setInlineRect):
(WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline):
- WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::setVideoInlineSizeFenced):
(WebKit::MediaPlayerPrivateRemote::inVideoFullscreenOrPictureInPicture const):
- WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
- WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:
(-[WKVideoLayerRemote layoutSublayers]):
(-[WKVideoLayerRemote resolveBounds]):
- WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::inlineVideoFrame):
(WebKit::VideoFullscreenManager::requestUpdateInlineRect):
- 9:31 PM Changeset in webkit [277241] by
-
- 2 edits in trunk/Source/ThirdParty/ANGLE
[WinCairo] Remove linker warning on ANGLE
https://bugs.webkit.org/show_bug.cgi?id=225501
Reviewed by Darin Adler.
libANGLE is statically linked to libGLESv2.dll so that declspec(dllimport) is not required here.
- include/platform/PlatformMethods.h:
- 9:15 PM Changeset in webkit [277240] by
-
- 4 edits in trunk/Source/JavaScriptCore
Remove calls to the String::toInt family of functions from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=225571
Reviewed by Sam Weinig.
- inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::parseLocation): Use parseIntegerAllowingTrailingJunk<JSC::SourceID>
instead of String::toIntPtr. There was no reason to parse the source ID as a
signed integer, and it's more elegant to parse the type we intend to store and
process, not a different but similar type.
(Inspector::InspectorDebuggerAgent::searchInContent): Ditto.
(Inspector::InspectorDebuggerAgent::getScriptSource): Ditto.
- inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets): Use
parseInteger<uintptr_t> instead of String::toIntPtrStrict.
(Inspector::InspectorRuntimeAgent::getBasicBlocks): Use
parseIntegerAllowingTrailingJunk<uintptr_t> instead of String::toIntPtr.
- runtime/FuzzerPredictions.cpp:
(JSC::FuzzerPredictions::FuzzerPredictions): Use parseInteger<uint64_t>
instead of String::toUInt64Strict.
- 9:09 PM Changeset in webkit [277239] by
-
- 7 edits in trunk/Source/WebKit
Remove uses of the WTF::String::toInt family of functions from WebKit framework sources
https://bugs.webkit.org/show_bug.cgi?id=225570
Reviewed by Sam Weinig.
- NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::readSizeFile): Use parseInteger<uint64_t>
instead of charactersToUIntStrict. Also simplified the code a bit by
reducing the mixing of integer types in the function.
- NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::deleteOldVersions): Use parseInteger<unsigned>
instead of String::toUIntStrict. Also use StringView::substring so we don't
have to allocate a copy of a substring just to parse it.
- Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getClientSDKVersion): Use
parseInteger<uint32_t> instead of charactersToUIntStrict. Also let the
StringView constructor take care of converting the const char*
so we don't have to write explicit calls to std::strlen here.
(WebKit::XPCServiceInitializerDelegate::getProcessIdentifier): Use
parseInteger<uint64_t> instead of String::toUInt64Strict. Also pass the
const char* as a StringView rather than converting it to a String so we
don't have to allocate a copy of the string just to parse it.
- Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::PluginVersion::parse): Use parseIntegerAllowingTrailingJunk<unsigned>
instead of String::toUInt. Also use StringView::split instead of String::split
so we don't have to allocate memory for all the substrings and a range-based
for loop for simplicity.
- UIProcess/API/Cocoa/WKWebView.mm:
(coreTextManipulationItemIdentifierFromString): Use -[NSString longLongValue]
instead of String::toUInt64. There's no need to parse this unsigned because
the values will fit in 63 bits just fine, and it's nice to use NSString
directly rather than copying the string just to parse the integer in it.
(coreTextManipulationTokenIdentifierFromString): Ditto.
- WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parsePostBuffer): Use parseIntegerAllowingTrailingJunk<unsigned>
instead of String::toInt. The length can't be negative; it was not helpful
to parse negative numbers before and this is a small bug fix, but in a code
path that is probably not used for much of anything any more.
- 7:18 PM Changeset in webkit [277238] by
-
- 12 edits in trunk/Source/JavaScriptCore
[JSC] Fix invalid exception checks after recent ErrorInstance changes
https://bugs.webkit.org/show_bug.cgi?id=225565
Reviewed by Alexey Shvayka.
r277221 and r277224 each introduced issues under validateExceptionChecks=1; this patch fixes them.
Of particular note:
The earlier patch sought to consolidate Error#cause logic under ErrorInstance::finishCreation.
This part must be undone as it is crucial that non-user-thrown errors be able to bypass that logic
(otherwise throwException itself would need to be exception-checked).
- runtime/AggregateError.cpp:
(JSC::createAggregateError):
- runtime/ArrayPrototype.cpp:
(JSC::getProperty):
- runtime/Error.cpp:
(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(JSC::createGetterTypeError):
- runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::create):
(JSC::ErrorInstance::finishCreation):
- runtime/ErrorInstance.h:
(JSC::ErrorInstance::create):
- runtime/JSObject.h:
- runtime/JSObjectInlines.h:
(JSC::JSObject::getIfPropertyExists):
- runtime/NullSetterFunction.cpp:
(JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION):
- wasm/js/JSWebAssemblyCompileError.cpp:
(JSC::createJSWebAssemblyCompileError):
- wasm/js/JSWebAssemblyLinkError.cpp:
(JSC::createJSWebAssemblyLinkError):
- wasm/js/JSWebAssemblyRuntimeError.cpp:
(JSC::createJSWebAssemblyRuntimeError):
- 6:29 PM Changeset in webkit [277237] by
-
- 39 edits2 adds in trunk/Source
Factor out pixel buffer from DOM specific ImageData class
https://bugs.webkit.org/show_bug.cgi?id=225554
Reviewed by Darin Adler.
Source/WebCore:
Prepare to fix layering violating use of DOM level ImageData being
used by platform code by factoring out the pixel storage into a new
PixelBuffer class. Since it will be a little more general that
ImageData is now (though ImageData will need to gain these soon)
PixelBuffer also captures the pixel format and color space the pixel
data represents.
While here, update ImageData::data() to return a reference rather than
a pointer to indicate it is never null and update all the callers.
- Headers.cmake:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/js/JSImageDataCustom.cpp:
(WebCore::toJSNewlyCreated):
- bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readTerminal):
- html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise):
- html/ImageData.cpp:
(WebCore::ImageData::create):
(WebCore::ImageData::ImageData):
(WebCore::ImageData::deepClone const):
(WebCore::operator<<):
- html/ImageData.h:
(WebCore::ImageData::size const):
(WebCore::ImageData::width const):
(WebCore::ImageData::height const):
(WebCore::ImageData::data const):
(WebCore::ImageData::colorSpace const):
(WebCore::ImageData::format const):
- html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::createEmptyImageData):
(WebCore::CanvasRenderingContext2DBase::putImageData):
- html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
- inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildArrayForImageData):
- platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::extractImageData):
- platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::ImageBufferBackend::getImageData const):
(WebCore::ImageBufferBackend::putImageData):
- platform/graphics/PixelBuffer.cpp: Added.
(WebCore::PixelBuffer::PixelBuffer):
(WebCore::PixelBuffer::deepClone const):
- platform/graphics/PixelBuffer.h: Added.
(WebCore::PixelBuffer::colorSpace const):
(WebCore::PixelBuffer::format const):
(WebCore::PixelBuffer::size const):
(WebCore::PixelBuffer::data const):
- platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::blurShadowBuffer):
- platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults):
- platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGLOpenGL::paintToCanvas):
- platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::toCFData const):
- platform/graphics/cg/ImageBufferUtilitiesCG.cpp:
(WebCore::cfData):
- platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::platformApplySoftware):
- platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::platformApplySoftware):
- platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::platformApplySoftware):
- platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):
- platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::platformApplySoftware):
- platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::platformApplySoftware):
- platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplySoftware):
- platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplySoftware):
- platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplySoftware):
- platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::platformApplySoftware):
- platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::forceValidPreMultipliedPixels):
(WebCore::FilterEffect::copyConvertedImageBufferToDestination):
(WebCore::FilterEffect::copyConvertedImageDataToDestination):
(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
- rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
Source/WebKit:
Update for ImageData::data() returning a reference.
- GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::populateGetImageDataSharedMemory):
- Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Ref<WebCore::ImageData>>::encode):
- WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
- 6:26 PM Changeset in webkit [277236] by
-
- 2 edits in trunk/Source/WebKitLegacy/mac
[Cocoa] Remove the one use of String::toInt from WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=225568
Reviewed by Sam Weinig.
- DOM/DOMHTMLInputElement.mm:
(-[DOMHTMLInputElement setSize:]): Use -[NSString intValue] instead of WTF::String::toInt.
Both functions ignore leading spaces, and both ignore trailing junk, so there is no
significant change in behavior.
- 6:17 PM Changeset in webkit [277235] by
-
- 16 edits2 deletes in trunk
REGRESSION (r276797?): [ macOS/iOS ] TestWebKitAPI.URLSchemeHandler.Exceptions is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=225373
Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-08
Reviewed by Sam Weinig.
Source/WebKit:
This patch fixes three problems related to the lifetime of WKURLSchemeTasks:
- There was an unneeded abstraction API::URLSchemeTask which wrapped a WebURLSchemeTask, which could have a different lifetime than its owner. This is especially bad since at least one was used on multiple threads.
- We weren't explicitly keeping a strong reference to the task given to the API client in startURLSchemeTask: and stopURLSchemeTask: which could cause all our internal maps to release their references to the task after the first call to didFailWithError and there was a test that did multiple calls to didFailWithError and verifies it throws an NSException the second time.
- We were keeping a HashSet of raw WebURLSchemeHandler pointers, then using each of them without keeping it alive.
This is covered by at least the URLSchemeHandler.Exceptions API test which would crash in many exciting places before this but doesn't crash after this.
- Sources.txt:
- UIProcess/API/APIURLSchemeTask.cpp: Removed.
- UIProcess/API/APIURLSchemeTask.h: Removed.
- UIProcess/API/C/WKTestingSupport.cpp:
(WKGetAPIURLSchemeTaskInstanceCount): Deleted.
- UIProcess/API/C/WKTestingSupport.h:
- UIProcess/API/Cocoa/WKURLSchemeTask.mm:
(-[WKURLSchemeTaskImpl init]):
(-[WKURLSchemeTaskImpl dealloc]):
(-[WKURLSchemeTaskImpl request]):
(-[WKURLSchemeTaskImpl _requestOnlyIfCached]):
(-[WKURLSchemeTaskImpl _willPerformRedirection:newRequest:completionHandler:]):
(-[WKURLSchemeTaskImpl didReceiveResponse:]):
(-[WKURLSchemeTaskImpl didReceiveData:]):
(-[WKURLSchemeTaskImpl didFinish]):
(-[WKURLSchemeTaskImpl didFailWithError:]):
(-[WKURLSchemeTaskImpl _didPerformRedirection:newRequest:]):
(-[WKURLSchemeTaskImpl _frame]):
- UIProcess/API/Cocoa/WKURLSchemeTaskInternal.h:
- UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
- UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
(WebKit::WebURLSchemeHandlerCocoa::platformStartTask):
(WebKit::WebURLSchemeHandlerCocoa::platformStopTask):
(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Deleted.
- UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.h:
- UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.h:
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::stopAllURLSchemeTasks):
- UIProcess/WebURLSchemeHandler.cpp:
(WebKit::WebURLSchemeHandler::taskCompleted):
- UIProcess/WebURLSchemeHandler.h:
- UIProcess/WebURLSchemeTask.h:
- WebKit.xcodeproj/project.pbxproj:
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:
(runUntilTasksInFlight):
- 5:59 PM Changeset in webkit [277234] by
-
- 4 edits in trunk/Source/WTF
Rename toIntegralType to parseInteger and prepare to use it to replace all our integer-parsing functions
https://bugs.webkit.org/show_bug.cgi?id=225560
Reviewed by Sam Weinig.
I have a much larger patch that replaces all the many toInt functions with these parseInteger
function templates. The parseInteger ones take StringView, which means we can pass almost any
type of string or character/length pair including a substring without allocating a new string,
return Optional rather than using an out argument to report failure, take the integer type as
a template parameter so can be used for precisely the desired type at each call site, and make
the "allow trailing junk" feature explicit, rather than implicitly including it in the shortest
named functions, which I hope will discourage people from using that junk-ignoring mode
when it's not desirable.
Also includes adoption of parseInteger within WTF itself, outside the string classes.
My plan is to land the rest of adoption of this in chunks so we can review carefully and spot
mistakes as we go. Then return to files like WTFString.h and remove the many old functions
this replaces, including the String::toInt and charactersToInt families of functions.
- wtf/URL.cpp:
(WTF::URL::port const): Use parseInteger<uint16_t>.
(WTF::URL::setHostAndPort): Ditto.
- wtf/text/StringToIntegerConversion.h: Refactored the existing code to tighten things up
a bit, and got rid of overloads that take pointer and length and the the generic "any string
type" feature, since StringView already works well for that. Renamed toIntegralType to
parseInteger, leaving the old name behind to ease the transition while adopting parseInteger.
- wtf/text/WTFString.cpp:
(WTF::toDoubleType): Use the TrailingJunkPolicy enumeration from the
StringToIntegerConversion.h header.
(WTF::charactersToDouble): Ditto.
(WTF::charactersToFloat): Ditto.
- 5:51 PM Changeset in webkit [277233] by
-
- 2 edits in trunk/Source/WebCore
[Cocoa] Unify font collection handling between all Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=225566
Reviewed by Darin Adler.
Just remove an unnecessary #if.
Covered by existing tests.
- platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
- 5:13 PM Changeset in webkit [277232] by
-
- 4 edits in trunk/Source/WebCore
Add bounds checks around calls to GlyphBuffer::stringOffsetAt()
https://bugs.webkit.org/show_bug.cgi?id=225335
<rdar://problem/75663608>
Reviewed by Simon Fraser and Geoff Garen.
We're getting crash reports that look like they're from string offsets being out-of-bounds.
These string offsets round-trip through Core Text, which is allowed to modify them, which
can end up making them out-of-bounds.
No new tests because I don't have a reproducible test case; just crash reports.
- platform/graphics/FontCascade.cpp:
(WebCore::computeUnderlineType):
- platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::uncheckedStringOffsetAt const):
(WebCore::GlyphBuffer::checkedStringOffsetAt const):
(WebCore::GlyphBuffer::stringOffsetAt const): Deleted.
- platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::applyExtraSpacingAfterShaping):
- 3:35 PM Changeset in webkit [277231] by
-
- 9 edits in trunk
Port Filesystem::pathByAppendingComponent() & Filesystem:: pathByAppendingComponents() to std::filesystem
https://bugs.webkit.org/show_bug.cgi?id=225550
Reviewed by Darin Adler.
Source/JavaScriptCore:
Build fix.
- Configurations/JavaScriptCore.xcconfig:
Source/WTF:
Port Filesystem::pathByAppendingComponent() & Filesystem:: pathByAppendingComponents() to std::filesystem
and get rid of platform-specific implementations.
- wtf/FileSystem.cpp:
(WTF::FileSystemImpl::pathByAppendingComponent):
(WTF::FileSystemImpl::pathByAppendingComponents):
- wtf/glib/FileSystemGlib.cpp:
- wtf/posix/FileSystemPOSIX.cpp:
- wtf/win/FileSystemWin.cpp:
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
- 10:56 AM Changeset in webkit [277230] by
-
- 7 edits in trunk
Fix a typo
https://bugs.webkit.org/show_bug.cgi?id=225502
Patch by Ricky Mondello <Ricky Mondello> on 2021-05-08
Reviewed by Chris Dumez.
Source/WebCore:
- loader/LinkLoader.cpp:
(WebCore::LinkLoader::preconnectIfNeeded):
LayoutTests:
Update test expectations.
- http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt:
- http/tests/preconnect/link-header-rel-preconnect-http-expected.txt:
- http/tests/preconnect/link-rel-preconnect-http-expected.txt:
- http/tests/preconnect/link-rel-preconnect-https-expected.txt:
- 9:54 AM Changeset in webkit [277229] by
-
- 3 edits in trunk/Source/WTF
[GLIB] REGRESSION(r277158) imported/w3c/web-platform-tests/xhr/FormData-append.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=225551
Reviewed by Chris Dumez.
- wtf/FileSystem.cpp:
(WTF::FileSystemImpl::fileIsDirectory): Remove unnecessary path.isEmpty check.
- wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::fileSystemRepresentation): Return empty CString if path is empty.
- 8:03 AM Changeset in webkit [277228] by
-
- 2 edits in trunk/Source/WebCore
Increase stored AppHighlight character limit to 500
https://bugs.webkit.org/show_bug.cgi?id=225558
Reviewed by Tim Horton.
- Modules/highlight/AppHighlightStorage.cpp:
- 7:12 AM Changeset in webkit [277227] by
-
- 1 copy in releases/WPE WebKit/webkit-2.32.1
WPE WebKit 2.32.1
- 7:11 AM Changeset in webkit [277226] by
-
- 4 edits in releases/WebKitGTK/webkit-2.32
Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.32.1 release
.:
- Source/cmake/OptionsWPE.cmake: Bump version numbers.
Source/WebKit:
- wpe/NEWS: Add release notes for 2.32.1
- 3:43 AM Changeset in webkit [277225] by
-
- 3 edits in trunk/Source/WebKit
[SOUP] Use the new libsoup network metrics API
https://bugs.webkit.org/show_bug.cgi?id=225510
Reviewed by Michael Catanzaro.
Use the new API available in libsoup3. It provides more accurate information for time metrics and also size
metrics that were missing.
- NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::createRequest):
(WebKit::NetworkDataTaskSoup::clearRequest):
(WebKit::NetworkDataTaskSoup::resume):
(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
(WebKit::NetworkDataTaskSoup::didGetHeaders):
(WebKit::NetworkDataTaskSoup::wroteHeadersCallback):
(WebKit::NetworkDataTaskSoup::wroteBodyCallback):
(WebKit::NetworkDataTaskSoup::gotBodyCallback):
(WebKit::NetworkDataTaskSoup::networkEvent):
(WebKit::NetworkDataTaskSoup::didStartRequest):
(WebKit::NetworkDataTaskSoup::didRestart):
- NetworkProcess/soup/NetworkDataTaskSoup.h:
- 12:32 AM Changeset in webkit [277224] by
-
- 5 edits in trunk/Source/JavaScriptCore
Introduce JSObject::getIfPropertyExists helper
https://bugs.webkit.org/show_bug.cgi?id=225553
Reviewed by Alexey Shvayka.
Suggested by Alexey during review of r277221.
ArrayPrototype also has a "Has-guarded Get", so it's helpful for JSObject to house this functionality.
- runtime/ArrayPrototype.cpp:
(JSC::getProperty):
- runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
- runtime/JSObject.h:
- runtime/JSObjectInlines.h:
(JSC::JSObject::getIfPropertyExists):
May 7, 2021:
- 9:32 PM Changeset in webkit [277223] by
-
- 2 edits in trunk/LayoutTests
[WPE] Tentative gardening of crashes after last sdk update
Unreviewed test gardening.
Likely more crashes will appear from tests not run due to these
gardened.
- platform/wpe/TestExpectations:
- 6:48 PM Changeset in webkit [277222] by
-
- 4 edits2 adds in trunk
[css-flexbox] Flex item construction may affect sibling flex item height computation
https://bugs.webkit.org/show_bug.cgi?id=225489
Reviewed by Sergio Villar Senin.
Source/WebCore:
Flex item construction triggers layout both on the flex item and on its descendants (see constructFlexItem).
During this layout a percent height descendant may indirectly set an incorrect value on the flex container's
m_hasDefiniteHeight (this is due to the odd way we choose to resolve percent height values on the ancestor chain,
see setOverridingContainingBlockContentLogicalHeight(WTF::nullopt)).
Now this incorrect m_hasDefiniteHeight value (Indefinite) causes the next sibling's (also) percent height
resolve fail as it tells the flex item that the flex container can't help with resolving the percent height value.
As the result we end up with an incorrect, 0px height value for this sibling.
e.g.
<div style="height: 100px; display: flex; flex-direction: column;">
<div id=flexItemA style="height: 50px;"><div style="height: 100%;"></div></div>
<div id=flexItemB style="height: 50%;"></div>
</div>
By the time we get to the construction of flexItemB, the RenderFlexibleBox's (flex container) m_hasDefiniteHeight
is already (and incorrectly) set to Indefinite as the result of us trying to resolve flexItemA's descendant height percentage.
This Indefinite value makes the flexItemB's height resolution fail as we believe that the flex container has indefinite height
e.g "height: auto", while it is clearly resolvable (50% of 100px).
Now if we flip the order and flexItemB comes first, the test case passes fine.
It is very unfortunate that some descendant height resolving process can trigger a state change on the ancestor RenderFlexibleBox, but
fixing it would certainly require some substantial architectural change (e.g. pushing down the constraints to the geometry functions instead of
walking the containing block chain).
In this patch, we just scope m_hasDefiniteHeight so that the RenderFlexibleBox's state is not effected by the flex item construction.
Test: fast/flexbox/flex-column-with-percent-height-descendants.html
- rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutFlexItems):
LayoutTests:
- fast/flexbox/flex-column-with-percent-height-descendants-expected.html: Added.
- fast/flexbox/flex-column-with-percent-height-descendants.html: Added.
- 6:26 PM Changeset in webkit [277221] by
-
- 6 edits in trunk
[JSC] Error#cause must recognize explicit undefined
https://bugs.webkit.org/show_bug.cgi?id=225535
Reviewed by Alexey Shvayka.
JSTests:
- test262/config.yaml:
Re-enable tests for this feature; they were all failing due to this quirk.
Source/JavaScriptCore:
Error#cause is specified such that
new Error(message, {})andnew Error(message, { cause: undefined })
are not the same -- namely, the latter should create a property descriptor with an undefinedvalue.
This would seem absurd, but the reason is because the
causefield is meant to store a thrown object,
andthrow undefined;is valid code.
In aligning our implementation with the spec, this patch also consolidates the relevant logic in one place
(ErrorInstance::finishCreation) to minimize confusion.
- runtime/AggregateError.cpp:
(JSC::createAggregateError):
- runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::create):
(JSC::ErrorInstance::finishCreation):
- runtime/ErrorInstance.h:
(JSC::ErrorInstance::create):
- 6:08 PM Changeset in webkit [277220] by
-
- 2 edits in trunk/Websites/perf.webkit.org
Add support for syncing repo with commit revision label.
https://bugs.webkit.org/show_bug.cgi?id=221982
Reviewed by Ryosuke Niwa.
Add new syncing option reportRevisionIdentifier, which will let the script try to sync the commit revision identifier from the commit message.
Add new syncing option reportSVNRevision, which will let the script try to report SVN revision from a git-svn repo.
- tools/sync-commits.py:
(main):
(load_repository):
(GitRepository.init):
(GitRepository.fetch_next_commit):
(GitRepository._git_hash_to_svn_revision):
(GitRepository._svn_revision_to_git_hash):
(GitRepository._revision_from_tokens):
(GitRepository._fetch_all_hashes):
- 6:05 PM Changeset in webkit [277219] by
-
- 7 edits in trunk
Port FileSystem::pathGetFileName() & Filesystem::directoryName() to std::filesystem
https://bugs.webkit.org/show_bug.cgi?id=225524
Reviewed by Darin Adler.
Source/WTF:
Port FileSystem::pathGetFileName() & Filesystem::directoryName() to std::filesystem so
that we can get rid of platform-specific implementions.
- wtf/FileSystem.cpp:
(WTF::FileSystemImpl::pathGetFileName):
(WTF::FileSystemImpl::directoryName):
- wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::pathGetFileName): Deleted.
(WTF::FileSystemImpl::directoryName): Deleted.
- wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::pathGetFileName): Deleted.
(WTF::FileSystemImpl::directoryName): Deleted.
- wtf/win/FileSystemWin.cpp:
(WTF::FileSystemImpl::pathGetFileName): Deleted.
(WTF::FileSystemImpl::directoryName): Deleted.
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
- 6:04 PM Changeset in webkit [277218] by
-
- 2 edits in trunk/Source/WebKit
[iOS] [GPU] Silence warning about com.apple.audio.AudioComponentRegistrar in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=225547
<rdar://problem/77334436>
Reviewed by Per Arne Vollan.
We block access to various media things (like 'com.apple.audio.AudioComponentRegistrar') when the GPU Process is being used.
Some AudioToolbox code continues to try to connect even though we are not activating relevant parts of the audio subsystem.
AudioToolbox doesn't care about this blocked connection when running in this mode, but they have not had a chance to modify
the framework to avoid attempting to connect.
To avoid spurious logging and telemetry, silence the sandbox violation when the GPU Process is active.
- Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
- 5:38 PM Changeset in webkit [277217] by
-
- 2 edits in trunk/Source/WebKit
[macOS] [GPU] Process is missing access to IOMobileFramebufferUserClient on Apple Silicon
https://bugs.webkit.org/show_bug.cgi?id=225545
<rdar://problem/77591664>
Reviewed by Jer Noble.
Apple Silicon GPU Process needs access to IOMobileFramebufferUserClient for certain types of media playback. We allow this
on iOS, and in the WebContent process, but missed it in the GPU Process.
- GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
- 5:31 PM Changeset in webkit [277216] by
-
- 2 edits in trunk/LayoutTests
[BigSur Release Wk2 Arm64] imported/w3c/web-platform-tests/navigation-timing/test_performance_attributes.sub.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=224784
Unreviewed test gardening.
- platform/mac-wk2/TestExpectations:
- 5:30 PM Changeset in webkit [277215] by
-
- 13 edits in trunk/Source/WebKit
Validate Swift async imports.
https://bugs.webkit.org/show_bug.cgi?id=225134
<rdar://73620237>
Reviewed by Sam Weinig.
Audit our imported Objective-C API for correct translations to Swift's
upcoming concurrency feature. This mostly entails removing redundant
words, tagging methods which Swift's heuristics missed, and in some
cases disabling methods that do not follow Swift's async conventions.
- Shared/API/Cocoa/WKFoundation.h: Because the Foundation macros used
for Swift async won't exist in all SDKs, provide our own wrapper around
them to avoid undefined macro errors.
- SwiftOverlay/Configurations/WebKitSwiftOverlay.xcconfig: Passing these
flags to older tools will result in errors, so only so conditionally.
- SwiftOverlay/WebKitSwiftOverlay.xcodeproj/project.pbxproj: Added a
new source file reference for generated sources. These will be copied
from WebKitAdditions if available, or replaced with empty sources for
compatibility.
- UIProcess/API/Cocoa/NSAttributedString.h: Adopt new attributes to
define an explicit Swift async name.
- UIProcess/API/Cocoa/WKContentRuleListStore.h: Ditto.
- UIProcess/API/Cocoa/WKDownloadDelegate.h: In this case I also apply
NS_SWIFT_NAME as the "decisionHandler" argument would otherwise not
import as async. Despite using a different macro, I'm just using
NS_SWIFT_ASYNC_NAME to check for these changes as all these annotations
should exist or not-exist at once.
- UIProcess/API/Cocoa/WKHTTPCookieStore.h: Ditto.
- UIProcess/API/Cocoa/WKNavigationDelegate.h: Ditto.
- UIProcess/API/Cocoa/WKScriptMessageHandlerWithReply.h: Ditto.
- UIProcess/API/Cocoa/WKUIDelegate.h: Ditto.
- UIProcess/API/Cocoa/WKWebView.h: _Nullable_result is a new annotation
which specifies that the result and error are not mutually exclusive,
but rather than we can expect a nil result in cases where there are not
an error. For the same reason as above, we only want to refer to this
keyword conditionally.
- UIProcess/API/Cocoa/WKWebsiteDataStore.h: Ditto.
- 5:22 PM Changeset in webkit [277214] by
-
- 2 edits in trunk/LayoutTests
[BigSur Release Wk2 Arm64] inspector/css/node-styles-refreshed.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=224788
Unreviewed test gardening.
- platform/mac-wk2/TestExpectations:
- 5:01 PM Changeset in webkit [277213] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Breakpoint action add/remove buttons are not vertically aligned with action dropdown
https://bugs.webkit.org/show_bug.cgi?id=225543
Reviewed by Devin Rousso.
Change the breakpoint action add/remove button's
margin-toptomargin-block-start, and adjust the value to
properly vertically center the buttons with the action type menu.
- UserInterface/Views/BreakpointActionView.css:
(:matches(.breakpoint-action-append-button, .breakpoint-action-remove-button)):
- 4:59 PM Changeset in webkit [277212] by
-
- 4 edits in trunk/Source/WebInspectorUI
Web Inspector: Default source for new test cases is minified
https://bugs.webkit.org/show_bug.cgi?id=225546
Reviewed by Devin Rousso.
Move the placeholder test code to
WI.DefaultAuditsas part of the non-minified sources so that new audit test
cases do not have their default placeholder script minified. This also allows us to remove
WI.AuditTestCase.stringifyFunctionas it is no longer needed.
- UserInterface/Models/AuditTestCase.js:
(WI.AuditTestCase.stringifyFunction): Deleted.
- UserInterface/NonMinified/DefaultAudits.js:
(WI.DefaultAudits.newAuditPlaceholder):
- UserInterface/Views/CreateAuditPopover.js:
(WI.CreateAuditPopover.prototype.dismiss):
(WI.CreateAuditPopover.prototype.dismiss.const.placeholderTestFunction): Deleted.
- 4:49 PM Changeset in webkit [277211] by
-
- 1 copy in tags/Safari-611.3.2
Tag Safari-611.3.2.
- 4:46 PM Changeset in webkit [277210] by
-
- 13 edits2 copies3 adds in trunk/Source
Add an experimental alternative display-list-based RemoteLayerBackingStore implementation
https://bugs.webkit.org/show_bug.cgi?id=225508
Reviewed by Sam Weinig.
Source/WebKit:
- Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp: Added.
(WebKit::CGDisplayListImageBufferBackend::calculateMemoryCost):
(WebKit::CGDisplayListImageBufferBackend::create):
(WebKit::CGDisplayListImageBufferBackend::CGDisplayListImageBufferBackend):
(WebKit::CGDisplayListImageBufferBackend::createImageBufferBackendHandle const):
(WebKit::CGDisplayListImageBufferBackend::context const):
(WebKit::CGDisplayListImageBufferBackend::backendSize const):
(WebKit::CGDisplayListImageBufferBackend::bytesPerRow const):
(WebKit::CGDisplayListImageBufferBackend::copyNativeImage const):
(WebKit::CGDisplayListImageBufferBackend::toBGRAData const):
(WebKit::CGDisplayListImageBufferBackend::getImageData const):
(WebKit::CGDisplayListImageBufferBackend::putImageData):
- Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h: Added.
Add an ImageBuffer backend backed by a CG display list.
- Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
Add a new RemoteLayerBackingStore type that uses CGDisplayListImageBufferBackend.
- Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::encode const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::supportsPartialRepaint):
Disable partial repaint if using display-list-based backing store,
because we don't currently have any way to mutate display lists.
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
When applying a display-list-based backing store to a layer, we just
pass the encodede data directly to the layer, and tell it to use the
display list to render.
- SourcesCocoa.txt:
- UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(WebKit::RemoteLayerTreeNode::createWithPlainLayer):
(-[WKPlainRemoteLayer description]): Deleted.
Move WKPlainRemoteLayer to RemoteLayerTreeLayers, and rename it to WKCompositingLayer.
It will now back all WKCompositingViews.
- UIProcess/RemoteLayerTree/cocoa/RemoteLayerTreeLayers.h: Added.
- UIProcess/RemoteLayerTree/cocoa/RemoteLayerTreeLayers.mm: Added.
(-[WKCompositingLayer description]):
(-[WKCompositingLayer _setWKContentsDisplayList:]):
(-[WKCompositingLayer _wkContentsDisplayList]):
(-[WKCompositingLayer drawInContext:]):
Make WKCompositingLayer replay the given display list in drawRect
(just because we're currently missing API to actually directly pass
the encoded display list data to CA).
- UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(+[WKCompositingView layerClass]):
Use WKCompositingLayer as the layer class for all WKCompositingViews.
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/GPU/graphics/ImageBufferBackendHandle.h:
- WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateBackingStore):
- WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::useCGDisplayListsForDOMRendering const):
(WebKit::RemoteLayerTreeContext::setUseCGDisplayListsForDOMRendering):
- WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
Plumb the internal feature flag from WebPreferences to RemoteLayerTreeContext
to PlatformCALayerRemote to RemoteLayerBackingStore; if the preference is
on and the feature is available, we'll always prefer display-list backed
surfaces over either of the bitmap types.
Source/WTF:
- Scripts/Preferences/WebPreferencesInternal.yaml:
- 4:03 PM Changeset in webkit [277209] by
-
- 4 edits in trunk
[iOS] Make AccessibilityReduceMotion test case work on iOS
https://bugs.webkit.org/show_bug.cgi?id=225244
<rdar://problem/77589455>
Reviewed by Per Arne Vollan.
New tests for Accessibility-related features were added in Bug 215664, but only for macOS.
We support these same features on iOS, and should have test coverage.
Source/WebKit:
Tested by AccessibilityReduceMotion.mm.
- Platform/spi/Cocoa/AccessibilitySupportSPI.h:
Tools:
- TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm:
(notificationCallback):
(TEST):
- 3:55 PM Changeset in webkit [277208] by
-
- 2 edits in trunk/Source/WebKit
[iOS] [GPU] Silence warning about com.apple.fontservicesd
https://bugs.webkit.org/show_bug.cgi?id=225520
<rdar://problem/77536616>
Reviewed by Per Arne Vollan.
We silenced the warnings about blocked connections to 'com.apple.fontservicesd' in the WebContent process in Bug 220320. We should
have done the same to the GPU Process to avoid spurious reports and telemetry.
- Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
- 3:33 PM Changeset in webkit [277207] by
-
- 2 edits in trunk/LayoutTests
[ BigSur Release wk2 ARM64 ] http/tests/workers/service/self_registration.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225527
Unreviewed test gardening.
Updating expectations to Pass Timeout for BigSur Release wk 2 on Apple Silicon.
- platform/mac-wk2/TestExpectations:
- 3:23 PM Changeset in webkit [277206] by
-
- 5 edits in trunk
Unreviewed, reverting r277201.
https://bugs.webkit.org/show_bug.cgi?id=225542
Includes project file change.
Reverted changeset:
"[iOS] Make AccessibilityReduceMotion test case work on iOS"
https://bugs.webkit.org/show_bug.cgi?id=225244
https://trac.webkit.org/changeset/277201
- 3:05 PM Changeset in webkit [277205] by
-
- 2 edits in trunk/LayoutTests
REGRESSION (r277071): imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is failing
https://bugs.webkit.org/show_bug.cgi?id=225469
Unreviewed test gardening.
- platform/mac/TestExpectations: Resolve an issue with conflicting test expectations entries.
- 3:02 PM Changeset in webkit [277204] by
-
- 2 edits in trunk/LayoutTests
[ BigSur Release wk2 ARM64 ] http/tests/misc/repeat-open-cancel.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225526
Unreviewed test gardening.
Updating test expectations to Pass Timeout for Bigsur wk2 Release arm64.
- platform/mac-wk2/TestExpectations:
- 3:00 PM Changeset in webkit [277203] by
-
- 3 edits in trunk/Source/WebCore
[iOS] fix inconsistency around the meaning of
rateanddefaultPlaybackRatebetween WebKit and AVKit
https://bugs.webkit.org/show_bug.cgi?id=225532
<rdar://problem/77629276>
Reviewed by Eric Carlson.
In AVKit, the
defaultPlaybackRateis used when playback starts, such as resuming after
pausing. In WebKit, however,defaultPlaybackRateis only used when first loading and after
ending scanning, with theplaybackRatebeing used in all other cases, including when
resuming after pausing. As such, WebKit should return theplaybackRateinstead of the
defaultPlaybackRatein these cases when communicating with AVKit.
- platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController setRate:]):
AlsosetDefaultPlaybackRate:if not paused (i.e.rate != 0) since WebKit's definition of
playbackRatedoes not change when paused.
- platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::rateChanged):
Make sure tosetDefaultPlaybackRate:beforesetRate:as the latter can affect the former.
- 2:54 PM Changeset in webkit [277202] by
-
- 7 edits2 adds in trunk
Do not try to remove and already removed node while deleting selection
https://bugs.webkit.org/show_bug.cgi?id=224893
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-05-07
Reviewed by Ryosuke Niwa.
Source/WebCore:
Test: editing/inserting/insert-text-force-repaint-on-load-crash.html
- editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode): Return early if the given node doesn't have a parent anymore.
Tools:
Add new API to allow tests to trigger a force repaint on load finished.
- WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::frameDidChangeLocation):
- WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::displayOnLoadFinish):
(WTR::TestRunner::shouldDisplayOnLoadFinish):
LayoutTests:
- editing/inserting/insert-text-force-repaint-on-load-crash-expected.txt: Added.
- editing/inserting/insert-text-force-repaint-on-load-crash.html: Added.
- 2:42 PM Changeset in webkit [277201] by
-
- 5 edits in trunk
[iOS] Make AccessibilityReduceMotion test case work on iOS
https://bugs.webkit.org/show_bug.cgi?id=225244
<rdar://problem/77589455>
New tests for Accessibility-related features were added in Bug 215664, but only for macOS.
We support these same features on iOS, and should have test coverage.
Reviewed by Per Arne Vollan.
Source/WebKit:
Tested by AccessibilityReduceMotion.mm.
- Platform/spi/Cocoa/AccessibilitySupportSPI.h:
Tools:
- TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm:
(notificationCallback):
(TEST):
- 2:40 PM Changeset in webkit [277200] by
-
- 2 edits in trunk/LayoutTests
REGRESSION: [ BigSurE Release wk 2] webrtc/video-replace-muted-track.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225525
Unreviewed test gardening.
Updating test expectations to Pass Failure
- platform/mac/TestExpectations:
- 2:32 PM Changeset in webkit [277199] by
-
- 6 edits in trunk
IPC testing API should have the ability to create and receive IPC::Semaphore
https://bugs.webkit.org/show_bug.cgi?id=225537
Reviewed by Wenson Hsieh.
Source/WebKit:
This patch adds the capability to create IPC::Semaphore for IPC testing purposes.
It adds IPC.createSemaphore which creates a JavaScript object representing a semaphore
with signal and waitFor methods like IPC::Semaphore but waitFor taking milliseconds
to be consistent with other JavaScript APIs.
This patch also adds the support for encoding RemoteRenderingBackendCreationParameters
to facilitate creating a remote rendering backend during IPC testing.
Tests: TestWebKitAPI.IPCTestingAPI.CanReceiveIPCSemaphore
TestWebKitAPI.IPCTestingAPI.CanCreateIPCSemaphore
- Platform/IPC/JSIPCBinding.cpp:
(IPC::jsValueForDecodedArgumentValue): Takes r-value reference since IPC::Semaphore
doesn't have a copy constructor.
- Platform/IPC/JSIPCBinding.h:
(IPC::jsValueForDecodedArgumentValue): Ditto. Added a specialization for IPC::Semaphore.
(IPC::putJSValueForDecodeArgumentInArray):
- WebProcess/WebPage/IPCTestingAPI.cpp:
(WebKit::IPCTestingAPI::JSIPCSemaphore): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::create): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::exchange): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::JSIPCSemaphore): Added.
(WebKit::IPCTestingAPI::createTypeError): Moved up.
(WebKit::IPCTestingAPI::JSIPCSemaphore::createJSWrapper): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::wrapperClass): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::unwrap): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::toWrapped): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::initialize): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::finalize): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::staticFunctions): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::signal): Added.
(WebKit::IPCTestingAPI::JSIPCSemaphore::waitFor): Added.
(WebKit::IPCTestingAPI::JSIPC::wrapperClass):
(WebKit::IPCTestingAPI::JSIPC::staticFunctions): Added IPC.createSemaphore.
(WebKit::IPCTestingAPI::getObjectIdentifierFromProperty): Added.
(WebKit::IPCTestingAPI::encodeRemoteRenderingBackendCreationParameters): Added.
(WebKit::IPCTestingAPI::encodeArgument): Added the support for encoding
RemoteRenderingBackendCreationParameters as an IPC argument.
(WebKit::IPCTestingAPI::JSIPC::createSemaphore): Added.
(IPC::jsValueForDecodedArgumentValue): Defined the aforementioned specialization for
IPC::Semaphore with IPCTestingAPI .
Tools:
Added tests to make sure IPC testing API allows creation of a semaphore,
and receiving one as a reply to an IPC message.
- TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
(IPCTestingAPI.CanReceiveIPCSemaphore): Added.
(IPCTestingAPI.CanCreateIPCSemaphore): Added.
- 2:28 PM Changeset in webkit [277198] by
-
- 2 edits in trunk/LayoutTests
REGRESSION: [ BigSurE Release wk 2] webrtc/direction-change.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225523
Unreviewed test gardening.
Updating test expectation to Pass Failure.
- platform/mac/TestExpectations:
- 2:14 PM Changeset in webkit [277197] by
-
- 43 edits29 adds in trunk/JSTests
Update test262 (2021.05.07)
https://bugs.webkit.org/show_bug.cgi?id=225536
Reviewed by Alexey Shvayka.
- test262/config.yaml:
- test262/expectations.yaml:
- test262/latest-changes-summary.txt:
- test262/test/:
- test262/test262-Revision.txt:
- 1:28 PM Changeset in webkit [277196] by
-
- 24 edits1 add in trunk/Source
[macOS] Set the -isSourceEditable property when presenting webpage translation popup
https://bugs.webkit.org/show_bug.cgi?id=225515
<rdar://problem/77658040>
Reviewed by Tim Horton.
Source/WebCore:
Set
-[LTUITranslationViewController isSourceEditable]toYESwhen showing the context menu for editable
content. Instead of plumbing another boolean flag throughContextMenuClientand into the client layers through
handleTranslation(), we roll all of the webpage translation context menu parameters into a single object
(TranslationContextMenuInfo), including a new flag indicating whether or not the translation controller should
be shown in "editable" mode.
- Headers.cmake:
- WebCore.xcodeproj/project.pbxproj:
- loader/EmptyClients.cpp:
- page/ContextMenuClient.h:
- page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
- page/TranslationContextMenuInfo.h: Added.
Pull the translated text string, selection bounds, menu location, and the new mode flag into a separate struct.
(WebCore::TranslationContextMenuInfo::encode const):
(WebCore::TranslationContextMenuInfo::decode):
Source/WebKit:
See WebCore/ChangeLog for more details.
- UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::handleContextMenuTranslation):
- UIProcess/Cocoa/WebViewImpl.h:
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleContextMenuTranslation):
- UIProcess/PageClient.h:
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- UIProcess/mac/PageClientImplMac.h:
- UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::handleContextMenuTranslation):
- WebProcess/WebCoreSupport/WebContextMenuClient.h:
- WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::handleTranslation):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleContextMenuTranslation):
- WebProcess/WebPage/WebPage.h:
Source/WebKitLegacy/mac:
See WebCore/ChangeLog for more details.
- WebCoreSupport/WebContextMenuClient.h:
- WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::handleTranslation):
- WebView/WebView.mm:
(-[WebView _handleContextMenuTranslation:]):
(-[WebView _handleContextMenuTranslation:selectionBounds:menuLocation:]): Deleted.
- WebView/WebViewInternal.h:
- 1:09 PM Changeset in webkit [277195] by
-
- 1 copy in tags/Safari-612.1.12.4
Tag Safari-612.1.12.4.
- 12:51 PM WebKitGTK/StableRelease edited by
- (diff)
- 11:56 AM Changeset in webkit [277194] by
-
- 3 edits in trunk/LayoutTests
[ Mac ] accessibility/mac/expanded-notification.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205410
Unreviewed test gardening.
Updating test expectations to include all mac.
- platform/mac/TestExpectations:
- 11:48 AM Changeset in webkit [277193] by
-
- 3 edits2 adds in branches/safari-611-branch
Cherry-pick r276739. rdar://problem/77581103
Don't create custom scrollbars for fullscreen placeholders.
https://bugs.webkit.org/show_bug.cgi?id=225141
Source/WebCore:
<rdar://64800098>
Reviewed by Darin Adler.
We can end up calling RenderScrollbar::createCustomScrollbar with
element = nullptrfrom RenderLayer::createScrollbar,
when the renderer is a RenderFullscreenPlaceholder.
We don't need to bother with scrollbars for the placeholder, so check to
make sure we have a valid element before creating custom scollbars.
Test: fullscreen/full-screen-crash-custom-scrollbars.html
- rendering/RenderLayer.cpp: (WebCore::RenderLayer::createScrollbar):
LayoutTests:
Reviewed by Darin Adler.
- fullscreen/full-screen-crash-custom-scrollbars-expected.txt: Added.
- fullscreen/full-screen-crash-custom-scrollbars.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277192] by
-
- 8 edits2 adds in branches/safari-611-branch
Cherry-pick r276627. rdar://problem/77580982
Create a containing block when relevant properties are set in the current element will-change
https://bugs.webkit.org/show_bug.cgi?id=167868
Patch by Tim Nguyen <ntim@apple.com> on 2021-04-26
Reviewed by Alan Bujtas.
Per spec, any CSS property that is susceptible to create a containing block should create one when put on the
current element's will-change.
Relevant WPT are enabled.
Test: fast/css/will-change/will-change-creates-containing-block.html
LayoutTests/imported/w3c:
- web-platform-tests/css/css-box/parsing/padding-computed-expected.txt:
Source/WebCore:
- rendering/RenderElement.h: (WebCore::RenderElement::canContainFixedPositionObjects const): (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
- rendering/style/WillChangeData.cpp: (WebCore::WillChangeData::createsContainingBlockForOutOfFlowPositioned const):
- rendering/style/WillChangeData.h:
LayoutTests:
- TestExpectations:
- fast/css/will-change/will-change-creates-containing-block-expected.html: Added.
- fast/css/will-change/will-change-creates-containing-block.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277191] by
-
- 24 edits in branches/safari-611-branch/Source/WebCore
Cherry-pick r276575. rdar://problem/77581037
Make more IndexedDB objects iso-heap'ed
https://bugs.webkit.org/show_bug.cgi?id=225029
Reviewed by Darin Adler.
Deployed IsoHeap on more IndexedDB objects.
- Modules/indexeddb/IDBFactory.cpp:
- Modules/indexeddb/IDBFactory.h:
- Modules/indexeddb/IDBGetAllResult.cpp:
- Modules/indexeddb/IDBGetAllResult.h:
- Modules/indexeddb/IDBGetResult.cpp:
- Modules/indexeddb/IDBGetResult.h:
- Modules/indexeddb/IDBIndex.cpp:
- Modules/indexeddb/IDBIndex.h:
- Modules/indexeddb/IDBKey.cpp:
- Modules/indexeddb/IDBKey.h:
- Modules/indexeddb/IDBObjectStore.cpp:
- Modules/indexeddb/IDBObjectStore.h:
- Modules/indexeddb/IDBRecordIdentifier.h: Removed since it's not used anywhere.
- Modules/indexeddb/IDBRequest.cpp:
- Modules/indexeddb/IDBRequest.h:
- Modules/indexeddb/client/IDBConnectionProxy.cpp:
- Modules/indexeddb/client/IDBConnectionProxy.h:
- Modules/indexeddb/client/IDBConnectionToServer.cpp:
- Modules/indexeddb/client/IDBConnectionToServer.h:
- Modules/indexeddb/client/TransactionOperation.cpp:
- Modules/indexeddb/client/TransactionOperation.h:
- Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
- Modules/indexeddb/shared/IDBDatabaseInfo.h:
- WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277190] by
-
- 4 edits in branches/safari-611-branch
Cherry-pick r276983. rdar://problem/77581150
localStorage changes aren't reflected between WKWebViews using WKWebViewConfiguration._groupIdentifier
https://bugs.webkit.org/show_bug.cgi?id=225344
<rdar://77496721>
Reviewed by Brady Eidson.
Source/WebKit:
When we switched from using _pageGroup to _groupIdentifier, we also broke localStorage by making a new pageGroupID for each WKWebView.
This is the low-risk solution to this problem that remembers what pageGroupID we used for this same identifier, creating the effect of
using the same StorageNamespaceIdentifier for each _groupIdentifier like we did when we used _pageGroup.
See the comment in StorageAreaMap::dispatchLocalStorageEvent.
The higher-risk solution that needs to be done but probably shouldn't be merged to a branch at this point is to remove StorageNamespaceIdentifier.
I plan to do that in a follow-up patch.
- UIProcess/WebPageGroup.cpp: (WebKit::pageGroupData):
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277189] by
-
- 3 edits in branches/safari-611-branch/Source/WebCore
Cherry-pick r276696. rdar://problem/77581076
Use a WeakHashSet for Document::m_mediaElements
https://bugs.webkit.org/show_bug.cgi?id=225082
Patch by Ian Gilbert <iang@apple.com> on 2021-04-28
Reviewed by Ryosuke Niwa.
Refactoring to use weak pointer instead of raw pointer.
No observable change of behavior.
- dom/Document.cpp: (WebCore::Document::registerMediaElement): (WebCore::Document::unregisterMediaElement): (WebCore::Document::forEachMediaElement):
- dom/Document.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277188] by
-
- 3 edits2 adds in branches/safari-611-branch
Cherry-pick r276630. rdar://problem/77581089
[MathML] Assertion failure in RenderTreeNeedsLayoutChecker
https://bugs.webkit.org/show_bug.cgi?id=224903
Patch by Frédéric Wang <fwang@igalia.com> on 2021-04-27
Reviewed by Alan Bujtas.
Source/WebCore:
After r226180, RenderMathMLRow no longer performs layout of its "embellished operator"
children only its core <mo> descendant, which is causing dirty layout.
Test: mathml/vertical-embellished-op-dirty-layout.html
- rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::stretchVerticalOperatorsAndLayoutChildren): always layout the "embellished operator" child, after its core <mo>.
LayoutTests:
Add regression test with all vertical embellished operators (other than <mo>) supported
by WebKit.
- mathml/vertical-embellished-op-dirty-layout-expected.txt: Added.
- mathml/vertical-embellished-op-dirty-layout.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277187] by
-
- 2 edits in branches/safari-611-branch/Source/WebCore
Cherry-pick r276492. rdar://problem/77581017
Do not set synchronous scrolling for layers without relevant scrolling scopes
https://bugs.webkit.org/show_bug.cgi?id=221383
Reviewed by Simon Fraser.
Fixed backgrounds could force the layer compositor to set synchronous scrolling because they're slow
to repaint. However that cannot be done if the layer's boxScrollingScope hasn't been previously updated
in RenderLayer::updateLayerPosition.
- rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes): Do not call setSynchronousScrollingReasons() if there is no scrollingScope.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277186] by
-
- 2 edits in branches/safari-611-branch/Source/WebCore
Cherry-pick r275938. rdar://problem/77581120
Do not reset computed style for element children with display contents style
https://bugs.webkit.org/show_bug.cgi?id=223794
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-04-14
Reviewed by Antti Koivisto.
We were checking hasDisplayContents() was false before calling resetComputedStyle() on the parent, but we don't
check it when iterating the children.
- dom/Element.cpp: (WebCore::Element::resetComputedStyle):
- style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveComposedTree):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:48 AM Changeset in webkit [277185] by
-
- 4 edits2 adds in branches/safari-611-branch
Cherry-pick r275607. rdar://problem/77581135
REGRESSION (r270849): Button content fails to render on apple.com "Blood Oxygen"/"ECG"
https://bugs.webkit.org/show_bug.cgi?id=224261
Reviewed by Simon Fraser.
Source/WebCore:
- The changeRequiresRecompositeLayer check in RenderStyle::diff should come after changeRequiresRepaintIfTextOrBorderOrOutline since RepaintIfTextOrBorderOrOutline is at a higher priority in StyleDifference.
- Ensure that we trigger setNeedsCompositingConfigurationUpdate on diff >= StyleDifference::RecompositeLayer.
Test: fast/text/text-repaint-when-pointer-event-property-changes.html
- rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerStyleChanged):
- rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff const):
LayoutTests:
- fast/text/text-repaint-when-pointer-event-property-changes-expected.html: Added.
- fast/text/text-repaint-when-pointer-event-property-changes.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:47 AM Changeset in webkit [277184] by
-
- 5 edits2 adds in branches/safari-611-branch
Cherry-pick r271669. rdar://problem/77580999
Fix nullptr dereference introduced in r268228
https://bugs.webkit.org/show_bug.cgi?id=220776
Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-20
Reviewed by Chris Dumez.
Source/WebCore:
Instead of taking data from the FileReaderLoader, which it assumes it still has later,
only give the bytes to JavaScript that have been received since last time we called didReceiveData.
This makes blob.stream correct and not crash.
Test: fast/files/blob-stream-crash-2.html
- fileapi/Blob.cpp: (WebCore::Blob::stream):
- fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::takeRawData): Deleted.
- fileapi/FileReaderLoader.h: (WebCore::FileReaderLoader::totalBytes const):
LayoutTests:
- fast/files/blob-stream-crash-2-expected.txt: Added.
- fast/files/blob-stream-crash-2.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:47 AM Changeset in webkit [277183] by
-
- 2 edits in branches/safari-611-branch/Source/WebKit
Cherry-pick r277114. rdar://problem/77638135
Fix crash when WebsiteDataStore is destroyed with outstanding getNetworkProcessConnection request
https://bugs.webkit.org/show_bug.cgi?id=225478
<rdar://77576148>
Reviewed by Chris Dumez.
In WebsiteDataStore::getNetworkProcessConnection if we don't get a connection the first time, we terminate the network process
and try again. This greatly increases our success rate. However, if we are cancelling the reply because of the destruction
of the WebsiteDataStore, we will end up doing bad things with partially destroyed objects, which ends up crashing.
In order to prevent this, use RunLoop::main.dispatch to retry on the next runloop iteration so that we will never be inside the
stack of WebsiteDataStore::~WebsiteDataStore when retrying. In that case, we will find that weakThis is null and send an empty
reply.
- UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::getNetworkProcessConnection):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:47 AM Changeset in webkit [277182] by
-
- 2 edits in branches/safari-611-branch/Source/WebKit
Cherry-pick r276671. rdar://problem/77620763
HashTableConstIterator's consistency assertion fails while closing m_webIDBServers in NetworkProcess::didClose since r275846
https://bugs.webkit.org/show_bug.cgi?id=225089
Reviewed by Chris Dumez.
The items of m_webIDBServers were removed while iterating
m_webIDBServers.
Move m_webIDBServers to a temporary HashMap before iterating.
- NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didClose):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:08 AM Changeset in webkit [277181] by
-
- 2 edits in trunk/LayoutTests
REGRESSION (r277071): [Intel Mac] imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is failing
https://bugs.webkit.org/show_bug.cgi?id=225469
Unreviewed test gardening.
- platform/mac/TestExpectations:
- 11:06 AM Changeset in webkit [277180] by
-
- 2 edits in trunk/Tools
Use test-tube emoji for EWS status bubbles for tester queues
https://bugs.webkit.org/show_bug.cgi?id=225517
Reviewed by Alan Bujtas.
- CISupport/ews-app/ews/views/statusbubble.py:
(StatusBubble):
- 10:24 AM Changeset in webkit [277179] by
-
- 11 edits in branches/safari-612.1.12-branch/Source/WebCore
Cherry-pick r277069. rdar://problem/77659420
AppHighlight scrolls should be smooth
https://bugs.webkit.org/show_bug.cgi?id=225395
Reviewed by Simon Fraser.
Leverage smooth scrolling experimental feature to allow AppHighlight scrolls
to be smooth.
- Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
- editing/Editor.cpp: (WebCore::TemporarySelectionChange::setSelection):
- editing/Editor.h:
- editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelection): (WebCore::FrameSelection::updateAndRevealSelection): (WebCore::FrameSelection::revealSelection):
- editing/FrameSelection.h:
- page/DOMWindow.cpp: (WebCore::DOMWindow::scrollTo const):
- page/ScrollBehavior.cpp: (WebCore::useSmoothScrolling):
- platform/ScrollTypes.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 9:49 AM Changeset in webkit [277178] by
-
- 2 edits in trunk/Tools
Add API test for FileSystem::fileExists() and FileSystem::fileMetadata() when dealing with symlinks to symlinks
https://bugs.webkit.org/show_bug.cgi?id=225491
Reviewed by Sam Weinig.
Update FileSystemTest::SetUp() to use a valid path when constructing the test symlink
(tempFileSymlinkPath). Add API test for FileSystem::fileExists() and FileSystem::fileMetadata()
when dealing with symlinks to symlinks.
- TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
- 9:42 AM Changeset in webkit [277177] by
-
- 2 edits in trunk/Source/WebCore
AudioWorkletProcessor which does not extend base class crashes Safari
https://bugs.webkit.org/show_bug.cgi?id=225449
<rdar://problem/77624792>
Reviewed by Sam Weinig.
Update AudioWorkletGlobalScope::createProcessor() to validate the type of the processor
after constructing it.
- Modules/webaudio/AudioWorkletGlobalScope.cpp:
(WebCore::AudioWorkletGlobalScope::createProcessor):
- 9:21 AM Changeset in webkit [277176] by
-
- 14 edits in trunk/Source/ThirdParty/libwebrtc
Allow libwebrtc to build for Mac Catalyst
https://bugs.webkit.org/show_bug.cgi?id=225505
Reviewed by Youenn Fablet.
This is progress towards rdar://77568774
Changes necessary to get it to build and link were:
- kCVPixelBufferOpenGLESCompatibilityKey is unavailable on Catalyst, so use kCVPixelBufferOpenGLCompatibilityKey like we do on macOS.
- SSE4 and AVX seem to be unavailable in the Catalyst SDK like they are in the iOS simulator SDK, so disable them similarly.
- Link to UIKit and CoreGraphics in debug builds like we do with iOS family builds.
- Don't use @loader_path/../../../ for DYLIB_INSTALL_NAME_BASE like we do with relocatable Safari builds, similar to an ANGLE change I made in r276318
- Export the same symbols as iOS for now. This may need some tweaking when I get it to link with WebCore, but that's why this is only progress.
- Configurations/DebugRelease.xcconfig:
- Configurations/SDKVariant.xcconfig:
- Configurations/libvpx.xcconfig:
- Configurations/libwebrtc.xcconfig:
- Configurations/opus.xcconfig:
- Source/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h:
- Source/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h:
- Source/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h:
- Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:
(-[RTCVideoDecoderH264 resetDecompressionSession]):
- Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:
(-[RTCVideoDecoderH265 resetDecompressionSession]):
- Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm:
(-[RTCVideoDecoderVTBVP9 resetDecompressionSession]):
- Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
- Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.mm:
(-[RTCVideoEncoderH265 resetCompressionSession]):
- 8:51 AM Changeset in webkit [277175] by
-
- 4 edits in trunk
[GStreamer][MediaStream] Emit black frames for disabled video tracks
https://bugs.webkit.org/show_bug.cgi?id=225511
Reviewed by Xabier Rodriguez-Calvar.
Source/WebCore:
In case the video track is disabled, emit a black I420 frame. For disabled audio tracks we
might need to silence the corresponding audio frames, this will be investigated in a
follow-up patch.
- platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
LayoutTests:
- platform/glib/TestExpectations: Unflag mediastream test now passing.
- 8:23 AM Changeset in webkit [277174] by
-
- 3 edits3 adds in trunk
Crash in ApplyStyleCommand::applyRelativeFontStyleChange
https://bugs.webkit.org/show_bug.cgi?id=225235
Patch by Frédéric Wang <fwang@igalia.com> on 2021-05-07
Reviewed by Ryosuke Niwa.
Source/WebCore:
Test: editing/execCommand/font-size-delta-same-node-for-start-and-end-crash.html
In ApplyStyleCommand::applyRelativeFontStyleChange, when the selection start and end have the
same anchor node, the start node of the loop is obtained by calling Position::upstream on the
selection start while end node of the loop is obtained by calling NodeTraversal::next on the
anchor node. This can result in the former being after the latter. This patch fixes this by
moving the end of the loop after the anchor node (similar to what is already done when the
start anchor node is a strict descendant of the end anchor node).
- editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Also include the case where
end.deprecatedNode() == start.deprecatedNode() in the conditional.
LayoutTests:
Add regression test.
- editing/execCommand/font-size-delta-same-node-for-start-and-end-crash-expected.txt: Added.
- editing/execCommand/font-size-delta-same-node-for-start-and-end-crash.html: Added.
- platform/ios/editing/execCommand/font-size-delta-same-node-for-start-and-end-crash-expected.txt: Added.
- 8:05 AM Changeset in webkit [277173] by
-
- 2 edits in trunk/LayoutTests
Unreviewed, glib WebAudio gardening
- platform/glib/TestExpectations: Unflag webaudio test now passing since r276978.
- 7:55 AM Changeset in webkit [277172] by
-
- 10 edits2 deletes in trunk/Source
[GTK4] Rewrite GTK gesture support to work for both 3.x and 4.x.
https://bugs.webkit.org/show_bug.cgi?id=212324
Patch by Carlos Garnacho <carlosg@gnome.org> on 2021-05-07
Reviewed by Carlos Garcia Campos.
Source/WebCore:
- platform/gtk/GtkVersioning.h:
(gtk_event_controller_get_current_event_state):
(gtk_event_controller_get_current_event_time): New GTK4 portability
helper methods.
Source/WebKit:
Rewrite the touch gesture handling to avoid GdkEvent as an exchange
token, and not rely on the web view being able to hold and re-route
these at whim. This makes touch and touchpad gestures work on GTK3
and GTK4 in similar ways, and so that both work.
For this, touch event propagation got some substantial changes, it
used to work by first delivering the touch events to the web page,
and manually feeding the returned+unhandled ones to gesture controllers.
Now event delivery is delegated on GTK, and happens right away on
gesture controllers, it is the WebkitWebViewBase which chooses to make
them effective after the web page (maybe) handled the events. Gestures
are reset whenever the web page is considered to be handling touch
events.
Also fix some buglets accumulated along the way, web view zoom conflicted
with in-page zoom handling, and ViewGestureController page switching
conflicted with press-drag-release emulation on the web page. These now
work better and closer to GtkScrolledWindow behavior.
No new tests, the GTK touch tests that should catch this were disabled
in the past and need fixing. This patch will require manual testing.
- PlatformGTK.cmake: Drop GTK4 conditionals around ViewGestureController
- SourcesGTK.txt: Drop GestureController.cpp. Build ViewGestureController
code files unconditionally.
- UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): Delegate handling on
WebKitWebViewBase.
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Use platform
independent struct to forward scroll to ViewGestureController.
- UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSnapshot): Involve ViewGestureController in rendering.
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseButtonReleaseEvent):
(webkitWebViewBaseButtonPressed):
(webkitWebViewBaseButtonReleased):
(webkitWebViewBaseMotionNotifyEvent): Ignore pointer-emulated events from
touchscreens.
(webkitWebViewBaseHandleWheelEvent):
(webkitWebViewBaseScroll): Use platform independent struct
to forward scroll to ViewGestureController.
(appendTouchEvent):
(touchPointStateForEvents):
(webkitWebViewBaseGetTouchPointsForEvent):
(webkitWebViewBaseTouchEvent):
Generalized to work on both GTK3 and GTK4.
(webkitWebViewBaseZoomBegin):
(webkitWebViewBaseZoomChanged):
(webkitWebViewBaseTouchLongPress):
(webkitWebViewBaseTouchPress):
(webkitWebViewBaseTouchRelease):
(webkitWebViewBaseTouchDragBegin):
(webkitWebViewBaseTouchDragUpdate):
(webkitWebViewBaseTouchDragEnd):
(webkitWebViewBaseTouchDragCancel):
(webkitWebViewBaseTouchSwipe): Newly added touch gesture implementation
callbacks. Not delegated anymore on GestureController.
(webkitWebViewBaseConstructed): Create touch gestures in the base view
widget, let them handle events automatically instead of relying on
manual event feeding via gtk_event_controller_handle_event(). Also add
a GtkEventControllerLegacy to handle forwarding of raw touch events to
the web page in GTK4.
(webkitWebViewBaseSetEnableBackForwardNavigationGesture):
(webkitWebViewBaseViewGestureController):
(webkitWebViewBaseBeginBackSwipeForTesting):
(webkitWebViewBaseCompleteBackSwipeForTesting):
(webkitWebViewBaseWillSwapWebProcess):
(webkitWebViewBaseDidExitWebProcess):
(webkitWebViewBaseDidRelaunchWebProcess):
(webkitWebViewBaseDidStartProvisionalLoadForMainFrame):
(webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame):
(webkitWebViewBaseDidFinishNavigation):
(webkitWebViewBaseDidFailNavigation):
(webkitWebViewBaseDidSameDocumentNavigationForMainFrame):
(webkitWebViewBaseDidRestoreScrollPosition): Remove conditionals around
ViewGestureController for GTK4.
(webkitWebViewBasePageGrabbedTouch): New method to tag touch events
altogether as handled by the web page, thus resetting any ongoing view-level
gesture handling. This inversion is necessary as gesture controllers are now
always fed input events parallel to web page touch event handling.
(webkitWebViewBaseGestureController): Deleted.
(webkit_web_view_base_class_init):
(webkitWebViewBaseEvent): Removed widget_class->event vfunc. Touchpad gesture
event forwarding to event controllers is delegated on GTK.
- UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
- UIProcess/ViewGestureController.h:
- UIProcess/gtk/GestureController.cpp: Removed. Gestures are implemented in
the base view.
- UIProcess/gtk/GestureController.h: Removed.
- UIProcess/gtk/ViewGestureControllerGtk.cpp:
(WebKit::isEventStop):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
(WebKit::isTouchEvent):
(WebKit::createScrollEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting): Declare
PlatformGtkScrollData, and use it as "platform scroll event" for both GTK3 and GTK4.
(WebKit::ViewGestureController::snapshot): New GTK4 specific method to render
the page switching gesture action.
- 5:31 AM Changeset in webkit [277171] by
-
- 15 edits in trunk/Source
Add WebRTC logging control in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=225346
Reviewed by Eric Carlson.
Source/WebCore:
Migrate setEnableLogging to setLoggingLevel as a virtual method so that it can be implemented by WebKit to send logging level to GPUProcess.
Simplify WebCore::LibWebRTCProvider::setLoggingLevel to not differentiate debug from non debug builds.
Manually tested.
- Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
- page/Page.cpp:
(WebCore::Page::configureLoggingChannel):
- platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::computeLogLevel):
(WebCore::LibWebRTCProvider::setRTCLogging):
(WebCore::LibWebRTCProvider::setLoggingLevel):
(WebCore::setLogging): Deleted.
(WebCore::LibWebRTCProvider::setEnableLogging): Deleted.
- platform/mediastream/libwebrtc/LibWebRTCProvider.h:
Source/WebKit:
Implement setting of WebRTC log level using LibWebRTCCodecs and LibWebRTCCodecsProxy.
This will help debugging issues with GPU-running webrtc codecs.
- GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
- GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
- GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::toWebRTCVideoRotation):
(WebKit::LibWebRTCCodecsProxy::setRTCLoggingLevel):
- SourcesCocoa.txt:
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::LibWebRTCCodecs::ensureGPUProcessConnectionOnMainThread):
(WebKit::LibWebRTCCodecs::setLoggingLevel):
- WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
- WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::setLoggingLevel):
- WebProcess/Network/webrtc/LibWebRTCProvider.h:
- 5:17 AM Changeset in webkit [277170] by
-
- 5 edits in trunk
[GTK][WPE] Bump libsoup3 version to 2.99.5
https://bugs.webkit.org/show_bug.cgi?id=225506
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-05-07
Reviewed by Philippe Normand.
.:
- Source/cmake/OptionsGTK.cmake:
- Source/cmake/OptionsWPE.cmake:
LayoutTests:
Remove expectations for tests that should be passing now.
- platform/gtk/TestExpectations:
- 5:05 AM Changeset in webkit [277169] by
-
- 5 edits in trunk/Source/WebKit
[iOS] Safari sometimes hangs underneath
WebKit::UIDelegate::UIClient::createNewPage
https://bugs.webkit.org/show_bug.cgi?id=225481
rdar://77565282
Reviewed by Chris Dumez.
Consider the scenario where a webpage programmatically opens a window in a new tab on iOS while the keyboard is
visible. In certain configurations, Safari indirectly tells theWKWebViewcontaining the original webpage to
-resignFirstResponderand then-becomeFirstResponderagain, while creating a new web view and shuffling
around the view hierarchy under-webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:.
Since the keyboard is up, this causes UIKit to ask for an autocorrection context via `-[WKContentView
requestAutocorrectionContextWithCompletionHandler:]`, which blocks the main thread on a response from the web
process. Of course, since we're handling synchronous IPC, the web process isn't capable of sending a response
back to the UI process, so we deadlock until we exceed the IPC timeout, and then exit the call stack.
Instead, it's possible in this case to recognize that we're already handling a synchronous IPC message, and any
attempts to wait for a response will time out anyways. Instead of waiting for the entire timeout duration, we
can fail eagerly to avoid hanging the process that is waiting.
- Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
(IPC::Connection::sendMessage):
(IPC::Connection::waitForMessage):
(IPC::Connection::dispatchSyncMessage):
- Platform/IPC/Connection.h:
Add a new counter variable,
m_inDispatchSyncMessageCount, that is incremented and decremented while we're
in the process of dispatching an incoming sync IPC message. Ifm_inDispatchSyncMessageCountis nonzero and
we have a non-infinite IPC timeout duration, then we should fail sooner insideConnection::waitForMessage,
instead of waiting to time out.
Drive-by refactoring: while we're here, let's also move initialization for some of the members on
Connection
into the class declaration, instead of the constructor.
(IPC::Connection::WTF_GUARDED_BY_LOCK):
- Platform/IPC/Timeout.h:
(IPC::Timeout::isInfinity const):
- WebKit.xcodeproj/project.pbxproj:
- 4:46 AM Changeset in webkit [277168] by
-
- 2 edits in trunk/Source/WTF
[GTK] Warnings about unused filesystem functions
https://bugs.webkit.org/show_bug.cgi?id=225507
Patch by Philippe Normand <pnormand@igalia.com> on 2021-05-07
Reviewed by Adrian Perez de Castro.
Since r277158 these functions are no longer needed.
- wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::getFileStat): Deleted.
(WTF::FileSystemImpl::getFileLStat): Deleted.
- 3:02 AM Changeset in webkit [277167] by
-
- 2 edits in trunk/Tools
Unreviewed, WPE gardening
- TestWebKitAPI/glib/TestExpectations.json: Unflag test, wpebackend-fdo was downgraded in
the SDK revision r277166.
- 2:06 AM Changeset in webkit [277166] by
-
- 2 edits in trunk/Tools/buildstream
[Flatpak SDK] Update to libsoup3 2.99.5
https://bugs.webkit.org/show_bug.cgi?id=225504
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-05-07
Reviewed by Philippe Normand.
- elements/sdk/libsoup3.bst:
- 1:47 AM Changeset in webkit [277165] by
-
- 2 edits in trunk/Tools/buildstream
[WPE] TestWebExtensions web-process-crashed is flaky failing after latest WPE libs update
https://bugs.webkit.org/show_bug.cgi?id=225503
Patch by Philippe Normand <pnormand@igalia.com> on 2021-05-07
Reviewed by Carlos Garcia Campos.
The update to 1.9.91 triggers critical warnings in tests. Might be fixed by
https://github.com/Igalia/WPEBackend-fdo/pull/158 which is not merged yet.
- elements/sdk/wpebackend-fdo.bst: Downgrade to latest stable release until the bug is fixed.
- 1:46 AM Changeset in webkit [277164] by
-
- 2 edits in trunk/LayoutTests
[GStreamer] Layout test media/video-playsinline.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=186664
Reviewed by Philippe Normand.
The change to fullscreen takes a while on WebKitGTK and WPE platforms and can't be checked immediately.
- media/video-playsinline.html: Added a setTimeout to the test in order to defer the check to the next main loop iteration.
- 1:08 AM Changeset in webkit [277163] by
-
- 3 edits2 adds in trunk
Crash in InsertTextCommand::positionInsideTextNode
https://bugs.webkit.org/show_bug.cgi?id=223753
Patch by Frédéric Wang <fwang@igalia.com> on 2021-05-07
Reviewed by Ryosuke Niwa.
Source/WebCore:
Test: editing/deleting/selection-on-empty-table-row.html
This is a follow-up of bug 213514, where removePreviouslySelectedEmptyTableRows was
modified to ensure the selection is properly updated after deleting the last row. This
patch does the same for other rows.
- editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows): Update comment
about calling raw removeNode and move it to the top of the function. Replace all the calls
to CompositeEditCommand::removeNode with CompositeEditCommand::removeNodeUpdatingStates so
that the selection is adjusted.
LayoutTests:
Add regression test.
- editing/deleting/selection-on-empty-table-row-expected.txt: Added.
- editing/deleting/selection-on-empty-table-row.html: Added.
- 12:44 AM Changeset in webkit [277162] by
-
- 2 edits in trunk/Source/WebCore
[GPU Process] Closing the GPU Process should clear all the back pointers from ItemBuffer to RemoteRenderingBackendProxy
https://bugs.webkit.org/show_bug.cgi?id=224744
<rdar://74592639>
Reviewed by Ryosuke Niwa.
RemoteRenderingBackendProxy::gpuProcessConnectionDidClose() clears the
the backends of all its RemoteImageBufferProxys. It also clears all the
SharedMemory which are referenced by the ItemBufferHandles.
So DisplayList::ImageBuffer::clearBackend() should clear all the
ItemBufferHandles of its DisplayList.
- platform/graphics/displaylists/DisplayListImageBuffer.h: