Timeline



May 12, 2020:

11:41 PM Changeset in webkit [261600] by Alexey Shvayka
  • 54 edits
    1 add
    2 deletes in trunk

Implement @isConstructor bytecode intrinsic and bytecode for that
https://bugs.webkit.org/show_bug.cgi?id=144093

Reviewed by Keith Miller.

JSTests:

  • microbenchmarks/is-constructor.js: Added.
  • stress/async-arrow-function-in-class-heritage.js:
  • stress/is-constructor.js:
  • test262/expectations.yaml: Mark 2 test cases as passing.

LayoutTests/imported/w3c:

Tests for unsupported customized built-in elements now fail early
since interfaces they extend lack Constructor WebIDL attribute.

  • web-platform-tests/custom-elements/Document-createElement-expected.txt:
  • web-platform-tests/custom-elements/Document-createElementNS-expected.txt:
  • web-platform-tests/custom-elements/HTMLElement-constructor-expected.txt:
  • web-platform-tests/custom-elements/builtin-coverage-expected.txt:
  • web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
  • web-platform-tests/custom-elements/parser/serializing-html-fragments-expected.txt:
  • web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt:
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt:
  • web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt:

Source/JavaScriptCore:

This change replaces @isConstructor link-time-constant with bytecode intrinsic and utilizes it
in ClassExprNode::emitBytecode() according to the spec [1], aligning JSC with V8 and SpiderMonkey.

Before this patch, we checked if "prototype" of superclass is an object, which is incorrect for
generators and bound non-constructor functions with own "prototype".

OpIsConstructor's fast path can't be easily compiled, and it's not a hot code anyway, so instead
we reduce code bloat by just calling slow ops from DFG and FTL (if we bail out, we slow down all
@isConstructor call sites). This advances microbenchmarks/is-constructor.js by ~35%.

[1]: https://tc39.es/ecma262/#sec-runtime-semantics-classdefinitionevaluation (step 5.f)

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.h:
  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.cpp:

(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitIsConstructor):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ClassExprNode::emitBytecode):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileIsConstructor):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileIsConstructor):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/ECMAScriptSpecInternalFunctions.cpp: Removed.
  • runtime/ECMAScriptSpecInternalFunctions.h: Removed.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

LayoutTests:

Tests for unsupported customized built-in elements now fail early
since interfaces they extend lack Constructor WebIDL attribute.

  • js/class-syntax-extends-expected.txt:
  • js/script-tests/class-syntax-extends.js:
  • platform/gtk/imported/w3c/web-platform-tests/custom-elements/builtin-coverage-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/custom-elements/builtin-coverage-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/custom-elements/builtin-coverage-expected.txt:
10:35 PM Changeset in webkit [261599] by Peng Liu
  • 5 edits
    1 add in trunk/Source/WebKit

Add the feature flag plist file parser
https://bugs.webkit.org/show_bug.cgi?id=211457

Reviewed by Tim Horton.

WebKit needs to parse the feature flags plist by itself in some cases.

  • Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm: Added.

(WebKit::featureFlagEnabled):

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultAsyncFrameAndOverflowScrollingEnabled):
(WebKit::defaultUseGPUProcessForMedia):
(WebKit::defaultRenderCanvasInGPUProcessEnabled):
(WebKit::defaultCaptureAudioInGPUProcessEnabled):
(WebKit::defaultCaptureVideoInGPUProcessEnabled):
(WebKit::defaultWebRTCCodecsInGPUProcess):
(WebKit::defaultWebGL2Enabled):
(WebKit::defaultWebGPUEnabled):
(WebKit::defaultInAppBrowserPrivacy):
(WebKit::defaultIncrementalPDFEnabled):
(WebKit::defaultWebXREnabled):

  • Shared/WebPreferencesDefaultValues.h:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
9:35 PM Changeset in webkit [261598] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

catch_mach_exception_raise_state() should fail early if the faulting address is not of interest.
https://bugs.webkit.org/show_bug.cgi?id=211799
<rdar://problem/62939204>

Reviewed by Saam Barati.

  • wtf/threads/Signals.cpp:
9:14 PM Changeset in webkit [261597] by commit-queue@webkit.org
  • 82 edits in trunk/Source

Give some NetworkLoadMetrics to WebCoreNSURLSession's delegate
https://bugs.webkit.org/show_bug.cgi?id=211759
<rdar://problem/62909440>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-12
Reviewed by Jer Noble.

Source/WebCore:

This required packaging the fetchStart time with the rest of the time deltas,
passing a const NetworkLoadMetrics& down to the media loader, and packaging the data up
in an ObjC object that pretends to be NSURLSessionTaskMetrics, just like WebCoreNSURLSession
pretends to be an NSURLSession.

I manually verified the NSDates are correct. This is not straightforward to automate tests for
because of the inherant dynamic nature of timing data, and because our other WebCoreNSURLSession
tests use WebKitLegacy, and that approach won't work here because we are only hooking up data from
NSURLSession, which is only used in modern WebKit.

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::notifyFinished):

  • Modules/beacon/NavigatorBeacon.h:
  • bindings/js/CachedModuleScriptLoader.cpp:

(WebCore::CachedModuleScriptLoader::notifyFinished):

  • bindings/js/CachedModuleScriptLoader.h:
  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished):

  • dom/LoadableClassicScript.h:
  • html/HTMLImageLoader.cpp:

(WebCore::HTMLImageLoader::notifyFinished):

  • html/HTMLImageLoader.h:
  • html/ImageDocument.cpp:

(WebCore::ImageDocument::finishedParsing):

  • loader/ApplicationManifestLoader.cpp:

(WebCore::ApplicationManifestLoader::notifyFinished):

  • loader/ApplicationManifestLoader.h:
  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::notifyFinished):

  • loader/CrossOriginPreflightChecker.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::notifyFinished):

  • loader/DocumentLoader.h:
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::notifyFinished):

  • loader/DocumentThreadableLoader.h:
  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::notifyFinished):

  • loader/ImageLoader.h:
  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::notifyFinished):

  • loader/LinkLoader.h:
  • loader/LinkPreloadResourceClients.h:
  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResource::notifyFinished):

  • loader/MediaResourceLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFinishLoading):

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::notifyFinished):

  • loader/TextTrackLoader.h:
  • loader/appcache/ApplicationCacheResourceLoader.cpp:

(WebCore::ApplicationCacheResourceLoader::responseReceived):
(WebCore::ApplicationCacheResourceLoader::notifyFinished):

  • loader/appcache/ApplicationCacheResourceLoader.h:
  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::finishLoading):

  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::finishLoading):
(WebCore::CachedCSSStyleSheet::checkNotify):

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::finishLoading):
(WebCore::CachedFont::checkNotify):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::finishLoading):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):
(WebCore::CachedRawResource::finishLoading):

  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):
(WebCore::CachedResource::checkNotify):
(WebCore::CachedResource::finishLoading):
(WebCore::CachedResource::error):
(WebCore::CachedResource::cancelLoad):
(WebCore::CachedResource::didAddClient):

  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceClient.h:

(WebCore::CachedResourceClient::notifyFinished):

  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::finishLoading):

  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::finishLoading):

  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::finishLoading):

  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::finishLoading):
(WebCore::CachedXSLStyleSheet::checkNotify):

  • loader/cache/CachedXSLStyleSheet.h:
  • loader/cache/KeepaliveRequestTracker.cpp:

(WebCore::KeepaliveRequestTracker::notifyFinished):

  • loader/cache/KeepaliveRequestTracker.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResourceClient::loadFinished):

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::CachedResourceMediaLoader::notifyFinished):

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy const):
(WebCore::NetworkLoadMetrics::operator== const):
(WebCore::NetworkLoadMetrics::encode const):
(WebCore::NetworkLoadMetrics::decode):
(WTF::Persistence::Coder<Optional<WebCore::NetworkLoadPriority>>::encode): Deleted.
(WTF::Persistence::Coder<Optional<WebCore::NetworkLoadPriority>>::decode): Deleted.

  • platform/network/cocoa/NetworkLoadMetrics.mm:

(WebCore::copyTimingData):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(networkLoadMetricsDate):
(-[WebCoreNSURLSessionTaskTransactionMetrics _initWithMetrics:]):
(-[WebCoreNSURLSessionTaskTransactionMetrics fetchStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupEndDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics connectStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics secureConnectionStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics connectEndDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics requestStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics responseStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics responseEndDate]):
(-[WebCoreNSURLSessionTaskMetrics _initWithMetrics:]):
(-[WebCoreNSURLSessionTaskMetrics transactionMetrics]):
(WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished):
(-[WebCoreNSURLSessionDataTask _finish]):
(-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:metrics:]):
(-[WebCoreNSURLSessionDataTask resource:accessControlCheckFailedWithError:]):
(-[WebCoreNSURLSessionDataTask resource:loadFailedWithError:]):
(-[WebCoreNSURLSessionDataTask resourceFinished:metrics:]):
(-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]): Deleted.
(-[WebCoreNSURLSessionDataTask resourceFinished:]): Deleted.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::notifyFinished):

  • rendering/RenderElement.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::notifyFinished):

  • rendering/RenderImage.h:
  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::notifyFinished):

  • rendering/RenderLayerFilters.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::notifyFinished):

  • svg/SVGFEImageElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::notifyFinished):

  • svg/SVGUseElement.h:

Source/WebKit:

This also reduces duplicate lookups in RemoteMediaResourceManager

  • GPUProcess/media/RemoteMediaResource.cpp:

(WebKit::RemoteMediaResource::loadFinished):

  • GPUProcess/media/RemoteMediaResource.h:
  • GPUProcess/media/RemoteMediaResourceManager.cpp:

(WebKit::RemoteMediaResourceManager::responseReceived):
(WebKit::RemoteMediaResourceManager::redirectReceived):
(WebKit::RemoteMediaResourceManager::dataSent):
(WebKit::RemoteMediaResourceManager::dataReceived):
(WebKit::RemoteMediaResourceManager::accessControlCheckFailed):
(WebKit::RemoteMediaResourceManager::loadFailed):
(WebKit::RemoteMediaResourceManager::loadFinished):

  • GPUProcess/media/RemoteMediaResourceManager.h:
  • GPUProcess/media/RemoteMediaResourceManager.messages.in:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

  • WebProcess/GPU/media/RemoteMediaResourceProxy.cpp:

(WebKit::RemoteMediaResourceProxy::loadFinished):

  • WebProcess/GPU/media/RemoteMediaResourceProxy.h:
8:09 PM Changeset in webkit [261596] by rmorisset@apple.com
  • 4 edits in trunk

Exception check for OOM is a bit too late in JSBigInt::exponentiate.
https://bugs.webkit.org/show_bug.cgi?id=211823

Reviewed by Mark Lam.

JSTests:

Just add one more case so that this test now catches this bug (the control-flow through JSBigInt::exponentiate is pretty convoluted).

  • stress/bigint-exponential-oom.js:

(shouldThrow):

Source/JavaScriptCore:

We were doing multiplyImpl(...).payload.asHeapBigInt(), but multiplyImpl can return a null payload if it causes an exception.
So we must first check whether an exception was raised, and only if not can we do asHeapBigInt.

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::exponentiateImpl):

8:04 PM Changeset in webkit [261595] by sbarati@apple.com
  • 3 edits
    1 add in trunk

handling of Check in VarargsForwardingPhase is too pessimistic
https://bugs.webkit.org/show_bug.cgi?id=211810

Reviewed by Keith Miller and Filip Pizlo.

JSTests:

  • microbenchmarks/forward-varargs-check-shouldnt-escape.js: Added.

(g):
(foo):

Source/JavaScriptCore:

We were treating a check, even if it wasn't on the sink candidate,
as if it could escape the candidate. That's wrong. Only checks on the
candidate have the escaping ability.

  • dfg/DFGVarargsForwardingPhase.cpp:
7:57 PM Changeset in webkit [261594] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[CG] Change the UTI of the "WebP" image to be "org.webmproject.webp"
https://bugs.webkit.org/show_bug.cgi?id=211794
<rdar://problem/63031187>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-05-12
Reviewed by Darin Adler.

See https://developers.google.com/speed/webp/docs/riff_container.

  • platform/graphics/cg/UTIRegistry.cpp:

(WebCore::defaultSupportedImageTypes):
Fix review comments from bug 208038.

7:05 PM WebKitGTK/2.28.x edited by Michael Catanzaro
(diff)
5:51 PM Changeset in webkit [261593] by mark.lam@apple.com
  • 7 edits in branches/safari-609-branch

Cherry-pick r261549. rdar://problem/63156073

2020-05-12 Mark Lam <mark.lam@apple.com>

Wasm::enableFastMemory() was called too late.
https://bugs.webkit.org/show_bug.cgi?id=211773

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

If Wasm fast memory is to be enabled, we should just do it in initializeThreading()
just like for all the other signal handlers that need to be initialized for JSC.
This simplifies its initialization and ensures that it is done in a timely manner
before Configs are frozen.

  • jsc.cpp: (jscmain):
  • runtime/InitializeThreading.cpp: (JSC::initializeThreading):

Source/WebKit:

Previously, we were calling Wasm::enableFastMemory() in WebProcess::initializeWebProcess().
By then, it is too late because the JSC::Config and WTF::Config have already been
frozen. There is nothing special about Wasm::enableFastMemory() that it needs to
be called this late. This patch moves it into JSC::initializeThreading() where
it belongs.

This change also make the initialization of Wasm fast memory consistent with how
we have always done it for the jsc shell i.e. it is initialized at the end of
JSC::initializeThreading().

  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):
5:17 PM Changeset in webkit [261592] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Move perspective-setting code into its own function
https://bugs.webkit.org/show_bug.cgi?id=211812

Reviewed by Zalan Bujtas.

Move the code that updates anchor point and children transform (for perspective)
into its own function.

No behavior change.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint):
(WebCore::computeOffsetFromAncestorGraphicsLayer):
(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerBacking.h:
5:17 PM Changeset in webkit [261591] by mark.lam@apple.com
  • 11 edits
    2 copies in branches/safari-609-branch/Source

Cherry-pick r260165, r261538. rdar://problem/63156083

2020-04-15 Robin Morisset <rmorisset@apple.com>

Flaky Test: fetch/fetch-worker-crash.html
https://bugs.webkit.org/show_bug.cgi?id=187257
<rdar://problem/48527526>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

The crash is coming from setExceptionPorts which is inlined in WTF::registerThreadForMachExceptionHandling.
From the error message we know that the problem is an "invalid port right".
http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/thread_set_exception_ports.html tells us that the "port right" is the third parameter to thread_set_exception_ports, which is exceptionPort in our case.
exceptionPort is a global variable defined at the top of Signals.cpp:

static mach_port_t exceptionPort;

It is set in exactly one place:

kern_return_t kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exceptionPort);

in a std::call_once, in startMachExceptionHandlerThread().
Note that startMachExceptionHandlerThread() is called from the main thread just before the point where we are stuck.. and there is no synchronization to make sure it completed and its effect is visible to the worker thread before it uses exceptionPort.

So I think the crash is due to this race between allocating exceptionPort and using it, resulting in an invalid exceptionPort being sometimes passed to the kernel.
So this patch is a simple speculative fix, by running startMachExceptionHandlerThread() in initializeThreading(), before JSLock()::lock() can be run.

  • runtime/InitializeThreading.cpp: (JSC::initializeThreading):

2020-05-11 Mark Lam <mark.lam@apple.com>

Introduce WTF::Config and put Signal.cpp's init-once globals in it.
https://bugs.webkit.org/show_bug.cgi?id=211729
<rdar://problem/62938878>

Reviewed by Keith Miller and Saam Barati.

  1. Initialize VMTraps' signals early now that we'll be freezing signals at the end of the first VM initialization.
  1. Move the !initializeThreadingHasBeenCalled RELEASE_ASSERT in initializeThreading() to the bottom of the function. This way, we'll also catch bugs which may cause us to jump into the middle of the function.

Added a compilerFence there to ensure that the RELEASE_ASSERT is only executed
after all initialization is done. This guarantees that it will only be executed
at the end.

  1. Call WTF::Config::permanentlyFreeze() from JSC::Config::permanentlyFreeze() for obvious reasons: freezing one should freeze the other.
  • runtime/InitializeThreading.cpp: (JSC::initializeThreading):
  • runtime/JSCConfig.cpp: (JSC::Config::permanentlyFreeze):
  • runtime/VMTraps.cpp: (JSC::VMTraps::initializeSignals):
  • runtime/VMTraps.h:

Source/WTF:

Make startMachExceptionHandlerThread visible so that we can make sure it is called whenever initializing JSC.

  • wtf/threads/Signals.cpp: (WTF::startMachExceptionHandlerThread):
  • wtf/threads/Signals.h:

2020-05-11 Mark Lam <mark.lam@apple.com>

Introduce WTF::Config and put Signal.cpp's init-once globals in it.
https://bugs.webkit.org/show_bug.cgi?id=211729
<rdar://problem/62938878>

Reviewed by Keith Miller and Saam Barati.

  1. Added WTF::Config for storing globals that effectively serve as constants i.e we'll be initializing them before or during the first VM instantiation, but should not have any reason to modify them later. The WTF::Config will be frozen (along with JSC::Config) at the end of instantiating the first VM instance.
  1. Added a Config::AssertNotFrozenScope RAII object to ensure that initialization operations that should only be called at initialization time, will not be called once the Config has been frozen.
  1. Moved most of Signal.cpp's globals into WTF::Config. The only globals (or statics) not moved are ones that cannot be moved because they require a non-trivial default constructor (once_flag), or need to be modifiable at runtime (e.g. Lock).

Instead of freezing the once_flag, we sanity check the call_once block with
the Config::AssertNotFrozenScope.

  1. SignalHandler records are now allocated from arrays of SignalHandlerMemory in the WTF::Config. The number of signal handlers we will ever install is always finite. Hence, there's no reason to use a dynamic data structure like the LocklessBag to hold it.

We introduce a SignalHandlers struct to manage these arrays (and all the other
Signal.cpp globals that we want to move to the WTF::Config). Amongst other
things, SignalHandlers provides the abstractions for:

  1. allocating memory for the SignalHandler instances. See SignalHandlers::alloc().
  2. iterating SignalHandler instances. See SignalHandlers::forEachHandler().

To maintain the synchronization properties of the LocklessBag,
SignalHandlers::alloc() uses a mutex. In practice, this mutex will never be
contended on because all signal handlers are now installed at initialization
time before any concurrency comes into play.

  1. We now initialize activeThreads() eagerly via initializeThreading. In production configurations, this does not matter because signal handler installations will always trigger its initialization. However, in debugging configurations, we may end up disabling the use of all signal handlers. As a result, we need to do this eager initialization to ensure that it is done before we freeze the WTF::Config.
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Threading.cpp: (WTF::initializeThreading):
  • wtf/WTFConfig.cpp: Added. (WTF::Config::disableFreezingForTesting): (WTF::Config::permanentlyFreeze):
  • wtf/WTFConfig.h: Added. (WTF::Config::configureForTesting): (WTF::Config::AssertNotFrozenScope::~AssertNotFrozenScope):
  • wtf/threads/Signals.cpp: (WTF::SignalHandlers::alloc): (WTF::SignalHandlers::forEachHandler const): (WTF::startMachExceptionHandlerThread): (WTF::handleSignalsWithMach): (WTF::setExceptionPorts): (WTF::activeThreads): (WTF::installSignalHandler): (WTF::jscSignalHandler): (WTF::SignalHandlers::initialize):
  • wtf/threads/Signals.h:
5:16 PM Changeset in webkit [261590] by jer.noble@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION(r258314): 5% regression on Membuster5
https://bugs.webkit.org/show_bug.cgi?id=211803
<rdar://problem/60609824>

Reviewed by Darin Adler.

Disable HAVE(AVSAMPLEBUFFERVIDEOOUTPUT), as it caused a large regression in our Membuster5 benchmark.

  • wtf/PlatformHave.h:
5:13 PM Changeset in webkit [261589] by keith_miller@apple.com
  • 3 edits
    2 adds in trunk

The bottom value set for m_value in iterator_next should be materialized after a done getter
https://bugs.webkit.org/show_bug.cgi?id=211811

Reviewed by Saam Barati.

JSTests:

  • stress/for-of-done-getter-materialize-bottom-late.js: Added.

(let.d.get done):

  • stress/for-of-value-getter-contains-control-flow.js: Added.

(let.d.get value):
(let.d.get done):

Source/JavaScriptCore:

Right now, if the done getter contains control flow, then we will
have the bottom value in a different block from the
MovHint/SetLocal and we will fail to validate.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

5:11 PM Changeset in webkit [261588] by jiewen_tan@apple.com
  • 5 edits in trunk/Source

[WebAuthn] Don't assume extensions always exist
https://bugs.webkit.org/show_bug.cgi?id=211760
<rdar://problem/61217642>

Reviewed by Brent Fulgham.

Source/WebCore:

  • Modules/webauthn/fido/U2fCommandConstructor.cpp:

(fido::processGoogleLegacyAppIdSupportExtension):

Source/WebKit:

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::WebCore::processGoogleLegacyAppIdSupportExtension):

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::CtapAuthenticator::processGoogleLegacyAppIdSupportExtension):

5:02 PM Changeset in webkit [261587] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] REGRESSION: (r261342) Play/pause button doesn't work upon first entering fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=211797
<rdar://problem/63118008>

Reviewed by Eric Carlson.

In r261342 we added code to handle "canplay" and "waiting" events without ever actually
adding event listeners for them. So when we enter fullscreen before the "canplay" event, we
never re-evaluate whether we're playing or not.

Drive-by fix: Also noticed that stalls will cause the play/pause toggle to switch from the
"pause icon" to the "play icon", which is incorrect; we're still "playing" event when we're
stalled. So when we are in the stalled state, set the "playbackRate" property to some very
small, but non-zero value. This will cause the playback slider to stop progressing, but
won't also cause the play/pause button to swap states.

  • platform/cocoa/PlaybackSessionModelMediaElement.mm:

(WebCore::PlaybackSessionModelMediaElement::updateForEventName):
(WebCore::PlaybackSessionModelMediaElement::observedEventNames):

4:38 PM Changeset in webkit [261586] by Chris Dumez
  • 26 edits in trunk

[WK2] Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API
https://bugs.webkit.org/show_bug.cgi?id=211808

Reviewed by Darin Adler.

Source/WebCore:

Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API. This is only SPI and is only used for slightly
different printing behavior in Safari. Framesets are no longer supported in HTML5 and are now super rare. Support
for this C API adds quite a bit of code complexity and crashes such as <rdar://problem/60322282>, it just does not
seem worth it anymore.

  • dom/Document.cpp:

(WebCore::Document::resume):

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::insertedIntoAncestor):
(WebCore::HTMLFrameSetElement::removedFromAncestor):

  • loader/EmptyFrameLoaderClient.h:
  • loader/FrameLoaderClient.h:

Source/WebKit:

Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API. This is only SPI and is only used for slightly
different printing behavior in Safari. Framesets are no longer supported in HTML5 and are now super rare. Support
for this C API adds quite a bit of code complexity and crashes such as <rdar://problem/60322282>, it just does not
seem worth it anymore.

  • UIProcess/API/C/WKFrame.cpp:

(WKFrameIsFrameSet):

  • UIProcess/API/C/WKPage.cpp:

(WKPageGetFrameSetLargestFrame):

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::didCommitLoad):

  • UIProcess/WebFrameProxy.h:

(WebKit::WebFrameProxy::setIsFrameSet): Deleted.
(WebKit::WebFrameProxy::isFrameSet const): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::frameDidBecomeFrameSet): Deleted.
(WebKit::WebPageProxy::frameSetLargestFrameChanged): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::focusedFrame const):
(WebKit::WebPageProxy::frameSetLargestFrame const): Deleted.

  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::contentsSizeChanged const):
(WebKit::findLargestFrameInFrameSet): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset): Deleted.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDidBecomeFrameset): Deleted.

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDidBecomeFrameset): Deleted.

  • WebCoreSupport/WebFrameLoaderClient.h:
4:05 PM Changeset in webkit [261585] by Simon Fraser
  • 14 edits in trunk/Source/WebCore

Clean up some transformOrigin and perspectiveOrigin code
https://bugs.webkit.org/show_bug.cgi?id=211807

Reviewed by Zalan Bujtas.

Add LengthPoint and LengthSize-based "value for length" functions so we can do
point and size math as we do for LayoutPoint/FloatPoint etc.

Use them in code that computes transform and perspective origins.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeTransformedExtentViaTransformList const):

  • css/LengthFunctions.cpp:

(WebCore::sizeForLengthSize):
(WebCore::pointForLengthPoint):
(WebCore::floatPointForLengthPoint):

  • css/LengthFunctions.h:
  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::computeTransformedExtentViaTransformList const):

  • platform/Length.h:
  • platform/LengthPoint.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::perspectiveTransform const):
(WebCore::RenderLayer::perspectiveOrigin const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::computeTransformOriginForPainting const):

  • rendering/style/BasicShapes.cpp:

(WebCore::BasicShapeInset::path):
(WebCore::floatSizeForLengthSize): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::applyTransform const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::transformOriginXY const): Explicitly "xy" because it excludes the z component.
(WebCore::RenderStyle::perspectiveOrigin const):

  • rendering/style/StyleRareNonInheritedData.h:

(WebCore::StyleRareNonInheritedData::perspectiveOrigin const):

  • rendering/style/StyleTransformData.h:

(WebCore::StyleTransformData::originXY const):

3:59 PM Changeset in webkit [261584] by pvollan@apple.com
  • 4 edits in trunk/Source

[iOS] Rebuild MobileGestalt cache if needed
https://bugs.webkit.org/show_bug.cgi?id=211739

Reviewed by Darin Adler.

Source/WebCore/PAL:

Add SPI to check if MobileGestalt cache is valid, and declare MobileGestaltHelperProxy class.

  • pal/spi/ios/MobileGestaltSPI.h:

Source/WebKit:

This patch was written by Geoff Garen and myself. Rebuild the MobileGestalt cache in the UI process if the
MobileGestalt cache is stale. This should be done before starting a new WebContent process. If the cache
is not rebuilt, every MobileGestalt query in the WebContent process will fail, since access to the daemon
is denied.

No new tests, since testing this is not trivial. It would involve deleting the MobileGestalt cache and
making sure it is rebuilt afterwards. This could be an API test, but API tests are not supported on iOS
devices.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

3:41 PM Changeset in webkit [261583] by Alan Coon
  • 4 edits in branches/safari-609-branch/Source/WebCore/platform

Apply patch. rdar://problem/63156057

3:41 PM Changeset in webkit [261582] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259853. rdar://problem/63156090

Bump priority of LibWebRTCAudioModule thread
https://bugs.webkit.org/show_bug.cgi?id=210107

Reviewed by Eric Carlson.

LibWebRTCAudioModule operates on its own thread and is responsible to generate and push remote audio track data to audio renderers.
It does this every 50 milliseconds and any delay in this task will trigger audio crackling.

Migrate LibWebRTCAudioModule from a thread based approach to a WorkQueue.
This gives cleaner code and allows to set the WorkQueue QOS to QOS::UserInteractive
so that it does not get imnterrupted too often.

We expect the audio task to be done every 50 ms.
If it takes less than 50 ms to dispatch the task and execute, we dispatch a new task with some delay
to keep the exact 50ms delay.
Otherwise, we dispatch a task without any delay to try recovering as much as we can.

Manullay tested on iOS using mock sources on pages rendering multiple audio tracks.
This reduces audio crackling a lot but not completely.

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp: (WebCore::LibWebRTCAudioModule::LibWebRTCAudioModule): (WebCore::LibWebRTCAudioModule::StartPlayout): (WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):
  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259853 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:41 PM Changeset in webkit [261581] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/referrer-policy-anchor/origin/cross-origin-http.https.html
https://bugs.webkit.org/show_bug.cgi?id=209503

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:07 PM Changeset in webkit [261580] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

-Wattribute warning in BreakLines.cpp
https://bugs.webkit.org/show_bug.cgi?id=211784

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-05-12
Reviewed by Darin Adler.

Remove export attribute. These only work in header files.

  • rendering/BreakLines.cpp:
2:18 PM Changeset in webkit [261579] by achristensen@apple.com
  • 2 edits in trunk/Tools

[iOS Simulator] TestWebKitAPI._WKDownload.Resume is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=211786

Reviewed by Darin Adler.

This should turn the test crash into a failure, which is a step in the right direction.
Still investigating...

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(TEST):

2:12 PM Changeset in webkit [261578] by Alan Coon
  • 4 edits
    2 adds in branches/safari-609-branch

Cherry-pick r261480. rdar://problem/63151931

REGRESSION (r253267): issues on touchstart/touchend/touchmove (pointerdown/pointerup/pointermove) events
https://bugs.webkit.org/show_bug.cgi?id=211521
<rdar://problem/62942374>

Reviewed by Darin Adler.

Source/WebKit:

As a brief refresher, deferring gesture recognizers allow us to handle otherwise blocking touch events
asynchronously by having all preventable native gesture recognizers require the deferring gesture recognizer to
fail; we only fail the deferring gesture recognizer once the web process has handled the touch event, and did
not call preventDefault().

These additional failure requirements can cause preventable gestures to be linked together in the same gesture
dependency subgraph; since each subgraph is reset only once all gestures in the subgraph have failed or ended,
this might cause some gestures to be reset after a delay (rather than being reset immediately). To mitigate
this, we divide the set of preventable gestures into multiple (currently, 2) subgraphs: one for gestures that
are reset after a delay, and another for gestures that are immediately resettable. This way, immediately
resettable gestures are able to reset and recognize again, without having to wait for other slower preventable
gesture recognizers to reset.

When fast-clicking is disabled (e.g. when loading a desktop web page on a mobile form factor, or when the
viewport has been zoomed in), the blocking synthetic double tap gesture recognizer (that is, WKContentView's
_doubleTapGestureRecognizer) is enabled, and adds itself as a dynamic failure requirement to the content
view's synthetic single tap gesture recognizer (_singleTapGestureRecognizer). In terms of the gesture
dependency graph, this causes the single tap gesture to form an edge with the double tap gesture, which ends up
uniting both deferring gesture recognizers under the same subgraph. This means UIWebTouchEventsGestureRecognizer,
which should be one of the gestures in the immediately resettable subgraph, is now connected to the rest of the
delayed resettable gestures, meaning that it cannot recognize until "slowly resettable" gestures such as the
tap-and-half text selection gesture have also been reset. This delay causes touch events to be dropped, as is
the case in this bug.

To fix this, simply quarantine the single tap and double tap gestures inside their own subgraph by introducing a
separate deferring gesture recognizer for them. When fast-clicking is enabled, this does not hinder the ability
for the single tap gesture to fire in rapid succession, since the double tap gesture is disabled (and thus, not
a part of the graph at all). when fast-clicking is disabled, then the double tap gesture will prevent the single
tap gesture from being immediately reset anyways, due to the direct failure requirement between the double and
single tap gesture.

Doing this ensures that no other immediately resettable gesture (UIWebTouchEventsGestureRecognizer included)
is accidentally blocked from immediately resetting due to being linked to the delayed resettable gestures by way
of the synthetic single and double tap gestures.

Test: fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive.html

  • UIProcess/ios/WKContentViewInteraction.h:

Add a dedicated deferring gesture recognizer for the synthetic single tap and double tap gesture recognizers.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpInteraction]): (-[WKContentView cleanUpInteraction]):

Use -_deferringGestureRecognizers instead of hard-coding logic for each deferring gesture.

(-[WKContentView _removeDefaultGestureRecognizers]): Ditto.
(-[WKContentView _addDefaultGestureRecognizers]): Ditto.
(-[WKContentView _deferringGestureRecognizers]):

We now have 3 distinct deferring gestures; instead of handling the three deferring gestures individually in
various places in this file, group them all behind a getter that returns an array of deferring gestures, and use
this instead.

(-[WKContentView _doneDeferringNativeGestures:]): Ditto.
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): Ditto.
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Partition the synthetic single tap and double tap gestures into their own subgraph.

LayoutTests:

Add a layout test that synthesizes a tap-and-half gesture over an element with active touch event listeners, and
verifies that the second half of the gesture (i.e. the pan gesture) dispatches touchstart, touchmove, and
touchend events.

  • fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive-expected.txt: Added.
  • fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261480 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:47 PM Changeset in webkit [261577] by Fujii Hironori
  • 5 edits in trunk

[WinCairo][WK1] requestAnimationFrame doesn't work since r244182 in Accelerated Compositing mode
https://bugs.webkit.org/show_bug.cgi?id=211798

Reviewed by Don Olmstead.

Source/WebKitLegacy/win:

Page::updateRendering() should be called for every frames instead
of FrameView::updateLayoutAndStyleIfNeededRecursive for rAF after
r244182.

WinCairo doesn't destory m_acceleratedCompositingContext after it
was created. WebView::flushPendingGraphicsLayerChangesSoon should
check if accelerated compositing mode is enabled by using
isAcceleratedCompositing() not by null check of
m_acceleratedCompositingContext.

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::flushAndRenderLayers): Call Page::updateRendering() instead of updateLayoutAndStyleIfNeededRecursive.

  • WebView.cpp:

(WebView::flushPendingGraphicsLayerChangesSoon): Check isAcceleratedCompositing().

LayoutTests:

  • platform/wincairo-wk1/TestExpectations: Unmarked tests broken by r244182.
1:43 PM Changeset in webkit [261576] by eric.carlson@apple.com
  • 6 edits
    2 adds in trunk

Poster set after playback begins should be ignored
https://bugs.webkit.org/show_bug.cgi?id=211464
<rdar://problem/62605114>

Reviewed by Darin Adler.

Source/WebCore:

Test: media/video-poster-set-after-playback.html

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::parseAttribute): Ignore poster changes after first video frame
is available.
(WebCore::HTMLVideoElement::updateDisplayState): Set mode to Video if the first video
frame is available.

  • testing/Internals.cpp:

(WebCore::Internals::elementShouldDisplayPosterImage const):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • media/video-poster-set-after-playback-expected.txt: Added.
  • media/video-poster-set-after-playback.html: Added.
1:39 PM Changeset in webkit [261575] by Simon Fraser
  • 8 edits
    3 adds in trunk

Perpective origin should be relative to the reference box
https://bugs.webkit.org/show_bug.cgi?id=211769

Reviewed by Zalan Bujtas.

Source/WebCore:

Use the reference box <https://drafts.csswg.org/css-transforms-1/#reference-box> when
computing perspective-origin <https://drafts.csswg.org/css-transforms-2/#perspective-origin-property>,
adding a referenceBox() helper on RenderBox.

The code to compute the perspective transform is wrong; for now, fudge it by passing in the border box,
but this code needs to account for GraphicsLayer geometry and transform-origin in future (webkit.org/b/211787).

Test: compositing/transforms/perspective-transform-box.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::nodeAtPoint):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::referenceBox const):

  • rendering/RenderBox.h:
  • rendering/RenderLayer.cpp:

(WebCore::computeReferenceRectFromBox):
(WebCore::computeReferenceBox):
(WebCore::RenderLayer::updateTransform):
(WebCore::RenderLayer::currentTransform const):
(WebCore::RenderLayer::perspectiveTransform const):
(WebCore::RenderLayer::computeClipPath const):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

LayoutTests:

Ref test using edge-on layers to test perspective origin.

  • compositing/transforms/perspective-transform-box-expected.html: Added.
  • compositing/transforms/perspective-transform-box.html: Added.
1:34 PM Changeset in webkit [261574] by Ross Kirsling
  • 3 edits in trunk/Source/WebCore

Unreviewed PlayStation / clang-cl build fix following r261533.

Apparently r261572 only caught half of the cases.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::estimateSize):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::generateIndexKeyMapForValue):

1:32 PM Changeset in webkit [261573] by mmaxfield@apple.com
  • 5 edits
    3 adds in trunk

Text is clipped when rendered with fonts which have a negative line gap metric
https://bugs.webkit.org/show_bug.cgi?id=211683
<rdar://problem/62192986>

Reviewed by Zalan Bujtas.

Source/WebCore:

... As seen on nytimes.com.

Some fonts have negative line gap metrics. Chrome and Firefox both clamp it to 0, so the
line-height isn't decreased. However, we were honoring the negative line gap, thereby decreasing
line-height.

There are some typographical reasons to want a negative line gap, which is why this clamping
behavior shouldn't be done in the platform text library. In the interest of matching other
browsers, we should perform this clamping ourselves in WebKit.

Test: fast/text/negative-line-gap.html

  • platform/graphics/Font.cpp:

(WebCore::Font::platformGlyphInit):

LayoutTests:

  • fast/text/negative-line-gap-expected.html: Added.
  • fast/text/negative-line-gap.html: Added.
  • fast/text/resources/Ahem-negative-line-gap.ttf: Added.
  • platform/ios/fast/text/international/complex-character-based-fallback-expected.txt:
  • platform/mac/fast/text/international/complex-character-based-fallback-expected.txt:
1:17 PM Changeset in webkit [261572] by Ross Kirsling
  • 3 edits in trunk/Source/WebCore

Unreviewed PlayStation / clang-cl build fix following r261533.

clang for Windows (< v10.0.0) cannot destructure a const class.
See also r254471, r249524, etc.

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):

12:33 PM Changeset in webkit [261571] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

Unreviewed PlayStation build fix following r261494.

  • PlatformPlayStation.cmake:
12:27 PM Changeset in webkit [261570] by Carlos Garcia Campos
  • 15 edits
    6 adds
    3 deletes in trunk/Source

[GTK] Rework drag and drop handling in preparation for GTK4
https://bugs.webkit.org/show_bug.cgi?id=211723

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Remove PasteboardHelper that is no longer used and add conversion functions to GtkUtilities.

  • PlatformGTK.cmake:
  • SourcesGTK.txt:
  • platform/gtk/GtkUtilities.cpp:

(WebCore::gdkDragActionToDragOperation):
(WebCore::dragOperationToGdkDragActions):
(WebCore::dragOperationToSingleGdkDragAction):

  • platform/gtk/GtkUtilities.h:
  • platform/gtk/PasteboardHelper.cpp: Removed.
  • platform/gtk/PasteboardHelper.h: Removed.

Source/WebKit:

Split DragAndDropHelper class into DragSource and DropTarget classes. This separates the source and destination
parts making it easier to follow. This patch also adds PageClient::didPerformDragControllerAction() to notify
back the view when an operation is done to update the result.

  • SourcesGTK.txt:
  • UIProcess/API/gtk/DragSource.h: Added.
  • UIProcess/API/gtk/DragSourceGtk3.cpp: Added.

(WebKit::DragSource::DragSource):
(WebKit::DragSource::~DragSource):
(WebKit::DragSource::begin):

  • UIProcess/API/gtk/DropTarget.h: Added.
  • UIProcess/API/gtk/DropTargetGtk3.cpp: Added.

(WebKit::DropTarget::DropTarget):
(WebKit::DropTarget::~DropTarget):
(WebKit::DropTarget::accept):
(WebKit::DropTarget::enter):
(WebKit::DropTarget::update):
(WebKit::DropTarget::dataReceived):
(WebKit::DropTarget::didPerformAction):
(WebKit::DropTarget::leaveTimerFired):
(WebKit::DropTarget::leave):
(WebKit::DropTarget::drop):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::startDrag):
(WebKit::PageClientImpl::didPerformDragControllerAction):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseConstructed):
(webkit_web_view_base_class_init):
(webkitWebViewBaseStartDrag):
(webkitWebViewBaseDidPerformDragControllerAction):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/PageClient.h:

(WebKit::PageClient::didPerformDragControllerAction):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didPerformDragControllerAction):

  • UIProcess/gtk/DragAndDropHandler.cpp: Removed.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/gtk/WebPageGtk.cpp:
12:13 PM Changeset in webkit [261569] by Ross Kirsling
  • 105 edits in trunk/Source

Fix existing usage of final/override/virtual in JSC and WTF
https://bugs.webkit.org/show_bug.cgi?id=211772

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • API/JSAPIWrapperObject.mm:
  • API/JSManagedValue.mm:
  • API/JSScriptSourceProvider.h:
  • API/ObjCCallbackFunction.mm:
  • API/glib/JSAPIWrapperGlobalObject.cpp:
  • API/glib/JSAPIWrapperObjectGLib.cpp:
  • API/glib/JSCWeakValue.cpp:
  • bytecode/AccessCaseSnippetParams.cpp:
  • bytecode/AccessCaseSnippetParams.h:
  • bytecode/CodeBlock.cpp:
  • bytecode/StructureStubClearingWatchpoint.h:
  • bytecode/VariableWriteFireDetail.h:
  • bytecode/Watchpoint.h:
  • dfg/DFGAdaptiveInferredPropertyValueWatchpoint.h:
  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
  • dfg/DFGCallCreateDirectArgumentsSlowPathGenerator.h:
  • dfg/DFGSaneStringGetByValSlowPathGenerator.h:
  • dfg/DFGSlowPathGenerator.h:
  • dfg/DFGSnippetParams.h:
  • dfg/DFGWorklist.cpp:
  • ftl/FTLSnippetParams.h:
  • heap/BlockDirectory.cpp:
  • heap/EdenGCActivityCallback.h:
  • heap/FullGCActivityCallback.h:
  • heap/Heap.cpp:
  • heap/Heap.h:
  • heap/IncrementalSweeper.h:
  • heap/IsoCellSet.cpp:
  • heap/IsoCellSetInlines.h:
  • heap/IsoHeapCellType.h:
  • heap/IsoInlinedHeapCellType.h:
  • heap/ParallelSourceAdapter.h:
  • heap/StopIfNecessaryTimer.h:
  • heap/Subspace.cpp:
  • heap/SubspaceInlines.h:
  • inspector/InjectedScript.h:
  • inspector/JSGlobalObjectConsoleClient.h:
  • inspector/JSGlobalObjectInspectorController.h:
  • inspector/JSGlobalObjectScriptDebugServer.h:
  • inspector/JSInjectedScriptHost.cpp:
  • inspector/agents/InspectorAgent.h:
  • inspector/agents/InspectorScriptProfilerAgent.h:
  • inspector/agents/InspectorTargetAgent.h:
  • inspector/agents/JSGlobalObjectAuditAgent.h:
  • inspector/agents/JSGlobalObjectDebuggerAgent.h:
  • inspector/agents/JSGlobalObjectRuntimeAgent.h:
  • inspector/augmentable/AlternateDispatchableAgent.h:
  • inspector/remote/RemoteConnectionToTarget.h:
  • inspector/remote/RemoteInspector.h:
  • inspector/remote/socket/RemoteInspectorServer.h:
  • inspector/scripts/codegen/cpp_generator_templates.py:
  • inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py:
  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/command-targetType-matching-domain-debuggableType.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/domain-debuggableTypes.json-result:
  • inspector/scripts/tests/generic/expected/domain-targetType-matching-domain-debuggableType.json-result:
  • inspector/scripts/tests/generic/expected/domain-targetTypes.json-result:
  • inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/generic/expected/enum-values.json-result:
  • inspector/scripts/tests/generic/expected/event-targetType-matching-domain-debuggableType.json-result:
  • inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
  • jit/JITWorklist.cpp:
  • parser/Nodes.h:
  • parser/SourceProvider.h:
  • runtime/DataView.h:
  • runtime/DoublePredictionFuzzerAgent.h:
  • runtime/FileBasedFuzzerAgent.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/JSMicrotask.cpp:
  • runtime/NarrowingNumberPredictionFuzzerAgent.h:
  • runtime/ObjectPropertyChangeAdaptiveWatchpoint.h:
  • runtime/PredictionFileCreatingFuzzerAgent.h:
  • runtime/PromiseTimer.h:
  • runtime/RandomizingFuzzerAgent.h:
  • runtime/RegExpCache.h:
  • runtime/Structure.cpp:
  • runtime/StructureRareData.cpp:
  • runtime/VMTraps.cpp:
  • runtime/WideningNumberPredictionFuzzerAgent.h:
  • tools/JSDollarVM.cpp:
  • wasm/WasmBBQPlan.h:
  • wasm/WasmCallee.h:
  • wasm/WasmLLIntPlan.h:
  • wasm/WasmOMGForOSREntryPlan.h:
  • wasm/WasmOMGPlan.h:
  • wasm/WasmWorklist.cpp:
  • yarr/YarrJIT.cpp:

Source/WTF:

  • wtf/Assertions.cpp:
  • wtf/Expected.h:
  • wtf/FilePrintStream.h:
  • wtf/JSONValues.h:
  • wtf/LockedPrintStream.h:
  • wtf/OSLogPrintStream.h:
  • wtf/ParallelHelperPool.cpp:
  • wtf/RunLoop.h:
  • wtf/SharedTask.h:
  • wtf/StringPrintStream.h:
  • wtf/WorkQueue.h:
  • wtf/WorkerPool.cpp:
12:07 PM Changeset in webkit [261568] by Ryan Haddad
  • 2 edits in trunk/Tools

[iOS] TestWTF.WTF_Lock.ContendedShortSection is consistently timing out on debug
https://bugs.webkit.org/show_bug.cgi?id=211650

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WTF/Lock.cpp: Skip the test for iOS Debug queues.
11:48 AM Changeset in webkit [261567] by Ross Kirsling
  • 68 edits in trunk/Source/JavaScriptCore

[clang-tidy] Run modernize-use-override over JSC, then ensure as much as possible is final
https://bugs.webkit.org/show_bug.cgi?id=211743

Reviewed by Saam Barati.

  • API/JSScriptRef.cpp:
  • b3/B3ArgumentRegValue.h:
  • b3/B3AtomicValue.h:
  • b3/B3CCallValue.h:
  • b3/B3CheckSpecial.h:
  • b3/B3CheckValue.h:
  • b3/B3Const32Value.h:
  • b3/B3Const64Value.h:
  • b3/B3ConstDoubleValue.h:
  • b3/B3ConstFloatValue.h:
  • b3/B3DataSection.h:
  • b3/B3ExtractValue.h:
  • b3/B3FenceValue.h:
  • b3/B3MemoryValue.h:
  • b3/B3PatchpointSpecial.h:
  • b3/B3PatchpointValue.h:
  • b3/B3SlotBaseValue.h:
  • b3/B3StackmapSpecial.h:
  • b3/B3StackmapValue.h:
  • b3/B3SwitchValue.h:
  • b3/B3UpsilonValue.h:
  • b3/B3VariableValue.h:
  • b3/B3WasmAddressValue.h:
  • b3/B3WasmBoundsCheckValue.h:
  • b3/air/AirCCallSpecial.h:
  • b3/air/AirPrintSpecial.h:
  • bytecode/BytecodeDumper.h:
  • bytecode/GetterSetterAccessCase.h:
  • bytecode/InstanceOfAccessCase.h:
  • bytecode/IntrinsicGetterAccessCase.h:
  • bytecode/ModuleNamespaceAccessCase.h:
  • bytecode/ProxyableAccessCase.h:
  • bytecode/Watchpoint.h:
  • dfg/DFGFailedFinalizer.h:
  • dfg/DFGGraph.h:
  • dfg/DFGJITCode.h:
  • dfg/DFGJITFinalizer.h:
  • dfg/DFGToFTLDeferredCompilationCallback.h:
  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
  • ftl/FTLForOSREntryJITCode.h:
  • ftl/FTLJITCode.h:
  • ftl/FTLJITFinalizer.h:
  • heap/CompleteSubspace.h:
  • heap/FastMallocAlignedMemoryAllocator.h:
  • heap/GigacageAlignedMemoryAllocator.h:
  • heap/HeapSnapshotBuilder.h:
  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoSubspace.h:
  • heap/IsoSubspacePerVM.cpp:
  • heap/IsoSubspacePerVM.h:
  • heap/MarkStackMergingConstraint.h:
  • heap/SimpleMarkingConstraint.h:
  • heap/SpaceTimeMutatorScheduler.h:
  • heap/StochasticSpaceTimeMutatorScheduler.h:
  • heap/SynchronousStopTheWorldMutatorScheduler.h:
  • jit/GCAwareJITStubRoutine.h:
  • jit/JITCode.h:
  • jit/JITThunks.h:
  • jit/JITToDFGDeferredCompilationCallback.h:
  • jit/PolymorphicCallStubRoutine.h:
  • jsc.cpp:
  • parser/Lexer.cpp: Address warning.
  • runtime/JSDestructibleObjectHeapCellType.h:
  • runtime/SimpleTypedArrayController.h:
  • runtime/Structure.h:
  • runtime/WeakGCMap.h:
  • wasm/WasmEntryPlan.h:
11:23 AM Changeset in webkit [261566] by Jacob Uphoff
  • 9 edits in trunk/Source

Unreviewed, reverting r261557.

This commit caused testing to exit early due to too many
crashes on macOS Catalina Asan

Reverted changeset:

"Allow WebAudioBufferList to dynamically change its number of
frames"
https://bugs.webkit.org/show_bug.cgi?id=211720
https://trac.webkit.org/changeset/261557

10:59 AM Changeset in webkit [261565] by Alan Coon
  • 1 copy in tags/Safari-610.1.12.1

Tag Safari-610.1.12.1.

10:40 AM Changeset in webkit [261564] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

-Wsign-compare warnings in FTLLowerDFGToB3.cpp and DFGSpeculativeJIT.cpp
https://bugs.webkit.org/show_bug.cgi?id=211783

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-05-12
Reviewed by Darin Adler.

This fixes -Wsign-compare warnings introduced in r260331.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueBitNot):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileValueBitNot):

10:39 AM Changeset in webkit [261563] by Alan Coon
  • 1 copy in tags/Safari-610.1.12.2

Tag Safari-610.1.12.2.

10:24 AM Changeset in webkit [261562] by Alan Coon
  • 8 edits in branches/safari-610.1.12-branch/Source

Versioning.

10:22 AM Changeset in webkit [261561] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Revert r261514. rdar://problem/62978925

10:12 AM Changeset in webkit [261560] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed crash fix.

Use correct global name for icon service in RELEASE_ASSERT.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):

10:05 AM Changeset in webkit [261559] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[FlatPak SDK] Some packages in the SDK have missing debug symbols
https://bugs.webkit.org/show_bug.cgi?id=211621

Patch by Philippe Normand <pnormand@igalia.com> on 2020-05-12
Reviewed by Carlos Alberto Lopez Perez.

  • flatpak/flatpakutils.py:

(WebkitFlatpak._get_packages): Unconditionally install SDK Debug symbols, even for Release
builds. This should help improve the crash reports on the bots.

10:00 AM Changeset in webkit [261558] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Speculative fix for crash in ScrollingTree::handleWheelEvent()
https://bugs.webkit.org/show_bug.cgi?id=211763
<rdar://problem/62926117>

Reviewed by Andy Estes.

Crash data shows a null-deref crash in ScrollingTree::handleWheelEvent() which
is most likely because m_rootNode is null. Protect against this.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEvent):

9:45 AM Changeset in webkit [261557] by youenn@apple.com
  • 9 edits in trunk/Source

Allow WebAudioBufferList to dynamically change its number of frames
https://bugs.webkit.org/show_bug.cgi?id=211720

Reviewed by Eric Carlson.

Source/WebCore:

We sometimes create WebAudioBufferList on the stack which triggers allocation of several vectors.
Instead of doing that for every audio sample chunk, we should allocate the WebAudioBufferList and resize it as necessary.
For that purpose, we introduce WebAudioBufferList::updateWithNumberOfFrames and use it in two places:

  • When creating an audio track into WebAudio.
  • When receiving audio chunks from another process.

Covered by existing tests.

  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::~MediaStreamAudioSource):

  • Modules/webaudio/MediaStreamAudioSource.h:
  • Modules/webaudio/MediaStreamAudioSourceCocoa.cpp:

(WebCore::streamDescription):
(WebCore::MediaStreamAudioSource::consumeAudio):

  • platform/audio/cocoa/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):
(WebCore::WebAudioBufferList::updateWithNumberOfFrames):
(WebCore::WebAudioBufferList::channelCount const):

  • platform/audio/cocoa/WebAudioBufferList.h:

Source/WebKit:

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteAudio::setStorage):
(WebKit::RemoteCaptureSampleManager::RemoteAudio::audioSamplesAvailable):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
9:12 AM Changeset in webkit [261556] by Truitt Savell
  • 68 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r261542.

Broke internal builds

Reverted changeset:

"[clang-tidy] Run modernize-use-override over JSC, then ensure
as much as possible is final"
https://bugs.webkit.org/show_bug.cgi?id=211743
https://trac.webkit.org/changeset/261542

8:22 AM Changeset in webkit [261555] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[GTK4] Add support for clipboard operations
https://bugs.webkit.org/show_bug.cgi?id=211561

Reviewed by Adrian Perez de Castro.

  • UIProcess/gtk/Clipboard.h:
  • UIProcess/gtk/ClipboardGtk4.cpp:

(WebKit::Clipboard::Clipboard):
(WebKit::Clipboard::type const):
(WebKit::Clipboard::formats):
(WebKit::ReadTextAsyncData::ReadTextAsyncData):
(WebKit::Clipboard::readText):
(WebKit::ReadFilePathsAsyncData::ReadFilePathsAsyncData):
(WebKit::Clipboard::readFilePaths):
(WebKit::ReadBufferAsyncData::ReadBufferAsyncData):
(WebKit::Clipboard::readBuffer):
(WebKit::Clipboard::write):
(WebKit::Clipboard::clear):

8:20 AM Changeset in webkit [261554] by Carlos Garcia Campos
  • 21 edits
    5 adds
    1 delete in trunk/Source

[GTK] Rework clipboard handling in preparation for GTK4
https://bugs.webkit.org/show_bug.cgi?id=211511

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Remove PlatformPasteboard implementation that has been replaced by Clipboard class in the WebKit
layer. When Pasteboard class is created for copy and paste operations, it no longer has a SelectionData member,
it just uses the new methods in the pasteboard strategy to communicate with the clipboard. WebContentReader has
now an implementation for GTK and it's used when reading from the clipboard, the same way it's done in other ports.

  • SourcesGTK.txt:
  • editing/WebContentReader.h:
  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::pasteWithPasteboard): Use webContentFromPasteboard().
(WebCore::Editor::webContentFromPasteboard): Use WebContentReader.

  • editing/gtk/WebContentReaderGtk.cpp: Added.

(WebCore::WebContentReader::readFilePath):
(WebCore::WebContentReader::readFilePaths):
(WebCore::WebContentReader::readHTML):
(WebCore::WebContentReader::readPlainText):
(WebCore::WebContentReader::readImage):
(WebCore::WebContentReader::readURL):
(WebCore::WebContentMarkupReader::readHTML):

  • platform/Pasteboard.h:

(WebCore::PasteboardWebContentReader::readDataBuffer):

  • platform/PasteboardStrategy.h:
  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::selectionData const):
(WebCore::Pasteboard::writeString):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::write):
(WebCore::Pasteboard::clear):
(WebCore::Pasteboard::canSmartReplace):
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::hasData):
(WebCore::Pasteboard::typesForLegacyUnsafeBindings):
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::fileContentState):

  • platform/gtk/PasteboardHelper.cpp:
  • platform/gtk/PasteboardHelper.h:
  • platform/gtk/PlatformPasteboardGtk.cpp: Removed.
  • platform/gtk/SelectionData.cpp:

(WebCore::SelectionData::setURL): Do not override the text and markup if it has already been set.

Source/WebKit:

Use async APIs to avoid blocking the UI process during the communication with the clipboard. In GTK4 only async
APIs are available. Add Clipboard class to handle the communication with the clipboard with the GTK
implementation in ClipboardGtk3 and ClipboardGtk4 files.

  • Shared/gtk/WebSelectionData.cpp:

(WebKit::WebSelectionData::WebSelectionData): Add constructor receivnig an rvalue reference.

  • Shared/gtk/WebSelectionData.h:
  • SourcesGTK.txt:
  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • UIProcess/gtk/Clipboard.cpp: Added.

(WebKit::clipboard):
(WebKit::primary):
(WebKit::Clipboard::get):

  • UIProcess/gtk/Clipboard.h: Added.
  • UIProcess/gtk/ClipboardGtk3.cpp: Added.

(WebKit::Clipboard::Clipboard):
(WebKit::isPrimaryClipboard):
(WebKit::Clipboard::type const):
(WebKit::FormatsAsyncData::FormatsAsyncData):
(WebKit::Clipboard::formats):
(WebKit::ReadTextAsyncData::ReadTextAsyncData):
(WebKit::Clipboard::readText):
(WebKit::ReadFilePathsAsyncData::ReadFilePathsAsyncData):
(WebKit::Clipboard::readFilePaths):
(WebKit::ReadBufferAsyncData::ReadBufferAsyncData):
(WebKit::Clipboard::readBuffer):
(WebKit::Clipboard::write):
(WebKit::Clipboard::clear):

  • UIProcess/gtk/ClipboardGtk4.cpp: Added.

(WebKit::Clipboard::Clipboard):
(WebKit::Clipboard::type const):
(WebKit::Clipboard::formats):
(WebKit::Clipboard::readText):
(WebKit::Clipboard::readFilePaths):
(WebKit::Clipboard::readBuffer):
(WebKit::Clipboard::write):
(WebKit::Clipboard::clear):

  • UIProcess/gtk/WebPasteboardProxyGtk.cpp:

(WebKit::WebPasteboardProxy::getTypes):
(WebKit::WebPasteboardProxy::readText):
(WebKit::WebPasteboardProxy::readFilePaths):
(WebKit::WebPasteboardProxy::readBuffer):
(WebKit::WebPasteboardProxy::writeToClipboard):
(WebKit::WebPasteboardProxy::clearClipboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::types):
(WebKit::WebPlatformStrategies::readTextFromClipboard):
(WebKit::WebPlatformStrategies::readFilePathsFromClipboard):
(WebKit::WebPlatformStrategies::readBufferFromClipboard):
(WebKit::WebPlatformStrategies::writeToClipboard):
(WebKit::WebPlatformStrategies::clearClipboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
4:45 AM Changeset in webkit [261553] by youenn@apple.com
  • 33 edits in trunk

Introduce a RealtimeMediaSource video sample observer
https://bugs.webkit.org/show_bug.cgi?id=211718

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt:

Drive-by fix, since we are now receiving samples but not rendering them when track is not enabled, the loadeddata event is fired appropriately.
Update MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode to return PaintItBlack in that case.

Source/WebCore:

We introduce an observer dedicated to video samples similarly to AudioSampleObserver for audio.
This will allow to move video frame processing out of the main thread progressively.
For now, we remove video sample observing from the track private and observers should now register directly to the realtime media source.
We update the various users, including MediaRecorder and the media player.
In both cases, they will only observe the video track to be played/recorded, which is both more efficient and simpler.

We introduced RealtimeMediaSource::Observer::hasStartedProducingData callback for MediaStreamTrackPrivate so
that the processing to do when the first samples are available can be done on the main thread.

MediaStreamTrackPrivate no longer filters out samples if it is not enabled.
As such, each consumer is now responsible to observe/unobserve the source when its track gets enabled/disabled similarly as for audio,
or do nothing if track is not enabled.

Similarly, RealtimeOutgoingVideoSourceCocoa will now only observe video samples when the track is enabled and not muted.

Covered by existing tests.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::sampleBufferUpdated): Deleted.

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
We can renove the track check since we only observe the active video track.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): Deleted.

  • platform/mediarecorder/MediaRecorderPrivate.h:

(WebCore::MediaRecorderPrivate::setVideoSource):
(WebCore::MediaRecorderPrivate::~MediaRecorderPrivate):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::create):
(WebCore::MediaRecorderPrivateAVFImpl::~MediaRecorderPrivateAVFImpl):
(WebCore::MediaRecorderPrivateAVFImpl::videoSampleAvailable):
(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
(WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated): Deleted.

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::MediaRecorderPrivateMock):
(WebCore::MediaRecorderPrivateMock::~MediaRecorderPrivateMock):
(WebCore::MediaRecorderPrivateMock::stopRecording):
(WebCore::MediaRecorderPrivateMock::videoSampleAvailable):
(WebCore::MediaRecorderPrivateMock::sampleBufferUpdated): Deleted.

  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::hasStartedProducingData):
(WebCore::MediaStreamTrackPrivate::updateReadyState):
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable): Deleted.
(WebCore::MediaStreamTrackPrivate::hasStartedProducingAudioData): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::addVideoSampleObserver):
(WebCore::RealtimeMediaSource::removeVideoSampleObserver):
(WebCore::RealtimeMediaSource::updateHasStartedProducingData):
(WebCore::RealtimeMediaSource::videoSampleAvailable):
(WebCore::RealtimeMediaSource::audioSamplesAvailable):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::unobserveSource):
(WebCore::RealtimeOutgoingVideoSource::updateBlackFramesSending):

  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::~RealtimeVideoSource):
(WebCore::RealtimeVideoSource::startProducingData):
(WebCore::RealtimeVideoSource::stopProducingData):
(WebCore::RealtimeVideoSource::videoSampleAvailable):

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):

  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

(WebCore::RealtimeOutgoingVideoSourceCocoa::videoSampleAvailable):
(WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated): Deleted.

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • platform/mock/MockRealtimeVideoSource.cpp:
  • testing/Internals.cpp:

(WebCore::Internals::~Internals):
(WebCore::Internals::stopObservingRealtimeMediaSource):
(WebCore::Internals::observeMediaStreamTrack):

  • testing/Internals.h:

Source/WebKit:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::~MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::videoSampleAvailable):
(WebKit::MediaRecorderPrivate::stopRecording):
(WebKit::MediaRecorderPrivate::sampleBufferUpdated): Deleted.

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
4:17 AM Changeset in webkit [261552] by clopez@igalia.com
  • 3 edits in trunk/Tools

WPT test importer fails to update references in <link> tags
https://bugs.webkit.org/show_bug.cgi?id=211762

Reviewed by Youenn Fablet.

When importing WPT test references, ensure relative paths are also
updated for the href attribute in <link> tags.
Also fix a bug that was causing wrong updates on the paths due to
the characters in reference_relpath not escaped when performing
the regex substitution in convert_reference_relpaths(). For example:
"resources/script.js" was changed to "resourcscript.js" when reference_relpath was '../'

Improve also the unit test case to check for the fixes in this patch.

  • Scripts/webkitpy/w3c/test_converter.py:

(_W3CTestConverter.convert_reference_relpaths):
(_W3CTestConverter.convert_attributes_if_needed):

  • Scripts/webkitpy/w3c/test_converter_unittest.py:
3:51 AM Changeset in webkit [261551] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak SDK] Include clang++ and g++ in toolchains
https://bugs.webkit.org/show_bug.cgi?id=211663

Patch by Philippe Normand <pnormand@igalia.com> on 2020-05-12
Reviewed by Adrian Perez de Castro.

/usr/bin/clang++ wasn't included before. Also a small unrelated drive-by, white-list RUST
env vars, such as RUST_LOG, useful when debugging sccache.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.main):
(WebkitFlatpak.setup_icecc):

1:52 AM WebKitGTK/2.28.x edited by Philippe Normand
(diff)
1:49 AM Changeset in webkit [261550] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[GStreamer] Audio messages in web.whatsapp.com only play once.
https://bugs.webkit.org/show_bug.cgi?id=211627

Patch by Philippe Normand <pnormand@igalia.com> on 2020-05-12
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Test: media/video-src-blob-replay.html

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag): Make sure on-disk
buffering is disabled for blob URIs, because it messes up the pipeline for replays, and it's
useless for that use-case anyway.

LayoutTests:

  • media/video-src-blob-replay-expected.txt: Added.
  • media/video-src-blob-replay.html: Added.
1:49 AM Changeset in webkit [261549] by mark.lam@apple.com
  • 5 edits in trunk/Source

Wasm::enableFastMemory() was called too late.
https://bugs.webkit.org/show_bug.cgi?id=211773

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

If Wasm fast memory is to be enabled, we should just do it in initializeThreading()
just like for all the other signal handlers that need to be initialized for JSC.
This simplifies its initialization and ensures that it is done in a timely manner
before Configs are frozen.

  • jsc.cpp:

(jscmain):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

Source/WebKit:

Previously, we were calling Wasm::enableFastMemory() in WebProcess::initializeWebProcess().
By then, it is too late because the JSC::Config and WTF::Config have already been
frozen. There is nothing special about Wasm::enableFastMemory() that it needs to
be called this late. This patch moves it into JSC::initializeThreading() where
it belongs.

This change also make the initialization of Wasm fast memory consistent with how
we have always done it for the jsc shell i.e. it is initialized at the end of
JSC::initializeThreading().

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

12:20 AM Changeset in webkit [261548] by commit-queue@webkit.org
  • 5 edits in trunk

Need to advertise support for WebP in the Accept header
https://bugs.webkit.org/show_bug.cgi?id=211735

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-05-12
Reviewed by Darin Adler.

Source/WebCore:

On Mac and iOS, the system has to support WebP: HAVE(WEBP).
On other platforms, WebKit has to be able to decode WebP images: USE(WEBP).

  • css/CSSCalculationValue.cpp:

(WebCore::createCSS):
Fix unrealted coding style issue.

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::acceptHeaderValueForImageResource):
(WebCore::acceptHeaderValueFromType):

LayoutTests:

  • http/tests/misc/resources/image-checks-for-accept.php:

Make sure the Accept header accepts all images mime types.

May 11, 2020:

10:52 PM Changeset in webkit [261547] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=211771

Unreviewed gardening.

Update test expectations of latest flaky failures in the GTK bot,
create new tests if necessary and remove passing tests.

  • platform/gtk/TestExpectations:
10:46 PM Changeset in webkit [261546] by Darin Adler
  • 21 edits in trunk/Source

Fix problems caught by replacing WTF::Optional with std::optional
https://bugs.webkit.org/show_bug.cgi?id=211703

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • runtime/MachineContext.h:

(JSC::MachineContext::instructionPointer): Use explcit makeOptional here,
to work around the fact that MacroAssemblerCodePtr uses an unusual technique
to disable conversions to everything except bool.

Source/WebCore:

  • editing/EditorCommand.cpp:

(WebCore::executeSelectToMark): Remove erroneous code that converts
a live range to a SimpleRange and then back again.

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendRequest): Pass a pointer to
a ResourceRequest.
(WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache): Ditto.
(WebCore::InspectorNetworkAgent::buildInitiatorObject): Take a const*
to a ResourceRequest instead of an Optional<const ResourceRequest&>
because std::optional does not work with reference types.

  • inspector/agents/InspectorNetworkAgent.h: Update for the change above.
  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::Iterator::operator++): Fix code that was accidentally
comparing two optionals, after already checking them for null. Instead
we should compare their values.

  • platform/PlatformScreen.cpp:

(WebCore::screenData): Return a const* instead of an Optional<const&>
because std::optonal does not work with reference types.

  • platform/PlatformScreen.h: Updated for the above. Also removed both

the unneeded include of Optional.h (could have included Forward.h) and
of HashMap.h and put the Mac-specific type IORegistryGPUID inside a
PLATFORM(MAC) #if statement.

  • platform/ScreenProperties.h: Moved the HashMap.h include here, since

this is the header that uses it. Changed the EncodedColorSpaceDataType
enum to an enum class and gave it much shorter names.
(WebCore::ScreenData::encode const): Updated for the enum class change.
Also fixed a mistake where the code would use operator<< instead of
encodeEnum for the color space type of Null. This would lead to some
kind of decoding error, rather than a null cgColorSpace.
(WebCore::ScreenData::decode): Ditto.

  • platform/ios/PlatformScreenIOS.mm:

(WebCore::screenIsMonochrome): Updated since screenData returns a pointer.
(WebCore::screenHasInvertedColors): Ditto.
(WebCore::screenSupportsExtendedColor): Ditto.
(WebCore::screenSize): Ditto.
(WebCore::availableScreenSize): Ditto.

  • platform/mac/PlatformScreenMac.mm: Moved declaration of

CGDisplayUsesForceToGray to CoreGraphicsSPI.h. Removed unused declaration
of CGDisplayUsesInvertedPolarity.
(WebCore::primaryOpenGLDisplayMask): Updated since screendData returns a pointer.
(WebCore::displayMaskForDisplay): Ditto.
(WebCore::gpuIDForDisplay): Ditto.
(WebCore::screenProperties): Ditto. Also renamed from getScreenProperties to
adhere to WebKit coding style.
(WebCore::screenIsMonochrome): Ditto.
(WebCore::screenHasInvertedColors): Ditto.
(WebCore::screenDepth): Ditto.
(WebCore::screenDepthPerComponent): Ditto.
(WebCore::screenRectForDisplay): Ditto.
(WebCore::screenRect): Ditto.
(WebCore::screenAvailableRect): Ditto.
(WebCore::screenColorSpace): Ditto.
(WebCore::screenSupportsExtendedColor): Ditto.
(WebCore::screenSupportsHighDynamicRange): Ditto.

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::queueTaskToFireInstallEvent):
Removed capture of unused jobDataIdentifier.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h: Moved definition of CGDisplayUsesForceToGray

here from PlatformScreenMac.mm and also added include of the private header
it's from when compiling with the Apple internal SDK for the additional
checking that we get from using both.

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::plainTextForContext): Clarified ambiguous overload resolution by writing
the conversion from a live range to a SimpleRange out explicitly. Also fixed a typo
where there was a missing "&" in a "const&" argument.

Source/WTF:

  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::mapHostName): Make URLDecodeFunction a function
pointer and use nullptr instead of trying to use Optional<> with
a function reference.
(WTF::URLHelpers::collectRangesThatNeedMapping): Ditto.
(WTF::URLHelpers::applyHostNameFunctionToMailToURLString): Ditto.
(WTF::URLHelpers::applyHostNameFunctionToURLString): Ditto.
(WTF::URLHelpers::mapHostNames): Ditto.
(WTF::URLHelpers::userVisibleURL): Ditto.

  • wtf/URLHelpers.h: Ditto.
  • wtf/cocoa/NSURLExtras.mm:

(WTF::decodeHostName): Pass nullptr for URLDecodeFunction.

10:21 PM Changeset in webkit [261545] by ysuzuki@apple.com
  • 3 edits in trunk/Source/WTF

AtomString::init should temporarily disable checks via isMainThread due to WebThread's inconsistent state
https://bugs.webkit.org/show_bug.cgi?id=211754

Reviewed by Dean Jackson.

When starting WebThread via StartWebThread function, we have special period between the prologue of StartWebThread and spawning WebThread actually.
In this period, isMainThread() returns false even if this is called on the main thread since WebThread is now enabled and we are not taking a WebThread lock.
This causes assertion hits in MainThreadLazyNeverDestroyed initialization only in WebThread platforms.

This patch takes conservative approach to fix this assertion hits: just bypass these assertions since this should not be fired. We bypass assertions by using
constructWithoutAccessCheck, which intentionally skips isMainThread() check for construction. In non WebThread environment, we do not lose the assertion
coverage since we already have ASSERT(isUIThread()). And ASSERT(isUIThread()) ensures that this is called in system main thread in WebThread platforms.

Unfortunately, we have no mechanism to test this effectively. WK1 LayoutTests runner cannot show assertions since WK1 runners already initialize necessary
things somewhere before calling AtomString::init() in StartWebThread. This is the same in TestWebKitAPI. For now, I manually tested that assertion does not fire.

  • wtf/NeverDestroyed.h:

(WTF::LazyNeverDestroyed::construct):
(WTF::LazyNeverDestroyed::constructWithoutAccessCheck):
(WTF::LazyNeverDestroyed::storagePointerWithoutAccessCheck const):
(WTF::LazyNeverDestroyed::storagePointer const):

  • wtf/text/AtomString.cpp:

(WTF::AtomString::init):

8:52 PM Changeset in webkit [261544] by yoshiaki.jitsukawa@sony.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix build errors after r260992
https://bugs.webkit.org/show_bug.cgi?id=211756

Reviewed by Darin Adler.

Add JSC namespace specifier to NonIntrinsic and PropertyAttribute
in the macros in JSObject.h since those can be used outside of
or without introducing JSC namespace.

  • runtime/JSObject.h:
8:06 PM Changeset in webkit [261543] by basuke.suzuki@sony.com
  • 4 edits in trunk/Source

[bmalloc][WTF] Add computing memory size implementation for FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=211749

Reviewed by David Kilzer.

Source/bmalloc:

  • bmalloc/AvailableMemory.cpp:

(bmalloc::computeAvailableMemory):

Source/WTF:

Share sysinfo(3) implementation with Linux and FreeBSD.

  • wtf/RAMSize.cpp:

(WTF::computeRAMSize):

8:04 PM Changeset in webkit [261542] by Ross Kirsling
  • 68 edits in trunk/Source/JavaScriptCore

[clang-tidy] Run modernize-use-override over JSC, then ensure as much as possible is final
https://bugs.webkit.org/show_bug.cgi?id=211743

Reviewed by Saam Barati.

  • API/JSScriptRef.cpp:
  • b3/B3ArgumentRegValue.h:
  • b3/B3AtomicValue.h:
  • b3/B3CCallValue.h:
  • b3/B3CheckSpecial.h:
  • b3/B3CheckValue.h:
  • b3/B3Const32Value.h:
  • b3/B3Const64Value.h:
  • b3/B3ConstDoubleValue.h:
  • b3/B3ConstFloatValue.h:
  • b3/B3DataSection.h:
  • b3/B3ExtractValue.h:
  • b3/B3FenceValue.h:
  • b3/B3MemoryValue.h:
  • b3/B3PatchpointSpecial.h:
  • b3/B3PatchpointValue.h:
  • b3/B3SlotBaseValue.h:
  • b3/B3StackmapSpecial.h:
  • b3/B3StackmapValue.h:
  • b3/B3SwitchValue.h:
  • b3/B3UpsilonValue.h:
  • b3/B3VariableValue.h:
  • b3/B3WasmAddressValue.h:
  • b3/B3WasmBoundsCheckValue.h:
  • b3/air/AirCCallSpecial.h:
  • b3/air/AirPrintSpecial.h:
  • bytecode/BytecodeDumper.h:
  • bytecode/GetterSetterAccessCase.h:
  • bytecode/InstanceOfAccessCase.h:
  • bytecode/IntrinsicGetterAccessCase.h:
  • bytecode/ModuleNamespaceAccessCase.h:
  • bytecode/ProxyableAccessCase.h:
  • bytecode/Watchpoint.h:
  • dfg/DFGFailedFinalizer.h:
  • dfg/DFGGraph.h:
  • dfg/DFGJITCode.h:
  • dfg/DFGJITFinalizer.h:
  • dfg/DFGToFTLDeferredCompilationCallback.h:
  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
  • ftl/FTLForOSREntryJITCode.h:
  • ftl/FTLJITCode.h:
  • ftl/FTLJITFinalizer.h:
  • heap/CompleteSubspace.h:
  • heap/FastMallocAlignedMemoryAllocator.h:
  • heap/GigacageAlignedMemoryAllocator.h:
  • heap/HeapSnapshotBuilder.h:
  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoSubspace.h:
  • heap/IsoSubspacePerVM.cpp:
  • heap/IsoSubspacePerVM.h:
  • heap/MarkStackMergingConstraint.h:
  • heap/SimpleMarkingConstraint.h:
  • heap/SpaceTimeMutatorScheduler.h:
  • heap/StochasticSpaceTimeMutatorScheduler.h:
  • heap/SynchronousStopTheWorldMutatorScheduler.h:
  • jit/GCAwareJITStubRoutine.h:
  • jit/JITCode.h:
  • jit/JITThunks.h:
  • jit/JITToDFGDeferredCompilationCallback.h:
  • jit/PolymorphicCallStubRoutine.h:
  • jsc.cpp:
  • parser/Lexer.cpp: Address warning.
  • runtime/JSDestructibleObjectHeapCellType.h:
  • runtime/SimpleTypedArrayController.h:
  • runtime/Structure.h:
  • runtime/WeakGCMap.h:
  • wasm/WasmEntryPlan.h:
7:52 PM Changeset in webkit [261541] by dino@apple.com
  • 5 edits in trunk

WebGLLayer clobbers TEXTURE_2D binding on iOS
https://bugs.webkit.org/show_bug.cgi?id=211758

Patch by James Darpinian <James Darpinian> on 2020-05-11
Reviewed by Dean Jackson.

Source/WebCore:

WebGLLayer was accidentally clobbering the TEXTURE_2D binding on iOS because IOSurfaces
are bound to TEXTURE_2D instead of TEXTURE_RECTANGLE. This fixes a bunch of iOS-specific
WebGL conformance failures including:
texture-bindings-unaffected-on-resize.html
default-texture.html
tex-image-and-sub-image-2d-with-canvas-rgb565.html and friends

  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer display]):
(-[WebGLLayer bindFramebufferToNextAvailableSurface]):

LayoutTests:

We now have passing results for:

fast/canvas/webgl/webgl-texture-binding-preserved.html
webgl/1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html
webgl/1.0.3/conformance/extensions/oes-element-index-uint.html
webgl/1.0.3/conformance/misc/delayed-drawing.html
webgl/1.0.3/conformance/state/state-uneffected-after-compositing.html
webgl/1.0.3/conformance/textures/default-texture.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html
webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html

  • platform/ios/TestExpectations:
7:39 PM Changeset in webkit [261540] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, remove failures happening on EWS GTK-WK2
https://bugs.webkit.org/show_bug.cgi?id=211761

Unreviewed gardening.

Since the GTK test bot and the EWS GTK-WK2 bot were moved to Flatpak,
these failures that were happening on EWS GTK-WK2 are no happening
anymore.

  • platform/gtk/TestExpectations:
7:10 PM Changeset in webkit [261539] by Simon Fraser
  • 19 edits in trunk

[ macOS ] scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=211747

Reviewed by Tim Horton.

Source/WebCore:

Add an option to monitorWheelEvents to reset latching.

  • page/Page.cpp:

(WebCore::Page::startMonitoringWheelEvents):

  • page/Page.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::startMonitoringWheelEvents):

  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::startMonitoringWheelEvents):

  • testing/js/WebCoreTestSupport.cpp:

(WebCoreTestSupport::monitorWheelEvents):

  • testing/js/WebCoreTestSupport.h:

Source/WebKit:

Add an option to monitorWheelEvents to reset latching.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageStartMonitoringScrollOperations):

  • WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

Add an option to monitorWheelEvents to reset latching.

  • DumpRenderTree/mac/EventSendingController.mm:

(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController monitorWheelEventsWithOptions:]):
(-[EventSendingController monitorWheelEvents]): Deleted.

  • WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::toMonitorWheelEventsOptions): We have to return a pointer to a static, because the generated code
doesn't use smart pointers.
(WTR::EventSendingController::monitorWheelEvents):

  • WebKitTestRunner/InjectedBundle/EventSendingController.h:

(WTR::MonitorWheelEventsOptions::MonitorWheelEventsOptions):

LayoutTests:

Change the test to use monitorWheelEvents() for each phase.

  • scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html:
7:10 PM Changeset in webkit [261538] by mark.lam@apple.com
  • 11 edits
    2 adds in trunk/Source

Introduce WTF::Config and put Signal.cpp's init-once globals in it.
https://bugs.webkit.org/show_bug.cgi?id=211729
<rdar://problem/62938878>

Reviewed by Keith Miller and Saam Barati.

Source/JavaScriptCore:

  1. Initialize VMTraps' signals early now that we'll be freezing signals at the end of the first VM initialization.
  1. Move the !initializeThreadingHasBeenCalled RELEASE_ASSERT in initializeThreading() to the bottom of the function. This way, we'll also catch bugs which may cause us to jump into the middle of the function.

Added a compilerFence there to ensure that the RELEASE_ASSERT is only executed
after all initialization is done. This guarantees that it will only be executed
at the end.

  1. Call WTF::Config::permanentlyFreeze() from JSC::Config::permanentlyFreeze() for obvious reasons: freezing one should freeze the other.
  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

  • runtime/JSCConfig.cpp:

(JSC::Config::permanentlyFreeze):

  • runtime/VMTraps.cpp:

(JSC::VMTraps::initializeSignals):

  • runtime/VMTraps.h:

Source/WTF:

  1. Added WTF::Config for storing globals that effectively serve as constants i.e we'll be initializing them before or during the first VM instantiation, but should not have any reason to modify them later. The WTF::Config will be frozen (along with JSC::Config) at the end of instantiating the first VM instance.
  1. Added a Config::AssertNotFrozenScope RAII object to ensure that initialization operations that should only be called at initialization time, will not be called once the Config has been frozen.
  1. Moved most of Signal.cpp's globals into WTF::Config. The only globals (or statics) not moved are ones that cannot be moved because they require a non-trivial default constructor (once_flag), or need to be modifiable at runtime (e.g. Lock).

Instead of freezing the once_flag, we sanity check the call_once block with
the Config::AssertNotFrozenScope.

  1. SignalHandler records are now allocated from arrays of SignalHandlerMemory in the WTF::Config. The number of signal handlers we will ever install is always finite. Hence, there's no reason to use a dynamic data structure like the LocklessBag to hold it.

We introduce a SignalHandlers struct to manage these arrays (and all the other
Signal.cpp globals that we want to move to the WTF::Config). Amongst other
things, SignalHandlers provides the abstractions for:

  1. allocating memory for the SignalHandler instances. See SignalHandlers::alloc().
  2. iterating SignalHandler instances. See SignalHandlers::forEachHandler().

To maintain the synchronization properties of the LocklessBag,
SignalHandlers::alloc() uses a mutex. In practice, this mutex will never be
contended on because all signal handlers are now installed at initialization
time before any concurrency comes into play.

  1. We now initialize activeThreads() eagerly via initializeThreading. In production configurations, this does not matter because signal handler installations will always trigger its initialization. However, in debugging configurations, we may end up disabling the use of all signal handlers. As a result, we need to do this eager initialization to ensure that it is done before we freeze the WTF::Config.
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Threading.cpp:

(WTF::initializeThreading):

  • wtf/WTFConfig.cpp: Added.

(WTF::Config::disableFreezingForTesting):
(WTF::Config::permanentlyFreeze):

  • wtf/WTFConfig.h: Added.

(WTF::Config::configureForTesting):
(WTF::Config::AssertNotFrozenScope::~AssertNotFrozenScope):

  • wtf/threads/Signals.cpp:

(WTF::SignalHandlers::alloc):
(WTF::SignalHandlers::forEachHandler const):
(WTF::startMachExceptionHandlerThread):
(WTF::handleSignalsWithMach):
(WTF::setExceptionPorts):
(WTF::activeThreads):
(WTF::installSignalHandler):
(WTF::jscSignalHandler):
(WTF::SignalHandlers::initialize):

  • wtf/threads/Signals.h:
6:58 PM Changeset in webkit [261537] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

[WTF] CStringBuffer::createUninitialized() should use Checked<size_t>
<https://webkit.org/b/211746>
<rdar://problem/62729848>

Reviewed by Darin Adler.

  • wtf/text/CString.cpp:

(WTF::CStringBuffer::createUninitialized):

  • Switch from RELEASE_ASSERT() to Checked<size_t>() for overflow check. RELEASE_ASSERT() was using the wrong type, too.
6:28 PM Changeset in webkit [261536] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

Fixes for crashes in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=211740

Reviewed by Chris Fleizach.

Fixes for several LayoutTests in isolated tree mode.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):

6:05 PM Changeset in webkit [261535] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Scrollbars flicker in RTL scrollable regions
https://bugs.webkit.org/show_bug.cgi?id=211757

Reviewed by Tim Horton.

Scrollbars deal in scroll offsets (zero-based), not scroll positions (scroll-origin based) so
the scrolling thread needs to update scrollbar painters using offsets.

Not testable because this is a transient state that gets fixed by the main thread.

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::updateScrollbarPainters):

5:38 PM Changeset in webkit [261534] by sbarati@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Remove OTHER_CFLAGS="" in libwebrtc pbxproj
https://bugs.webkit.org/show_bug.cgi?id=211742

Reviewed by Darin Adler.

I believe this was done by accident in a larger patch. If we did indeed
want to define OTHER_CFLAGS to be empty, the right place for that is inside
the xcconfig files, not the pbxproj files.

  • libwebrtc.xcodeproj/project.pbxproj:
5:38 PM Changeset in webkit [261533] by Ben Nham
  • 17 edits
    3 adds in trunk

Improve accuracy of IndexedDB estimated write size computation
https://bugs.webkit.org/show_bug.cgi?id=211360

Reviewed by Brady Eidson.

Source/WebCore:

We currently estimate the size of a put in IndexedDB for quota check purposes with something
like:

estimatedWriteSize = (1 + numIndices) * (keySize + valueSize)

However, this can lead to large overestimates of write sizes. This is because secondary
indices only store a mapping of secondary index key => primary key; they do not store the
entire value. In the example site attached to 202137 (another DB quota-related bug), the
the heuristic estimates that one of the put operations would use more than 800 MB when it
actually uses 220 MB. This inaccuracy leads to spurious disk quota permission modals being
presented in Safari.

This patch improves the write size computation by generating the secondary index keys before
estimating the write size. The performance should be about the same since we save the
generated index keys for later usage when we actually add the record to the DB.

  • Headers.cmake:
  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::serializationContext):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::addRecord):
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):

  • Modules/indexeddb/server/MemoryObjectStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::serializationContext):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::estimateSize):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):

  • Modules/indexeddb/shared/IndexKey.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::generateIndexKeyMapForValue):

  • bindings/js/IDBBindingUtilities.h:

LayoutTests:

Added a layout test to check that the size estimate associated with adding an object to a
store with many indices is reasonable.

  • platform/mac-wk1/TestExpectations: Skip test on Mac WK1 since it doesn't implement quota checks.
  • platform/win/TestExpectations: Skip test on Windows since it doesn't implement quota checks.
  • storage/indexeddb/resources/storage-limit-with-indices.js: Added.
  • storage/indexeddb/storage-limit-with-indices-expected.txt: Added.
  • storage/indexeddb/storage-limit-with-indices.html: Added.
5:34 PM Changeset in webkit [261532] by Alan Coon
  • 7 edits
    2 adds in branches/safari-609-branch

Apply patch. rdar://problem/62978903

5:30 PM Changeset in webkit [261531] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Apply patch. rdar://problem/62978118

5:22 PM Changeset in webkit [261530] by Alan Coon
  • 4 edits
    2 adds in branches/safari-609-branch

Cherry-pick r260979. rdar://problem/62978869

REGRESSION: Double tap dispatches one click event on iOS 13.4 when it would dispatch two on iOS 13.3
https://bugs.webkit.org/show_bug.cgi?id=211179
<rdar://problem/62594779>

Reviewed by Tim Horton.

Source/WebKit:

https://trac.webkit.org/r253267 introduced deferring gesture recognizers as a way to handle preventable (non-
passive) touchstart events without blocking the UI process. These deferring gesture recognizers work by having
other gesture recognizers at or below WKWebView (with few exceptions) require the failure of these deferring
gestures. These gestures transition to possible state when beginning a touch inside a non-passive touch event
handling region, and transition to either failed or ended state (depending on whether preventDefault() was
called) after the web content process finished handling the touch event.

However, this means that the resulting dependency graph now has an edge between each gesture under WKWebView and
one of the deferring gesture recognizers, due to these new failure requirements. Since gestures that have been
recognized or have failed don't get reset until all other gestures in the same dependency subgraph have also
recognized or failed, some gestures (such as the synthetic single tap gesture recognizer in this bug) might not
be resetting as soon after ending as they did before, since they may be connected to other gesture recognizers
that are still in possible state by way of the failure requirements added by the new deferring gestures.

I was already aware of this problem in r253267, and attempted to solve this by bisecting the gesture dependency
graph into two subgraphs: one containing all the one-finger multi-tap gestures that are reset after a lengthy
delay, and another containing everything else. To do this, I added two different deferring gesture recognizers:
one for immediately resettable gestures (meant for gestures in the latter subgraph), and another for gestures
that are reset after a delay (meant for gestures in the former subgraph).

Unfortunately, unrelated changes around text interactions in UIKit in iOS 13.4 caused the tap-and-a-half
gesture for selecting a range of text to now have a delayed reset; this means that gestures in the "immediately
resettable" gesture subgraph are all forced to wait on the tap-and-a-half text interaction gesture before
resetting, which causes the bug here, since the synthetic single tap gesture is in this "immediately resettable"
gesture subgraph.

To mitigate this, this patch pushes the tap-and-a-half text selection gesture, along with the loupe gesture,
context menu relationship gesture, and drag lift gestures (i.e. the other gestures that are connected to the
tap-and-a-half gesture via failure requirements) out of the "immediately resettable" subgraph, and into the
"delayed" subgraph.

Test: fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler.html

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

LayoutTests:

Add a new layout test to verify that double tapping a button with fast-clicking enabled (i.e. in a device-width
viewport) fires two click events.

  • fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler-expected.txt: Added.
  • fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261529] by Alan Coon
  • 12 edits
    2 adds in branches/safari-609-branch

Cherry-pick r259669. rdar://problem/63111225

Preventing touch events should not prevent gestures installed above WKWebView from recognizing
https://bugs.webkit.org/show_bug.cgi?id=210080
<rdar://problem/61365814>

Reviewed by Tim Horton.

Source/WebKit:

Makes a small adjustment to native gesture deferral logic, so that gestures installed above WKWebView (in the
view hierarchy) are not prevented from recognizing by WKDeferringGestureRecognizer. This makes it possible for
WebKit clients to install custom gestures outside of WKWebView that cannot be prevented by web content, without
having to create a separate window and pass touches through to the WKWebView.

Test: fast/events/touch/ios/prevent-default-with-window-tap-gesture.html

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Tools:

Add a UIScriptController helper method that allows a test to install a tap gesture recognizer on the UIWindow
containing the web view. This method additionally takes a JavaScript callback, which is invoked when the tap
gesture is recognized.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptContext.h:
  • TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::installTapGestureOnWindow):
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView resetInteractionCallbacks]): (-[TestRunnerWKWebView didRecognizeTapOnWindow]): (-[TestRunnerWKWebView windowTapRecognizedCallback]): (-[TestRunnerWKWebView setWindowTapRecognizedCallback:]): (-[TestRunnerWKWebView willMoveToWindow:]): (-[TestRunnerWKWebView didMoveToWindow]): (-[TestRunnerWKWebView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::installTapGestureOnWindow):

LayoutTests:

Add a new layout test to verify that calling preventDefault() on touchstart doesn't prevent gesture recognizers
installed above the WKWebView from recognizing. To do this, we use the new UIScriptController method to add a
gesture recognizer to the window containing the web view, and then simulate a tap over an element that prevents
the touchstart event.

  • fast/events/touch/ios/prevent-default-with-window-tap-gesture-expected.txt: Added.
  • fast/events/touch/ios/prevent-default-with-window-tap-gesture.html: Added.
  • resources/ui-helper.js: (window.UIHelper.async activateElementAfterInstallingTapGestureOnWindow.return.new.Promise.): (window.UIHelper.async activateElementAfterInstallingTapGestureOnWindow.return.new.Promise): (window.UIHelper.async activateElementAfterInstallingTapGestureOnWindow): (window.UIHelper):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259669 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261528] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r255456. rdar://problem/63112259

REGRESSION (r253267): Swipe from edge on Twitter images no longer goes back
https://bugs.webkit.org/show_bug.cgi?id=207011
<rdar://problem/58966044>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): The new touch-event async deferring gesture recognizer was erroneously deferring edge swipes, which are not allowed to be blocked by touch events. Opt them out of the new gesture gate mechanism.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255456 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261527] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r258675. rdar://problem/62978870

WebCoreArgumentCoders should check bufferIsLargeEnoughToContain before allocating buffers
https://bugs.webkit.org/show_bug.cgi?id=209219

Reviewed by Darin Adler.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::decodeSharedBuffer): Added checking of bufferIsLargeEnoughToContain. (IPC::decodeTypesAndData): Don't allocate a buffer with the decoded size. bufferIsLargeEnoughToContain can't be used in this case because SharedBuffer is encoded as variable length data. Instead, append items one-by-one.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258675 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261526] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r258991. rdar://problem/62978907

Fix build after https://trac.webkit.org/changeset/258977/webkit
https://bugs.webkit.org/show_bug.cgi?id=209545

Unreviewed.

  • dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Add ENABLE(MEDIA_STREAM) compilation flag.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258991 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261525] by Alan Coon
  • 9 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r258977. rdar://problem/62978907

Audio fails to capture stream in WebRTC if AudioSession gets interrupted
https://bugs.webkit.org/show_bug.cgi?id=208516
<rdar://problem/60020467>

Reviewed by Eric Carlson.

In case of page going to hidden, continue calling each capture factory to mute the corresponding sources if needed.
In case of page being visible again, reset all tracks according page muted state. This allows restarting tracks that have been
muted while page was hidden (video tracks or suspended audio tracks).

Since tracks can go to muted when visibility changes, we no longer return early when setting the muted state of a page to the same value.
Instead we apply it which ensures we comply with what UIProcess wants.

We start removing the concept of a RealtimeMediaSource be interrupted. Instead we use muting of sources.
This allows UIProcess or the page to override any muted state, for instance if page goes in foreground again.

We update the AudioSharedUnit to allow restarting capture even if suspended.
This ensures that we are able to restart capturing even if we do not receive the audio session end of interruption.
Also, this notification sometimes takes a long time to happen and we do not want to wait for it when user is interacting with the page.
A future refactoring will further remove RealtimeMediaSource interrupted-related code.

Manually tested.

  • dom/Document.cpp: (WebCore::Document::visibilityStateChanged):
  • page/Page.cpp: (WebCore::Page::setMuted):
  • platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::isInterrupted const):
  • platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::setInterrupted): (WebCore::RealtimeMediaSource::setMuted):
  • platform/mediastream/mac/BaseAudioSharedUnit.cpp: (WebCore::BaseAudioSharedUnit::startProducingData): (WebCore::BaseAudioSharedUnit::resume): (WebCore::BaseAudioSharedUnit::suspend):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261524] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r261208. rdar://problem/62978272

Crash in match_constness<WebCore::CSSValue, WebCore::CSSPrimitiveValue>::type& WTF::downcast<WebCore::CSSPrimitiveValue, WebCore::CSSValue> -- ASAN
https://bugs.webkit.org/show_bug.cgi?id=211479

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-05-05
Reviewed by Geoffrey Garen.

Added check to downcast CSSValue to CSSPrimitiveValue, only if valid CSSPrimitveValue is associated with the property.

New test would be added to Internal repository.

  • css/StyleProperties.cpp: (WebCore::StyleProperties::pageBreakPropertyValue const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261208 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261523] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r261024. rdar://problem/62978260

[IPC hardening] createMessageDecoder() needs a validity check
<https://webkit.org/b/211260>
<rdar://problem/61914087>

Reviewed by Darin Adler.

  • Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::createMessageDecoder):
  • Add validity check and early return for numDescriptors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261522] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WTF

Cherry-pick r260907. rdar://problem/62978877

[Mac] Adopt kMTSupportNotification_ShouldPlayHDRVideoChanged notification
https://bugs.webkit.org/show_bug.cgi?id=211028
<rdar://problem/61173289>

Reviewed by Aakash Jain.

Follow-up test failure fix; correct the debug/non-debug variants of SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT.

  • wtf/win/SoftLinking.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [261521] by Alan Coon
  • 9 edits in branches/safari-609-branch/Source

Cherry-pick r260832. rdar://problem/62978877

[Mac] Adopt kMTSupportNotification_ShouldPlayHDRVideoChanged notification
https://bugs.webkit.org/show_bug.cgi?id=211028

Reviewed by Eric Carlson.

Source/WebCore/PAL:

Make MediaToolboxSoftLink fully exported from PAL.

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cocoa/MediaToolboxSoftLink.cpp:
  • pal/cocoa/MediaToolboxSoftLink.h:

Source/WebKit:

Adopt a new notification which signals that the receiver should re-query for HDR support.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::webProcessPoolHighDynamicRangeDidChangeCallback): (WebKit::WebProcessPool::registerHighDynamicRangeChangeCallback):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::registerHighDynamicRangeChangeCallback): (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261520] by Alan Coon
  • 5 edits in branches/safari-609-branch/Source

Cherry-pick r260682. rdar://problem/62978266

[WTF] allThreads registration is racy with allThreads unregistration
https://bugs.webkit.org/show_bug.cgi?id=210995
<rdar://problem/61609690>

Reviewed by Keith Miller.

Source/WebCore:

  • page/cocoa/ResourceUsageThreadCocoa.mm: (WebCore::ResourceUsageThread::platformCollectCPUData):

Source/WTF:

There is a race between registering a thread to allThreads and unregistering a thread from allThreads.

  1. Caller: A new thread is created, but not registering it to allThreads yet.
  2. Thread: The thread is running.
  3. Thread: The thread finishes its execution before the thread is registered into allThreads.
  4. Thread: The thread unregisters itself from allThreads.
  5. Caller: Registers the new thread to allThreads after it already finished its execution.
  6. The thread is never removed from allThreads.

This patch adds m_didUnregisterFromAllThreads flag to Thread, and add the thread to allThreads only when this flag is false.

Covered by LayoutTests/inspector/cpu-profiler/threads.html.

  • wtf/Threading.cpp: (WTF::Thread::create): (WTF::Thread::didExit):
  • wtf/Threading.h: (WTF::Thread::Thread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261519] by Alan Coon
  • 4 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r260666. rdar://problem/62978264

IPC::Decoder should use create() pattern
<https://webkit.org/b/210949>
<rdar://problem/62144409>

Reviewed by Geoffrey Garen.

  • Platform/IPC/Decoder.cpp: (IPC::Decoder::create): Add implementation. Returns nullptr if Decoder constructor returns an invalid object. (IPC::Decoder::Decoder): Mark invalid if m_buffer is not 64-bit aligned. (IPC::Decoder::unwrapForTesting): Switch to Decoder::create().
  • Platform/IPC/Decoder.h: (IPC::Decoder::create): Add declaration. (IPC::Decoder::Decoder): Make explicit. (Can't be made private since we use std::unique_ptr<Decoder>.)
  • Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::createMessageDecoder): Switch to Decoder::create().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261518] by Alan Coon
  • 3 edits
    4 adds in branches/safari-609-branch

Cherry-pick r260598. rdar://problem/62978929

Allow credentials for same-origin css mask images
https://bugs.webkit.org/show_bug.cgi?id=210895
<rdar://problem/60093888>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-23
Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/css-mask-image-credentials.html

r230006 went a step too far in restricting what is allowed with css mask images.
Basic authentication credentials should be allowed with such requests as they are in Chrome and Firefox.
This can be seen by doing run-webkit-httpd then opening http://127.0.0.1:8000/security/css-mask-image-credentials.html
In Chrome and Firefox you'll see it forward to a page that has a blue square.
In Safari before this change you'll see a yellow square and a basic authentication prompt.
In Safari after this change you'll see the same blue square you see in Chrome and Firefox.

  • style/StylePendingResources.cpp: (WebCore::Style::loadPendingImage):

LayoutTests:

  • http/tests/security/css-mask-image-credentials-expected.html: Added.
  • http/tests/security/css-mask-image-credentials.html: Added.
  • http/tests/security/resources/css-mask-image-credentials-2.html: Added.
  • http/tests/security/resources/image-credential-check.php: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261517] by Alan Coon
  • 3 edits
    2 adds in branches/safari-609-branch

Cherry-pick r260528. rdar://problem/62978914

REGRESSION (r249160): Deleting newline after pasting text ending in a newline results in a discontinuity
https://bugs.webkit.org/show_bug.cgi?id=210677
<rdar://problem/61954169>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/text/delete-line-break-in-pre.html

  • rendering/RenderTextLineBoxes.cpp: (WebCore::RenderTextLineBoxes::dirtyRange):

r249160 changed InlineTextBox end offset to be consistently first-past-end.
The code here that updates lineBreakPos needs to take this into account too.

LayoutTests:

  • fast/text/delete-line-break-in-pre-expected.html: Added.
  • fast/text/delete-line-break-in-pre.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260528 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261516] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKitLegacy/mac

Cherry-pick r260315. rdar://problem/62978882

-[WebPreferences initWithCoder:] should use -[NSCoder decodeValueOfObjCType:at:size:]
<https://webkit.org/b/210621>
<rdar://problem/61906458>

Reviewed by Anders Carlsson.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260315 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261515] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r260229. rdar://problem/62978244

Re-land: [IPC Hardening] MachMessage::create() should use checked arithmetic
<https://webkit.org/b/210572>
<rdar://problem/61729947>

Reviewed by Chris Dumez.

  • Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::Connection::sendOutgoingMessage):
  • Add nullptr check since MachMessage::create() can return an empty std::unique_ptr<> now.
  • Platform/IPC/cocoa/MachMessage.cpp: (IPC::MachMessage::create):
  • Use CheckedSize to compute the buffer size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260229 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261514] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r260201. rdar://problem/62978925

[macOS] Update ScreenTime as playback state changes
https://bugs.webkit.org/show_bug.cgi?id=210518
<rdar://problem/61181092>

Reviewed by Eric Carlson.

Follow up to r260182; Pass a WeakPtr into our task queue in sessionWillEndPlayback rather than a bare pointer.

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260201 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261513] by Alan Coon
  • 3 edits
    2 adds in branches/safari-609-branch

Cherry-pick r259877. rdar://problem/62978910

[CSS Shadow Parts] Bad style sharing between sibling elements with different part attributes
https://bugs.webkit.org/show_bug.cgi?id=210249
<rdar://problem/61547528>

Reviewed by Daniel Bates.

Source/WebCore:

Style sharing optimization was unconditionally allowed for elements that were styled with part pseudo element.
This could lead to miscomputed style.

Test case by Justin Fagnani.

Test: fast/css/shadow-parts/shadow-part-style-sharing.html

  • style/StyleSharingResolver.cpp: (WebCore::Style::SharingResolver::canShareStyleWithElement):

Only allow style sharing if parts match.

LayoutTests:

  • fast/css/shadow-parts/shadow-part-style-sharing-expected.html: Added.
  • fast/css/shadow-parts/shadow-part-style-sharing.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261512] by Alan Coon
  • 4 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259611. rdar://problem/62978871

Delete line boxes when moving text renderers between block flows
https://bugs.webkit.org/show_bug.cgi?id=210000

Reviewed by Antti Koivisto.

After style and/or tree mutation the existing line boxes are destroyed during the subsequent layout.
When the text renderer moves between block flows and the destination block flow initiates a different
type of line layout, we need to make sure the previous line content is cleaned up properly.

  • rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutSimpleLines): (WebCore::RenderBlockFlow::layoutLFCLines):
  • rendering/RenderText.cpp: (WebCore::RenderText::removeAndDestroyTextBoxes): (WebCore::RenderText::dirtyLineBoxes): (WebCore::RenderText::deleteLineBoxes):
  • rendering/RenderText.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261511] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259525. rdar://problem/62978878

Protect contentFrame in SubframeLoader::loadOrRedirectSubframe with RefPtr.
https://bugs.webkit.org/show_bug.cgi?id=127096
<rdar://problem/61221941>

Reviewed by Alex Christensen.

ContentFrame is used throughout loadOrRedirectSubframe so it needs to be protected with RefPtr.
And if loader changes frame in SubframeLoader::loadSubframe, return nullptr to notify the caller.

No new tests, covered by existing test.

  • loader/SubframeLoader.cpp: (WebCore::SubframeLoader::loadOrRedirectSubframe): (WebCore::SubframeLoader::loadSubframe):
  • loader/SubframeLoader.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261510] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259353. rdar://problem/62978934

Don't use raw pointers in ShadowRoot.
https://bugs.webkit.org/show_bug.cgi?id=209843
<rdar://problem/61069603>

Reviewed by Brent Fulgham.

  • dom/Element.cpp: (WebCore::Element::addShadowRoot):
  • dom/ShadowRoot.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259353 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261509] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259348. rdar://problem/62978878

Notify accessibility when a node is removed from its ancestor.
https://bugs.webkit.org/show_bug.cgi?id=209819

Reviewed by Chris Fleizach.

Covered by existing tests in LayoutTests/accessibility.

  • dom/Node.cpp: (WebCore::Node::removedFromAncestor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259348 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261508] by Alan Coon
  • 5 edits in branches/safari-609-branch

Cherry-pick r259141. rdar://problem/62978919

Web Inspector: should also escape the method when Copy as cURL
https://bugs.webkit.org/show_bug.cgi?id=209665
<rdar://problem/58432154>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Models/Resource.js: (WI.Resource.prototype.generateCURLCommand): (WI.Resource.prototype.generateCURLCommand.escapeStringPosix): The method could be maliciously crafted, so we should also escape it (if needed).

LayoutTests:

  • http/tests/inspector/network/copy-as-curl.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259141 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [261507] by Alan Coon
  • 4 edits in branches/safari-609-branch

Cherry-pick r257929. rdar://problem/62978899

In case an activating service worker is terminated, it should go to activated state
https://bugs.webkit.org/show_bug.cgi?id=208440
<rdar://problem/59742332>

Reviewed by Chris Dumez.

Source/WebCore:

Covered by updated test.

  • workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::setState): As per spec, if an activated service worker is terminated or its activate event is timing out, we should move it to activate state.

LayoutTests:

  • http/wpt/service-workers/service-worker-spinning-activate.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257929 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:59 PM Changeset in webkit [261506] by Kate Cheney
  • 23 edits in trunk

Fail navigations to non app-bound domains after use of app-bound APIs
https://bugs.webkit.org/show_bug.cgi?id=211647
<rdar://problem/62978159>

Reviewed by Brent Fulgham.

Source/WebCore:

Simplified in-app browser privacy protections check into one, better
named function.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeScriptInWorld):

  • loader/FrameLoaderClient.h:
  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):

  • page/Page.cpp:

(WebCore::Page::injectUserStyleSheet):

  • page/WebKitNamespace.cpp:

(WebCore::WebKitNamespace::messageHandlers):

  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::initializeUserStyle):
Rearranged ordering so the message to WebPageProxy only gets sent to
indicate app-bound behavior if user style sheets actually exist.

Source/WebKit:

A lot of this patch is deleting the unnecessary variable/function
hasNavigatedAwayFromAppBoundDomain now that navigating away from an
app-bound domain is not possible.

To address the bug, this sets the default isNavigatingToAppBoundDomain
value to be WTF::nullopt. This will allow app-bound behaviors until
a navigation has been attempted, in which case it will fail or will
update isNavigatingToAppBoundDomain to the correct value.

  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):

  • Shared/LoadParameters.h:
  • Shared/PolicyDecision.h:

(WebKit::PolicyDecision::encode const):
(WebKit::PolicyDecision::decode):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::loadData):
(WebKit::ProvisionalPageProxy::loadRequest):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared):
(WebKit::WebPageProxy::hasNavigatedAwayFromAppBoundDomain const): Deleted.
Remove hasNavigatedAwayFromAppBoundDomain.

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted):
Check for new m_hasExecutedAppBoundBehaviorBeforeNavigation parameter
and fail the navigation if a WebView has used app-bound behavior then
tries to navigate to a non app-bound domain.

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Update error message to be more general now that more than one error
can occur.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::setHasExecutedAppBoundBehaviorBeforeNavigation):

  • UIProcess/WebPageProxy.messages.in:

New parameter to indicate a WebView has used app-bound APIs before
navigating.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::shouldEnableInAppBrowserPrivacyProtections):
(WebKit::WebFrameLoaderClient::hasNavigatedAwayFromAppBoundDomain): Deleted.
(WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks const): Deleted.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Combined two functions into a simpler function:
shouldEnableInAppBrowserPrivacyProtections().

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPage::updatePreferences):
Store the special app-bound domain flag to gate the service worker
API. This should be stored separately from
m_isNavigatingToAppBoundDomain, because in the WebPage constructor we
don't yet know whether the WKAppBoundDomains key exists.

(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::didReceivePolicyDecision):
Remove hasNavigatedAwayFromAppBoundDomain.

(WebKit::WebPage::runJavaScript):
(WebKit::WebPage::setIsNavigatingToAppBoundDomain):
(WebKit::WebPage::shouldEnableInAppBrowserPrivacyProtections):
If m_needsInAppBrowserPrivacyQuirks are on for testing, don't enable
protections. Only notify the WebPageProxy of app-bound behavior if
a navigation has not occured and we know the webView is not app-bound
(in order to limit IPC).

(WebKit::m_isNavigatingToAppBoundDomain): Deleted.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::isNavigatingToAppBoundDomain const):
(WebKit::WebPage::setIsNavigatingToAppBoundDomain): Deleted.
(WebKit::WebPage::hasNavigatedAwayFromAppBoundDomain const): Deleted.
(WebKit::WebPage::setHasNavigatedAwayFromAppBoundDomain): Deleted.
(WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Deleted.

Tools:

Added a new test to confirm a non-app bound navigation fails after
using script injection.

This fix also required changing any test which uses a restricted API
to confirm behavior of another restricted API. Tests can set
_setNeedsInAppBrowserPrivacyQuirks in the configuration to indicate
APIs should not be blocked, then toggle it to test actual behavior.

Also, we can remove any calls to _setInAppBrowserPrivacyEnabled
now that this is just an internal test flag.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(-[AppBoundDomainDelegate webView:didFinishNavigation:]):
(-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]):
(-[AppBoundDomainDelegate waitForDidFinishNavigation]):
(-[AppBoundDomainDelegate waitForDidFailProvisionalNavigationError]):
(TEST):

4:46 PM Changeset in webkit [261505] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Enable conformance2/textures/canvas/ and image_data/ tests
https://bugs.webkit.org/show_bug.cgi?id=211602

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-11
Reviewed by Dean Jackson.

Enable all of these layout tests, which are now passing.

4:30 PM Changeset in webkit [261504] by keith_miller@apple.com
  • 6 edits
    1 delete in trunk/Source/JavaScriptCore

Remove unused BytecodeKills.h
https://bugs.webkit.org/show_bug.cgi?id=211753

Reviewed by Yusuke Suzuki.

No one uses this class anymore, we should get rid of it.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/BytecodeKills.h: Removed.
  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::BytecodeLivenessAnalysis::computeKills): Deleted.

  • bytecode/BytecodeLivenessAnalysis.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::killsFor): Deleted.

  • dfg/DFGGraph.h:
4:22 PM Changeset in webkit [261503] by Russell Epstein
  • 3 edits in branches/safari-610.1.12-branch/Source/WebKit

Cherry-pick r261452. rdar://problem/63055916

Attemp to fix internal iOS build

  • Platform/spi/ios/UIKitSPI.h:
  • Define @class UIHoverEvent using header if available, else fall back to local class definition.
  • Define methods separately from class definition.
  • UIProcess/ios/WKMouseGestureRecognizer.mm: (-[WKMouseGestureRecognizer setView:]):
  • Use new method if it is available.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:19 PM Changeset in webkit [261502] by Russell Epstein
  • 8 edits in branches/safari-610.1.12-branch/Source

Versioning.

4:13 PM Changeset in webkit [261501] by Peng Liu
  • 3 edits in trunk/Source/WebCore

Enable the mock video presentation mode in related layout tests and fix test failures
https://bugs.webkit.org/show_bug.cgi?id=211645

Reviewed by Eric Carlson.

Revert the unnecessary change in r261493 to fix the build failures when
the Picture-in-Picture API is disabled.

  • html/HTMLVideoElement.cpp:
  • html/HTMLVideoElement.h:
3:44 PM Changeset in webkit [261500] by Wenson Hsieh
  • 6 edits in trunk/Source

Remove some unnecessary indirection when getting Document’s Editor
https://bugs.webkit.org/show_bug.cgi?id=211744

Reviewed by Geoffrey Garen.

Source/WebCore:

After r261018, there's no longer a need to reach into Document's Frame to get the Editor instance, since
Document itself owns the Editor (and Frame's implementation of editor() just calls back into the document
anyways). No change in behavior.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetSpelling):

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):
(WebCore::Document::registerAttachmentIdentifier):
(WebCore::Document::didInsertAttachmentElement):
(WebCore::Document::didRemoveAttachmentElement):

  • testing/Internals.cpp:

(WebCore::Internals::markerCountForNode):
(WebCore::Internals::setMarkedTextMatchesAreHighlighted):
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
(WebCore::Internals::hasSpellingMarker):
(WebCore::Internals::hasAutocorrectedMarker):
(WebCore::Internals::setContinuousSpellCheckingEnabled):
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
(WebCore::Internals::setAutomaticLinkDetectionEnabled):
(WebCore::Internals::setAutomaticDashSubstitutionEnabled):
(WebCore::Internals::setAutomaticTextReplacementEnabled):
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
(WebCore::Internals::handleAcceptedCandidate):
(WebCore::Internals::isOverwriteModeEnabled):
(WebCore::Internals::toggleOverwriteModeEnabled):
(WebCore::Internals::rangeOfString):
(WebCore::Internals::countMatchesForText):
(WebCore::Internals::hasGrammarMarker):

Source/WebKit:

See WebCore ChangeLog for more information. No change in behavior.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::performActionOnElement):

3:42 PM Changeset in webkit [261499] by Devin Rousso
  • 5 edits in trunk

Web Inspector: show JavaScript Worker name as an internal property
https://bugs.webkit.org/show_bug.cgi?id=211708

Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/worker/worker-create-and-terminate.html

  • inspector/WebInjectedScriptHost.cpp:

(WebCore::WebInjectedScriptHost::getInternalProperties):

  • workers/Worker.h:

(WebCore::Worker::name const): Added.

LayoutTests:

  • inspector/worker/worker-create-and-terminate.html:
3:40 PM Changeset in webkit [261498] by Devin Rousso
  • 2 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Network: Timing: gaps around the "Resource does not have timing data" message
https://bugs.webkit.org/show_bug.cgi?id=211648

Reviewed by Timothy Hatcher.

  • UserInterface/Main.html:
  • UserInterface/Views/ResourceTimingContentView.css: Added.

(.resource-details.resource-timing > .message-text-view):

3:38 PM Changeset in webkit [261497] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: Preview: default detached window size not wide enough for navigation items to be visible
https://bugs.webkit.org/show_bug.cgi?id=211649

Reviewed by Timothy Hatcher.

  • UserInterface/Views/NetworkDetailView.js:

(WI.NetworkDetailView.prototype.initialLayout):
Don't center the panel switcher radio buttons as when they are centered, there's not always
enough room for WI.NavigationItems for the currently showing WI.ContentView. Aligning
the panel switcher radio buttons to the start allows for as much room as possible.

3:29 PM Changeset in webkit [261496] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add some logs to diagnose why WebKitLegacy.CrossPartitionFileSchemeAccess API test times out in EWS
https://bugs.webkit.org/show_bug.cgi?id=211738

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-11
Reviewed by Darin Adler.

  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm:

(TestWebKitAPI::TEST):
I saw an instance of failing to make a partition because the "file" already existed.
Try cleaning up anything left from last time this test timed out to prevent it from timing out again.

3:13 PM Changeset in webkit [261495] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Fix possible crash in ViewGestureController on macOS
https://bugs.webkit.org/show_bug.cgi?id=211745

Reviewed by Tim Horton.

When ViewGestureController::resetState() clears m_swipeCancellationTracker, it should set it to canceled so that
any pending -trackSwipeEventWithOptions:... which is holding a reference to the WKSwipeCancellationTracker knows
to stop.

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::resetState):
(WebKit::ViewGestureController::reset):

2:51 PM Changeset in webkit [261494] by Simon Fraser
  • 8 edits
    2 deletes in trunk/Source/WebCore

Have ScrollingThread use a RunLoop rather than rolling its own
https://bugs.webkit.org/show_bug.cgi?id=211730

Reviewed by Darin Adler.

ScrollingThread rolled its own runloop/function dispatch by dropping to CF for macOS.
Fix to use RunLoop which provides the same functionality.

There was also a race creating the ScrollingThread for the first time, since both
the main thread, and EventDispatcher can call ScrollingThread::dispatch() early on,
so fix with a std::once block.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/ScrollingThread.cpp:

(WebCore::ScrollingThread::singleton):
(WebCore::ScrollingThread::dispatch):
(WebCore::ScrollingThread::createThreadIfNeeded):
(WebCore::ScrollingThread::initializeRunLoop):
(WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread): Deleted.
(WebCore::ScrollingThread::wakeUpRunLoop): Deleted.
(WebCore::ScrollingThread::threadRunLoopSourceCallback): Deleted.

  • page/scrolling/ScrollingThread.h:

(WebCore::ScrollingThread::runLoop):

  • page/scrolling/mac/ScrollingThreadMac.mm: Removed.
2:03 PM Changeset in webkit [261493] by Peng Liu
  • 41 edits in trunk

Enable the mock video presentation mode in related layout tests and fix test failures
https://bugs.webkit.org/show_bug.cgi?id=211645

Reviewed by Darin Adler.

Source/WebCore:

Clean up the internal states of video element regarding video presentation mode
to simplify the task to write reliable layout tests for video fullscreen and
Picture-in-Picture.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enterFullscreen):
Update the states after we are sure the video element will enter fullscreen.

(WebCore::HTMLMediaElement::exitFullscreen):
Remove the unnecessary "fullscreenModeChanged(VideoFullscreenModeNone)".

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::waitingToEnterFullscreen):

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::webkitDisplayingFullscreen):
The function webkitDisplayingFullscreen() will return true after the process
to enter fullscreen is completed.

  • html/HTMLVideoElement.h:

Expose didBecomeFullscreenElement() when VIDEO_PRESENTATION_MODE is enabled.

Source/WebKit:

Fix the mistake in VideoFullscreenManager::supportsVideoFullscreen() introduced in r202274.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::supportsVideoFullscreen const):

Source/WebKitLegacy/mac:

Call HTMLVideoElement::didBecomeFullscreenElement() after a video element enters
fullscreen (to be consistent with WK2).

  • WebView/WebVideoFullscreenController.mm:

(-[WebVideoFullscreenController windowDidEnterFullScreen:]):

  • WebView/WebView.mm:

(-[WebView _enterVideoFullscreenForVideoElement:mode:]):

LayoutTests:

  • http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast-expected.txt:
  • http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast.html:
  • media/media-fullscreen-inline.html:
  • media/media-fullscreen-loop-inline-expected.txt:
  • media/media-fullscreen-loop-inline.html:
  • media/media-fullscreen-pause-inline-expected.txt:
  • media/media-fullscreen-pause-inline.html:
  • media/media-fullscreen-return-to-inline-expected.txt:
  • media/media-fullscreen-return-to-inline.html:
  • media/media-fullscreen.js:

(async beginfullscreen):
(async fullscreenerror):
(addEventListeners):
(beginfullscreen): Deleted.
(fullscreenerror): Deleted.

  • media/modern-media-controls/css/webkit-cursor-visibility-auto-hide-expected.txt:
  • media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
  • media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen.html:
  • media/modern-media-controls/media-controller/media-controller-fullscreen-ltr-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html:
  • media/modern-media-controls/media-controller/media-controller-space-bar-toggle-playback-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-space-bar-toggle-playback.html:
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen-expected.txt:
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html:
  • media/video-fullscreen-only-playback-expected.txt:
  • media/video-fullscreen-only-playback.html:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
1:32 PM Changeset in webkit [261492] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r261446.

The test is still failing.

Reverted changeset:

"[ macOS ] REGRESSION (r259139):
webgl/2.0.0/conformance2/rendering/framebuffer-completeness-
unaffected.html is failing"
https://bugs.webkit.org/show_bug.cgi?id=209740
https://trac.webkit.org/changeset/261446

1:05 PM Changeset in webkit [261491] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add some logs to diagnose why WebKitLegacy.CrossPartitionFileSchemeAccess API test times out in EWS
https://bugs.webkit.org/show_bug.cgi?id=211738

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-11
Reviewed by Mark Lam.

  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm:

(TestWebKitAPI::TEST):

12:45 PM Changeset in webkit [261490] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Update message filtering rules in the WebContent process' sandbox
https://bugs.webkit.org/show_bug.cgi?id=211188
<rdar://problem/60922910>

Reviewed by Brent Fulgham.

Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS.
Messages that have not been observed being in use, should be denied.

No new tests, covered by existing tests.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
12:42 PM Changeset in webkit [261489] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] WKWebView.evaluateJavaScript should run at foreground priority when app is foreground
https://bugs.webkit.org/show_bug.cgi?id=211734

Reviewed by Darin Adler.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):

12:37 PM Changeset in webkit [261488] by commit-queue@webkit.org
  • 4 edits in trunk

[Web Animations] Document.getAnimations() should only consider document connection and not timeline association
https://bugs.webkit.org/show_bug.cgi?id=211697

Patch by Antoine Quint <Antoine Quint> on 2020-05-11
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark two additional WPT tests as PASS.

  • web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt:

Source/WebCore:

The Document.getAnimations() function should return any animation running for an element that is a child of the
target Document. We now consider all current animations, regardless of which timeline they might be associated
with. This lets us pass the final two WPT Document.getAnimations() tests.

  • dom/Document.cpp:

(WebCore::Document::matchingAnimations):

12:37 PM Changeset in webkit [261487] by Andres Gonzalez
  • 6 edits in trunk/Source/WebCore

Add implementation for AXIsolatedObject::elementPath, hasHighlighting, isBlockquote, isKeyboardFocusable.
https://bugs.webkit.org/show_bug.cgi?id=211732

Reviewed by Chris Fleizach.

Covered by several tests.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isBlockquote const): Moved to base class.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:

(WebCore::AXCoreObject::isBlockquote const):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData): Cache the above mentioned properties.
(WebCore::AXIsolatedObject::pathAttributeValue const):
(WebCore::AXIsolatedObject::isBlockquote const): Moved to base class.
(WebCore::AXIsolatedObject::isKeyboardFocusable const): Implemented inline in header.
(WebCore::AXIsolatedObject::hasHighlighting const): Implemented inline in header.
(WebCore::AXIsolatedObject::elementPath const): Implemented inline in header.

  • accessibility/isolatedtree/AXIsolatedObject.h:
12:05 PM Changeset in webkit [261486] by Ryan Haddad
  • 2 edits in trunk/Source/WTF

Unreviewed, reverting r261440.

Caused 6 TestWTF.WTF failures

Reverted changeset:

"Add iterator checking to ListHashSet"
https://bugs.webkit.org/show_bug.cgi?id=211669
https://trac.webkit.org/changeset/261440

11:59 AM Changeset in webkit [261485] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix assertion after r261414
https://bugs.webkit.org/show_bug.cgi?id=211731

This fixes a debug assertion that fired 100% of the time when running the test introduced in r261414
I also respond to Darin's and Youenn's post-commit feedback.

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::generateReferrerHeader):

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setHTTPReferrer):

11:43 AM Changeset in webkit [261484] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Use alias template for <type_traits> in WTF/wtf/TypeCast.h
https://bugs.webkit.org/show_bug.cgi?id=211714

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-05-11
Reviewed by Darin Adler.

  • wtf/TypeCasts.h:

(WTF::TypeCastTraits::isOfType):
(WTF::is):
(WTF::downcast):

11:28 AM Changeset in webkit [261483] by youenn@apple.com
  • 9 edits in trunk/LayoutTests

[ iOS wk2 ] http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=207583
<rdar://problem/59362947>

Reviewed by Geoffrey Garen.

Use in-test DumpJSConsoleLogInStdErr instead of TestExpectations to make sure this option is set for iOS.

  • TestExpectations:
  • http/wpt/beacon/cors/cors-preflight-blob-failure.html:
  • http/wpt/beacon/cors/cors-preflight-blob-success.html:
  • http/wpt/beacon/cors/cors-preflight-cookie.html:
  • http/wpt/beacon/cors/cors-preflight-redirect-failure.html:
  • http/wpt/beacon/cors/cors-preflight-redirect-from-crossorigin-to-sameorigin.html:
  • http/wpt/beacon/cors/cors-preflight-redirect-success.html:
  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html:

Update test to make sure that stderr console log lines will print whether the first load is failing or the second.

10:54 AM Changeset in webkit [261482] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

Check the validity of the underlying Document before updating the isolated tree.
https://bugs.webkit.org/show_bug.cgi?id=211728

Reviewed by Chris Fleizach.

Solves crashes in isolated tree mode for several LayoutTests.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::focusedUIElementForPage): Update the focused
document styles before returning the isolated tree focused object.

(WebCore::AXObjectCache::notificationPostTimerFired): Ignored
notification if underlying Document doesn't have a living render tree.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateChildren): Don't update isolated object
if associated AXObject doesn't have a Document or the Document doesn't have a live render tree.

9:26 AM Changeset in webkit [261481] by Andres Gonzalez
  • 8 edits in trunk

Add mechanism to turn on accessibility isolated tree mode from WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=211725

Reviewed by Chris Fleizach.

Source/WebCore:

If the client is WebKitTestRunner, enable isolated tree mode.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::isIsolatedTreeEnabled):

Source/WebCore/PAL:

Added _AXSSetIsolatedTreeMode to turn on isolated tree mode from WebKitTestRunner.

  • pal/spi/cocoa/AccessibilitySupportSPI.h:
  • pal/spi/mac/HIServicesSPI.h:

Tools:

Turn on isolated tree mode when appropriate.

  • WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

(WTR::AccessibilityController::updateIsolatedTreeMode):

9:22 AM Changeset in webkit [261480] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

REGRESSION (r253267): issues on touchstart/touchend/touchmove (pointerdown/pointerup/pointermove) events
https://bugs.webkit.org/show_bug.cgi?id=211521
<rdar://problem/62942374>

Reviewed by Darin Adler.

Source/WebKit:

As a brief refresher, deferring gesture recognizers allow us to handle otherwise blocking touch events
asynchronously by having all preventable native gesture recognizers require the deferring gesture recognizer to
fail; we only fail the deferring gesture recognizer once the web process has handled the touch event, and did
not call preventDefault().

These additional failure requirements can cause preventable gestures to be linked together in the same gesture
dependency subgraph; since each subgraph is reset only once all gestures in the subgraph have failed or ended,
this might cause some gestures to be reset after a delay (rather than being reset immediately). To mitigate
this, we divide the set of preventable gestures into multiple (currently, 2) subgraphs: one for gestures that
are reset after a delay, and another for gestures that are immediately resettable. This way, immediately
resettable gestures are able to reset and recognize again, without having to wait for other slower preventable
gesture recognizers to reset.

When fast-clicking is disabled (e.g. when loading a desktop web page on a mobile form factor, or when the
viewport has been zoomed in), the blocking synthetic double tap gesture recognizer (that is, WKContentView's
_doubleTapGestureRecognizer) is enabled, and adds itself as a dynamic failure requirement to the content
view's synthetic single tap gesture recognizer (_singleTapGestureRecognizer). In terms of the gesture
dependency graph, this causes the single tap gesture to form an edge with the double tap gesture, which ends up
uniting both deferring gesture recognizers under the same subgraph. This means UIWebTouchEventsGestureRecognizer,
which should be one of the gestures in the immediately resettable subgraph, is now connected to the rest of the
delayed resettable gestures, meaning that it cannot recognize until "slowly resettable" gestures such as the
tap-and-half text selection gesture have also been reset. This delay causes touch events to be dropped, as is
the case in this bug.

To fix this, simply quarantine the single tap and double tap gestures inside their own subgraph by introducing a
separate deferring gesture recognizer for them. When fast-clicking is enabled, this does not hinder the ability
for the single tap gesture to fire in rapid succession, since the double tap gesture is disabled (and thus, not
a part of the graph at all). when fast-clicking is disabled, then the double tap gesture will prevent the single
tap gesture from being immediately reset anyways, due to the direct failure requirement between the double and
single tap gesture.

Doing this ensures that no other immediately resettable gesture (UIWebTouchEventsGestureRecognizer included)
is accidentally blocked from immediately resetting due to being linked to the delayed resettable gestures by way
of the synthetic single and double tap gestures.

Test: fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive.html

  • UIProcess/ios/WKContentViewInteraction.h:

Add a dedicated deferring gesture recognizer for the synthetic single tap and double tap gesture recognizers.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):

Use -_deferringGestureRecognizers instead of hard-coding logic for each deferring gesture.

(-[WKContentView _removeDefaultGestureRecognizers]): Ditto.
(-[WKContentView _addDefaultGestureRecognizers]): Ditto.
(-[WKContentView _deferringGestureRecognizers]):

We now have 3 distinct deferring gestures; instead of handling the three deferring gestures individually in
various places in this file, group them all behind a getter that returns an array of deferring gestures, and use
this instead.

(-[WKContentView _doneDeferringNativeGestures:]): Ditto.
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): Ditto.
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Partition the synthetic single tap and double tap gestures into their own subgraph.

LayoutTests:

Add a layout test that synthesizes a tap-and-half gesture over an element with active touch event listeners, and
verifies that the second half of the gesture (i.e. the pan gesture) dispatches touchstart, touchmove, and
touchend events.

  • fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive-expected.txt: Added.
  • fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive.html: Added.
8:43 AM Changeset in webkit [261479] by pvollan@apple.com
  • 13 edits
    1 delete in trunk

Unreviewed, reverting r261296.

Rolling r260769 back in, since this was not causing a
regression.

Reverted changeset:

"Unreviewed, reverting r260769."
https://bugs.webkit.org/show_bug.cgi?id=211578
https://trac.webkit.org/changeset/261296

7:59 AM Changeset in webkit [261478] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

Unreviewed, fix the watchOS build after r261457

Put -[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:] behind a USE(UICONTEXTMENU)
compiler guard; currently, it is declared everywhere, but only implemented if ENABLE(DATA_DETECTION) &&
USE(UICONTEXTMENU). However, WKContentView only invokes it behind code that is guarded by USE(UICONTEXTMENU).

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:]):

7:56 AM Changeset in webkit [261477] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mac wk1 ] http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-subframe.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209067

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:43 AM Changeset in webkit [261476] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION (r259463): [ Mojave Debug ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky failing and timing out
https://bugs.webkit.org/show_bug.cgi?id=210219

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
6:40 AM Changeset in webkit [261475] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Introduce GridSpace
https://bugs.webkit.org/show_bug.cgi?id=211712

Reviewed by Antti Koivisto.

Normally we use the initial width/height (minimum width/height) value to compute the
distribution ratio for the extra space (e.g minimum widths are [ 1 ] [ 2 ] extra space: 6; final widths [ 1 + 2 ] [ 2 + 4 ]).
However is some rare case, while we use the minimum widths as the initial widths, the distribution ratio
is computed using the maximum widths.
This patch introduces GridSpace to be able to differentiate initial and distribution widths/heights (no functional change yet).

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::GridSpace::isEmpty const):
(WebCore::Layout::max):
(WebCore::Layout::operator-):
(WebCore::Layout::operator+=):
(WebCore::Layout::operator-=):
(WebCore::Layout::operator/):
(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):

5:50 AM Changeset in webkit [261474] by Paulo Matos
  • 2 edits in trunk/JSTests

Skip on armv7/linux stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js
https://bugs.webkit.org/show_bug.cgi?id=211721

Unreviewed Gardening.
This test is failing on our linux armv7 bots on a flaky basis and requires investigation.

  • stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js:
2:47 AM Changeset in webkit [261473] by commit-queue@webkit.org
  • 6 edits in trunk

[GTK] Media and audio permission request unit tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=158257

Patch by Philippe Normand <pnormand@igalia.com> on 2020-05-11
Reviewed by Carlos Garcia Campos.

Source/WebKit:

Add new private API to disable secure capture device contexts.
This is needed for the API tests.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewSetMediaCaptureRequiresSecureConnection):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:

Tools:

Fix getUserMedia glib tests. They require unsecure capture device context.

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewUserMediaEnumerateDevicesPermissionCheck):
(testWebViewUserMediaPermissionRequests):
(testWebViewAudioOnlyUserMediaPermissionRequests):

  • TestWebKitAPI/glib/TestExpectations.json:
2:23 AM Changeset in webkit [261472] by Paulo Matos
  • 2 edits in trunk/Tools

Fix typo 'Detacted' -> 'Detected'
https://bugs.webkit.org/show_bug.cgi?id=211715

Unreviewed.

  • Scripts/run-jsc-stress-tests:
2:21 AM Changeset in webkit [261471] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update baseline after r261443
https://bugs.webkit.org/show_bug.cgi?id=211717

Unreviewed gardening.

  • platform/gtk/http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
2:14 AM Changeset in webkit [261470] by graouts@webkit.org
  • 8 edits in trunk/Source/WebCore

[Web Animations] Refactor animation comparison by composite order in a single utility function
https://bugs.webkit.org/show_bug.cgi?id=211695

Reviewed by Darin Adler.

We used to split sorting of animations by composite order across several functions and files. Specifically,
DocumentTimeline::getAnimations() would first collect animations by class (CSS Transitions, then CSS
Animations, then JS-originated animations), and then sort each class, calling into the static function
compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder() in some cases and into the
WebAnimationUtilities compareAnimationsByCompositeOrder() function in other.

Since we need to be able to sort animations by composite order in other situations, for instance when sorting
events when updating animations and sending events (which we will do in a future patch), we refactor all
of the comparison logic into compareAnimationsByCompositeOrder(), removing the need to provide an AnimationList,
which is specific to the case where we know we are comparing CSSAnimation objects targeting a shared element.

This effectively empties DocumentTimeline::getAnimations() so we remove this function and filter relevant
animations in Document::matchingAnimations() and call compareAnimationsByCompositeOrder() before returning
the compiled animations.

No new tests since there is no change of behavior.

  • animation/DocumentTimeline.cpp:

(WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder): Deleted.
(WebCore::DocumentTimeline::getAnimations const): Deleted.

  • animation/DocumentTimeline.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::ensureEffectsAreSorted):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::commitStyles):

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder):
(WebCore::compareCSSTransitions):
(WebCore::compareCSSAnimations):
(WebCore::compareAnimationsByCompositeOrder):

  • animation/WebAnimationUtilities.h:
  • dom/Document.cpp:

(WebCore::Document::matchingAnimations):

2:05 AM Changeset in webkit [261469] by cturner@igalia.com
  • 5 edits in trunk

[WPE] Layout test media/encrypted-media/mock-MediaKeySystemAccess.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=181225

Reviewed by Darin Adler.

Source/WebCore:

WebCore::CDM::createInstance assumes its private instance always
produces a valid pointer. This is not the case in the testing
mocks. Guard against it.

Test: media/encrypted-media/mock-MediaKeySystemAccess.html

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::createInstance): Guard against null pointers in
mock scenarios.

LayoutTests:

  • platform/gtk/TestExpectations: The test is no longer crashing.
  • platform/wpe/TestExpectations: Ditto.

May 10, 2020:

11:57 PM Changeset in webkit [261468] by commit-queue@webkit.org
  • 7 edits in trunk

Fix base64.any.html test
https://bugs.webkit.org/show_bug.cgi?id=211671

Patch by Rob Buis <rbuis@igalia.com> on 2020-05-10
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update improved test expectation.

  • web-platform-tests/fetch/data-urls/base64.any-expected.txt:
  • web-platform-tests/fetch/data-urls/base64.any.worker-expected.txt:

Source/WebCore:

Fix base64.any.html test by extending DataURLDecoder with a
forgiving-base64 decode mode [1], as used by the Fetch
data: URL processor algorithm [2].

Behavior matches Chrome and Firefox.

[1] https://infra.spec.whatwg.org/#forgiving-base64-decode
[2] https://fetch.spec.whatwg.org/#data-url-processor

Test: imported/w3c/web-platform-tests/fetch/data-urls/base64.any.html

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL):

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::decodeBase64):
(WebCore::DataURLDecoder::decode):

  • platform/network/DataURLDecoder.h:
11:14 PM Changeset in webkit [261467] by Darin Adler
  • 4 edits in trunk/Source

Add copy constructor and assignment operator to Ref<>
https://bugs.webkit.org/show_bug.cgi?id=211705

Reviewed by Sam Weinig.

Source/WebCore:

  • dom/BoundaryPoint.h: As a test of the change to Ref, remove the explicit

copy and move constructors and assignment operators, relying on the defaults
instead, which are now exactly what we want.

Source/WTF:

As recently discussed in some WebKit bug patch review, we think that Ref and RefPtr
should have the same design, except for whether the value can be null. Ref had a
more ambitious approach to avoiding reference count churn, requiring a
call to copyRef to make any copying explicit, partly by analogy with raw C
references, which also can't be copied (but they can't be moved either). We choose
to change Ref to match RefPtr and to take the risk of additional churn. This makes
it easier to use Ref in contexts like collection classes and structures. An
alternative would be to go the other direction, and make RefPtr require a call to
copyRef: seems like an obviously worse option.

  • wtf/Ref.h: Add the copy constructor and assignment operator.

These follow a similar pattern to the move constructor and assignment operator.
Also add a deprecation comment before copyRef, which we will eventually remove.

10:16 PM Changeset in webkit [261466] by commit-queue@webkit.org
  • 4 edits in trunk

Update user agent quirk for bankofamerica.com
https://bugs.webkit.org/show_bug.cgi?id=211700

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-05-10
Reviewed by Carlos Garcia Campos.

Source/WebCore:

The Mac platform quirk isn't working anymore. The Chrome quirk works.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresMacintoshPlatform):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

9:46 PM Changeset in webkit [261465] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Use alias template to define match_constness_t in Wtf/wtp/TypeCasts.h
https://bugs.webkit.org/show_bug.cgi?id=211698

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-05-10
Reviewed by Yusuke Suzuki.

  • wtf/TypeCasts.h:

(WTF::downcast):

7:36 PM Changeset in webkit [261464] by Ross Kirsling
  • 166 edits in trunk/Source/JavaScriptCore

[clang-tidy] Run modernize-use-nullptr over JSC
https://bugs.webkit.org/show_bug.cgi?id=211706

Reviewed by Darin Adler.

  • API/APICallbackFunction.h:
  • API/JSAPIGlobalObject.h:
  • API/JSBase.cpp:
  • API/JSCallbackObjectFunctions.h:
  • API/JSClassRef.cpp:
  • API/JSContextRef.cpp:
  • API/JSObjectRef.cpp:
  • API/JSScriptRef.cpp:
  • API/JSValueRef.cpp:
  • API/JSWeakObjectMapRefPrivate.cpp:
  • API/tests/ExecutionTimeLimitTest.cpp:
  • API/tests/PingPongStackOverflowTest.cpp:
  • assembler/AbstractMacroAssembler.h:
  • assembler/CPU.cpp:
  • bytecode/CodeBlock.cpp:
  • bytecode/DeleteByIdVariant.cpp:
  • bytecode/GetByIdVariant.cpp:
  • bytecode/InByIdVariant.cpp:
  • bytecode/InlineCallFrame.cpp:
  • bytecode/LazyOperandValueProfile.cpp:
  • bytecode/PutByIdVariant.cpp:
  • bytecode/ValueProfile.h:
  • bytecode/ValueRecovery.cpp:
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:
  • debugger/DebuggerScope.h:
  • dfg/DFGAbstractValue.cpp:
  • dfg/DFGAdjacencyList.h:
  • dfg/DFGArgumentPosition.h:
  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGAvailability.h:
  • dfg/DFGByteCodeParser.cpp:
  • dfg/DFGCFGSimplificationPhase.cpp:
  • dfg/DFGCPSRethreadingPhase.cpp:
  • dfg/DFGCompilationKey.h:
  • dfg/DFGConstantFoldingPhase.cpp:
  • dfg/DFGDisassembler.cpp:
  • dfg/DFGDoubleFormatState.h:
  • dfg/DFGEdge.h:
  • dfg/DFGFixupPhase.cpp:
  • dfg/DFGFrozenValue.cpp:
  • dfg/DFGGenerationInfo.h:
  • dfg/DFGGraph.h:
  • dfg/DFGInPlaceAbstractState.cpp:
  • dfg/DFGIntegerCheckCombiningPhase.cpp:
  • dfg/DFGLazyJSValue.cpp:
  • dfg/DFGNode.h:
  • dfg/DFGOSREntrypointCreationPhase.cpp:
  • dfg/DFGOSRExit.cpp:
  • dfg/DFGOperations.cpp:
  • dfg/DFGSilentRegisterSavePlan.h:
  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT64.cpp:
  • dfg/DFGStructureAbstractValue.cpp:
  • dfg/DFGTransition.cpp:
  • dfg/DFGTypeCheckHoistingPhase.cpp:
  • dfg/DFGWorklist.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLAvailableRecovery.h:
  • ftl/FTLExitValue.cpp:
  • ftl/FTLFormattedValue.h:
  • ftl/FTLJITCode.cpp:
  • ftl/FTLLink.cpp:
  • ftl/FTLLowerDFGToB3.cpp:
  • ftl/FTLLoweredNodeValue.h:
  • ftl/FTLOSREntry.cpp:
  • ftl/FTLOSRExitCompiler.cpp:
  • ftl/FTLTypedPointer.h:
  • ftl/FTLValueFromBlock.h:
  • ftl/FTLValueRange.h:
  • heap/GCSegmentedArray.h:
  • heap/Handle.h:
  • heap/HandleSet.h:
  • heap/HandleTypes.h:
  • heap/HeapSnapshotBuilder.cpp:
  • heap/MarkedBlockInlines.h:
  • heap/Strong.h:
  • heap/WeakImpl.h:
  • heap/WeakInlines.h:
  • heap/WeakSet.cpp:
  • heap/WeakSet.h:
  • interpreter/CallFrame.cpp:
  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:
  • interpreter/ProtoCallFrame.h:
  • interpreter/StackVisitor.cpp:
  • interpreter/StackVisitor.h:
  • jit/AssemblyHelpers.h:
  • jit/CCallHelpers.h:
  • jit/JITCode.cpp:
  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:
  • jit/ThunkGenerators.cpp:
  • jsc.cpp:
  • llint/LLIntSlowPaths.cpp:
  • parser/ASTBuilder.h:
  • parser/Lexer.cpp:
  • parser/Lexer.h:
  • parser/Nodes.cpp:
  • parser/Nodes.h:
  • parser/Parser.cpp:
  • parser/Parser.h:
  • parser/ParserArena.cpp:
  • parser/ParserArena.h:
  • parser/ParserFunctionInfo.h:
  • parser/SyntaxChecker.h:
  • parser/UnlinkedSourceCode.h:
  • profiler/ProfilerBytecodeSequence.cpp:
  • profiler/ProfilerCompilation.cpp:
  • profiler/ProfilerDatabase.cpp:
  • profiler/ProfilerOSRExitSite.cpp:
  • profiler/ProfilerOriginStack.cpp:
  • runtime/ArgList.h:
  • runtime/ArrayPrototype.cpp:
  • runtime/ClonedArguments.cpp:
  • runtime/CommonSlowPaths.cpp:
  • runtime/Completion.h:
  • runtime/DataView.h:
  • runtime/DatePrototype.cpp:
  • runtime/DirectEvalExecutable.cpp:
  • runtime/DumpContext.cpp:
  • runtime/FunctionExecutable.cpp:
  • runtime/IndirectEvalExecutable.cpp:
  • runtime/JSArray.cpp:
  • runtime/JSArrayBufferView.cpp:
  • runtime/JSCJSValue.cpp:
  • runtime/JSCJSValueInlines.h:
  • runtime/JSCell.cpp:
  • runtime/JSDataView.cpp:
  • runtime/JSDestructibleObject.h:
  • runtime/JSFunction.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSONObject.cpp:
  • runtime/JSObject.cpp:
  • runtime/JSObject.h:
  • runtime/JSScope.cpp:
  • runtime/JSScope.h:
  • runtime/LiteralParser.cpp:
  • runtime/OptionsList.h:
  • runtime/PropertyDescriptor.cpp:
  • runtime/PropertyMapHashTable.h:
  • runtime/PropertySlot.h:
  • runtime/PutPropertySlot.h:
  • runtime/RegExpMatchesArray.h:
  • runtime/RegExpPrototype.cpp:
  • runtime/StringPrototype.cpp:
  • runtime/Structure.cpp:
  • runtime/Structure.h:
  • runtime/TestRunnerUtils.cpp:
  • runtime/TypedArrayType.cpp:
  • runtime/VM.cpp:
  • runtime/Watchdog.cpp:
  • runtime/Watchdog.h:
  • runtime/WriteBarrier.h:
  • testRegExp.cpp:
  • tools/JSDollarVM.cpp:
  • wasm/WasmSlowPaths.cpp:
  • yarr/RegularExpression.h:
  • yarr/YarrInterpreter.cpp:
  • yarr/YarrJIT.cpp:
  • yarr/YarrJIT.h:
  • yarr/YarrPattern.cpp:
  • yarr/YarrPattern.h:
7:08 PM Changeset in webkit [261463] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy/win

[WinCairo][WK1] requestAnimationFrame doesn't work since r261113
https://bugs.webkit.org/show_bug.cgi?id=211702

Reviewed by Darin Adler.

Since r261113 (Bug 204713), WinCairo WK1 is failing some rAF tests
even though AppleWin isn't.

WinCairo also should do m_page->updateRendering() in
WebView::flushPendingGraphicsLayerChangesSoon as well as AppleWin.

  • WebView.cpp:

(WebView::flushPendingGraphicsLayerChangesSoon): Call
updateRendering.

4:56 PM Changeset in webkit [261462] by basuke.suzuki@sony.com
  • 11 edits in trunk

Add ENABLE_PERIODIC_MEMORY_MONITOR flag.
https://bugs.webkit.org/show_bug.cgi?id=211704

Reviewed by Yusuke Suzuki.

.:

Define ENABLE_PERIODIC_MEMORY_MONITOR flags in specific platform's options.
Enable it for PlayStation port.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebKit:

No new tests because there's no behavior change.

Replace PLATFORM() macros with ENABLE() macro.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

Define ENABLE_PERIODIC_MEMORY_MONITOR flags in specific platform file.

  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:
3:37 PM Changeset in webkit [261461] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r261270): Broke build with python3
https://bugs.webkit.org/show_bug.cgi?id=211699

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-05-10
Reviewed by Yusuke Suzuki.

Remove the problematic print statement. It causes the script to fail. If fixed, it spams the
build output. We only print messages during the build when there are problems to be fixed.

  • Scripts/generate-message-receiver.py:

(main):

2:35 PM Changeset in webkit [261460] by Darin Adler
  • 14 edits in trunk/Source

Remove now-unneeded HAVE(CORE_VIDEO)
https://bugs.webkit.org/show_bug.cgi?id=211677

Reviewed by Dan Bernstein.

Source/WebCore:

  • page/cocoa/MemoryReleaseCocoa.mm:
  • platform/cocoa/CoreVideoSoftLink.cpp: Remove HAVE(CORE_VIDEO).
  • platform/cocoa/CoreVideoSoftLink.h: Ditto.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::getRGBAImageData const): Ditto.

  • platform/graphics/cv/PixelBufferConformerCV.cpp: Ditto.
  • platform/graphics/cv/PixelBufferConformerCV.h: Ditto.
  • platform/graphics/cv/TextureCacheCV.h: Ditto.
  • platform/graphics/cv/TextureCacheCV.mm: Ditto.
  • platform/graphics/cv/VideoTextureCopierCV.cpp: Ditto.
  • platform/graphics/cv/VideoTextureCopierCV.h: Ditto.

Source/WTF:

  • wtf/PlatformHave.h: Remove HAVE_CORE_VIDEO.
2:21 PM Changeset in webkit [261459] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents
https://bugs.webkit.org/show_bug.cgi?id=211668

Reviewed by Antoine Quint.

  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents):
Use Ref instead of RefPtr. Use Ref even in timelinesToUpdate; no harm in doing
a little bit of extra ref'ing. Use copyToVector when iterating relevantAnimations
since it could be a problem if the current animation was removed from the
ListHashSet while we are iterating it and there is no obvious reason that can't
happen. Use makeRef instead of makeRefPtr. Take advantage of the behavior of
the Optional operator<, which already treats nullopt as less than any non-nullopt
value, and remove unnecessary checks that weere doing the same thing explicitly.
This fixes a mistake where we were returning true when both are nullopt, which
could harm the stability of the sort, in theory. Add a null check of the timeline
when iterating completedTransitions, since there is no obvious guarantee they
could not have been removed as a side effect earlier.

2:21 PM Changeset in webkit [261458] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Use makeReversedRange and get rid of one-off ReverseView
https://bugs.webkit.org/show_bug.cgi?id=211675

Reviewed by Sam Weinig.

  • editing/markup.cpp:

(WebCore::ReverseView): Deleted.
(WebCore::StyledMarkupAccumulator::takeResults): Use makeReversedRange.

12:28 PM Changeset in webkit [261457] by timothy_horton@apple.com
  • 25 edits in trunk/Source

Clicking a tel:// link on iPad with a trackpad presents different UI than tapping on it
https://bugs.webkit.org/show_bug.cgi?id=211686
<rdar://problem/57941589>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • dom/MouseRelatedEvent.h:
  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::canPresentDataDetectorsUIForElement):
(WebCore::DataDetection::shouldCancelDefaultAction): Deleted.
Rename shouldCancelDefaultAction to canPresentDataDetectorsUIForElement.
This bit indicates whether a given element should invoke DD UI instead of
doing its default action, so either name is OK, but it feels better to
have it in the affirmative direction.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):
Determine if tapping on an anchor should invoke DataDetectors UI instead
of performing the default action, and short-circuit if that is possible.

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Source/WebKit:

Previously, iOS WebKit had code in handleTap, handleTwoFingerTapAtPoint, and commitPotentialTap,
which introspected the hit element /before/ dispatching the tap (or synthetic click) to the DOM,
short circuiting all normal event handling machinery in order to prevent the default action
and present the Data Detectors UI for the given link.

There's one immediate problem with this, which is that there is no similar code in the direct
click event handler path, which we now use for trackpad/mouse input on iPad. There's also a
secondary problem (which we have not seen in practice), which is that pages cannot preventDefault
to avoid launching the Data Detectors UI on a link, like they could to prevent an ordinary
link from being followed.

In order to resolve both issues and reduce duplication of logic, move the code that introspects
the element and invokes Data Detectors UI from high-level WebKit event dispatch code (where it
doesn't really belong) down to WebCore's default click event handler for anchors, right next to
the code that would ordinarily cause a navigation. This way, no matter how we get here, whether
by synthetic click or real click, we'll invoke the Data Detectors UI.

One alternative considered at length: we could actually let the navigation happen, and instead
handle the switch in navigation policy code, but there are a few reasons that did not seem ideal:
1) We'd need to plumb platform-specific data structures through a ton of FrameLoader code.
2) Clients often block non-HTTP(S) navigations, so in order to keep the feature functional,

we'd have to disregard the client's policy decision, defeating much of the purpose of making
use of the navigation mechanism in the first place.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::showDataDetectorsUIForPositionInformation):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::showDataDetectorsUIForPositionInformation):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::showDataDetectorsUIForElement):
Plumb showDataDetectorsUIForPositionInformation from iOS WebKit's ChromeClient
implementation all the way to WKContentView.

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showDataDetectorsUIForPositionInformation:]):
(-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKActionSheetAssistant contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKActionSheetAssistant showDataDetectorsSheet]): Deleted.
Make it possible to push InteractionInformationAtPosition into WKActionSheetAssistant,
instead of having it always pull a fresh one upon invocation, so that we can use the
position information passed along with the showDataDetectorsUIForPositionInformation message.

(-[WKActionSheetAssistant _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]):
(-[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:]):
Fix an existing bug where Data Detectors context menus would show extra default actions,
by moving our implementation of the -_contextMenuInteraction:overrideSuggestedActionsForConfiguration:
delegate here, sharing it with WKContentViewInteraction.

In a future patch, we should reconsider having three separate UIContextMenuInteractions.

Also, remove the contextMenuPresentationLocationForActionSheetAssistant: delegate,
since it will be wrong in the case of pushed-in position information, and instead
use the position information's original hit test point.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showDataDetectorsUI]):
(-[WKContentView _showDataDetectorsUIForPositionInformation:]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView _didNotHandleTapAsClick:]):
(-[WKContentView dataDetectionContextForPositionInformation:]):
(-[WKContentView dataDetectionContextForActionSheetAssistant:positionInformation:]):
(-[WKContentView _showDataDetectorsSheet]): Deleted.
(-[WKContentView currentPositionInformation]): Deleted.
(-[WKContentView dataDetectionContextForActionSheetAssistant:]): Deleted.
Instead of exposing an unnecessary -currentPositionInformation getter on WKActionSheetAssistant,
provide it as an argument to the WKActionSheetAssistantDelegate methods that actually need it.

(-[WKContentView contextMenuPresentationLocationForActionSheetAssistant:]): Deleted.
(-[WKContentView _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]):
Adopt WKActionSheetAssistant's suggestedActions mechanism so we can share code.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _showActionSheetForURL:atLocation:withAnnotationRect:]):
(-[WKPDFView dataDetectionContextForActionSheetAssistant:positionInformation:]):
(-[WKPDFView dataDetectionContextForActionSheetAssistant:]): Deleted.
Adapt to some WKActionSheetAssistantDelegate changes.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleTap):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::commitPotentialTap):
Remove the aforementioned short-circuiting paths for Data Detectors links.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h:
3:17 AM Changeset in webkit [261456] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=211694

Unreviewed gardening.

Gardening of flaky failures.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
12:26 AM Changeset in webkit [261455] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209281

Patch by Rob Buis <rbuis@igalia.com> on 2020-05-10
Reviewed by Darin Adler.

Since it is difficult to estimate when the revalidations are received
in relation to the frame loads, add two polling loops to make sure
revalidations have been received before proceding with the next
test step. This is similar to what fetch.html does.

  • web-platform-tests/fetch/stale-while-revalidate/frame-removal.html:
  • web-platform-tests/fetch/stale-while-revalidate/resources/stale-frame.py:

(main):

May 9, 2020:

8:44 PM Changeset in webkit [261454] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Attempt #2 to fix internal iOS build

  • UIProcess/ios/WKMouseGestureRecognizer.mm:
  • Use ALLOW_DEPRECATED_IMPLEMENTATIONS_{BEGIN,END}.
8:36 PM Changeset in webkit [261453] by ddkilzer@apple.com
  • 2 edits in trunk

Remove duplicate ChangeLog entries committed by accident.

8:08 PM Changeset in webkit [261452] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

Attemp to fix internal iOS build

  • Platform/spi/ios/UIKitSPI.h:
  • Define @class UIHoverEvent using header if available, else fall back to local class definition.
  • Define methods separately from class definition.
  • UIProcess/ios/WKMouseGestureRecognizer.mm:

(-[WKMouseGestureRecognizer setView:]):

  • Use new method if it is available.
8:08 PM Changeset in webkit [261451] by ddkilzer@apple.com
  • 2 edits in trunk

XML external entity resources should only be loaded from XML MIME types
<https://webkit.org/b/211488>
<rdar://problem/62869515>

Reviewed by Darin Adler.

Source/WebCore:

Tests: dom/xhtml/level3/core/entitygetinputencoding03.xhtml

dom/xhtml/level3/core/entitygetinputencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlencoding02.xhtml
dom/xhtml/level3/core/entitygetxmlencoding03.xhtml
dom/xhtml/level3/core/entitygetxmlencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlversion03.xhtml
dom/xhtml/level3/core/entitygetxmlversion04.xhtml
dom/xhtml/level3/core/nodegetbaseuri16.xhtml
dom/xhtml/level3/core/nodegetbaseuri19.xhtml
dom/xhtml/level3/core/nodegetbaseuri20.xhtml
fast/parser/external-entities-in-xslt.xml
fast/xsl/dtd-in-source-document.xml
fast/xsl/xslt-second-level-import.xml
http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml
http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml

  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::href const):

  • Add comment about keeping code in sync with openFunc() in XMLDocumentParserLibxml2.cpp.
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseMIMEType const):

  • Add comment about keeping code in sync with externalEntityMimeTypeAllowed() in XMLDocumentParserLibxml2.cpp.
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::externalEntityMimeTypeAllowed):

  • Rename from externalEntityMimeTypeAllowedByNosniff().
  • Change to only allow XML MIME types regardless of nosniff option.
  • Add fallback path to determine MIME type for file:/// URLs to make layout tests work properly. Logic taken from XMLHttpRequest::responseMIMEType(). Not sure if there was a good place to share it.

(WebCore::openFunc):

  • Fix relative URLs by providing the document's URL as a base. Also provide an encoding if needed. Logic taken from HTMLBaseElement::href(). (Not sure if there was a good place to share it.) This was required to fix loading of external entity resources in the dom/xhtml/level3/core tests, which hadn't been loading these resources for a while. Ultimately this didn't matter--except for new error messages being printed in test results--because the tests fail due to missing DOM features for XHTML documents).
  • Change the fix for Bug 21963 into an empty URL check since setting FetchOptions.mode to Mode::SameOrigin prevents a redirect from loading a resource outside the document's origin. The previous check worked, but the relaxed check in externalEntityMimeTypeAllowed() caused the XML MIME type warning to be output on redirects to non-same-origin URLs. I didn't see a way to check for a cross-origin loading error.
  • Add a console message for a cross-origin load failing.
  • Update for function rename.
  • Remove double negative from console message for an invalid MIME type.

(WebCore::externalEntityMimeTypeAllowedByNosniff):

  • Rename to externalEntityMimeTypeAllowed().

LayoutTests:

To fix these layout tests, the following changes were made:

  • Rename *.ent files to *.ent.xml so that an XML MIME type would be given to the resources when loading from a file:/// URL.
  • Similarly, rename *.dtd files to *.dtd.xml.
  • Update tests to refer to new entity/dtd file names.
  • There are more *.dtd and *.ent files that weren't renamed. I will fix those in a follow-up patch. They weren't needed to fix any tests, so may be unused.
  • dom/xhtml/level3/core/entitygetinputencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetinputencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding02.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion04.xhtml:
  • dom/xhtml/level3/core/resources/external_foo.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foo.ent.xml.
  • dom/xhtml/level3/core/resources/external_foobr.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foobr.ent.xml.
  • dom/xhtml/level3/core/resources/external_widget.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_widget.ent.xml.
  • dom/xhtml/level3/core/nodegetbaseuri16.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri19.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri20.xhtml:
  • fast/parser/external-entities.xml:
  • fast/parser/resources/external-entities.dtd.xml: Rename from LayoutTests/fast/parser/resources/external-entities.dtd.
  • fast/parser/resources/external-entities.xsl:
  • fast/xsl/dtd-in-source-document.xml:
  • fast/xsl/resources/dtd-in-source-document.dtd.xml: Rename from LayoutTests/fast/xsl/resources/dtd-in-source-document.dtd.
  • fast/xsl/resources/xslt-second-level-import.xsl:
  • fast/xsl/resources/xslt-second-level-import.xsl.dtd.xml: Rename from LayoutTests/fast/xsl/resources/xslt-second-level-import.xsl.dtd.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt:
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml:
  • Add test cases without "X-Content-Type-Options: nosniff" header.
  • http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
  • Add newly expected console error messages about cross-origin resource load failures.
8:05 PM Changeset in webkit [261450] by Wenson Hsieh
  • 5 edits in trunk

[macOS] Search field on mayoclinic.org/forms/us-resident-appointment clips the submit button
https://bugs.webkit.org/show_bug.cgi?id=211673
<rdar://problem/62572501>

Reviewed by Tim Horton.

Source/WebCore:

Allow search fields to be style-able, but only if the CSS border value is non-default.

Note that there was a previous attempt to achieve something similar in r157443 by adding search fields to the
base class implementation of RenderTheme::isControlStyled; however, this patch wasn't actually accompanied by
support for rendering native search fields with a non-default background, which meant that customizing just the
background of a search field would cause the entire search field to opt out of the native search field
appearance (a pill with rounded corners on macOS).

However, in the case where the border is customized on macOS, it is incorrect to use the default search field
appearance, since the search field cell just consists of a border; as such, there should be little compatibility
risk of a web page unexpectedly getting the fallback (non-native) appearance for a search field, due to having
custom border styles.

This also makes the behavior of search fields match that of text fields, textareas, and list boxes (multi-option
selects) on macOS, in terms of what is needed in order to bail out of native appearance rendering.

Rebaselined existing tests: fast/css/text-input-with-webkit-border-radius.html

fast/forms/search-styled.html

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::isControlStyled const): Add SearchFieldPart.

LayoutTests:

Rebaseline a couple of layout tests that contain search fields with custom CSS border styles.

  • platform/mac/fast/css/text-input-with-webkit-border-radius-expected.txt:
  • platform/mac/fast/forms/search-styled-expected.txt:
6:21 PM Changeset in webkit [261449] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r261389.
https://bugs.webkit.org/show_bug.cgi?id=211678

Introduced page loading regression. (Requested by perarne on
#webkit).

Reverted changeset:

"[iOS] Update message filtering rules in the WebContent
process' sandbox"
https://bugs.webkit.org/show_bug.cgi?id=211188
https://trac.webkit.org/changeset/261389

5:48 PM Changeset in webkit [261448] by Darin Adler
  • 2 edits in trunk/Source/WTF

Delete some dead code in WorkQueueCocoa.cpp
https://bugs.webkit.org/show_bug.cgi?id=211676

Reviewed by Chris Dumez.

  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::targetQueueForQOSClass): Deleted.

5:05 PM Changeset in webkit [261447] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r258493): CRASH running fast/mediastream/RTCPeerConnection tests
https://bugs.webkit.org/show_bug.cgi?id=211666
<rdar://problem/63055644>

Reviewed by Eric Carlson.

MockMediaStreamTrack advertises that it's a webrtc::VideoTrackInterface, but doesn't inherit from
that interface, leading to a crash when its pointer is cast to webrtc::VideoTrackInterface and a
virtual method called on the resulting pointer. Since it's only used in one place, and since there's
an existing mock webrtc::VideoTrackInterface object in that same file, remove MockMediaStreamTrack
and replace the one place it's used with MockLibWebRTCVideoTrack.

  • testing/MockLibWebRTCPeerConnection.h:

(WebCore::MockMediaStreamTrack::state const): Deleted.

5:02 PM Changeset in webkit [261446] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ macOS ] REGRESSION (r259139): webgl/2.0.0/conformance2/rendering/framebuffer-completeness-unaffected.html is failing
https://bugs.webkit.org/show_bug.cgi?id=209740

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-09
Reviewed by Darin Adler.

Reenable framebuffer-completeness-unaffected.html, which is now
passing after several other bug fixes.

  • platform/mac/TestExpectations:
5:02 PM Changeset in webkit [261445] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ Mojave wk1 Release ] fast/canvas/webgl/texImage2D-mse-flipY-true.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=209837

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-09
Reviewed by Darin Adler.

Remove flaky timeout suppression for
texImage2D-mse-flipY-true.html, which has been passing reliably
for over a month.

  • platform/mac-wk1/TestExpectations:
4:35 PM Changeset in webkit [261444] by don.olmstead@sony.com
  • 7 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in MallocBench
https://bugs.webkit.org/show_bug.cgi?id=211665

Reviewed by Yusuke Suzuki.

.:

Add the PerformanceTest subdirectory for all ports when in DEVELOPER_MODE.

  • CMakeLists.txt:

PerformanceTests:

Cleanup MallocBench definitions using WEBKIT_EXECUTABLE. Notify developers
that MallocBench is unavailable only if bmalloc is being used but the platform
does not have the functionality required.

  • CMakeLists.txt:
  • MallocBench/MallocBench/CMakeLists.txt:

Source/bmalloc:

Only build mbmalloc if its possible to run MallocBench.

  • CMakeLists.txt:
4:20 PM Changeset in webkit [261443] by ddkilzer@apple.com
  • 22 edits
    6 moves in trunk

XML external entity resources should only be loaded from XML MIME types
<https://webkit.org/b/211488>
<rdar://problem/62869515>

Reviewed by Darin Adler.

Source/WebCore:

Tests: dom/xhtml/level3/core/entitygetinputencoding03.xhtml

dom/xhtml/level3/core/entitygetinputencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlencoding02.xhtml
dom/xhtml/level3/core/entitygetxmlencoding03.xhtml
dom/xhtml/level3/core/entitygetxmlencoding04.xhtml
dom/xhtml/level3/core/entitygetxmlversion03.xhtml
dom/xhtml/level3/core/entitygetxmlversion04.xhtml
dom/xhtml/level3/core/nodegetbaseuri16.xhtml
dom/xhtml/level3/core/nodegetbaseuri19.xhtml
dom/xhtml/level3/core/nodegetbaseuri20.xhtml
fast/parser/external-entities-in-xslt.xml
fast/xsl/dtd-in-source-document.xml
fast/xsl/xslt-second-level-import.xml
http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml
http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml

  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::href const):

  • Add comment about keeping code in sync with openFunc() in XMLDocumentParserLibxml2.cpp.
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseMIMEType const):

  • Add comment about keeping code in sync with externalEntityMimeTypeAllowed() in XMLDocumentParserLibxml2.cpp.
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::externalEntityMimeTypeAllowed):

  • Rename from externalEntityMimeTypeAllowedByNosniff().
  • Change to only allow XML MIME types regardless of nosniff option.
  • Add fallback path to determine MIME type for file:/// URLs to make layout tests work properly. Logic taken from XMLHttpRequest::responseMIMEType(). Not sure if there was a good place to share it.

(WebCore::openFunc):

  • Fix relative URLs by providing the document's URL as a base. Also provide an encoding if needed. Logic taken from HTMLBaseElement::href(). (Not sure if there was a good place to share it.) This was required to fix loading of external entity resources in the dom/xhtml/level3/core tests, which hadn't been loading these resources for a while. Ultimately this didn't matter--except for new error messages being printed in test results--because the tests fail due to missing DOM features for XHTML documents).
  • Change the fix for Bug 21963 into an empty URL check since setting FetchOptions.mode to Mode::SameOrigin prevents a redirect from loading a resource outside the document's origin. The previous check worked, but the relaxed check in externalEntityMimeTypeAllowed() caused the XML MIME type warning to be output on redirects to non-same-origin URLs. I didn't see a way to check for a cross-origin loading error.
  • Add a console message for a cross-origin load failing.
  • Update for function rename.
  • Remove double negative from console message for an invalid MIME type.

(WebCore::externalEntityMimeTypeAllowedByNosniff):

  • Rename to externalEntityMimeTypeAllowed().

LayoutTests:

To fix these layout tests, the following changes were made:

  • Rename *.ent files to *.ent.xml so that an XML MIME type would be given to the resources when loading from a file:/// URL.
  • Similarly, rename *.dtd files to *.dtd.xml.
  • Update tests to refer to new entity/dtd file names.
  • There are more *.dtd and *.ent files that weren't renamed. I will fix those in a follow-up patch. They weren't needed to fix any tests, so may be unused.
  • dom/xhtml/level3/core/entitygetinputencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetinputencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding02.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlencoding04.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion03.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion04.xhtml:
  • dom/xhtml/level3/core/resources/external_foo.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foo.ent.xml.
  • dom/xhtml/level3/core/resources/external_foobr.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_foobr.ent.xml.
  • dom/xhtml/level3/core/resources/external_widget.ent.xml: Rename from LayoutTests/dom/xhtml/level3/core/external_widget.ent.xml.
  • dom/xhtml/level3/core/nodegetbaseuri16.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri19.xhtml:
  • dom/xhtml/level3/core/nodegetbaseuri20.xhtml:
  • fast/parser/external-entities.xml:
  • fast/parser/resources/external-entities.dtd.xml: Rename from LayoutTests/fast/parser/resources/external-entities.dtd.
  • fast/parser/resources/external-entities.xsl:
  • fast/xsl/dtd-in-source-document.xml:
  • fast/xsl/resources/dtd-in-source-document.dtd.xml: Rename from LayoutTests/fast/xsl/resources/dtd-in-source-document.dtd.
  • fast/xsl/resources/xslt-second-level-import.xsl:
  • fast/xsl/resources/xslt-second-level-import.xsl.dtd.xml: Rename from LayoutTests/fast/xsl/resources/xslt-second-level-import.xsl.dtd.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt:
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml:
  • Add test cases without "X-Content-Type-Options: nosniff" header.
  • http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt:
  • Add newly expected console error messages about cross-origin resource load failures.
4:10 PM Changeset in webkit [261442] by ddkilzer@apple.com
  • 10 edits
    1 copy
    2 moves in trunk/Source

Adapt LocalCurrentGraphicsContext for iOS
<https://webkit.org/b/211660>

Reviewed by Darin Adler.

Source/WebCore:

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Update build files for:
    • Rename of LocalCurrentGraphicsContext.mm to LocalCurrentGraphicsContextMac.mm.
    • Move of LocalCurrentGraphicsContext.h from platform/mac to platform/cocoa.
    • Addition of LocalCurrentGraphicsContextIOS.mm.
  • platform/cocoa/LocalCurrentGraphicsContext.h: Renamed from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.h.
  • Make this work for iOS by using PLATFORM(COCOA) for the outer guard and USE(APPKIT) for the Mac-specific bits.
  • Use RetainPtr<> for NSGraphicsContext to clean up code in LocalCurrentGraphicsContextMac.mm.

(WebCore::LocalCurrentGraphicsContext::cgContext):

  • Inline from LocalCurrentGraphicsContextMac.mm.
  • platform/ios/LocalCurrentGraphicsContextIOS.mm: Copied from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm.

(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):

  • Implement based on LocalCurrentGraphicsContextMac.mm. Use UIGraphics{GetCurrent,Pop,Push}Context() functions added to UIKitSoftLink.h.
  • platform/mac/LocalCurrentGraphicsContextMac.mm: Renamed from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm.

(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):

  • Use m_savedGraphicsContext instead of graphicsContext in the body of the constructor.
  • Remove set-to-nil/retain of m_savedNSGraphicsContext since that is handled by RetainPtr<> now.

(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):

  • Remove release of m_savedNSGraphicsContext since that is handled by RetainPtr<> now.

(WebCore::LocalCurrentGraphicsContext::cgContext): Delete.

  • Inline into header to share implementation with iOS.

Source/WebCore/PAL:

  • pal/ios/UIKitSoftLink.h:
  • pal/ios/UIKitSoftLink.mm:
  • Add soft linking of UIGraphics{GetCurrent,Pop,Push}Context() functions.

Source/WebKit:

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::convertPlatformImageToBitmap):

  • Use LocalCurrentGraphicsContext for both iOS and Mac code paths.
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • Switch from PLATFORM(MAC) and PLATFORM(IOS_FAMIY) to USE(APPKIT) to separate platform code.

(WebKit::convertDragImageToBitmap):
(WebKit::convertImageToBitmap): Delete.
(WebKit::convertCGImageToBitmap): Delete.

  • Combine Mac-specific convertImageToBitmap() and iOS-specific convertCGImageToBitmap() into a single method using DragImage type and special-casing one line of code.

(WebKit::WebDragClient::startDrag):
(WebKit::WebDragClient::didConcludeEditDrag):

  • Combine iOS and Mac methods into a singe method.
3:40 PM Changeset in webkit [261441] by Ross Kirsling
  • 11 edits in trunk/Source/JavaScriptCore

Fix build errors and warnings for non-unified JSCOnly
https://bugs.webkit.org/show_bug.cgi?id=211655

Reviewed by Darin Adler and Yusuke Suzuki.

  • bytecode/BytecodeDumper.cpp:

(JSC::isConstantRegisterIndex): Deleted.
Remove unused function.

  • llint/LLIntEntrypoint.cpp:
  • llint/LLIntThunks.cpp:
  • llint/LLIntThunks.h:
  • runtime/AggregateErrorConstructor.cpp:
  • runtime/AggregateErrorPrototype.cpp:
  • wasm/js/WebAssemblyFunction.cpp:

Fix includes.

  • tools/JSDollarVM.cpp:

Deal with "unused constant" warnings for needsDestruction.

  • wasm/WasmLLIntPlan.cpp:
  • wasm/WasmSignature.cpp:

Remove unused constants.

3:29 PM Changeset in webkit [261440] by Darin Adler
  • 2 edits in trunk/Source/WTF

Add iterator checking to ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=211669

Reviewed by Anders Carlsson.

HashSet and HashMap have iterator checking in debug builds.
Add similar checking to ListHashSet, controlled by the same
macro, CHECK_HASHTABLE_ITERATORS. Use WeakPtr to make the
implementation simple.

  • wtf/ListHashSet.h: Make ListHashSet and ListHashSetNode derive

from CanMakeWeakPtr. Add m_weakSet and m_weakPosition members to
ListHashSetConstIterator, and assert their values at the appropriate
times so we will get a breakpoint or crash.

1:15 PM Changeset in webkit [261439] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Fix null-dereference in DocumentTimelinesController::updateAnimationsAndSendEvents
https://bugs.webkit.org/show_bug.cgi?id=211667

Reviewed by Antoine Quint.

  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): Add null
check before removing animationsToRemove, which may already have been removed
since any arbitrary change could occur while animations are firing.

9:07 AM Changeset in webkit [261438] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Add missing null-check of page in ResourceLoader::loadDataURL
https://bugs.webkit.org/show_bug.cgi?id=211589
rdar://57213601

Reviewed by Anders Carlsson.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL): Add null check before using page.

9:04 AM Changeset in webkit [261437] by Darin Adler
  • 15 edits in trunk

Streamline MarkupAccumulator to improve efficiency a bit
https://bugs.webkit.org/show_bug.cgi?id=211656

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

  • b3/air/AirFixPartialRegisterStalls.h: Fix spelling of "explicitly".

Source/WebCore:

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendCharactersReplacingEntities): Corrected early
exit so it returns any time the length is 0. For some reason the code before
wouldn't do the early return when offset is non-zero, which is unnecessary.
(WebCore::MarkupAccumulator::appendString): Deleted.
(WebCore::MarkupAccumulator::appendStringView): Deleted.
(WebCore::MarkupAccumulator::appendEndTag): Use variadic append to cut down
on memory allocations.
(WebCore::MarkupAccumulator::totalLength): Deleted.
(WebCore::MarkupAccumulator::concatenateMarkup): Deleted.
(WebCore::MarkupAccumulator::takeMarkup): Added.
(WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): Use variadic
append to cut down on memory allocations. Also use char instead of UChar so
the string building code doesn't have to do an 8/16 bit check.
(WebCore::shouldAddNamespaceElement): Prepend a literal, don't bother to
make a String just to append to another String. Also made this a
non-member function.
(WebCore::shouldAddNamespaceAttribute): Made this a non-member function.
(WebCore::MarkupAccumulator::appendNamespace): Fix hash table usage
to use add instead of get followed by set to avoid double hashing.
Use variadic append to cut down on memory allocation.
(WebCore::MarkupAccumulator::appendText): Tweaked style to make this a
one-line function.
(WebCore::appendComment): Deleted.
(WebCore::appendXMLDeclaration): Made this a non-member function.
Use variadic append to cut down on memory allocation.
(WebCore::appendDocumentType): Made this a non-member function.
Use variadic append to cut down on memory allocation.
(WebCore::MarkupAccumulator::appendCDATASection): Deleted.
(WebCore::MarkupAccumulator::appendNonElementNode): Moved the bodies of
appendComment, appendProcessingInstruction, and appendCDATASection in
here since they can all be one-line variadic append calls.

  • editing/MarkupAccumulator.h:

(WebCore::MarkupAccumulator::length const): Changed the return type
of length to be unsigned since that's what StringBuilder returns.
Made isAllASCII call StringBuilder::isAllASCII. Replaced appendString
and appendStringView with variadic append. Removed many functions
that no longer need to be member functions. Made appendAttributeValue
a static member function. Made appendNamespace private. Made
m_serializationSyntax const.

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Use append
instead of appenString.
(WebCore::StyledMarkupAccumulator::isAllASCII const): Added. Before
the code would only check the StringBuilder, but we also need to
check m_reversedPrecedingMarkup.
(WebCore::StyledMarkupAccumulator::takeResults): Use CheckedUint32
since StringBuilder's reserveCapacity function takes unsigned, not
size_t. The old code, using totalLength, would just pass a size_t
and let it get chopped off, which didn't do any harm, but it seems
strange to compute a 64-bit value just to chop off the lower 32
bits. An alternative is to compute the 32-bit value and just let
it overflow. Use a modern for loop by defining a ReverseView
template rather than writing a confusing backwards loop. Use the
new takeMarkup instead of concatenateMarkup.
(WebCore::StyledMarkupAccumulator::appendText): Tweak coding
style a little bit.
(WebCore::StyledMarkupAccumulator::appendStartTag): Ditto.
(WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList):
Use variadic append to cut down on memory allocations.
(WebCore::propertyMissingOrEqualToNone): Tweak coding style a bit.
(WebCore::serializePreservingVisualAppearanceInternal): Use
append instead of appendString.
(WebCore::shouldPreserveMSOLists): Take a StringView instead of a
String to eliminate unnecessary memory allocation in call to substring.
(WebCore::sanitizedMarkupForFragmentInDocument): Use makeString
instead of StringBuilder to cut down on memory allocation.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::resetDefaultButton): Fix spelling error
in the word "explicitly".

  • mathml/MathMLOperatorDictionary.cpp:

(WebCore::MathMLOperatorDictionary::search): Ditto.

  • page/PageSerializer.cpp:

(WebCore::PageSerializer::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
Use variadic append instead of appendString to cut down on
memory allocations.

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paint): Fix spelling error in the word
"explicitly".

Source/WTF:

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::isAllASCII const): Added.

  • wtf/text/StringBuilder.h: Added isAllASCII.

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST): Fix spellling error in the word "explicitly".

9:02 AM Changeset in webkit [261436] by david_quesada@apple.com
  • 5 edits in trunk/Source

Remove HAVE_UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI
https://bugs.webkit.org/show_bug.cgi?id=211662
rdar://problem/63048713

Reviewed by Darin Adler.

Source/WebKit:

Remove this platform conditional and unconditionally use -[UIScrolView _flashScrollIndicatorsForAxes:
persistingPreviousFlashes:]. All supported platforms with UIScrollView have this SPI, and the conditional
was excluding Mac Catalyst, making WKKeyboardScrollViewAnimator send a message to its scroll view that
is no longer implemented.

  • Platform/spi/ios/UIKitSPI.h:

Remove the declaration of the now unused -_flashScrollIndicatorsPersistingPreviousFlashes:.

  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(axesForDelta):
(-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):

Source/WTF:

  • wtf/PlatformHave.h:
4:10 AM Changeset in webkit [261435] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=211664

Gardening of flaky failures and failures reintroduced after latest
patches reverted.

  • platform/gtk/TestExpectations:
1:07 AM Changeset in webkit [261434] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in LegacyWebArchive::createPropertyListRepresentation when copying selected range that contains surrogate characters
https://bugs.webkit.org/show_bug.cgi?id=211658
<rdar://problem/62844424>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Added check for null LegacyWebArchive in LegacyWebArchive::createFromSelection. Return nullptr when creation fails.

Test: webarchive/copy-surrogate-char-crash.html

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createFromSelection):

LayoutTests:

Added a regression test for the crash.

  • webarchive/copy-surrogate-char-crash-expected.txt: Added.
  • webarchive/copy-surrogate-char-crash.html: Added.
12:00 AM Changeset in webkit [261433] by commit-queue@webkit.org
  • 5 edits in trunk

Fix wpt shadow-dom/slots-fallback-in-document.html
https://bugs.webkit.org/show_bug.cgi?id=211640

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-05-09
Reviewed by Ryosuke Niwa.

By specs, HTMLSlotElement.assignedNodes() should not count children of
a slot in a document tree for flattened assigned nodes.

https://html.spec.whatwg.org/multipage/scripting.html#dom-slot-assignednodes
https://dom.spec.whatwg.org/#find-flattened-slotables

As sideeffect, this patch also fix wpt
shadow-dom/slots-outside-shadow-dom-expected.html

LayoutTests/imported/w3c:

  • web-platform-tests/shadow-dom/slots-fallback-in-document-expected.txt:
  • web-platform-tests/shadow-dom/slots-outside-shadow-dom-expected.txt:

Source/WebCore:

Test: web-platform-tests/shadow-dom/slots-fallback-in-document.html

web-platform-tests/shadow-dom/slots-outside-shadow-dom.html

  • html/HTMLSlotElement.cpp:

(WebCore::flattenAssignedNodes):

May 8, 2020:

10:32 PM Changeset in webkit [261432] by Diego Pino Garcia
  • 2 edits
    1 delete in trunk/LayoutTests

[GTK] Gardening, update expectations after revert of r261341 and r261392
https://bugs.webkit.org/show_bug.cgi?id=211661

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes-expected.txt: Removed.
9:17 PM Changeset in webkit [261431] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

Fix build error on PlatStation port after r261132
https://bugs.webkit.org/show_bug.cgi?id=211659

Unreviewed build fix after r261132.

  • page/scrolling/ScrollingTreeGestureState.cpp:
6:43 PM Changeset in webkit [261430] by Alexey Shvayka
  • 4 edits in trunk

Array.prototype.concat fast path checks should not be observable
https://bugs.webkit.org/show_bug.cgi?id=211643

Reviewed by Ross Kirsling.

JSTests:

While test262 has complete coverage for @@isConcatSpreadable getters in prototype
chain, Proxy cases are covered by stress/array-concat-fast-spread-proxy.js and
stress/array-concat-spread-proxy.js.

  • test262/expectations.yaml: Mark 2 test cases as passing.

Source/JavaScriptCore:

This change utilizes @tryGetByIdWithWellKnownSymbol intrinsic to make
off the spec Symbol.isConcatSpreadable lookups unobservable to userland code,
aligning JSC with V8 and SpiderMonkey.

Since @tryGetById uses PropertySlot::getPureResult(), which returns null
for Proxy Get? traps and JS getters (covered by stress/try-get-by-id.js),
we can safely compare its result undefined. Also, this allows us to remove
@isProxyObject check as Proxy argument is never a fast path anyway.

This patch is neutral on microbenchmarks/concat-append-one.js.

  • builtins/ArrayPrototype.js:

(concat):

6:21 PM Changeset in webkit [261429] by ddkilzer@apple.com
  • 7 edits
    35 deletes in trunk

Remove empty directories from from svn.webkit.org repository
<https://webkit.org/b/211644>

Reviewed by Darin Adler.

6:13 PM Changeset in webkit [261428] by basuke.suzuki@sony.com
  • 14 edits
    1 move in trunk

[WTF] Share Linux's MemoryPressureHandler among other Unix ports
https://bugs.webkit.org/show_bug.cgi?id=208955

Reviewed by Yusuke Suzuki.

Source/bmalloc:

Added FreeBSD implementation of memoryFootprint().

  • bmalloc/AvailableMemory.cpp:

(bmalloc::memoryStatus):

  • bmalloc/AvailableMemory.h:

(bmalloc::isUnderMemoryPressure):

  • bmalloc/bmalloc.h:

Source/WTF:

Renamed MemoryPressureHandlerLinux to MemoryPressureHandlerUnix and added FreeBSD implementation
of memory status functions. Change PlayStation port to use it from generic implementation.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::MemoryPressureHandler):

  • wtf/MemoryPressureHandler.h:
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformPlayStation.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/generic/MemoryFootprintGeneric.cpp:

(WTF::memoryFootprint):

  • wtf/unix/MemoryPressureHandlerUnix.cpp: Renamed from Source\WTF\wtf\linux\MemoryPressureHandlerLinux.cpp.

(WTF::processMemoryUsage):

Tools:

Fix unneeded library dependency.

  • TestWebKitAPI/CMakeLists.txt:
5:02 PM Changeset in webkit [261427] by Simon Fraser
  • 10 edits
    2 adds in trunk

Async overflow scroll: sometimes a <select> becomes non-scrollable
https://bugs.webkit.org/show_bug.cgi?id=211433
<rdar://problem/62338474>

Reviewed by Dean Jackson.

Source/WebCore:

Scrollable <select>s (RenderListBox) contribute to the non-fast scrollable region, so
wheel events inside them are propagated to the main thread. If the select is scrolled
to the end, the event will propagate to the enclosing scroller, then then FrameView::wheelEvent()
may send it back to the scrolling thread. If the scrolling thread is processing such an event
after the main thread, it should not perform any latching on the main thread.

Test: scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::handleWheelEvent):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeLatchingController.cpp:

(WebCore::ScrollingTreeLatchingController::receivedWheelEvent):
(WebCore::ScrollingTreeLatchingController::latchedNodeForEvent const):
(WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):
(WebCore::ScrollingTreeLatchingController::clearLatchedNode):

  • page/scrolling/ScrollingTreeLatchingController.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::handleWheelEvent):

  • platform/PlatformWheelEvent.cpp:

(WebCore::operator<<):

LayoutTests:

  • scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe-expected.txt: Added.
  • scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html: Added.
5:02 PM Changeset in webkit [261426] by Simon Fraser
  • 1 edit
    4 adds in trunk/LayoutTests

Overflow scrollers in iframes don't get mouseMovedInContentArea()
https://bugs.webkit.org/show_bug.cgi?id=211347
<rdar://problem/62784560>

Reviewed by Tim Horton.

Land some tests that were missing from r261382.

  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt: Added.
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html: Added.
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt: Added.
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html: Added.
5:00 PM Changeset in webkit [261425] by Ryan Haddad
  • 1 edit
    2 adds in trunk/LayoutTests

[LFC][TFC] The fixed logical width should be used as the max width for a cell
https://bugs.webkit.org/show_bug.cgi?id=211610

Unreviewed test gardening.

Add a baseline for Windows.

  • platform/win/fast/layoutformattingcontext/table-simple-with-fixed-widht-and-inline-content-expected.txt: Added.
4:20 PM Changeset in webkit [261424] by Darin Adler
  • 8 edits in trunk/Source

Remove now-unneeded HAVE(AVFOUNDATION_LOADER_DELEGATE)
https://bugs.webkit.org/show_bug.cgi?id=211646

Reviewed by Eric Carlson.

Source/WebCore:

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::requestResource): Remove check of
HAVE(AVFOUNDATION_LOADER_DELEGATE) in a place where it also checks PLATFORM(MAC).

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:

Remove HAVE(AVFOUNDATION_LOADER_DELEGATE) in Cocoa-only code.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.

(WebCore::globalLoaderDelegateQueue): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Ditto.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: Ditto.
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: Ditto.

Source/WTF:

  • wtf/PlatformHave.h: Don't set HAVE_AVFOUNDATION_LOADER_DELEGATE.
4:11 PM Changeset in webkit [261423] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r210945): No attachment when sharing to mail
https://bugs.webkit.org/show_bug.cgi?id=211651
<rdar://problem/63040170>

Reviewed by Tim Horton.

When failing to determine foreground state, the code before r210945 was assuming
'foreground', while the code in r210945 assume 'background'. This causes things
to not render properly when we fail to determine the foreground state.

This patch merely restores pre-r210945 behavior. I will investigate why we are
unable to determinate the host application PID for the MailCompositionService.

  • UIProcess/ApplicationStateTracker.mm:

(WebKit::isApplicationForeground):

4:11 PM Changeset in webkit [261422] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk

TextureMapper should skip clipping a content layer if it's not needed
https://bugs.webkit.org/show_bug.cgi?id=210787

Patch by Tomoki Imai <Tomoki Imai> on 2020-05-08
Reviewed by Don Olmstead.

Source/WebCore:

This patch follows up r260174.
We don't need to clip a content layer if the clipping rect contains the content rect.
This patch doesn't change the behavior but saves stencil indices.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelf):

LayoutTests:

This patch follows up r260174 by updating the test expectation.

  • platform/gtk/compositing/video/video-object-fit-expected.txt: Added.
3:56 PM Changeset in webkit [261421] by Jonathan Bedard
  • 5 edits in trunk/Tools

webkitpy: 'iPhone SE' should match 'iPhone SE 1st generation'
https://bugs.webkit.org/show_bug.cgi?id=211642
<rdar://problems/62986242>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/xcode/device_type.py:

(DeviceType):
(DeviceType.standardized_hardware_type): Strip '1st generation' from models.
(DeviceType.eq): Use standardized hardware type.
(DeviceType.contains): Ditto.
(DeviceType.hash): Ditto.

  • Scripts/webkitpy/xcode/device_type_unittest.py:

(DeviceTypeTest):
(DeviceTypeTest.test_generation_matching):

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._get_device_identifier_for_type): Handle case where the requests model does not
end with '(1st generation)', but the simctl model does.

  • Scripts/webkitpy/xcode/simulated_device_unittest.py:
3:09 PM Changeset in webkit [261420] by Alan Coon
  • 1 copy in tags/Safari-610.1.12

Tag Safari-610.1.12.

3:04 PM Changeset in webkit [261419] by Alan Coon
  • 7 edits in branches/safari-610.1.12-branch

Revert r260642. rdar://problem/63037576

2:41 PM Changeset in webkit [261418] by Ryan Haddad
  • 2 edits in trunk/Tools

TestWebKitAPI.WebKit.AllowsContentJavaScript fails on iPad simulator
https://bugs.webkit.org/show_bug.cgi?id=207874

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:

Disable the test for iOS.

2:21 PM Changeset in webkit [261417] by Darin Adler
  • 1 edit
    1 delete in trunk/PerformanceTests

Remove no-longer-used PerformanceTests/StitchMarker
https://bugs.webkit.org/show_bug.cgi?id=211639

Reviewed by Ryosuke Niwa.

Having this test around can be confusing since it contains old versions
of many WebKit source files, which will show up when searching the source
tree. And since we're not using it, we don't need to keep a copy of it
in the tip of tree in the repository.

  • StitchMarker: Removed.
2:16 PM Changeset in webkit [261416] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

[iOS] Text-style fonts aren't locale-specific
https://bugs.webkit.org/show_bug.cgi?id=211438
<rdar://problem/51654163>

Reviewed by Sam Weinig.

Source/WebCore:

Simply hook up the locale to the Core Text function.

It turns out that this patch actually has no behavior change,
because this locale is only used for font fallback, but WebKit
does its own font fallback and we already pass the locale into
CTFontCopyDefaultCascadeListForLanguages(). However, for
symmetry with CTFontCreateUIFontWithLanguage() it's a good idea
to just supply it anyway. Just in case.

Test: platform/ios/fast/text/lang-text-style.html

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::createTextStyleFont):

LayoutTests:

This test actually already passes. But it's a good idea to make
sure that it continues to pass in the future.

  • platform/ios/fast/text/lang-text-style-expected-mismatch.html: Added.
  • platform/ios/fast/text/lang-text-style.html: Added.
2:14 PM Changeset in webkit [261415] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style false positive for [readability/naming/protected] with method declaration
<https://webkit.org/b/210682>

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_identifier_name_in_declaration):

  • Don't check for invalid protector name if the capitalized protected name is the same as the original protected name, indicating it's a type name.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(WebKitStyleTest.test_names):

  • Add test cases.
1:57 PM Changeset in webkit [261414] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix build on platforms without network framework.
https://bugs.webkit.org/show_bug.cgi?id=211603

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

Add HAVE(NETWORK_FRAMEWORK) around test that uses network framework.

1:48 PM Changeset in webkit [261413] by commit-queue@webkit.org
  • 106 edits in trunk

[WebGL2] Complete new texture upload entry points in WebGL2RenderingContext
https://bugs.webkit.org/show_bug.cgi?id=208875

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-08
Reviewed by Dean Jackson.

Source/WebCore:

Implement the remaining texture upload entry points - mainly for
3D textures - in WebGL2RenderingContext. Add support for uploading
from the pixel unpack buffer.

Refactor the WebGL 2.0 binding points into WebGL2RenderingContext,
where they had previously been in the base class. Refactor
validation code to override the base class where necessary.
Refactor getParameter into WebGLRenderingContextBase and override
it in WebGL2RenderingContext, eliminating duplicate code and
fixing bugs.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::~WebGL2RenderingContext):
(WebCore::WebGL2RenderingContext::getInt64Parameter):
(WebCore::WebGL2RenderingContext::validateBufferTarget):
(WebCore::WebGL2RenderingContext::validateBufferTargetCompatibility):
(WebCore::WebGL2RenderingContext::validateBufferDataTarget):
(WebCore::WebGL2RenderingContext::validateAndCacheBufferBinding):
(WebCore::WebGL2RenderingContext::validateTexImageBinding):
(WebCore::WebGL2RenderingContext::validateTexture3DBinding):
(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::bindFramebuffer):
(WebCore::WebGL2RenderingContext::deleteFramebuffer):
(WebCore::WebGL2RenderingContext::getTexParameter):
(WebCore::WebGL2RenderingContext::texStorage2D):
(WebCore::WebGL2RenderingContext::texStorage3D):
(WebCore::WebGL2RenderingContext::texImage2D):
(WebCore::WebGL2RenderingContext::texImage3D):
(WebCore::WebGL2RenderingContext::texSubImage2D):
(WebCore::WebGL2RenderingContext::texSubImage3D):
(WebCore::WebGL2RenderingContext::bindBufferBase):
(WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
(WebCore::WebGL2RenderingContext::validateFramebufferTarget):
(WebCore::WebGL2RenderingContext::getFramebufferBinding):
(WebCore::WebGL2RenderingContext::getReadFramebufferBinding):
(WebCore::WebGL2RenderingContext::restoreCurrentFramebuffer):
(WebCore::WebGL2RenderingContext::getParameter):
(WebCore::WebGL2RenderingContext::uncacheDeletedBuffer):
(WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Deleted.

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::setTarget):

  • html/canvas/WebGLBuffer.h:
  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer):
(WebCore::WebGLFramebuffer::attach):
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
(WebCore::WebGLFramebuffer::isBound const):

  • html/canvas/WebGLFramebuffer.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Deleted.
(WebCore::WebGLRenderingContext::getParameter): Deleted.

  • html/canvas/WebGLRenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::validateBufferTarget):
(WebCore::WebGLRenderingContextBase::validateBufferDataTarget):
(WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding):
(WebCore::WebGLRenderingContextBase::bindBuffer):
(WebCore::WebGLRenderingContextBase::bindFramebuffer):
(WebCore::WebGLRenderingContextBase::bindTexture):
(WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
(WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer):
(WebCore::WebGLRenderingContextBase::deleteFramebuffer):
(WebCore::WebGLRenderingContextBase::deleteRenderbuffer):
(WebCore::WebGLRenderingContextBase::deleteTexture):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
(WebCore::WebGLRenderingContextBase::getParameter):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):
(WebCore::WebGLRenderingContextBase::texParameter):
(WebCore::WebGLRenderingContextBase::getBoundReadFramebufferColorFormat):
(WebCore::WebGLRenderingContextBase::getBoundReadFramebufferWidth):
(WebCore::WebGLRenderingContextBase::getBoundReadFramebufferHeight):
(WebCore::WebGLRenderingContextBase::validateFramebufferTarget):
(WebCore::WebGLRenderingContextBase::getFramebufferBinding):
(WebCore::WebGLRenderingContextBase::getReadFramebufferBinding):
(WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters):
(WebCore::WebGLRenderingContextBase::validateBufferDataParameters):
(WebCore::WebGLRenderingContextBase::setFramebuffer):
(WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
(WebCore::WebGLRenderingContextBase::getInt64Parameter): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:

LayoutTests:

All of the 3D texture tests in
webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/ and
webgl/2.0.0/conformance2/textures/image_data/ now pass, and
several others progress, including some which now pass completely.
Rebaseline all of these.

Skip webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/
temporarily to reduce the size of these rebaselines, as the
failures are likely caused by non-WebGL browser bugs. Filed Bug
211484 to track re-enabling them.

  • TestExpectations:
  • platform/mac/webgl/fingerprinting-strings-expected.txt:
  • webgl/2.0.0/conformance/state/gl-enable-enum-test-expected.txt:
  • webgl/2.0.0/conformance2/buffers/buffer-copying-contents-expected.txt:
  • webgl/2.0.0/conformance2/buffers/buffer-copying-restrictions-expected.txt:
  • webgl/2.0.0/conformance2/buffers/buffer-type-restrictions-expected.txt:
  • webgl/2.0.0/conformance2/buffers/uniform-buffers-expected.txt:
  • webgl/2.0.0/conformance2/misc/expando-loss-2-expected.txt:
  • webgl/2.0.0/conformance2/misc/getextension-while-pbo-bound-stability-expected.txt:
  • webgl/2.0.0/conformance2/misc/object-deletion-behaviour-2-expected.txt:
  • webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt:
  • webgl/2.0.0/conformance2/renderbuffers/framebuffer-texture-layer-expected.txt:
  • webgl/2.0.0/conformance2/rendering/blitframebuffer-test-expected.txt:
  • webgl/2.0.0/conformance2/rendering/canvas-resizing-with-pbo-bound-expected.txt:
  • webgl/2.0.0/conformance2/rendering/out-of-bounds-index-buffers-after-copying-expected.txt:
  • webgl/2.0.0/conformance2/state/gl-get-calls-expected.txt:
  • webgl/2.0.0/conformance2/state/gl-getstring-expected.txt:
  • webgl/2.0.0/conformance2/state/gl-object-get-calls-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r16f-red-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r16f-red-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r32f-red-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r8-red-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg16f-rg-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg16f-rg-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg32f-rg-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg8-rg-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb16f-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb16f-rgb-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb32f-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb9_e5-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba16f-rgba-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba16f-rgba-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba32f-rgba-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r16f-red-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r16f-red-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r32f-red-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r8-red-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg16f-rg-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg16f-rg-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg32f-rg-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg8-rg-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb16f-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb16f-rgb-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb32f-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb9_e5-rgb-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba16f-rgba-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba16f-rgba-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba32f-rgba-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/image_data/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/copy-texture-image-luma-format-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/copy-texture-image-webgl-specific-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/gl-get-tex-parameter-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-input-validation-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-new-formats-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-storage-2d-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-storage-and-subimage-3d-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-unpack-params-expected.txt:
1:46 PM Changeset in webkit [261412] by Nikos Mouchtaris
  • 18 edits
    2 adds in trunk

Implement web-share v2 for files
https://bugs.webkit.org/show_bug.cgi?id=209265

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

Updated test expectations for new behavior.

  • ios-wk2/imported/w3c/web-platform-tests/web-share/canShare-files.https-expected.txt :
  • mac-wk2/imported/w3c/web-platform-tests/web-share/canShare-files.https-expected.txt :

Source/WebCore:

Modified existing tests for new behavior.

Added support for handling of files in share/canShare,
and implemented asynchronous reading of data from blobs on
disk into memory.

  • WebCore.xcodeproj/project.pbxproj:
  • page/Navigator.cpp:

(WebCore::Navigator::canShare):
(WebCore::Navigator::share):
(WebCore::Navigator::finishedLoad):

  • page/Navigator.h:
  • page/ReadShareDataAsync.cpp: Added.

(WebCore::ReadShareDataAsync::readInternal):
(WebCore::ReadShareDataAsync::ReadShareDataAsync):
(WebCore::ReadShareDataAsync::~ReadShareDataAsync):
(WebCore::ReadShareDataAsync::start):
(WebCore::ReadShareDataAsync::didFinishLoading):
(WebCore::ReadShareDataAsync::didReceiveData):
(WebCore::ReadShareDataAsync::didStartLoading):
(WebCore::ReadShareDataAsync::didFail):

  • page/ReadShareDataAsync.hpp: Added.
  • page/ShareData.h:

Source/WebKit:

Added support for passing file objects over IPC and
sharing of files to share sheet.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Vector<RawFile>>::encode):
(IPC::ArgumentCoder<Vector<RawFile>>::decode):
(IPC::ArgumentCoder<ShareDataWithParsedURL>::encode):
(IPC::ArgumentCoder<ShareDataWithParsedURL>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Cocoa/ShareableFileWrite.h: Added.
  • UIProcess/Cocoa/ShareableFileWrite.mm: Added.

(+[WKShareableFileWrite getSharingDirectoryPath]):
(+[WKShareableFileWrite getFileDirectoryForSharing]):
(+[WKShareableFileWrite removeFileDirectoryForSharing]):
(+[WKShareableFileWrite setQuarantineInformationForFilePath:]):
(+[WKShareableFileWrite applyQuarantineSandboxAndDownloadFlagsToFileAtPath:]):
(+[WKShareableFileWrite createFilename:]):
(+[WKShareableFileWrite writeFileToShareableURL:data:]):

  • UIProcess/Cocoa/WKShareSheet.mm:

(-[WKShareSheet presentWithParameters:inRect:completionHandler:]):
(-[WKShareSheet _didCompleteWithSuccess:]):

  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

Modified to no longer use url of image.

  • fast/web-share/share-with-files.html:
1:43 PM Changeset in webkit [261411] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Revise sandbox to stop logging some commonly-used properties
https://bugs.webkit.org/show_bug.cgi?id=211636
<rdar://problem/63014244>

Reviewed by Per Arne Vollan.

Further living on and testing has shown a handful of sysctl entries that are in regular use, and do not need
to be logged or considered for removal. This patch has no change in behavior, just reduces logging.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1:41 PM Changeset in webkit [261410] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION [ iOS ] fast/forms/validationMessage.html is flaky and timing out
https://bugs.webkit.org/show_bug.cgi?id=206630

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:27 PM Changeset in webkit [261409] by Ryan Haddad
  • 14 edits
    2 deletes in trunk

Unreviewed, reverting r261341 and r261392.

Caused multiple regression test failures

Reverted changesets:

"Poster set after playback begins should be ignored"
https://bugs.webkit.org/show_bug.cgi?id=211464
https://trac.webkit.org/changeset/261341

"REGRESSION(r261341): imported/w3c/web-platform-
tests/html/semantics/embedded-content/the-video-
element/intrinsic_sizes.htm is failing"
https://bugs.webkit.org/show_bug.cgi?id=211612
https://trac.webkit.org/changeset/261392

1:20 PM Changeset in webkit [261408] by aakash_jain@apple.com
  • 18 edits
    2 deletes in trunk/Tools

Delete old ews client side code
https://bugs.webkit.org/show_bug.cgi?id=211638

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/checkout/changelog_unittest.py:
  • Scripts/webkitpy/common/config/urls.py: Removed old ews server url.
  • Scripts/webkitpy/common/net/statusserver.py: Removed.
  • Scripts/webkitpy/common/net/statusserver_mock.py: Removed.
  • Scripts/webkitpy/tool/bot/botinfo.py:
  • Scripts/webkitpy/tool/bot/botinfo_unittest.py:
  • Scripts/webkitpy/tool/bot/flakytestreporter.py:
  • Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
  • Scripts/webkitpy/tool/bot/queueengine.py:
  • Scripts/webkitpy/tool/bot/queueengine_unittest.py:
  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:
  • Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
  • Scripts/webkitpy/tool/commands/perfalizer.py:
  • Scripts/webkitpy/tool/commands/queues.py:

(AbstractQueue._log_from_script_error_for_upload): Deleted.
(AbstractQueue._update_status_for_script_error): Deleted.
(AbstractPatchQueue._update_status): Deleted.
(AbstractPatchQueue._release_work_item): Deleted.
(AbstractPatchQueue._did_pass): Deleted.
(AbstractPatchQueue._did_fail): Deleted.

  • Scripts/webkitpy/tool/commands/queues_unittest.py:

(AbstractQueueTest._assert_run_webkit_patch):
(AbstractQueueTest.test_no_iteration_count):
(PatchProcessingQueueTest.test_upload_results_archive_for_patch):
(AbstractQueueTest._assert_log_message): Deleted.
(AbstractQueueTest.test_log_from_script_error_for_upload): Deleted.
(AbstractPatchQueueTest): Deleted.
(NeedsUpdateSequence): Deleted.
(NeedsUpdateSequence._run): Deleted.
(StyleQueueTest): Deleted.
(StyleQueueTest.test_style_queue_with_style_exception): Deleted.

  • Scripts/webkitpy/tool/commands/queuestest.py:

(QueuesTest._default_begin_work_queue_logs):
(QueuesTest._default_begin_work_queue_stderr): Deleted.

  • Scripts/webkitpy/tool/commands/sheriffbot.py:
  • Scripts/webkitpy/tool/main.py:
  • Scripts/webkitpy/tool/mocktool.py:
1:10 PM Changeset in webkit [261407] by Chris Dumez
  • 10 edits in trunk

Make WKWebViewConfiguration._alwaysRunsAtForegroundPriority an alias for _clientNavigationsRunAtForegroundPriority
https://bugs.webkit.org/show_bug.cgi?id=211632

Reviewed by Darin Adler.

Make WKWebViewConfiguration._alwaysRunsAtForegroundPriority an alias for _clientNavigationsRunAtForegroundPriority.
_alwaysRunsAtForegroundPriority is a frequent source of process assertion leaks that get blamed on WebKit. Clients
are using this in order to be able to do loads in background views so _clientNavigationsRunAtForegroundPriority
should suffice and is not leak prone since the process assertion is released after the navigation has completed.

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::alwaysRunsAtForegroundPriority const): Deleted.
(API::PageConfiguration::setAlwaysRunsAtForegroundPriority): Deleted.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]):
(-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::updateThrottleState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):

  • UIProcess/WebPageProxy.h:
1:08 PM Changeset in webkit [261406] by Darin Adler
  • 1 edit
    2 adds in trunk/LayoutTests

Add a regression test for bug 211541
https://bugs.webkit.org/show_bug.cgi?id=211635

Reviewed by Geoffrey Garen.

  • fast/box-shadow/box-shadow-huge-area-crash-expected.html: Added.
  • fast/box-shadow/box-shadow-huge-area-crash.html: Added.
1:05 PM Changeset in webkit [261405] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Revert r260390
https://bugs.webkit.org/show_bug.cgi?id=210759
<rdar://problem/62608140>

r260390 was intended to stop hitting some assertions in ~PendingFrameLoad, but it seems to have caused a regression.
Reverting it and removing the invalid assertions.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::~PendingFrameLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):

12:59 PM Changeset in webkit [261404] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests

media/video-zoom.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=211631

Reviewed by Eric Carlson.

Remove the 1.5s early timeout check here; with the additional 150ms per video element timeout elsewhere
in the test, this is short enough to cause flaky failures on busy bots.

  • media/video-zoom.html:
12:45 PM Changeset in webkit [261403] by Alan Coon
  • 2 edits in branches/safari-610.1.12-branch/Source/WebKit

Revert r260787. rdar://problem/63032130

12:39 PM Changeset in webkit [261402] by commit-queue@webkit.org
  • 4 edits in trunk

Limit HTTP referer to 4kb
https://bugs.webkit.org/show_bug.cgi?id=211603
<rdar://problem/56768823>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-08
Reviewed by Chris Dumez.

Source/WebCore:

Use the origin if it's longer, unless the origin is too long.
This matches the behavior of other browsers.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1557346

Tested by API tests.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setHTTPReferrer):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

12:11 PM Changeset in webkit [261401] by Ryan Haddad
  • 2 edits in branches/safari-609-branch/Tools

Cherry-pick r260484. rdar://problem/62140724

Bindings-test should not depend on current working directory.
https://bugs.webkit.org/show_bug.cgi?id=210831

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/bindings/main.py: (BindingsTests.main):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260484 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:36 AM Changeset in webkit [261400] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

SIGILL @ WebCore::Shape::createRasterShape -- DOS ASAN
https://bugs.webkit.org/show_bug.cgi?id=211539

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-05-08
Reviewed by Simon Fraser.

Corrected the comment.

No new test needed.

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape):

10:57 AM Changeset in webkit [261399] by commit-queue@webkit.org
  • 4 edits in trunk

Fix urlsearchparams-delete.html
https://bugs.webkit.org/show_bug.cgi?id=211456

Patch by Rob Buis <rbuis@igalia.com> on 2020-05-08
Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Update improved test expectation.

  • web-platform-tests/url/urlsearchparams-delete-expected.txt:

Source/WebCore:

Step 2 of URLSearchParams.delete algorithm [1] indicates
we should run the update steps, even if no name-value
pairs were removed.

Behavior matches Chrome and Firefox.

[1] https://url.spec.whatwg.org/#dom-urlsearchparams-delete

Test: web-platform-tests/url/urlsearchparams-delete.html

  • html/URLSearchParams.cpp:

(WebCore::URLSearchParams::remove):

10:57 AM Changeset in webkit [261398] by Wenson Hsieh
  • 12 edits
    2 adds in trunk

[iOS] caret appears in the middle of a search field when field is focused on agoda.com
https://bugs.webkit.org/show_bug.cgi?id=211591
<rdar://problem/60605873>

Reviewed by Antoine Quint.

Source/WebCore:

See WebKit/ChangeLog for more details.

Test: editing/selection/ios/caret-rect-after-animating-focused-text-field.html

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::finishNotificationSteps):

Add plumbing to call out to the WebKit client layer after an animation finishes running.

  • dom/Node.h:
  • editing/VisibleSelection.h:

WEBCORE_EXPORT a couple of methods.

  • page/ChromeClient.h:

(WebCore::ChromeClient::animationDidFinishForElement):

Source/WebKit:

The main search field on the mobile version of this website begins offscreen, with a CSS transform that moves it
to the far right; tapping the button element that (visually) has a search-field-like appearance on the front
page programmatically focuses the real offscreen search field, and animates it onscreen by changing the CSS
transform attribute to remove the x-axis translation.

On iOS, the caret rect is computed and sent to the UI process via editor state updates; however, the editor
state is computed immediately after focusing the input field. As such, the caret rect at this moment is computed
in the middle of the animation, leaving it stuck in an unpredictable location.

To fix this, add plumbing to call into the WebKit client layer when an animation has ended. On iOS, if the
selection is visible (i.e. a ranged selection, or editable caret), then check to see whether the element that
has finished animating contains either endpoint of the selection. If so, then schedule a followup editor state
update to push updated selection information to the UI process.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::animationDidFinishForElement):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Add a new client hook for when animations end.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::animationDidFinishForElement):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

Add logic to schedule a new editor state update if needed, after an animation ends that might affect either
the start or end of the selection.

(WebKit::WebPage::animationDidFinishForElement):

LayoutTests:

Add a new layout test to verify that the caret view eventually becomes visible when after a focused text field
containing the caret is animated.

  • editing/selection/ios/caret-rect-after-animating-focused-text-field-expected.txt: Added.
  • editing/selection/ios/caret-rect-after-animating-focused-text-field.html: Added.
10:56 AM Changeset in webkit [261397] by dino@apple.com
  • 2 edits in trunk/Tools

Allow run-safari to launch an iPad simulator
https://bugs.webkit.org/show_bug.cgi?id=211606
<rdar://problem/63002849>

Reviewed by Jon Lee.

Add an "--ipad-simulator" command line option to run-safari.

  • Scripts/webkitdirs.pm:

(argumentsForConfiguration):
(determineXcodeSDK): Mark the device idiom depending on the command line argument.
(printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
(findOrCreateSimulatorForIOSDevice): Create an iPad Pro simulator if requested.

10:53 AM Changeset in webkit [261396] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r260228): Linker warning about limitsNavigationsToAppBoundDomains property overriding instance methods from class
<https://webkit.org/b/211393>

Reviewed by Brent Fulgham.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration limitsNavigationsToAppBoundDomains]):
(-[WKWebViewConfiguration setLimitsNavigationsToAppBoundDomains:]):

  • Move from WKPrivate category to main category to fix linker warnings.
10:35 AM Changeset in webkit [261395] by Wenson Hsieh
  • 11 edits
    2 adds in trunk

Preserve character set information when writing to the pasteboard when copying rich text
https://bugs.webkit.org/show_bug.cgi?id=211524

Reviewed by Darin Adler.

Source/WebCore:

This patch is a followup to r261247, which introduced a workaround for Cocoa platforms to automatically add a
meta charset when writing HTML data to the platform pasteboard. When copying a rich text selection, we use a
different codepath when sanitizing DOM content - that is, serializePreservingVisualAppearance.

The previous change also introduced an enum, AddMetaCharsetIfNeeded, to limit applying this workaround to only
when we're writing HTML to the clipboard. However, it should be harmless to include this when reading sanitized
HTML as well, so we can also simplify this code by removing the AddMetaCharsetIfNeeded enum (and all of its
uses).

Test: CopyHTML.SanitizationPreservesCharacterSetInSelectedText

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded):

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::setDataFromItemList):

  • editing/MarkupAccumulator.h:

(WebCore::MarkupAccumulator::isAllASCII const):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readHTML):
(WebCore::WebContentMarkupReader::readHTML):

  • editing/markup.cpp:

(WebCore::sanitizeMarkup):
(WebCore::serializePreservingVisualAppearanceInternal):

Move the meta charset workaround from sanitizedMarkupForFragmentInDocument to
serializePreservingVisualAppearanceInternal, such that HTML data written to the pasteboard when copying rich
text can be used to load a web view, without losing the fact that the copied content was UTF-8 encoded.

(WebCore::sanitizedMarkupForFragmentInDocument):

  • editing/markup.h:

Tools:

Add a new API test to verify that the HTML data written to the pasteboard when copying a rich text selection
can be converted into an NSAttributedString that contains correctly encoded non-Latin characters.

  • TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:

LayoutTests:

Rebaseline several layout tests.

  • platform/ios/editing/pasteboard/onpaste-text-html-expected.txt:
  • platform/mac/editing/pasteboard/onpaste-text-html-expected.txt: Added.
  • platform/mac/fast/events/ondrop-text-html-expected.txt: Added.
10:33 AM Changeset in webkit [261394] by Chris Dumez
  • 5 edits in trunk

REGRESSION(r259209) Webview's pending URL is null after restoring session state
https://bugs.webkit.org/show_bug.cgi?id=211626
<rdar://problem/62992262>

Reviewed by Alex Christensen.

Source/WebKit:

The issue was that WebPageProxy::goToBackForwardItem() would behave differently whether
the page has a running process or not. In particular, when the page did not have a
running process, goToBackForwardItem() would return early and call launchProcessWithItem()
instead. Unlike goToBackForwardItem(), launchProcessWithItem() would fail to set the
pending API request.

To address the issue, I am getting rid of launchProcessWithItem() and merging its logic
into goToBackForwardItem() instead. Both methods shared a lot of code anyway and having
2 separate code paths that may diverge is error prone.

Change is covered by new API test.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::launchProcessWithItem): Deleted.

  • UIProcess/WebPageProxy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:

(TestWebKitAPI::TEST):

10:31 AM Changeset in webkit [261393] by don.olmstead@sony.com
  • 40 edits in trunk/Source/WTF

[clang-tidy] Run modernize-use-nullptr over WTF
https://bugs.webkit.org/show_bug.cgi?id=211628

Reviewed by Yusuke Suzuki.

Use the fix option in clang-tidy to ensure nullptr is being used across WTF.

  • wtf/Assertions.cpp:
  • wtf/BumpPointerAllocator.h:

(WTF::BumpPointerPool::BumpPointerPool):
(WTF::BumpPointerPool::create):
(WTF::BumpPointerAllocator::BumpPointerAllocator):

  • wtf/DataLog.cpp:

(WTF::setDataFile):

  • wtf/DateMath.cpp:

(WTF::parseES5DatePortion):
(WTF::parseES5TimePortion):

  • wtf/FastMalloc.cpp:

(WTF::fastZeroedMalloc):
(WTF::fastStrDup):
(WTF::tryFastZeroedMalloc):
(WTF::isFastMallocEnabled):
(WTF::fastMallocGoodSize):
(WTF::fastAlignedMalloc):
(WTF::tryFastAlignedMalloc):
(WTF::fastAlignedFree):
(WTF::tryFastMalloc):
(WTF::fastMalloc):
(WTF::tryFastCalloc):
(WTF::fastCalloc):
(WTF::fastFree):
(WTF::fastRealloc):
(WTF::tryFastRealloc):
(WTF::releaseFastMallocFreeMemory):
(WTF::releaseFastMallocFreeMemoryForThisThread):
(WTF::fastMallocStatistics):
(WTF::fastMallocSize):
(WTF::fastCommitAlignedMemory):
(WTF::fastDecommitAlignedMemory):
(WTF::fastEnableMiniMode):
(WTF::fastDisableScavenger):
(WTF::fastMallocDumpMallocStats):
(WTF::AvoidRecordingScope::avoidRecordingCount):
(WTF::AvoidRecordingScope::AvoidRecordingScope):
(WTF::AvoidRecordingScope::~AvoidRecordingScope):
(WTF::MallocCallTracker::MallocSiteData::MallocSiteData):
(WTF::MallocCallTracker::singleton):
(WTF::MallocCallTracker::MallocCallTracker):
(WTF::MallocCallTracker::recordMalloc):
(WTF::MallocCallTracker::recordRealloc):
(WTF::MallocCallTracker::recordFree):
(WTF::MallocCallTracker::dumpStats):

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::add):

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::findAndRemoveFreeSpace):

  • wtf/ParallelJobsGeneric.cpp:
  • wtf/RandomDevice.cpp:

(WTF::RandomDevice::cryptographicallyRandomValues):

  • wtf/RawPointer.h:

(WTF::RawPointer::RawPointer):

  • wtf/RedBlackTree.h:
  • wtf/SHA1.cpp:

(WTF::SHA1::hexDigest):

  • wtf/SchedulePair.h:

(WTF::SchedulePair::SchedulePair):

  • wtf/StackTrace.cpp:

(WTFGetBacktrace):
(WTF::StackTrace::dump const):

  • wtf/StringExtras.h:

(strnstr):

  • wtf/Variant.h:
  • wtf/Vector.h:

(WTF::VectorBufferBase::deallocateBuffer):
(WTF::VectorBufferBase::releaseBuffer):
(WTF::VectorBufferBase::VectorBufferBase):

  • wtf/cf/CFURLExtras.cpp:

(WTF::createCFURLFromBuffer):
(WTF::getURLBytes):

  • wtf/cf/CFURLExtras.h:
  • wtf/cf/FileSystemCF.cpp:

(WTF::FileSystem::pathAsURL):

  • wtf/dtoa/double-conversion.cc:
  • wtf/dtoa/utils.h:

(WTF::double_conversion::BufferReference::BufferReference):

  • wtf/text/CString.cpp:

(WTF::CString::mutableData):

  • wtf/text/CString.h:
  • wtf/text/StringBuffer.h:

(WTF::StringBuffer::release):

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::createUninitializedInternal):
(WTF::StringImpl::reallocateInternal):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::constructInternal<LChar>):
(WTF::StringImpl::constructInternal<UChar>):
(WTF::StringImpl::characters<LChar> const):
(WTF::StringImpl::characters<UChar> const):
(WTF::find):
(WTF::reverseFindLineTerminator):
(WTF::reverseFind):
(WTF::equalIgnoringNullity):
(WTF::codePointCompare):
(WTF::isSpaceOrNewline):
(WTF::lengthOfNullTerminatedString):
(WTF::StringImplShape::StringImplShape):
(WTF::StringImpl::isolatedCopy const):
(WTF::StringImpl::isAllASCII const):
(WTF::StringImpl::isAllLatin1 const):
(WTF::isAllSpecialCharacters):
(WTF::isSpecialCharacter const):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::create8BitIfPossible):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::adopt):
(WTF::StringImpl::cost const):
(WTF::StringImpl::costDuringGC):
(WTF::StringImpl::setIsAtom):
(WTF::StringImpl::setHash const):
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
(WTF::StringImpl::copyCharacters):
(WTF::StringImpl::at const):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::maxInternalLength):
(WTF::StringImpl::tailOffset):
(WTF::StringImpl::requiresCopy const):
(WTF::StringImpl::tailPointer const):
(WTF::StringImpl::tailPointer):
(WTF::StringImpl::substringBuffer const):
(WTF::StringImpl::substringBuffer):
(WTF::StringImpl::assertHashIsCorrect const):
(WTF::StringImpl::StaticStringImpl::StaticStringImpl):
(WTF::StringImpl::StaticStringImpl::operator StringImpl&):
(WTF::equalIgnoringASCIICase):
(WTF::startsWithLettersIgnoringASCIICase):
(WTF::equalLettersIgnoringASCIICase):

  • wtf/text/TextBreakIterator.cpp:

(WTF::initializeIterator):
(WTF::setContextAwareTextForIterator):
(WTF::openLineBreakIterator):

  • wtf/text/TextBreakIterator.h:

(WTF::LazyLineBreakIterator::get):

  • wtf/text/WTFString.cpp:

(WTF::charactersToFloat):

  • wtf/text/cf/StringImplCF.cpp:

(WTF::StringWrapperCFAllocator::allocate):
(WTF::StringWrapperCFAllocator::create):
(WTF::StringImpl::createCFString):

  • wtf/text/icu/UTextProviderLatin1.cpp:

(WTF::uTextLatin1Clone):
(WTF::openLatin1ContextAwareUTextProvider):

  • wtf/text/icu/UTextProviderUTF16.cpp:

(WTF::openUTF16ContextAwareUTextProvider):

  • wtf/win/FileSystemWin.cpp:

(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::storageDirectory):
(WTF::FileSystemImpl::openTemporaryFile):
(WTF::FileSystemImpl::openFile):
(WTF::FileSystemImpl::writeToFile):
(WTF::FileSystemImpl::readFromFile):
(WTF::FileSystemImpl::deleteNonEmptyDirectory):

  • wtf/win/LanguageWin.cpp:

(WTF::localeInfo):

  • wtf/win/MainThreadWin.cpp:

(WTF::initializeMainThreadPlatform):

  • wtf/win/OSAllocatorWin.cpp:

(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):

  • wtf/win/RunLoopWin.cpp:

(WTF::RunLoop::run):
(WTF::RunLoop::iterate):
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::cycle):
(WTF::RunLoop::TimerBase::start):

  • wtf/win/ThreadingWin.cpp:

(WTF::Thread::establishHandle):

10:30 AM Changeset in webkit [261392] by eric.carlson@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION(r261341): imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm is failing
https://bugs.webkit.org/show_bug.cgi?id=211612
<rdar://problem/63024081>

Unreviewed test gardening.

10:14 AM Changeset in webkit [261391] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk/LayoutTests

Code pattern in GC tests in LayoutTests is broken
https://bugs.webkit.org/show_bug.cgi?id=211595

Reviewed by Saam Barati.

LayoutTests have several tests which attempt to ensure that document is not leaked. But they are broken since these tests are not correctly
handling conservative GC of JavaScriptCore. These tests are taking a following approach.

  1. Allocate *one* iframe doing something inside it.
  2. Remove iframe from the parent document to make it released.
  3. Repeatedly invoke GC and test whether (1)'s document gets collected.

This is not the right approach. Since JavaScriptCore has conservative GC, it is easily possible that (1)'s pointer value remains in some of
conservative roots: CPU registers, stack etc. And JavaScriptCore conservative GC scans it and keeps it alive. The above approach makes the
test super flaky and any unrelated changes in JavaScriptCore and C compiler can make this test failed.

This is not a problem in practice. Web pages are executing various kind of code and they clobber conservative roots. However, tests in
LayoutTests are too simple to keep it alive accidentally.

The right approach for conservative GC is the following.

  1. Allocate *many* iframes doing something inside them with loop. By creating iframes with loop, for every iteration, it is likely that the same CPU registers and stack locations are overwritten by the last created iframe reference. This dramatically reduces the possibility for GC to find these addresses in conservative roots.
  2. Remove iframes from the parent document to make them released.
  3. Repeatedly invoke GC and test whether *one of (1) iframes* gets collected at least. Theoretically this is still possible that completely unrelated integer value in conservative roots can point to the reference of (1). By allocating many iframes in (1) and testing one of them, we can reduce the possibility of this conflict.

This patch adds testDocumentIsNotLeaked helper function to enforce this pattern. And rewrite broken tests with this helper to make it less-flaky.

  • highlight/highlight-world-leak.html:
  • http/tests/IndexedDB/collect-IDB-objects.https.html:
  • http/tests/media/clearkey/collect-webkit-media-session.html:
  • http/tests/media/media-stream/collect-media-devices.https.html:
  • http/tests/resources/gc.js: Added.

(window.gc.gcRec):
(window.gc.window.gc):
(nukeArray):
(async testDocumentIsNotLeaked):

  • intersection-observer/no-document-leak.html:
  • performance-api/performance-observer-no-document-leak.html:
  • resources/gc.js:

(nukeArray):
(async testDocumentIsNotLeaked):

  • webanimations/leak-document-with-web-animation.html:
10:13 AM Changeset in webkit [261390] by commit-queue@webkit.org
  • 6 edits in trunk

WKWebView.title should be safe browsing warning's title during a safe browsing warning
https://bugs.webkit.org/show_bug.cgi?id=211403

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-08
Reviewed by Tim Horton.

Source/WebKit:

Add a new property to PageLoadState, which allows the title to be set underneath it.
That way, once the safe browsing warning is closed, we can update the title to what it would've been,
including any changes that happened while the warning was open.

Covered by an API test. I also manually verified this fixes rdar://problem/56201982

  • UIProcess/PageLoadState.cpp:

(WebKit::PageLoadState::commitChanges):
(WebKit::PageLoadState::reset):
(WebKit::PageLoadState::didCommitLoad):
(WebKit::PageLoadState::title const):
(WebKit::PageLoadState::setTitleFromSafeBrowsingWarning):

  • UIProcess/PageLoadState.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(TEST):

9:55 AM Changeset in webkit [261389] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Update message filtering rules in the WebContent process' sandbox
https://bugs.webkit.org/show_bug.cgi?id=211188

Reviewed by Brent Fulgham.

Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS.
Messages that have not been observed being in use should be denied.

No new tests, covered by existing tests.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
9:48 AM Changeset in webkit [261388] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Turn processDidBecomeUnresponsive logging into error logging
https://bugs.webkit.org/show_bug.cgi?id=211629

Reviewed by Youenn Fablet.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidBecomeUnresponsive):

9:33 AM Changeset in webkit [261387] by pvollan@apple.com
  • 4 edits in trunk/Source

[Cocoa] Close connections to Launch Services after revoking extension
https://bugs.webkit.org/show_bug.cgi?id=211594

Reviewed by Brent Fulgham.

Source/WebCore/PAL:

Declare _LSDService class.

  • pal/spi/cocoa/LaunchServicesSPI.h:

Source/WebKit:

In <https://trac.webkit.org/changeset/258915/webkit>, connections to the Launch Services database mapping
services were denied, by creating a temporary extension. After revoking this extension in the WebContent
process, it is important to close any open connections to Launch Services initiated by the mapping.

No new tests, covered by existing UTI/MIME type tests.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

9:23 AM Changeset in webkit [261386] by Darin Adler
  • 2 edits in trunk/Source/WTF

Make callBufferProducingFunction safer to use by adding a compile-time assertion
https://bugs.webkit.org/show_bug.cgi?id=211599

Reviewed by Ross Kirsling.

  • wtf/unicode/icu/ICUHelpers.h:

(WTF::CallBufferProducingFunction::argumentTuple): Add a static_assert that
checks these are just simple types, aside from the Vector for the buffer.
This would have caught the UpconvertedCharacters problem fixed earlier today.

9:17 AM Changeset in webkit [261385] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

Fix for crashes in LayoutTests in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=211622

Reviewed by Chris Fleizach.

Several LayoutTests.

Return the root from the isolated tree when it is really ready.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::rootObject):

Some code cleanup.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::clickPoint):

9:16 AM WebKitEmacsTips edited by Philippe Normand
(diff)
9:03 AM WebKitEmacsTips created by Philippe Normand
8:55 AM WebKitGTK edited by Philippe Normand
(diff)
8:39 AM Changeset in webkit [261384] by don.olmstead@sony.com
  • 20 edits in trunk/Source/WTF

WTF headers should compile independently
https://bugs.webkit.org/show_bug.cgi?id=211608

Reviewed by Yusuke Suzuki.

When a WTF header is included on its own within a source file it should compile.
These issues were found when working on a tooling build for running static
analysis over WTF. Forward declarations were used whenever possible otherwise
an include was used.

Additionally fix some errors found by Clang 10.

  • wtf/AggregateLogger.h:
  • wtf/CallbackAggregator.h:
  • wtf/Dominators.h:
  • wtf/HashIterators.h:
  • wtf/IndexSparseSet.h:
  • wtf/LoggingHashMap.h:
  • wtf/LoggingHashTraits.h:
  • wtf/RunLoopTimer.h:
  • wtf/Stopwatch.h:
  • wtf/Threading.h:
  • wtf/cf/RunLoopTimerCF.cpp:
  • wtf/persistence/PersistentCoder.h:
  • wtf/text/LineBreakIteratorPoolICU.h:
  • wtf/text/NullTextBreakIterator.h:
  • wtf/text/StringOperators.h:
  • wtf/text/StringToIntegerConversion.h:
  • wtf/text/cf/TextBreakIteratorCF.h:
  • wtf/text/icu/TextBreakIteratorICU.h:
  • wtf/text/win/WCharStringExtras.h:
8:21 AM Changeset in webkit [261383] by Lauro Moura
  • 6 edits
    2 adds in trunk

[GTK][WPE] Create common glib expectation file
https://bugs.webkit.org/show_bug.cgi?id=211183

Reviewed by Carlos Garcia Campos.

Tools:

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._search_paths): Add glib to expectations search path
(GtkPort.test_expectations_file_position): Update test

  • Scripts/webkitpy/port/gtk_unittest.py:

(GtkPortTest.test_default_baseline_search_path): Update test
(GtkPortTest.test_port_specific_expectations_files): Update test and
make check-webkit-style happier

  • Scripts/webkitpy/port/wpe.py:

(WPEPort._search_paths): Add glib to expectations search path
(WPEPort.test_expectations_file_position): Update test

  • Scripts/webkitpy/port/wpe_unittest.py:

(WPEPortTest.test_default_baseline_search_path): Update test
(WPEPortTest.test_port_specific_expectations_files): Update test and
make check-webkit-style happier

LayoutTests:

  • platform/glib/TestExpectations: Added.
8:02 AM Changeset in webkit [261382] by Simon Fraser
  • 13 edits in trunk

Overflow scrollers in iframes don't get mouseMovedInContentArea()
https://bugs.webkit.org/show_bug.cgi?id=211347
<rdar://problem/62784560>

Reviewed by Tim Horton.

Source/WebCore:

We never dispatched mouseMovedInContentArea() on ScrollableAreas in subframes, so overlay scrollbar
interactions there were broken. This is because the code ran from EventHandler::mouseMoved(), which
only runs for the main frame.

Instead, move the mouseMovedInContentArea() dispatch down into updateMouseEventTargetNode() which
is run for each subframe. notifyScrollableAreasOfMouseEvents() takes an event name so we only dispatch
for mouseMove events. There's some complexity here related to whether the old and new ScrollableArea
targets are nested; this code doesn't try to do the right thing with nesting, but does handle the mouse
moving between the scrollable main frame and an overflow region.

enclosingScrollableArea() is fixed to return the FrameView. enclosingScrollableLayer() is flawed, as noted
in the RenderLayer.h comment.

Tests: fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html

fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::enclosingScrollableArea):
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::pointerCaptureElementDidChange):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::notifyScrollableAreasOfMouseEvents):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::enclosingScrollableArea): Deleted.
(WebCore::EventHandler::notifyScrollableAreasOfMouseEnterExit): Deleted.

  • page/EventHandler.h:
  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::dispatchSyntheticMouseOut):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::debugDescription const):

  • rendering/RenderLayer.h:

LayoutTests:

The ordering of callbacks in the scroll-animator tests changed, but in ways that don't materially
affect behavior. Two new real overlay scrollbar tests.

  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt: Added.
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html: Added.
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt: Added.
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html: Added.
  • fast/scrolling/scroll-animator-basic-events-expected.txt:
  • fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt:
  • fast/scrolling/scroll-animator-overlay-scrollbars-hovered-expected.txt:
  • fast/scrolling/scroll-animator-select-list-events-expected.txt:
7:24 AM Changeset in webkit [261381] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

Flaky Test: media/track/track-in-band-metadata-display-order.html
https://bugs.webkit.org/show_bug.cgi?id=206226

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:08 AM Changeset in webkit [261380] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207571

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
7:02 AM Changeset in webkit [261379] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] http/tests/cache-storage/cache-representation.https.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=207665

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
7:02 AM Changeset in webkit [261378] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][TFC] The fixed logical width should be used as the max width for a cell
https://bugs.webkit.org/show_bug.cgi?id=211610

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-simple-with-fixed-widht-and-inline-content.html

  • layout/tableformatting/TableFormattingContextGeometry.cpp:

(WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell):

LayoutTests:

  • fast/layoutformattingcontext/table-simple-with-fixed-widht-and-inline-content-expected.txt: Added.
  • fast/layoutformattingcontext/table-simple-with-fixed-widht-and-inline-content.html: Added.
6:51 AM Changeset in webkit [261377] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION: [ iOS wk2 ] fast/forms/input-text-scroll-left-on-blur.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209812

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:46 AM Changeset in webkit [261376] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mojave wk1 Release ] platform/mac/media/media-source/videoplaybackquality-decompressionsession.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209866

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:42 AM Changeset in webkit [261375] by youenn@apple.com
  • 13 edits
    1 copy
    4 adds in trunk/Source

Handle remote audio capture IPC messages in a background thread
https://bugs.webkit.org/show_bug.cgi?id=211583

Reviewed by Eric Carlson.

Source/WebCore:

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:

(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
Add assertion to check that we are not running on the main thread.

Source/WebKit:

We introduce RemoteCaptureSampleManager which is responsible to get remote capture sample IPC messages and treat them from a background thread.
It is currently used to handle audio capture IPC messages.
We move UserMediaCaptureManager::Source in its own file and rename it to RemoteRealtimeMediaSource.

Covered by existing tests.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp: Added.

(WebKit::RemoteCaptureSampleManager::RemoteCaptureSampleManager):
(WebKit::RemoteCaptureSampleManager::~RemoteCaptureSampleManager):
(WebKit::RemoteCaptureSampleManager::setConnection):
(WebKit::RemoteCaptureSampleManager::addSource):
(WebKit::RemoteCaptureSampleManager::removeSource):
(WebKit::RemoteCaptureSampleManager::dispatchToThread):
(WebKit::RemoteCaptureSampleManager::storageChanged):
(WebKit::RemoteCaptureSampleManager::audioSamplesAvailable):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h: Added.
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in: Added.
  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp: Added.

(WebKit::RemoteRealtimeMediaSource::RemoteRealtimeMediaSource):
(WebKit::RemoteRealtimeMediaSource::~RemoteRealtimeMediaSource):
(WebKit::RemoteRealtimeMediaSource::whenReady):
(WebKit::RemoteRealtimeMediaSource::didFail):
(WebKit::RemoteRealtimeMediaSource::setAsReady):
(WebKit::RemoteRealtimeMediaSource::clone):
(WebKit::RemoteRealtimeMediaSource::setCapabilities):
(WebKit::RemoteRealtimeMediaSource::setSettings):
(WebKit::RemoteRealtimeMediaSource::remoteAudioSamplesAvailable):
(WebKit::RemoteRealtimeMediaSource::remoteVideoSampleAvailable):
(WebKit::RemoteRealtimeMediaSource::connection):
(WebKit::RemoteRealtimeMediaSource::startProducingData):
(WebKit::RemoteRealtimeMediaSource::stopProducingData):
(WebKit::RemoteRealtimeMediaSource::setShouldApplyRotation):
(WebKit::RemoteRealtimeMediaSource::capabilities):
(WebKit::RemoteRealtimeMediaSource::applyConstraints):
(WebKit::RemoteRealtimeMediaSource::applyConstraintsSucceeded):
(WebKit::RemoteRealtimeMediaSource::applyConstraintsFailed):
(WebKit::RemoteRealtimeMediaSource::hasEnded):
(WebKit::RemoteRealtimeMediaSource::stopBeingObserved):
(WebKit::RemoteRealtimeMediaSource::requestToEnd):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.h: Added.

(WebKit::RemoteRealtimeMediaSource::identifier const):
(WebKit::RemoteRealtimeMediaSource::settings const):
(WebKit::RemoteRealtimeMediaSource::setShouldCaptureInGPUProcess):
(WebKit::RemoteRealtimeMediaSource::shouldCaptureInGPUProcess const):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::cloneSource):
(WebKit::UserMediaCaptureManager::cloneVideoSource):
(WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource):
(WebKit::UserMediaCaptureManager::AudioFactory::setShouldCaptureInGPUProcess):
(WebKit::UserMediaCaptureManager::VideoFactory::createVideoCaptureSource):
(WebKit::UserMediaCaptureManager::DisplayFactory::createDisplayCaptureSource):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
  • WebProcess/cocoa/UserMediaCaptureManager.messages.in:
4:55 AM WebKitGTK/2.28.x edited by aboya@igalia.com
(diff)
4:36 AM Changeset in webkit [261374] by Paulo Matos
  • 2 edits in trunk/Tools

Add myself as committer to contributors.json

Patch by Paulo Matos <Paulo Matos> on 2020-05-08

  • Scripts/webkitpy/common/config/contributors.json:
3:54 AM Changeset in webkit [261373] by youenn@apple.com
  • 20 edits in trunk

Video capture does not get unmuted in case of tab switch on iOS
https://bugs.webkit.org/show_bug.cgi?id=211509

Reviewed by Eric Carlson.

Source/WebCore:

Remove setInterrupted and related code.
Instead, directly use setMuted(true/false) of the source of capture tracks.
To ensure we validate that the active source is tied to a track of the document,
we add RealtimeSource::isSameAs which handles the case of a RealtimeVideoSource wrapping an AVVideoCaptureSource.
There might be multiple video tracks with each one its RealtimeVideoSource using the same AVVideoCaptureSource.
We mute the AVVideoCaptureSource directly to make sure all linked tracks will get muted/unmuted at the same time.
Tests to be fixed.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::isSourceCapturingForDocument):
(WebCore::MediaStreamTrack::updateCaptureAccordingToMutedState):

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::visibilityStateChanged):

  • platform/mediastream/RealtimeMediaSource.cpp:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:
  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h:
  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

Source/WebKit:

Remove no longer needed code.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::VideoFactory::setActiveSource):

  • WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

  • platform/ios/TestExpectations:

Disable GPU process test since we are not able yet to mute/unmute handle multiple video tracks
with different sources as can be done if capture is done out of process.

  • platform/ios/mediastream/video-muted-in-background-tab.html:

Update test to ensure the track is producing content.

3:23 AM Changeset in webkit [261372] by Pablo Saavedra
  • 2 edits in trunk/JSTests

Unreviewed, reverting r261010.

Test skipped for all ARM. no evidence of this affecting iOS

Reverted changeset:

"Skip on ARM and MIPS stress/array-buffer-view-watchpoint-can-
be-fired-in-really-add-in-dfg.js added after r260990"
https://bugs.webkit.org/show_bug.cgi?id=211304
https://trac.webkit.org/changeset/261010

1:52 AM WebKitGTK/2.28.x edited by Philippe Normand
(diff)
1:49 AM WebKitGTK/2.28.x edited by Philippe Normand
(diff)
1:47 AM Changeset in webkit [261371] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Unreviewed. Fix GTK4 build after r261370

  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(webkitScriptDialogIsUserHandled):

1:21 AM Changeset in webkit [261370] by Lauro Moura
  • 6 edits in trunk/Source/WebKit

[WPE][WebDriver] Implement user prompt support
https://bugs.webkit.org/show_bug.cgi?id=207372

Reviewed by Carlos Garcia Campos.

Provide a default implementation for WebDriver dialog commands.
This implementation will mimic the expected browser behavior of
accepting/dismissing the dialogs, while not exposing any new API.

  • UIProcess/API/glib/WebKitScriptDialogPrivate.h:
  • Expose new private function to check whether the dialog is using a

default implementation or is handled by the user.

  • UIProcess/API/glib/WebKitWebView.cpp:
  • Avoid default WebDriver behavior if the dialog is user-handled.

(webkitWebViewSetCurrentScriptDialogUserInput):
(webkitWebViewAcceptCurrentScriptDialog):
(webkitWebViewDismissCurrentScriptDialog):

  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(webkitScriptDialogIsUserHandled):

  • Return whether the dialog is user handled.
  • UIProcess/API/wpe/WebKitScriptDialogWPE.cpp:
  • Added basic behavior for the WebDriver dialog callbacks for WPE.

(webkitScriptDialogAccept):
(webkitScriptDialogDismiss):
(webkitScriptDialogSetUserInput):
(webkitScriptDialogIsUserHandled):

  • UIProcess/API/wpe/WebKitWebViewWPE.cpp:

(webkitWebViewScriptDialog):

  • Hold a dialog ref if the webview is controlled by automation and ends

up calling the default "script-dialog" event handler.

1:06 AM Changeset in webkit [261369] by Diego Pino Garcia
  • 3 edits
    1 add in trunk/LayoutTests

[GTK][WPE] Gardening, update expectations and baselines after r261341
https://bugs.webkit.org/show_bug.cgi?id=211616

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes-expected.txt: Added.
  • platform/wpe/TestExpectations:
Note: See TracTimeline for information about the timeline view.