Timeline



Jun 7, 2021:

9:57 PM Changeset in webkit [278592] by Jean-Yves Avenard
  • 2 edits in trunk/Tools

Update jya's email address
https://bugs.webkit.org/show_bug.cgi?id=226752

Reviewed by Tim Horton.

  • Scripts/webkitpy/common/config/contributors.json:
8:22 PM Changeset in webkit [278591] by ysuzuki@apple.com
  • 19 edits
    2 adds in trunk

[JSC] Use ResolvedClosureVar to get brand from scope
https://bugs.webkit.org/show_bug.cgi?id=226677
rdar://78802869

Reviewed by Saam Barati.

JSTests:

  • stress/private-access-nested-eval.js: Added.

(shouldThrow):
(shouldThrow.prototype.x):
(shouldThrow.prototype.m.C.prototype.z):
(shouldThrow.prototype.m.C.prototype.a):
(shouldThrow.prototype.m.C):
(shouldThrow.prototype.m):

  • stress/private-access-nested.js: Added.

(shouldThrow):
(shouldThrow.prototype.x):
(shouldThrow.prototype.m.C.prototype.z):
(shouldThrow.prototype.m.C.prototype.a):
(shouldThrow.prototype.m.C):
(shouldThrow.prototype.m):

Source/JavaScriptCore:

Private brand lookup is doing wrong way to get scope.

  1. op_resolve_scope with private name (e.g. #x)
  2. then, doing op_get_from_scope with (1)'s scope with different name (e.g. @privateBrand)

This is wrong in JSC. We resolve scope at link-time in CodeBlock. So we need to ensure that both op_resolve_scope and op_get_from_scope
starts with the current scope-register. As a result, private-brand lookup is broken right now. Let's see the buggy case.

class D {

#x() {}
m() {

class C {

#yy;
#z() { }
a() {

this.#x(); <===== This point.

}

}
let c = new C();
c.a();

}

}

In the above point, we first lookup the scope with #x, and we get the D's class-scope. But our get_from_scope is using privateBrand, and
privateBrand property exists too in C's class-scope too since C also has #yy and #z. As a result, CodeBlock linking configures the offset for
C's class-scope in get_from_scope. And this offset is different from D's class-scope's privateBrand.

Only allowed case for the above usage is ResolvedClosureVar. And generatorification uses it too. In this patch,

  1. We ensure that class-scope (with private name) must have @privateBrand and @privateClassBrand with offset 1 and 0.
  2. Use ResolvedClosureVar with the above pre-defined offset

Since CodeBlock's linking does not resolve the scope for get_from_scope if it is ResolvedClosureVar, we can just perform the desired ResolvedClosureVar lookup
with the given scope with the compiled offset.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::instantiateLexicalVariables):
(JSC::BytecodeGenerator::pushLexicalScope):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::emitCreatePrivateBrand):
(JSC::BytecodeGenerator::emitGetPrivateBrand):

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

(JSC::BaseDotNode::emitGetPropertyValue):
(JSC::BaseDotNode::emitPutProperty):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitDot):
(JSC::InNode::emitBytecode):
(JSC::BlockNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • parser/VariableEnvironment.h:
7:25 PM Changeset in webkit [278590] by commit-queue@webkit.org
  • 11 edits in trunk

Adopt SecTrustGetCertificateAtIndex replacement where available
https://bugs.webkit.org/show_bug.cgi?id=225893

Patch by Alex Christensen <achristensen@webkit.org> on 2021-06-07
Reviewed by Chris Dumez.

Source/WebCore:

  • platform/network/cf/CertificateInfoCFNet.cpp:

(WebCore::certificatesMatch):
(WebCore::CertificateInfo::certificateChainFromSecTrust):
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const):

  • platform/network/cocoa/CertificateInfoCocoa.mm:

(WebCore::CertificateInfo::dump const):

Source/WebKit:

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::encodeNSError):

  • UIProcess/Authentication/mac/WebCredentialMac.mm:

(WebKit::leafCertificate):
(WebKit::chain):
(WebKit::WebCredential::WebCredential):

Source/WTF:

rdar://74752046 introduced a new way to access the same thing.

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(verifyCertificateAndPublicKey):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
6:53 PM Changeset in webkit [278589] by Alexey Shvayka
  • 103 edits
    15 adds in trunk

Unreviewed, reland r276592 with a fix for put() override in prototype chain of a JSProxy
https://bugs.webkit.org/show_bug.cgi?id=226185

JSTests:

  • microbenchmarks/put-slow-no-cache-array.js: Added.
  • microbenchmarks/put-slow-no-cache-function.js: Added.
  • microbenchmarks/put-slow-no-cache-js-proxy.js: Added.
  • microbenchmarks/put-slow-no-cache-long-prototype-chain.js: Added.
  • microbenchmarks/put-slow-no-cache.js: Added.
  • microbenchmarks/reflect-set-with-receiver.js: Added.
  • stress/custom-get-set-proto-chain-put.js:
  • stress/module-namespace-access-set-fails.js: Added.
  • stress/put-non-reified-static-accessor-or-custom.js: Added.
  • stress/put-non-reified-static-function-or-custom.js: Added.
  • stress/put-to-primitive-non-reified-static-custom.js: Added.
  • stress/put-to-primitive.js: Added.
  • stress/put-to-proto-chain-overrides-put.js:

Rework to always test new objects, add JSProxy coverage, and assert that receiver has own property.

  • stress/typed-array-canonical-numeric-index-string-set.js: Added.

LayoutTests/imported/w3c:

  • web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver-expected.txt: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver.html: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html:

Source/JavaScriptCore:

The API test added in r278366 revealed a flaw in JSObject::definePropertyOnReceiver()
that caused putDirectInternal() to be performed on a JSProxy instead of it's target.
Remedies that via a type check, ensuring the test and iOS apps are functional.

The issue was originally missed because the prototype chain of a global object is immutable
and none of the global object's prototypes override put(). OpaqueJSClass::prototype() sets
the Prototype? directly, ignoring the IsImmutablePrototypeExoticObject type info flag.

Also, excludes an invariant from the original patch that required put() to be overriden
when implementing custom DefineOwnProperty?. It is now broken by WindowProperties object.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::put):

  • API/tests/testapiScripts/testapi.js:
  • debugger/DebuggerScope.h:
  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.h:
  • runtime/CustomGetterSetter.cpp:

(JSC::callCustomSetter): Deleted.

  • runtime/CustomGetterSetter.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.h:
  • runtime/GenericArguments.h:
  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::put):

  • runtime/GetterSetter.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::put):

  • runtime/JSArray.h:
  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::put): Deleted.

  • runtime/JSArrayBufferView.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSCell.cpp:

(JSC::JSCell::doPutPropertySecurityCheck): Deleted.

  • runtime/JSCell.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::put):

  • runtime/JSFunction.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::put):

  • runtime/JSGlobalObject.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSModuleEnvironment.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::putInlineSlow):
(JSC::definePropertyOnReceiverSlow):
(JSC::JSObject::definePropertyOnReceiver):
(JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded):
(JSC::JSObject::doPutPropertySecurityCheck): Deleted.
(JSC::JSObject::prototypeChainMayInterceptStoreTo): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::putByIndexInline):
(JSC::JSObject::hasNonReifiedStaticProperties):
(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::putDirect):
(JSC::JSObject::doPutPropertySecurityCheck): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInlineExcludingProto):
(JSC::JSObject::putInlineForJSObject):
(JSC::JSObject::putInlineFast):
(JSC::JSObject::putDirectInternal):

  • runtime/JSProxy.h:
  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::hasStaticPropertyTable const):
(JSC::TypeInfo::overridesPut const):
(JSC::TypeInfo::getOwnPropertySlotMayBeWrongAboutDontEnum const):
(JSC::TypeInfo::hasPutPropertySecurityCheck const): Deleted.

  • runtime/Lookup.h:

(JSC::putEntry): Deleted.
(JSC::lookupPut): Deleted.

  • runtime/PropertySlot.h:
  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::put):

  • runtime/ProxyObject.h:
  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::context const):
(JSC::PutPropertySlot::isTaintedByOpaqueObject const):
(JSC::PutPropertySlot::setIsTaintedByOpaqueObject):

  • runtime/ReflectObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::put):

  • runtime/RegExpObject.h:
  • runtime/StringObject.cpp:

(JSC::StringObject::put):

  • runtime/StringObject.h:
  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::StringPrototype::create):

  • runtime/StringPrototype.h:
  • runtime/Structure.cpp:

(JSC::Structure::validateFlags):

  • runtime/Structure.h:

(JSC::Structure::hasNonReifiedStaticProperties const):

  • tools/JSDollarVM.cpp:

Source/WebCore:

Tests: js/dom/script-tests/reflect-set-onto-dom.js

imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver.html
http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::put):
(WebCore::JSDOMWindow::doPutPropertySecurityCheck): Deleted.

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::doPutPropertySecurityCheck): Deleted.

  • bindings/js/JSRemoteDOMWindowCustom.cpp:

(WebCore::JSRemoteDOMWindow::put):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut):
(GenerateHeader):

  • bindings/scripts/test/JS/*: Updated.
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_object.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.h:

LayoutTests:

  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put-expected.txt:
  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html:
  • js/dom/reflect-set-onto-dom-expected.txt:
  • js/dom/script-tests/reflect-set-onto-dom.js:
6:43 PM Changeset in webkit [278588] by Alexey Shvayka
  • 25 edits in trunk/Source/JavaScriptCore

Introduce LexicalScopeFeatures to enable future bytecode optimizations
https://bugs.webkit.org/show_bug.cgi?id=224072

Reviewed by Keith Miller.

Before this patch, BytecodeGenerator was capable of reasoning about the presence of with
statements, direct eval, or any other code features only within the current executable:

`
with (foo) {

(function() {

There was no way to detect WithScope during generation of this function.

})();

}
`

This change is required for op_to_this rewrite (#225397): if FunctionCallResolveNode and
friends knew there is no WithScope, op_call could be emitted with |this| value of
undefined as per spec [1], instead of resolved scope. This would:

  • simplify op_to_this on all tiers, likely resulting in minor perf boost;
  • save 1 instruction per strict function by removing op_to_this;
  • remove toThis() from the method table and ~30 its call sites from built-ins;
  • fix built-in methods that were observably lacking toThis();
  • fix proto getter / setter called on global scope;
  • fix WebIDL accessors called with |this| value of undefined and null.

Also, if ResolveNode knew that unforgeable global properties are not shadowed and there
is no with statement or sloppy mode direct eval, then undefined / Infinity / NaN
lookups could be constant-folded. This would save up to 3 bytecode ops per each usage
and allow emitting op_is_undefined_or_null for x === undefined || x === null.
V8 performs this optimization [2].

This patch introduces LexicalScopeFeatures to allow passing such information from Parser
to BytecodeGenerator with a minimal code diff. These features are kept separate from
CodeFeature to simplify reasoning about feature's scope and because we need to propagate
lexical features from parent to child scope.

Strict mode is the first use case of LexicalScopeFeatures, which this change carefully
fits into existing abstractions without increasing their memory usage even by 1 byte.

[1]: https://tc39.es/ecma262/#sec-evaluatecall (step 2)
[2]: https://medium.com/@bmeurer/sometimes-undefined-is-defined-7701e1c9eff8

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createExecutable):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::recordParse):
(JSC::UnlinkedCodeBlock::lexicalScopeFeatures const):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::setInvalidTypeProfilingOffsets):

  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewClassFieldInitializerFunction):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::lexicalScopeFeatures const):
(JSC::BytecodeGenerator::generate):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createFunctionMetadata):

  • parser/Nodes.cpp:

(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ModuleProgramNode::ModuleProgramNode):
(JSC::EvalNode::EvalNode):
(JSC::FunctionMetadataNode::FunctionMetadataNode):
(JSC::FunctionMetadataNode::operator== const):
(JSC::FunctionMetadataNode::dump const):
(JSC::FunctionNode::FunctionNode):

  • parser/Nodes.h:

(JSC::ScopeNode::lexicalScopeFeatures):
(JSC::ScopeNode::isStrictMode const):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionInfo):

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::lexicalScopeFeatures const):
(JSC::Scope::setStrictMode):
(JSC::Scope::strictMode const):
(JSC::Scope::fillParametersForSourceProviderCache):
(JSC::Scope::restoreFromSourceProviderCache):
(JSC::Parser::pushScope):
(JSC::Parser::lexicalScopeFeatures):
(JSC::Parser<LexerType>::parse):

  • parser/ParserModes.h:
  • parser/SourceProviderCacheItem.h:

(JSC::SourceProviderCacheItem::lexicalScopeFeatures const):
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createFunctionMetadata):

  • runtime/CachedBytecode.cpp:

(JSC::CachedBytecode::addFunctionUpdate):

  • runtime/CachedTypes.cpp:

(JSC::CachedFunctionExecutable::lexicalScopeFeatures const):
(JSC::CachedCodeBlock::lexicalScopeFeatures const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedFunctionExecutable::encode):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedFunctionExecutable::isInStrictContext const): Deleted.

  • runtime/CachedTypes.h:
  • runtime/CodeCache.cpp:

(JSC::generateUnlinkedCodeBlockImpl):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

  • runtime/ECMAMode.h:

(JSC::ECMAMode::fromBool):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::FunctionExecutable):

  • runtime/GlobalExecutable.h:

(JSC::GlobalExecutable::recordParse):
(JSC::GlobalExecutable::GlobalExecutable):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::recordParse):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::isInStrictContext const):
(JSC::ScriptExecutable::recordParse):

6:29 PM Changeset in webkit [278587] by commit-queue@webkit.org
  • 17 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r278371 and r278463.
https://bugs.webkit.org/show_bug.cgi?id=226749

Break dumpDisassembly in JetStream2

Reverted changesets:

"We should drop B3 values while running Air"
https://bugs.webkit.org/show_bug.cgi?id=226187
https://trac.webkit.org/changeset/278371

"Drop the FTL(DFG) graph after lowering to B3"
https://bugs.webkit.org/show_bug.cgi?id=226556
https://trac.webkit.org/changeset/278463

6:28 PM Changeset in webkit [278586] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

Fix localized strings after r278202
https://bugs.webkit.org/show_bug.cgi?id=226742

Reviewed by Eric Carlson.

  • Scripts/extract-localizable-strings.pl:

Add support for WEB_UI_CFSTRING_KEY.

  • en.lproj/Localizable.strings:
6:10 PM Changeset in webkit [278585] by Alexey Shvayka
  • 23 edits
    2 adds in trunk

Window should behave like a legacy platform object without indexed setter
https://bugs.webkit.org/show_bug.cgi?id=225894

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-delete-no-cache-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-delete-no-cache.html: Added.
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict.html:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html:

Source/JavaScriptCore:

  • runtime/TypeError.h:

(JSC::typeError):

Source/WebCore:

This change fixes major interop issue by disallowing expando indexed properties on WindowProxy,
raising TypeError only when needed, which aligns WebKit with Blink and Gecko.

While DefineOwnProperty? [1] and Delete? [2] methods of WindowProxy are implemented
precisely per spec, current Set? [3] algorithm seems to allow invoking setters from
the prototype chain. Blink and Gecko implement stricter semantics by failing early rather
than traversing the prototype chain, as does this patch.

To avoid breaking native apps that either add expando indexed properties to WindowProxy, or
more likely read / write indices of sloppy function's |this| value, which accidently happens
to be a WindowProxy, the new behavior is introduced only for web content and newly-built apps.

Since unlike putByIndex(), deletePropertyByIndex() might be invoked with UINT_MAX, which is
not an array index [4], isIndex() check is required. In future, JSC will be fixed to remove
such checks from all indexed overrides.

DeletePropertySlot::disableCaching() is not called because indexed deletes are not currently
repatched, and once they are, cacheability should be inferred from added type info flags.

Also, removes extra jsDOMWindowGetOwnPropertySlotRestrictedAccess() call for indices, which
is missing from the spec [5]; this is unobservable.

[1] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-defineownproperty (step 2.1)
[2] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-delete (step 2.1)
[3] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-set (step 3)
[4] https://tc39.es/ecma262/#array-index
[5] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-getownproperty (step 2.5.2)

Tests: imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties-delete-no-cache.html

imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html
imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict.html

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::makeUnsupportedIndexedSetterErrorMessage):

  • bindings/js/JSDOMExceptionHandling.h:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::allowsLegacyExpandoIndexedProperties):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Remove outdated comments.
(WebCore::JSDOMWindow::put):
(WebCore::JSDOMWindow::putByIndex): Release scope when calling Base::putByIndex(), which could throw.
(WebCore::JSDOMWindow::deleteProperty):
(WebCore::JSDOMWindow::deletePropertyByIndex):
(WebCore::JSDOMWindow::defineOwnProperty):

  • platform/cocoa/VersionChecks.h:

LayoutTests:

  • fast/dom/Window/orphaned-frame-access.html:
  • fast/frames/iframe-detached-window-still-writable-eval-expected.txt:
  • fast/frames/iframe-detached-window-still-writable-eval.html:
  • http/tests/security/cross-frame-access-delete-expected.txt:
  • http/tests/security/resources/cross-frame-iframe-for-delete-test.html:
  • js/dom/dfg-ensure-array-storage-on-window-expected.txt:
  • js/dom/indexed-setter-on-global-object-expected.txt:
  • js/dom/script-tests/dfg-ensure-array-storage-on-window.js:
  • js/dom/script-tests/dfg-ensure-non-array-array-storage-on-window.js:
  • js/dom/script-tests/indexed-setter-on-global-object.js:
6:04 PM Changeset in webkit [278584] by Russell Epstein
  • 1 copy in tags/Safari-611.3.7

Tag Safari-611.3.7.

5:41 PM Changeset in webkit [278583] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.2

Tag Safari-612.1.15.4.2.

5:40 PM Changeset in webkit [278582] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch

Cherry-pick r278501. rdar://problem/78973538

[AppleWin] JSC build failure
https://bugs.webkit.org/show_bug.cgi?id=226659
<rdar://78844190>

Reviewed by Brent Fulgham.

WTF scripts location is not being correctly identified.

  • Source/cmake/OptionsAppleWin.cmake:

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

5:38 PM Changeset in webkit [278581] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.4-branch/Source

Versioning.

WebKit-7612.1.15.4.2

5:29 PM Changeset in webkit [278580] by Chris Dumez
  • 20 edits
    1 delete in trunk/Source

Drop legacy MainThreadTaskQueue & EventLoopTaskQueue classes
https://bugs.webkit.org/show_bug.cgi?id=226734

Reviewed by Ryosuke Niwa.

Source/WebCore:

Drop legacy MainThreadTaskQueue & EventLoopTaskQueue classes. Code that was using MainThreadTaskQueue
is now calling callOnMainThread() directly. Call that was using EventLoopTaskQueue is now using the
HTML event loop directly. If said code needed to cancel tasks or check if a previously scheduled task
is still pending, it now relies on WTF::CancellableTask / WTF::TaskCancellationGroup to do so.

  • Headers.cmake:
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::cacheCurrentTime):
(WebCore::DocumentTimelinesController::maybeClearCachedCurrentTime):

  • animation/DocumentTimelinesController.h:
  • dom/ActiveDOMObject.h:
  • dom/Document.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleNextSourceChild):
(WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::cancelPendingTasks):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::virtualHasPendingActivity const):
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
(WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):
(WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):

  • html/HTMLMediaElement.h:
  • platform/GenericTaskQueue.h: Removed.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(-[WebCoreAVFMovieObserver metadataLoaded]):
(-[WebCoreAVFMovieObserver didEnd:]):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
(-[WebCoreAVFMovieObserver metadataOutput:didOutputTimedMetadataGroups:fromPlayerItemTrack:]):
(-[WebCoreAVFMovieObserver metadataCollector:didCollectDateRangeMetadataGroups:indexesOfNewGroups:indexesOfModifiedGroups:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::abort):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:

Source/WTF:

We recently introduced the WTF::CancellableTask in order to be able to cancel
a pending task in the event loop, and/or check if the task is still pending.
It worked great as a replacement for EventLoopDeferrableTask. However, it was
insufficient as a replacement for task queues (such as MainThreadTaskQueue &
EventLoopTaskQueue) since there was no convenient way to cancel a group of
tasks. To address this, I am introducing WTF::TaskCancellationGroup. Whenever one
needs to create a CancellableTask, it now needs to provide a TaskCancellationGroup.
Several CancellableTask objects can share the same TaskCancellationGroup. Code now
now schedule one or more CancellableTasks on the event loop and hold on
to a TaskCancellationGroup. If they need to cancel those tasks, they can simply
call cancel() on the TaskCancellationGroup. They can also check if previously
scheduled tasks are still pending via TaskCancellationGroup::hasPendingTask().

  • wtf/CancellableTask.h:

(WTF::TaskCancellationGroup::TaskCancellationGroup):
(WTF::TaskCancellationGroup::cancel):
(WTF::TaskCancellationGroup::hasPendingTask const):
(WTF::TaskCancellationGroup::Impl::cancel):
(WTF::TaskCancellationGroup::Impl::hasPendingTask const):
(WTF::TaskCancellationGroup::Handle::isCancelled const):
(WTF::TaskCancellationGroup::Handle::Handle):
(WTF::TaskCancellationGroup::createHandle):
(WTF::CancellableTask::CancellableTask):
(WTF::CancellableTask::operator()):

  • wtf/WeakPtr.h:

(WTF::WeakPtrFactory::weakPtrCount const):

5:05 PM Changeset in webkit [278579] by Russell Epstein
  • 1 copy in tags/Safari-612.1.16.4

Tag Safari-612.1.16.4.

4:26 PM Changeset in webkit [278578] by sbarati@apple.com
  • 4 edits
    1 add in trunk

Short circuit read modify write nodes emit byte code that uses the wrong locals
https://bugs.webkit.org/show_bug.cgi?id=226576
<rdar://problem/78810362>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/short-circuit-read-modify-should-use-the-write-virtual-registers.js: Added.

(eval):

Source/JavaScriptCore:

It's never a good idea to use the wrong local :-)

This patch also adds support for dumping predecessors of basic blocks
in the bytecode dump.

  • bytecode/BytecodeDumper.cpp:

(JSC::CodeBlockBytecodeDumper<Block>::dumpGraph):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ShortCircuitReadModifyResolveNode::emitBytecode):
(JSC::ShortCircuitReadModifyDotNode::emitBytecode):
(JSC::ShortCircuitReadModifyBracketNode::emitBytecode):

4:07 PM Changeset in webkit [278577] by Russell Epstein
  • 8 edits in branches/safari-612.1.16-branch/Source

Versioning.

WebKit-7612.1.16.4

3:51 PM Changeset in webkit [278576] by mark.lam@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

Put the Baseline JIT prologue and op_loop_hint code in JIT thunks.
https://bugs.webkit.org/show_bug.cgi?id=226375

Reviewed by Keith Miller and Robin Morisset.

Baseline JIT prologue code varies in behavior based on several variables. These
variables include (1) whether the prologue does any arguments value profiling,
(2) whether the prologue is for a constructor, and (3) whether the compiled
CodeBlock will have such a large frame that it is greater than the stack reserved
zone (aka red zone) which would require additional stack check logic.

The pre-existing code would generate specialized code based on these (and other
variables). In converting to using thunks for the prologue, we opt not to
convert these specializations into runtime checks. Instead, the implementation
uses 1 of 8 possible specialized thunks to reduce the need to pass arguments for
runtime checks. The only needed argument passed to the prologue thunks is the
codeBlock pointer.

There are 8 possible thunks because we specialize based on 3 variables:

  1. doesProfiling
  2. isConstructor
  3. hasHugeFrame

23 yields 8 permutations of prologue thunk specializations.

Similarly, there are also 8 analogous arity fixup prologues that work similarly.

The op_loop_hint thunk only takes 1 runtime argument: the bytecode offset.

We've tried doing the loop_hint optimization check in the thunk (in order to move
both the fast and slow path into the thunk for maximum space savings). However,
this seems to have some slight negative impact on benchmark performance. We ended
up just keeping the fast path and instead have the slow path call a thunk to do
its work. This realizes the bulk of the size savings without the perf impact.

This patch also optimizes op_enter a bit more by eliminating the need to pass any
arguments to the thunk. The thunk previously took 2 arguments: localsToInit and
canBeOptimized. localsToInit is now computed in the thunk at runtime, and
canBeOptimized is used as a specialization argument to generate 2 variants of the
op_enter thunk: op_enter_canBeOptimized_Generator and op_enter_cannotBeOptimized_Generator,
thereby removing the need to pass it as a runtime argument.

LinkBuffer size results (from a single run of Speedometer2):

BaselineJIT: 93319628 (88.996532 MB) => 83851824 (79.967331 MB) 0.90x

ExtraCTIThunk: 5992 (5.851562 KB) => 6984 (6.820312 KB) 1.17x

...

Total: 197530008 (188.379295 MB) => 188459444 (179.728931 MB) 0.95x

Speedometer2 and JetStream2 results (as measured on an M1 Mac) are neutral.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::untagReturnAddressWithoutExtraValidation):

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::untagReturnAddress):
(JSC::MacroAssemblerARM64E::untagReturnAddressWithoutExtraValidation):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::branchAdd32):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::branchAdd32):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::offsetOfNumCalleeLocals):
(JSC::CodeBlock::offsetOfNumVars):
(JSC::CodeBlock::offsetOfArgumentValueProfiles):
(JSC::CodeBlock::offsetOfShouldAlwaysBeInlined):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitSaveCalleeSavesFor):
(JSC::AssemblyHelpers::emitSaveCalleeSavesForBaselineJIT):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesForBaselineJIT):

  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::prologueGenerator):
(JSC::JIT::arityFixupPrologueGenerator):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::emitNakedNearCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::op_ret_handlerGenerator):
(JSC::JIT::emit_op_enter):
(JSC::JIT::op_enter_Generator):
(JSC::JIT::op_enter_canBeOptimized_Generator):
(JSC::JIT::op_enter_cannotBeOptimized_Generator):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::op_loop_hint_Generator):
(JSC::JIT::op_enter_handlerGenerator): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_enter):

  • jit/ThunkGenerators.cpp:

(JSC::popThunkStackPreservesAndHandleExceptionGenerator):

3:11 PM Changeset in webkit [278575] by Wenson Hsieh
  • 60 edits
    38 copies
    7 moves
    4 adds
    2 deletes in trunk

Upstream WebKit support for Live Text
https://bugs.webkit.org/show_bug.cgi?id=226706
<rdar://problem/78933684>

Reviewed by Tim Horton.

Source/WebCore:

Upstream WebKit support for the family of "live text" and visual intelligence features from WebKitAdditions.
This encompasses the following features on macOS 12 and iOS 15:

  • Text selection and interaction in images.
  • Data detectors in images.
  • Visual search (Look Up) via context menu in images.

To do this, we rename the IMAGE_EXTRACTION feature flag (and any other similar symbol names that reference
"image extraction" in some capacity) to their real names in macOS and iOS:

  • "Text recognition", in code that supports automatic OCR and data detectors in images.
  • "Look Up", in code that references the context menu action to invoke visual search.
  • "Visual Search", in code that manages QuickLook integration for invoking visual search.
  • "Image analysis", in code that directly integrates with VKImageAnalyzer and VKImageAnalyzerRequest.

Tests: fast/images/text-recognition/basic-image-overlay.html

fast/images/text-recognition/click-link-with-image-overlay.html
fast/images/text-recognition/image-overlay-creation-is-idempotent.html
fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html
fast/images/text-recognition/image-overlay-with-selection-styles.html
fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html
fast/images/text-recognition/ios/reselect-word-in-image-overlay.html
fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html
fast/images/text-recognition/ios/select-word-in-image-overlay.html
fast/images/text-recognition/ios/selection-rects-in-image-overlay.html
fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html
fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html
fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html
fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html
fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html
fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html
fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html
fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html
fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html

  • WebCore.xcodeproj/project.pbxproj:
  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::createElementForImageOverlay):

  • en.lproj/Localizable.strings:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithTextRecognitionResult):
(WebCore::HTMLElement::updateWithImageExtractionResult): Deleted.

  • html/HTMLElement.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::requestTextRecognition):
(WebCore::ChromeClient::requestImageExtraction): Deleted.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::m_textRecognitionHoverTimerFired):
(WebCore::EventHandler::imageExtractionTimerFired): Deleted.

  • page/EventHandler.h:
  • page/Quirks.cpp:
  • page/Quirks.h:
  • platform/ContextMenuItem.cpp:

(WebCore::isValidContextMenuAction):

  • platform/ContextMenuItem.h:
  • platform/LocalizedStrings.h:
  • platform/TextRecognitionResult.h: Renamed from Source/WebCore/platform/ImageExtractionResult.h.

Rename the following:

  • ImageExtractionResult => TextRecognitionResult
  • ImageExtractionTextData => TextRecognitionWordData
  • ImageExtractionLineData => TextRecognitionLineData
  • ImageExtractionDataDetectorInfo => TextRecognitionDataDetector

(WebCore::TextRecognitionWordData::TextRecognitionWordData):
(WebCore::TextRecognitionWordData::encode const):
(WebCore::TextRecognitionWordData::decode):
(WebCore::TextRecognitionLineData::TextRecognitionLineData):
(WebCore::TextRecognitionDataDetector::TextRecognitionDataDetector):
(WebCore::TextRecognitionLineData::encode const):
(WebCore::TextRecognitionLineData::decode):
(WebCore::TextRecognitionResult::isEmpty const):
(WebCore::TextRecognitionResult::encode const):
(WebCore::TextRecognitionResult::decode):

  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::contextMenuItemTagLookUpImage):
(WebCore::contextMenuItemTagRevealImage): Deleted.

  • testing/Internals.cpp:

(WebCore::makeDataForLine):
(WebCore::Internals::installImageOverlay):

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Platform/cocoa/ImageExtractionUtilities.mm: Removed.
  • Platform/cocoa/TextRecognitionUtilities.h: Renamed from Source/WebKit/Platform/cocoa/ImageExtractionUtilities.h.
  • Platform/cocoa/TextRecognitionUtilities.mm: Added.

Rename ImageExtractionUtilities to TextRecognitionUtilities.

(WebKit::floatQuad):
(WebKit::floatQuads):
(WebKit::makeTextRecognitionResult):
(WebKit::isLiveTextEnabled):

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::decodePlatformData):
(IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::decodePlatformData): Deleted.

  • Shared/TextRecognitionUpdateResult.h: Renamed from Source/WebKit/Shared/ImageExtractionUpdateResult.h.
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<TextRecognitionDataDetector>::encode):
(IPC::ArgumentCoder<TextRecognitionDataDetector>::decode):
(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encode): Deleted.
(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
(+[_WKElementAction imageForElementActionType:]):

Note that we need to keep the _WKElementActionTypeRevealImage SPI symbol, to avoid breaking MobileMail.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::handleContextMenuLookUpImage):
(WebKit::WebPageProxy::handleContextMenuRevealImage): Deleted.

Rename handleContextMenuRevealImage to handleContextMenuLookUpImage.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::ensureImageAnalyzer):
(WebKit::createImageAnalysisRequest):
(WebKit::WebViewImpl::requestTextRecognition):
(WebKit::WebViewImpl::computeHasVisualSearchResults):

Rename computeCanRevealImage to computeHasVisualSearchResults.

(WebKit::WebViewImpl::acceptsPreviewPanelControl):

  • UIProcess/PageClient.h:

(WebKit::PageClient::requestTextRecognition):
(WebKit::PageClient::computeHasVisualSearchResults):
(WebKit::PageClient::requestImageExtraction): Deleted.
(WebKit::PageClient::computeCanRevealImage): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::requestTextRecognition):
(WebKit::WebPageProxy::computeHasVisualSearchResults):
(WebKit::WebPageProxy::updateWithTextRecognitionResult):
(WebKit::WebPageProxy::requestImageExtraction): Deleted.
(WebKit::WebPageProxy::computeCanRevealImage): Deleted.
(WebKit::WebPageProxy::updateWithImageExtractionResult): Deleted.

Rename updateWithImageExtractionResult to updateWithTextRecognitionResult.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::requestTextRecognition):
(WebKit::PageClientImpl::requestImageExtraction): Deleted.

Rename requestImageExtraction to requestTextRecognition.

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

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

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

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView deferringGestures]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView targetForAction:withSender:]):
(-[WKContentView _didStartProvisionalLoadForMainFrame]):
(-[WKContentView shouldDeferGestureDueToImageAnalysis:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView _endImageAnalysisGestureDeferral:]):
(-[WKContentView _doAfterPendingImageAnalysis:]):
(-[WKContentView _invokeAllActionsToPerformAfterPendingImageAnalysis:]):
(-[WKContentView presentVisualSearchPreviewControllerForImage:imageURL:title:imageBounds:appearanceActions:]):
(-[WKContentView previewController:frameForPreviewItem:inSourceView:]):
(-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]):
(-[WKContentView previewControllerDidDismiss:]):
(-[WKContentView numberOfPreviewItemsInPreviewController:]):
(-[WKContentView previewController:previewItemAtIndex:]):
(-[WKContentView provideDataForItem:]):
(-[WKContentView actionSheetAssistant:shouldIncludeShowTextActionForElement:]):
(-[WKContentView actionSheetAssistant:showTextForImage:imageURL:title:imageBounds:]):
(-[WKContentView actionSheetAssistant:shouldIncludeLookUpImageActionForElement:]):
(-[WKContentView actionSheetAssistant:lookUpImage:imageURL:title:imageBounds:]):
(-[WKContentView imageAnalyzer]):
(-[WKContentView hasPendingImageAnalysisRequest]):
(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView _cancelImageAnalysis]):
(-[WKContentView createImageAnalysisRequest:image:imageURL:]):
(-[WKContentView createImageAnalysisRequest:image:]):
(-[WKContentView validateImageAnalysisRequestIdentifier:]):
(-[WKContentView requestTextRecognition:imageData:completionHandler:]):
(-[WKContentView imageAnalysisGestureDidBegin:]):
(-[WKContentView imageAnalysisGestureDidFail:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]):
(-[WKContentView _insertTextFromCameraForWebView:]):
(-[WKContentView captureTextFromCameraForWebView:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView continueContextMenuInteraction:]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKContentView shouldDeferGestureDueToImageExtraction:]): Deleted.
(-[WKContentView _endImageExtractionGestureDeferral:]): Deleted.
(-[WKContentView _doAfterPendingImageExtraction:]): Deleted.
(-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction:]): Deleted.

  • UIProcess/ios/WKImageAnalysisGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.h.
  • UIProcess/ios/WKImageAnalysisGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.mm.

(-[WKImageAnalysisGestureRecognizer initWithImageAnalysisGestureDelegate:]):
(-[WKImageAnalysisGestureRecognizer setState:]):

Rename WKImageExtractionGestureRecognizer to WKImageAnalysisGestureRecognizer (along with all adjacent classes).

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::requestTextRecognition):
(WebKit::PageClientImpl::computeHasVisualSearchResults):
(WebKit::PageClientImpl::requestImageExtraction): Deleted.
(WebKit::PageClientImpl::computeCanRevealImage): Deleted.

  • UIProcess/mac/WKVisualSearchPreviewController.h: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.h.
  • UIProcess/mac/WKVisualSearchPreviewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.mm.

(-[WKVisualSearchPreviewController initWithPage:imageData:title:imageURL:]):
(-[WKVisualSearchPreviewController beginControl:]):
(-[WKVisualSearchPreviewController endControl:]):
(-[WKVisualSearchPreviewController closePanelIfNecessary]):
(-[WKVisualSearchPreviewController isControlling:]):
(-[WKVisualSearchPreviewController provideDataForItem:]):
(-[WKVisualSearchPreviewController numberOfPreviewItemsInPreviewPanel:]):
(-[WKVisualSearchPreviewController previewPanel:previewItemAtIndex:]):
(-[WKVisualSearchPreviewController previewPanel:initialActivityForItem:]):

Rename WKImageExtractionPreviewController to WKVisualSearchPreviewController.

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::getContextMenuFromItems):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::beginPreviewPanelControl):
(WebKit::WebPageProxy::endPreviewPanelControl):
(WebKit::WebPageProxy::closeSharedPreviewPanelIfNecessary):
(WebKit::WebPageProxy::showImageInVisualSearchPreviewPanel):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestTextRecognition):
(WebKit::WebChromeClient::requestImageExtraction): Deleted.

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

(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::requestTextRecognition):
(WebKit::WebPage::updateWithTextRecognitionResult):
(WebKit::WebPage::requestImageExtraction): Deleted.
(WebKit::WebPage::updateWithImageExtractionResult): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS.

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

Move the feature flag out of WebKitAdditions and into OpenSource as IMAGE_ANALYSIS.

Tools:

Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS.

  • TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
  • TestWebKitAPI/Tests/mac/ImmediateActionTests.mm:

LayoutTests:

Rename fast/images/image-extraction to fast/images/text-recognition.

  • TestExpectations:
  • fast/images/text-recognition/basic-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay-expected-mismatch.html.
  • fast/images/text-recognition/basic-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay.html.
  • fast/images/text-recognition/click-link-with-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay-expected.txt.
  • fast/images/text-recognition/click-link-with-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay.html.
  • fast/images/text-recognition/image-overlay-creation-is-idempotent-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent-expected.txt.
  • fast/images/text-recognition/image-overlay-creation-is-idempotent.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent.html.
  • fast/images/text-recognition/image-overlay-in-image-with-zero-font-size-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size-expected-mismatch.html.
  • fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html.
  • fast/images/text-recognition/image-overlay-with-selection-styles-expected.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html.
  • fast/images/text-recognition/image-overlay-with-selection-styles.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html.
  • fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html.
  • fast/images/text-recognition/ios/reselect-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/reselect-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay.html.
  • fast/images/text-recognition/ios/select-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link-expected.txt.
  • fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html.
  • fast/images/text-recognition/ios/select-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay.html.
  • fast/images/text-recognition/ios/selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay.html.
  • fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu-expected.txt.
  • fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu.html.
  • fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt.
  • fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html.
  • fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt.
  • fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2-expected.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html.
  • fast/images/text-recognition/mac/select-rotated-transparent-image-overlay-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html.
  • fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html.
  • fast/images/text-recognition/mac/select-word-in-draggable-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay-expected-mismatch.html.
  • fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html.
  • fast/images/text-recognition/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html.
  • fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html.
2:20 PM Changeset in webkit [278574] by mmaxfield@apple.com
  • 2 edits in trunk/Websites/browserbench.org

Release MotionMark 1.2!!! 🎉
https://bugs.webkit.org/show_bug.cgi?id=226741

Reviewed by Geoff Garen.

Simply update the link to point to it.

  • index.html:
2:17 PM Changeset in webkit [278573] by Ruben Turcios
  • 8 edits in branches/safari-612.1.17-branch/Source

Versioning.

WebKit-7612.1.17

2:11 PM Changeset in webkit [278572] by Ruben Turcios
  • 1 copy in branches/safari-612.1.17-branch

New branch.

1:27 PM Changeset in webkit [278571] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Compile error by trying to fit a GCGLint64* to a GLint64*
https://bugs.webkit.org/show_bug.cgi?id=226639

Patch by Eleni Maria Stea <hikiko> on 2021-06-07
Reviewed by Kenneth Russell.

ANGLE functions GetInteger64vRobustANGLE and
GetInteger64i_vRobustANGLE expect a value of GLint64* aka
long int * but we try to fit a pointer to a long long int.
Fixed compile errors.

  • platform/graphics/GraphicsTypesGL.h:
1:09 PM Changeset in webkit [278570] by Fujii Hironori
  • 2 edits in trunk/Tools

Windows Python 2.7 fails to install tblib-1.7.0 due to "TypeError: environment can only contain strings"
https://bugs.webkit.org/show_bug.cgi?id=226707

Reviewed by Jonathan Bedard.

WinCairo port is still using Python 2.7 that has ascii strings and
unicode strings. WinPort.setup_crash_log_saving modifies
_NT_SYMBOL_PATH env var to have a unicode string. So, after
setup_crash_log_saving, AutoInstall failed due to the unicode
string in os.environ.

  • Scripts/webkitpy/port/win.py:

(WinPort.setup_crash_log_saving): Convert self._build_path() to a
ascii string with str().

1:05 PM Changeset in webkit [278569] by Fujii Hironori
  • 2 edits in trunk/Tools

run-webkit-test should use python2 for wpt serve until the latest will be imported
https://bugs.webkit.org/show_bug.cgi?id=226703

Reviewed by Jonathan Bedard.

The current imported wpt.py doesn't support Python 3 yet. Use
Python 2 temporarily.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

(WebPlatformTestServer.init):

12:55 PM Changeset in webkit [278568] by rmorisset@apple.com
  • 14 edits
    3 adds in trunk

Optimize compareStrictEq when neither side is a double and at least one is neither a string nor a BigInt
https://bugs.webkit.org/show_bug.cgi?id=226676

Reviewed by Filip Pizlo.

JSTests:

I made two variants of the already existing poly-stricteq microbenchmarks with different types in the array.
I also tweaked all three so that we more reliably reach the FTL.
Finally I added a stress-test to verify that I did not introduce an OSR exit bug.

  • microbenchmarks/poly-stricteq-not-double-nor-string.js: Added.

(foo):
(test):

  • microbenchmarks/poly-stricteq-not-double.js: Added.

(foo):
(test):

  • microbenchmarks/poly-stricteq.js:

(foo):
(test):

  • stress/poly-stricteq-not-double-nor-string-fail.js: Added.

(foo):
(test):

Source/JavaScriptCore:

There is exactly one case where x === y must return false despite x and y being JSValues with the same bits:

NaN === NaN

There are a few cases where x === y must return true despite x and y being JSValues with potentially different bits:

Double === Int32
String === String
HeapBigInt === HeapBigInt
HeapBigInt === BigInt32 (if they are enabled)

If we don't have a double on either side, at least one side has neither a String nor a HeapBigInt, and BigInt32 are disabled, we can clearly ignore all of these pathological cases.

This optimization was decided based on looking at DFG graphs of Speedometer2; here is a sample of the compareStrictEq(Untyped, Untyped), courtesy of Phil:

Final|Array|String|Bool, Final|Array|String|Bool
Array|String|Bool, String|Bool (twice)
Array|String|Bool, String|Int32 (once in DFG, once in FTL)

! Array|String|Bool, Array|Bool
! Final|Other, Final|Other
! Int32|Other, Int32

Final|StringIdent, Final|StringIdent (3 times)
Final|StringIdent|BoolInt32, StringIdent|BoolInt32 (twice)
String|Bool, String|Bool (4 times)
DoublePureNaN, String|Bool

! Other, Function|Other
! Final|Other, Final|Function|Other (twice)

Final|String|Bool|Other, Final|String|Bool|Other (3 times, two in the FTL)
Final|String|Int32, String|Int32 (four times)
String|Int32|Bool, Function|String|Int32|Bool (twice)
String|DoublePureNaN, String|Bool (twice)

! Final|Bool|Other, Final|Function|Other (four times, twice in FTL)
I marked with a ! those for which this optimization should apply.

The only slightly interesting part of this patch is DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigIntNorString where I took care to skip every test whose result we can predict from the abstract interpreter.

Results on microbenchmarks:

poly-stricteq-not-double 45.5793+-0.5304 ? 46.0306+-0.5621 ?
poly-stricteq-not-double-nor-string 45.5829+-0.5750 16.9089+-0.3070 definitely 2.6958x faster
poly-stricteq 49.9719+-0.6450 48.9855+-0.5227 might be 1.0201x faster

I also measured the amount of code that we generate in the DFG on JetStream2.
The results here are disappointing but still measurable. Before:

DFG_fast_CompareStrictEq totalBytes: 468425 count: 10951 avg: 42.774632
DFG_fast_CompareStrictEq totalBytes: 468020 count: 10917 avg: 42.870752
DFG_fast_CompareStrictEq totalBytes: 467424 count: 10888 avg: 42.930198

After:

DFG_fast_CompareStrictEq totalBytes: 463946 count: 10917 avg: 42.497573
DFG_fast_CompareStrictEq totalBytes: 474492 count: 11138 avg: 42.601185
DFG_fast_CompareStrictEq totalBytes: 467138 count: 10970 avg: 42.583227

  • bytecode/SpeculatedType.h:

(JSC::isNeitherDoubleNorHeapBigIntNorStringSpeculation):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateNeitherDoubleNorHeapBigIntNorString):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::compileNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality):
(JSC::DFG::SpeculativeJIT::speculateNotDouble):
(JSC::DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigIntNorString):
(JSC::DFG::SpeculativeJIT::speculate):

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

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::checkMayCrashIfInputIsEmpty):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateNeitherDoubleNorHeapBigIntNorString):

12:46 PM Changeset in webkit [278567] by Ruben Turcios
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.18

12:44 PM Changeset in webkit [278566] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r272201): iPad render flashing on load
https://bugs.webkit.org/show_bug.cgi?id=226216
<rdar://problem/78466306>

Reviewed by Simon Fraser.

Source/WebCore:

When we switched to wrapping all animations in animation groups for bug 219894, we neglected to update GraphicsLayerCA::moveOrCopyAnimations().
We now iterate over m_animationGroups which contain the animation groups that are current and in the order they were added, and also ensure
we preserve the original begin time for each group.

Test: webanimations/accelerated-animation-tiled-while-running.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):

  • platform/graphics/ca/GraphicsLayerCA.h:

LayoutTests:

Add a test that runs the same accelerated animation on two container elements, stack one above the other.
The bottom container has a red background while the top container has a green background, the whole body
being green. After the animation has started, we set the bottom element to have a very large size such
that its layer becomes tiled. Before this patch the bottom element would stop animation and its red
background would start appearing as the top element would keep animating. After this patch both elements
are animated and no red should appear.

  • webanimations/accelerated-animation-tiled-while-running-expected.html: Added.
  • webanimations/accelerated-animation-tiled-while-running.html: Added.
11:53 AM Changeset in webkit [278565] by Devin Rousso
  • 10 edits in trunk/Source

Convert WebCore::SnapshotOptions into an enum class
https://bugs.webkit.org/show_bug.cgi?id=226730

Reviewed by Wenson Hsieh.

Convert SnapshotOptions into an enum class SnapshotFlags and create a container `struct
SnapshotOptions that also allows for changing the DestinationColorSpace` (defaults to sRGB)
and PixelFormat (defaults to BGRA8).

No behavior change.

Source/WebCore:

  • page/FrameSnapshotting.h:
  • page/FrameSnapshotting.cpp:

(WebCore::snapshotFrameRect):
(WebCore::snapshotFrameRectWithClip):
(WebCore::snapshotSelection):
(WebCore::snapshotNode):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::snapshotRect):

  • page/PageColorSampler.cpp:

(WebCore::sampleColor):

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

  • page/TextIndicator.cpp:

(WebCore::snapshotOptionsForTextIndicatorOptions):
(WebCore::takeSnapshot):
(WebCore::takeSnapshots):

  • platform/DragImage.cpp:

(WebCore::createDragImageForSelection):
(WebCore::createDragImageForRange):

Source/WebKit:

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::createSelectionSnapshot const):

11:10 AM Changeset in webkit [278564] by youenn@apple.com
  • 274 edits
    32 adds
    8 deletes in trunk/Source/ThirdParty/libwebrtc

Update libvpx to M92
https://bugs.webkit.org/show_bug.cgi?id=226488

Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • Source/third_party/libvpx: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:
10:00 AM Changeset in webkit [278563] by imanol
  • 2 edits in trunk/Source/WebCore

Change WebXRSpace::efectiveOrigin() matrix multiplication order
https://bugs.webkit.org/show_bug.cgi?id=224364
<rdar://problem/76754680>

Reviewed by Sergio Villar Senin.

The current multiplication order is not working correctly when combining local-floor space and getOfffsetReferenceSpace().
The reference space is out of sync with input ray pose after some teleportations:
https://github.com/immersive-web/webxr-samples/blob/main/teleportation.html

Tested using WebXR WPT tests.

  • Modules/webxr/WebXRSpace.cpp:

(WebCore::WebXRSpace::effectiveOrigin const):

8:37 AM Changeset in webkit [278562] by imanol
  • 6 edits in trunk

Use 3D points to map the WebXRBoundedReferenceSpace bounds transform
https://bugs.webkit.org/show_bug.cgi?id=224365
<rdar://problem/76754927>

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update WebXR test expectations.

  • web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt:

Source/WebCore:

WebXRBoundedReferenceSpace is currently using Point2D mapping to transfom the bounds geometry.
This is not correct because the originOffset is a 3D transform and it expects the bounds depth
coordinates to be on the z axis instead of the y axis.

Tested by WebXR WPT tests.

  • Modules/webxr/WebXRBoundedReferenceSpace.cpp:

(WebCore::WebXRBoundedReferenceSpace::updateIfNeeded):

LayoutTests:

Update WebXR test expectations.

  • platform/wpe/TestExpectations:
8:06 AM Changeset in webkit [278561] by Antti Koivisto
  • 8 edits in trunk/Source/WebCore

Factor selection state computation out of LegacyInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=226718

Reviewed by Alan Bujtas.

Move the code to SelectionRangeData.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const):

  • rendering/HighlightData.cpp:

(WebCore::HighlightData::highlightStateForRenderer):
(WebCore::HighlightData::highlightStateForTextBox):
(WebCore::HighlightData::rangeForTextBox):

  • rendering/HighlightData.h:

(WebCore::HighlightData::HighlightData):

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::selectionState):
(WebCore::LegacyInlineTextBox::selectableRange const):
(WebCore::LegacyInlineTextBox::selectionStartEnd const):
(WebCore::LegacyInlineTextBox::highlightStartEnd const):
(WebCore::LegacyInlineTextBox::verifySelectionState const): Deleted.
(WebCore::LegacyInlineTextBox::clampedStartEndForState const): Deleted.

  • rendering/LegacyInlineTextBox.h:
  • rendering/SelectionRangeData.cpp:

(WebCore::SelectionRangeData::SelectionRangeData):

  • rendering/TextBoxSelectableRange.h:
6:45 AM Changeset in webkit [278560] by Wenson Hsieh
  • 8 edits in trunk

[Cocoa] Find-in-page should match text inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=226704

Reviewed by Tim Horton.

Source/WebCore:

Add a new TextIteratorBehavior to allow TextIterator to descend into image overlay content, and use this option
when creating TextIterators for find-in-page. See WebKit/ChangeLog for more details.

Test: WebKit.FindTextInImageOverlay

  • editing/TextIterator.cpp:

(WebCore::TextIterator::handleReplacedElement):
(WebCore::findIteratorOptions):

  • editing/TextIteratorBehavior.h:

Source/WebKit:

Add the PaintAllContent and PaintBackgrounds text indicator options when generating a TextIndicator for
selected content inside an image overlay. See WebCore/ChangeLog for more details.

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::updateFindIndicator):

  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::findTextIndicatorOptions):
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
(WebKit::FindController::updateFindIndicator):

Tools:

Add an API test to verify that text inside image overlays is visible to find-in-page.

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
6:26 AM Changeset in webkit [278559] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[iOS] Unexpected scrolling when switching focus from a text input to a select element
https://bugs.webkit.org/show_bug.cgi?id=226657
<rdar://problem/78290515>

Reviewed by Tim Horton.

Source/WebKit:

When switching focus from a text input to a select element, UIKit makes
deferred calls to -[WKWebView inputView] after the keyboard dismissal.
This method calls -[WKContentView inputViewForWebView], which calls
-[WKContentView _zoomToRevealFocusedElement]. Consequently, these
methods can get invoked while the context menu (dropdown) is displayed
for a focused select element.

In this instance, the call should be idempotent, since the focused element
is fully visible in the viewport. However, since the context menu is visible
and overlaps the element, our logic incorrectly determines that the element
is obscured, leading to unexpected zooming/scrolling. To fix, we need to
correct the logic that determines the visible portion of the view.

Test: fast/forms/ios/form-control-refresh/select/focus-select-after-textfield.html

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):

Always use the window to determine the portion of the webview that is
visible, rather than relying on the root view controller's top-most
full-screen view controller's view.

The old logic worked fine in most cases, since the root view controller
and the top-most full-screen view controller are almost always the same.
Furthermore, the root view controller's view usually takes up the entire
window.

However, when the context menu is on screen, the top-most full-screen
view controller is an internal UIKit view controller
(_UIContextMenuActionsOnlyViewController), and the associated view
is the context menu view. This exposed a flaw in the existing logic, as
visibility detection could be performed by intersecting with an
incorrect view. In general, the top-most full-screen view is not a
reliable way to determine the visible portion of the webview.

LayoutTests:

Add a layout test to exercise the bug.

  • fast/forms/ios/form-control-refresh/select/focus-select-after-textfield-expected.txt: Added.
  • fast/forms/ios/form-control-refresh/select/focus-select-after-textfield.html: Added.
4:45 AM Changeset in webkit [278558] by aboya@igalia.com
  • 2 edits in trunk/Source/WTF

[WTF][GStreamer] Fix clang TSA warnings in WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=226719

Reviewed by Xabier Rodriguez-Calvar.

Fix the remaning clang thread safety warnings in WTF::DataMutex.

The goal of this patch is to reduce the number of warnings in the
GStreamer codebase. Whether DataMutex should be deprecated in favor of
Locker with the clang TSA annotations is outside of the scope of this
patch.

  • wtf/DataMutex.h:
4:43 AM Changeset in webkit [278557] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add clang TSA annotations: MainThreadNotifier
https://bugs.webkit.org/show_bug.cgi?id=226717

Reviewed by Xabier Rodriguez-Calvar.

Adds clang thread safety annotations to
MainThreadNotifier.h

  • platform/graphics/gstreamer/MainThreadNotifier.h:
4:43 AM Changeset in webkit [278556] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add clang TSA annotations: InbandTextTrackPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=226716

Reviewed by Xabier Rodriguez-Calvar.

Adds clang thread safety annotations to
InbandTextTrackPrivateGStreamer.h.

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
4:40 AM Changeset in webkit [278555] by aboya@igalia.com
  • 2 edits in trunk/Source/WTF

[GStreamer] Remove spurious assert in WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=226714

Reviewed by Michael Catanzaro.

Remove DATA_MUTEX_CHECK(!mutex().isHeld()); from the DataMutexLocker
constructor, introduced in r278248.

Trying to lock a currently held mutex is not an error condition that
should crash the process, it will just wait for its turn to lock it.

  • wtf/DataMutex.h:
4:40 AM Changeset in webkit [278554] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Fix clang TSA warning in AbortableTaskQueue
https://bugs.webkit.org/show_bug.cgi?id=226715

Reviewed by Michael Catanzaro.

Fixes a clang thread safety analysis warning in AbortableTaskQueue.

  • platform/AbortableTaskQueue.h:
4:11 AM Changeset in webkit [278553] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

$vm should have a function for checking if security assertions are enabled similar to $vm.assertEnabled
https://bugs.webkit.org/show_bug.cgi?id=226020
<rdar://problem/78567619>

Patch by Tuomas Karkkainen <tuomas.webkit@apple.com> on 2021-06-07
Reviewed by Mark Lam.

Add method $vm.securityAssertEnabled() which parallels $vm.assertEnabled(), and allows
checking at runtime whether the current JavaScriptCore build has security assertions enabled.

  • tools/JSDollarVM.cpp:
3:43 AM Changeset in webkit [278552] by commit-queue@webkit.org
  • 3 edits in trunk

[GTK][WPE] Bump libsoup3 version to 2.99.8
https://bugs.webkit.org/show_bug.cgi?id=226713

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-06-07
Reviewed by Philippe Normand.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
1:53 AM Changeset in webkit [278551] by vjaquez@igalia.com
  • 94 edits
    13 adds
    1 delete in trunk/Source/ThirdParty/libwebrtc

Update libyuv to M92
https://bugs.webkit.org/show_bug.cgi?id=226489

Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • Source/third_party/libyuv: Resynced.
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

Updated 10 bits frame conversion routine to use new libyuv routines (covered by webrtc/vp9-profile2.html)

  • libwebrtc.xcodeproj/project.pbxproj:
1:37 AM Changeset in webkit [278550] by Philippe Normand
  • 2 edits in trunk/Tools/buildstream

Unreviewed, fix libsoup3 build in Flatpak SDK

  • elements/sdk/libsoup3.bst:
1:28 AM Changeset in webkit [278549] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Update to libsoup3 2.99.8
https://bugs.webkit.org/show_bug.cgi?id=226712

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-06-07
Reviewed by Philippe Normand.

  • elements/sdk/libsoup3.bst:
1:21 AM Changeset in webkit [278548] by Carlos Garcia Campos
  • 5 edits in trunk

[GTK][WPE] Signal "window-object-cleared" not emitted unless frame js context is get before
https://bugs.webkit.org/show_bug.cgi?id=221771

Reviewed by Michael Catanzaro.

Source/WebKit:

This is because when FrameLoader::dispatchDidClearWindowObjectInWorld() is called, the JSWindowProxy for the
world hasn't been created yet, so it returns early. But we want to dispatch it always for worlds created by the
API, to ensure that WebKitScriptWorld::window-object-cleared is emmitted.

  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Implement globalObjectIsAvailableForFrame() to force the

creation of the JavaScript context for existing WebKitScriptWorlds.

Tools:

Update window-object-cleared test to check that the signal is emitted for the WebKitScriptWorld objects created
by the extension.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:

(UserMessageTest::sendMessage):
(UserMessageTest::viewUserMessageReceived):
(UserMessageTest::waitUntilViewMessagesReceived):
(UserMessageTest::waitUntilViewMessageReceived):
(testWebExtensionWindowObjectCleared):
(beforeAll):

  • TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:

(windowObjectCleared):
(isolatedWorldWindowObjectCleared):
(webkit_web_extension_initialize_with_user_data):

Jun 6, 2021:

11:59 PM Changeset in webkit [278547] by youenn@apple.com
  • 38 edits
    1 copy
    2 moves
    1 add in trunk/Source/ThirdParty/libwebrtc

Update libsrtp to M92
https://bugs.webkit.org/show_bug.cgi?id=226487

Reviewed by Eric Carlson.

  • Configurations/libsrtp.xcconfig:
  • Source/third_party/libsrtp: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:
11:31 PM Changeset in webkit [278546] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Unreviewed, reverting r277464.
https://bugs.webkit.org/show_bug.cgi?id=226709

No longer necessary

Reverted changeset:

"Work around WebCore failing to build due to NDEBUG getting
undefined in release"
https://bugs.webkit.org/show_bug.cgi?id=225782
https://trac.webkit.org/changeset/277464

11:19 PM Changeset in webkit [278545] by Antti Koivisto
  • 9 edits
    1 add in trunk/Source/WebCore

Factor selection clamping into a type
https://bugs.webkit.org/show_bug.cgi?id=226697

Reviewed by Sam Weinig.

TextBoxSelectableRange will be helpful for moving selection code out of the legacy inline boxes.
It also allows some code sharing already in this patch.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::isSelectable const):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::positionForOffset const):
(WebCore::LayoutIntegration::RunIteratorModernPath::isSelectable const):
(WebCore::LayoutIntegration::RunIteratorModernPath::selectionRect const):
(WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const):
(WebCore::LayoutIntegration::RunIteratorModernPath::clampedOffset const): Deleted.

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::isSelectable const):
(WebCore::LegacyInlineTextBox::localSelectionRect const):
(WebCore::LegacyInlineTextBox::paint):
(WebCore::LegacyInlineTextBox::selectableRange const):
(WebCore::LegacyInlineTextBox::clampedStartEndForState const):
(WebCore::LegacyInlineTextBox::calculateDocumentMarkerBounds const):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDraggedContent):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDocumentMarkers const):
(WebCore::LegacyInlineTextBox::paintCompositionBackground):
(WebCore::LegacyInlineTextBox::positionForOffset const):
(WebCore::LegacyInlineTextBox::isSelected const): Deleted.
(WebCore::LegacyInlineTextBox::clampedOffset const): Deleted.

  • rendering/LegacyInlineTextBox.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineSelectionGaps):

  • rendering/TextBoxSelectableRange.h: Added.

(WebCore::TextBoxSelectableRange::clamp const):
(WebCore::TextBoxSelectableRange::intersects const):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::localSelectionRect const):

11:16 PM Changeset in webkit [278544] by Chris Dumez
  • 5 edits
    1 delete in trunk/Source/WebCore

Drop MainThreadTaskDispatcher and use callOnMainThread() instead
https://bugs.webkit.org/show_bug.cgi?id=226701

Reviewed by Darin Adler.

Drop MainThreadTaskDispatcher and use callOnMainThread() instead. There is a no need for a
global Timer or a Deque of tasks.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/DeferrableTask.h:

(WebCore::MainThreadDeferrableTask::scheduleTask):

  • platform/GenericTaskQueue.cpp: Removed.
  • platform/GenericTaskQueue.h:

(WebCore::MainThreadTaskQueue::MainThreadTaskQueue):
(WebCore::MainThreadTaskQueue::enqueueTask):

9:22 PM Changeset in webkit [278543] by Chris Dumez
  • 10 edits
    1 add in trunk/Source

Stop using legacy EventLoopDeferrableTask
https://bugs.webkit.org/show_bug.cgi?id=226700

Reviewed by Darin Adler.

Source/WebCore:

Stop using legacy EventLoopDeferrableTask and drop the class entirely. Call sites are
now using the HTML event loop directly and using WTF::CancellableTask to wrap the task
they schedule. This achieves the same result as EventLoopDeferrableTask but is more
lightweight and flexible.

  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::DocumentTimelinesController):
(WebCore::DocumentTimelinesController::detachFromDocument):
(WebCore::DocumentTimelinesController::cacheCurrentTime):

  • animation/DocumentTimelinesController.h:
  • dom/ActiveDOMObject.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::cancelPendingTasks):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
(WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):
(WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):

  • html/HTMLMediaElement.h:
  • platform/DeferrableTask.h:

Source/WTF:

Introduce new WTF::CancellableTask type which is a wrapper around a WTF::Function.
It can create a handle for the task and this handle can be used to check if the
task is still pending and to cancel it. This is useful when scheduling tasks in the
event loop for example as there are cases where we need to know if a task we
scheduled is still pending (to avoid double scheduling) or where we need to cancel
a previously scheduled task.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CancellableTask.h: Added.

(WTF::CancellableTask::CancellableTask):
(WTF::CancellableTask::operator()):
(WTF::CancellableTask::isPending const):
(WTF::CancellableTask::cancel):
(WTF::CancellableTask::Handle::Handle):
(WTF::CancellableTask::Handle::isPending const):
(WTF::CancellableTask::Handle::cancel):
(WTF::CancellableTask::createHandle):

9:11 PM Changeset in webkit [278542] by Wenson Hsieh
  • 29 edits in trunk/Source

Turn TextIteratorBehaviorFlag into an enum class and wrap it in OptionSet
https://bugs.webkit.org/show_bug.cgi?id=226691

Reviewed by Darin Adler.

Source/WebCore:

Modernize some editing code by turning TextIteratorBehaviorFlag into an enum class, TextIteratorBehavior,
with an explicit width of 16 bits. Additionally, since this is a bitmask, refactor various codepaths to use
OptionSet<TextIteratorBehavior> instead of the underlying type.

This gives us improved type safety when using this enum, and also narrows the width of this enum to 16 bits
(from 32). No change in behavior.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::rangeMatchesTextNearRange):
(WebCore::AXObjectCache::nextBoundary):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/atk/WebKitAccessibleHyperlink.cpp:

(rangeLengthForObject):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(getSelectionOffsetsForObject):

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(objectFocusedAndCaretOffsetUnignored):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::textIteratorBehaviorForTextRange const):

Fix this method to return the empty (default) option set instead of false (which was previously implicitly
converted to TextIteratorDefaultBehavior).

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyBlockStyle):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/Editing.cpp:

(WebCore::indexForVisiblePosition):
(WebCore::visiblePositionForIndex):

  • editing/Editor.cpp:

(WebCore::Editor::selectedText const):
(WebCore::Editor::selectedTextForDataTransfer const):

  • editing/Editor.h:
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::ReplacementFragment):

  • editing/TextIterator.cpp:

(WebCore::isClippedByFrameAncestor):
(WebCore::TextIterator::TextIterator):
(WebCore::TextIterator::init):
(WebCore::firstChild):
(WebCore::nextSibling):
(WebCore::nextNode):
(WebCore::isDescendantOf):
(WebCore::parentNodeOrShadowHost):
(WebCore::TextIterator::advance):
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextRun):
(WebCore::TextIterator::handleTextNodeFirstLetter):
(WebCore::TextIterator::handleReplacedElement):
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
(WebCore::TextIterator::shouldEmitSpaceBeforeAndAfterNode):
(WebCore::TextIterator::handleNonTextNode):
(WebCore::TextIterator::exitNode):
(WebCore::TextIterator::emitText):
(WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
(WebCore::SimplifiedBackwardsTextIterator::exitNode):
(WebCore::CharacterIterator::CharacterIterator):
(WebCore::characterCount):
(WebCore::resolveCharacterRange):
(WebCore::hasAnyPlainText):
(WebCore::plainText):
(WebCore::plainTextReplacingNoBreakSpace):
(WebCore::findIteratorOptions):

  • editing/TextIterator.h:

(WebCore::characterCount):
(WebCore::characterRange):
(WebCore::resolveCharacterLocation):
(WebCore::resolveCharacterRange):
(WebCore::plainText):
(WebCore::hasAnyPlainText):
(WebCore::plainTextReplacingNoBreakSpace):
(WebCore::TextIterator::TextIterator):
(WebCore::CharacterIterator::CharacterIterator):

  • editing/TextIteratorBehavior.h:

Add an alias for OptionSet<TextIteratorBehavior>, TextIteratorBehaviors, to help with readability when
specifying or consulting these flags. Additionally remove the TextIteratorDefaultBehavior enum value
altogether, since we can now just use the default constructor (OptionSet<TextIteratorBehavior> { }) to get a
set of empty options.

  • editing/TextManipulationController.cpp:

(WebCore::ParagraphContentIterator::ParagraphContentIterator):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::appendTrailingWhitespace):

  • editing/VisibleUnits.cpp:

(WebCore::nextBoundary):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::renderedTextRespectingRange):

  • page/EventHandler.cpp:

(WebCore::textDistance):

Source/WebKit:

See WebCore/ChangeLog for more information.

  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

(WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::plainTextForDisplay):
(WebKit::rangeNearPositionMatchesText):

Source/WebKitLegacy/mac:

See WebCore/ChangeLog for more information.

  • WebView/WebFrame.mm:

(-[WebFrame _stringForRange:]):

8:53 PM Changeset in webkit [278541] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Flaky assertion hit in AudioSessionRoutingArbitratorProxy::endRoutingArbitration()
https://bugs.webkit.org/show_bug.cgi?id=226699

Reviewed by Darin Adler.

If m_setupArbitrationOngoing is true, then beginRoutingArbitrationForToken() only adds the token to
m_tokens once the setup is done, asynchronously. As a result, if endRoutingArbitrationForToken() during
setup, the isInRoutingArbitrationForToken(token) assertion will hit, because the token wasn't added
to m_tokens yet. Tweak the assertion so that it doesn't hit when m_setupArbitrationOngoing is true.

This is a speculative fix as I wasn't able to reproduce the assertion hit locally.

  • platform/audio/mac/SharedRoutingArbitrator.mm:

(WebCore::SharedRoutingArbitrator::endRoutingArbitrationForToken):

7:39 PM Changeset in webkit [278540] by Darin Adler
  • 66 edits in trunk

Handle custom identifiers and strings separately, so we can quote strings correctly consistently
https://bugs.webkit.org/show_bug.cgi?id=226694

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-animations/parsing/animation-name-valid-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-negative-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-pad-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-symbols-syntax-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-area-computed-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-area-shorthand-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-area-valid-expected.txt:
  • web-platform-tests/css/css-lists/parsing/content-invalid-expected.txt:
  • web-platform-tests/css/css-transitions/transition-property-002-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-pseudo-expected.txt:
  • web-platform-tests/css/cssom/serialize-values-expected.txt:

Rebased to reflect progressions. In some cases the entire test passes, in other cases we still
have failures, but the string serialization part of the test has progressed.

Source/WebCore:

Progressions in a number of WPT tests.

  • animation/CSSAnimation.cpp:

(WebCore::CSSAnimation::CSSAnimation): Update since Animation::name() now
returns a struct.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes): Ditto.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::OrderedNamedLinesCollector::appendLines const): Use
createCustomIdent for line names.
(WebCore::valueForGridPosition): Use createCustomIdent for grid line name.
(WebCore::createTransitionPropertyValue): Use createCustomIdent for
animation property names.
(WebCore::counterToCSSValue): Use createCustomIdent for counter names.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle): Use
createCustomIdent for list-style-type, locale, animation names if they
were created from a custom-ident, and line-grid.

  • css/CSSCustomIdentValue.cpp: Emptied out this file; we can delete it soon.
  • css/CSSCustomIdentValue.h: Ditto.
  • css/CSSMarkup.cpp:

(WebCore::serializeCharacterAsCodePoint): Optimized to do a single
StringBuilder::append call.
(WebCore::serializeAsStringOrCustomIdent): Deleted.

  • css/CSSMarkup.h: Removed serializeAsStringOrCustomIdent.
  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion): Added a case for
CustomIdent. Changed CSS_IDENT to assert not reached, since it should
never be passed to this function. More cleanup of CSSUnitType is needed,
but for now mostly leaving it alone.
(WebCore::isStringType): Added a case for CustomIdent. Moved CSS_DIMENSION,
which was incorrectly returning true, to return false. Pretty sure there's
no way to create one of these with CSS_DIMENSION, but this is less peculiar.
(WebCore::CSSPrimitiveValue::primitiveType const): Added transformation
from CustomIdent to CSS_IDENT as we do with CSS_PROPERTY_ID and CSS_VALUE_ID.
(WebCore::CSSPrimitiveValue::cleanup): Added a case for CustomIdent.
Moved CSS_DIMENSION to the correct section. Pretty sure there's no way to
create one of these with CSS_DIMENSION, but this is less peculiar.
(WebCore::CSSPrimitiveValue::setFloatValue): Deleted.
(WebCore::CSSPrimitiveValue::setStringValue): Deleted.
(WebCore::CSSPrimitiveValue::getStringValue const): Deleted.
(WebCore::CSSPrimitiveValue::stringValue const): Added a case for CustomIdent.
(WebCore::CSSPrimitiveValue::unitTypeString): Added a case for CustomIdent
and an ASSERT_NOT_REACHED for invalid enumeration values.
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
Removed inaccurate FIXME comment for CSS_DIMENSION and changed it to do
something less wrong, but still incorrect. Pretty sure there's no way to
create one of these with CSS_DIMENSION, but this is less peculiar. Changed
CSS_STRING case to always serializeAsString. Added a CustomIdent case
that always serializes as an identifier.
(WebCore::CSSPrimitiveValue::equals const): Moved the CSS_DIMENSION to
the correct part of this switch statement. Pretty sure there's no way to
create one of these with CSS_DIMENSION, but this is less peculiar.
Added case for CustomIdent.

  • css/CSSPrimitiveValue.h: Made isFontRelativeLength, isResolution,

and isViewportPercentageLength private. Made those plus isLength all
constexpr. Removed WEBCORE_EXPORT from primitiveType and getFloatValue:
those needed to be exported when this was the web-exposed class, but
that is now DeprecatedCSSOMPrimitiveValue. Deleted setFloatValue,
setStringValue, and getStringValue for the same reason: those functions
are now in DeprecatedCSSOMPrimitiveValue and don't need to be here.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationName): Updated to pass a boolean
in to the animation name to keep track of whether it was created with
a string or a custom-ident so we it can properly round-trip in computed
style. This is required to pass some of the WPT tests, although I could
not find clear guidance in the specification that this behavior is required.
The same name with a string and custom-ident are equivalent in other ways.

  • css/CSSUnits.cpp:

(WebCore::operator<<): Added a case for CustomIdent.

  • css/CSSUnits.h: Added CustomIdent. Added some FIXME about how we can

change this in the future. It's a remnant of the past when these were part
of our web-facing API, and this can be greatly cleaned up.

  • css/CSSValue.cpp:

(WebCore::CSSValue::cssText const): Removed CSSCustomIdentValue.h,
CustomIdentClass, CSSCustomIdentValue. We are not going to use a separate
class for custom-ident, just a separate type of primitive value.
(WebCore::CSSValue::destroy): Ditto.

  • css/CSSValue.h: Deleted isCustomIdentValue and CustomIdentClass.
  • css/CSSValueList.cpp:

(WebCore::CSSValueList::customCSSText const): Tweaked algorithm
to be slightly more efficient.

  • css/CSSValuePool.h: Added createCustomIdent. Later should remove

the create function that takes a string value and a type and use
separate named functions for the few different cases, but doing the
new one this way for now.

  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
Rewrote this to be a switch that preserves the current behavior
but no longer relies on the numeric values of CSSUnitType values.
Added a FIXME about using CSS_UNKNOWN more: some of the numbers
we are exposing to the web are doing no good.
(WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue): Moved this
function to the header.
(WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue const):
Rewrote this to be a switch as above. Preserves current behavior
but stops relying on CSSUnitType numeric values.
(WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue): Moved this
function to the header.
(WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue const):
Ditto. By putting a switch on primitiveType here, we can enforce
the desired exception behavior here, instead of getting it from
CSSPrimitiveValue, and it's better for this class to deal with
the legacy bindings issues.
(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue const): Ditto.
(WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue const): Ditto.
(WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue const): Ditto.

  • css/DeprecatedCSSOMPrimitiveValue.h: Removed unneeded cssValueType

function. Made both setFloatValue and setStringValue simpler since
they always raise an exception and we do not intend to change that.
Also stop using protected since we have no classes derived from this.
Could do more cleanup, but this is a start.

  • css/DeprecatedCSSOMValue.cpp:

(WebCore::DeprecatedCSSOMValue::cssValueType const): Put the constant
values, CSS_PRIMITIVE_VALUE and CSS_VALUE_LIST, here rather than
calling member functions.

  • css/DeprecatedCSSOMValueList.cpp:

(WebCore::DeprecatedCSSOMValueList::cssText const): Tweaked to make
the code more efficient.

  • css/DeprecatedCSSOMValueList.h: Removed unneeded cssValueType

function and const overload of item function. Also stop using protected
since we have no classes derived from this.

  • css/MediaQueryExpression.cpp:

(WebCore::featureWithValidIdent): Fixed indentation to match WebKit style.
(WebCore::featureWithValidDensity): Ditto.
(WebCore::featureWithValidPositiveLength): Ditto.
(WebCore::featureExpectingPositiveInteger): Ditto.
(WebCore::featureWithPositiveNumber): Ditto.

  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::hasDoubleValue): Added a case for CustomIdent.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWillChange): Removed comment saying we should use
CSSCustomIdentValue since using a property ID for the value is great.
(WebCore::consumeAnimationName): Removed comment saying we should use
CSSCustomIdentValue here because that would be incorrect: we need to
preserve and round-trip the fact that this was string, not custom-ident.
(WebCore::consumeTransitionProperty): Remove special case for
CSSValueAll that wasn't doing anything. Removed comment saying we should
use CSSCustomIdentValue since using a value ID for the value is great.
(WebCore::consumeAttr): Updated comment.
(WebCore::isCustomIdentValue): Updated to work with the new primitive value.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
Use the new createCustomIdent and removed an outdated comment. While we
might some day want to implement custom-ident differently, we won't need
to change the code here to make that happen.

  • platform/animation/Animation.cpp:

(WebCore::Animation::animationsMatch const): Update since m_name now is a
struct.
(WebCore::Animation::initialName): Update to return Name instead of String.
(WebCore::operator<<): Update since name() now returns a struct.

  • platform/animation/Animation.h: Added the Name struct so we can store a

boolean to indicate whether it's a string or custom-ident for round tripping.
Update types and implementations of function and data members accordingly.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::createGridPosition): Update code to expect
custom-ident instead of string; they used to both be the same thing.

  • style/Styleable.cpp:

(WebCore::shouldConsiderAnimation): Update since Animation::name() now
returns a struct. Also got rid of unsuccessful attempt to optimize comparison
againt the string "none"; later might be good to clean out that special case.
(WebCore::Styleable::updateCSSAnimations const): Ditto.

Tools:

  • TestRunnerShared/TestFeatures.cpp:

(WTR::parseTestHeader): Fixed a missing quote that made a log message read strangely.

LayoutTests:

  • TestExpectations: Removed expected failures from 13 css-counter-styles tests that are not

currently failing. I had planned to work on making more of these pass, but first found I could
fix them with a corrected custom-ident implementation.

  • css3/supports-expected.txt: Rebased.
  • css3/supports.html: Updated to expect the value of the content property to be a quoted string,

rather than the old behavior, which was to leave the string unquoted if it happened to be a
string with all characters legal for a custom-ident. New expectation is the correct behavior.

  • fast/css/alt-inherit-initial-expected.txt: Rebased.
  • fast/css/alt-inherit-initial.html: Updated to expect the value of the language property to be

a custom-ident, and serialize unusual cases with custom-ident rules, not as a quoted string. New
expectation is the correct behavior.

  • fast/css/content-language-comma-separated-list-expected.txt: Ditto.
  • fast/css/content-language-empty-expected.txt: Ditto.
  • fast/css/content-language-only-whitespace-expected.txt: Ditto.
  • fast/css/content-language-with-whitespace-expected.txt: Ditto.
  • fast/css/getComputedStyle/computed-style-properties-expected.txt: Rebased.
  • fast/css/getComputedStyle/computed-style-properties.html: Expect content string (see above).
  • fast/css/lang-mapped-to-webkit-locale-expected.txt: Rebased.
  • fast/css/lang-mapped-to-webkit-locale.xhtml: Expect language custom-ident (see above).
  • fast/css/nested-at-rules-expected.txt: Rebased.
  • fast/css/nested-at-rules.html: Expect content string (see above).
  • fast/css/parsing-text-emphasis-expected.txt: Rebased.
  • fast/css/parsing-text-emphasis.html: Updated to expect strings to remaing quoted strings in

the text-emphasis property, not change into custom-ident if all characters happen to fit.

  • fast/encoding/css-charset-default-expected.txt: Expect content string (see above).
  • inspector/css/pseudo-element-matches-for-pseudo-element-node-expected.txt: Ditto.
5:01 PM Changeset in webkit [278539] by Jean-Yves Avenard
  • 10 edits in trunk/Source

[GPUP][MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize
https://bugs.webkit.org/show_bug.cgi?id=226034
rdar://78579904

Reviewed by Eric Carlson.

Source/WebCore:

Existing media-source-append-buffer-full-quota-exceeded-error.html test will
be exercising this code once bug 225367 has been fixed.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferInternal): fly-by fix, use size of pending
buffer rather than the capacity of the holding vector.

  • platform/graphics/SourceBufferPrivate.h: Make totalTrackBufferSizeInBytes method virtual.

Source/WebKit:

Cache the size of the remote source buffer's track size. We pass an extra
totalTrackBufferSizeInBytes argument to each method that could impact
a source buffer size.

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:

(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete):
(WebKit::RemoteSourceBufferProxy::removeCodedFrames):
(WebKit::RemoteSourceBufferProxy::evictCodedFrames):

  • GPUProcess/media/RemoteSourceBufferProxy.h:
  • GPUProcess/media/RemoteSourceBufferProxy.messages.in:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::abort): Add comment explaining on why
getting an up to date totalTrackBufferSizeInBytes isn't necessary at this point.
(WebKit::SourceBufferPrivateRemote::removeCodedFrames):
(WebKit::SourceBufferPrivateRemote::evictCodedFrames):
(WebKit::SourceBufferPrivateRemote::clearTrackBuffers):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete):
(WebKit::SourceBufferPrivateRemote::totalTrackBufferSizeInBytes const):

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in:
12:13 PM Changeset in webkit [278538] by Chris Dumez
  • 22 edits in trunk/Source/WebCore

Reduce use of legacy EventLoopEventQueue and EventLoopTaskQueue
https://bugs.webkit.org/show_bug.cgi?id=226692

Reviewed by Darin Adler.

Reduce use of legacy EventLoopEventQueue and EventLoopTaskQueue, and use the HTML event
loop directly instead. Those are very simple cases, they really don't need any of the
features the queue was providing (such as cancelling events).

To get rid of the remaining usage of EventLoopEventQueue / EventLoopTaskQueue, I believe
we'll need a way to cancel tasks scheduled in the HTML event loop.

  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):
(WebCore::MediaSessionCoordinator::coordinatorStateChanged):

  • Modules/mediasession/MediaSessionCoordinator.h:
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::virtualHasPendingActivity const):
(WebCore::MediaSource::scheduleEvent):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::virtualHasPendingActivity const):
(WebCore::SourceBuffer::scheduleEvent):

  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::SourceBufferList):
(WebCore::SourceBufferList::scheduleEvent):

  • Modules/mediasource/SourceBufferList.h:
  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::RemotePlayback):
(WebCore::RemotePlayback::watchAvailability):
(WebCore::RemotePlayback::cancelWatchAvailability):
(WebCore::RemotePlayback::prompt):
(WebCore::RemotePlayback::setState):
(WebCore::RemotePlayback::disconnect):
(WebCore::RemotePlayback::availabilityChanged):
(WebCore::RemotePlayback::stop): Deleted.

  • Modules/remoteplayback/RemotePlayback.h:
  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::DocumentTimelinesController):
(WebCore::DocumentTimelinesController::detachFromDocument):
(WebCore::DocumentTimelinesController::cacheCurrentTime):
(WebCore::DocumentTimelinesController::maybeClearCachedCurrentTime):

  • animation/DocumentTimelinesController.h:
  • dom/FullscreenManager.cpp:

(WebCore::FullscreenManager::FullscreenManager):
(WebCore::FullscreenManager::requestFullscreenForElement):
(WebCore::FullscreenManager::exitFullscreen):
(): Deleted.

  • dom/FullscreenManager.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::removedFromAncestor):
(WebCore::HTMLMediaElement::scheduleResolvePendingPlayPromises):
(WebCore::HTMLMediaElement::scheduleRejectPendingPlayPromises):
(WebCore::HTMLMediaElement::scheduleNotifyAboutPlaying):
(WebCore::HTMLMediaElement::setMediaKeys):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::virtualHasPendingActivity const):
(WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::isVisibleInViewportChanged):

  • html/HTMLMediaElement.h:
  • html/shadow/MediaControlTextTrackContainerElement.cpp:

(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):

  • html/shadow/MediaControlTextTrackContainerElement.h:
  • html/track/TrackListBase.cpp:

(WebCore::TrackListBase::TrackListBase):
(WebCore::TrackListBase::scheduleChangeEvent):
(WebCore::TrackListBase::isChangeEventScheduled const):
(WebCore::TrackListBase::virtualHasPendingActivity const): Deleted.

  • html/track/TrackListBase.h:
  • platform/network/curl/CurlMultipartHandle.cpp:

(WebCore::CurlMultipartHandle::processContent):
(WebCore::CurlMultipartHandle::matchedLength):

  • platform/network/curl/CurlMultipartHandle.h:
  • testing/MockMediaSessionCoordinator.h:
8:15 AM Changeset in webkit [278537] by Alan Bujtas
  • 9 edits
    2 adds in trunk

[LFC][TFC] Adopt a less quirky fixed column width space distribution
https://bugs.webkit.org/show_bug.cgi?id=226696

Reviewed by Antti Koivisto.

Source/WebCore:

This patch adopts a less quirky space distribution model where any fixed cell width
makes the column fixed (as opposed to just when <col> has fixed with).
This distribution model matches both Chrome and Firefox.
It also enables us to simplify some of the distribution logic by using the same set of values (min vs max)
as the base for the distribution ratio.

Test: fast/layoutformattingcontext/table-fixed-width-variations-simple.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): Collect the fixed with values from the cells too now.

  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::intrinsicWidthConstraintsForCellContent const):
(WebCore::Layout::TableFormattingGeometry::intrinsicWidthConstraintsForCell const): Deleted.

  • layout/formattingContexts/table/TableFormattingGeometry.h:
  • layout/formattingContexts/table/TableGrid.cpp:

(WebCore::Layout::TableGrid::appendCell):
(WebCore::Layout::TableGrid::Column::isFixedWidth const): Deleted.
(WebCore::Layout::TableGrid::Columns::hasFixedColumnsOnly const): Deleted.
(WebCore::Layout::TableGrid::Cell::isFixedWidth const): Deleted.

  • layout/formattingContexts/table/TableGrid.h:

(WebCore::Layout::TableGrid::Column::setFixedWidth):
(WebCore::Layout::TableGrid::Column::fixedWidth const):
(WebCore::Layout::TableGrid::Columns::logicalWidth const):
(WebCore::Layout::TableGrid::Column::setHasFixedWidthCell): Deleted.
(WebCore::Layout::TableGrid::Column::hasFixedWidthCell const): Deleted.

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace): Adjust the distribution values based on whether
the column has fixed width and use max/max in both fixed and non-fixed cases.

LayoutTests:

  • TestExpectations: We don't match current WebKit space distribution anymore.
  • fast/layoutformattingcontext/table-fixed-width-variations-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-fixed-width-variations-simple.html: Added.
7:47 AM Changeset in webkit [278536] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

Unexport llvm coverage symbols to fix build
<https://webkit.org/b/226684>
<rdar://problem/78906691>

Reviewed by Darin Adler.

  • Scripts/check-for-weak-vtables-and-externals:
  • Revert change from r278444. That fixes errors when this script is run, but the Generate TAPI build phase for some projects still fails due to the new weak external symbols.
  • coverage/coverage.xcconfig:

(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Add.

  • Linker flags to unexport llvm symbols added by the compiler for coverage.

(OTHER_LDFLAGS):

  • Add $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE) to list of switches to unexport the symbols during linking.
7:44 AM Changeset in webkit [278535] by ddkilzer@apple.com
  • 9 edits
    2 adds in trunk/Source/WebKit

Weak external symbols found in WebKit.framework with Release+Coverage configuration
<https://webkit.org/b/226668>
<rdar://problem/78890081>

Reviewed by Darin Adler.

  • Configurations/WebKit.xcconfig:

(UNEXPORTED_SYMBOL_LDFLAGS):

  • Remove std::function<> symbols as those were replaced by WTF::Function<> a while ago.
  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::determineITPStateInternal):
(WebKit::doesParentProcessHaveITPEnabled):

  • Switch to use TCCSoftLink.h.
  • Shared/Cocoa/TCCSoftLink.h: Add.
  • Shared/Cocoa/TCCSoftLink.mm: Add.
  • Implement a single place for soft-linking to TCC.framework.
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getProcessIdentifier):

  • Change ProcessIdentifier to WebCore::ProcessIdentifier to fix the build since this source file no longer gets using namespace WebCore; from another source file after changes to SourcesCocoa.txt.
  • SourcesCocoa.txt:
  • Add DefaultWebBrowserChecks.mm since it no longer contains any SOFT_LINK macros.
  • Add new TCCSoftLink.mm file.
  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::checkUsageDescriptionStringForType):

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::isAXAuthenticated):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

  • Switch to use TCCSoftLink.h.
  • WebKit.xcodeproj/project.pbxproj:
  • Add TCCSoftLink.{h,mm} to the project.
  • Remove DefaultWebBrowserChecks.mm from the WebKit.framework target after adding it to SourcesCocoa.txt.
7:41 AM Changeset in webkit [278534] by Antti Koivisto
  • 28 edits
    4 moves in trunk/Source/WebCore

Rename InlineElementBox to LegacyInlineElementBox
https://bugs.webkit.org/show_bug.cgi?id=226695

Reviewed by Sam Weinig.

Also EllipsisBox -> LegacyEllipsisBox.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AXObjectCache.cpp:
  • dom/Position.cpp:
  • layout/integration/LayoutIntegrationRunIterator.h:
  • rendering/LegacyEllipsisBox.cpp: Renamed from Source/WebCore/rendering/EllipsisBox.cpp.

(WebCore::LegacyEllipsisBox::LegacyEllipsisBox):
(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::markupBox const):
(WebCore::LegacyEllipsisBox::paintMarkupBox):
(WebCore::LegacyEllipsisBox::selectionRect):
(WebCore::LegacyEllipsisBox::paintSelection):
(WebCore::LegacyEllipsisBox::nodeAtPoint):

  • rendering/LegacyEllipsisBox.h: Renamed from Source/WebCore/rendering/EllipsisBox.h.
  • rendering/LegacyInlineElementBox.cpp: Renamed from Source/WebCore/rendering/InlineElementBox.cpp.

(WebCore::LegacyInlineElementBox::deleteLine):
(WebCore::LegacyInlineElementBox::extractLine):
(WebCore::LegacyInlineElementBox::attachLine):
(WebCore::LegacyInlineElementBox::paint):
(WebCore::LegacyInlineElementBox::nodeAtPoint):

  • rendering/LegacyInlineElementBox.h: Renamed from Source/WebCore/rendering/InlineElementBox.h.

(WebCore::LegacyInlineElementBox::LegacyInlineElementBox):

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::nodeAtPoint):

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::selectionState):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::placeEllipsis):
(WebCore::LegacyRootInlineBox::ellipsisBox const):

  • rendering/LegacyRootInlineBox.h:
  • rendering/RenderBlock.cpp:
  • rendering/RenderBlock.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::createInlineBox):
(WebCore::RenderBox::positionLineBox):

  • rendering/RenderBox.h:

(WebCore::RenderBox::inlineBoxWrapper const):
(WebCore::RenderBox::setInlineBoxWrapper):

  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const):

  • rendering/RenderImage.cpp:
  • rendering/RenderInline.cpp:
  • rendering/RenderLineBoxList.cpp:
  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::createInlineBox):
(WebCore::RenderLineBreak::setInlineBoxWrapper):
(WebCore::RenderLineBreak::replaceInlineBoxWrapper):

  • rendering/RenderLineBreak.h:
  • rendering/RenderListItem.cpp:
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::createInlineBox):

  • rendering/RenderListMarker.h:
  • rendering/RenderReplaced.cpp:
  • rendering/RenderText.cpp:
  • rendering/RenderTextLineBoxes.cpp:

Jun 5, 2021:

10:27 PM Changeset in webkit [278533] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Fix repeated call to String::utf8() in SQLiteFileSystem::computeHashForFileName()
https://bugs.webkit.org/show_bug.cgi?id=226693

Reviewed by Darin Adler.

  • platform/sql/SQLiteFileSystem.cpp:

(WebCore::SQLiteFileSystem::computeHashForFileName):

10:25 PM Changeset in webkit [278532] by Chris Dumez
  • 104 edits in trunk

Use const uint8_t* type more consistently to store bytes in WebKit
https://bugs.webkit.org/show_bug.cgi?id=226688

Reviewed by Darin Adler.

Source/WebCore:

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::addAll):
(WebCore::DOMCache::put):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::append):

  • Modules/fetch/FetchBodyConsumer.h:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::OnMessage):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::didReceiveSocketStreamData):
(WebCore::WebSocketChannel::appendToBuffer):
(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::processFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
(WebCore::WebSocketChannel::sendFrame):

  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WebSocketDeflater.cpp:

(WebCore::setStreamParameter):
(WebCore::WebSocketDeflater::addBytes):
(WebCore::WebSocketInflater::addBytes):
(WebCore::WebSocketInflater::finish):

  • Modules/websockets/WebSocketDeflater.h:

(WebCore::WebSocketDeflater::data):
(WebCore::WebSocketInflater::data):

  • Modules/websockets/WebSocketFrame.cpp:

(WebCore::WebSocketFrame::parseFrame):
(WebCore::appendFramePayload):
(WebCore::WebSocketFrame::makeFrameData):
(WebCore::WebSocketFrame::WebSocketFrame):

  • Modules/websockets/WebSocketFrame.h:
  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::trimInputSample):
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::readStatusLine):
(WebCore::WebSocketHandshake::readHTTPHeaders):

  • Modules/websockets/WebSocketHandshake.h:
  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):

  • contentextensions/SerializedNFA.cpp:

(WebCore::ContentExtensions::writeAllToFile):

  • crypto/SubtleCrypto.cpp:

(WebCore::SubtleCrypto::unwrapKey):

  • crypto/mac/SerializedCryptoKeyWrapMac.mm:

(WebCore::findMasterKey):

  • dom/DecodedDataDocumentParser.cpp:

(WebCore::DecodedDataDocumentParser::appendBytes):

  • dom/DecodedDataDocumentParser.h:
  • dom/DocumentParser.h:
  • dom/RawDataDocumentParser.h:
  • html/ImageDocument.cpp:

(WebCore::ImageDocumentParser::appendBytes):

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::appendBytes):

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::appendBytes):

  • html/track/InbandTextTrack.h:
  • html/track/InbandWebVTTTextTrack.cpp:

(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):

  • html/track/InbandWebVTTTextTrack.h:
  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTParser::parseBytes):
(WebCore::WebVTTParser::fileFinished):

  • html/track/WebVTTParser.h:
  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::addData):

  • loader/DocumentWriter.h:
  • loader/SinkDocument.cpp:
  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):

  • platform/graphics/InbandTextTrackPrivateClient.h:
  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):

  • platform/network/HTTPParsers.cpp:

(WebCore::trimInputSample):
(WebCore::isValidHeaderNameCharacter):
(WebCore::parseHTTPHeader):
(WebCore::parseHTTPRequestBody):

  • platform/network/HTTPParsers.h:
  • platform/network/SocketStreamHandle.cpp:

(WebCore::SocketStreamHandle::sendData):

  • platform/network/SocketStreamHandle.h:
  • platform/network/SocketStreamHandleClient.h:
  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::readStreamCallback):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Source/WebKit:

  • GPUProcess/media/RemoteTextTrackProxy.cpp:

(WebKit::RemoteTextTrackProxy::parseWebVTTCueData):

  • GPUProcess/media/RemoteTextTrackProxy.h:
  • WebProcess/GPU/media/TextTrackPrivateRemote.cpp:

(WebKit::TextTrackPrivateRemote::parseWebVTTCueData):

8:21 PM Changeset in webkit [278531] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

[macOS] Dictionary lookup highlights in image overlays should include background content
https://bugs.webkit.org/show_bug.cgi?id=226686

Reviewed by Tim Horton.

Make a few minor adjustments to text indicator options on macOS when triggering Look Up.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performImmediateActionHitTestAtLocation):

Add both PaintAllContent and PaintBackgrounds options when creating text indicators, in the case where the
indicated range is inside an image overlay.

6:18 PM Changeset in webkit [278530] by Wenson Hsieh
  • 21 edits
    2 adds in trunk/Source

[macOS] Move DataDetectors softlinking in DataDetectorsSPI.h out into a separate PAL header
https://bugs.webkit.org/show_bug.cgi?id=226669

Reviewed by Sam Weinig.

Source/WebCore:

Clean up some softlinking code for the DataDetectors framework. Currently, the SOFT_LINK_* macros are defined
inside the SPI header (pal/spi/mac/DataDetectorsSPI.h); this patch moves them out into
pal/mac/DataDetectorsSoftLink.{h|mm} instead, and updates a few places that use these soft-linked symbols to
import DataDetectorsSoftLink.h instead of DataDetectorsSPI.h.

  • editing/cocoa/DataDetection.mm:

(WebCore::detectItem):
(WebCore::DataDetection::detectItemAroundHitTestResult):

  • page/mac/ImageOverlayControllerMac.mm:

(WebCore::ImageOverlayController::updateDataDetectorHighlights):
(WebCore::ImageOverlayController::platformHandleMouseEvent):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::mouseIsOverHighlight const):
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
(WebCore::ServicesOverlayController::buildSelectionHighlight):

  • platform/mac/DataDetectorHighlight.mm:

(WebCore::DataDetectorHighlight::setHighlight):
(WebCore::DataDetectorHighlight::paintContents):

Source/WebCore/PAL:

Add the new softlinking headers. See WebCore/ChangeLog for more details.

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/DataDetectorsCoreSoftLink.h:
  • pal/cocoa/DataDetectorsCoreSoftLink.mm:

Move the DDBinderPhoneNumberKey soft link into DataDetectorsCoreSoftLink instead, since this symbol comes
from DataDetectorsCore rather than the DataDetectors framework.

  • pal/mac/DataDetectorsSoftLink.h: Added.
  • pal/mac/DataDetectorsSoftLink.mm: Added.
  • pal/mac/QuickLookUISoftLink.h:
  • pal/spi/mac/DataDetectorsSPI.h:

Source/WebKit:

Adopt the new PAL softlinking header in a few places. See WebCore/ChangeLog for more details. Additionally, move
several softlinking header imports so that they're the last imported headers in a few sources.

  • Platform/mac/MenuUtilities.mm:

(WebKit::actionForMenuItem):
(WebKit::menuItemForTelephoneNumber):

  • Shared/Cocoa/DataDetectionResult.mm:

(WebKit::DataDetectionResult::decode):

  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::decode):

  • Shared/mac/WebHitTestResultData.mm:

(WebKit::WebHitTestResultData::platformDecode):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):

  • UIProcess/mac/WKImmediateActionController.mm:

(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):

Source/WebKitLegacy/mac:

Adopt the new PAL softlinking header in a few places. See WebCore/ChangeLog for more details.

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController _clearImmediateActionState]):
(-[WebImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):

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

Revert r277536. rdar://problem/78875336

Reverting for build failure.

4:22 PM Changeset in webkit [278528] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

[WebXR] Supply an IOSurface in SimulatedXRDevice
https://bugs.webkit.org/show_bug.cgi?id=226564
<rdar://problem/78793086>

Reviewed by Sam Weinig.

Rather than handle the case where we get a null IOSurface,
have the SimulatedXRDevice create one on each frame.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):

  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::frameTimerFired):

3:54 PM Changeset in webkit [278527] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Remove some duplicated code related to scrollbars
https://bugs.webkit.org/show_bug.cgi?id=226685

Reviewed by Alan Bujtas.

RenderLayerScrollableArea and RenderBox had some very similar code related to
computing whether scrollbars are present, so remove the duplication, and prepare
for ScrollbarOrientation to become an enum class.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hasAutoScrollbar const):
(WebCore::RenderBox::hasAlwaysPresentScrollbar const):
(WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const): Deleted.
(WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const): Deleted.

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

(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):
(WebCore::styleRequiresScrollbar): Deleted.
(WebCore::styleDefinesAutomaticScrollbar): Deleted.

2:18 PM Changeset in webkit [278526] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] WebXR on Cocoa doesn't work with webgl 1 contexts
https://bugs.webkit.org/show_bug.cgi?id=226675

Reviewed by Sam Weinig.

Support WebGL 1 contexts by attaching the correct combined depth+stencil
target.

While here, rename some variables to be a bit more clear about what
they do.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::~WebXROpaqueFramebuffer): Make sure we delete
the texture if we created one.
(WebCore::WebXROpaqueFramebuffer::startFrame): Use the correct attachment point
if we're a WebGL 1 context.
(WebCore::WebXROpaqueFramebuffer::setupFramebuffer):

7:09 AM BuildingGtk edited by Philippe Normand
(diff)
5:19 AM Changeset in webkit [278525] by Antti Koivisto
  • 47 edits
    2 moves in trunk/Source/WebCore

Rename InlineTextBox to LegacyInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=226633

Rubber-stamped by Sam Weinig.

More legacy line layout naming.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ContainerNode.cpp:
  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::addMarker):

  • dom/Position.cpp:
  • editing/CompositeEditCommand.cpp:
  • editing/Editor.h:
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::debugRenderer const):

  • editing/RenderedPosition.cpp:
  • editing/TextIterator.cpp:
  • editing/VisiblePosition.cpp:
  • layout/Verification.cpp:

(WebCore::Layout::checkForMatchingTextRuns):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • layout/formattingContexts/inline/text/TextUtil.h:
  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::firstTextRunInTextOrderFor):

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::PathTextRun::legacyInlineBox const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::traverseNextTextRunInTextOrder):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::inlineTextBox const):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isInlineTextBox const):

  • layout/layouttree/LayoutInlineTextBox.cpp:

(WebCore::Layout::InlineTextBox::InlineTextBox):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForSVGInlineText):

  • rendering/EllipsisBox.cpp:
  • rendering/LegacyInlineBox.h:
  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const):
(WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection):
(WebCore::LegacyInlineFlowBox::addTextBoxVisualOverflow):
(WebCore::LegacyInlineFlowBox::computeOverflow):
(WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const):

  • rendering/LegacyInlineFlowBox.h:
  • rendering/LegacyInlineTextBox.cpp: Renamed from Source/WebCore/rendering/InlineTextBox.cpp.

(WebCore::LegacyInlineTextBox::~LegacyInlineTextBox):
(WebCore::LegacyInlineTextBox::hasTextContent const):
(WebCore::LegacyInlineTextBox::markDirty):
(WebCore::LegacyInlineTextBox::logicalOverflowRect const):
(WebCore::LegacyInlineTextBox::setLogicalOverflowRect):
(WebCore::LegacyInlineTextBox::baselinePosition const):
(WebCore::LegacyInlineTextBox::lineHeight const):
(WebCore::LegacyInlineTextBox::selectionTop const):
(WebCore::LegacyInlineTextBox::selectionBottom const):
(WebCore::LegacyInlineTextBox::selectionHeight const):
(WebCore::LegacyInlineTextBox::isSelected const):
(WebCore::LegacyInlineTextBox::selectionState):
(WebCore::LegacyInlineTextBox::verifySelectionState const):
(WebCore::LegacyInlineTextBox::lineFont const):
(WebCore::snappedSelectionRect):
(WebCore::LegacyInlineTextBox::localSelectionRect const):
(WebCore::LegacyInlineTextBox::deleteLine):
(WebCore::LegacyInlineTextBox::extractLine):
(WebCore::LegacyInlineTextBox::attachLine):
(WebCore::LegacyInlineTextBox::placeEllipsisBox):
(WebCore::LegacyInlineTextBox::isLineBreak const):
(WebCore::LegacyInlineTextBox::nodeAtPoint):
(WebCore::LegacyInlineTextBox::emphasisMarkExistsAndIsAbove const):
(WebCore::createMarkedTextFromSelectionInBox):
(WebCore::LegacyInlineTextBox::paint):
(WebCore::LegacyInlineTextBox::clampedOffset const):
(WebCore::LegacyInlineTextBox::clampedStartEndForState const):
(WebCore::LegacyInlineTextBox::selectionStartEnd const):
(WebCore::LegacyInlineTextBox::highlightStartEnd const):
(WebCore::LegacyInlineTextBox::hasMarkers const):
(WebCore::LegacyInlineTextBox::paintPlatformDocumentMarkers):
(WebCore::LegacyInlineTextBox::calculateUnionOfAllDocumentMarkerBounds const):
(WebCore::LegacyInlineTextBox::calculateDocumentMarkerBounds const):
(WebCore::LegacyInlineTextBox::paintPlatformDocumentMarker):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDraggedContent):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDocumentMarkers const):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForHighlights const):
(WebCore::LegacyInlineTextBox::textOriginFromBoxRect const):
(WebCore::LegacyInlineTextBox::paintMarkedTexts):
(WebCore::LegacyInlineTextBox::paintMarkedTextBackground):
(WebCore::LegacyInlineTextBox::paintMarkedTextForeground):
(WebCore::LegacyInlineTextBox::paintMarkedTextDecoration):
(WebCore::LegacyInlineTextBox::paintCompositionBackground):
(WebCore::LegacyInlineTextBox::paintCompositionUnderlines const):
(WebCore::mirrorRTLSegment):
(WebCore::LegacyInlineTextBox::paintCompositionUnderline const):
(WebCore::LegacyInlineTextBox::caretMinOffset const):
(WebCore::LegacyInlineTextBox::caretMaxOffset const):
(WebCore::LegacyInlineTextBox::textPos const):
(WebCore::LegacyInlineTextBox::offsetForPosition const):
(WebCore::LegacyInlineTextBox::positionForOffset const):
(WebCore::LegacyInlineTextBox::createTextRun const):
(WebCore::LegacyInlineTextBox::text const):
(WebCore::LegacyInlineTextBox::combinedText const):
(WebCore::LegacyInlineTextBox::debugTextShadow):
(WebCore::LegacyInlineTextBox::expansionBehavior const):
(WebCore::LegacyInlineTextBox::boxName const):
(WebCore::LegacyInlineTextBox::outputLineBox const):

  • rendering/LegacyInlineTextBox.h: Renamed from Source/WebCore/rendering/InlineTextBox.h.

(WebCore::LegacyInlineTextBox::LegacyInlineTextBox):
(WebCore::LegacyInlineTextBox::renderer const):
(WebCore::LegacyInlineTextBox::lineStyle const):
(WebCore::LegacyInlineTextBox::prevTextBox const):
(WebCore::LegacyInlineTextBox::nextTextBox const):
(WebCore::LegacyInlineTextBox::setNextTextBox):
(WebCore::LegacyInlineTextBox::setPreviousTextBox):
(WebCore::LegacyInlineTextBox::start const):
(WebCore::LegacyInlineTextBox::end const):
(WebCore::LegacyInlineTextBox::len const):
(WebCore::LegacyInlineTextBox::setStart):
(WebCore::LegacyInlineTextBox::setLen):
(WebCore::LegacyInlineTextBox::offsetRun):
(WebCore::LegacyInlineTextBox::truncation const):
(WebCore::LegacyInlineTextBox::compareByStart):
(WebCore::LegacyInlineTextBox::logicalTopVisualOverflow const):
(WebCore::LegacyInlineTextBox::logicalBottomVisualOverflow const):
(WebCore::LegacyInlineTextBox::logicalLeftVisualOverflow const):
(WebCore::LegacyInlineTextBox::logicalRightVisualOverflow const):
(WebCore::LegacyInlineTextBox::dirtyOwnLineBoxes):
(WebCore::LegacyInlineTextBox::paintMarkedTexts):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::constructLine):
(WebCore::setLogicalWidthForTextRun):
(WebCore::LegacyLineLayout::computeExpansionForJustifiedText):
(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::applyExpansionBehavior):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::LegacyLineLayout::removeInlineBox const):
(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::isHyphenated const):
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):

  • rendering/RenderBlock.cpp:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineSelectionGaps):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::generateCulledLineBoxRects const):
(WebCore::RenderInline::culledInlineVisualOverflowBoundingBox const):
(WebCore::RenderInline::dirtyLineBoxes):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/RenderText.cpp:

(WebCore::RenderText::absoluteQuadsForRange const):
(WebCore::RenderText::createTextBox):
(WebCore::RenderText::positionLineBox):

  • rendering/RenderText.h:

(WebCore::RenderText::extractTextBox):
(WebCore::RenderText::attachTextBox):
(WebCore::RenderText::removeTextBox):
(WebCore::RenderText::createInlineTextBox):
(WebCore::RenderText::firstTextBox const):
(WebCore::RenderText::lastTextBox const):
(WebCore::RenderText::findNextInlineTextBox const):

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::createAndAppendLineBox):
(WebCore::RenderTextLineBoxes::extract):
(WebCore::RenderTextLineBoxes::attach):
(WebCore::RenderTextLineBoxes::remove):
(WebCore::RenderTextLineBoxes::deleteAll):
(WebCore::RenderTextLineBoxes::findNext const):
(WebCore::RenderTextLineBoxes::checkConsistency const):

  • rendering/RenderTextLineBoxes.h:

(WebCore::RenderTextLineBoxes::first const):
(WebCore::RenderTextLineBoxes::last const):

  • rendering/RenderTreeAsText.cpp:
  • rendering/TextDecorationPainter.h:

(WebCore::TextDecorationPainter::setInlineTextBox):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::clearGlyphDisplayLists):

  • rendering/svg/RenderSVGInlineText.cpp:

(WebCore::RenderSVGInlineText::createTextBox):

  • rendering/svg/RenderSVGInlineText.h:
  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::SVGInlineTextBox):
(WebCore::SVGInlineTextBox::dirtyOwnLineBoxes):
(WebCore::SVGInlineTextBox::dirtyLineBoxes):
(WebCore::SVGInlineTextBox::offsetForPositionInFragment const):
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::nodeAtPoint):

  • rendering/svg/SVGInlineTextBox.h:
  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGInlineTextBoxes):

  • style/InlineTextBoxStyle.cpp:

(WebCore::computeUnderlineOffset):
(WebCore::visualOverflowForDecorations):

  • style/InlineTextBoxStyle.h:
12:28 AM Changeset in webkit [278524] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Diff aspect-ratio property values correctly
https://bugs.webkit.org/show_bug.cgi?id=226673

Reviewed by Rob Buis.

Source/WebCore:

Test: fast/css/aspect-ratio-no-relayout.html

  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayout):

LayoutTests:

  • fast/css/aspect-ratio-no-relayout-expected.txt: Added.
  • fast/css/aspect-ratio-no-relayout.html: Added.

Jun 4, 2021:

10:45 PM Changeset in webkit [278523] by Chris Dumez
  • 7 edits in trunk/Source

Optimize a few call sites creating SharedBuffer objects
https://bugs.webkit.org/show_bug.cgi?id=226674

Reviewed by Darin Adler.

Source/WebCore:

  • Modules/mediastream/RTCRtpSFrameTransform.cpp:

(WebCore::transformFrame):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::interceptWithResponse):
(WebCore::InspectorNetworkAgent::interceptRequestWithResponse):

  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:

(WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsSinf):

  • workers/service/context/ServiceWorkerFetch.cpp:

(WebCore::ServiceWorkerFetch::processResponse):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadDataInFrame):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::loadSimulatedRequestAndResponse):

10:35 PM Changeset in webkit [278522] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

Reduce use of legacy MainThreadTaskQueue in media code
https://bugs.webkit.org/show_bug.cgi?id=226672

Reviewed by Darin Adler.

Reduce use of legacy MainThreadTaskQueue in media code. Simply use callOnMainThread()
for these instead.

  • platform/graphics/cocoa/TextTrackRepresentationCocoa.h:
  • platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:

(WebCore::TextTrackRepresentationCocoa::boundsChanged):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::CoreAudioCaptureDeviceManager::scheduleUpdateCaptureDevices):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
  • platform/mock/MediaPlaybackTargetPickerMock.cpp:

(WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::setState):

  • platform/mock/MediaPlaybackTargetPickerMock.h:
9:47 PM Changeset in webkit [278521] by Chris Dumez
  • 24 edits in trunk

FileSystem::readFromFile() should return data as void*
https://bugs.webkit.org/show_bug.cgi?id=226671

Reviewed by Darin Adler.

FileSystem::readFromFile() should return data as void* instead of char*. This is more flexible and
consistent with FileSystem::writeToFile().

Source/JavaScriptCore:

  • inspector/remote/socket/RemoteInspectorSocket.cpp:

(Inspector::RemoteInspector::backendCommands const):

Source/WebCore:

  • platform/FileHandle.cpp:

(WebCore::FileHandle::read):

  • platform/FileStream.cpp:

(WebCore::FileStream::read):

  • platform/FileStream.h:
  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::readSync):
(WebCore::BlobResourceHandle::readDataSync):
(WebCore::BlobResourceHandle::readFileSync):
(WebCore::BlobResourceHandle::notifyReceiveData):

  • platform/network/BlobResourceHandle.h:
  • platform/network/curl/CurlCacheEntry.cpp:

(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::loadResponseHeaders):
(WebCore::CurlCacheEntry::loadFileToBuffer):

  • platform/network/curl/CurlCacheEntry.h:
  • rendering/RenderThemeWin.cpp:

(WebCore::fillBufferWithContentsOfFile):
(WebCore::RenderThemeWin::stringWithContentsOfFile):

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:

(WebKit::NetworkCache::IOChannel::read):

  • Shared/PersistencyUtils.cpp:

(WebKit::createForFile):

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::appendFileContentsToFileHandle):
(WTF::FileSystemImpl::readOrMakeSalt):

  • wtf/FileSystem.h:
  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::readFromFile):

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::readFromFile):

  • wtf/win/FileSystemWin.cpp:

(WTF::FileSystemImpl::readFromFile):

Tools:

  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:

(TestWebKitAPI::readContentsOfFile):

9:39 PM Changeset in webkit [278520] by Chris Dumez
  • 9 edits in trunk

Worker.constructor throws an exception when the url param is an empty string
https://bugs.webkit.org/show_bug.cgi?id=226637

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT test now that it is passing.

  • web-platform-tests/workers/constructors/Worker/Worker-constructor-expected.txt:

Source/WebCore:

Stop throwing an exception if the Worker constructor gets called with an empty string.
Instead treat it as a relative URL, like Chrome and Firefox do.

No new tests, updated existing ones.

  • workers/AbstractWorker.cpp:

(WebCore::AbstractWorker::resolveURL):

LayoutTests:

Update existing tests to reflect behavior change.

  • fast/workers/worker-constructor-expected.txt:
  • fast/workers/worker-constructor.html:
  • http/tests/workers/worker-invalid-url-expected.txt:
  • http/tests/workers/worker-invalid-url.html:
7:21 PM Changeset in webkit [278519] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GLIB][GTK] Unreviewed test gardening. Remove flaky tests that have been constantly passing for the last 4000 revisions.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
7:17 PM Changeset in webkit [278518] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed Windows build fix after r278516.

  • platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:

(WebCore::WebCoreAVCFResourceLoader::dataReceived):

  • platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h:
7:15 PM Changeset in webkit [278517] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r275765) When ignoring HSTS, sometimes loads fail
https://bugs.webkit.org/show_bug.cgi?id=226670
<rdar://problem/78066692>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-06-04
Reviewed by Chris Dumez.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(setIgnoreHSTS):
Use the value passed in to the function instead of always false.

6:16 PM Changeset in webkit [278516] by Chris Dumez
  • 214 edits in trunk

Use Vector<uint8_t> instead of Vector<char> to store bytes in SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=226623

Reviewed by Darin Adler.

Use Vector<uint8_t> instead of Vector<char> to store bytes in SharedBuffer. Also have SharedBuffer::data()
return a const uint8_t* instead of const char*. This is our preferred type to store bytes.

Source/WebCore:

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consumeFormData):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::packageFormData):
(WebCore::resolveWithTypeAndData):

  • Modules/highlight/AppHighlight.h:

(WebCore::AppHighlight::encode const):

  • Modules/indexeddb/IDBGetResult.cpp:

(WebCore::IDBGetResult::dataFromBuffer):

  • Modules/indexeddb/server/IDBSerialization.cpp:

(WebCore::serializeIDBKeyData):

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::didReceiveRawData):

  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/RTCDataChannelRemoteHandler.cpp:

(WebCore::RTCDataChannelRemoteHandler::didReceiveRawData):
(WebCore::RTCDataChannelRemoteHandler::sendRawData):

  • Modules/mediastream/RTCDataChannelRemoteHandler.h:
  • Modules/mediastream/RTCDataChannelRemoteSource.h:

(WebCore::RTCDataChannelRemoteSource::sendRawData):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::sendRawData):
(WebCore::LibWebRTCDataChannelHandler::OnMessage):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):

  • fileapi/Blob.cpp:

(WebCore::Blob::Blob):

  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::enqueue):
(WebCore::NetworkSendQueue::processMessages):

  • fileapi/NetworkSendQueue.h:
  • inspector/NetworkResourcesData.cpp:

(WebCore::NetworkResourcesData::ResourceData::appendData):
(WebCore::NetworkResourcesData::maybeAddResourceData):

  • inspector/NetworkResourcesData.h:
  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didReceiveData):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::decodeBuffer):
(WebCore::InspectorPageAgent::dataContent):

  • inspector/agents/InspectorPageAgent.h:
  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::deliverResourceData):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::maybeCreateArchive):
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadResourceSynchronously):

  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer):

  • loader/NetscapePlugInStreamLoader.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveDataOrBuffer):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

  • loader/TextResourceDecoder.h:

(WebCore::TextResourceDecoder::decode):
(WebCore::TextResourceDecoder::decodeAndFlush):

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):

  • loader/archive/mhtml/MHTMLArchive.cpp:

(WebCore::MHTMLArchive::generateMHTMLData):

  • loader/archive/mhtml/MHTMLParser.cpp:

(WebCore::MHTMLParser::parseNextPart):

  • loader/cache/CachedRawResource.cpp:

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

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::ensureCustomFontData):

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::combineIntoOneSegment const):
(WebCore::SharedBuffer::data const):
(WebCore::SharedBuffer::tryCreateArrayBuffer const):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::DataSegment::data const):
(WebCore::SharedBuffer::DataSegment::size const):
(WebCore::SharedBufferDataView::data const):
(WebCore::utf8Buffer):

  • platform/SharedBuffer.h:
  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::extractKeyidsLocationFromCencInitData):
(WebCore::extractKeyidsFromCencInitData):

  • platform/graphics/Model.h:

(WebCore::Model::encode const):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemBuffer::append):

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::CDMInstanceThunder::setServerCertificate):
(WebCore::ParsedResponseMessage::ParsedResponseMessage):
(WebCore::CDMInstanceSessionThunder::errorCallback):
(WebCore::CDMInstanceSessionThunder::requestLicense):
(WebCore::CDMInstanceSessionThunder::updateLicense):
(WebCore::CDMInstanceSessionThunder::loadSession):

  • platform/graphics/opentype/OpenTypeTypes.h:

(WebCore::OpenType::TableBase::isValidEnd):

  • platform/mediastream/RTCDataChannelHandler.h:
  • platform/mediastream/RTCDataChannelHandlerClient.h:
  • platform/mediastream/RTCDataChannelRemoteSourceConnection.h:
  • platform/mock/RTCDataChannelHandlerMock.cpp:

(WebCore::RTCDataChannelHandlerMock::sendRawData):

  • platform/mock/RTCDataChannelHandlerMock.h:
  • platform/network/FormData.cpp:

(WebCore::FormData::asSharedBuffer const):

  • platform/network/ResourceHandleClient.cpp:

(WebCore::ResourceHandleClient::didReceiveBuffer):

  • platform/network/cocoa/RangeResponseGenerator.mm:

(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):

  • platform/text/TextEncoding.h:

(WebCore::TextEncoding::decode const):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

  • xml/XSLTProcessorLibxslt.cpp:

(WebCore::docLoaderFunc):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::OffsetBuffer::OffsetBuffer):

Source/WebKit:

  • Platform/IPC/SharedBufferCopy.h:

(IPC::SharedBufferCopy::data const):

  • PluginProcess/PluginControllerProxy.cpp:

(WebKit::PluginControllerProxy::streamDidReceiveData):
(WebKit::PluginControllerProxy::manualStreamDidReceiveData):

  • Shared/PersistencyUtils.cpp:

(WebKit::writeToDisk):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::tryConvertToShareableResourceHandle):

  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::didComplete):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveData):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::createMessageQueue):

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:

(WebKit::RTCDataChannelRemoteManager::sendData):
(WebKit::RTCDataChannelRemoteManager::receiveData):
(WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveRawData):

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.h:
  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:

(WebKit::parsePostBuffer):

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::streamDidReceiveData):
(WebKit::NetscapePlugin::manualStreamDidReceiveData):

  • WebProcess/Plugins/Netscape/NetscapePlugin.h:
  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:

(WebKit::NetscapePluginStream::didReceiveData):
(WebKit::NetscapePluginStream::sendJavaScriptStream):
(WebKit::NetscapePluginStream::deliverData):
(WebKit::NetscapePluginStream::deliverDataToFile):

  • WebProcess/Plugins/Netscape/NetscapePluginStream.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didReceiveData):
(WebKit::PDFPlugin::streamDidReceiveData):
(WebKit::PDFPlugin::manualStreamDidReceiveData):

  • WebProcess/Plugins/Plugin.h:
  • WebProcess/Plugins/PluginProxy.cpp:

(WebKit::PluginProxy::streamDidReceiveData):
(WebKit::PluginProxy::manualStreamDidReceiveData):

  • WebProcess/Plugins/PluginProxy.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::Stream::didReceiveData):
(WebKit::PluginView::manualLoadDidReceiveData):

  • WebProcess/Plugins/PluginView.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::committedLoad):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::bufferForType):

Source/WebKitLegacy/mac:

  • Plugins/Hosted/HostedNetscapePluginStream.h:
  • Plugins/Hosted/HostedNetscapePluginStream.mm:

(WebKit::HostedNetscapePluginStream::didReceiveData):

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(-[WebHostedNetscapePluginView pluginView:receivedData:]):

  • Plugins/WebNetscapePluginStream.h:
  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::didReceiveData):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView pluginView:receivedData:]):
(-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):

Tools:

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):
(TestWebKitAPI::checkBuffer):

5:57 PM Changeset in webkit [278515] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

[iOS] Meaningful click heuristic should account for media state changes
https://bugs.webkit.org/show_bug.cgi?id=226655
rdar://78330664

Reviewed by Tim Horton and Devin Rousso.

Source/WebKit:

Teach the "meaningful click" heuristic about changes to media element state flags. See comments below for more
details.

Test: fast/events/ios/meaningful-click-when-playing-media.html

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::isPlayingMediaDidChange):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::isPlayingMediaDidChange):

Refactor some logic here so that the WebChromeClient calls into WebPage, which then sends an IPC message to the
UI process and additionally calls into a private method for platform-specific logic (see WebPageIOS.mm).

  • WebProcess/WebPage/WebPage.h:

Replace m_didHandleOrPreventMouseDownOrMouseUpEventDuringSyntheticClick with another flag,
m_currentSyntheticClickMayNotBeMeaningful, that is initially set to true at the beginning of
WebPage::completeSyntheticClick, and consulted after the events have been dispatched to see if anything has
set it to false (currently, this includes only playing media state changes and handled click events by the
page). If the flag is set to false, we then consider the click to have been "meaningful", with respect to the
-_webView:didNotHandleTapAsMeaningfulClickAtPoint: UI delegate method.

(WebKit::WebPage::platformIsPlayingMediaDidChange):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::didHandleOrPreventMouseDownOrMouseUpEvent):
(WebKit::WebPage::platformIsPlayingMediaDidChange):

Make these set m_currentSyntheticClickMayNotBeMeaningful to false.

LayoutTests:

Add a layout test to verify that tapping to play or pause a video triggers "meaningful" synthetic clicks.

  • fast/events/ios/meaningful-click-when-playing-media-expected.txt: Added.
  • fast/events/ios/meaningful-click-when-playing-media.html: Added.
5:24 PM Changeset in webkit [278514] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit

Store MediaPlayer using WeakPtr in MediaPlayerPrivateRemote
https://bugs.webkit.org/show_bug.cgi?id=224421

Unreviewed. Address Darin's post commit commnet.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::load):
(WebKit::MediaPlayerPrivateRemote::networkStateChanged):
(WebKit::MediaPlayerPrivateRemote::setReadyState):
(WebKit::MediaPlayerPrivateRemote::readyStateChanged):
(WebKit::MediaPlayerPrivateRemote::volumeChanged):
(WebKit::MediaPlayerPrivateRemote::muteChanged):
(WebKit::MediaPlayerPrivateRemote::timeChanged):
(WebKit::MediaPlayerPrivateRemote::durationChanged):
(WebKit::MediaPlayerPrivateRemote::rateChanged):
(WebKit::MediaPlayerPrivateRemote::playbackStateChanged):
(WebKit::MediaPlayerPrivateRemote::engineFailedToLoad):
(WebKit::MediaPlayerPrivateRemote::characteristicChanged):
(WebKit::MediaPlayerPrivateRemote::sizeChanged):
(WebKit::MediaPlayerPrivateRemote::firstVideoFrameAvailable):
(WebKit::MediaPlayerPrivateRemote::renderingModeChanged):
(WebKit::MediaPlayerPrivateRemote::acceleratedRenderingStateChanged):
(WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteTextTrack):
(WebKit::MediaPlayerPrivateRemote::addRemoteVideoTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteVideoTrack):
(WebKit::MediaPlayerPrivateRemote::currentPlaybackTargetIsWirelessChanged):
(WebKit::MediaPlayerPrivateRemote::mediaPlayerKeyNeeded):
(WebKit::MediaPlayerPrivateRemote::waitingForKeyChanged):
(WebKit::MediaPlayerPrivateRemote::initializationDataEncountered):
(WebKit::MediaPlayerPrivateRemote::resourceNotSupported):
(WebKit::MediaPlayerPrivateRemote::activeSourceBuffersChanged):
(WebKit::MediaPlayerPrivateRemote::getRawCookies const):

5:22 PM Changeset in webkit [278513] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: cannot see experimental settings when inspecting ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=226666

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
There are experimental settings that have nothing to do with preview features or CSS. Don't
limit the Experimental pane to only if those things exist.

5:16 PM Changeset in webkit [278512] by Devin Rousso
  • 3 edits
    2 adds in trunk

Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'InspectorBackend.Enum.Page.ResourceType')
https://bugs.webkit.org/show_bug.cgi?id=226664

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass.prototype.get Enum):
Use the list of all registered domains, not just the active domains, as only commands/events
are able to be filtered by target type.

LayoutTests:

  • inspector/protocol/enum.html: Added.
  • inspector/protocol/enum-expected.txt: Added.
4:57 PM Changeset in webkit [278511] by Devin Rousso
  • 3 edits in trunk/Source/JavaScriptCore

Web Inspector: mark recently added protocol commands/events as page-only
https://bugs.webkit.org/show_bug.cgi?id=226661

Reviewed by Joseph Pecoraro.

  • inspector/protocol/CSS.json:
  • inspector/protocol/Network.json:

These commands are not implemented in ITML. By not specifying "targetTypes": ["page"] it's
implicitly saying that the command/event is supported by ITML since the command/event will
fall back to the domain's "targetTypes", which includes ITML.

4:44 PM Changeset in webkit [278510] by ysuzuki@apple.com
  • 3 edits
    2 adds in trunk

[JSC] Private static method should define privateClassBrandIdentifier in class-scope
https://bugs.webkit.org/show_bug.cgi?id=226656
rdar://78313139

Reviewed by Keith Miller.

JSTests:

  • stress/private-in-error.js: Added.

(shouldThrow):
(x):
(prototype.foo):

  • stress/private-static-method-declaration-error.js: Added.

(shouldThrow):
(prototype.get x):
(prototype.foo.D.a):
(prototype.foo.D.prototype.b):
(prototype.foo.D):
(prototype.foo):

Source/JavaScriptCore:

We accidentally made declaresStaticPrivateMethod always false.
This patch fixes that so that we properly define privateClassBrandIdentifier field in the class-scope if static-private-method is defined.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

3:45 PM Changeset in webkit [278509] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WTF

Cherry-pick r278431. rdar://problem/78843971

3:45 PM Changeset in webkit [278508] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WTF

Cherry-pick r278321. rdar://problem/78718570

3:45 PM Changeset in webkit [278507] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WTF

Cherry-pick r278209. rdar://problem/78595584

3:45 PM Changeset in webkit [278506] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WTF

Cherry-pick r278208. rdar://problem/78595584

3:45 PM Changeset in webkit [278505] by Alan Coon
  • 13 edits in branches/safari-611-branch/Source/bmalloc

Cherry-pick r277898. rdar://problem/78888809

3:45 PM Changeset in webkit [278504] by Alan Coon
  • 1 edit in branches/safari-611-branch/Source/WTF/wtf/cocoa/FileSystemCocoa.mm

Cherry-pick r278048. rdar://problem/78467158

3:45 PM Changeset in webkit [278503] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source

Cherry-pick r277881. rdar://problem/78467158

3:45 PM Changeset in webkit [278502] by Alan Coon
  • 13 edits in branches/safari-611-branch/Source

Cherry-pick r274746. rdar://problem/76366123

3:27 PM Changeset in webkit [278501] by pvollan@apple.com
  • 2 edits in trunk

[AppleWin] JSC build failure
https://bugs.webkit.org/show_bug.cgi?id=226659
<rdar://78844190>

Reviewed by Brent Fulgham.

WTF scripts location is not being correctly identified.

  • Source/cmake/OptionsAppleWin.cmake:
3:17 PM Changeset in webkit [278500] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Flaky crash under UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy() on the bots
https://bugs.webkit.org/show_bug.cgi?id=226653

Reviewed by Eric Carlson.

The SourceProxy destructor was taking care of calling invalidate() on the SharedRingBufferStorage
before destroying the CARingBuffer on the main thread, to avoid having SourceProxy::storageChanged()
called in the middle of destruction. However, the background thread may still be running at this
point and may reconstruct the RingBuffer right after the invalidate call, causing us to crash
because storageChanged() still gets called in the middle on destruction.

To address the issue, we now make sure to stop the rendering thread before we proceed with the
destruction and invalidate the SharedRingBufferStorage's storage change handler.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

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

3:16 PM Changeset in webkit [278499] by dino@apple.com
  • 1 edit in trunk/Tools/Scripts/webkitpy/common/config/watchlist

Update watchlist to add Ken and myself to ANGLE bugs.

  • Scripts/webkitpy/common/config/watchlist:
2:21 PM Changeset in webkit [278498] by beidson@apple.com
  • 7 edits
    1 delete in trunk

Enforce a quota in window.sessionStorage
rdar://78507096 and https://bugs.webkit.org/show_bug.cgi?id=226337

Reviewed by Chris Dumez.

Source/WebCore:

Covered by change to existing test.

  • page/Page.cpp:

(WebCore::Page::sessionStorage): Make sure the quota for session storage is not "noQuota"

  • page/Settings.yaml: Default to 5mb instead of noQuota to match other browsers.

LayoutTests:

  • platform/ios-wk1/TestExpectations:
  • platform/ios/ios/storage/domstorage/5mb-quota.html: Removed.
  • storage/domstorage/quota-expected.txt:
  • storage/domstorage/quota.html:
2:04 PM Changeset in webkit [278497] by Darin Adler
  • 8 edits in trunk/Source/WebCore

Move from WebCore::SuccessOr to WTF::Expected
https://bugs.webkit.org/show_bug.cgi?id=226614

Reviewed by Sam Weinig.

The upcoming std::expected is designed for cases like the ones we
are using SuccessOr for, using void for the expected type in a case like
this where it's success or failure. Our WTF::Expected is for our use
while waiting for compilers with std::expected. It was straightforward
to port our uses of SuccessOr to instead use Expected.

  • Headers.cmake: Removed SuccessOr.h.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • dom/SuccessOr.h: Emptied out this file for now; delete later.
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay const): Use
Expected for the return type and call makeUnexpected as needed. Also
updated the check of the result from playbackStateChangePermitted to
call Expected::error instead of SuccessOr::value.
(WebCore::HTMLMediaElement::setReadyState): Use Expected::error
instead of SuccessOr::value, and updated local variable name for
greater clarity. Also fixed one call site that had the success check
backwards: The symptom is that it would never log "Autoplay blocked"
in that case, but otherwise seems harmless.
(WebCore::HTMLMediaElement::play): Ditto.

  • html/HTMLMediaElement.h: Use Expected for the return type of

canTransitionFromAutoplayToPlay.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackStateChangePermitted const): Use
Expected for the return type and call makeUnexpected as needed.

  • html/MediaElementSession.h: Removed include of SuccessOr.h, and

tweaked coding style a bit. Use Expected for the return type of
playbackStateChangePermitted.

1:41 PM Changeset in webkit [278496] by rniwa@webkit.org
  • 6 edits in trunk/Source

Store MediaPlayer using WeakPtr in MediaPlayerPrivateRemote
https://bugs.webkit.org/show_bug.cgi?id=224421

Reviewed by Eric Carlson.

Source/WebCore:

Made it possible to create a WeakPtr of MediaPlayer.

  • platform/graphics/MediaPlayer.h:

Source/WebKit:

Made MediaPlayerPrivateRemote::m_player a WeakPtr.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):
(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):
(WebKit::MediaPlayerPrivateRemote::load):
(WebKit::MediaPlayerPrivateRemote::networkStateChanged):
(WebKit::MediaPlayerPrivateRemote::setReadyState):
(WebKit::MediaPlayerPrivateRemote::readyStateChanged):
(WebKit::MediaPlayerPrivateRemote::volumeChanged):
(WebKit::MediaPlayerPrivateRemote::muteChanged):
(WebKit::MediaPlayerPrivateRemote::timeChanged):
(WebKit::MediaPlayerPrivateRemote::durationChanged):
(WebKit::MediaPlayerPrivateRemote::rateChanged):
(WebKit::MediaPlayerPrivateRemote::playbackStateChanged):
(WebKit::MediaPlayerPrivateRemote::engineFailedToLoad):
(WebKit::MediaPlayerPrivateRemote::characteristicChanged):
(WebKit::MediaPlayerPrivateRemote::sizeChanged):
(WebKit::MediaPlayerPrivateRemote::firstVideoFrameAvailable):
(WebKit::MediaPlayerPrivateRemote::renderingModeChanged):
(WebKit::MediaPlayerPrivateRemote::acceleratedRenderingStateChanged):
(WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteTextTrack):
(WebKit::MediaPlayerPrivateRemote::addRemoteVideoTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteVideoTrack):
(WebKit::MediaPlayerPrivateRemote::currentPlaybackTargetIsWirelessChanged):
(WebKit::MediaPlayerPrivateRemote::mediaPlayerKeyNeeded):
(WebKit::MediaPlayerPrivateRemote::waitingForKeyChanged):
(WebKit::MediaPlayerPrivateRemote::initializationDataEncountered):
(WebKit::MediaPlayerPrivateRemote::resourceNotSupported):
(WebKit::MediaPlayerPrivateRemote::activeSourceBuffersChanged):
(WebKit::MediaPlayerPrivateRemote::getRawCookies const):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:

(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):

1:24 PM Changeset in webkit [278495] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r278000. rdar://problem/78875213

Only create MediaElementSession when necessary
https://bugs.webkit.org/show_bug.cgi?id=226132

Patch by Ian Gilbert <iang@apple.com> on 2021-05-25
Reviewed by Eric Carlson.

Some methods had an unexpected side effect of creating a MediaElementSession.
Modified these to not create one if one does not already exist.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): (WebCore::HTMLMediaElement::mediaState const):

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

1:24 PM Changeset in webkit [278494] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r278441. rdar://problem/78875140

Fix thread safety issues in [WKShareSheet presentWithParameters]
https://bugs.webkit.org/show_bug.cgi?id=226611
<rdar://77736001>

Reviewed by Ryosuke Niwa.

The code in [WKShareSheet presentWithParameters] was passing WebCore::RawFile objects to another thread.
This wasn't safe since WebCore::RawFile contains a WTF::String and a SharedBuffer, both of which are not
thread safe. Fix this by creating an isolated copy of the fileName String and converting the SharedBuffer
to a NSData before passing them to the background thread.

Also rewrite the code from ObjC to C++ because I felt it was clearer and less error-prone.

  • UIProcess/Cocoa/WKShareSheet.mm: (appendFilesAsShareableURLs): (-[WKShareSheet presentWithParameters:inRect:completionHandler:]):

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

1:24 PM Changeset in webkit [278493] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r277951. rdar://problem/78875422

REGRESSION(r256715): XSLTProcessor does not parse script when transforming to document
https://bugs.webkit.org/show_bug.cgi?id=226087

Reviewed by Darin Adler.

Source/WebCore:

Allow JavaScript if context document is null to match old behavior before r256715.

Test: fast/xsl/xslt-transform-script.html

  • dom/Document.cpp: (WebCore::Document::allowsContentJavaScript const):

LayoutTests:

  • fast/xsl/xslt-transform-script.html: Added.
  • fast/xsl/xslt-transform-script-expected.txt: Added.

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

1:24 PM Changeset in webkit [278492] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r277873. rdar://problem/78875406

[Cocoa] REGRESSION(Sandbox): Font smoothing within Safari doesn't seem to respect AppleFontSmoothing
https://bugs.webkit.org/show_bug.cgi?id=226066
<rdar://problem/72795817>

Reviewed by Per Arne Vollan.

We accidentally blocked access to the relevant defaults database.

It turns out this is untestable. I can't use the actual functionality without actually setting the preference
for the whole user (and all their apps). And, I can't use sandbox_check() to make sure the file is readable
because it's in the user's home directory, so the path to check will be different for every user.

  • WebProcess/com.apple.WebProcess.sb.in:

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

1:24 PM Changeset in webkit [278491] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r277644. rdar://problem/78875252

SHOULD NEVER BE REACHED in FrameSelection::setSelectionWithoutUpdatingAppearance
https://bugs.webkit.org/show_bug.cgi?id=225219

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-18
Reviewed by Ryosuke Niwa.

Source/WebCore:

When FrameSelection::selectFrameElementInParentIfFullySelected sets focus on the parent
frame, that can trigger DOM events, possibly making orphan the newSelection prepared before.
This patch fixes that issue by clearing the selection on that parent frame in such a
situation.

Test: editing/selection/selection-in-iframe-removed-assert.html

  • editing/FrameSelection.cpp: (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Check if the newSelection became orphan and if so, clear it.

LayoutTests:

Add a regression test.

  • editing/selection/selection-in-iframe-removed-assert.html: Copied from editing/selection/selection-in-iframe-removed-crash.html, with an additional requestAnimationFrame.
  • editing/selection/selection-in-iframe-removed-assert-expected.txt: Added.

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

1:24 PM Changeset in webkit [278490] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r277536. rdar://problem/78875336

Replace PlatformCAAnimationRemote::KeyframeValue with Variant
https://bugs.webkit.org/show_bug.cgi?id=225474

Patch by Ian Gilbert <iang@apple.com> on 2021-05-15
Reviewed by Ryosuke Niwa.

KeyframeValue was effectively a Variant. Replaced the existing class with a WTF::Variant.

No test as this does not change code behavior.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<RefPtr<WebCore::FilterOperation>>::encode): (IPC::ArgumentCoder<RefPtr<WebCore::FilterOperation>>::decode):
  • Shared/WebCoreArgumentCoders.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm: (WebKit::animationValueFromKeyframeValue): (WebKit::operator<<): (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode const): Deleted. (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Deleted.

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

1:24 PM Changeset in webkit [278489] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r276514. rdar://problem/78875360

Web Inspector: [Cocoa] WKInspectorResourceURLSchemeHandler needs to serialize cleanup actions
https://bugs.webkit.org/show_bug.cgi?id=224986
<rdar://76768454>

Reviewed by Devin Rousso.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: (-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): Do cleanup on the main queue so that it can be serialized with reads.

(-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]):
Ensure that all removals from the map are processed before doing a lookup.

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

1:24 PM Changeset in webkit [278488] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r276359. rdar://problem/78875297

Integrator's note: did some conflict resolution here. Did a partial find-and-replace to update pullSamples as well.

AudioMediaStreamTrackRendererUnit should not have its data zeroed if one track has not enough data
https://bugs.webkit.org/show_bug.cgi?id=224673

Reviewed by Eric Carlson.

AudioMediaStreamTrackRendererUnit may get data from multiple tracks.
If one track has not enough data, AudioSampleDataSource will zero the buffer while it should leave it unchanged.
If all tracks do not have enough data, AudioMediaStreamTrackRendererUnit will have silent output as the first track will actually zero the buffer.

Manually tested.

  • platform/audio/cocoa/AudioSampleDataSource.mm: (WebCore::AudioSampleDataSource::pullSamplesInternal):

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

1:24 PM Changeset in webkit [278487] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r275886. rdar://problem/78874996

StorageArea in LocalStorageNamespace can be abandoned
https://bugs.webkit.org/show_bug.cgi?id=224459

Reviewed by Geoffrey Garen.

Remove StorageArea from LocalStorageNamespace if it has no connection (no web page is using it).

  • NetworkProcess/WebStorage/LocalStorageNamespace.cpp: (WebKit::LocalStorageNamespace::removeStorageArea):
  • NetworkProcess/WebStorage/LocalStorageNamespace.h:
  • NetworkProcess/WebStorage/StorageArea.cpp: (WebKit::StorageArea::removeListener):
  • NetworkProcess/WebStorage/StorageManagerSet.cpp: (WebKit::StorageManagerSet::removeConnection): (WebKit::StorageManagerSet::disconnectFromStorageArea):

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

1:24 PM Changeset in webkit [278486] by Alan Coon
  • 3 edits in branches/safari-611-branch

Cherry-pick r273141. rdar://problem/78875378

Norton Safe Web extension is causing crashes / hangs under [WKRemoteObjectEncoder encodeObject:forKey:]
https://bugs.webkit.org/show_bug.cgi?id=222172

Reviewed by Alex Christensen.

The extension appears to be trying to send a JSValue that is a DOM Node. WebKit makes the following
call to convert it into a NSDictionary:
[[JSValue valueWithJSValueRef:value inContext:[JSContext contextWithJSGlobalContextRef:JSContextGetGlobalContext(context)]] toObject]

JSC very aggressively iterates over all of the properties of the DOM Node and recursively ends up
converting the whole DOM tree with all their properties. This leads to a lot of cycles to as JSC
maintains the JSObject <-> NSObject identity during the conversion (Each time the JSDocument is
serialized, the same NSDictionary* pointer is used to represent it).

The logic introduced in r270559 to detect cycles was flawed because it relied on a NSSet of
NSObject* and [NSSet containsObject:] to detect the cycles. The issue is that [NSSet containsObject:]
doesn't do a simple pointer comparison but instead calls [NSObject isEqual:] which is very
expensive for types like NSDictionary and leads to trouble when the dictionary contains a cycle.
To address this I replaced the NSSet with a WTF::HashSet<NSObject *> so that key lookup ends up
doing a simple pointer comparison.

Even after the previous fix, the extension would still cause massive hangs because it would take
a very long time to try and encode the whole DOM tree with all the properties of each Node (even
without cycles). To address this, we now abort encoding when detecting a cycle instead of encoding
an empty object to break the cycle.

After this change, Safari becomes usable with this extension again. However, there are still much
shorter hangs that occur due to the converting of the JSNode into a JSDictionary via
[JSValue toObject]. We should probably improve this in a follow-up.

Easy way to reproduce the crash / hang:

  1. Install Norton Safe Web & Norton Password Manager extension (may require a subscription)
  2. Make sure the extensions are activated and turned on by clicking on their icons next to the URL bar
  3. Go to https://bugs.webkit.org/attachment.cgi?id=420530&action=edit
  4. Click on the combo box next to "Review" -> Hang / Crash

No new tests, covered by WebKit.RemoteObjectRegistry API test.

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm: (-[WKRemoteObjectEncoder init]): (encodeInvocationArguments): (encodeObject):

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

1:24 PM Changeset in webkit [278485] by Alan Coon
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.3.7

12:50 PM Changeset in webkit [278484] by Martin Robinson
  • 13 edits in trunk/Source/WebCore

[css-scroll-snap] Snap offsets and active index are duplicated in ScrollController and ScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=226538

Reviewed by Simon Fraser.

Remove duplicate css-scroll-snap state from ScrollableArea. This state is already
stored in ScrollController, so we do not need to store it also in ScrollableArea.
This change also renames a couple methods so that they have clearer and more
consistent names.

No new tests. This should not change behavior.

  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks): updateScrollSnapState() is now called
resnapAfterLayout().

  • page/scrolling/AsyncScrollingCoordinator.cpp: snapOffsetInfo() is now called

snapOffsetsInfo().
(WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry): Ditto.
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView): Ditto.

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::updateFromStateNode): Use new method name.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): We no longer need to
sync state with Scrollable Area.
(WebCore::ScrollAnimator::setSnapOffsetsInfo): Added this setter which
calls through to ScrollController.
(WebCore::ScrollAnimator::snapOffsetsInfo const): Added this getter which calls through
to ScrollController.
(WebCore::ScrollAnimator::setActiveScrollSnapIndexForAxis): Added this method.

  • platform/ScrollAnimator.h: Update method declarations.
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::allowsVerticalStretching const): Use new method names.
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching const): Ditto.

  • platform/ScrollController.cpp:

(WebCore::ScrollController::setSnapOffsetsInfo): Combined updateScrollSnapState and
updateScrollSnapPoints into this method.
(WebCore::ScrollController::snapOffsetsInfo const): Added this getter.

  • platform/ScrollController.h: Update method declarations.
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::handleWheelEventForScrolling): We no longer need to sync
from the ScrollAnimator.
(WebCore::ScrollableArea::snapOffsetsInfo const): Renamed this getter.
(WebCore::ScrollableArea::setScrollSnapOffsetInfo): This now calls through to
ScrollController.
(WebCore::ScrollableArea::clearSnapOffsets): Ditto.
(WebCore::ScrollableArea::currentHorizontalSnapPointIndex const): Ditto.
(WebCore::ScrollableArea::currentVerticalSnapPointIndex const): Ditto.
(WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Ditto.
(WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Ditto.
(WebCore::ScrollableArea::resnapAfterLayout): Renamed this method and moved
setting the ScrollSnapOffsetsInfo to setScrollSnapOffsetInfo.
(WebCore::ScrollableArea::doPostThumbMoveSnapping): Use new methods to access
scroll snap state and return early if we don't have a ScrollAnimator already.
This was done implicitly in the previous implementation.

  • platform/ScrollableArea.h:
  • rendering/RenderLayerScrollableArea.cpp: Update method definitions and

remove members that are no longer used.
(WebCore::RenderLayerScrollableArea::updateScrollInfoAfterLayout): Use new method name.

  • testing/Internals.cpp:

(WebCore::Internals::scrollSnapOffsets): Ditto.

12:34 PM Changeset in webkit [278483] by Chris Dumez
  • 9 edits in trunk/Source/WebCore

Stop using legacy MainThreadTaskQueue in PlatformMediaSessionManager / MediaSessionManagerCocoa
https://bugs.webkit.org/show_bug.cgi?id=226649

Reviewed by Eric Carlson.

Stop using legacy MainThreadTaskQueue in PlatformMediaSessionManager / MediaSessionManagerCocoa.
Media code should be using the HTML event loop whenever possible and can use callOnMainThread()
for global singleton classes that are not associated with a particular document (like
PlatformMediaSessionManager).

Also stop subclassing CanMakeWeakPtr<>. It doesn't make sense since the class is a singleton.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::scheduleUpdateSessionState):

  • platform/audio/PlatformMediaSessionManager.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::scheduleSessionStatusUpdate):
(WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback):

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::mediaServerConnectionDied):

12:23 PM Changeset in webkit [278482] by Wenson Hsieh
  • 12 edits in trunk/Source

Remove the unused sourceElementID argument in Document::updateIsPlayingMedia and related code
https://bugs.webkit.org/show_bug.cgi?id=226650

Reviewed by Chris Dumez.

Source/WebCore:

This uint64_t argument is currently not used for anything. It was originally added in r188030 with the purpose
of mapping to HTMLMediaElements via HTMLMediaElement::elementWithID(), but that mechanism was entirely removed
in r267885.

It appears that this code has been superceded by (relatively recent) support for the Media Session API.

No change in behavior.

  • dom/Document.cpp:

(WebCore::Document::willBeRemovedFromFrame):
(WebCore::Document::updateIsPlayingMedia):

  • dom/Document.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::isPlayingMediaDidChange):

  • page/Page.cpp:

(WebCore::Page::updateIsPlayingMedia):

  • page/Page.h:

Source/WebKit:

Remove more unused code. See WebCore/ChangeLog for more details.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange):

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

(WebKit::WebChromeClient::isPlayingMediaDidChange):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
12:11 PM Changeset in webkit [278481] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Port MediaKeySystemAccess & MediaCapabilities to the HTML event loop
https://bugs.webkit.org/show_bug.cgi?id=226646

Reviewed by Eric Carlson.

Port MediaKeySystemAccess & MediaCapabilities to the HTML event loop instead of using
a global Timer. Most of the media code has been ported to the HTML event loop already.

  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:

(WebCore::MediaKeySystemAccess::createMediaKeys):

  • Modules/encryptedmedia/MediaKeySystemAccess.h:
  • Modules/mediacapabilities/MediaCapabilities.cpp:

(WebCore::MediaCapabilities::decodingInfo):
(WebCore::MediaCapabilities::encodingInfo):

  • Modules/mediacapabilities/MediaCapabilities.h:
  • Modules/mediacapabilities/MediaCapabilities.idl:
12:03 PM Changeset in webkit [278480] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

DOMFileSystem::listDirectory() fails to protect |this| when going to the background thread
https://bugs.webkit.org/show_bug.cgi?id=226652

Reviewed by Darin Adler.

  • Modules/entriesapi/DOMFileSystem.cpp:

(WebCore::DOMFileSystem::listDirectory):

11:59 AM Changeset in webkit [278479] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Stop using legacy MainThreadTaskQueue in Document::didLogMessage()
https://bugs.webkit.org/show_bug.cgi?id=226645

Reviewed by Darin Adler.

Stop using legacy MainThreadTaskQueue in Document::didLogMessage() and use the HTML
event loop instead.

  • dom/Document.cpp:

(WebCore::Document::didLogMessage):

  • dom/Document.h:
11:52 AM Changeset in webkit [278478] by Antti Koivisto
  • 3 edits
    3 adds in trunk

REGRESSION (maybe r276882): custom properties not available on host on initial paint
https://bugs.webkit.org/show_bug.cgi?id=226574
<rdar://problem/78863643>

Reviewed by Simon Fraser.

Source/WebCore:

We fail to invalidate :host style when switching out of shared resolver after asynchronously
loading a stylesheet into a shadow tree. This happens because the resolver has been cleared and
the invalidation code just bails out if none is present.

Test case by vb@bigdot.de.

Test: fast/shadow-dom/shared-resolver-host-invalidation.html

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::invalidateHostAndSlottedStyleIfNeeded):

Change the assumption so that if we don't have a resolver we always invalidate the host.
The alternative would be to build the resolver and do this accurately but doing that here
seems bit risky. This should be cheap and rare invalidation in any case.

LayoutTests:

  • fast/shadow-dom/resources/shared-resolver-host-invalidation.css: Added.

(:host,):
(div):

  • fast/shadow-dom/shared-resolver-host-invalidation-expected.html: Added.
  • fast/shadow-dom/shared-resolver-host-invalidation.html: Added.
11:35 AM Changeset in webkit [278477] by achristensen@apple.com
  • 29 edits
    1 delete in trunk

Implement off-by-default experimental feature for PerformanceResourceTiming.transferSize, encodedBodySize, and decodedBodySize
https://bugs.webkit.org/show_bug.cgi?id=226629

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/navigation-timing/nav2_test_attributes_exist-expected.txt:
  • web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt:
  • web-platform-tests/navigation-timing/secure_connection_start_non_zero.https-expected.txt:
  • web-platform-tests/navigation-timing/test_document_onload-expected.txt:
  • web-platform-tests/resource-timing/TAO-case-insensitive-null-opaque-origin.sub-expected.txt:
  • web-platform-tests/resource-timing/TAO-crossorigin-port.sub-expected.txt:
  • web-platform-tests/resource-timing/TAO-null-opaque-origin.sub-expected.txt:

This apparent regression is actually just uncovering an existing failure.
The test expects the sum of many values to not be equal to zero.
It used to be adding undefined to many 0 values, which returned undefined, which is not equal to zero.
Now it's adding 0's and getting 0 which correctly indicates that we are not exposing timing values where we should.

  • web-platform-tests/resource-timing/cors-preflight.any-expected.txt:
  • web-platform-tests/resource-timing/cors-preflight.any.worker-expected.txt:
  • web-platform-tests/resource-timing/idlharness.any-expected.txt:
  • web-platform-tests/resource-timing/idlharness.any.worker-expected.txt:
  • web-platform-tests/resource-timing/resource-timing-level1.sub-expected.txt:
  • web-platform-tests/resource-timing/resource_connection_reuse-expected.txt:
  • web-platform-tests/resource-timing/resource_connection_reuse.https-expected.txt:
  • web-platform-tests/resource-timing/single-entry-per-resource-expected.txt:
  • web-platform-tests/resource-timing/test_resource_timing.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/resource-timing-cross-origin.https-expected.txt:

Source/WebCore:

The tests for TAO are entangled with the tests for these properties. Having an implementation helps see what is still broken.
Covered by web platform tests.

  • page/PerformanceResourceTiming.cpp:

(WebCore::PerformanceResourceTiming::transferSize const):
(WebCore::PerformanceResourceTiming::encodedBodySize const):
(WebCore::PerformanceResourceTiming::decodedBodySize const):

  • page/PerformanceResourceTiming.h:
  • page/PerformanceResourceTiming.idl:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

  • performance-api/resource-timing-apis-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/resource-timing/test_resource_timing-expected.txt: Removed.
11:14 AM Changeset in webkit [278476] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Don't emit the NotDouble checks if we're already NotDouble.

Rubber stamped by Saam Barati.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateNotDouble):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::speculateNotDouble):

11:02 AM Changeset in webkit [278475] by achristensen@apple.com
  • 28 edits
    2 adds in trunk

Make attributedBundleIdendifier a property for WKWebViewConfiguration instead of _WKWebsiteDataStoreConfiguration
https://bugs.webkit.org/show_bug.cgi?id=226548
Source/WebKit:

<rdar://78737547>

Reviewed by Brady Eidson.

We have been putting properties to go into the NSURLSessionConfiguration on the _WKWebsiteDataStoreConfiguration.
This has been ok so far, but now we have an application that needs to run networking attributed to different applications
but sharing the data storage in the same process. We now do what we should've done long ago: put these non-storage-related
properties on the WKWebViewConfiguration.

I introduce WebPageNetworkParameters which currently has only one member, but will soon have more.

I made it so that if multiple WKWebViews with the same data store have the same attributedBundleIdendifier, they share an NSURLSession.
Otherwise, they get their own NSURLSession in a different SessionSet.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::addWebPageNetworkParameters):
(WebKit::NetworkProcess::removeWebPageNetworkParameters):
(WebKit::NetworkProcess::countNonDefaultSessionSets):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::addWebPageNetworkParameters):
(WebKit::NetworkSession::removeWebPageNetworkParameters):
(WebKit::NetworkSession::countNonDefaultSessionSets const):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::initializeNSURLSessionsInSet):
(WebKit::NetworkSessionCocoa::SessionSet::initializeEphemeralStatelessSessionIfNeeded):
(WebKit::NetworkSessionCocoa::addWebPageNetworkParameters):
(WebKit::NetworkSessionCocoa::removeWebPageNetworkParameters):
(WebKit::NetworkSessionCocoa::countNonDefaultSessionSets const):
(WebKit::NetworkSessionCocoa::attributedBundleIdentifier const): Deleted.
(WebKit::NetworkSessionCocoa::initializeStandardSessionsInSet): Deleted.

  • Shared/WebPageNetworkParameters.cpp: Added.

(WebKit::WebPageNetworkParameters::encode const):
(WebKit::WebPageNetworkParameters::decode):

  • Shared/WebPageNetworkParameters.h: Added.

(WebKit::WebPageNetworkParameters::WebPageNetworkParameters):
(WebKit::WebPageNetworkParameters::isHashTableDeletedValue const):
(WebKit::WebPageNetworkParameters::hash const):
(WebKit::WebPageNetworkParameters::operator== const):
(WebKit::WebPageNetworkParameters::attributedBundleIdentifier const):
(WTF::DefaultHash<WebKit::WebPageNetworkParameters>::hash):
(WTF::DefaultHash<WebKit::WebPageNetworkParameters>::equal):

  • Sources.txt:
  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::setAttributedBundleIdentifier):
(API::PageConfiguration::attributedBundleIdentifier const):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _setAttributedBundleIdentifier:]):
(-[WKWebViewConfiguration _attributedBundleIdentifier]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _countNonDefaultSessionSets:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration setAttributedBundleIdentifier:]): Deleted.
(-[_WKWebsiteDataStoreConfiguration attributedBundleIdentifier]): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::initializeWebPage):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::platformSetNetworkParameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::countNonDefaultSessionSets):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy const):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier):
(WebKit::WebsiteDataStoreConfiguration::attributedBundleIdentifier const): Deleted.
(WebKit::WebsiteDataStoreConfiguration::setAttributedBundleIdentifier): Deleted.

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):

10:58 AM Changeset in webkit [278474] by Devin Rousso
  • 5 edits in trunk/Source/WTF

Add a way to prefix output of WTFReportBacktrace to make log filtering easier
https://bugs.webkit.org/show_bug.cgi?id=226390

Reviewed by Megan Gardner.

Often times while debugging I add WTFLogAlways("<DR> ...") to various places as indicators
that "logic has reached here". This is especially useful when debugging iOS as unlike macOS
there's no console output from run-safari, meaning that I have to use system logging,
which is often a deluge of unrelated information. Having "<DR>" as a prefix makes filtering
through the system logging trivial as I can ignore logs that don't have it. Unfortunately,
WTFReportBacktrace does not have a way to add this prefix, so it becomes much harder to
find in the logs. This patch enables adding a prefix to each line of WTFReportBacktrace
via a new function WTFReportBactraceWithPrefix.

  • wtf/Assertions.h:
  • wtf/Assertions.cpp:

(WTFReportBacktraceWithPrefix): Added.
(WTFPrintBacktraceWithPrefix): Added.

  • wtf/StackTrace.h:

(WTF::StackTrace::StackTrace):

  • wtf/StackTrace.cpp:

(WTF::StackTrace::dump const):

10:46 AM Changeset in webkit [278473] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Placate exception checker validation in objectPrototypeHasOwnProperty.
https://bugs.webkit.org/show_bug.cgi?id=226651
rdar://78861296

Reviewed by Keith Miller.

JSTests:

  • stress/placate-exception-checker-in-objectPrototypeHasOwnProperty.js: Added.

Source/JavaScriptCore:

  • runtime/ObjectPrototype.cpp:

(JSC::objectPrototypeHasOwnProperty):

10:23 AM Changeset in webkit [278472] by Robert Jenner
  • 1 edit
    7 deletes in trunk/LayoutTests

Cleanup unused resources in LayoutTests/storage
https://bugs.webkit.org/show_bug.cgi?id=226226
<rdar://problem/78469934>

Reviewed by Jonathan Bedard.

  • storage/domstorage/localstorage/resources/iframe-events-second.html: Removed.
  • storage/domstorage/localstorage/resources/private-browsing-3.html: Removed.
  • storage/domstorage/localstorage/resources/private-browsing-storage-2.html: Removed.
  • storage/domstorage/sessionstorage/resources/iframe-events-second.html: Removed.
  • storage/indexeddb/modern/resources/workers-disabled.js: Removed.
  • storage/indexeddb/resources/test-data.html: Removed.
  • storage/indexeddb/resources/test-data.txt: Removed.
10:14 AM Changeset in webkit [278471] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Avoid wasteful large allocation in SpeechRecognitionRemoteRealtimeMediaSource::setStorage()
https://bugs.webkit.org/show_bug.cgi?id=226644

Reviewed by Eric Carlson.

Avoid wasteful large allocation in SpeechRecognitionRemoteRealtimeMediaSource::setStorage().
setStorage() was setting m_buffer's size to the same size as the RingBuffer (2*sampleRate),
only to resize it to the size of the rendering quantum (512) later in
SpeechRecognitionRemoteRealtimeMediaSource::remoteAudioSamplesAvailable().

  • UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp:

(WebKit::SpeechRecognitionRemoteRealtimeMediaSource::setStorage):

10:12 AM Changeset in webkit [278470] by Alan Coon
  • 1 copy in tags/Safari-612.1.16.3

Tag Safari-612.1.16.3.

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

Versioning.

WebKit-7612.1.16.3

10:06 AM Changeset in webkit [278468] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Pass NetworkLoadParameters to NetworkDataTaskCocoa constructor
https://bugs.webkit.org/show_bug.cgi?id=226628

Reviewed by Sam Weinig.

No change in behavior. Just pass a parameters object instead of splitting them into separate parameters.

  • NetworkProcess/NetworkActivityTracker.h:

(WebKit::NetworkActivityTracker::getPlatformObject const):
(WebKit::NetworkActivityTracker::getPlatformObject): Deleted.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::didReceiveResponse):

9:36 AM Changeset in webkit [278467] by mmaxfield@apple.com
  • 2 edits in trunk/Websites/browserbench.org

[MotionMark] Publish r278436 as a part of MotionMark 1.2
https://bugs.webkit.org/show_bug.cgi?id=226626

Reviewed by Simon Fraser.

Controller.filterOutOutliers must pass a compare function to Array.sort()
because it filters an array of numbers.

  • MotionMark1.2/tests/resources/main.js:

(filterOutOutliers):

9:34 AM Changeset in webkit [278466] by mmaxfield@apple.com
  • 6 edits in trunk/Source/WebCore

Use references in font loading code instead of pointers which can never be null
https://bugs.webkit.org/show_bug.cgi?id=226622

Reviewed by Chris Dumez.

CSSFontFace::create()'s CSSFontSelector can never be null. This is clear from
observation of all 3 call sites.

No new tests because there is no behavior change.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::create):

  • css/CSSFontFace.h:
  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/FontFace.cpp:

(WebCore::FontFace::FontFace):

9:32 AM Changeset in webkit [278465] by fpizlo@apple.com
  • 12 edits
    2 adds in trunk

DFG should speculate on CompareStrictEq(@x, @x)
https://bugs.webkit.org/show_bug.cgi?id=226621

Reviewed by Mark Lam.

JSTests:

  • microbenchmarks/untyped-stricteq-self.js: Added.

(foo):

  • stress/untyped-stricteq-self-fail.js: Added.

(bar):
(foo):

Source/JavaScriptCore:

Introduces a NotDouble: speculation. We use it to speculate on CompareStrictEq(@x, @x).

  • bytecode/SpeculatedType.h:

(JSC::isNotDoubleSpeculation):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateNotDouble):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateNotDouble):
(JSC::DFG::SpeculativeJIT::speculate):

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

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::checkMayCrashIfInputIsEmpty):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateNotDouble):

9:08 AM Changeset in webkit [278464] by keith_miller@apple.com
  • 7 edits in trunk/JSTests

Fix tests that fail under executable allocation fuzzing
https://bugs.webkit.org/show_bug.cgi?id=226593

Reviewed by Mark Lam.

  • microbenchmarks/memcpy-wasm-large.js:

(typeof.WebAssembly.string_appeared_here.try.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):
(typeof.WebAssembly.string_appeared_here.catch):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array): Deleted.

  • microbenchmarks/memcpy-wasm-medium.js:

(typeof.WebAssembly.string_appeared_here.try.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):
(typeof.WebAssembly.string_appeared_here.catch):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array): Deleted.

  • microbenchmarks/memcpy-wasm-small.js:

(typeof.WebAssembly.string_appeared_here.try.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):
(typeof.WebAssembly.string_appeared_here.catch):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array): Deleted.

  • microbenchmarks/memcpy-wasm.js:

(typeof.WebAssembly.string_appeared_here.try.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):
(typeof.WebAssembly.string_appeared_here.catch):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array): Deleted.

  • stress/bit-op-with-object-returning-int32.js:

(numberOfDFGCompiles):
(bitOr): Deleted.
(bitXor): Deleted.
(bitNot): Deleted.
(bitLShift): Deleted.

  • stress/bitwise-not-fixup-rules.js:

(numberOfDFGCompiles):
(let.o.valueOf): Deleted.

9:04 AM Changeset in webkit [278463] by rmorisset@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Drop the FTL(DFG) graph after lowering to B3
https://bugs.webkit.org/show_bug.cgi?id=226556

Reviewed by Phil Pizlo.

The challenge in this patch was dealing with all of the Patchpoints created by FTLLowerDFGToB3: they get a lambda at that time, which they execute at the end of Air, and many of these lambdas were capturing a pointer to some parts of the DFG graph and reading through it when being executed.
In all cases but one it was easily fixed: they were only reading a few bits from a given node, so I just read these bits in FTLLowerDFGToB3, and captured them (by value) instead of the pointer to the node.
The exception was compileCallOrConstructVarargsSpread(): its patchpoint generator was walking through the graph, flattening a tree of PhantomSpread/PhantomNewArrayWithSpread/PhantomNewArrayBuffer/PhantomCreateRest, emitting some code along the way.
We now do this flattening of the tree in FTLLowerDFGToB3, store just enough information to later emit the required code in a vector, and capture that vector in the lambda (through a move capture, which is allowed since C++14). See struct VarargsSpreadArgumentToEmit for the information that we need to store in that vector.

I tested this change by completing a full run of JetStream2 with ASAN.
I also ran the stress tests with "spread" in their name in Debug mode.

  • b3/B3SparseCollection.h:

(JSC::B3::SparseCollection::clearAll):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::freeDFGIRAfterLowering):

  • dfg/DFGGraph.h:
  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::getPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::compilePrivateBrandAccess):
(JSC::FTL::DFG::LowerDFGToB3::cachedPutById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::VarargsSpreadArgumentToEmit::VarargsSpreadArgumentToEmit):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::getById):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToB3::crash):

8:58 AM Changeset in webkit [278462] by Tadeu Zagallo
  • 33 edits
    1 add in trunk

Optimize Function.prototype.toString
https://bugs.webkit.org/show_bug.cgi?id=226418
<rdar://77861846>

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/function-to-string.js: Added.

(f):
(C):
(C.prototype.method1):
(C.prototype.method2):
(test):
(test2):

Source/JavaScriptCore:

Add caching to Function.prototype.toString. This is used heavily in Speedometer2, and repeatedly recomputing a
string which is a constant is costly. We cache the results of toString in all cases except for bound functions.
To make this work for bound functions, we'd need to add a new field they can use for this cache. For other
functions, we cache it on the executable (either NativeExecutable or FunctionExecutable). The reason we can't
do this on the executable for bound functions is that all bound functions share the same executable, but
individual bound functions can have different names. The reason it's valid to cache the results in general is that a
function's name field can't be changed from JS code -- it's non-writable.

This patch also makes Function.prototype.toString an intrinsic in the DFG/FTL. We emit code on the fast path
which reads the cached value if it's present. If not, we call into the slow path, which will compute
the cached value for non bound functions, or compute the result for bound functions.

I added a new microbenchmark that speeds up by >35x:

function-to-string 2197.5952+-30.7118 59.9861+-2.5550 definitely 36.6350x faster

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::getExecutable):
(JSC::DFG::SpeculativeJIT::compileFunctionToString):
(JSC::DFG::SpeculativeJIT::compileGetExecutable):

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::getExecutable):
(JSC::FTL::DFG::LowerDFGToB3::compileGetExecutable):
(JSC::FTL::DFG::LowerDFGToB3::compileFunctionToString):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::visitChildrenImpl):
(JSC::FunctionExecutable::toStringSlow):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionExecutableInlines.h:

(JSC::FunctionExecutable::toString):

  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::addFunctionProperties):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::toString):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::asStringConcurrently const):

  • runtime/JSStringInlines.h:
  • runtime/NativeExecutable.cpp:

(JSC::NativeExecutable::toStringSlow):
(JSC::NativeExecutable::visitChildrenImpl):

  • runtime/NativeExecutable.h:
8:48 AM Changeset in webkit [278461] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r278121): Fix build failure due to weak external symbol

Occurs when building coverage+release builds:

ERROR: symbol _DDHighlightCreateWithRectsInVisibleRectWithStyleScaleAndDirection

The soft-linked symbol was originally added in r259276.

  • Configurations/WebCore.unexp:
  • Add _DDHighlightCreateWithRectsInVisibleRectWithStyleScaleAndDirection to the list of unexported symbols.
  • Also sort symbols in the group alphabetically.
8:35 AM Changeset in webkit [278460] by Martin Robinson
  • 2 edits in trunk/Tools

The CMake cache is removed when specifying a build target
https://bugs.webkit.org/show_bug.cgi?id=226642

Reviewed by Jonathan Bedard.

  • Scripts/webkitdirs.pm:

(shouldRemoveCMakeCache): Only remove the CMake cache when arguments
that start with a dash change.

8:32 AM Changeset in webkit [278459] by Wenson Hsieh
  • 5 edits
    2 adds in trunk

[iOS] Long pressing images on 9gag.com fails to present context menus
https://bugs.webkit.org/show_bug.cgi?id=226625
rdar://78136095

Reviewed by Megan Gardner.

Source/WebKit:

Make some small adjustments to context menu logic to allow the context menu to appear when long pressing images
that are inside links (anchor elements) with JavaScript URLs. See below for more details.

Test: fast/events/touch/ios/long-press-on-image-in-javascript-link.html

  • UIProcess/ios/WKActionSheetAssistant.mm:

(isJavaScriptURL):

Pull logic that checks for "javascript" URL schemes into a separate helper function, and use it below.

(-[WKActionSheetAssistant _createSheetWithElementActions:defaultTitle:showLinkTitle:]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

Add _WKElementActionTypeCopy for image sheets, even when the target URL is a JavaScript URL; even if the image
is inside a JavaScript URL, we should be capable of triggering the "Copy" action by copying the image data and
the image URL, rather than the JavaScript URL. The change in WebPage::performActionOnElement below ensures
that we don't end up copying the JavaScript URL.

(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

Make another minor adjustment to share the imageURL instead of the target URL in the case where the target is a
JavaScript URL.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView continueContextMenuInteraction:]):

Avoid bailing early with continueWithContextMenuConfiguration(nil); in the case where we're long pressing an
image inside a JavaScript link.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::performActionOnElement):

Push the JavaScript URL check in defaultActionsForImageSheet down into WebPage::performActionOnElement, when
copying an image. This tweak allows us to still show the Copy action for images in JavaScript URLs, but just
copy the image and image URL instead of the JavaScript URL.

LayoutTests:

Add a layout test to verify that a context menu is presented when long pressing an image inside a link with a
JavaScript URL as an href.

  • fast/events/touch/ios/long-press-on-image-in-javascript-link-expected.txt: Added.
  • fast/events/touch/ios/long-press-on-image-in-javascript-link.html: Added.
8:03 AM Changeset in webkit [278458] by commit-queue@webkit.org
  • 11 edits in trunk/Source

Fix more GCC warnings
https://bugs.webkit.org/show_bug.cgi?id=226193

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-04
Reviewed by Adrian Perez de Castro.

Source/JavaScriptCore:

Fix -Wreturn-type warnings due to missing RELEASE_ASSERT_NOT_REACHED() where expected.

  • jit/JITPlan.cpp:

(JSC::JITPlan::tier const):

  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):

Source/WebCore:

Fix -Wunused-parameter warnings. Also, fix a -Wredundant-move warning.

  • platform/animation/TimingFunction.cpp:

(WebCore::TimingFunction::createFromCSSText):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::getCTM const):
(WebCore::GraphicsContextCairo::roundToDevicePixels):

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::supportsGLX const):

Source/WebKit:

Remove redundant WTFMove that's triggering GCC's -Wredundant-move.

  • Platform/IPC/ArgumentCoder.h:

(IPC::ArgumentCoder::decode):

Source/WTF:

Add missing static_cast<void*> required to suppress GCC's -Wclass-memaccess warning when
intentionally not running constructors/destructors. There's already a static_assert to
ensure this is safe, which is better than usual for us.

  • wtf/SmallSet.h:
7:48 AM Changeset in webkit [278457] by Chris Dumez
  • 19 edits
    2 moves in trunk/Source/WebCore

Rename MainThreadGenericEventQueue to EventLoopEventQueue
https://bugs.webkit.org/show_bug.cgi?id=226618

Reviewed by Ryosuke Niwa.

Rename MainThreadGenericEventQueue to EventLoopEventQueue, now that it is based on the HTML
event loop (and not a global Timer).

  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):

  • Modules/mediasession/MediaSessionCoordinator.h:
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::MediaSource):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):

  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::SourceBufferList):

  • Modules/mediasource/SourceBufferList.h:
  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::RemotePlayback):

  • Modules/remoteplayback/RemotePlayback.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventLoopEventQueue.cpp: Renamed from Source/WebCore/dom/GenericEventQueue.cpp.

(WebCore::EventLoopEventQueue::EventLoopEventQueue):
(WebCore::EventLoopEventQueue::enqueueEvent):
(WebCore::EventLoopEventQueue::dispatchOneEvent):
(WebCore::EventLoopEventQueue::close):
(WebCore::EventLoopEventQueue::cancelAllEvents):
(WebCore::EventLoopEventQueue::hasPendingActivity const):
(WebCore::EventLoopEventQueue::hasPendingEventsOfType const):
(WebCore::EventLoopEventQueue::stop):
(WebCore::EventLoopEventQueue::activeDOMObjectName const):
(WebCore::EventLoopEventQueue::create):

  • dom/EventLoopEventQueue.h: Renamed from Source/WebCore/dom/GenericEventQueue.h.
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):

  • html/HTMLMediaElement.h:
  • html/track/TrackListBase.cpp:

(WebCore::TrackListBase::TrackListBase):

  • html/track/TrackListBase.h:
7:22 AM Changeset in webkit [278456] by commit-queue@webkit.org
  • 8 edits in trunk

[GTK][WPE] Expose setCORSDisablingPatterns
https://bugs.webkit.org/show_bug.cgi?id=219995

Source/WebKit:

Patch by Jan-Michael Brummer <jan.brummer@tabos.org> on 2021-06-04
Reviewed by Carlos Garcia Campos.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_set_cors_allowlist):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:

Tools:

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-04
Reviewed by Carlos Garcia Campos.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewCORSAllowlist):
(beforeAll):

7:19 AM Changeset in webkit [278455] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Speed up ews status bubble loading speed
https://bugs.webkit.org/show_bug.cgi?id=214821

Reviewed by Jonathan Bedard.

This change does a trade-off between accuracy of queue position vs status-bubble loading time.
This would reduce the calculations needed for queue position computation, but the position
might not be accurate if the queue has a backlog of more than 12 hours (which shouldn't be
the case normally). If the backlog is less than 12 hours, then the queue position will be accurate.

Also, this patch separates the logic of when to hide the status-bubble. Status-bubble will now be hidden
after 7 days of no build. However, if patch is waiting for more than 12 hours, but less than 7 days,
instead of computing the exact queue position, we do not display queue position.

  • CISupport/ews-app/ews/views/statusbubble.py:

(StatusBubble):
(StatusBubble._build_bubble):
(StatusBubble._queue_position):

7:04 AM Changeset in webkit [278454] by Jonathan Bedard
  • 8 edits in trunk/Tools

[run-webkit-tests] Use webkitcorepy's TaskPool
https://bugs.webkit.org/show_bug.cgi?id=226234
<rdar://problem/78471695>

Reviewed by Dewei Zhu.

  • Scripts/run-webkit-tests: Stop using multiprocessing_bootstrap.
  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:

(setup_shard): Run setup in Worker process.
(handle_started_test): Notify parent process that a test has started.
(run_shard): Run test shard in Worker process.
(handle_finished_test): Notify parent process that a test has finished.
(teardown_shard): Teardown worker process metadata.
(LayoutTestRunner.init): Make printer public.
(LayoutTestRunner.run_tests): Use TaskPool to spawn multiple workers.
(LayoutTestRunner.update_summary_with_result): Renamed from
_update_summary_with_result, strip unused arguments.
(LayoutTestRunner._annotate_results_with_additional_failures): Strip
unused arguments.
(LayoutTestRunner.start_servers): Make printer public.
(LayoutTestRunner.stop_servers): Ditto.
(Worker.setup): Instantiate singleton worker.
(Worker.teardown): Teardown singleton worker.
(Worker.init): Pass port object, remove unused variable.
(Worker.run_tests): Use TaskPool process name.
(Worker.stop): Ditto.
(Worker._kill_driver): Use port options, use TaskPool process name.
(Worker._run_test_with_or_without_timeout): Ditto.
(Worker._clean_up_after_test): Use TaskPool process name.
(Worker._run_test_in_another_thread): Ditto.
(Worker._run_test_in_this_thread): Ditto.
(Worker._run_single_test): Use port options.
(LayoutTestRunner._worker_factory): Deleted.
(LayoutTestRunner._handle_did_spawn_worker): Deleted.
(LayoutTestRunner._update_summary_with_result): Deleted.
(LayoutTestRunner.handle): Deleted.
(LayoutTestRunner._handle_started_test): Deleted.
(LayoutTestRunner._handle_finished_test): Deleted.
(LayoutTestRunner._handle_finished_test_group): Deleted.
(Worker.del): Deleted.
(Worker.start): Deleted.
(Worker.handle): Deleted.
(Worker._run_test): Deleted.
(Worker._finished_test_group): Deleted.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:

(LayoutTestRunnerTests.test_update_summary_with_result): The runner keeps track of it's state.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py: Remove call to main.
  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.serial_test_basic): Run all tests in the same process.
(RunTest.test_hung_thread): Deleted.

  • Scripts/webkitpy/port/base.py:

(Port.worker_startup_delay_secs): Deleted.

  • Scripts/webkitpy/port/test.py:

(Port.worker_startup_delay_secs): Deleted.

5:04 AM Changeset in webkit [278453] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Reintroduce logging useful for debugging in AudioSampleDataSource
https://bugs.webkit.org/show_bug.cgi?id=226578

Reviewed by Eric Carlson.

Removed logging was actually useful for debugging audio issues.
Reintroduce it by restrict logging to ensure we do not introduce too much audio glitches by doing so:

  • If we pull samples and do not have enough data, enter more-data-needed mode, and log once that data is missing.
  • If we pull samples and do not have enough data and we are already in more-data-needed mode, do not log anything.
  • If we push samples and are in more-data-needed mode, reset mode to none and log this information.

The mode check happens in two different threads so might be a bit racy but at worst, this reduces accuracy of the logging.

No change of behavior.

  • platform/audio/cocoa/AudioSampleDataSource.h:
  • platform/audio/cocoa/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamplesInternal):

4:05 AM Changeset in webkit [278452] by Martin Robinson
  • 4 edits
    2 adds in trunk

[Win] Implement scroll-snap-points on Windows
https://bugs.webkit.org/show_bug.cgi?id=142503
<rdar://problem/20093603>

Reviewed by Simon Fraser.

.:

  • Source/cmake/OptionsWin.cmake: Stop disabling scroll-snap for Apple Win port.

LayoutTests:

  • platform/win/TestExpectations: Unskip scroll-snap tests.
  • platform/win/css3/scroll-snap/scroll-snap-wheel-event-expected.txt: Added. Windows doesn't

seem to support horizontal wheel events.

3:43 AM Changeset in webkit [278451] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] MiniBrowser: add support for saving multiple tabs in session state
https://bugs.webkit.org/show_bug.cgi?id=225763

Reviewed by Michael Catanzaro.

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowSaveSession):
(browserWindowTryClose):
(browserWindowFinalize):
(browserWindowDispose):
(browser_window_load_session):

1:03 AM Changeset in webkit [278450] by svillar@igalia.com
  • 3 edits in trunk/Source/WebCore

[css-flexbox] Sanitize the aspect ratio handling code
https://bugs.webkit.org/show_bug.cgi?id=226324

Reviewed by Javier Fernandez.

Sanitized the code that detects whether aspect ratio should be used to compute sizes. The
useChildAspectRatio() method was removed as it was very misleading, the name was a bad choice
and it was very confusing. A new method childHasComputableAspectRatio() was added. It verifies
whether the item has an aspect ratio (of any type) and whether we could compute it.

Also two calls to detect whether the cross size was definite (or considered definite) were
unified in a single method.

No new tests as there is no change in behaviour.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childHasComputableAspectRatio const): New method which takes the
checks from useChildAspectRatio.
(WebCore::RenderFlexibleBox::childHasComputableAspectRatioAndCrossSizeIsConsideredDefinite):
New method doing 3 different checks.
(WebCore::RenderFlexibleBox::childCrossSizeShouldUseContainerCrossSize const): Removed the aspect
ratio checks which make no sense there.
(WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): Use the new method.
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Ditto.
(WebCore::RenderFlexibleBox::useChildAspectRatio): Deleted.

  • rendering/RenderFlexibleBox.h:

Jun 3, 2021:

11:35 PM Changeset in webkit [278449] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebKit

Make WebIDBServer use WorkQueue instead of Thread
https://bugs.webkit.org/show_bug.cgi?id=226589

Reviewed by Chris Dumez.

This matches other storage manager classes and makes management of thread lifetime much easier. We used to
destroy WebIDBServer aggressively (when there is no connection or task left) to ensure thread of WebIDBServer
does not stay around idly, and that led us to create new WebIDBServer for new task right after destroying
WebIDBServer and before databases are properly closed in some cases, which can caused issues like database is
locked during new task. With WorkQueue, we don't need to manage the threads, and we can close WebIDBServer
when session is destroyed.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::create):
(WebKit::WebIDBServer::WebIDBServer):
(WebKit::WebIDBServer::~WebIDBServer):
(WebKit::WebIDBServer::getOrigins):
(WebKit::WebIDBServer::closeAndDeleteDatabasesModifiedSince):
(WebKit::WebIDBServer::closeAndDeleteDatabasesForOrigins):
(WebKit::WebIDBServer::renameOrigin):
(WebKit::WebIDBServer::addConnection):
(WebKit::WebIDBServer::removeConnection):
(WebKit::WebIDBServer::postTask):
(WebKit::WebIDBServer::postTaskReply):
(WebKit::WebIDBServer::close):
(WebKit::m_closeCallback): Deleted.
(WebKit::WebIDBServer::dispatchToThread): Deleted.
(WebKit::WebIDBServer::tryClose): Deleted.

  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::createWebIDBServer):

9:16 PM Changeset in webkit [278448] by Jean-Yves Avenard
  • 5 edits in trunk/Source/WebCore

fast/dom/Window/property-access-on-cached-window-after-frame-removed.html (layout-test) may crash
https://bugs.webkit.org/show_bug.cgi?id=226612
rdar://78846264

Reviewed by Eric Carlson.

It is possible under some circumstances for a MediaSession to be constructed
when no page or frame exists (such as when we move in/out bfcache).
The MediaSession constructor incorrectly only created the MediaSessionCoordinatorPrivate
if a Page and Frame existed.
To avoid any ambiguities on when MediaSession::m_coordinator could be set, we
make this member a const Ref<>.
Test is covered by fast/dom/Window/property-access-on-cached-window-after-frame-removed.html

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::MediaSession): Create MediaSessionCoordinatorPrivate in initializer list.
(WebCore::MediaSession::suspend): Remove unnecessary null check
(WebCore::MediaSession::stop): Remove unnecessary null check

  • Modules/mediasession/MediaSession.h: Make m_coordinator a const Ref<>

(WebCore::MediaSession::coordinator const):

  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::create): Remove MediaSessionCoordinatorPrivate argument to constructor.
(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):

  • Modules/mediasession/MediaSessionCoordinator.h:
8:45 PM Changeset in webkit [278447] by msaboff@apple.com
  • 14 edits in trunk/Source/bmalloc

2021-06-03 Michael Saboff <msaboff@apple.com>

Unreviewed, rolling out r278278.
https://bugs.webkit.org/show_bug.cgi?id=226237

Made some JSC mini mode and other tests flakey.

Reverted changeset:

[bmalloc] Make adaptive scavenging more precise
https://bugs.webkit.org/show_bug.cgi?id=226237

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp: (bmalloc::Heap::decommitLargeRange): (bmalloc::Heap::scavenge): (bmalloc::Heap::scavengeToHighWatermark): (bmalloc::Heap::allocateSmallChunk): (bmalloc::Heap::deallocateSmallChunk): (bmalloc::Heap::allocateSmallPage): (bmalloc::Heap::splitAndAllocate): (bmalloc::Heap::allocateLarge): (bmalloc::Heap::tryAllocateLargeChunk): (bmalloc::Heap::shrinkLarge): (bmalloc::Heap::deallocateLarge):
  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h: (bmalloc::passedNumPages>::takeFirstEligible): (bmalloc::passedNumPages>::scavenge): (bmalloc::passedNumPages>::scavengeToHighWatermark):
  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h: (bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
  • bmalloc/IsoSharedHeapInlines.h: (bmalloc::IsoSharedHeap::allocateSlow):
  • bmalloc/LargeMap.cpp: (bmalloc::LargeMap::add):
  • bmalloc/LargeRange.h: (bmalloc::LargeRange::LargeRange): (bmalloc::LargeRange::setTotalPhysicalSize): (bmalloc::merge): (bmalloc::LargeRange::split const): (bmalloc::LargeRange::physicalEnd const): Deleted. (bmalloc::LargeRange::setPhysicalEnd): Deleted. (bmalloc::LargeRange::clearPhysicalEnd): Deleted.
  • bmalloc/Scavenger.cpp: (bmalloc::Scavenger::Scavenger): (bmalloc::Scavenger::didStartGrowing): (bmalloc::Scavenger::scheduleIfUnderMemoryPressure): (bmalloc::Scavenger::schedule): (bmalloc::Scavenger::timeSinceLastPartialScavenge): (bmalloc::Scavenger::scavenge): (bmalloc::Scavenger::partialScavenge): (bmalloc::Scavenger::threadRunLoop):
  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h:
8:42 PM Changeset in webkit [278446] by Said Abou-Hallawa
  • 2 edits in trunk/Tools

[MotionMark] Controller.filterOutOutliers() sorts the frameLengths array incorrectly
https://bugs.webkit.org/show_bug.cgi?id=226605
<rdar://77350238>

Reviewed by Simon Fraser.

Update MotionMark 1.1 to use the version r278436.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
8:10 PM Changeset in webkit [278445] by Ross Kirsling
  • 54 edits
    2 moves
    3 adds in trunk

[JSC] Implement JIT ICs for InByVal
https://bugs.webkit.org/show_bug.cgi?id=226563

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/in-by-val-int32.js: Added.
  • microbenchmarks/in-by-val-string-index.js: Added.
  • microbenchmarks/in-by-val-symbol.js: Added.

Source/JavaScriptCore:

Until now, InByVal has had few optimizations implemented:
DFG would attempt to convert string index lookups to InById and int32 lookups to HasIndexedProperty,
but there has been no inline caching nor any special handling for symbol lookups.

This has become a more urgent problem now, as #x in obj (i.e. HasPrivateName / HasPrivateBrand)
will need to mimic InByVal's inline caching strategy in order to be deemed performant enough to ship.

This patch thus implements inline caching for InByVal at all JIT tiers.
The result is a night-and-day difference for symbols, a nice boost for string indices, and no change for int32s:

in-by-val-symbol 203.5572+-2.7647 19.1035+-0.7498 definitely 10.6555x faster
in-by-val-string-index 87.0368+-44.7766 45.9971+-32.0007 might be 1.8922x faster
in-by-val-int32 110.9904+-1.7109 ? 111.3431+-1.7558 ?

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CheckPrivateBrandStatus.cpp:

(JSC::CheckPrivateBrandStatus::singleIdentifier const):

  • bytecode/DeleteByStatus.cpp:

(JSC::DeleteByStatus::singleIdentifier const):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::singleIdentifier const):

  • bytecode/ICStatusMap.h:
  • bytecode/ICStatusUtils.h:

(JSC::singleIdentifierForICStatus):

  • bytecode/InByIdVariant.cpp:

(JSC::InByIdVariant::InByIdVariant):
(JSC::InByIdVariant::attemptToMerge):
(JSC::InByIdVariant::dumpInContext const):

  • bytecode/InByIdVariant.h:

(JSC::InByIdVariant::identifier const):
(JSC::InByIdVariant::overlaps):

  • bytecode/InByStatus.cpp: Renamed from Source/JavaScriptCore/bytecode/InByIdStatus.cpp.

(JSC::InByStatus::appendVariant):
(JSC::InByStatus::shrinkToFit):
(JSC::InByStatus::computeFor):
(JSC::InByStatus::computeForStubInfo):
(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::InByStatus::merge):
(JSC::InByStatus::filter):
(JSC::InByStatus::markIfCheap):
(JSC::InByStatus::finalize):
(JSC::InByStatus::singleIdentifier const):
(JSC::InByStatus::dump const):

  • bytecode/InByStatus.h: Renamed from Source/JavaScriptCore/bytecode/InByIdStatus.h.
  • bytecode/RecordedStatuses.cpp:

(JSC::RecordedStatuses::addInByStatus): Renamed from addInByIdStatus.

  • bytecode/RecordedStatuses.h:
  • bytecode/SetPrivateBrandStatus.cpp:

(JSC::SetPrivateBrandStatus::singleIdentifier const):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::reset):

  • bytecode/StructureStubInfo.h:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addInByVal):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasInByStatus): Renamed from hasInByIdStatus.
(JSC::DFG::Node::inByStatus): Renamed from inByIdStatus.

  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInByVal):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGVarargsForwardingPhase.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileInBy):
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
(JSC::FTL::DFG::LowerDFGToB3::compileInByVal):

  • jit/ICStats.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITInByValGenerator::JITInByValGenerator):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::JITInByValGenerator::finalize):
(JSC::JITInByIdGenerator::JITInByIdGenerator):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITDelByIdGenerator::slowPathJump const):
(JSC::JITInByValGenerator::JITInByValGenerator):
(JSC::JITInByValGenerator::slowPathJump const):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitSlow_op_in_by_val):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitSlow_op_in_by_val):

  • jit/Repatch.cpp:

(JSC::tryCacheInBy): Renamed from tryCacheInByID.
(JSC::repatchInBy): Renamed from repatchInByID.
(JSC::resetInBy): Renamed from resetInByID.

  • jit/Repatch.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:
  • runtime/CommonSlowPaths.h:
7:20 PM Changeset in webkit [278444] by ddkilzer@apple.com
  • 4 edits in trunk/Tools

Weak external symbols found when building with Release+Coverage configuration
<https://webkit.org/b/226562>
<rdar://problem/78765608>

Reviewed by Jonathan Bedard.

  • Scripts/check-for-weak-vtables-and-externals:
  • Ignore weak symbols from llvm when building with coverage enabled. This fixes the build.
  • Scripts/webkitdirs.pm:

(XcodeOptions):

  • Switch to using XcodeCoverageSupportOptions() so make and build-webkit both use the same configuration.

(XcodeCoverageSupportOptions):

  • Remove old Xcode variables from 2008 in favor of passing -xcconfig Tools/coverage/coverage.xcconfig.
  • coverage/coverage.xcconfig:

(OTHER_CPLUSPLUSFLAGS):

  • Remove OTHER_CPLUSPLUSFLAGS since this just caused duplicate command-line switches to be used when compiling C++ sources.
7:03 PM Changeset in webkit [278443] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Crack in hero text on https://www.apple.com/mac-mini/
https://bugs.webkit.org/show_bug.cgi?id=226610
<rdar://71246655>

Reviewed by Simon Fraser.

Source/WebCore:

FillBox::Text's mask rect needs pixel snapping so that we can position/size it properly on non-1x screens.

Test: fast/clip/hidpi-background-clip-with-text-fill-color.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderBoxModelObject.h:

LayoutTests:

  • fast/clip/hidpi-background-clip-with-text-fill-color-expected.html: Added.
  • fast/clip/hidpi-background-clip-with-text-fill-color.html: Added.
6:53 PM Changeset in webkit [278442] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

stopMakingViewBlankDueToLackOfRenderingUpdate logging shows even if we never made the view blank
https://bugs.webkit.org/show_bug.cgi?id=226616

Reviewed by Tim Horton.

stopMakingViewBlankDueToLackOfRenderingUpdate logging was showing even if we never made the view blank.
This was confusing so this fix makes the logging conditional.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):

  • UIProcess/WebPageProxy.h:
6:49 PM Changeset in webkit [278441] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Fix thread safety issues in [WKShareSheet presentWithParameters]
https://bugs.webkit.org/show_bug.cgi?id=226611
<rdar://77736001>

Reviewed by Ryosuke Niwa.

The code in [WKShareSheet presentWithParameters] was passing WebCore::RawFile objects to another thread.
This wasn't safe since WebCore::RawFile contains a WTF::String and a SharedBuffer, both of which are not
thread safe. Fix this by creating an isolated copy of the fileName String and converting the SharedBuffer
to a NSData before passing them to the background thread.

Also rewrite the code from ObjC to C++ because I felt it was clearer and less error-prone.

  • UIProcess/Cocoa/WKShareSheet.mm:

(appendFilesAsShareableURLs):
(-[WKShareSheet presentWithParameters:inRect:completionHandler:]):

6:30 PM Changeset in webkit [278440] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.1-branch/Source

Versioning.

WebKit-7612.1.15.1.15

5:43 PM Changeset in webkit [278439] by Jean-Yves Avenard
  • 4 edits in trunk/Source/WebCore

REGRESSION(r278336): fast/dom/Window/property-access-on-cached-window-after-frame-removed.html (layout-test) is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=226570
rdar://78784709

Reviewed by Eric Carlson.

Now that the coordinator attribute is no longer optional following bug 226328, it can
be iterated while in closed state. Check that the MediaSessionCoordinatorPrivate is set.
Fix crash in existing test.
Fly-by fixes: trailing whitespaces and make header declaration conditional.

  • Modules/mediasession/MediaSession.h:
  • Modules/mediasession/MediaSessionCoordinator.h:

(WebCore::MediaSessionCoordinator::identifier const): Add nullptr check, return empty String if so.

  • Modules/mediasession/MediaSessionCoordinator.idl: Remove trailing whitespace
5:41 PM Changeset in webkit [278438] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Fix an ASSERT in objectPrototypeHasOwnProperty() to account for TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=226609
rdar://78465046

Reviewed by Robin Morisset.

JSTests:

  • stress/termination-exception-in-objectPrototypeHasOwnProperty.js: Added.

Source/JavaScriptCore:

  • runtime/ObjectPrototype.cpp:

(JSC::objectPrototypeHasOwnProperty):

5:35 PM Changeset in webkit [278437] by Devin Rousso
  • 4 edits in trunk/Source/WebCore

[Payment Request] allow additional line items and/or an override total to be specified in ApplePayModifier
https://bugs.webkit.org/show_bug.cgi?id=226597
<rdar://problem/78835065>

Reviewed by Wenson Hsieh.

Instead of merging properties of the first applicable PaymentDetailsModifier (or more
specifically the related ApplePayModifier with only the total line item, add total
and additionalLineItems properties to ApplePayModifier that are ApplePayLineItem.

  • Modules/applepay/paymentrequest/ApplePayModifier.idl:
  • Modules/applepay/paymentrequest/ApplePayModifier.h:

Drive-by: Rename additionalShippingOptions to additionalShippingMethods to emphasize

that the values are ApplePayShippingMethod instead of PaymentShippingOption.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::computeShippingMethods const):
(WebCore::ApplePayPaymentHandler::computeTotalAndLineItems const):

5:31 PM Changeset in webkit [278436] by Said Abou-Hallawa
  • 2 edits in trunk/PerformanceTests

[MotionMark] Controller.filterOutOutliers() sorts the frameLengths array incorrectly
https://bugs.webkit.org/show_bug.cgi?id=226605

Reviewed by Myles C. Maxfield.

Controller.filterOutOutliers must pass a compare function to Array.sort()
because it filters an array of numbers.

  • MotionMark/tests/resources/main.js:

(filterOutOutliers):

5:20 PM Changeset in webkit [278435] by Ruben Turcios
  • 1 copy in tags/Safari-611.3.6.1.5

Tag Safari-611.3.6.1.5.

5:19 PM Changeset in webkit [278434] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Make $vm's accessor test functions robust against primitive |this|
https://bugs.webkit.org/show_bug.cgi?id=226591

Reviewed by Saam Barati.

JSTests:

  • stress/test-static-accessor-on-primitive.js: Added.

(shouldThrow):

Source/JavaScriptCore:

These functions are testing-purpose, and they are not robust against passing primitive as |this|.
This patch makes them robust so that we throw an error instead of crash.

  • tools/JSDollarVM.cpp:
5:14 PM Changeset in webkit [278433] by Ruben Turcios
  • 2 edits in branches/safari-611.3.6.1-branch/Source/WTF

Cherry-pick r278431. rdar://problem/78843971

Unreviewed build fix after r277881.

Fix warning about unused function.

  • wtf/cocoa/FileSystemCocoa.mm:

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

5:06 PM Changeset in webkit [278432] by Ruben Turcios
  • 8 edits in branches/safari-611.3.6.1-branch/Source

Versioning.

WebKit-7611.3.6.1.5

4:45 PM Changeset in webkit [278431] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed build fix after r277881.

Fix warning about unused function.

  • wtf/cocoa/FileSystemCocoa.mm:
4:44 PM Changeset in webkit [278430] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Add a way to specify origin and destination of app highlight
https://bugs.webkit.org/show_bug.cgi?id=226607

Patch by Matt Mokary <mmokary@apple.com> on 2021-06-03
Reviewed by Megan Gardner.

Expose a method for adding app highlights which allows the caller to specify origin and destination of the new
highlight. Update the existing method, which specifies originatedInApp: true, newGroup: false, to use this new
method.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _addAppHighlight]):
(-[WKWebView _addAppHighlightInNewGroup:originatedInApp:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
4:39 PM Changeset in webkit [278429] by Chris Lord
  • 5 edits in trunk

[WPE] position:sticky content is not correctly offset on async scrolled overflow layers with an RTL vertical scrollbar
https://bugs.webkit.org/show_bug.cgi?id=226327

Reviewed by Darin Adler.

Source/WebCore:

Make sure to respect the origin of sticky positioning nodes'
constraining rect.

No new tests, covered by existing tests.

  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):

  • page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:

(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):

LayoutTests:

Some sticky-positioning RTL related tests now pass.

  • platform/wpe/TestExpectations:
4:37 PM Changeset in webkit [278428] by Simon Fraser
  • 4 edits
    2 adds in trunk

REGRESSION (Safari 14): Menu items jump around on codelearn.cat
https://bugs.webkit.org/show_bug.cgi?id=226608
<rdar://78636003>

Reviewed by Alan Bujtas.

Source/WebCore:

This site changes overflow style dynamically on a stacking-context layer which
has an existing child compositing layer, and the layer has an offset from its
renderer due to the box-shadow.

When this happens, we need to ensure the child layers get a geometry update,
because the newly created clipping layer changes the offset for the child layers.

Test: compositing/overflow/overflow-change-reposition-descendants.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateAfterLayout):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerStyleChanged):

LayoutTests:

  • compositing/overflow/overflow-change-reposition-descendants-expected.html: Added.
  • compositing/overflow/overflow-change-reposition-descendants.html: Added.
4:21 PM Changeset in webkit [278427] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[MacOS] animations/leak-document-with-css-animation.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226598

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:58 PM Changeset in webkit [278426] by Chris Dumez
  • 21 edits in trunk/Source/WebCore

Drop generic GenericTaskQueue<T> and DeferrableTask<T> now that they are unused
https://bugs.webkit.org/show_bug.cgi?id=226601

Reviewed by Ryosuke Niwa.

Drop generic GenericTaskQueue<T> and DeferrableTask<T> now that they are unused. Rename
GenericTaskQueue<Timer> to MainThreadTaskQueue and DeferrableTask<Timer> to
MainThreadDeferrableTask as they still have some usage.

I used the "MainThread" naming for consistency with the legacy MainThreadEventQueue and
because the implementation relies on a static Timer.

  • Modules/encryptedmedia/MediaKeySystemAccess.h:
  • Modules/mediacapabilities/MediaCapabilities.h:
  • dom/Document.h:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::enqueueTaskForDispatcher): Deleted.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::cancelPendingTasks):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::enqueueTaskForDispatcher): Deleted.

  • html/HTMLMediaElement.h:
  • platform/DeferrableTask.h:

(WebCore::MainThreadDeferrableTask::MainThreadDeferrableTask):
(WebCore::DeferrableTask::DeferrableTask): Deleted.
(WebCore::DeferrableTask::scheduleTask): Deleted.

  • platform/GenericTaskQueue.cpp:

(WebCore::MainThreadTaskDispatcher::MainThreadTaskDispatcher):
(WebCore::MainThreadTaskDispatcher::postTask):
(WebCore::MainThreadTaskDispatcher::sharedTimer):
(WebCore::MainThreadTaskDispatcher::sharedTimerFired):
(WebCore::MainThreadTaskDispatcher::pendingDispatchers):
(WebCore::MainThreadTaskDispatcher::dispatchOneTask):
(WebCore::TaskDispatcher<Timer>::TaskDispatcher): Deleted.
(WebCore::TaskDispatcher<Timer>::postTask): Deleted.
(WebCore::TaskDispatcher<Timer>::sharedTimer): Deleted.
(WebCore::TaskDispatcher<Timer>::sharedTimerFired): Deleted.
(WebCore::TaskDispatcher<Timer>::pendingDispatchers): Deleted.
(WebCore::TaskDispatcher<Timer>::dispatchOneTask): Deleted.

  • platform/GenericTaskQueue.h:

(WebCore::MainThreadTaskQueue::MainThreadTaskQueue):
(WebCore::MainThreadTaskQueue::~MainThreadTaskQueue):
(WebCore::TaskDispatcher::TaskDispatcher): Deleted.
(WebCore::TaskDispatcher::postTask): Deleted.
(WebCore::GenericTaskQueueBase::hasPendingTasks const): Deleted.
(WebCore::GenericTaskQueueBase::isClosed const): Deleted.
(WebCore::GenericTaskQueueBase::close): Deleted.
(WebCore::GenericTaskQueueBase::cancelAllTasks): Deleted.
(WebCore::GenericTaskQueueBase::incrementPendingTasks): Deleted.
(WebCore::GenericTaskQueueBase::decrementPendingTasks): Deleted.
(WebCore::GenericTaskQueue::GenericTaskQueue): Deleted.
(WebCore::GenericTaskQueue::~GenericTaskQueue): Deleted.
(WebCore::GenericTaskQueue::enqueueTask): Deleted.

  • platform/RemoteCommandListener.h:
  • platform/audio/PlatformMediaSessionManager.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:

(WebCore::MediaSessionManagerCocoa::taskQueue):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/cocoa/TextTrackRepresentationCocoa.h:
  • platform/graphics/gpu/GPUBuffer.h:
  • platform/graphics/gpu/GPUQueue.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
  • platform/mock/MediaPlaybackTargetPickerMock.h:
3:44 PM Changeset in webkit [278425] by commit-queue@webkit.org
  • 7 edits in trunk

Unreviewed, reverting r278356.
https://bugs.webkit.org/show_bug.cgi?id=226606

"Breaks jsc tests".

Reverted changeset:

"Convert small JIT pool tests into executable fuzzing"
https://bugs.webkit.org/show_bug.cgi?id=226279
https://trac.webkit.org/changeset/278356

3:27 PM Changeset in webkit [278424] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

DFG should eliminate obvious store barriers
https://bugs.webkit.org/show_bug.cgi?id=226604

Reviewed by Mark Lam.

This has a couple changes:

  • PutByOffset doesn't GC! So let's not say that it does.
  • The store barrier clustering phase is no longer called the store barrier fencing phase in dumps.

Small Speedometer2 speed-up. Definite speed-up for Elm.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGStoreBarrierClusteringPhase.cpp:
3:27 PM Changeset in webkit [278423] by Jean-Yves Avenard
  • 7 edits in trunk

Add MediaSessionCoordinator test to ensure that disconnection on the private side is properly handled.
https://bugs.webkit.org/show_bug.cgi?id=226568
rdar://problem/78801408

Reviewed by Eric Carlson.

Source/WebCore:

Make MediaSessionCoordinatorClient::coordinatorStateChanged pure virtual.

  • Modules/mediasession/MediaSessionCoordinatorPrivate.h: Add coordinatorStateChanged method,

will forward state to RemoteMediaSessionCoordinatorProxy::coordinatorStateChanged.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _createMediaSessionCoordinatorForTesting:completionHandler:]): Carry on required
change as coordinatorStateChanged is now pure virtual.
(-[WKMediaSessionCoordinatorHelper coordinatorStateChanged:]):

Tools:

  • TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm:

(-[_WKMockMediaSessionCoordinator sessionStateChanged:]): Add method to signal
change in coordinator state.
(TestWebKitAPI::TEST_F): Add test.

2:47 PM Changeset in webkit [278422] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[Hardening] Stop storing raw pointers inside WebIDBServer::m_connections
https://bugs.webkit.org/show_bug.cgi?id=226595

Reviewed by Ryosuke Niwa.

Stop storing raw pointers inside WebIDBServer::m_connections and use a WeakHashSet instead.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::addConnection):
(WebKit::WebIDBServer::removeConnection):
(WebKit::WebIDBServer::close):
(WebKit::WebIDBServer::tryClose):

  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • Platform/IPC/Connection.h:
2:39 PM Changeset in webkit [278421] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Move protector earlier in NetworkProcessProxy::networkProcessDidTerminate()
https://bugs.webkit.org/show_bug.cgi?id=226594

Reviewed by Geoffrey Garen.

Move protector earlier in NetworkProcessProxy::networkProcessDidTerminate() as it seems unsafe
to do some of the earlier operations before protected |this|.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::networkProcessDidTerminate):

2:34 PM Changeset in webkit [278420] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Stop storing Ref<IPC::Connection> in RTCDataChannelRemoteManagerProxy::m_webProcessConnections
https://bugs.webkit.org/show_bug.cgi?id=226596

Reviewed by Eric Carlson.

Stop storing Ref<IPC::Connection> in RTCDataChannelRemoteManagerProxy::m_webProcessConnections.
Keeping the IPC::Connection alive always carries the chance of leaking if we fail to properly
clear the HashMap. We can simply store an IPC::Connection::UniqueID and use that ID to send the
IPC on the background thread.

  • NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp:

(WebKit::RTCDataChannelRemoteManagerProxy::registerConnectionToWebProcess):
(WebKit::RTCDataChannelRemoteManagerProxy::sendData):
(WebKit::RTCDataChannelRemoteManagerProxy::close):
(WebKit::RTCDataChannelRemoteManagerProxy::changeReadyState):
(WebKit::RTCDataChannelRemoteManagerProxy::receiveData):
(WebKit::RTCDataChannelRemoteManagerProxy::detectError):
(WebKit::RTCDataChannelRemoteManagerProxy::bufferedAmountIsDecreasing):

  • NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.h:
2:26 PM Changeset in webkit [278419] by Cameron McCormack
  • 10 edits
    28 adds in trunk

Prevent background-attachment:fixed from causing slow scrolling when in a position:fixed layer
https://bugs.webkit.org/show_bug.cgi?id=226399

Reviewed by Simon Fraser.

Source/WebCore:

Tests: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1.html

scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync.html

We move responsbility for managing the HasSlowRepaintObjects
synchronous scrolling reason on the root scrolling node from
ScrollingCoordinator to RenderLayerCompositor, which is where it's
handled for all other scrolling nodes.

If a slow repaint object (i.e. a background-attachment:fixed element) is
present in a non-root async scrolling layer, then it continues to add
HasSlowRepaintObjects to the scrolling node's synchronous scrolling
reasons. But we now no longer add HasSlowRepaintObjects to the root
scrolling node's synchronous scrolling reasons if its containing async
scrolling layer "behaves as fixed", i.e. won't move while scrolling the
viewport.

  • page/FrameView.cpp:

(WebCore::FrameView::addSlowRepaintObject): No longer need to inform
the ScrollingCoordinator since the RenderLayerCompositor now handles
HasSlowRepaintObjects synchronous scroling reason updates for the root.
(WebCore::FrameView::removeSlowRepaintObject): Ditto.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::synchronousScrollingReasons const):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
Preserve the current value of HasSlowRepaintObjects when updating
synchronous scrolling reasons.
(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously const):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText const):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::synchronousScrollingReasons const):
(WebCore::ScrollingCoordinator::hasSynchronousScrollingReasons const):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::propagateSynchronousScrollingReasons):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes):
Take responsibility for managing HasSlowRepaintObjects on the root
scroll tree node. Only add HasSlowRepaintObjects on the root if not
in a fixed position layer.

LayoutTests:

  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe-expected.txt:
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-1.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-async.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-2-sync.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-async.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-3-sync.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-4.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-async.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-5-sync.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-6.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-7.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-async.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-8-sync.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-async.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-slow-scrolling-9-sync.html: Added.
2:00 PM Changeset in webkit [278418] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.16.2

Tag Safari-612.1.16.2.

1:53 PM Changeset in webkit [278417] by mmaxfield@apple.com
  • 3 edits in trunk/PerformanceTests

[MotionMark] Update version number of local development version of the benchmark to match the currently-being-released version
https://bugs.webkit.org/show_bug.cgi?id=226592

Reviewed by Darin Adler.

We are currently in the process of releasing MotionMark 1.2. http://browserbench.org/MotionMark1.2/

  • MotionMark/about.html:
  • MotionMark/resources/strings.js:
12:59 PM Changeset in webkit [278416] by Fujii Hironori
  • 10 edits in trunk/Source

[Win] Remove unused GraphicsContext::shouldIncludeChildWindows()
https://bugs.webkit.org/show_bug.cgi?id=226567

Reviewed by Don Olmstead.

Source/WebCore:

It was added by r40366 (Bug 23623) for Plugins. However, the
plugin support was removed by r278265 (Bug 226410).

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::shouldIncludeChildWindows const): Deleted.

  • platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
  • platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:

(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):

  • platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::setShouldIncludeChildWindows): Deleted.
(WebCore::GraphicsContext::shouldIncludeChildWindows const): Deleted.

Source/WebKitLegacy/win:

  • WebFrame.cpp:

(WebFrame::paintDocumentRectToContext):
(WebFrame::paintScrollViewRectToContextAtPoint):
(WebFrame::spoolPages):

  • WebView.cpp:

(WebView::updateBackingStore):
(WebView::paint):
(WebView::paintIntoBackingStore):

  • WebView.h: Removed WindowsToPaint.
12:40 PM Changeset in webkit [278415] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Do not recalibrate camera if the settings are the same
https://bugs.webkit.org/show_bug.cgi?id=226585

Reviewed by Eric Carlson.

Make sure to not update the preset if the constraints are equal to the current settings.
Manually tested.

  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):

12:40 PM Changeset in webkit [278414] by Wenson Hsieh
  • 7 edits in trunk/Source/WebKit

[macOS] Image extraction preview panel should automatically close when the web view is unparented
https://bugs.webkit.org/show_bug.cgi?id=226588
rdar://77062762

Reviewed by Tim Horton.

Refactor some logic for presenting the preview panel. See below for more details.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::handleProcessSwapOrExit):
(WebKit::WebViewImpl::viewDidMoveToWindow):

When the web view is removed from the view hierarchy (i.e. when the view is moved to a nil window), call into
closeSharedPreviewPanelIfNecessary to dismiss the shared preview panel if we're currently controlling its
presentation for the purposes of image extraction.

(WebKit::WebViewImpl::beginPreviewPanelControl):
(WebKit::WebViewImpl::endPreviewPanelControl):

Add more plumbing into WebPageProxy to begin and end preview panel control; this allows us to avoid having to
expose a separate method to reset WebPageProxy's m_imageExtractionPreviewController and call it from
WebViewImpl.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

Additionally call into closeSharedPreviewPanelIfNecessary when committing main frame navigation. We also
refactor a bit of logic here so that we fold several pieces of similar "reset" logic into a single if statement.

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WKImageExtractionPreviewController.h:
  • UIProcess/mac/WKImageExtractionPreviewController.mm:

(-[WKImageExtractionPreviewController beginControl:]):
(-[WKImageExtractionPreviewController endControl:]):
(-[WKImageExtractionPreviewController closePanelIfNecessary]):
(-[WKImageExtractionPreviewController isControlling:]):

Move logic for assigning, removing, and checking the QLPreviewPanel's -delegate and -dataSource into helper
methods on WKImageExtractionPreviewController. Doing this allows us to consolidate more of the QuickLookUI-
specific logic inside WKImageExtractionPreviewController and WebPageProxy, but also (and more importantly)
prevents us from having to #import <pal/spi/mac/QuickLookMacSPI.h> inside WebPageProxyMac.mm, which results
in nullability errors when calling into -[NSApplication stopSpeaking:].

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::beginPreviewPanelControl):
(WebKit::WebPageProxy::endPreviewPanelControl):
(WebKit::WebPageProxy::closeSharedPreviewPanelIfNecessary):

12:32 PM Changeset in webkit [278413] by Patrick Angle
  • 3 edits in trunk/Source/JavaScriptCore

Web Inspector: [Cocoa] RemoteInspector won't connect to a new relay if it hasn't yet failed to communicate with a previously connected relay
https://bugs.webkit.org/show_bug.cgi?id=226539

Reviewed by Devin Rousso.

RemoteInspector communicates with a relay daemon running on the same device in order to send updates like new
or removed inspectable targets and receive changes to settings like automatic debugging. The relay daemon then
communicates with a client that connects for debugging. Only one relay daemon should ever be running at a time,
and its lifecycle is managed separately from JavaScriptCore.

RemoteInspector holds a RefPtr to its connection to this relay, and only clears this pointer upon a failure to
communicate over the XPC connection or a known disconnection. However, it is possible, and in some cases likely
(for example the relay restarting from a brief client disconnection and reconnection), that we can be informed
of a newly launched relay being available while still thinking we are connected to the old relay, as we have not
yet sent a message and triggered a failure in the interim period of time.

To correct this we now send a simple message any time setupXPCConnectionIfNeeded is called if we have an
existing RefPtr to a relay connection in order to verify the connection is still functional. We now also retry
to connect to a relay upon failure in order to create a new connection to the current relay.

In order to prevent entering a retry loop where every subsequent retry's failure results in another retry
forever, a flag to retry connecting is set when a call to setupXPCConnectionIfNeeded is made while we already
have a RefPtr to a relay connection. On failure if we are in this special state we will retry once to connect
but subsequent failures will not automatically reattempt a connection.

  • inspector/remote/RemoteInspector.h:
  • inspector/remote/cocoa/RemoteInspectorCocoa.mm:

(Inspector::RemoteInspector::stopInternal):

  • Clear the retry connection flag when stopping in an orderly fashion.

(Inspector::RemoteInspector::setupXPCConnectionIfNeeded):

  • Set the retry connection flag and send a simple message if we already have a relay connection in order to make

sure the connection is either still valid or is torn down properly on failure.
(Inspector::RemoteInspector::xpcConnectionFailed):

  • If the retry flag is set, schedule a retry and clear the retry flag.
11:04 AM Changeset in webkit [278412] by Chris Fleizach
  • 2 edits in trunk/Source/WebKit

AX: macOS WebContent can't read prefs from com.apple.Accessibility
https://bugs.webkit.org/show_bug.cgi?id=226528

Reviewed by Per Arne Vollan.

Some accessibility preferences on macOS use libAccessibility.
WebContent should process these on iOS & macOS.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::setPreferenceValue):

10:53 AM Changeset in webkit [278411] by Alan Bujtas
  • 4 edits
    6 adds in trunk

Incorrect text selection when crossing flex item boundary
https://bugs.webkit.org/show_bug.cgi?id=226518
<rdar://59487603>

Reviewed by Simon Fraser.

Source/WebCore:

Let's use the more sophisticated "which child is closer to the hit point" logic in RenderBox for the flex (and grid) content.
The rest of the RenderBlock::positionForPoint is meant to deal with BFC content where block level boxes are positioned in block direction, after each other.

Test: editing/selection/selecting-content-by-overshooting-the-container.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::positionForPoint):

LayoutTests:

  • editing/selection/selecting-content-by-overshooting-the-container-expected.txt: Added.
  • editing/selection/selecting-content-by-overshooting-the-container.html: Added.
10:25 AM Changeset in webkit [278410] by youenn@apple.com
  • 12 edits in trunk

Cherry-pick webrtc fix to correctly handle audio track state in case of renegotiation
https://bugs.webkit.org/show_bug.cgi?id=226577

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/receiver-track-live.https-expected.txt:

Source/ThirdParty/libwebrtc:

Cherry-pick https://webrtc.googlesource.com/src/+/c335b0e63bff56ca0fbfa617dee6a644c85df164%5E%21/.
We need to do small changes to peer_connection.cc given the upstream fix is based on a newer version
which has some code moved from peer_connection.cc to rtp_transmission_manager.cc.

  • Source/webrtc/pc/audio_rtp_receiver.cc:
  • Source/webrtc/pc/audio_rtp_receiver.h:
  • Source/webrtc/pc/peer_connection.cc:
  • Source/webrtc/pc/peer_connection_rtp_unittest.cc:
  • Source/webrtc/pc/remote_audio_source.cc:
  • Source/webrtc/pc/remote_audio_source.h:
  • Source/webrtc/pc/rtp_sender_receiver_unittest.cc:

LayoutTests:

Update test now that we have the correct behavior.

  • webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html:
10:04 AM Changeset in webkit [278409] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

StorageArea should be able to send its IPC directly from the background thread
https://bugs.webkit.org/show_bug.cgi?id=226583

Reviewed by Alex Christensen.

Update StorageArea so that it does its IPC sending straight from the storage thread, instead of
hopping to the main thread to do so.

  • NetworkProcess/WebStorage/StorageArea.cpp:

(WebKit::StorageArea::clear):
(WebKit::StorageArea::dispatchEvents const):

8:25 AM Changeset in webkit [278408] by magomez@igalia.com
  • 2 edits
    1 add in trunk/Tools/buildstream

REGRESSION(r275755): [GStreamer] Crashes on surfaceless i965 platforms
https://bugs.webkit.org/show_bug.cgi?id=226581

Reviewed by Philippe Normand.

Vendor potential fix for https://gitlab.freedesktop.org/mesa/mesa/-/issues/778.

  • elements/sdk/mesa.bst:
  • patches/mesa/0002-i965-Prevent-invalid-framebuffer-usage.patch: Added.
8:23 AM Changeset in webkit [278407] by Antti Koivisto
  • 9 edits
    2 deletes in trunk/Source/WebCore

Remove TrailingFloatsRootInlineBox
https://bugs.webkit.org/show_bug.cgi?id=226579

Reviewed by Sam Weinig.

Replace it with a bit in LegacyRootInlineBox.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/VisibleUnits.cpp:

(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::logicalHeight const):

  • rendering/LegacyInlineFlowBox.h:

(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::linkToEndLineIfNeeded):

  • rendering/LegacyRootInlineBox.h:

(WebCore::LegacyRootInlineBox::isForTrailingFloats const):
(WebCore::LegacyRootInlineBox::setIsForTrailingFloats):
(WebCore::LegacyRootInlineBox::isTrailingFloatsRootInlineBox const): Deleted.

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/TrailingFloatsRootInlineBox.cpp: Removed.
  • rendering/TrailingFloatsRootInlineBox.h: Removed.
7:27 AM Changeset in webkit [278406] by magomez@igalia.com
  • 4 edits in trunk/Source/WebCore

[GStreamer] Remove dependency on glvideoflip and videoflip
https://bugs.webkit.org/show_bug.cgi?id=225456

Reviewed by Philippe Normand.

Stop using videoflip and glvideoflip to rotate the video frames inside GStreamer. These perform a copy
of the frame to perform the rotation that we can avoid if we rotate the frames ourselves when painting them.

Covered by existent tests.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkConstructed):
(webKitGLVideoSinkGetProperty):
(webkit_gl_video_sink_class_init):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::updateVideoSizeAndOrientationFromCaps):
(WebCore::MediaPlayerPrivateGStreamer::paint):
(WebCore::MediaPlayerPrivateGStreamer::createVideoSinkGL):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
6:39 AM Changeset in webkit [278405] by Antti Koivisto
  • 40 edits
    2 moves in trunk/Source/WebCore

Rename InlineFlowBox to LegacyInlineFlowBox
https://bugs.webkit.org/show_bug.cgi?id=226569

Reviewed by Alan Bujtas.

More legacy line layout naming.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/Verification.cpp:

(WebCore::Layout::collectFlowBoxSubtree):
(WebCore::Layout::collectInlineBoxes):

  • layout/formattingContexts/inline/InlineFormattingQuirks.cpp:

(WebCore::Layout::InlineFormattingQuirks::inlineLevelBoxAffectsLineBox const):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::EllipsisBox):

  • rendering/EllipsisBox.h:
  • rendering/InlineElementBox.cpp:
  • rendering/InlineElementBox.h:

(WebCore::InlineElementBox::InlineElementBox):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::dirtyLineBoxes):
(WebCore::LegacyInlineBox::nextLeafOnLine const):
(WebCore::LegacyInlineBox::previousLeafOnLine const):

  • rendering/LegacyInlineBox.h:

(WebCore::LegacyInlineBox::parent const):
(WebCore::LegacyInlineBox::setParent):
(WebCore::LegacyInlineBox::LegacyInlineBox):

  • rendering/LegacyInlineFlowBox.cpp: Renamed from Source/WebCore/rendering/InlineFlowBox.cpp.

(WebCore::LegacyInlineFlowBox::~LegacyInlineFlowBox):
(WebCore::LegacyInlineFlowBox::setHasBadChildList):
(WebCore::LegacyInlineFlowBox::getFlowSpacingLogicalWidth):
(WebCore::setHasTextDescendantsOnAncestors):
(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::removeChild):
(WebCore::LegacyInlineFlowBox::deleteLine):
(WebCore::LegacyInlineFlowBox::removeLineBoxFromRenderObject):
(WebCore::LegacyInlineFlowBox::extractLine):
(WebCore::LegacyInlineFlowBox::extractLineBoxFromRenderObject):
(WebCore::LegacyInlineFlowBox::attachLine):
(WebCore::LegacyInlineFlowBox::attachLineBoxToRenderObject):
(WebCore::LegacyInlineFlowBox::adjustPosition):
(WebCore::isLastChildForRenderer):
(WebCore::isAncestorAndWithinBlock):
(WebCore::LegacyInlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::LegacyInlineFlowBox::placeBoxesInInlineDirection):
(WebCore::LegacyInlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const):
(WebCore::verticalAlignApplies):
(WebCore::LegacyInlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::LegacyInlineFlowBox::computeLogicalBoxHeights):
(WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection):
(WebCore::LegacyInlineFlowBox::maxLogicalBottomForTextDecorationLine const):
(WebCore::LegacyInlineFlowBox::minLogicalTopForTextDecorationLine const):
(WebCore::LegacyInlineFlowBox::flipLinesInBlockDirection):
(WebCore::LegacyInlineFlowBox::addBoxShadowVisualOverflow):
(WebCore::LegacyInlineFlowBox::addBorderOutsetVisualOverflow):
(WebCore::LegacyInlineFlowBox::addTextBoxVisualOverflow):
(WebCore::LegacyInlineFlowBox::addOutlineVisualOverflow):
(WebCore::LegacyInlineFlowBox::addReplacedChildOverflow):
(WebCore::LegacyInlineFlowBox::computeOverflow):
(WebCore::LegacyInlineFlowBox::setLayoutOverflow):
(WebCore::LegacyInlineFlowBox::setVisualOverflow):
(WebCore::LegacyInlineFlowBox::setOverflowFromLogicalRects):
(WebCore::LegacyInlineFlowBox::nodeAtPoint):
(WebCore::LegacyInlineFlowBox::paint):
(WebCore::LegacyInlineFlowBox::paintFillLayers):
(WebCore::LegacyInlineFlowBox::boxShadowCanBeAppliedToBackground const):
(WebCore::LegacyInlineFlowBox::paintFillLayer):
(WebCore::LegacyInlineFlowBox::paintBoxShadow):
(WebCore::LegacyInlineFlowBox::constrainToLineTopAndBottomIfNeeded const):
(WebCore::clipRectForNinePieceImageStrip):
(WebCore::LegacyInlineFlowBox::paintBoxDecorations):
(WebCore::LegacyInlineFlowBox::paintMask):
(WebCore::LegacyInlineFlowBox::firstLeafDescendant const):
(WebCore::LegacyInlineFlowBox::lastLeafDescendant const):
(WebCore::LegacyInlineFlowBox::selectionState):
(WebCore::LegacyInlineFlowBox::canAccommodateEllipsis const):
(WebCore::LegacyInlineFlowBox::placeEllipsisBox):
(WebCore::LegacyInlineFlowBox::clearTruncation):
(WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const):
(WebCore::LegacyInlineFlowBox::collectLeafBoxesInLogicalOrder const):
(WebCore::LegacyInlineFlowBox::computeReplacedAndTextLineTopAndBottom const):
(WebCore::LegacyInlineFlowBox::boxName const):
(WebCore::LegacyInlineFlowBox::outputLineTreeAndMark const):
(WebCore::LegacyInlineFlowBox::checkConsistency const):

  • rendering/LegacyInlineFlowBox.h: Renamed from Source/WebCore/rendering/InlineFlowBox.h.

(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
(WebCore::LegacyInlineFlowBox::renderer const):
(WebCore::LegacyInlineFlowBox::lineStyle const):
(WebCore::LegacyInlineFlowBox::prevLineBox const):
(WebCore::LegacyInlineFlowBox::nextLineBox const):
(WebCore::LegacyInlineFlowBox::setNextLineBox):
(WebCore::LegacyInlineFlowBox::setPreviousLineBox):
(WebCore::LegacyInlineFlowBox::firstChild const):
(WebCore::LegacyInlineFlowBox::lastChild const):
(WebCore::LegacyInlineFlowBox::marginBorderPaddingLogicalLeft const):
(WebCore::LegacyInlineFlowBox::marginBorderPaddingLogicalRight const):
(WebCore::LegacyInlineFlowBox::marginLogicalLeft const):
(WebCore::LegacyInlineFlowBox::marginLogicalRight const):
(WebCore::LegacyInlineFlowBox::borderLogicalLeft const):
(WebCore::LegacyInlineFlowBox::borderLogicalRight const):
(WebCore::LegacyInlineFlowBox::paddingLogicalLeft const):
(WebCore::LegacyInlineFlowBox::paddingLogicalRight const):
(WebCore::LegacyInlineFlowBox::includeLogicalLeftEdge const):
(WebCore::LegacyInlineFlowBox::includeLogicalRightEdge const):
(WebCore::LegacyInlineFlowBox::setEdges):
(WebCore::LegacyInlineFlowBox::beginPlacingBoxRangesInInlineDirection):
(WebCore::LegacyInlineFlowBox::endPlacingBoxRangesInInlineDirection):
(WebCore::LegacyInlineFlowBox::hasTextChildren const):
(WebCore::LegacyInlineFlowBox::hasTextDescendants const):
(WebCore::LegacyInlineFlowBox::hasHardLinebreak const):
(WebCore::LegacyInlineFlowBox::setHasTextChildren):
(WebCore::LegacyInlineFlowBox::setHasTextDescendants):
(WebCore::LegacyInlineFlowBox::layoutOverflowRect const):
(WebCore::LegacyInlineFlowBox::logicalTopLayoutOverflow const):
(WebCore::LegacyInlineFlowBox::logicalBottomLayoutOverflow const):
(WebCore::LegacyInlineFlowBox::logicalLayoutOverflowRect const):
(WebCore::LegacyInlineFlowBox::visualOverflowRect const):
(WebCore::LegacyInlineFlowBox::logicalLeftVisualOverflow const):
(WebCore::LegacyInlineFlowBox::logicalRightVisualOverflow const):
(WebCore::LegacyInlineFlowBox::logicalTopVisualOverflow const):
(WebCore::LegacyInlineFlowBox::logicalBottomVisualOverflow const):
(WebCore::LegacyInlineFlowBox::logicalVisualOverflowRect const):
(WebCore::LegacyInlineFlowBox::frameRectIncludingLineHeight const):
(WebCore::LegacyInlineFlowBox::logicalFrameRectIncludingLineHeight const):
(WebCore::LegacyInlineFlowBox::descendantsHaveSameLineHeightAndBaseline const):
(WebCore::LegacyInlineFlowBox::clearDescendantsHaveSameLineHeightAndBaseline):
(WebCore::LegacyInlineFlowBox::checkConsistency const):
(WebCore::LegacyInlineFlowBox::setHasBadChildList):

  • rendering/LegacyLineLayout.cpp:

(WebCore::parentIsConstructedOrHaveNext):
(WebCore::LegacyLineLayout::createLineBoxes):
(WebCore::LegacyLineLayout::constructLine):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):

  • rendering/LegacyLineLayout.h:
  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::LegacyRootInlineBox):
(WebCore::LegacyRootInlineBox::clearTruncation):
(WebCore::LegacyRootInlineBox::lineCanAccommodateEllipsis):
(WebCore::LegacyRootInlineBox::placeEllipsisBox):
(WebCore::LegacyRootInlineBox::paint):
(WebCore::LegacyRootInlineBox::nodeAtPoint):
(WebCore::LegacyRootInlineBox::adjustPosition):
(WebCore::LegacyRootInlineBox::includeFontForBox const):
(WebCore::LegacyRootInlineBox::includeGlyphsForBox const):
(WebCore::LegacyRootInlineBox::includeInitialLetterForBox const):

  • rendering/LegacyRootInlineBox.h:

(WebCore::LegacyRootInlineBox::logicalTopVisualOverflow const):
(WebCore::LegacyRootInlineBox::logicalBottomVisualOverflow const):
(WebCore::LegacyRootInlineBox::logicalTopLayoutOverflow const):
(WebCore::LegacyRootInlineBox::logicalBottomLayoutOverflow const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineBlockBaseline const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::getBackgroundRoundedRect const):
(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const):
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):

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

(WebCore::RenderImage::boxShadowShouldBeAppliedToBackground const):

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

(WebCore::RenderInline::generateLineBoxRects const):
(WebCore::RenderInline::generateCulledLineBoxRects const):
(WebCore::RenderInline::linesBoundingBox const):
(WebCore::RenderInline::linesVisualOverflowBoundingBox const):
(WebCore::RenderInline::linesVisualOverflowBoundingBoxInFragment const):
(WebCore::RenderInline::dirtyLineBoxes):
(WebCore::RenderInline::createInlineFlowBox):
(WebCore::RenderInline::createAndAppendInlineFlowBox):
(WebCore::RenderInline::paintOutline):

  • rendering/RenderInline.h:

(WebCore::RenderInline::firstLineBox const):
(WebCore::RenderInline::lastLineBox const):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::appendLineBox):
(WebCore::RenderLineBoxList::deleteLineBoxTree):
(WebCore::RenderLineBoxList::extractLineBox):
(WebCore::RenderLineBoxList::attachLineBox):
(WebCore::RenderLineBoxList::removeLineBox):
(WebCore::RenderLineBoxList::deleteLineBoxes):
(WebCore::RenderLineBoxList::dirtyLineBoxes):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect const):
(WebCore::RenderLineBoxList::paint const):
(WebCore::RenderLineBoxList::hitTest const):
(WebCore::RenderLineBoxList::checkConsistency const):

  • rendering/RenderLineBoxList.h:

(WebCore::RenderLineBoxList::firstLineBox const):
(WebCore::RenderLineBoxList::lastLineBox const):

  • rendering/RenderOverflow.h:
  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground const):

  • rendering/RenderTableCell.h:
  • rendering/RenderVTTCue.cpp:

(WebCore::RenderVTTCue::initializeLayoutParameters):
(WebCore::RenderVTTCue::shouldSwitchDirection const):
(WebCore::RenderVTTCue::repositionCueSnapToLinesSet):
(WebCore::RenderVTTCue::repositionGenericCue):

  • rendering/RenderVTTCue.h:
  • rendering/svg/RenderSVGInline.cpp:

(WebCore::RenderSVGInline::createInlineFlowBox):
(WebCore::RenderSVGInline::absoluteQuads const):

  • rendering/svg/RenderSVGInline.h:
  • rendering/svg/SVGInlineFlowBox.h:
  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::findRendererDefininingTextDecoration):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):

  • rendering/svg/SVGRootInlineBox.h:
  • rendering/svg/SVGTextQuery.cpp:

(WebCore::flowBoxForRenderer):
(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):

  • rendering/svg/SVGTextQuery.h:
6:10 AM Changeset in webkit [278404] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk/Source/WTF

REGRESSION(r277744): Broke build on s390x mainframes
https://bugs.webkit.org/show_bug.cgi?id=226497

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-03
Reviewed by Darin Adler.

The problem is we have a template defined in a C++ source file, used by multiple source
files. This is not valid C++, so let's split the templates defined in StringBuilder.cpp out
into a new StringBuilderInternals.h that we can #include in both StringBuilder.cpp and
StringBuilderJSON.cpp.

Ideally we would move the template defined in StringBuilderJSON.cpp as well, and then
eliminate StringBuilderJSON.cpp since there would only be one function left. But that file
has an MPL license. It's easier to leave it be to keep the license situation simpler.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::expandedCapacity):
(WTF::expandedCapacity): Deleted.
(WTF::StringBuilder::allocateBuffer): Deleted.
(WTF::StringBuilder::extendBufferForAppending): Deleted.
(WTF::StringBuilder::extendBufferForAppendingSlowCase): Deleted.

  • wtf/text/StringBuilder.h:
  • wtf/text/StringBuilderInternals.h: Added.

(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::reallocateBuffer):
(WTF::StringBuilder::extendBufferForAppending):
(WTF::StringBuilder::extendBufferForAppendingSlowCase):

  • wtf/text/StringBuilderJSON.cpp:
6:02 AM Changeset in webkit [278403] by Alan Bujtas
  • 8 edits
    2 adds in trunk

[LFC][TFC] Use the fixed table height value to resolve percent column height values
https://bugs.webkit.org/show_bug.cgi?id=226566

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-with-percent-columns-simple.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace):

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::verticalSpaceForCellContent const):

  • layout/formattingContexts/table/TableFormattingGeometry.h:

LayoutTests:

  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html:
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html:
  • fast/layoutformattingcontext/table-with-percent-columns-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-with-percent-columns-simple.html: Added.
5:49 AM Changeset in webkit [278402] by Carlos Garcia Campos
  • 4 edits in trunk

[GLIB] imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse_mixed_content.html is failing since r277493
https://bugs.webkit.org/show_bug.cgi?id=225904

Reviewed by Michael Catanzaro.

Source/WebKit:

Set secureConnectionStart to WebCore::reusedTLSConnectionSentinel in case of reused TLS connection.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didStartRequest):

LayoutTests:

  • platform/glib/TestExpectations:
1:00 AM Changeset in webkit [278401] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

Update Danish translation for WebkitGTK
https://bugs.webkit.org/show_bug.cgi?id=226565

Rubber-stamped by Carlos Garcia Campos.

  • da.po:
12:59 AM Changeset in webkit [278400] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

Updated Swedish translation
https://bugs.webkit.org/show_bug.cgi?id=226558

Rubber-stamped by Carlos Garcia Campos.

  • sv.po:
12:57 AM Changeset in webkit [278399] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] [l10n] Updated Ukrainian translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=226419

Rubber-stamped by Carlos Garcia Campos.

  • uk.po:
12:09 AM Changeset in webkit [278398] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash in HTMLConverter::_addLinkForElement()
https://bugs.webkit.org/show_bug.cgi?id=226398

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-06-03
Reviewed by Ryosuke Niwa.

Source/WebCore:

While traversing a node, exit an element with a startIndex
that is always inside the bounds of the attribute string.

Test: editing/pasteboard/select-all-link-cut.html

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_traverseNode):

LayoutTests:

Add a test for this crasher.

  • editing/pasteboard/select-all-link-cut-expected.txt: Added.
  • editing/pasteboard/select-all-link-cut.html: Added.
Note: See TracTimeline for information about the timeline view.