Timeline
Feb 15, 2021:
- 8:29 PM Changeset in webkit [272896] by
-
- 4 edits in trunk/Source
[macOS] Close XPC connections before entering sandbox
https://bugs.webkit.org/show_bug.cgi?id=221905
<rdar://problem/70359582>
Reviewed by Brent Fulgham.
Source/WebKit:
XPC connections that are now allowed in the sandbox should be closed before entering the sandbox.
- Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::initializeSandboxParameters):
Source/WTF:
Add softlinking macro for libraries in /usr/lib/system/.
- wtf/cocoa/SoftLinking.h:
- 8:21 PM Changeset in webkit [272895] by
-
- 7 edits in trunk/Source/WebKit
Remove 'com.apple.powerlog.plxpclogger.xpc' from WebKit sandboxes
https://bugs.webkit.org/show_bug.cgi?id=221840
<rdar://problem/73579040>
Reviewed by Brent Fulgham.
Remove this service from WebKit sandboxes, since it is not required for correctness.
- GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
- Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
- Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
- UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::diagnosticServices):
- WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
- WebProcess/com.apple.WebProcess.sb.in:
- 8:11 PM Changeset in webkit [272894] by
-
- 8 edits in trunk
PCM: Add high entropy attributionSourceNonce attribute to anchor tags
https://bugs.webkit.org/show_bug.cgi?id=221934
<rdar://73581230>
Reviewed by Jiewen Tan.
In Private Click Measurement (PCM), the source site should have the option to
provide a high entropy nonce with which PCM can asynchronously validate its
subsequent, asynchronous request for a signature of its unlinkable token.
The nonce attribute's name is attributionSourceNonce and it's a
128-bit/16-byte Base64URL encoded string.
The attribute is behind the experimental feature flag
PrivateClickMeasurementFraudPrevention.
Source/WebCore:
New API tests added.
- html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
- html/HTMLAnchorElement.idl:
- html/HTMLAttributeNames.in:
- loader/PrivateClickMeasurement.h:
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::EphemeralSourceNonce):
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::isValid const):
(WebCore::PrivateClickMeasurement::setEphemeralSourceNonce):
(WebCore::PrivateClickMeasurement::ephemeralSourceNonce const):
(WebCore::PrivateClickMeasurement::clearEphemeralSourceNonce):
- page/Settings.yaml:
Tools:
- TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
- 6:06 PM Changeset in webkit [272893] by
-
- 2 edits in trunk/Source/WebCore/PAL
Unreviewed, fix the Apple internal iOS build after r272878
Wrap
NSScrollViewSPI.hin aUSE(APPKIT)guard, so that we don't attempt to import AppKit headers when
building for iOS using the internal SDK.
- pal/spi/mac/NSScrollViewSPI.h:
- 5:51 PM Changeset in webkit [272892] by
-
- 10 edits in trunk/Source
[ARM64] Change break instruction comment to indicate possible security failure
https://bugs.webkit.org/show_bug.cgi?id=221936
Reviewed by Mark Lam.
Source/bmalloc:
Change the ASSERT break comment immediate to the same value the C++ compiler uses.
- bmalloc/BAssert.h:
Source/JavaScriptCore:
We change the comment value to indicate a possible security issue by
using the same value the C++ compiler emits.
- assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::breakpoint):
- disassembler/ARM64/A64DOpcode.cpp:
(JSC::ARM64Disassembler::A64OpcodeExceptionGeneration::format):
- disassembler/ARM64/A64DOpcode.h:
(JSC::ARM64Disassembler::A64OpcodeExceptionGeneration::immediate16):
- offlineasm/arm64.rb:
Source/WTF:
Change the ASSERT break comment immediate to the same value the C++ compiler uses.
- wtf/Assertions.cpp:
- wtf/Assertions.h:
- 4:27 PM Changeset in webkit [272891] by
-
- 3 edits in trunk/Source/WebKit
Unreviewed, reverting r272867.
Broke 50+ fast/layoutformattingcontext/ tests on Mac Debug WK2
Reverted changeset:
"Page scrolling by wheel events doesn't work in non-AC mode
pages if Hardware Acceleration Policy is changed dynamically
from "always" to "never""
https://bugs.webkit.org/show_bug.cgi?id=221067
https://commits.webkit.org/r272867
- 4:18 PM Changeset in webkit [272890] by
-
- 29 edits in trunk/Source
[macOS] Connect Touch Bar to MediaSession
https://bugs.webkit.org/show_bug.cgi?id=221921
<rdar://problem/74363311>
Reviewed by Jer Noble.
Source/WebCore:
These changes can only be tested manually.
- html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): PlatformMediaSession::RemoteCommandArgument
is a struct.
- html/MediaElementSession.cpp:
(WebCore::MediaElementSession::didReceiveRemoteControlCommand): Ditto. Track BeginScrubbing
and EndScrubbing so we know when to set the 'fastSeek' flag when sending a SeekTo command.
- html/MediaElementSession.h:
- platform/NowPlayingManager.h:
- platform/audio/PlatformMediaSession.cpp: PlatformMediaSession::RemoteCommandArgument
is a struct.
(WebCore::convertEnumerationToString):
- platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSession::RemoteCommandArgument::encode const):
(WebCore::PlatformMediaSession::RemoteCommandArgument::decode):
- platform/cocoa/PlaybackSessionModel.h:
(WebCore::PlaybackSessionModel::sendRemoteCommand): Ditto.
- platform/cocoa/PlaybackSessionModelMediaElement.h:
- platform/cocoa/PlaybackSessionModelMediaElement.mm:
(WebCore::PlaybackSessionModelMediaElement::sendRemoteCommand): Ditto.
- platform/ios/RemoteCommandListenerIOS.mm:
(WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Ditto.
- platform/mac/PlaybackSessionInterfaceMac.h:
- platform/mac/PlaybackSessionInterfaceMac.mm:
(WebCore::PlaybackSessionInterfaceMac::willBeginScrubbing): Pull the logic to update
controls manager timing out of beginScrubbing so it can be used from WebPlaybackControlsManager.
(WebCore::PlaybackSessionInterfaceMac::beginScrubbing):
- platform/mac/RemoteCommandListenerMac.mm:
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): PlatformMediaSession::RemoteCommandArgument
is a struct.
- platform/mac/WebPlaybackControlsManager.h:
- platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]): Call
sendRemoteCommand.
(-[WebPlaybackControlsManager beginTouchBarScrubbing]): Ditto.
(-[WebPlaybackControlsManager endTouchBarScrubbing]): Ditto.
(-[WebPlaybackControlsManager togglePlayback]): Ditto.
(-[WebPlaybackControlsManager setPlaying:]): Ditto.
(-[WebPlaybackControlsManager togglePictureInPicture]): Ditto.
- testing/Internals.cpp:
(WebCore::Internals::postRemoteControlCommand): Ditto.
Source/WebKit:
- GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didReceiveRemoteControlCommand): PlatformMediaSession::RemoteCommandArgument
is a struct.
- GPUProcess/GPUConnectionToWebProcess.h:
- UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
- UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionModelContext::sendRemoteCommand):
(WebKit::PlaybackSessionManagerProxy::sendRemoteCommand):
- WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::didReceiveRemoteCommand):
- WebProcess/GPU/GPUProcessConnection.h:
- WebProcess/GPU/GPUProcessConnection.messages.in:
- WebProcess/GPU/media/RemoteRemoteCommandListener.messages.in:
- WebProcess/cocoa/PlaybackSessionManager.h:
- WebProcess/cocoa/PlaybackSessionManager.messages.in:
- WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::sendRemoteCommand):
- 4:16 PM Changeset in webkit [272889] by
-
- 8 edits in trunk/Source
Web Inspector: Add a way to wake up debuggables to the remote inspector protocol
https://bugs.webkit.org/show_bug.cgi?id=221871
rdar://70351644
Reviewed by Devin Rousso.
Source/JavaScriptCore:
- inspector/remote/RemoteInspector.h:
- inspector/remote/RemoteInspectorConstants.h:
- inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::xpcConnectionReceivedMessage): Handle WIRApplicationWakeUpDebuggablesMessage.
(Inspector::RemoteInspector::receivedWakeUpDebuggables): Added. Call the client.
Source/WebKit:
- UIProcess/API/Cocoa/_WKAutomationDelegate.h:
- UIProcess/Cocoa/AutomationClient.h:
- UIProcess/Cocoa/AutomationClient.mm:
(WebKit::AutomationClient::AutomationClient): Check if the delegate responds to new method.
(WebKit::AutomationClient::requestedDebuggablesToWakeUp): Added. Call new process pool delegate method.
- 4:09 PM Changeset in webkit [272888] by
-
- 8 edits in trunk/Source
[GPU Process] Ensure that no image decoders run in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=221885
<rdar://problem/74341122>
Reviewed by Simon Fraser.
Source/WebCore:
Release assert no PDF image is created in the GPU Process.
- platform/graphics/cg/PDFDocumentImage.h:
Source/WebCore/PAL:
Add CGImageSourceSetAllowableTypes() to the ImageIO SPI header file.
- pal/spi/cg/ImageIOSPI.h:
Source/WebKit:
Make GPU Process force ImageIO to disable all image decoding.
- GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
Source/WTF:
CGImageSourceSetAllowableTypes() is available starting from macOS Big Sur
and iOS 14.0.
- wtf/PlatformHave.h:
- 3:49 PM Changeset in webkit [272887] by
-
- 2 edits in trunk/Source/WebKit
[GPUP] Ignore an IPC message if the message receiver has been destroyed
https://bugs.webkit.org/show_bug.cgi?id=221920
Reviewed by Eric Carlson.
No new tests, fixing test crashes due to assertion failures.
- WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::dispatchMessage):
- 3:29 PM Changeset in webkit [272886] by
-
- 2 edits in trunk/Source/WTF
REGRESSION r272823): Crash in ARM64e Wasm tests
https://bugs.webkit.org/show_bug.cgi?id=221922
Reviewed by Mark Lam.
Updated to properly compute the size of thread_state_t as well as the offset of
the PC found in thread_state_t.
- wtf/threads/Signals.cpp:
(WTF::hashThreadState):
- 3:08 PM Changeset in webkit [272885] by
-
- 31 edits6 adds2 deletes in trunk
[JSC] PropertySlot should allow passing custom setters
https://bugs.webkit.org/show_bug.cgi?id=221872
Reviewed by Yusuke Suzuki.
LayoutTests/imported/w3c:
- web-platform-tests/WebIDL/ecmascript-binding/attributes-accessors-unique-function-objects-expected.txt: Added.
- web-platform-tests/WebIDL/ecmascript-binding/attributes-accessors-unique-function-objects.html: Added.
- web-platform-tests/dom/events/Event-isTrusted.any-expected.txt:
- web-platform-tests/dom/events/Event-isTrusted.any.worker-expected.txt:
- web-platform-tests/html/browsers/history/the-location-interface/document_location-expected.txt:
- web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window-expected.txt:
- web-platform-tests/html/browsers/windows/embedded-opener-expected.txt:
Source/JavaScriptCore:
This patch:
- Merges PropertySlot::TypeCustomAccessor into TypeCustom, allowing to pass a setter for CustomAccessor / CustomValue. Raw C++ function pointers are used to avoid creating CustomGetterSetter instances for non-reified static properties.
- Reworks JSObject::getOwnPropertyDescriptor() for custom accessors, making it simpler, more robust, and no longer required to reify all static properties.
- Hoists GetValueFunc / PutValueFunc declarations to JSC namespace so they can be used in header files.
- Moves CustomAccessor's wrapper maps to JSGlobalObject (because VM outlives it) and simplifies their keys to C++ function pointers.
- Splits JSCustomGetterSetterFunction into JSCustomGetterFunction / JSCustomSetterFunction since their signatures and Call logic are quite different. This is a nice refactor that also simplifies garbage collection and reduces memory needed for setter wrappers.
- Removes PropertyDescriptor::setCustomDescriptor(), making PropertyDescriptor unaware of custom accessors. Also, drops CustomAccessor check from validateAndApplyPropertyDescriptor() that was incorrect (no error should be thrown if accessors are unchanged) yet unreachable because PropertyDescriptor::equalTo() ignores CustomAccessor.
This change fixes a) accessor functions of unforgeable properties [1] to be persistent
(in terms of referential equality) and b) cross-realm accessor functions to be of correct
global object (instead of lexical).
[1]: https://heycam.github.io/webidl/#dfn-unforgeable-on-an-interface
- API/JSCallbackObject.h:
- JavaScriptCore.xcodeproj/project.pbxproj:
- Sources.txt:
- runtime/JSCustomGetterFunction.cpp: Added.
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSCustomGetterFunction::JSCustomGetterFunction):
(JSC::JSCustomGetterFunction::create):
- runtime/JSCustomGetterFunction.h: Added.
- runtime/JSCustomGetterSetterFunction.cpp: Removed.
- runtime/JSCustomGetterSetterFunction.h: Removed.
- runtime/JSCustomSetterFunction.cpp: Added.
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSCustomSetterFunction::JSCustomSetterFunction):
(JSC::JSCustomSetterFunction::create):
- runtime/JSCustomSetterFunction.h: Added.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
- runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::customGetterFunctionMap):
(JSC::JSGlobalObject::customSetterFunctionMap):
(JSC::JSGlobalObject::customGetterFunctionStructure const):
(JSC::JSGlobalObject::customSetterFunctionStructure const):
(JSC::JSGlobalObject::customGetterSetterFunctionStructure const): Deleted.
- runtime/JSObject.cpp:
(JSC::getCustomGetterFunction):
(JSC::getCustomSetterFunction):
(JSC::JSObject::getOwnPropertyDescriptor):
(JSC::validateAndApplyPropertyDescriptor):
(JSC::getCustomGetterSetterFunctionForGetterSetter): Deleted.
- runtime/JSObject.h:
(JSC::JSObject::fillCustomGetterPropertySlot):
- runtime/Lookup.h:
(JSC::getStaticPropertySlotFromTable):
- runtime/PropertyDescriptor.cpp:
(JSC::PropertyDescriptor::setAccessorDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor): Deleted.
- runtime/PropertyDescriptor.h:
- runtime/PropertySlot.cpp:
(JSC::PropertySlot::customAccessorGetter const): Deleted.
- runtime/PropertySlot.h:
(JSC::PropertySlot::isCustom const):
(JSC::PropertySlot::customGetter const):
(JSC::PropertySlot::customSetter const):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::getValue const):
(JSC::PropertySlot::isCustomAccessor const): Deleted.
(JSC::PropertySlot::customGetterSetter const): Deleted.
(JSC::PropertySlot::setCustomGetterSetter): Deleted.
- runtime/PutPropertySlot.h:
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
Source/WebCore:
To prevent cross-origin accessor functions from different realms to have the same wrapper,
return PropertySlot::TypeGetter instead.
Tests: fast/dom/Window/getOwnPropertyDescriptor-other-window.html
js/instance-property-getter-other-instance.html
imported/w3c/web-platform-tests/dom/events/Event-isTrusted.any.js
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/document_location.html
- bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
- bindings/js/JSLocationCustom.cpp:
(WebCore::getOwnPropertySlotCommon):
LayoutTests:
- fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt:
- fast/dom/Window/getOwnPropertyDescriptor-other-window.html:
- js/instance-property-getter-other-instance-expected.txt:
- js/instance-property-getter-other-instance.html:
- 3:03 PM Changeset in webkit [272884] by
-
- 8 edits2 adds in trunk/Source/WebKit
[macOS] Add a ShareableBitmap with decoded image data to WebHitTestResultData
https://bugs.webkit.org/show_bug.cgi?id=221869
Reviewed by Tim Horton.
Add
WebHitTestResultData::imageBitmap; we'll use this in future patches to vend decoded image data to system
frameworks for image extraction.
- Shared/WebHitTestResultData.cpp:
(WebKit::WebHitTestResultData::WebHitTestResultData):
(WebKit::WebHitTestResultData::encode const):
(WebKit::WebHitTestResultData::decode):
Add
imageBitmapand decoding/encoding support usingShareableBitmap::Handle.
- Shared/WebHitTestResultData.h:
- Sources.txt:
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp: Added.
(WebKit::createShareableBitmap):
- WebProcess/WebCoreSupport/ShareableBitmapUtilities.h: Added.
Pull logic to decode rendered image data into a bitmap into a separate helper function; use this helper function
inWebHitTestResultData, as well as a couple of existing call sites inWebPage.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::requestImageExtraction):
(WebKit::WebPage::shareableBitmap const): Deleted.
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::imagePositionInformation):
- 2:40 PM Changeset in webkit [272883] by
-
- 14 edits1 copy8 adds in trunk
[ESNext] Implement private accessors
https://bugs.webkit.org/show_bug.cgi?id=194435
Reviewed by Yusuke Suzuki.
JSTests:
- stress/private-accesor-duplicate-name-early-errors.js: Added.
- stress/private-getter-brand-check.js: Added.
- stress/private-getter-inner-class.js: Added.
- stress/private-members-get-and-set.js: Added.
- stress/private-methods-and-accessors-postfix-node.js: Added.
- stress/private-methods-and-accessors-prefix-node.js: Added.
- stress/private-names-available-on-direct-eval.js:
- stress/private-names-available-on-eval-during-field-initialization.js: Copied from JSTests/stress/private-names-available-on-direct-eval.js.
- stress/private-setter-brand-check.js: Added.
- stress/private-setter-inner-class.js: Added.
- test262/config.yaml:
- test262/expectations.yaml:
Source/JavaScriptCore:
This patch is implementing support for instance private getters and
setters following the proposal on https://tc39.es/proposal-private-methods.
Private accessors also use the private brand check mechanism of
private methods, which means that we are using both
op_set_private_brandandop_check_private_brandto perform brand
checks. Accessors are also stored on class lexical scope as a pair of
getterandsetter. This is done creating a newJSObjectand
storing thegetterongetproperty, andsetteronset
property. This is designed in such way that we can always hit IC fast
path onget_by_id_directto access the property, and also to allow
constant folding of accessors on DFG/FTL, since acessors objects are
going to be constant once created.
For reference, we have the following bytecode for a private getter
access:
`
class C {
get #m() {...}
access() {
return this.#m;
}
}
`
Bytecode for class declaration:
`
...
new_object dst:loc12, inlineCapacity:2 this is the object to store getter and setter pair
new_func_exp dst:loc13, scope:loc4, functionDecl:"get #m() {...}"
put_by_id base:loc13, property:@homeObject, value:loc11, flags:Strict
put_by_id base:loc12, property:@get, value:loc13, flags:IsDirect|Strict
put_to_scope scope:loc4, var:#m, value:loc12 loc4 is the class lexical scope
...
`
Bytecode for
access():
`
...
resolve_scope dst:loc7, scope:loc4, var:"#m", resolveType:GlobalProperty, localScopeDepth:0
get_from_scope dst:loc8, scope:loc7, var:@privateBrand
check_private_brand base:this, brand:loc8
get_from_scope dst:loc8, scope:loc7, var:"#m"
get_by_id_direct dst:loc9, base:loc8, property:@get
mov dst:loc10, src:this
call dst:loc6, callee:loc9, argc:1, argv:16
...
`
- bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::instantiateLexicalVariables):
(JSC::BytecodeGenerator::getPrivateTraits):
(JSC::BytecodeGenerator::getAvailablePrivateAccessNames):
(JSC::BytecodeGenerator::isPrivateMethod): Deleted.
- bytecompiler/BytecodeGenerator.h:
- bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitBytecode):
(JSC::PropertyListNode::emitPutConstantProperty):
(JSC::BaseDotNode::emitGetPropertyValue):
(JSC::BaseDotNode::emitPutProperty):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitDot):
- parser/Nodes.h:
- parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseGetterSetter):
- parser/Parser.h:
(JSC::Scope::declarePrivateSetter):
(JSC::Scope::declarePrivateGetter):
- parser/VariableEnvironment.cpp:
(JSC::VariableEnvironment::declarePrivateAccessor):
(JSC::VariableEnvironment::declarePrivateSetter):
(JSC::VariableEnvironment::declarePrivateGetter):
- parser/VariableEnvironment.h:
(JSC::VariableEnvironmentEntry::isPrivateSetter const):
(JSC::VariableEnvironmentEntry::isPrivateGetter const):
(JSC::VariableEnvironmentEntry::setIsPrivateSetter):
(JSC::VariableEnvironmentEntry::setIsPrivateGetter):
(JSC::PrivateNameEntry::isSetter const):
(JSC::PrivateNameEntry::isGetter const):
(JSC::PrivateNameEntry::isField const):
(JSC::PrivateNameEntry::isPrivateMethodOrAcessor const):
(JSC::VariableEnvironment::declarePrivateSetter):
(JSC::VariableEnvironment::declarePrivateGetter):
- runtime/ExceptionHelpers.cpp:
(JSC::createPrivateMethodAccessError):
- 2:28 PM Changeset in webkit [272882] by
-
- 4 edits in trunk/Source/WebKit
[WPE][GTK] SleepDisabler does not inhibit sleep with bubblewrap sandbox enabled: need to run xdg-dbus-proxy under bwrap or xdg-desktop-portal does not read our app ID
https://bugs.webkit.org/show_bug.cgi?id=219010
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
Reviewed by Carlos Garcia Campos.
We need to run xdg-dbus-proxy under bubblewrap so that we can mount /.flatpak-info in its
mount namespace. Why? Because xdg-desktop-portal checks the pid of its D-Bus peer using
Unix credentials, then looks in that process's mount namespace to read its app ID from
/.flatpak-info. If /.flatpak-info doesn't exist, then any portals that depend on the app ID
will break, including the inhibit portal that we need to prevent the system from suspending
during video playback. This normally works because flatpak runs xdg-dbus-proxy under
bubblewrap and mounts /.flatpak-info, but it breaks for WebKit because we don't. Start doing
so.
This method of getting the app ID might seem like a strange contortion, but it's really
required beacuse the sandboxed process cannot be trusted to provide its own app ID, and will
not have write access to its /.flatpak-info so we can rely on that.
- UIProcess/Launcher/ProcessLauncher.h:
- UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::createFlatpakInfo):
(WebKit::XDGDBusProxyLauncher::launch):
(WebKit::bubblewrapSpawn):
- 2:22 PM Changeset in webkit [272881] by
-
- 10 edits in trunk
[iOS][FCR] Add new look for input type=range with datalist
https://bugs.webkit.org/show_bug.cgi?id=221782
<rdar://problem/74251214>
Reviewed by Darin Adler.
Source/WebCore:
Test: fast/forms/ios/form-control-refresh/range/datalist.html
- html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::listOptionValueAsDouble):
Added a helper method to validate and sanitize an option element's
value, and return it as a double.
- html/HTMLInputElement.h:
- rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
- rendering/RenderTheme.h:
Make paintSliderTicks a virtual method to support a custom implementation
for iOS. Use FloatRect instead of IntRect for subpixel accuracy.
- rendering/RenderThemeIOS.h:
- rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintSliderTicks):
(WebCore::RenderThemeIOS::paintSliderTrackWithFormControlRefresh):
LayoutTests:
Added a reference mismatch test to verify that range inputs with
different datalist option values do not appear the same.
- fast/forms/ios/form-control-refresh/range/datalist-expected-mismatch.html:
- fast/forms/ios/form-control-refresh/range/datalist.html:
- 2:16 PM Changeset in webkit [272880] by
-
- 5 edits in trunk/Source/WebCore
Crash under WorkerThreadableLoader::MainThreadBridge::notifyIsDone()
https://bugs.webkit.org/show_bug.cgi?id=221906
<rdar://74225448>
Reviewed by Alex Christensen.
- loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::computeIsDone):
r267227 added this function and this was the first case where the DocumentThreadableLoader
would do an async operation and ref itself during the operation. I believe this was the
source of the crash as this could cause DocumentThreadableLoader to outlive its client.
When DocumentThreadableLoader::notifyIsDone() would get called later on, m_client may be
bad. To maintain pre-r267227 behavior, we now capture a WeakPtr to |this| instead of a
Ref<>, so that we don't unnecessarily extend the lifetime of the DocumentThreadableLoader.
- loader/DocumentThreadableLoader.h:
(WebCore::DocumentThreadableLoader::clearClient):
Add new clearClient() function to DocumentThreadableLoader so that the client can clear
the raw pointer the DocumentThreadableLoader holds to it before getting destroyed. I wanted
to use WeakPtr but this did not work out due to multithreading.
- loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
Before destroying itself, WorkerThreadableLoader::MainThreadBridge now clears the
raw pointer to it that DocumentThreadableLoader holds. This is important since
DocumentThreadableLoader is RefCounted and its lifetime may get extended past
the MainThreadBridge.
- loader/WorkerThreadableLoader.h:
Use tighter typing for clarity.
- 2:03 PM Changeset in webkit [272879] by
-
- 2 edits in trunk/Source/WebKit
Fix -Wunused-variable warning
https://bugs.webkit.org/show_bug.cgi?id=221653
<rdar://problem/74280146>
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
Reviewed by Alex Christensen.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):
- 1:48 PM Changeset in webkit [272878] by
-
- 8 edits4 moves1 add in trunk/Source/WebCore
Pull Mac-only code out of ScrollController
https://bugs.webkit.org/show_bug.cgi?id=221462
<rdar://problem/74273853>
Patch by Martin Robinson <mrobinson@igalia.com> on 2021-02-15
Reviewed by Simon Fraser.
No new tests. This should not change behavior.
Split out Mac-specific code from ScrollController and prepare it for use on
non-Cocoa platforms. This code must be pulled out primarily because it is
Objective-C++ code and should maintain the .mm extension. The idea here is to
isolate the basic platform-independent scroll snapping code and gradually make
the rest (related to handling wheel events) more-and-more platform-independent.
- PlatformMac.cmake: Update source list.
- Sources.txt: Ditto.
- SourcesCocoa.txt: Ditto.
- WebCore.xcodeproj/project.pbxproj: Ditto.
- page/scrolling/ScrollingMomentumCalculator.cpp: Guard code with ENABLE(CSS_SCROLL_SNAP).
- platform/ScrollController.cpp: Added.
This file contains only the platform-independent scroll snapping code that will be
used to add initial scroll snap support to other ports.
- platform/ScrollController.h: Renamed from Source/WebCore/platform/cocoa/ScrollController.h.
- platform/ScrollSnapAnimatorState.cpp: Renamed from Source/WebCore/platform/cocoa/ScrollSnapAnimatorState.mm.
- platform/ScrollSnapAnimatorState.h: Renamed from Source/WebCore/platform/cocoa/ScrollSnapAnimatorState.h.
- platform/graphics/cg/GraphicsContextGLCG.cpp: Fix unified source build issue exposed by this
change.
- platform/mac/ScrollController.mm: Renamed from Source/WebCore/platform/cocoa/ScrollController.mm.
- platform/mac/VideoFullscreenInterfaceMac.mm: Fix unified source build issue.
- 1:42 PM Changeset in webkit [272877] by
-
- 3 edits in trunk/Source/WebCore
[LFC][Integration] Fix fast/text/justify-nbsp.html tests with inlines enabled
https://bugs.webkit.org/show_bug.cgi?id=221908
Reviewed by Antti Koivisto.
Non-breaking-space is not taken into account when counting the number of expansion opportunities. Disable IFC for now.
- layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForCharacter):
- layout/integration/LayoutIntegrationCoverage.h:
- 1:40 PM Changeset in webkit [272876] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, silence -Wreturn-type warning
https://bugs.webkit.org/show_bug.cgi?id=221881
<rdar://problem/74358043>
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
- css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
- 1:21 PM Changeset in webkit [272875] by
-
- 4 edits in trunk/Source/WebKit
Unreviewed, reverting r272863.
https://bugs.webkit.org/show_bug.cgi?id=221918
broke process launching
Reverted changeset:
"[WPE][GTK] SleepDisabler does not inhibit sleep with
bubblewrap sandbox enabled: need to run xdg-dbus-proxy under
bwrap or xdg-desktop-portal does not read our app ID"
https://bugs.webkit.org/show_bug.cgi?id=219010
https://trac.webkit.org/changeset/272863
- 12:42 PM Changeset in webkit [272874] by
-
- 4 edits in trunk/Tools
[ews] Add python 3 support - part 2
https://bugs.webkit.org/show_bug.cgi?id=221899
Reviewed by Jonathan Bedard.
- CISupport/ews-build/steps.py: Map unicode() to str() for python 3, in order to keep code compatible with
both Python 2 and 3.
(ValidateCommiterAndReviewer.load_contributors): Used items instead of iteritems.
(PrintConfiguration.convert_build_to_os_name): Ditto.
- CISupport/ews-build/steps_unittest.py:
(BuildStepMixinAdditions.executedSteps): Converted filter to list comprehension.
- CISupport/ews-build/factories_unittest.py: Ditto.
- 12:28 PM Changeset in webkit [272873] by
-
- 11 edits in trunk/Source/WebKit
Unexpected ASSERT when touch events are dispatched on the main thread
https://bugs.webkit.org/show_bug.cgi?id=221832
Reviewed by Dean Jackson.
The TouchEvent message is special. It's received on a non-main thread and completed on the main thread, which asserts.
Rather than lose our asserts making sure our message CompletionHandlers are called on the correct thread,
mark this one with a new attribute, MainThreadCallback, which indicates that it is ok for the callback to be called on the main thread
like it was before r272558 in a different form.
- Platform/IPC/HandleMessage.h:
(IPC::handleMessageAsync):
- Scripts/webkit/messages.py:
- Scripts/webkit/model.py:
- Scripts/webkit/tests/TestWithImageDataMessages.h:
- Scripts/webkit/tests/TestWithLegacyReceiverMessages.h:
- Scripts/webkit/tests/TestWithSemaphoreMessages.h:
- Scripts/webkit/tests/TestWithSuperclass.messages.in:
- Scripts/webkit/tests/TestWithSuperclassMessages.h:
- Scripts/webkit/tests/TestWithoutAttributesMessages.h:
- WebProcess/WebPage/EventDispatcher.messages.in:
- 11:58 AM Changeset in webkit [272872] by
-
- 2 edits in trunk/Tools
[results.webkit.org] Distinguish hash and revision
https://bugs.webkit.org/show_bug.cgi?id=221861
<rdar://problem/74298457>
Reviewed by Aakash Jain.
- Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit.py:
(Commit.from_json): Pass hash and revision via json.
(Commit.init): Convert id to hash or revision.
- 11:50 AM Changeset in webkit [272871] by
-
- 2 edits in trunk/Source/WebCore
[GPU Process] (REGRESSION r272776): Incorrect order for decoding the Pattern repeat properties
https://bugs.webkit.org/show_bug.cgi?id=221910
Reviewed by Simon Fraser.
The order of decoding the repeatX and repeatY properties is reversed.
This is already caught by the GPU bots. Some of the wpt canvas tests have
been failing unexpectedly like 2d.pattern.paint.repeatx.basic.html.
- platform/graphics/Pattern.h:
(WebCore::Pattern::Parameters::decode):
- 11:24 AM Changeset in webkit [272870] by
-
- 13 edits in trunk
Prepare for adding relative color support
https://bugs.webkit.org/show_bug.cgi?id=221881
Reviewed by Darin Adler.
Source/WebCore:
In preparation for adding experimental relative color support a little cleanup
is in order. This change:
- Threads a CSSParserContext through the color parsing functions. This will be needed to check if the feature is enabled or not.
- Does a small cleanup of CSSParserContext, sorting features and using the initialization list in the constructor.
- Refactors some of the color parsing helpers to extract more helpers. These clarify the code better and will be shared by the relative parsers.
- Move normalization of components to after parsing to avoid unnecessary work in the case of failure and separate the phases a bit more.
- Removes some unnecessary ValueRangeAll parameters that were already the default.
- Switch HSLA and HWBA to stop storing their components in a 0-1 normalization and instead use values that match the input, 0-360 for hue, and 0-100 for the the remaining two components. This seems more natural, and will simplify future color function work that expects the values in this form.
- css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseColorWorkerSafe):
- css/parser/CSSParserContext.cpp:
(WebCore::shouldEnableLegacyOverflowScrollingTouch):
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
- css/parser/CSSParserContext.h:
(WebCore::CSSParserContextHash::hash):
- css/parser/CSSPropertyParser.cpp:
(WebCore::consumeShadow):
(WebCore::consumeCaretColor):
(WebCore::consumeOutlineColor):
(WebCore::consumePaintStroke):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::consumeBorder):
- css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlpha):
(WebCore::CSSPropertyParserHelpers::consumeHue):
(WebCore::CSSPropertyParserHelpers::normalizeHue):
(WebCore::CSSPropertyParserHelpers::clampRGBComponent):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::normalizeWhitenessBlackness):
(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
(WebCore::CSSPropertyParserHelpers::consumeColorWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeColor):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientStopColor):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeConicGradient):
(WebCore::CSSPropertyParserHelpers::consumeImageOrNone):
(WebCore::CSSPropertyParserHelpers::consumeCrossFade):
(WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeSingleShadow):
(WebCore::CSSPropertyParserHelpers::consumeImage):
(WebCore::CSSPropertyParserHelpers::parseOptionalAlpha): Deleted.
- css/parser/CSSPropertyParserHelpers.h:
(WebCore::CSSPropertyParserHelpers::consumeImage):
- editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange):
- platform/graphics/ColorConversion.cpp:
(WebCore::calculateHSLHue):
(WebCore::SRGBA<float>>::convert):
(WebCore::HSLA<float>>::convert):
(WebCore::HWBA<float>>::convert):
- platform/graphics/ColorModels.h:
- rendering/RenderTheme.cpp:
(WebCore::RenderTheme::datePlaceholderTextColor const):
Tools:
- TestWebKitAPI/Tests/WebCore/ColorTests.cpp:
Update HSLA tests to account for HSLA now using 0-360, 0-100, 0-100 bounds rather than 0-1, 0-1, 0-1.
- 11:21 AM Changeset in webkit [272869] by
-
- 1 copy in branches/safari-612.1.4-branch
New branch.
- 11:18 AM Changeset in webkit [272868] by
-
- 2 edits in trunk/LayoutTests
[GPU Process] Repopulate the TestExpectations file #3
https://bugs.webkit.org/show_bug.cgi?id=221708
Unreviewed test gardening.
Patch by Rini Patel <rini_patel@apple.com> on 2021-02-15
- gpu-process/TestExpectations:
- 11:12 AM Changeset in webkit [272867] by
-
- 3 edits in trunk/Source/WebKit
Page scrolling by wheel events doesn't work in non-AC mode pages if Hardware Acceleration Policy is changed dynamically from "always" to "never"
https://bugs.webkit.org/show_bug.cgi?id=221067
Reviewed by Carlos Garcia Campos.
GTK port is still supporting non-AC mode in WebKit2, and it can
enable/disable accelerated compositing dynamically.
r271235 fixed the bug that wheel event scrolling didn't work in
non-AC mode pages by checking if EventDispatcher's
m_scrollingTrees has a scrolling tree for a WebKit::WebPage.
However, if accelerated compositing is disabled dynamically,
m_scrollingTrees keeps to have a scrolling tree for the WebPage.
m_scrollingTrees should remove the item if accelerated compositing
is disabled.
r271235 added a code to check m_scrollingTrees, but it didn't lock
m_scrollingTreesMutex. The code can be removed. Removed it by
moving to above code.
EventDispatcher::wheelEvent was using a local lambda expression.
However the return value wasn't used. It can be a do-while
statement.
- WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent): Replaced the lambda
expression with a do-while statement. Unified code of the checking
scrolling tree existence.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPage::enterAcceleratedCompositingMode):
(WebKit::WebPage::exitAcceleratedCompositingMode):
(WebKit::WebPage::close):
- 11:10 AM Changeset in webkit [272866] by
-
- 8 edits in trunk
Getting the computed style should resolve animations using the last style change event style
https://bugs.webkit.org/show_bug.cgi?id=221882
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark 20 new PASS results.
- web-platform-tests/css/css-color/animation/opacity-interpolation-expected.txt:
- web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
- web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt:
- web-platform-tests/css/css-transforms/animation/transform-interpolation-006-expected.txt:
- web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
Source/WebCore:
We would fail some WTP tests when animating from the "neutral" value to some explicit value,
where "neutral" is the underlying value for the element, because we cloned the current element
style to be the target style when resolving animations under KeyframeEffect::getAnimatedStyle().
However, that current style may already carry the result of animation resolution, so we should
use the "last style change event style" set on the target to not see any unanimated styles.
If it's not set, then we can use the current element style since it means we will not have
resolved styles for this element yet.
- animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::getAnimatedStyle):
- 10:48 AM Changeset in webkit [272865] by
-
- 1 edit in branches/safari-612.1.3-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
Revert "Unreviewed infrastructure test."
This reverts commit r272864.
- 10:42 AM Changeset in webkit [272864] by
-
- 1 edit in branches/safari-612.1.3-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
Unreviewed infrastructure test.
- 10:40 AM Changeset in webkit [272863] by
-
- 4 edits in trunk/Source/WebKit
[WPE][GTK] SleepDisabler does not inhibit sleep with bubblewrap sandbox enabled: need to run xdg-dbus-proxy under bwrap or xdg-desktop-portal does not read our app ID
https://bugs.webkit.org/show_bug.cgi?id=219010
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
Reviewed by Carlos Garcia Campos.
We need to run xdg-dbus-proxy under bubblewrap so that we can mount /.flatpak-info in its
mount namespace. Why? Because xdg-desktop-portal checks the pid of its D-Bus peer using
Unix credentials, then looks in that process's mount namespace to read its app ID from
/.flatpak-info. If /.flatpak-info doesn't exist, then any portals that depend on the app ID
will break, including the inhibit portal that we need to prevent the system from suspending
during video playback. This normally works because flatpak runs xdg-dbus-proxy under
bubblewrap and mounts /.flatpak-info, but it breaks for WebKit because we don't. Start doing
so.
This method of getting the app ID might seem like a strange contortion, but it's really
required beacuse the sandboxed process cannot be trusted to provide its own app ID, and will
not have write access to its /.flatpak-info so we can rely on that.
- UIProcess/Launcher/ProcessLauncher.h:
- UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::createFlatpakInfo):
(WebKit::XDGDBusProxyLauncher::launch):
(WebKit::bubblewrapSpawn):
- 10:17 AM Changeset in webkit [272862] by
-
- 9 edits2 adds2 deletes in trunk/Source
Unreviewed, reverting r272831.
https://bugs.webkit.org/show_bug.cgi?id=221907
breaking internal build
Reverted changeset:
"[JSC] Enable JITCage on macOS"
https://bugs.webkit.org/show_bug.cgi?id=221805
https://trac.webkit.org/changeset/272831
- 10:06 AM Changeset in webkit [272861] by
-
- 8 edits in trunk/Source
Versioning.
WebKit-7612.1.5
- 10:00 AM Changeset in webkit [272860] by
-
- 3 edits1 add1 delete in trunk/LayoutTests
[LayoutTests] Convert http/tests/svg convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221859
<rdar://problem/74298062>
Patch by Chris Gambrell <Chris Gambrell> on 2021-02-15
Reviewed by Jonathan Bedard.
- http/tests/svg/cached-image-sizing.html:
- http/tests/svg/resources/delayCachedLoad.php: Removed.
- http/tests/svg/resources/delayCachedLoad.py: Added.
- imported/blink/http/tests/svg/svgload-vs-load.svg:
- 10:00 AM Changeset in webkit [272859] by
-
- 2 edits1 add1 delete in trunk/LayoutTests
[LayoutTests] Convert http/tests/incremental convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221902
<rdar://problem/74348931>
Patch by Chris Gambrell <Chris Gambrell> on 2021-02-15
Reviewed by Jonathan Bedard.
- http/tests/incremental/resources/delayed-css.php: Removed.
- http/tests/incremental/resources/delayed-css.py: Added.
- http/tests/incremental/stylesheet-body-incremental-rendering.html:
- 9:35 AM Changeset in webkit [272858] by
-
- 16 edits in trunk/Source
Move WebRTCPlatformCodecsInGPUProcessEnabled to Page Settings
https://bugs.webkit.org/show_bug.cgi?id=221893
Reviewed by Eric Carlson.
Source/ThirdParty/libwebrtc:
Always use the remote factory to simplify things. This ensures that factories remain in sync whether callbacks are set or not.
We check anyway whether callbacks are set and use them if needed.
Otherwise, we default to the in-process code path.
- Source/webrtc/sdk/WebKit/WebKitDecoder.mm:
(webrtc::createWebKitDecoderFactory):
- Source/webrtc/sdk/WebKit/WebKitEncoder.mm:
(webrtc::createWebKitEncoderFactory):
Source/WebCore:
Covered by existing tests.
- page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebRTCH264SimulcastEnabled):
(WebCore::RuntimeEnabledFeatures::webRTCPlatformCodecsInGPUProcessEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebRTCPlatformCodecsInGPUProcessEnabled): Deleted.
- testing/InternalSettings.cpp:
(WebCore::InternalSettings::setWebRTCPlatformCodecsInGPUProcessEnabled): Deleted.
- testing/InternalSettings.h:
- testing/InternalSettings.idl:
Source/WebKit:
Make LibWebRTCProvider and MediaRecorder provider keep a WebPage reference.
Use it to get WebRTCPlatformCodecsInGPUProcessEnabled setting when needed.
For LibWebRTCProvider, set callback only once before creating the first peer connection.
This makes sure we do not change callbacks while using them in another thread.
- WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:
(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):
- WebProcess/GPU/webrtc/MediaRecorderProvider.h:
(WebKit::MediaRecorderProvider::MediaRecorderProvider):
- WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::createPeerConnection):
- WebProcess/Network/webrtc/LibWebRTCProvider.h:
(WebKit::LibWebRTCProvider::LibWebRTCProvider):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::m_limitsNavigationsToAppBoundDomains):
Source/WTF:
- Scripts/Preferences/WebPreferencesExperimental.yaml:
- 9:26 AM Changeset in webkit [272857] by
-
- 2 edits in trunk/Tools
Add
git commit -vsupport to commit-log-editor
https://bugs.webkit.org/show_bug.cgi?id=221903
Patch by Adam Roben <Adam Roben> on 2021-02-15
Reviewed by Darin Adler.
From the git-commit documentation:
-v, --verbose
Show unified diff between the HEAD commit and what would be
committed at the bottom of the commit message template to help
the user describe the commit by reminding what changes the
commit has. Note that this diff output doesn't have its lines
prefixed with #. This diff will not be a part of the commit
message. See the commit.verbose configuration variable in
git-config(1).
commit-log-editor was getting confused about the diff not being prefixed
with #. Now it looks for the "cut line" that Git puts in the log just
before the diff. It looks like this:
# ------------------------ >8 ------------------------
See https://github.com/git/git/blob/e6362826a0409539642a5738db61827e5978e2e4/wt-status.c#L24-L25
- Scripts/commit-log-editor: Keep track of whether the "cut line" has been found. If it has, consider it and everything after it to be part of the log contents but not the existing log message.
- 9:11 AM Changeset in webkit [272856] by
-
- 4 edits in trunk/Source/WebCore
[LFC][IFC] Do not re-measure wrapped content
https://bugs.webkit.org/show_bug.cgi?id=221874
Reviewed by Antti Koivisto.
This patch addresses the performance issue with extremely long content when
the content gets re-measured many time while performing line breaking.
When a certain text content does not fit the line we can
- keep it on the current line and let it overflow or
- wrap the entire content to the next line or
- split it somewhere in the middle.
In case of 2 and 3 this overflowing content turns into the leading content on the subsequent line.
Now due to ligature (#3) and position dependent glyph sizing(#2) we need to remeasure this leading content again.
However with unreasonably long content and relatively small horizontal constraint, this could lead to
repeated, continuous text measuring.
In this patch we turn the overflow width into the leading width so that we measure the long text content only once.
(FIXME: This should be turned into a generic "use the overflow content as-is when turning it into leading content")
- layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
- layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::LineBuilder::handleInlineContent):
- layout/inlineformatting/InlineLineBuilder.h:
- 9:09 AM Changeset in webkit [272855] by
-
- 7 edits2 adds in trunk/Source/WebKit
Share more code between RemoteRealtimeAudioSource and RemoteRealtimeVideoSource
https://bugs.webkit.org/show_bug.cgi?id=221898
Reviewed by Eric Carlson.
Introduce RemoteRealtimeMediaSourceProxy to share more code between the two classes.
This class implements most of the messaging with capture process.
No change of behavior.
- WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:
(WebKit::RemoteRealtimeAudioSource::createRemoteMediaSource):
- WebProcess/cocoa/RemoteRealtimeAudioSource.h:
(WebKit::RemoteRealtimeAudioSource::identifier const): Deleted.
(WebKit::RemoteRealtimeAudioSource::connection): Deleted.
(WebKit::RemoteRealtimeAudioSource::applyConstraintsFailed): Deleted.
- WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:
(WebKit::RemoteRealtimeMediaSourceProxy::isReady const):
- WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:
(WebKit::RemoteRealtimeVideoSource::RemoteRealtimeVideoSource):
(WebKit::RemoteRealtimeVideoSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeVideoSource::~RemoteRealtimeVideoSource):
(WebKit::RemoteRealtimeVideoSource::setShouldApplyRotation):
(WebKit::RemoteRealtimeVideoSource::hasEnded):
(WebKit::RemoteRealtimeVideoSource::generatePresets):
(WebKit::RemoteRealtimeVideoSource::setFrameRateWithPreset):
(WebKit::RemoteRealtimeVideoSource::gpuProcessConnectionDidClose):
(WebKit::RemoteRealtimeVideoSource::whenReady): Deleted.
(WebKit::RemoteRealtimeVideoSource::didFail): Deleted.
(WebKit::RemoteRealtimeVideoSource::setAsReady): Deleted.
(WebKit::RemoteRealtimeVideoSource::connection): Deleted.
(WebKit::RemoteRealtimeVideoSource::startProducingData): Deleted.
(WebKit::RemoteRealtimeVideoSource::stopProducingData): Deleted.
- WebProcess/cocoa/RemoteRealtimeVideoSource.h:
(WebKit::RemoteRealtimeVideoSource::identifier const): Deleted.
- 9:07 AM Changeset in webkit [272854] by
-
- 2 edits in trunk/Source/WebKit
[WPE][GTK] BubblewrapLauncher should create flatpak-info keyfile only once
https://bugs.webkit.org/show_bug.cgi?id=221224
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-15
Reviewed by Adrian Perez de Castro.
BubblewrapLauncher should create its flatpak-info keyfile only once, because its contents
will never change. Makes more sense to cache this tiny string in memory than to recompute it
every time a subprocess is launched.
When working on this, I noticed a quirk in the documentation of g_key_file_to_data: although
the function has a GError parameter, it is legacy and the function is actually guaranteed to
succeed. So icky though it seems, I've removed the error checking for that, as recommended
by its documentation.
- UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::createFlatpakInfo):
- 9:01 AM Changeset in webkit [272853] by
-
- 3 edits in trunk/Source/WebCore
[iOS] Cleanup exit/enterFullScreenHandler and how the global states are set.
https://bugs.webkit.org/show_bug.cgi?id=221886
Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-02-15
Reviewed by Darin Adler.
There is no change in behavior with this commit.
- platform/ios/VideoFullscreenInterfaceAVKit.h:
- platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
(VideoFullscreenInterfaceAVKit::doExitFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
Pass new nextActions OptionSet to define the behaviour of the handler; either call doEnterFullScreen or doExitFullScreen, rather than set member booleans that could be incorrectly used by other methods.
- 8:58 AM Changeset in webkit [272852] by
-
- 4 edits3 adds in trunk
Use page setting to expose or not registerRTCRtpScriptTransformer in workers
https://bugs.webkit.org/show_bug.cgi?id=221892
Reviewed by Eric Carlson.
Source/WebCore:
Test: http/wpt/webrtc/no-webrtc-transform.html
- bindings/js/WebCoreBuiltinNames.h:
- workers/DedicatedWorkerGlobalScope.idl:
LayoutTests:
- http/wpt/webrtc/no-webrtc-transform-expected.txt: Added.
- http/wpt/webrtc/no-webrtc-transform.html: Added.
- http/wpt/webrtc/no-webrtc-transform.js: Added.
- 8:52 AM Changeset in webkit [272851] by
-
- 5 edits4 adds4 deletes in trunk/LayoutTests
[LayoutTests] Convert http/tests/ssl convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221862
<rdar://problem/74298527>
Patch by Chris Gambrell <Chris Gambrell> on 2021-02-15
Reviewed by Jonathan Bedard.
- http/tests/ssl/referer-301.html:
- http/tests/ssl/referer-303.html:
- http/tests/ssl/resources/ping-with-unsafe-redirect-frame.html:
- http/tests/ssl/resources/redirect-ping-to-http.php: Removed.
- http/tests/ssl/resources/redirect-ping-to-http.py: Added.
- http/tests/ssl/resources/referer-301-redir.php: Removed.
- http/tests/ssl/resources/referer-301-redir.py: Added.
- http/tests/ssl/resources/referer-303-redir.php: Removed.
- http/tests/ssl/resources/referer-303-redir.py: Added.
- http/tests/ssl/verify-ssl-enabled.php: Removed.
- http/tests/ssl/verify-ssl-enabled.py: Added.
- platform/win/TestExpectations:
- 8:51 AM Changeset in webkit [272850] by
-
- 1 edit1 delete in trunk
Unreviewed cleanup after r272824.
- Restored stepped on Tools/ChangeLog entries.
- Eliminated unneeded empty directory.
- 4:56 AM Changeset in webkit [272849] by
-
- 10 edits in trunk/Source/WebCore
CSSFontFace should not need its m_fontSelector data member
https://bugs.webkit.org/show_bug.cgi?id=208351
Reviewed by Myles C. Maxfield.
Remove the last use of m_fontSelector from CSSFontFace. Adding
CachedFontClient::fontRequested allows us to add the FontSelector as a
client while we have access to both the FontSelector and the CachedFont
in CSSFontFace::appendSources.
No new tests because there is no behavior change.
- css/CSSFontFace.cpp:
(WebCore::CSSFontFace::appendSources):
(WebCore::CSSFontFace::create):
(WebCore::CSSFontFace::opportunisticallyStartFontDataURLLoading):
(WebCore::CSSFontFace::document):
(WebCore::CSSFontFace::pump):
(WebCore::CSSFontFace::font):
- css/CSSFontFace.h:
- css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::opportunisticallyStartFontDataURLLoading):
(WebCore::CSSFontFaceSource::load):
- css/CSSFontFaceSource.h:
- css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::opportunisticallyStartFontDataURLLoading):
(WebCore::CSSFontSelector::clearDocument):
(WebCore::CSSFontSelector::willBeginLoadingFontSoon):
(WebCore::CSSFontSelector::fontRequested):
(WebCore::CSSFontSelector::loadPendingFonts):
- css/CSSFontSelector.h:
- loader/cache/CachedFont.cpp:
(WebCore::CachedFont::requestLoad):
- loader/cache/CachedFont.h:
- loader/cache/CachedFontClient.h:
(WebCore::CachedFontClient::fontRequested):
- 3:39 AM Changeset in webkit [272848] by
-
- 2 edits in trunk/Source/WTF
REGRESSION(r272842) [GStreamer] Layout tests exiting early due to crashes after GPUProcess for media enabled by default for WTR
https://bugs.webkit.org/show_bug.cgi?id=221883
Reviewed by Philippe Normand.
- Scripts/Preferences/WebPreferencesExperimental.yaml: Disable
UseGPUProcessForMediaEnabled when using GStreamer for now.
- 3:24 AM Changeset in webkit [272847] by
-
- 7 edits2 adds in trunk/LayoutTests
[selectors] Update WPT test suite
https://bugs.webkit.org/show_bug.cgi?id=221890
Reviewed by Carlos Alberto Lopez Perez.
LayoutTests/imported/w3c:
- web-platform-tests/css/selectors/focus-visible-002-expected.txt:
- web-platform-tests/css/selectors/focus-visible-002.html:
- web-platform-tests/css/selectors/focus-visible-006.html:
- web-platform-tests/css/selectors/selectors-dir-selector-auto-direction-change-001-expected.xht: Added.
- web-platform-tests/css/selectors/selectors-dir-selector-auto-direction-change-001.html: Added.
- web-platform-tests/css/selectors/w3c-import.log:
LayoutTests:
- TestExpectations: Add test failure for :dir().
- 3:05 AM Changeset in webkit [272846] by
-
- 2 edits in trunk/Source/WebCore
Improve readability in RenderFlexibleBox::childIntrinsicLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=221877
Patch by Rob Buis <rbuis@igalia.com> on 2021-02-15
Reviewed by Sergio Villar Senin.
Improve readability in RenderFlexibleBox::childIntrinsicLogicalWidth by
using Optional instead of -1, which is a magic value that ends up not
being used.
- rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth const):
- 2:38 AM Changeset in webkit [272845] by
-
- 3 edits3 adds in trunk
Crash in RetainPtr<CGImage*>::RetainPtr via ImageBufferCGBackend::toCFData
https://bugs.webkit.org/show_bug.cgi?id=221376
Patch by Frederic Wang <fwang@igalia.com> on 2021-02-15
Reviewed by Said Abou-Hallawa.
Source/WebCore:
Call to copyNativeImage(CopyBackingStore) may return a null pointer if CGBitmapContextCreateImage
does. This patch fixes a crash due to null pointer dereference and adds a similar check for
copyNativeImage(DontCopyBackingStore).
Test: fast/canvas/resize-to-large-canvas-and-convert-to-blog.html
- platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::toCFData const):
LayoutTests:
- fast/canvas/resize-to-large-canvas-and-convert-to-blog-expected.txt: Added.
- fast/canvas/resize-to-large-canvas-and-convert-to-blog-expected.txt: Added.
- fast/canvas/resize-to-large-canvas-and-convert-to-blog.html: Added.
- 2:23 AM Changeset in webkit [272844] by
-
- 2 edits in trunk/Source/WebCore
[selectors] Update :focus-visible status in features.json
https://bugs.webkit.org/show_bug.cgi?id=221889
Reviewed by Sergio Villar Senin.
- features.json:
- 1:04 AM Changeset in webkit [272843] by
-
- 4 edits in trunk/Source/WebCore
Don't update form control elements validity status if they are detached from the document.
https://bugs.webkit.org/show_bug.cgi?id=220390
Reviewed by Ryosuke Niwa.
When a radio button input element is removed from a form (either because it's moved or because the form
is deleted) then it's also removed from its current RadioButtonGroup. The latter removal might require the
update of the input validity status. In case of validity status changes, then we have to walk up
the ancestor chain in order to update the style for pseudo classes such as :valid :invalid. That node traversal
should not be done in case of being detached from the main document because our ancestors might have been
deleted before.
Apart from that we're replacing the HashSet of raw pointers to descendants in HTMLFieldSetElement by a WeakHashSet
which is safer.
- html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::matchesValidPseudoClass const):
(WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass const):
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):
- html/HTMLFieldSetElement.h:
- html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateValidity(): Early return in case of isConnected().
Feb 14, 2021:
- 6:08 PM Changeset in webkit [272842] by
-
- 46 edits in trunk
[GPUP] Move UseGPUProcessForMediaEnabled from WebPreferencesInternal to WebPreferencesExperimental
https://bugs.webkit.org/show_bug.cgi?id=221310
Reviewed by Eric Carlson.
Source/WTF:
Move UseGPUProcessForMediaEnabled from WebPreferencesInternal to WebPreferencesExperimental,
so that the WebKitTestRunner will turn it on by default.
- Scripts/Preferences/WebPreferencesExperimental.yaml:
- Scripts/Preferences/WebPreferencesInternal.yaml:
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
UseWKPreferencesSetBoolValueForKeyForTesting()to set the preference for testing.
It works no matter the preference is internal or experimental.
LayoutTests:
Update expectations of the tests which are affected by the "Media In GPUProcess" feature
(WebKitTestRunner will enable the feature by default). Also set "UseGPUProcessForMediaEnabled=false"
for some webrtc tests.
- platform/ios-wk2/TestExpectations:
- platform/mac-wk2/TestExpectations:
- platform/mac/TestExpectations:
- platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:
- platform/wk2/TestExpectations:
- webrtc/captureCanvas-webrtc-software-h264-baseline.html:
- webrtc/captureCanvas-webrtc-software-h264-high.html:
- webrtc/captureCanvas-webrtc.html:
- webrtc/concurrentVideoPlayback2.html:
- webrtc/direction-change.html:
- webrtc/disable-encryption.html:
- webrtc/h264-baseline.html:
- webrtc/h264-high.html:
- webrtc/multi-audio.html:
- webrtc/multi-video.html:
- webrtc/peer-connection-track-end.html:
- webrtc/peerconnection-page-cache-long.html:
- webrtc/peerconnection-page-cache.html:
- webrtc/remove-track.html:
- webrtc/utf8-sdp.html:
- webrtc/video-addTrack.html:
- webrtc/video-addTransceiver.html:
- webrtc/video-autoplay.html:
- webrtc/video-disabled-black.html:
- webrtc/video-h264.html:
- webrtc/video-interruption.html:
- webrtc/video-mediastreamtrack-stats.html:
- webrtc/video-mute.html:
- webrtc/video-remote-mute.html:
- webrtc/video-replace-muted-track.html:
- webrtc/video-replace-track-to-null.html:
- webrtc/video-replace-track.html:
- webrtc/video-rotation-no-cvo.html:
- webrtc/video-rotation.html:
- webrtc/video-setDirection.html:
- webrtc/video-sframe.html:
- webrtc/video-stats.html:
- webrtc/video-unmute.html:
- webrtc/video-with-data-channel.html:
- webrtc/video.html:
- 12:51 PM Changeset in webkit [272841] by
-
- 2 edits in trunk/Source/WebCore
[iOS] MobileSafari crashes at WebCore: WebCore::VideoFullscreenInterfaceAVKit::doEnterFullscreen
https://bugs.webkit.org/show_bug.cgi?id=221863
<rdar://73861140>
Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-02-14
Reviewed by Darin Adler.
On iPad, it's possible for AVKit to fail due to racing requests to exit full screen and enter full screen. The enterFullscreenHandler would attempt to immediately re-enter full screen.
For now we bail-out early to avoid the crash. In a follow-up patch we will ensure that the condition to enter fullscreen while there's a pending operation to exit fullscreen can't occur.
No new tests, can't reproduce. Analysis has been entirely theoretical.
- platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
Exit early if error returned.
- 11:06 AM Changeset in webkit [272840] by
-
- 2 edits in trunk/JSTests
JSC stress test stress/copy-data-properties-fast-path.js.default fails on s390x and ppc64le
https://bugs.webkit.org/show_bug.cgi?id=221557
<rdar://problem/74311603>
Unreviewed, unskip this test since it seems Yusuke has already fixed it.
Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-14
- stress/copy-data-properties-fast-path.js:
- 9:18 AM Changeset in webkit [272839] by
-
- 3 edits2 adds in trunk
Crash calling replaceTrack on a sender that outlives its RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=221870
Reviewed by Youenn Fablet.
Source/WebCore:
Test: fast/mediastream/RTCRtpSender-outlives-RTCPeerConnection.html
- Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::replaceTrack): Added a null check for m_connection.
It's already using WeakPtr, so null check is all we need.
LayoutTests:
- fast/mediastream/RTCRtpSender-outlives-RTCPeerConnection-expected.txt: Added.
- fast/mediastream/RTCRtpSender-outlives-RTCPeerConnection.html: Added.