Timeline



Jul 3, 2021:

2:29 PM Changeset in webkit [279547] by dino@apple.com
  • 8 edits in trunk

Move BottomControlsBarHeight and InsideMargin to be computed at runtime
https://bugs.webkit.org/show_bug.cgi?id=227505
<rdar://problem/79932256>

Reviewed by Devin Rousso.

Rather than having two JS constants that have to be kept in sync
with CSS, simply retrieve the value from the computed style.

No change in behaviour.

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype.layout):

  • Modules/modern-media-controls/controls/media-controls.css:

(:host(audio), :host(video.media-document.audio), *):

  • Modules/modern-media-controls/controls/layout-node.js: Add two helpers to

retrieve computed style values.

12:57 PM Changeset in webkit [279546] by Alexey Shvayka
  • 115 edits
    5 adds in trunk

[WebIDL] Rework runtime enabled properties leveraging PropertyCallback
https://bugs.webkit.org/show_bug.cgi?id=227275

Reviewed by Saam Barati.

JSTests:

  • stress/lazy-property-cross-realm.js: Added.
  • stress/lazy-property-get-cache.js: Added.
  • stress/lazy-property-gopd.js: Added.
  • stress/lazy-property-hasownproperty-cache.js: Added.
  • stress/lazy-property-put-cache.js: Added.

Source/JavaScriptCore:

To make the implementation of WebIDL runtime enabled properties independent of eager
property reification, this change:

  1. Introduces IsLazyPropertyEnabledCallback, which is needed separately from existing value callback to maintain the invariant that reifyStaticProperty() always puts a property, and to keep enumeration fast.

Calling disableCaching() isn't enough to achieve correct Get? inline caching,
so isTaintedByOpaqueObject() is leveraged to prohibit caching of runtime disabled
properties, just like in operationTryGetByIdOptimize().

The only case that might seem weird is runtime disabled properties, which were
enabled after all static properties were reified via Delete?, are not appearing.
It's fixable, yet there is currently no demand for it.

  1. Adds support for LazyPropertyCallback returning GetterSetter / CustomGetterSetter, ensuring correct structure flags and slot initialization. Previously, the callback was used to init only objects and constructors, using putDirect() unconditionally.

To avoid mixing other non-basic attributes with PropertyCallback, which would require
hoisting of checks against PropertyCallback and complicating attribute validation in
HashTableValue methods, this patch checks the type of callback's return value instead.

In the future, sticking to this approach will make returning CustomValue impossible
as it can't be distinguished from CustomAccessor. That's fine because all present
CustomValue usages merely do lazy init, which PropertyCallback is better suited for.

Also, this patch:

  1. Expands setUpStaticFunctionSlot() to handle constant integers so the code using Node.ELEMENT_NODE & friends doesn't regress (proven by attached microbenchmark).
  1. Removes extra checks from setUpStaticPropertySlot(), which is called only on non-reified properties.
  1. Removes invariant that DOMJITAttribute property is read-only, which was broken by document.body having a non-JIT custom setter. This aligns non-reified properties with structure ones.
  • jit/Repatch.cpp:

(JSC::tryCacheGetBy):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setupGetByIdPrototypeCache):

  • runtime/HasOwnPropertyCache.h:

(JSC::HasOwnPropertyCache::tryAdd):

  • runtime/JSObject.cpp:

(JSC::lookupPropertyForPut):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::reifyAllStaticProperties):

  • runtime/JSObject.h:

(JSC::JSObject::getOwnNonIndexPropertySlot):
(JSC::JSObject::fillStructurePropertySlot):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getNonReifiedStaticPropertyNames):

  • runtime/Lookup.cpp:

(JSC::setUpStaticPropertySlot):
(JSC::setUpStaticFunctionSlot): Deleted.

  • runtime/Lookup.h:

(JSC::HashTableValue::isLazyPropertyEnabled const):
(JSC::getStaticPropertySlotFromTable):
(JSC::reifyStaticProperty):
(JSC::reifyStaticProperties):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):

Source/WebCore:

This performance-neutral change makes implementation of runtime enabled properties independent
of eager property reification, slightly optimizing DOM global objects initialization.
A follow-up patch (webkit.org/b/158557) will remove eager property reification of WebIDL
constructors / prototypes, further reducing CPU usage and memory cost on page load.

Provided we reify properties without creating transitions and avoid conversion to a cacheable
dictionary, that should not regress performance & memory usage as well. Non-reified custom
accessors / values are inline-cached, even through JSProxy. DOM methods are reified on first
lookup; the same approach is used for multiple hot JSC built-ins (e.g. StringPrototype).

A huge refactoring was required to keep generation of lazy property callbacks within a single
function. Handling of private identifiers was decoupled from public ones, while hash table
generation for constructors / prototypes / instances was merged into GenerateHashTable.

This approach preserves HashTable's immutability while avoiding addition of extra checks to
entry lookup and memory usage increase. Another important advantage: a feature that was
enabled after its interface was created, immediately becomes usable (no page reload needed).

Also, this change removes all usages of DeletePropertyModeScope from WebCore, which was used
to disable non-configurable constants at runtime, allowing its complete removal in the future.

No new tests, no behavior change.

  • bindings/js/JSDOMBuiltinConstructor.h:
  • bindings/js/JSDOMConstructor.h:
  • bindings/js/JSDOMConstructorNotCallable.h:
  • bindings/js/JSDOMConstructorNotConstructable.h:
  • bindings/scripts/CodeGeneratorJS.pm:

Extract IDLInterface::className() to avoid passing $className as an argument.

(InstanceOperationCount): Deleted.
(PrototypeOperationCount): Deleted.
(InstancePropertyCount): Deleted.
(PrototypePropertyCount): Deleted.
(PrototypeHasStaticPropertyTable): Deleted.
(ConstructorHasProperties):
(PrototypeHasProperties):
(InstanceHasProperties):
Remove *Count helpers because they were incorrect with constants, overloads, private identifiers,
and Symbol.iterator. Instead, do the count in GeneratePropertiesHashTable to avoid duplicate checks.

(GeneratePropertiesHashTable):
(GenerateHashTableValueArray):

  • Compute $hasSetterOrReadonlyProperties early because it's impossible to detect runtime enabled accessors, which are concealed behind PropertyAttribute::PropertyCallback, in GenerateHashTableValueArray.
  • Set HashTable.hasSetterOrReadonlyProperties to true if a read-only value (constant) was seen.

(GenerateRuntimeEnableConditionalString):
Always use provided $globalObjectPtr parameter.

(GenerateHashTable):

  • Simplify name inference for HashTable's values / indices since hash table names never include ":".
  • Nicely simplify generation of hash table kind comment.
  • Set HashTable.classForThis to nullptr for constructors because they can't have DOMAttribute properties.

(GenerateImplementation):

  • Set ReadOnly attribute for runtime read-only accessors that shadow setter from static hash table.
  • Reify "entries" property of an iterable interface to ensure its identity with Symbol.iterator method.

(GeneratePrivateIdentifiers):

  • Add support for accelerated DOM attributes, which are rather common.
  • Add support for static operations, which we have a use case for (see @whenSignalAborted).

(GeneratePrototypeDeclaration):
Set HasStaticPropertyTable structure flag for global interfaces as well, progressing idlharness.js test.

(GenerateConstructorHelperMethods):
Ensure that HasStaticPropertyTable structure flag is set for constructors as well.

(StringifyJSCAttributes):
(GetJSCAttributesForAttribute):
(ShouldBeOnInstance):
(GenerateHeader):
(GetAttributeGetter):
(GetAttributeSetter):
(GetAttributeJSValue):
(GetOperationJSValue):
(GenerateLazyPropertyCallbacks):
(GenerateCallbackImplementationContent):
(GetRuntimeEnabledStaticProperties): Deleted.

  • bindings/scripts/test/JS/*: Updated.
  • bindings/scripts/test/DOMWindowConstructors.idl:
  • bindings/scripts/test/TestEnabledBySetting.idl:
  • bindings/scripts/test/TestObj.idl:

Cover [PrivateIdentifiers] with accelerated DOM attributes, static operations, and constructors.

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
10:43 AM Changeset in webkit [279545] by clopez@igalia.com
  • 21 edits
    4 copies
    1 move
    216 adds
    6 deletes in trunk/LayoutTests

[GTK][WPE] Gardening of expected failures and update list of baselines.

LayoutTests/imported/w3c:

Unreviewed gardening.

  • web-platform-tests/fetch/api/headers/header-values-expected.txt: Removed.
  • web-platform-tests/fetch/api/redirect/redirect-count-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker-expected.txt: Added.

LayoutTests:

Update list of expected failures, re-baseline imported WPT tests and clean some old expectation files.

Unreviewed gardening.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.https.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.https.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.https.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.https.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.https.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.https.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.https.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.https.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.https.worker-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker-expected.txt: Copied from LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.https.worker-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.https.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.https.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-same-in-same-self-allow-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-csiso2022jp-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-nonascii.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-nonascii.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/headers/header-values.any-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/fetch/api/headers/header-values-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/headers/header-values.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/content-length/api-and-duplicate-headers.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/content-length/api-and-duplicate-headers.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/h1-parsing/status-code.window-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/dom/elements/the-innertext-and-outertext-properties/getter-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/html/links/manifest/link-relationship/link-rel-manifest-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-generated-content-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/audio_loop_seek_to_eos-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/import-scripts-cross-origin.https-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/registration-script-module.https-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any.worker-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/websockets/Send-65K-data.any-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/websockets/Send-binary-65K-arraybuffer.any-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/websockets/Send-binary-arraybuffer.any-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/websockets/Send-data.any-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/websockets/Send-paired-surrogates.any-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/request/request-cache-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/interaction/focus/document-level-focus-apis/document-has-system-focus-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-valueasnumber-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-popup-element/popup-light-dismiss.tentative-expected.txt: Added.
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/elements/the-innertext-and-outertext-properties/getter-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-popup-element/popup-light-dismiss.tentative-expected.txt: Added.
10:27 AM Changeset in webkit [279544] by Alan Bujtas
  • 5 edits
    2 adds in trunk

REGRESSION (r278377): incorrect hit-testing with clip-path()
https://bugs.webkit.org/show_bug.cgi?id=227624
<rdar://problem/79845896>

Reviewed by Simon Fraser.

Source/WebCore:

Use the correct coordinate space for clip-path based hittesting.

  1. The hittest location is in the coordinate space of the painting root (hittesting is similar to painting in this context).
  2. RenderBox::hitTestClipPath's accumulatedOffset (as the name implies) should include the offset from the (paint) hittest root.
  3. The clip-path intersecting takes coordinates relative to the containing block.

Test: fast/clip/hit-test-with-clip-path.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hitTestVisualOverflow const):
(WebCore::RenderBox::hitTestClipPath const): Make the hittest root coordinates relative to the containing block.
(WebCore::RenderBox::hitTestBorderRadius const):

  • rendering/RenderBox.h: Let's not use locationInContainer name as it is way too generic and misleading.
  • rendering/RenderLayer.cpp: Compute and pass in proper accumulated offset value.

(WebCore::RenderLayer::hitTestLayer):

LayoutTests:

  • fast/clip/hit-test-with-clip-path-expected.txt: Added.
  • fast/clip/hit-test-with-clip-path.html: Added.
7:17 AM Changeset in webkit [279543] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][TFC] Add support for priority list of width types when expanding columns
https://bugs.webkit.org/show_bug.cgi?id=227627

Reviewed by Antti Koivisto.

Source/WebCore:

When expanding the columns to use the extra space available, we need to prioritize certain columns
with specific width types: fixed > percent > relative > auto
This is _almost_ the reversed version of the shrinking priority list (but not quite).
Now we can have mixed column types across multiple rows with expanding and shrinking columns.

Test: fast/layoutformattingcontext/table-space-mixed-width-type-simple3.html

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::distributeAvailableSpace):

LayoutTests:

  • fast/layoutformattingcontext/table-space-mixed-width-type-simple3-expected.html: Added.
  • fast/layoutformattingcontext/table-space-mixed-width-type-simple3.html: Added.
12:01 AM Changeset in webkit [279542] by Jean-Yves Avenard
  • 16 edits
    6 adds in trunk

SourceBuffer.abort() doesn't go back to state WAITING_FOR_SEGMENT properly
https://bugs.webkit.org/show_bug.cgi?id=227559
<rdar://problem/79996056>

Reviewed by Eric Carlson.

Source/WebCore:

Per spec, calling sourcebuffer.abort method should allow you to add a new segment
immediately after, as abort moves the append state back to WAITING_FOR_SEGMENT.
A segment can be either an init segment or a media segment.
We used to discard all further content until an init segment was encountered.
This could be problematic due to the typical use case of abort:
1- Seek to a location
2- Append a partial media segment long enough to finish seeking and display the

new content at the new position.

If multiple seeks were done in rapid succession, abort() is called right after
before starting the new seek so that we can add the new segment, regardless of what
was appended before.
YouTube applies a workaround for Safari where it will always append an init segment
after calling abort, this is different to what they do with Firefox (and likely Chrome).
To be able to resume after appending a partial media segment we must ensure that the
SourceBufferParser is always left in a sane context, and not be interrupted at some
random points. The abort() call used to interrupt the buffer parsing on the fly and
then reset things which would require a new init segment to restart.
Instead we always fully parse the pending buffer received befofe the call to abort.
The SourceBufferParserAVFObjC could already properly deal with discontinuity unlike
SourceBufferParserWebM.
To ensure that buffers sent after the call to abort() are only ever processed once
the pending ones have been parsed, and in order to avoid having blocking calls
we play with the order in which tasks are scheduled.

Fly-by fixes:

  • The SourceBufferParser handle two types of parser: SourceBufferParser and the

platform specific AVStreamDataParser. Rename the accessor method to more clearly
differentate which parser we are dealing with.

  • The SourceBufferParserWebM and SourceBufferPrivateAVFObjC used different task dispatching

mechanisms. We make them both share the same one now found in the base class.

Tests: media/media-source/media-mp4-h264-partial-abort.html

media/media-source/media-webm-opus-partial-abort.html

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

(WebCore::CDMSessionAVContentKeySession::~CDMSessionAVContentKeySession): rename method.

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

(WebCore::CDMSessionAVStreamSession::~CDMSessionAVStreamSession): rename method.
(WebCore::CDMSessionAVStreamSession::update): rename method.

  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: rename method.

(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): rename method.
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): rename method.

  • platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.h: rename method, remove

now unused member.

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

(WebCore::SourceBufferPrivateAVFObjC::removeCodedFrames): Postpone call to ensure
we are running the remove frame algorithm once all pending frames have been processed.
(WebCore::SourceBufferParserAVFObjC::resetParserState): Remove use of m_discardSamplesUntilNextInitializationSegment.
(WebCore::SourceBufferParserAVFObjC::didParseStreamDataAsAsset): Change to base dispatch method.
(WebCore::SourceBufferParserAVFObjC::didFailToParseStreamDataWithError): Change to base dispatch method.
(WebCore::SourceBufferParserAVFObjC::didProvideMediaDataForTrackID): Change to base dispatch method.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Rename methods. Remove no longer used

members.

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

(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData): No longer use a Cancellable task
as we never cancel it anymore.
(WebCore::SourceBufferPrivateAVFObjC::append): re-schedule the append task immediately to ensure
that processed packets flushed on the parser queue during abort are handled in the right order on
the main thread.
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted): Check that abort wasn't called since append started
to ensure that no updateend event is incorrectly fired twice.
(WebCore::SourceBufferPrivateAVFObjC::abort): Abort is now a no-op that only set the m_abortCalled member.
(WebCore::SourceBufferPrivateAVFObjC::resetParserState): Change the order of operations so that the
SourceBufferParser is only reset after it has finished processing its data.
(WebCore::SourceBufferPrivateAVFObjC::destroyStreamDataParser): Use rename method.
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Use rename method.
(WebCore::SourceBufferPrivateAVFObjC::streamDataParser const): Renamed method from "parser"
(WebCore::SourceBufferPrivateAVFObjC::attemptToDecrypt): Use renamed method.

  • platform/graphics/cocoa/SourceBufferParser.cpp:

(WebCore::callOnMainThreadCallback): Move dispatch method from SourceBufferParserWebM
(WebCore::SourceBufferParser::setCallOnClientThreadCallback):
(WebCore::SourceBufferParser::SourceBufferParser):

  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::resetParserState): Don't clear the data set by parsing
the previous init segment. Set the parsing state to waiting for a new segment if an
init segment has been fully parsed.
(WebCore::SourceBufferParserWebM::OnElementEnd):
(WebCore::SourceBufferParserWebM::OnEbml):
(WebCore::SourceBufferParserWebM::VideoTrackData::reset):
(WebCore::SourceBufferParserWebM::VideoTrackData::consumeFrameData):
(WebCore::SourceBufferParserWebM::AudioTrackData::reset):

  • platform/graphics/cocoa/SourceBufferParserWebM.h:

LayoutTests:

  • media/media-source/content/test-fragmented-video-manifest.json: Added.
  • media/media-source/content/test-fragmented-video.mp4: Added.
  • media/media-source/media-mp4-h264-partial-abort-expected.txt: Added.
  • media/media-source/media-mp4-h264-partial-abort.html: Added.
  • media/media-source/media-webm-opus-partial-abort-expected.txt: Added.
  • media/media-source/media-webm-opus-partial-abort.html: Added.
  • media/media-source/media-webm-opus-partial.html: fix title.
  • media/media-source/media-webm-vorbis-partial.html: fix title.
  • platform/mac/TestExpectations:

Jul 2, 2021:

11:46 PM Changeset in webkit [279541] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.11-branch/Source

Versioning.

WebKit-7612.1.22.11.1

11:45 PM Changeset in webkit [279540] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.3-branch/Source

Versioning.

WebKit-7612.1.22.3.1

11:43 PM Changeset in webkit [279539] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.2-branch/Source

Versioning.

WebKit-7612.1.22.2.1

11:42 PM Changeset in webkit [279538] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.1-branch/Source

Versioning.

WebKit-7612.1.22.1.1

11:40 PM Changeset in webkit [279537] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.0-branch/Source

Versioning.

WebKit-7612.1.22.0.1

9:42 PM Changeset in webkit [279536] by Ruben Turcios
  • 1 copy in branches/safari-612.1.22.11-branch

New branch.

9:41 PM Changeset in webkit [279535] by Ruben Turcios
  • 1 copy in branches/safari-612.1.22.3-branch

New branch.

9:41 PM Changeset in webkit [279534] by Ruben Turcios
  • 1 copy in branches/safari-612.1.22.2-branch

New branch.

9:40 PM Changeset in webkit [279533] by Ruben Turcios
  • 1 copy in branches/safari-612.1.22.1-branch

New branch.

9:40 PM Changeset in webkit [279532] by Ruben Turcios
  • 1 copy in branches/safari-612.1.22.0-branch

New branch.

9:34 PM Changeset in webkit [279531] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.22

Tag Safari-612.1.22.

7:50 PM Changeset in webkit [279530] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove the build warning below since r279498.
warning: redundant move in return statement [-Wredundant-move]

No new tests, no new behavioral changes.

  • css/parser/CSSPropertyParserWorkerSafe.cpp:

(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceUnicodeRange):

6:24 PM Changeset in webkit [279529] by Kocsen Chung
  • 5 edits in branches/safari-611.3.10.1-branch/Source/WebCore

Cherry-pick r278964. rdar://problem/79474157

Protect Element before calling dispatchMouseEvent() on it
https://bugs.webkit.org/show_bug.cgi?id=226767
<rdar://problem/79009112>

Reviewed by Ryosuke Niwa.

  • page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::dispatchMouseEvent):
  • page/PointerLockController.cpp: (WebCore::PointerLockController::dispatchLockedMouseEvent):
  • page/Quirks.cpp: (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):

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

6:19 PM Changeset in webkit [279528] by Kocsen Chung
  • 8 edits in branches/safari-611.3.10.1-branch/Source

Versioning.

WebKit-7611.3.10.1.3

6:11 PM Changeset in webkit [279527] by Kocsen Chung
  • 5 edits in branches/safari-611.3.10.0-branch/Source/WebCore

Cherry-pick r278964. rdar://problem/79474157

Protect Element before calling dispatchMouseEvent() on it
https://bugs.webkit.org/show_bug.cgi?id=226767
<rdar://problem/79009112>

Reviewed by Ryosuke Niwa.

  • page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::dispatchMouseEvent):
  • page/PointerLockController.cpp: (WebCore::PointerLockController::dispatchLockedMouseEvent):
  • page/Quirks.cpp: (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):

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

5:33 PM Changeset in webkit [279526] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Unreviewed attempt to fix Mac Catalyst build.

  • NetworkProcess/ios/NetworkProcessIOS.mm:

(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):

  • NetworkProcess/mac/NetworkProcessMac.mm:

(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):

4:40 PM Changeset in webkit [279525] by aakash_jain@apple.com
  • 1 edit
    1 delete in trunk/Tools

Delete unused BuildSlaveSupport symlink
https://bugs.webkit.org/show_bug.cgi?id=227644

Reviewed by Dewei Zhu.

  • BuildSlaveSupport: Symlink removed.
4:21 PM Changeset in webkit [279524] by Brent Fulgham
  • 3 edits in trunk/Source/WTF

[macOS] Only use WebGL on Metal by default on safe versions of macOS
https://bugs.webkit.org/show_bug.cgi?id=227633
<rdar://problem/78527887>

Reviewed by Dean Jackson.

Tested by WebGL test suite.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformHave.h:
4:05 PM Changeset in webkit [279523] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed Mac Catalyst build fix after r279514.

  • NetworkProcess/ios/NetworkProcessIOS.mm:
3:52 PM Changeset in webkit [279522] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[BigSur Release wk2] fast/history/visited-href-mutation.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=227639

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-02

  • platform/mac-wk2/TestExpectations:
3:43 PM Changeset in webkit [279521] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, mark imported/w3c/web-platform-tests/beacon/beacon-basic.https.window.html as flaky

It has been flaky since its import in r279225.

3:40 PM Changeset in webkit [279520] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Add 10 more unified source cpp files for JSC
https://bugs.webkit.org/show_bug.cgi?id=227643

Reviewed by Alex Christensen.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/generate-unified-sources.sh:
  • UnifiedSources-output.xcfilelist:
3:33 PM Changeset in webkit [279519] by Ruben Turcios
  • 8 edits in branches/safari-612.1.21-branch/Source

Versioning.

WebKit-7612.1.22

3:26 PM Changeset in webkit [279518] by Chris Dumez
  • 8 edits in trunk

[MacOS wk1] crypto/workers/subtle/hrsa-postMessage-worker.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=227540
<rdar://problem/79977662>

Reviewed by Geoffrey Garen.

Source/WebCore:

The test was sending 2 messages to the worker, the first one with the public key
and the second one for the private key. As the worker would receive those messages,
it would do some checks synchronously and post a message back to the main thread
script with the result. As we could see from the test's expected results, the
main thread script would usually (although flakily) receive the result for the
private key *before* the result for the public key, which was wrong.

The reason for this was that serializing / deserializing the crypto key would
spin the worker's run loop and the worker would thus process incoming messages
while serializing / deserializing a crypto key from a previous message.

To address the issue, we now use a BinarySemaphore to wait for the main thread
to finish the wrapping / unwrapping, instead of spinning the run loop.

No new tests, unskipped existing test.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::wrapCryptoKey):
(WebCore::WorkerGlobalScope::unwrapCryptoKey):

LayoutTests:

Rebaseline test now that the output is correct (and non-flaky). Also unmark the test as flaky.

  • crypto/workers/subtle/ec-postMessage-worker-expected.txt:
  • crypto/workers/subtle/hrsa-postMessage-worker-expected.txt:
  • crypto/workers/subtle/hrsa-postMessage-worker.html:
  • platform/mac-wk1/TestExpectations:
2:19 PM Changeset in webkit [279517] by Chris Dumez
  • 2 edits in trunk/LayoutTests

REGRESSION (r279427): [ Mac wk1 ] imported/w3c/web-platform-tests/html/rendering/replaced-elements/embedded-content/tall-cross-domain-iframe-in-scrolled.sub.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=227637
<rdar://problem/80102396>

Unreviewed, Skip this newly imported WPT test on mac wk1 as it is timing out on this
platform.

  • platform/mac-wk1/TestExpectations:
2:09 PM Changeset in webkit [279516] by Chris Dumez
  • 20 edits
    19 copies
    38 moves
    13 adds
    33 deletes in trunk/LayoutTests

Resync WebCryptoAPI web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227601

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync WebCryptoAPI web-platform-tests from upstream 2c19d6ee62676ac90146.

  • web-platform-tests/WebCryptoAPI/*: Updated.

LayoutTests:

1:42 PM Changeset in webkit [279515] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.21.2

Tag Safari-612.1.21.2.

1:35 PM Changeset in webkit [279514] by Chris Dumez
  • 14 edits in trunk/Source/WebKit

Take a process assertion in the network process when holding locked files
https://bugs.webkit.org/show_bug.cgi?id=227552

Reviewed by Sihui Liu.

Take a process assertion in the network process when holding locked files. Previously, we'd
send an IPC to the UIProcess and the UIProcess would take the assertion on behalf of the
network process. However, our previous approach was racy and could cause the network process
to still get suspended while still holding locked files (which would get it killed).

We have evidence that the network process is getting killed a lot for this reason
(rdar://79787123).

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
Call setIsHoldingLockedFiles() when the "isHoldingLockedFiles" state changes instead of sending
an IPC to the UIProcess. setIsHoldingLockedFiles() takes care of taking or releasing a
RunningBoard assertion.

(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
Stop calling setSuspended() on the WebSQLiteDatabaseTracker. The purpose was to avoid sending
the SetIsHoldingLockedFiles IPC to the UIProcess after receiving the PrepareToSuspend IPC.
However, it is now acceptable to take a process assertion after PrepareToSuspend IPC has been
received.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/ios/NetworkProcessIOS.mm:

(WebKit::NetworkProcess::setIsHoldingLockedFiles):
When setIsHoldingLockedFiles(true) gets called, we take a runningboard assertion to prevent
suspension. Note that setIsHoldingLockedFiles(true) gets on the storage thread (which started
the SQLite transaction) so we take the assertion synchronously to make sure we cannot get
suspended during a SQLite transaction.
When setIsHoldingLockedFiles(false) gets called, we release the runningboard assertion.

  • Shared/WebSQLiteDatabaseTracker.cpp:

(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
(WebKit::WebSQLiteDatabaseTracker::~WebSQLiteDatabaseTracker):
(WebKit::WebSQLiteDatabaseTracker::setIsSuspended):
(WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
(WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
(WebKit::WebSQLiteDatabaseTracker::setIsHoldingLockedFiles):

  • Shared/WebSQLiteDatabaseTracker.h:

Update WebSQLiteDatabaseTracker so that it called its isHoldingLockedFilesHandler lambda
directly on the storage thread when the first transaction starts, instead of dispatching
to the main thread. Dispatching to the main thread would be racy as it would mean taking
the process assertion asynchronously (on the main thread), after the SQLite transaction
has begun on the storage thread.
As a result, of this change, I am not using the HysterisActivity class anymore and using
my own thread-safe hysteresis activity using RunLoop::dispatchAfter() with an integer
and a lock.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::networkProcessDidTerminate):
(WebKit::NetworkProcessProxy::sendProcessDidResume):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:

Drop the SetIsHoldingLockedFiles IPC and its handling on UIProcess side since the network
process now takes the assertion by itself.

1:33 PM Changeset in webkit [279513] by Chris Dumez
  • 18 edits
    39 adds
    1 delete in trunk/LayoutTests

Resync encoding web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227602

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Resync encoding web-platform-tests from upstream 2c19d6ee62676ac90146.

  • web-platform-tests/encoding/*: Updated.

LayoutTests:

1:22 PM Changeset in webkit [279512] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Regression(r278786) LocalStorageDatabase's transaction may be remain active when process gets suspended
https://bugs.webkit.org/show_bug.cgi?id=227632

Reviewed by Geoffrey Garen.

After r278786, LocalStorageDatabase has a SQL transaction that gets committed with a 500ms delay on the
storage thread. When the network process would receive the PrepareToSuspend IPC, it would suspend / hang
the storage thread, which would prevent the SQL transaction from getting committed and we would suspend
with a locked file and get killed. We now make sure to flush local storage to disk (i.e. commit that
transaction) before we suspend / hang the storage thread.

  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished):
(WebKit::StorageManagerSet::flushLocalStorage):
(WebKit::StorageManagerSet::suspend):

  • NetworkProcess/WebStorage/StorageManagerSet.h:
1:22 PM Changeset in webkit [279511] by Truitt Savell
  • 2 edits
    8 copies
    3 adds
    2 deletes in trunk/LayoutTests

Unreviewed, reverting r279485.

Broke expectations for 7 mathML test on Big Sur wk1

Reverted changeset:

"Move some Mac MathML test expectation files around"
https://bugs.webkit.org/show_bug.cgi?id=227520
https://commits.webkit.org/r279485

12:19 PM Changeset in webkit [279510] by commit-queue@webkit.org
  • 11 edits
    6 adds in trunk/Source/WebInspectorUI

Web Inspector: add contextual documentation for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=226883

Patch by Harshil Ratnu <hratnu@apple.com> on 2021-07-02
Reviewed by Devin Rousso.

Overview: Add contextual documentation for all supported CSS properties in Styles and Computed panel within Web
Inspector.
Details: Add an info button which appears next to the property field on Hover. Clicking on the info button shows
a popover with the documentation for the property. Tabbing out or clicking anywhere other than the value field
dismisses the popover.
Architecture: Add a ContextualDocumentationButton in SpreadsheetStyleProperty and append that to the end of the
property content. This Button, when clicked, creates an instance of the ContextualDocumentation.js which will
search the ContextualDocumentationDB to find the related property and it's relevant details. Embed these details
in an instance of Popover.js and present next to the associated propertyName.

  • Localizations/en.lproj/localizedStrings.js:
  • Scripts/copy-user-interface-resources.pl:

Add details for the ContextualDocumentationDatabase from External Folder to build properly.

  • UserInterface/Base/Setting.js:

Add setting to show syntax in documentation popover and define default state as false.

  • UserInterface/External/ContextualDocumentationDatabase/ContextualDocumentationDatabase.js: Added.
  • UserInterface/External/ContextualDocumentationDatabase/LICENSE: Added.
  • UserInterface/Images/InfoIcon.svg: Added.
  • UserInterface/Main.html:

Add and link new files.

  • UserInterface/Views/ComputedStyleDetailsPanel.css:

(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property:not(:hover) .go-to-arrow):
Remove absolute positioning from go-to-arrow button to align it with rest of the text in line and style it
similar to contextual-documentation-button.
(.sidebar > .panel.details.css-style > .content > .computed .property .go-to-arrow): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .property:not(:hover) .go-to-arrow): Deleted.
Change hover area to include white space on the side of computed variables.

  • UserInterface/Views/ComputedStyleSection.css:

(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property > .content > .contextual-documentation-button):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property > .content > .contextual-documentation-button):
Add unifrom styling for go-to-arrow button and contextual-documentation-button for computed properties.

  • UserInterface/Views/ContextualDocumentationPopover.css: Added.

(.popover .documentation-popover-content):
(.popover .documentation-popover-content > p):
(.popover .documentation-popover-content > .name-header):
(.popover .documentation-popover-content > .syntax):
(.popover .documentation-popover-content > .syntax > .syntax-title):
(.popover .documentation-popover-content > .reference-link):

  • UserInterface/Views/ContextualDocumentationPopover.js: Added.

(WI.ContextualDocumentationPopover):
(WI.ContextualDocumentationPopover.prototype.show):
(WI.ContextualDocumentationPopover.prototype._presentOverTargetElement):
(WI.ContextualDocumentationPopover.prototype._getDocumentationDetails):
(WI.ContextualDocumentationPopover.prototype._createDocumentationElement):
Add new class that extends Popover.js and handles fetching the values from VS Code documentation, puts relevant
information in the popover and presents the popover when the documentation-button is clicked.

  • UserInterface/Views/Main.css:

(.contextual-documentation-button):
(.contextual-documentation-button:active):
(@media (prefers-color-scheme: dark) .contextual-documentation-button):
Add general styling for contextualDocumentationButton.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createElementsSettingsView):
Add a new setting in Elements Tab to show syntax.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.willDismissPopover):
Add a method - willDismissPopover to handle changes when the documentation popover is about to dismiss.
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton):
Add a method which gets called for all property fields and also gets called when property name is changed and
updated by clicking out of the property name field or tabbing into the next value field and is responsible for
adding the info button add the end of the property.
(WI.SpreadsheetStyleProperty.prototype._handleContextualDocumentationButtonClicked):
(WI.SpreadsheetStyleProperty.prototype._presentContextualDocumentation):
Add a method which creates an instance of the ContextualDocumentationPopover.js class and shows it.

10:57 AM Changeset in webkit [279509] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

WebPageProxy::setAppHighlightsVisibility might send message from a background thread, ASSERTing
<rdar://80056481> and https://bugs.webkit.org/show_bug.cgi?id=227607

Reviewed by Chris Dumez.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::setAppHighlightsVisibility):
(WebKit::WebPageProxy::setUpHighlightsObserver): The callback we get here is often on a background thread.

So bounce it to main.

10:55 AM Changeset in webkit [279508] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Keep track of both the fixed and percent maximum values for each column
https://bugs.webkit.org/show_bug.cgi?id=227491

Reviewed by Antti Koivisto.

This patch is in preparation for supporting mixed column width types when each row
has diffrent type of widths (e.g <tr><td style="width: 100px;"></td></tr><tr><td style="width: 10%;"></td></tr>)

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):

10:41 AM Changeset in webkit [279507] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

[ BigSur Release Arm64 ] imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223472

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-02

  • platform/mac-wk1/TestExpectations: Removing obsolete failure expectation.
  • platform/mac/TestExpectations: Mark test as flaky.
9:05 AM Changeset in webkit [279506] by commit-queue@webkit.org
  • 5 edits in trunk/Source

[GTK] Add new revision variable in pkgconfig file
https://bugs.webkit.org/show_bug.cgi?id=227629

Patch by Philippe Normand <pnormand@igalia.com> on 2021-07-02
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • javascriptcoregtk.pc.in: Include SVN_REVISION as revision variable, useful for apps to

know on which upstream SVN revision their WebKitGTK-based app is built on.

Source/WebKit:

Include SVN_REVISION as revision variable, useful for apps to know on which upstream SVN
revision their WebKitGTK-based app is built on.

  • gtk/webkit2gtk-web-extension.pc.in:
  • gtk/webkit2gtk.pc.in:
8:38 AM Changeset in webkit [279505] by commit-queue@webkit.org
  • 4 edits in trunk

Unreviewed, reverting r279494.
https://bugs.webkit.org/show_bug.cgi?id=227628

Broke api test
TestWebKitAPI.WKWebView.LoadSimulatedRequestUpdatesBackForwardList

Reverted changeset:

"loadSimulatedRequest: should do same delegate callbacks as
loadHTMLString and loadData"
https://bugs.webkit.org/show_bug.cgi?id=227599
https://commits.webkit.org/r279494

8:28 AM Changeset in webkit [279504] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][TFC] TableGrid::Column holds both the computed and the used width values
https://bugs.webkit.org/show_bug.cgi?id=227488

Reviewed by Antti Koivisto.

This patch cleans up TableGrid::Column interface to ensure we don't confused
the computed and the used widths for columns.
This is also in prepartion for adding mixed width type support.

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace):

  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::horizontalSpaceForCellContent const):

  • layout/formattingContexts/table/TableGrid.cpp:

(WebCore::Layout::TableGrid::Column::setLogicalWidth): Deleted.
(WebCore::Layout::TableGrid::Column::logicalWidth const): Deleted.
(WebCore::Layout::TableGrid::Column::setLogicalLeft): Deleted.
(WebCore::Layout::TableGrid::Column::logicalLeft const): Deleted.

  • layout/formattingContexts/table/TableGrid.h:

(WebCore::Layout::TableGrid::Column::usedLogicalRight const):
(WebCore::Layout::TableGrid::Column::computedLogicalWidth const):
(WebCore::Layout::TableGrid::Columns::logicalWidth const):
(WebCore::Layout::TableGrid::Column::setComputedLogicalWidth):
(WebCore::Layout::TableGrid::Column::setUsedLogicalWidth):
(WebCore::Layout::TableGrid::Column::usedLogicalWidth const):
(WebCore::Layout::TableGrid::Column::setUsedLogicalLeft):
(WebCore::Layout::TableGrid::Column::usedLogicalLeft const):
(WebCore::Layout::TableGrid::Column::logicalRight const): Deleted.
(WebCore::Layout::TableGrid::Column::fixedWidth const): Deleted.
(WebCore::Layout::TableGrid::Column::percent const): Deleted.
(WebCore::Layout::TableGrid::Column::setFixedWidth): Deleted.
(WebCore::Layout::TableGrid::Column::setPercent): Deleted.

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace):

7:45 AM Changeset in webkit [279503] by commit-queue@webkit.org
  • 7 edits
    4 deletes in trunk

Unreviewed, reverting r279487.
https://bugs.webkit.org/show_bug.cgi?id=227626

Added broken ios-wk2 test

Reverted changeset:

"WebAudio auto-play policy should come from top document"
https://bugs.webkit.org/show_bug.cgi?id=227593
https://commits.webkit.org/r279487

7:13 AM Changeset in webkit [279502] by Razvan Caliman
  • 8 edits in trunk

Web Inspector: Styles: should autocomplete var() and attr() values
https://bugs.webkit.org/show_bug.cgi?id=227098
<rdar://problem/79418247>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Add support for completion suggestions in the Styles details sidebar panel
for CSS Variables for use with var() and DOM node attributes for use with attr().

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions.prototype.addValues):

  • UserInterface/Models/CSSKeywordCompletions.js:
  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype.get allCSSVariables):
(WI.DOMNodeStyles.prototype._updateStyleCascade):
(WI.DOMNodeStyles.prototype._collectCSSVariables):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.getFunctionValueCompletions):
(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):

LayoutTests:

Add test cases for contextual CSS function value completion.

  • inspector/unit-tests/css-keyword-completions-expected.txt:
  • inspector/unit-tests/css-keyword-completions.html:
1:13 AM Changeset in webkit [279501] by graouts@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION (r279477): WebKit_iosmac failed to build in : ModelElementControllerCocoa.mm:58:24: member reference type 'WebKit::WebPageProxy' is not a pointer; did you mean to use '.'?
https://bugs.webkit.org/show_bug.cgi?id=227612
<rdar://problem/80054936>

Reviewed by Alan Bujtas.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::takeModelElementFullscreen):

12:09 AM Changeset in webkit [279500] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Make LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData hop to main thread before hopping to processing thread
https://bugs.webkit.org/show_bug.cgi?id=227444
<rdar://79413368>

Reviewed by Chris Dumez.

It is safer to hop to main thread in requestNotificationWhenReadyForVideoData callback so that we can check weakThis safely.
When in main thread, hop to processing thread if LocalSampleBufferDisplayLayer is alive.

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

(WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData):

12:01 AM Changeset in webkit [279499] by calvaris@igalia.com
  • 4 edits in trunk

[GTK] media/event-attributes.html fails if mixer is not at 100%
https://bugs.webkit.org/show_bug.cgi?id=83704

Reviewed by Philippe Normand.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues): GStreamer
ports use fakesink to avoid sound output and setting the page
volume to 0 creates trouble with volume events. Let's avoid it in
GStreamer ports.

LayoutTests:

  • platform/glib/TestExpectations: Unflagged that test and other

that get fixed with this patch.

Jul 1, 2021:

11:37 PM Changeset in webkit [279498] by Darin Adler
  • 13 edits in trunk

CSS parser using a token for Unicode ranges, but recent CSS specification says it should not
https://bugs.webkit.org/show_bug.cgi?id=227569

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-syntax/unicode-range-selector-expected.txt:
  • web-platform-tests/css/css-syntax/urange-parsing-expected.txt:

Expect passes instead of fails.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-syntax/unicode-range-selector.html

imported/w3c/web-platform-tests/css/css-syntax/urange-parsing.html

  • css/parser/CSSParserToken.cpp:

(WebCore::CSSParserToken::CSSParserToken): Change the NumberToken constructor to
take a StringView so we can recover the original text if we need to parse it as
part of a Unicode range.
(WebCore::mergeIfAdjacent): Added. Helper used by convertToDimensionWithUnit.
(WebCore::CSSParserToken::convertToDimensionWithUnit): If the number token string
is adjacent to the dimension, then store the string containing both, so it can
be used if we need to parse it as part of a Unicode range. If the string is long,
then don't bother because a long string can't be part of such a range anyway. We
use 4 bits for the length, so can handle lengths in the range [1,15].
(WebCore::CSSParserToken::originalText const): Added. Used to recover the original
text for Unicode range parsing.
(WebCore::CSSParserToken::unitString const): Added. Used to get just the unit part
of the string for DimensionToken, since the full string now can include the number
as well in some cases (see above).
(WebCore::CSSParserToken::copyWithUpdatedString const): Changed the argument type
to StringView instead of using const& and added an assertion since this is only
safe if we are moving the backing characters, not changing the string contents.
(WebCore::CSSParserToken::valueDataCharRawEqual const): Deleted.
(WebCore::CSSParserToken::operator== const): Use StringView == operator instead of
our own valueDataCharRawEqual function. Also use unitString for DimensionToken.
(WebCore::CSSParserToken::serialize const): Use unitString for DimensionToken.

  • css/parser/CSSParserToken.h: Updated for the above. Also deleted

UnicodeRangeToken, unicodeRangeStart, unicodeRangeEnd, and m_unicodeRange.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeResolutionCSSPrimitiveValueWithKnownTokenTypeDimension):
Use unitString for DimensionToken.
(WebCore::CSSPropertyParserHelpers::parseHexColor): Ditto.

  • css/parser/CSSPropertyParserWorkerSafe.cpp:

(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeOptionalDelimiter): Added.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeIdentifier): Added.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeAndAppendOptionalNumber): Added.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeAndAppendOptionalDelimiter): Added.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeAndAppendOptionalQuestionMarks): Added.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeUnicodeRangeString): Added.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeUnicodeRange): Added. Along with the
functions above, this implements the CSS specification's algorithm for consuming a Unicode
range, based on existing tokens without requiring a <urange> token.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceUnicodeRange): Call
the new consumeUnicodeRange function from this file instead of the old one that
depended on a <urange> token. Also refactored to use auto and to do the validity
check for the range as specified.

  • css/parser/CSSSelectorParser.cpp:

(WebCore::consumeANPlusB): Use unitString for DimensionToken.

  • css/parser/CSSTokenizer.cpp:

(WebCore::CSSTokenizer::letterU): Deleted.
(WebCore::CSSTokenizer::consumeNumber): Added code to pass in the original text
when constructing a NumberToken.
(WebCore::CSSTokenizer::consumeUnicodeRange): Deleted.

  • css/parser/CSSTokenizer.h: Deleted consumeUnicodeRange.
  • css/parser/SizesCalcParser.cpp:

(WebCore::SizesCalcParser::calcToReversePolishNotation): Removed case for
UnicodeRangeToken.

  • dom/ConstantPropertyMap.cpp:

(WebCore::variableDataForPositivePixelLength): Pass a null StringView for the
original text when constructing a NumberToken. This is OK for now since this token
won't ever be parsed as part of a Unicode range, and we can change it if we ever
need to support originalText for any other cases.
(WebCore::variableDataForPositiveDuration): Ditto.

11:01 PM Changeset in webkit [279497] by Ben Nham
  • 9 edits in trunk/Source

Unreviewed, reverting r279172.

Broke WebGL context construction on some devices.

Reverted changeset:

"rAF driven WebGL submits excessive amount of GPU work when frames are slow"
https://bugs.webkit.org/show_bug.cgi?id=227059
https://commits.webkit.org/r279172

9:05 PM Changeset in webkit [279496] by Jonathan Bedard
  • 4 edits in trunk/Tools

[run-webkit-tests] Set software_variant from runtime
https://bugs.webkit.org/show_bug.cgi?id=227600
<rdar://problem/80052263>

Reviewed by Stephanie Lewis.

  • Scripts/webkitpy/xcode/device_type.py:

(DeviceType._define_software_variant_from_hardware_family):
(DeviceType.check_consistency):
(DeviceType.contains):

  • Scripts/webkitpy/xcode/device_type_unittest.py:

(DeviceTypeTest.test_from_string):
(DeviceTypeTest.test_contained_in):

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._create_device_with_runtime):

8:14 PM Changeset in webkit [279495] by Chris Dumez
  • 9 edits in trunk/Source

[macOS] Suspend WebProcesses that are in the process cache
https://bugs.webkit.org/show_bug.cgi?id=227269

Reviewed by Geoffrey Garen.

Suspend WebProcesses that are in the process cache on macOS to make sure they use no CPU.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::setIsInProcessCache):
(WebKit::WebProcessProxy::platformSuspendProcess):
(WebKit::WebProcessProxy::platformResumeProcess):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::WebProcessProxy::platformSuspendProcess):
(WebKit::WebProcessProxy::platformResumeProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setIsInProcessCache):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
6:45 PM Changeset in webkit [279494] by commit-queue@webkit.org
  • 4 edits in trunk

loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData
https://bugs.webkit.org/show_bug.cgi?id=227599

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

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadSimulatedRequestAndResponse):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:

(TEST):

6:36 PM Changeset in webkit [279493] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: [Regression: r279271] Sources: Breakpoints section in navigation sidebar disappears when Web Inspector becomes taller than 650px
https://bugs.webkit.org/show_bug.cgi?id=227597

Reviewed by Devin Rousso.

As of r279271, flex base size is no longer clamped by max-height. As a result the non-clamped element
(resources-container) was sized to the full height of the container, leaving no space for the other sections
to be shown. Removing the height: 100%; declaration resolves this by allowing the flex container to lay out
its children as needed. Because the resources container has no maximum height constraint, it still occupies the
remaining height of the container. Each container will also continue to shrink/grow at their prescribed ratio
just as they did before r279271.

  • UserInterface/Views/SourcesNavigationSidebarPanel.css:

(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container, .local-overrides-container)):

6:08 PM Changeset in webkit [279492] by Jean-Yves Avenard
  • 5 edits
    8 adds in trunk

[Cocoa] Last few seconds of 'audio/webm; codecs=vorbis' appended to a SampleBuffer are not played
https://bugs.webkit.org/show_bug.cgi?id=226069
Source/WebCore:

rdar://79951528

Reviewed by Jer Noble.

Source/WebCore:

When parsing samples from a WebM file, the samples emitted by the parser can be very short in
duration, which is ineffecient both in storage costs in our SampleMap, as well as in decoding
CPU costs, as each sample must be fed into the decoder separately. So the parser will group
together these small samples into a larger "meta sample" with a duration no shorter than 2s.

However, at the end of a file, no more sample data will be appended, up to 2s of audio data
will not be emitted from the parser.

At the end of an append, always flush audio track data to ensure that all parsed samples are
emitted, regardless of their collective duration.

Drive-by Fixes:

  • The logic to handle a partial frame was incorrect. libwebm will always progress and call

Callback's OnFrame even with partial content as soon as the frame size has been determined.
bytesRemaining actually contains how many bytes there are available to read and that the
Callback should attempt to fetch.
The Callback should then return Status::kOkPartial if the full frame hasn't been seen yet
or Status::kOkCompleted if it has. kWouldBlock indicates that we do not have information to
read. kOkPartial and kWouldBlock indicates that libwebm should
retry later to complete the current frame. All other codes indicate an error.

  • createSampleBuffer() would use the entire m_packetsData to create a CMSampleBuffer, even if partial

data was read but not yet complete. Only use the fully parsed data to create the CMSampleBuffer.
When the fully parsed packets are removed from packetsData; adjust the offset of the start of the
current partial data (this was the primary cause for bug 227499 that caused the first backout)

  • consumeFrameData() would only increase the size of m_packetsData when m_currentPacketSize was

unset, which would leave the buffer zeroed when partial sample data was present. Always grow
m_packetsData to be large enough to receive the read data.

  • The Read() method would not return the correct number of bytes read (0) when a null destination

buffer was passed in.

  • Bug 227382 - SourceBufferParserWebM::StreamingVectorReader Read() returns an incorrect value

for numActuallyRead when moving to the next segment.

Test: media/media-source/media-vorbis-partial.html

media/media-source/media-opus-partial.html

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::VideoTrackData::consumeFrameData):
(WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer):
(WebCore::SourceBufferParserWebM::AudioTrackData::consumeFrameData):
(WebCore::SourceBufferParserWebM::AudioTrackData::createSampleBuffer):

  • platform/graphics/cocoa/SourceBufferParserWebM.h: Rename some members to better indicate what

they contain. Move some members to the base class as they are always used by Video and Audio.

LayoutTests:

  • platform/mac/TestExpectations:
  • media/media-source/content/test-vorbis-manifest.json: Added.
  • media/media-source/content/test-vorbis.webm: Added.
  • media/media-source/content/test-opus-manifest.json: Added.
  • media/media-source/content/test-opus.webm: Added.
  • media/media-source/media-vorbis-partial-expected.txt: Added.
  • media/media-source/media-vorbis-partial.html: Added.
  • media/media-source/media-opus-partial-expected.txt: Added.
  • media/media-source/media-opus-partial.html: Added.

LayoutTests:

Reviewed by Jer Noble.

  • media/media-source/content/test-vorbis-manifest.json: Added.
  • media/media-source/media-vorbis-partial-expected.txt: Added.
  • media/media-source/content/test-vorbis.webm: Added.
  • media/media-source/content/test-opus-manifest.json: Added.
  • media/media-source/media-opus-partial-expected.txt: Added.
  • media/media-source/media-opus-partial.html: Added.
  • media/media-source/content/test-opus.webm: Added.
  • media/media-source/media-vorbis-partial.html: Added.
6:07 PM Changeset in webkit [279491] by wilander@apple.com
  • 5 edits
    3 moves in trunk/Source/WebCore

PCM: Change import from CryptoKitCBridging to CryptoKitPrivate
https://bugs.webkit.org/show_bug.cgi?id=227556
<rdar://79992592>

Reviewed by Alex Christensen.

Source/WebCore:

No new tests since no functionality is changed.

  • loader/cocoa/PrivateClickMeasurementCocoa.mm:

Changed import from CryptoKitCBridgingSoftLink.h to CryptoKitPrivateSoftLink.h.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/CryptoKitPrivateSoftLink.h: Renamed from Source/WebCore/PAL/pal/cocoa/CryptoKitCBridgingSoftLink.h.
  • pal/cocoa/CryptoKitPrivateSoftLink.mm: Renamed from Source/WebCore/PAL/pal/cocoa/CryptoKitCBridgingSoftLink.mm.
  • pal/spi/cocoa/CryptoKitPrivateSPI.h: Renamed from Source/WebCore/PAL/pal/spi/cocoa/CryptoKitCBridgingSPI.h.
6:03 PM Changeset in webkit [279490] by commit-queue@webkit.org
  • 4 edits in trunk

Align beacon CORS mode with Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=227590

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

LayoutTests/imported/w3c:

  • web-platform-tests/beacon/beacon-cors.https.window-expected.txt:

Source/WebCore:

This follows https://w3c.github.io/beacon/#sec-processing-model step 6.3.
Now we pass a WPT test that Chrome and Firefox already passed.

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):

5:22 PM Changeset in webkit [279489] by Amir Mark Jr.
  • 5 edits in trunk/Source/WebCore

Unreviewed, reverting r279481.

Broke a pre-existing test

Reverted changeset:

"Move BottomControlsBarHeight and InsideMargin to be computed
at runtime"
https://bugs.webkit.org/show_bug.cgi?id=227505
https://commits.webkit.org/r279481

5:20 PM Changeset in webkit [279488] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkitscmpy] Cache identifiers in Git checkouts (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=225616
<rdar://problem/77789230>

Reviewed by Dewei Zhu.

Python 2's Subprocess is 10x slower than Python 3, which means generating
the cache is impractical in Python 2.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.init): Disable cache on Python 2 by default.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(test_cache): Force Git to use cache.
(test_revision_cache): Ditto.

5:08 PM Changeset in webkit [279487] by eric.carlson@apple.com
  • 7 edits
    4 adds in trunk

WebAudio auto-play policy should come from top document
https://bugs.webkit.org/show_bug.cgi?id=227593
rdar://76920375

Reviewed by Chris Dumez.

Source/WebCore:

Tests: media/auto-play-video-in-about-blank-iframe.html

media/auto-play-web-audio-in-about-blank-iframe.html

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::constructCommon): Get auto-play policy from document()->topDocument().

  • testing/Internals.cpp:

(WebCore::Internals::setDocumentAutoplayPolicy): New method to test auto-play policy.

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

LayoutTests:

  • media/auto-play-video-in-about-blank-iframe-expected.txt: Added.
  • media/auto-play-video-in-about-blank-iframe.html: Added.
  • media/auto-play-web-audio-in-about-blank-iframe-expected.txt: Added.
  • media/auto-play-web-audio-in-about-blank-iframe.html: Added.
  • media/video-test.js:

(waitForEventWithTimeout): Return event.

4:57 PM Changeset in webkit [279486] by Ryan Haddad
  • 3 edits in trunk/Tools

[clean-webkit] Exclude autoinstalled directory
https://bugs.webkit.org/show_bug.cgi?id=227588
<rdar://problem/80033943>

Patch by Jonathan Bedard <Jonathan Bedard> on 2021-07-01
Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/checkout/scm/scm.py:

(SCM.discard_untracked_files): Never discard the autoinstalled directory.

2:53 PM Changeset in webkit [279485] by Cameron McCormack
  • 2 edits
    2 copies
    7 moves
    8 adds
    1 delete in trunk/LayoutTests

Move some Mac MathML test expectation files around
https://bugs.webkit.org/show_bug.cgi?id=227520
<rdar://79749198>

Reviewed by Frédéric Wang.

This should make it so that the same test expectation files are used
for Monterey as for Big Sur, without needing to add Monterey-specific
files.

  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-001-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-001-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt: Copied from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-002-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-002-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-005-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-005-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt.
  • platform/mac-mojave-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt.
  • platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt: Renamed from LayoutTests/platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt.
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt:
2:32 PM Changeset in webkit [279484] by Russell Epstein
  • 8 edits in branches/safari-612.1.21-branch/Source

Versioning.

WebKit-7612.1.21.2

1:56 PM Changeset in webkit [279483] by youenn@apple.com
  • 20 edits
    1 add in trunk/Source

Disable relay for UDP sockets when not needed
https://bugs.webkit.org/show_bug.cgi?id=227253
Source/WebCore:

Reviewed by Eric Carlson.

  • Modules/mediastream/PeerConnectionBackend.h:

(WebCore::PeerConnectionBackend::shouldFilterICECandidates const):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::setConfiguration):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:

(WebCore::LibWebRTCMediaEndpoint::rtcSocketFactory):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::disableICECandidateFiltering):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:

Source/WebKit:

Reviewed by Eric Carlson.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createUDPSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

(WebKit::NetworkRTCUDPSocketCocoaConnections::create):
(WebKit::NetworkRTCUDPSocketCocoa::createUDPSocket):
(WebKit::NetworkRTCUDPSocketCocoa::NetworkRTCUDPSocketCocoa):
(WebKit::NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections):
(WebKit::NetworkRTCUDPSocketCocoaConnections::createNWConnection):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::RTCSocketFactory::RTCSocketFactory):
(WebKit::RTCSocketFactory::CreateUdpSocket):
(WebKit::LibWebRTCProvider::createSocketFactory):

  • WebProcess/Network/webrtc/LibWebRTCProvider.h:
  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::createUdpSocket):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:

Source/WTF:

<rdar://problem/79912154>

Reviewed by Eric Carlson.

  • wtf/PlatformHave.h:

Add a macro for new NW methods.

1:46 PM Changeset in webkit [279482] by Jonathan Bedard
  • 2 edits in trunk/Tools

[clean-webkit] Exclude autoinstalled directory
https://bugs.webkit.org/show_bug.cgi?id=227588
<rdar://problem/80033943>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/checkout/scm/scm.py:

(SCM.discard_untracked_files): Never discard the autoinstalled directory.

1:28 PM Changeset in webkit [279481] by dino@apple.com
  • 5 edits in trunk/Source/WebCore

Move BottomControlsBarHeight and InsideMargin to be computed at runtime
https://bugs.webkit.org/show_bug.cgi?id=227505
<rdar://problem/79932256>

Reviewed by Devin Rousso.

Rather than having two JS constants that have to be kept in sync
with CSS, simply retrieve the value from the computed style.

No change in behaviour.

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype.layout):

  • Modules/modern-media-controls/controls/media-controls.css:

(:host(audio), :host(video.media-document.audio), *):

  • Modules/modern-media-controls/controls/layout-node.js: Add two helpers to

retrive computed style values.

1:22 PM Changeset in webkit [279480] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

HIDGamepadProvider adds an extra 50ms to all inputs
<rdar://70315838> and https://bugs.webkit.org/show_bug.cgi?id=217742

Reviewed by Alex Christensen.

No new tests.
Tried to write an API test to drive inputs in the delay range, but that was way too fragile
on a local developer machine, much less a bot that's under load.

These input delays were an early best-effort to get input to line up with RaF, which the spec
mentions as a goal.

Not sure how 50 slipped in for HID, vs the 16 on GCF.

Whether or not lining up perfectly with RaF is actually a useful goal, in the meantime driving
input as quickly as possible seems much more desirable.

We still want to coalesce multiple close together inputs into 1 logical event to smooth out jitter
with certain devices, and reduce IPC and DOM object churn during rapid input (or with buggy devices).

In testing with what I have on my desk, using a true 0-delay timer for that was not desirable.

But 1ms seems peachy keen.

  • platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
  • platform/gamepad/mac/HIDGamepadProvider.mm:
1:22 PM Changeset in webkit [279479] by Wenson Hsieh
  • 12 edits
    1 add in trunk

Selecting or dragging images that contain recognizable text is difficult in Mail compose
https://bugs.webkit.org/show_bug.cgi?id=227544

Reviewed by Devin Rousso.

Source/WebKit:

Long pressing images in editable content on iOS initiates dragging, and a tap-and-half gesture over the image
selects the entire image. Both of these are common interactions for image attachments in Mail compose that
take precedence over new Live Text interactions, so there's no advantage to triggering image analysis on images
in editable content.

Avoid doing this extra work by adjusting -imageAnalysisGestureDidBegin: to bail early if the image is inside
editable content.

Tests: ImageAnalysisTests.DoNotAnalyzeImagesInEditableContent

ImageAnalysisTests.HandleImageAnalyzerError

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add an isContentEditable flag.

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _imageAnalysisGestureRecognizer]):

Add a testing hook to return the gesture recognizer used to trigger image analysis.

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

(-[WKContentView imageAnalysisGestureRecognizer]):
(-[WKContentView imageAnalysisGestureDidBegin:]):

Pull logic for avoiding image analysis out into a separate lambda, and add a check for isContentEditable.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::positionInformation):

Populate the isContentEditable flag based on whether or not the node found by the position information request
is editable.

Tools:

See WebKit/ChangeLog for more details.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:

Link against VisionKitCore on iOS 15+ and macOS 12+.

  • TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig:

Update WebKitTargetConditionals to be consistent with the other target conditions in WebKit, so that we can use
IOS_SINCE_15 in TestWebKitAPI.xcconfig.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm: Added.

Add new API tests that trigger the image analysis gesture recognizer and check whether or not we requested image
analysis from VisionKit.

(TestWebKitAPI::swizzledLocationInView):
(TestWebKitAPI::swizzledProcessRequest):

12:59 PM Changeset in webkit [279478] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

Add a layoutTrait for an additional controls scale factor
https://bugs.webkit.org/show_bug.cgi?id=227561
<rdar://problem/79997951>

Reviewed by Anders Carlsson.

Allow controls with different layout traits to apply
a scale factor to their buttons.

No change in behaviour.

  • Modules/modern-media-controls/controls/button.js:

(Button.prototype._updateImageMetrics):
(Button):

  • Modules/modern-media-controls/controls/layout-traits.js:

(LayoutTraits.prototype.additionalControlScaleFactor):
(LayoutTraits):

12:37 PM Changeset in webkit [279477] by graouts@webkit.org
  • 31 edits in trunk/Source

[Model] Restrict IPC calls to ARKit SPI availability and runtime flag
https://bugs.webkit.org/show_bug.cgi?id=227581

Reviewed by Tim Horton.

Source/WebCore:

Guard all IPC calls related to <model> by the most appropriate platform-specific flag
and also ensure that those calls don't do anything unless the runtime flag is also
enabled.

  • Modules/model-element/HTMLModelElement.cpp:
  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElementCocoa.mm:

(WebCore::HTMLModelElement::inlinePreviewDidObtainContextId):

  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::modelElementDidCreatePreview const):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Source/WebKit:

Guard all IPC calls related to <model> by the most appropriate platform-specific flag
and also ensure that those calls don't do anything unless the runtime flag is also
enabled.

  • Shared/WebProcessDataStoreParameters.h:

(WebKit::WebProcessDataStoreParameters::encode const):
(WebKit::WebProcessDataStoreParameters::decode):

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::takeModelElementFullscreen):
(WebKit::ModelElementController::modelElementDidCreatePreview):

  • UIProcess/ModelElementController.cpp:
  • UIProcess/ModelElementController.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didAttachToRunningProcess):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::takeModelElementFullscreen):
(WebKit::WebPageProxy::modelElementDidCreatePreview):
(WebKit::WebPageProxy::modelElementPreviewDidObtainContextId):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::webProcessDataStoreParameters):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
(WebKit::WebsiteDataStoreConfiguration::copy const):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::modelElementDidCreatePreview const):

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

(WebKit::WebPage::modelElementPreviewDidObtainContextId):

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

(WebKit::WebProcess::setWebsiteDataStoreParameters):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformSetWebsiteDataStoreParameters):

Source/WTF:

Define a new compile-time flag when either of the iOS or macOS ARKit SPIs are available.

  • wtf/PlatformHave.h:
11:52 AM Changeset in webkit [279476] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Fix sandbox violations related to IOKit filtering
https://bugs.webkit.org/show_bug.cgi?id=227572
<rdar://78354215>

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
11:34 AM Changeset in webkit [279475] by Aditya Keerthi
  • 4 edits in trunk/Source

[iOS] <select> menus should scroll to the selected option
https://bugs.webkit.org/show_bug.cgi?id=227562
<rdar://problem/77887668>

Reviewed by Wenson Hsieh.

Source/WebKit:

Before iOS 15, <select> pickers were implemented using UIPickerView on
iPhone and UITableView on iPad. Both these views gave WebKit the ability
to scroll the view to the currently selected option.

In iOS 15, <select> options are displayed in a context menu. WebKit does
not have access to the menu's view hierarchy, and must rely on UIKit to
perform the scrolling behavior.

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPicker createMenu]):

Adopt UIMenuOptionsSingleSelection to obtain UIKit behaviors for popup menus.

Source/WTF:

  • wtf/PlatformHave.h:

Add HAVE(UIMENUOPTIONS_SINGLE_SELECTION).

11:24 AM Changeset in webkit [279474] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.21.1

Tag Safari-612.1.21.1.

11:24 AM Changeset in webkit [279473] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Remove unnecessary canBeInternal invocations to mitigate the cost of potential unmatched patterns in B3LowerToAir
https://bugs.webkit.org/show_bug.cgi?id=227508

Patch by Yijia Huang <Yijia Huang> on 2021-07-01
Reviewed by Filip Pizlo.

The bit pattern doesn't cause worse code generation in the all-internals-are-captured
case. So, they don't need canBeInternal checks which might terminate potential matched
scenarios.

The equivalent pattern of SBFIZ is ((src << amount) >> amount) << lsb. Given the code:

a = x << C
b = a >> C
c = b << D

print(a)
print(b)
print(c)

The pattern won't match because of !canBeInternal for a and b (useCounts > 1).
So, this would emit three separate instructions. But if we removed canBeInternal,
it would still be just three separate instructions, and they wouldn't be any more
expensive. Suppose the print(b) is removed, above. Then, with the canBeInternal check,
it is emitting three instructions. Without the canBeInternal check, it would emit only
two (x << C and SBFIZ to compute c). And that would be less expensive.

  • b3/B3LowerToAir.cpp:
10:41 AM Changeset in webkit [279472] by youenn@apple.com
  • 13 edits in trunk

ReadableStream.getReader do not throw a proper exception when parameter is of wrong type
https://bugs.webkit.org/show_bug.cgi?id=226220
<rdar://problem/78711382>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/streams/readable-streams/default-reader.any-expected.txt:
  • web-platform-tests/streams/readable-streams/default-reader.any.worker-expected.txt:
  • web-platform-tests/streams/readable-streams/general.any-expected.txt:
  • web-platform-tests/streams/readable-streams/general.any.worker-expected.txt:
  • web-platform-tests/streams/readable-streams/templated.any-expected.txt:
  • web-platform-tests/streams/readable-streams/templated.any.worker-expected.txt:

Source/WebCore:

Covered by rebased tests.

  • Modules/streams/ReadableStream.js:

(getReader):
Tighten option parameter check.
In case mode is bad, fire a type error instead of range error.

LayoutTests:

  • streams/readable-stream-getReader-expected.txt:
  • streams/readable-stream-getReader.html:

Update test to match latest spec.

10:37 AM Changeset in webkit [279471] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Disable ABSL_HAVE_THREAD_LOCAL in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=227577
<rdar://79915864>

Reviewed by Eric Carlson.

We do no want to resort on thread local yet so disable ABSL_HAVE_THREAD_LOCAL until we can use it properly.

  • Source/third_party/abseil-cpp/absl/base/config.h:
10:25 AM Changeset in webkit [279470] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Add a new pattern to instruction selector to use EXTR supported by ARM64
https://bugs.webkit.org/show_bug.cgi?id=227171

Patch by Yijia Huang <Yijia Huang> on 2021-07-01
Reviewed by Robin Morisset.

This patch includes two modifications:

  1. Introduce a strength reduction rule to zero extend bitfield.
  2. Add Extract Register (EXTR) to Air opcode to serve instruction selector.

### Part A zero extend bitfield ###


A new strength reduction rule is added for the canonical form of the zero-extend
bitfield.

Turn this: ZShr(Shl(value, amount)), amount)
Into this: BitAnd(value, mask)

with constraints:

  1. 0 <= amount < datasize
  2. width = datasize - amount
  3. mask is !(mask & (mask + 1)) where bitCount(mask) == width

### Part B EXTR ###


Given instruction:
extr Rd, Rn, Rm, lowWidth

Extract register (EXTR) extracts a register from a pair of registers, where
concat = Rn:Rm and Rd = concat<lowWidth + datasize - 1:lowWidth>.

The equivalent pattern of this instruction is:

d = ((n & mask) << highWidth) | (m >> lowWidth)
highWidth = datasize - lowWidth
mask = (1 << lowWidth) - 1

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = ArgumentReg(%x1)
Int @2 = mask
Int @3 = BitAnd(@0, @2)
Int @4 = highWidth
Int @5 = Shl(@3, @4)
Int @6 = lowWidth
Int @7 = ZShr(@1, @6)
Int @8 = BitOr(@7, @5)
Void@9 = Return(@10, Terminal)

Before Adding BIC:
Old optimized AIR
InsertUnsignedBitfieldInZero %x0, highWidth, lowWidth, %x0, @5
Urshift %x1, lowWidth, %x1, @7
Or %x0, %x1, %x0, @8
Ret %x0, @9

After Adding BIC:
New optimized AIR
ExtractRegister %x0, %x1, lowWidth, %x0, @8
Ret %x0, @9

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::extractRegister32):
(JSC::MacroAssemblerARM64::extractRegister64):

  • assembler/testmasm.cpp:

(JSC::testExtractRegister32):
(JSC::testExtractRegister64):

  • b3/B3LowerToAir.cpp:
  • b3/B3ReduceStrength.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_2.cpp:

(testBitfieldZeroExtend32):
(testBitfieldZeroExtend64):
(testExtractRegister32):
(testExtractRegister64):
(addBitTests):

10:14 AM Changeset in webkit [279469] by Ruben Turcios
  • 8 edits in branches/safari-612.1.21-branch/Source

Versioning.

WebKit-7612.1.21.1

10:09 AM Changeset in webkit [279468] by Ruben Turcios
  • 3 edits in branches/safari-612.1.21-branch/Source/ThirdParty/ANGLE

Cherry-pick r279373. rdar://problem/80030448

ANGLE Metal primitive restart range computation could index with size_t
https://bugs.webkit.org/show_bug.cgi?id=227449

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-29
Reviewed by Kenneth Russell.

Make the calculateRestartRanges() a bit simpler in order
for it to be easier to understand.

  • src/libANGLE/renderer/metal/BufferMtl.h: (rx::IndexRange::IndexRange): Add documentation what the mtl::IndexRange is. Add constructor so that std::vector::emplace_back() works.
  • src/libANGLE/renderer/metal/BufferMtl.mm: (rx::calculateRestartRanges): Index with size_t to make it simpler to understand if the index overflows or not. Use reinterpret_cast in order to not accidentally cast away const from mtl::BufferRef::mapReadOnly(). Skip the non-marker elements with continue to avoid deep nesting. Give a name to the restart range marker value. Remove intermediate variable value = bufferData[i] as it is never used more than once. This simplifies the code as the do-while loop does not need to check the if condition as the loop ending condition already checks. Make the array a returned result instead of out variable.

(rx::BufferMtl::getRestartIndices):

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

10:08 AM Changeset in webkit [279467] by Amir Mark Jr.
  • 5 edits
    3 moves in trunk/Source/WebCore

Unreviewed, reverting r279452.

Broke MacOS build

Reverted changeset:

"PCM: Change import from CryptoKitCBridging to
CryptoKitPrivate"
https://bugs.webkit.org/show_bug.cgi?id=227556
https://commits.webkit.org/r279452

10:03 AM Changeset in webkit [279466] by Kyle Piddington
  • 2 edits in trunk/Source/ThirdParty/ANGLE

BabylonJS Under water demo is slower than it should be on Intel
https://bugs.webkit.org/show_bug.cgi?id=227226

Remove fastMath restriction on Intel
Removing fastmath in all scenarios leads to unacceptable performance on integrated graphics
Currently, webgl conformance tests and the Safari tests don't have any invariance tests that show invariance issues. deQP tests are similarly passing.
In Metal-ANGLE, gl_position and gl_fragcoord are valid attributes to be marked as invariant. All others will be ignored.

Reviewed by Kenneth Russell.

  • src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp:

(GenMetalTraverser::emitPostQualifier):

  • src/libANGLE/renderer/metal/mtl_utils.mm:

(rx::mtl::CreateShaderLibrary):

9:34 AM Changeset in webkit [279465] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[Mac] Adopt async GroupActivity.sessions() iterable instead of GroupSessionObserver
https://bugs.webkit.org/show_bug.cgi?id=227548
<rdar://78240035>

Reviewed by Sam Weinig.

Rather than adopting GroupSessionObserver, which requires Combine, GroupActivity.sessions()
uses AsyncSequence, a new Swift 5.5 feature, to allow clients to be notified that new
sessions are avaliable.

  • UIProcess/Cocoa/GroupActivities/WKGroupSession.swift:

(WKGroupSessionObserver.incomingSessionsTask):
(WKGroupSessionObserver.receivedSession(_:)):
(WKGroupSessionObserver.cancellables): Deleted.
(WKGroupSessionObserver.recievedSession(_:)): Deleted.

8:58 AM Changeset in webkit [279464] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

[Cocoa] Migrate WebRTC UDP socket handling to NW API
https://bugs.webkit.org/show_bug.cgi?id=227210
<rdar://problem/79859045>

Unreviewed, post commit fix.

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h:

(WTF::HashTraits<rtc::SocketAddress>::constructDeletedValue):
(WTF::HashTraits<rtc::SocketAddress>::isDeletedValue):
No need to set all deleted value slots, instead just rely on scope id being equal to numeric_limits<int>::min.
Also ensure we do not add an empty/deleted address to the map.

6:29 AM Changeset in webkit [279463] by Alan Bujtas
  • 6 edits
    2 adds in trunk

VisiblePosition::absoluteSelectionBoundsForLine fails on multiline vertical-rl content
https://bugs.webkit.org/show_bug.cgi?id=227543
<rdar://79887141>

Reviewed by Simon Fraser.

Source/WebCore:

absoluteSelectionBoundsForLine flips the line's logical rect for the writing mode (horizontal vs. vertical)
but not for the block flow direction (ltr vs. rtl).
This adjustment is very similar to what we do in absoluteCaretBounds (see absoluteBoundsForLocalCaretRect).

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • testing/Internals.cpp:

(WebCore::Internals::absoluteLineRectFromPoint):

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

LayoutTests:

  • fast/inline/line-rect-from-point-expected.txt: Added.
  • fast/inline/line-rect-from-point.html: Added.
4:20 AM Changeset in webkit [279462] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

REGRESSION(r278062): [Nicosia] Threaded rendering is broken since r278062
https://bugs.webkit.org/show_bug.cgi?id=227578

Reviewed by Žan Doberšek.

Since r278062 NicosiaCairoOperationRecorder is a GraphicsContext class, so we need to bring back things
previously done by the base class and chain up to base class save/restore and being/end transparency.

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::fillPath):
(Nicosia::CairoOperationRecorder::strokePath):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawFocusRing):
(Nicosia::CairoOperationRecorder::save):
(Nicosia::CairoOperationRecorder::restore):
(Nicosia::CairoOperationRecorder::beginTransparencyLayer):
(Nicosia::CairoOperationRecorder::endTransparencyLayer):

3:37 AM Changeset in webkit [279461] by youenn@apple.com
  • 20 edits
    1 copy
    2 moves
    1 add in trunk

[Cocoa] Migrate WebRTC UDP socket handling to NW API
https://bugs.webkit.org/show_bug.cgi?id=227210
LayoutTests/imported/w3c:

Reviewed by Eric Carlson.

Rebasing tests as timing changes a bit.
This aligns with Chrome and Firefox behavior.

  • web-platform-tests/webrtc/no-media-call-expected.txt:
  • web-platform-tests/webrtc/promises-call-expected.txt:

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Reviewed by Eric Carlson.

Add infrastructure to new experimental feature flag for NW backed UDP sockets.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webRTCPlatformTCPSocketsEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCPlatformTCPSocketsEnabled):
(WebCore::RuntimeEnabledFeatures::webRTCPlatformUDPSocketsEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCPlatformUDPSocketsEnabled):

Source/WebKit:

Reviewed by Eric Carlson.

Migrate UDP socket handling from WebRTC physical socket server to nw API for Cocoa ports.

For each UDP socket opened, we open a nw_listener that will listen to inbound connections.
On inbound connection, we receive a nw_connection that we store in a address -> connection map.

Whenever sending a packet, we look at the remote address.
If needed, we create a nw_connection to that particular remote address and store it in the address -> connection map.
We then use the pre-existing or newly created nw_connection to send the packet.

Make sure to cancel NW connection in case of failure before releasing the socket.

Covered by existing tests

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createUDPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:

(WebKit::NetworkRTCProvider::setPlatformTCPSocketsEnabled):
(WebKit::NetworkRTCProvider::setPlatformUDPSocketsEnabled):

  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocketCocoa.h.
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm: Renamed from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocketCocoa.mm.

(WebKit::tcpSocketQueue):
(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):
(WebKit::NetworkRTCTCPSocketCocoa::close):
(WebKit::NetworkRTCTCPSocketCocoa::setOption):
(WebKit::NetworkRTCTCPSocketCocoa::createMessageBuffer):
(WebKit::NetworkRTCTCPSocketCocoa::sendTo):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h: Added.

(WTF::DefaultHash<rtc::SocketAddress>::hash):
(WTF::DefaultHash<rtc::SocketAddress>::equal):
(WTF::HashTraits<rtc::SocketAddress>::emptyValue):
(WTF::HashTraits<rtc::SocketAddress>::constructDeletedValue):
(WTF::HashTraits<rtc::SocketAddress>::isDeletedValue):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm: Added.

(WebKit::NetworkRTCUDPSocketCocoaConnections::create):
(WebKit::NetworkRTCUDPSocketCocoaConnections::WTF_GUARDED_BY_LOCK):
(WebKit::udpSocketQueue):
(WebKit::NetworkRTCUDPSocketCocoa::createUDPSocket):
(WebKit::NetworkRTCUDPSocketCocoa::NetworkRTCUDPSocketCocoa):
(WebKit::NetworkRTCUDPSocketCocoa::~NetworkRTCUDPSocketCocoa):
(WebKit::NetworkRTCUDPSocketCocoa::close):
(WebKit::NetworkRTCUDPSocketCocoa::setOption):
(WebKit::NetworkRTCUDPSocketCocoa::sendTo):
(WebKit::NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections):
(WebKit::NetworkRTCUDPSocketCocoaConnections::close):
(WebKit::NetworkRTCUDPSocketCocoaConnections::setOption):
(WebKit::processUDPData):
(WebKit::NetworkRTCUDPSocketCocoaConnections::createNWConnection):
(WebKit::NetworkRTCUDPSocketCocoaConnections::setupNWConnection):
(WebKit::NetworkRTCUDPSocketCocoaConnections::sendTo):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::setConnection):

Source/WTF:

Reviewed by Eric Carlson.

Add a new experimental flag for NW backed UDP sockets.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

<rdar://problem/79859045>

Reviewed by Eric Carlson.

  • platform/ios-simulator-wk2/TestExpectations:

Mark test as failed, as this test is using unsupported API (transport).

3:35 AM Changeset in webkit [279460] by Carlos Garcia Campos
  • 15 edits in trunk/Source

[Cairo] Simplify GraphicsContextCairo creation
https://bugs.webkit.org/show_bug.cgi?id=227575

Reviewed by Žan Doberšek.

Source/WebCore:

Remove the constructors taking a PlatformContextCairo and add two that receive a RefPtr<cairo_t>&& and
cairo_surface_t*. In both cases the PlatformContextCairo is created, so it's now always owned and callers don't
need to create it.

No change in behavior, covered by existing tests.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::GraphicsContextCairo):
(WebCore::GraphicsContextCairo::drawLine):

  • platform/graphics/cairo/GraphicsContextCairo.h:
  • platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp:

(WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend):
(WebCore::ImageBufferCairoSurfaceBackend::context const):

  • platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h:
  • platform/graphics/cairo/NativeImageCairo.cpp:
  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::PlatformContextCairo::PlatformContextCairo):

  • platform/graphics/cairo/PlatformContextCairo.h:

(WebCore::PlatformContextCairo::cr const):
(WebCore::PlatformContextCairo::cr): Deleted.
(WebCore::PlatformContextCairo::setCr): Deleted.

  • platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp:

(Nicosia::PaintingContextCairo::ForPainting::ForPainting):
(Nicosia::PaintingContextCairo::ForPainting::~ForPainting):
(Nicosia::PaintingContextCairo::ForPainting::replay):

  • platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.h:
  • platform/graphics/win/GraphicsContextCairoWin.cpp:

(WebCore::GraphicsContextCairo::GraphicsContextCairo):

  • platform/graphics/win/ImageCairoWin.cpp:

(WebCore::BitmapImage::getHBITMAPOfSize):

Source/WebKit:

Use the new GraphicsContextCairo constructors.

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::createGraphicsContext):

  • UIProcess/cairo/BackingStoreCairo.cpp:

(WebKit::BackingStore::incorporateUpdate):

3:19 AM Changeset in webkit [279459] by youenn@apple.com
  • 6 edits in trunk

RealtimeIncomingAudioSourceCocoa should support other sample rate than 48000
https://bugs.webkit.org/show_bug.cgi?id=227439

Reviewed by Eric Carlson.

Source/WebCore:

We reduced memory allocations by early allocating buffers for the most often used sample rate (48000), but this broke other sample rates, like for G722.
Make sure to update sample rate and buffers if it is not 48000.
Since the initial OnData call is often with a sample rate of 16000 and switches to 48000 after a few calls, early return for a few initial calls (20) or if sample rate is not 16000.
Covered by updated test.

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:

(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h:

LayoutTests:

Improve test to validate received audio is not silence.

  • webrtc/audio-peer-connection-g722-expected.txt:
  • webrtc/audio-peer-connection-g722.html:
2:10 AM Changeset in webkit [279458] by ntim@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, unskip web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html
https://bugs.webkit.org/show_bug.cgi?id=227574

This was unskipped in https://trac.webkit.org/changeset/279401/webkit, before it was (accidentally?) re-skipped
again in https://trac.webkit.org/changeset/279427/webkit.

2:03 AM Changeset in webkit [279457] by emilio
  • 10 edits in trunk

Support unprefixed :autofill pseudo-class.
https://bugs.webkit.org/show_bug.cgi?id=220459

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/selectors/pseudo-classes/autofill-expected.txt: Test passes now

Source/WebCore:

Tests: web-platform-tests/html/semantics/selectors/pseudo-classes/autofill.html

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText const):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:

LayoutTests:

  • fast/css/css-selector-text-expected.txt:
  • fast/css/css-selector-text.html:
  • fast/css/css-set-selector-text-expected.txt:
  • fast/css/css-set-selector-text.html:
1:45 AM Changeset in webkit [279456] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WPE] Pack Cog modules in built-product archive
https://bugs.webkit.org/show_bug.cgi?id=227527

Patch by Philippe Normand <pnormand@igalia.com> on 2021-07-01
Reviewed by Žan Doberšek.

  • CISupport/built-product-archive: Cog now ships its platform plugins in a dedicated modules

directory, which we need to include in the zip archive.

1:22 AM Changeset in webkit [279455] by ntim@apple.com
  • 4 edits in trunk/Source/WebCore

Change typedef EventSender<X> Y to using Y = EventSender<X>
https://bugs.webkit.org/show_bug.cgi?id=227570

Reviewed by Antti Koivisto.

This is for consistency with HTMLDialogElement.h, HTMLStyleElement.h and SVGSMILElement.h.

  • html/HTMLDetailsElement.h:
  • html/HTMLLinkElement.h:
  • loader/ImageLoader.h:
12:37 AM Changeset in webkit [279454] by ntim@apple.com
  • 2 edits
    2 copies
    1 delete in trunk/LayoutTests

Merge LayoutTests/imported/blink/fast/dom/HTMLDialogElement and LayoutTests/imported/blink/dialog
https://bugs.webkit.org/show_bug.cgi?id=227566

Reviewed by Antti Koivisto.

They're only one directory in the Chromium codebase: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/html/dialog/;drc=d154f7938274ffda2e51690404522117533be62a
Keep only LayoutTests/imported/blink/dialog.

  • TestExpectations:
  • imported/blink/dialog/dont-share-style-to-top-layer-expected.html: Renamed from LayoutTests/imported/blink/fast/dom/HTMLDialogElement/dont-share-style-to-top-layer-expected.html.
  • imported/blink/dialog/dont-share-style-to-top-layer.html: Renamed from LayoutTests/imported/blink/fast/dom/HTMLDialogElement/dont-share-style-to-top-layer.html.
12:07 AM Changeset in webkit [279453] by jer.noble@apple.com
  • 4 edits in trunk/Source

[Mac] (Re-)enable GroupActivities after upstreaming
https://bugs.webkit.org/show_bug.cgi?id=227546

Reviewed by Eric Carlson.

Source/WebKit:

Fix some build errors exposed by enabling GroupActivities.

  • UIProcess/Cocoa/GroupActivities/GroupActivitiesCoordinator.mm:

Source/WTF:

Add support for HAVE_GROUP_ACTIVITIES.

  • wtf/PlatformHave.h:

Jun 30, 2021:

11:32 PM Changeset in webkit [279452] by wilander@apple.com
  • 5 edits
    3 moves in trunk/Source/WebCore

PCM: Change import from CryptoKitCBridging to CryptoKitPrivate
https://bugs.webkit.org/show_bug.cgi?id=227556
<rdar://79992592>

Reviewed by Alex Christensen.

Source/WebCore:

No new tests since no functionality is changed.

  • loader/cocoa/PrivateClickMeasurementCocoa.mm:

Changed import from CryptoKitCBridgingSoftLink.h to CryptoKitPrivateSoftLink.h.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/CryptoKitPrivateSoftLink.h: Renamed from Source/WebCore/PAL/pal/cocoa/CryptoKitCBridgingSoftLink.h.
  • pal/cocoa/CryptoKitPrivateSoftLink.mm: Renamed from Source/WebCore/PAL/pal/cocoa/CryptoKitCBridgingSoftLink.mm.
  • pal/spi/cocoa/CryptoKitPrivateSPI.h: Renamed from Source/WebCore/PAL/pal/spi/cocoa/CryptoKitCBridgingSPI.h.
11:32 PM Changeset in webkit [279451] by graouts@webkit.org
  • 26 edits
    1 copy
    1 add in trunk/Source

[Model] [macOS] Add support for rendering model resources
https://bugs.webkit.org/show_bug.cgi?id=227530
<rdar://problem/79968206>

Reviewed by Dean Jackson.

Source/WebCore:

On macOS, ASVInlinePreview requires an instance in both the WebProcess and the UIProcess to exist with a matching UUID.

On the WebCore side, in the WebProcess, after writing the model resource as a file to disk, we create an instance when a
<model> element is created and message the UIProcess through the ChromeClient providing the UUID generated for it. When
the UIProcess is done processing this message, it will reply with another message which calls into
HTMLModelElement::inlinePreviewDidObtainContextId() with the matching UUID and a context ID for the remote context.
We can then set that remote context ID on our ASVInlinePreview instance.

We also introduce a HTMLModelElement::platformLayer() method such that RenderLayerBacking::updateConfiguration() can call
it to host the ASVInlinePreview layer.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::~HTMLModelElement):
(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::notifyFinished):

  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElementCocoa.mm: Added.

(WebCore::HTMLModelElement::createFile):
(WebCore::HTMLModelElement::clearFile):
(WebCore::HTMLModelElement::modelDidChange):
(WebCore::HTMLModelElement::inlinePreviewDidObtainContextId):
(WebCore::HTMLModelElement::platformLayer const):

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::modelElementDidCreatePreview const):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::modelElementDidCreatePreview const):

  • platform/Logging.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):

Source/WebCore/PAL:

Declare the ASVInlinePreview class for macOS.

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/mac/SystemPreviewSPI.h: Added.

Source/WebKit:

On macOS, ASVInlinePreview requires an instance in both the WebProcess and the UIProcess to exist with a matching UUID.

On the WebKit side, in the UIProcess, we receive a message from the WebProcess when the ASVInlinePreview in that process
was created with its generated UUID. We provide this to the ModelElementController, set the remote connection up and load
the file. When those tasks complete successfully we message back the WebProcess with the UUID and the provided ElementContext
to talk back to the HTMLModelElement instance that initiated the message to the UIProcess in the first place.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementDidCreatePreview):

  • UIProcess/ModelElementController.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::modelElementDidCreatePreview):
(WebKit::WebPageProxy::modelElementPreviewDidObtainContextId):

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

(WebKit::WebChromeClient::modelElementDidCreatePreview const):

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

(WebKit::WebPage::modelElementDidCreatePreview):
(WebKit::WebPage::modelElementPreviewDidObtainContextId):

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

Source/WTF:

Add a new compile-time flag indicating the availability of the ASVInlinePreview SPI on macOS.
We only define it when the header itself is present for now to avoid issues with older macOS
12 SDKs, but ultimately we will only use the macOS version check.

  • wtf/PlatformHave.h:
11:09 PM Changeset in webkit [279450] by Chris Dumez
  • 4 edits in trunk

Regression(r278737): WebContent crash when calling [WKWebView loadHTMLString:] with an invalid URL
https://bugs.webkit.org/show_bug.cgi?id=227560
<rdar://79815425>

Reviewed by Alex Christensen.

Source/WebKit:

Make sure the parsed URL is valid in WebPage::loadData() before getting its protocol and calling
LegacySchemeRegistry::registerURLSchemeAsHandledBySchemeHandler() with it. Passing a null String
to LegacySchemeRegistry::registerURLSchemeAsHandledBySchemeHandler() causes crashes.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadData):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:

(TEST):

11:07 PM Changeset in webkit [279449] by sbarati@apple.com
  • 8 edits in trunk

Turn off data ICs by default
https://bugs.webkit.org/show_bug.cgi?id=227334
<rdar://problem/79802812>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

There are GC crashes that are caused by access data IC sharing. This
patch is both turning off data IC sharing by default, and turning off data
ICs by default.

We should re-enable this once we figure out the issue:
https://bugs.webkit.org/show_bug.cgi?id=227551

Some of our testing modes are still running with data ICs on, so the code doesn't
bit rot. And a select few tests are running with data IC sharing on, for
similar reasons, even though we know it has issues. If those tests start
crashing, we'll just disable sharing completely until the issue is resolved.

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
7:12 PM Changeset in webkit [279448] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

[JSC] Stop generating default parameter code if class constructor is called without 'new'
https://bugs.webkit.org/show_bug.cgi?id=227547
rdar://78821453

Reviewed by Mark Lam.

JSTests:

  • stress/calling-non-callable-constructors.js: Added.

(shouldThrow):

Source/JavaScriptCore:

We already do not generate body bytecode when class constructor is called without 'new' because many features including "super()" assume
that they generate bytecode only when it is called as a constructor. But we are not doing that for default parameters' bytecode generation.
This patch stops generating bytecode for default parameters if class constructor is called without 'new'.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):

  • runtime/ConstructorKind.h:
7:03 PM Changeset in webkit [279447] by ysuzuki@apple.com
  • 15 edits in trunk

[JSC] Private names should be handled by usedVariables mechanism
https://bugs.webkit.org/show_bug.cgi?id=227476
rdar://76049469

Reviewed by Saam Barati.
Source/JavaScriptCore:

Private name handling in the current parser has many problems.

  1. The parser backtracks when it sees destructuring assignment, arrow function etc. In that case, the discarded code must not have any effect on the outside of that code. However, private name handling is annotating "used" of the upper scopes, which is wrong.
  2. In class expression, private name lookup intentionally skips the class-scope when parsing class heritage. But this is not correct since CodeBlock will perform lookup on the normal scope chain and this will look into the class-scope inconsistently. This means that we could encounter different private name at runtime. (it is tested in the added test).
  3. We skip inner function parsing when it is parsed previously. At that case, we must preserve private name annotation, but restored function information does not preserve that.

This patch changes how private name is handled.

  1. We were anyway defining #XXX variables which holds private symbols. So we track "use" information by the mechanism used for usual variables. We remove Used / Declared bits from PrivateNameEntry since they are not necessary at runtime, and these information is handled / tracked in Parser's Scope. For backtracking, we already have a mechanism to roll-back m_usedVariables, so using variable mechanism automatically fixes the problem.
  2. We define class-head-scope separately from class-scope. class-heritage expression can see class name, but it cannot use private names. Previously, our implementation attempted to achieve that by hacky way: skipping this class-scope for private names only while parsing class-heritage. But this was wrong since it does not consider CodeBlock's linking phase as described in the problem (2). Instead, we just define class-head-scope which holds class constructor name.
  3. We clean up popScopeInternal to populate lexical-variables and function-stack. Previously, we are stealing them before popping the scope when necessary, but this is a hack and a bit wrong since scope's popping operation needs to access these information in some cases. Instead, popScopeInternal populates them after popping the scope.
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::pushClassHeadLexicalScope):
(JSC::BytecodeGenerator::popClassHeadLexicalScope):

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

(JSC::ClassExprNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createClassExpr):
(JSC::ASTBuilder::createBlockStatement):
(JSC::ASTBuilder::createForLoop):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createForOfLoop):
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::createSwitchStatement):

  • parser/NodeConstructors.h:

(JSC::ForNode::ForNode):
(JSC::TryNode::TryNode):
(JSC::ClassExprNode::ClassExprNode):
(JSC::SwitchNode::SwitchNode):
(JSC::BlockNode::BlockNode):
(JSC::EnumerationNode::EnumerationNode):
(JSC::ForInNode::ForInNode):
(JSC::ForOfNode::ForOfNode):

  • parser/Nodes.cpp:

(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ModuleProgramNode::ModuleProgramNode):
(JSC::EvalNode::EvalNode):
(JSC::FunctionNode::FunctionNode):
(JSC::VariableEnvironmentNode::VariableEnvironmentNode):

  • parser/Nodes.h:

(JSC::VariableEnvironmentNode::VariableEnvironmentNode): Deleted.

  • parser/Parser.cpp:

(JSC::isPrivateFieldName):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseSwitchStatement):
(JSC::Parser<LexerType>::parseTryStatement):
(JSC::Parser<LexerType>::parseBlockStatement):
(JSC::Parser<LexerType>::parseFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseBinaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::usePrivateName): Deleted.

  • parser/Parser.h:

(JSC::Scope::finalizeLexicalEnvironment):
(JSC::Scope::takeLexicalEnvironment):
(JSC::Scope::takeDeclaredVariables):
(JSC::Scope::takeFunctionDeclarations):
(JSC::Scope::forEachUsedVariable):
(JSC::Scope::usePrivateName):
(JSC::Scope::currentUsedVariablesSize):
(JSC::Parser::popScopeInternal):
(JSC::Parser::popScope):
(JSC::Parser<LexerType>::parse):
(JSC::Scope::copyUndeclaredPrivateNamesTo): Deleted.
(JSC::Scope::hasUsedButUndeclaredPrivateNames const): Deleted.
(JSC::Parser::privateNameScope): Deleted.
(JSC::Parser::copyUndeclaredPrivateNamesToOuterScope): Deleted.

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createClassExpr):
(JSC::SyntaxChecker::createBlockStatement):
(JSC::SyntaxChecker::createForLoop):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::createForOfLoop):
(JSC::SyntaxChecker::createTryStatement):
(JSC::SyntaxChecker::createSwitchStatement):

  • parser/VariableEnvironment.cpp:

(JSC::VariableEnvironmentEntry::dump const):
(JSC::VariableEnvironment::declarePrivateField):
(JSC::VariableEnvironment::declarePrivateAccessor):
(JSC::VariableEnvironment::declarePrivateMethod):
(JSC::VariableEnvironment::dump const):

  • parser/VariableEnvironment.h:

(JSC::VariableEnvironment::declarePrivateField):
(JSC::VariableEnvironment::privateNameEnvironment):
(JSC::VariableEnvironment::addPrivateNamesFrom):
(JSC::PrivateNameEntry::isUsed const): Deleted.
(JSC::PrivateNameEntry::isDeclared const): Deleted.
(JSC::PrivateNameEntry::setIsUsed): Deleted.
(JSC::PrivateNameEntry::setIsDeclared): Deleted.
(JSC::VariableEnvironment::usePrivateName): Deleted.
(JSC::VariableEnvironment::copyPrivateNamesTo const): Deleted.
(JSC::VariableEnvironment::copyUndeclaredPrivateNamesTo const): Deleted.

5:48 PM Changeset in webkit [279446] by Chris Dumez
  • 4 edits
    1 delete in trunk/LayoutTests

REGRESSION (r279427) [ Mac ] imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity.html is failing
https://bugs.webkit.org/show_bug.cgi?id=227557
<rdar://problem/79993241>

Unreviewed, silence console logging to address test flakiness.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity-expected.txt:

LayoutTests:

  • TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity-expected.txt: Removed.
5:16 PM Changeset in webkit [279445] by Jonathan Bedard
  • 8 edits in trunk/Tools

[webkitscmpy] Cache identifiers in Git checkouts
https://bugs.webkit.org/show_bug.cgi?id=225616
<rdar://problem/77789230>

Reviewed by Dewei Zhu.

Computing identifiers in git can be slow, especially if you need to compute
multiple. Caching all identifiers for a branch is not much more expensive than calculating a single identifier. Additionally, caching all identifiers
lets us build a performant subversion mapping, bypassing git-svn.

  • Scripts/libraries/webkitcorepy/setup.py:
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.Cache): Class holding a cache allowing quick mapping between hashes, identifiers and revisions.
(Git.Cache.init): Load cache from json file on disk.
(Git.Cache.path): Path to location of cache on disk.
(Git.Cache._fill): Populate revision and hash to identifier dictionaries.
(Git.Cache.populate): Parse git-log and populate cache.
(Git.Cache.hash): Given an identifier or revision, find the hash.
(Git.Cache.revision): Given an identifier or hash, find the revision.
(Git.Cache.identifier): Given a hash or revision, determine the identifier.
(Git.init): Instantiate cache.
(Git.commit): Check cache before running expensive commands.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add git log mock.
  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(TestGit.test_tag): Surpress logging.
(TestGit.test_checkout): Ditto.
(TestGit.test_no_log): Ditto.
(TestGit.test_order): Ditto.
(test_cache): Verify identifier cache.
(test_revision_cache): Verify revision cache.

  • Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:

(SummarizedResultsTest.test_svn_revision_git): Surpress logging.

  • Scripts/webkitpy/port/base_unittest.py:

(PortTest.test_commits_for_upload_git_svn): Surpress logging.

4:54 PM Changeset in webkit [279444] by Megan Gardner
  • 11 edits in trunk

Add ID and versioning support for AppHighlights
https://bugs.webkit.org/show_bug.cgi?id=227279

Reviewed by Tim Horton.

Source/WebCore:

AppHighlights.AppHighlightRestoreFromStorage
AppHighlights.AppHighlightCreateAndRestoreAndDropBytes
AppHighlights.AppHighlightCreateAndRestoreWithLaterVersion
AppHighlights.AppHighlightCreateAndRestoreWithExtraBytes
AppHighlights.AppHighlightRestoreFromStorageV0
AppHighlights.AppHighlightRestoreFromStorageV1

Reformat the storage of Highlight Data to allow for accurate deletion of active
highlights, as well as making them more robust and future-proof. Support decoding v0
highlights as well.

  • Modules/highlight/AppHighlightRangeData.cpp:

(WebCore::AppHighlightRangeData::NodePathComponent::decode):
(WebCore::AppHighlightRangeData::encode const):
(WebCore::AppHighlightRangeData::decode):

  • Modules/highlight/AppHighlightRangeData.h:

(WebCore::AppHighlightRangeData::NodePathComponent::NodePathComponent):
(WebCore::AppHighlightRangeData::AppHighlightRangeData):
(WebCore::AppHighlightRangeData::identifier const):
(WebCore::AppHighlightRangeData::startOffset const):
(WebCore::AppHighlightRangeData::endOffset const):

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::createAppHighlightRangeData):

Source/WebKit:

Reformat the storage of Highlight Data to allow for accurate deletion of active
highlights, as well as making them more robust and future-proof.

Also found an issue with creating SharedBuffers from the memory map, in that the ipcHandle size
should be used instead of the sharedMemory->size().

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::restoreAppHighlightsAndScrollToIndex):

Source/WTF:

Allow PersistentDecoders to rewind, to help support v0 highlight data.

  • wtf/persistence/PersistentDecoder.cpp:

(WTF::Persistence::Decoder::Decoder):
(WTF::Persistence::Decoder::rewind):

  • wtf/persistence/PersistentDecoder.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:

(TestWebKitAPI::createAppHighlightWithHTML):
(TestWebKitAPI::createWebViewForAppHighlightsWithHTML):
(TestWebKitAPI::TEST):

4:53 PM Changeset in webkit [279443] by rniwa@webkit.org
  • 13 edits
    5 adds in trunk

RemotePlayback must keep its media element alive when there is a pending activity
https://bugs.webkit.org/show_bug.cgi?id=227471
<rdar://79694015>

Reviewed by Geoffrey Garen.

Source/WebCore:

Fixed the bug that the media element's JS wrapper can be collected while there is still
a pending activity for RemotePlayback. In fact, the newly added test demonstrates that
the media element can be deleted without this patch.

This patch also introduces new extended IDL interface attribute GenerateAddOpaqueRoot
to make adding an opaque root as a part of visitChildren easy in the DOM code.

Test: media/remoteplayback-watch-availability-gc.html

  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::ownerNode const):

  • Modules/remoteplayback/RemotePlayback.h:
  • Modules/remoteplayback/RemotePlayback.idl:
  • bindings/scripts/CodeGeneratorJS.pm:

(InstanceNeedsVisitChildren):
(GenerateImplementation):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp: Added.

(WebCore::JSTestGenerateAddOpaqueRootDOMConstructor::prototypeForStructure):
(WebCore::JSTestGenerateAddOpaqueRootDOMConstructor::initializeProperties):
(WebCore::JSTestGenerateAddOpaqueRootPrototype::finishCreation):
(WebCore::JSTestGenerateAddOpaqueRoot::JSTestGenerateAddOpaqueRoot):
(WebCore::JSTestGenerateAddOpaqueRoot::finishCreation):
(WebCore::JSTestGenerateAddOpaqueRoot::createPrototype):
(WebCore::JSTestGenerateAddOpaqueRoot::prototype):
(WebCore::JSTestGenerateAddOpaqueRoot::getConstructor):
(WebCore::JSTestGenerateAddOpaqueRoot::destroy):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::jsTestGenerateAddOpaqueRoot_someAttributeGetter):
(WebCore::JSTestGenerateAddOpaqueRoot::subspaceForImpl):
(WebCore::JSTestGenerateAddOpaqueRoot::visitChildrenImpl):
(WebCore::JSTestGenerateAddOpaqueRoot::analyzeHeap):
(WebCore::JSTestGenerateAddOpaqueRootOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestGenerateAddOpaqueRootOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestGenerateAddOpaqueRoot::toWrapped):

  • bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.h: Added.

(WebCore::JSTestGenerateAddOpaqueRoot::create):
(WebCore::JSTestGenerateAddOpaqueRoot::createStructure):
(WebCore::JSTestGenerateAddOpaqueRoot::subspaceFor):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::jsTestGlobalObject_TestGenerateAddOpaqueRootConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestGenerateAddOpaqueRoot.idl: Added.
  • testing/Internals.cpp:

(WebCore::Internals::isElementAlive const):
(WebCore::Internals::mediaElementCount):

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

LayoutTests:

Added a GC test.

  • media/remoteplayback-watch-availability-gc-expected.txt: Added.
  • media/remoteplayback-watch-availability-gc.html: Added.
4:51 PM Changeset in webkit [279442] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r278391) Sometimes load durations show up as large negative numbers in WebInspector
https://bugs.webkit.org/show_bug.cgi?id=227413
<rdar://79801896>

Reviewed by Chris Dumez.

In r278391 I changed the meaning of members of NetworkLoadMetrics from Seconds deltas from fetchStart
to the MonotonicTime at which each event occurred. I also changed InspectorNetworkAgent::didFinishLoading
accordingly, but I overlooked the fact that sometimes we get empty NetworkLoadMetrics that have been marked as complete,
such as from NetworkResourceLoader::didFinishWithRedirectResponse which indicates that it is complete but
members such as responseEnd are still 0. Rather than check if it is complete, check if the member is nonzero.

The layout test http/tests/inspector/network/resource-timing.html would fail on AS Macs when run after other tests before this change.

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didFinishLoading):

4:36 PM Changeset in webkit [279441] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

ARM64: Disable selection of BFI instruction variants by default.
https://bugs.webkit.org/show_bug.cgi?id=227554
rdar://79978150

Reviewed by Saam Barati.

We suspect that this may have caused some hangs. Disabling while we investigate.

  • b3/B3LowerToAir.cpp:
  • b3/testb3_2.cpp:

(testInsertBitField32):
(testInsertBitField64):

  • runtime/OptionsList.h:
4:15 PM Changeset in webkit [279440] by Truitt Savell
  • 2 edits in trunk/LayoutTests/imported/w3c

Update test expectations for imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog.html after the changes in r279427
https://bugs.webkit.org/show_bug.cgi?id=227553

Unreviewed test gardening.

  • web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt:
3:51 PM Changeset in webkit [279439] by rniwa@webkit.org
  • 15 edits in trunk/Source

Use WeakHashMap and WeakPtr with Node in more places
https://bugs.webkit.org/show_bug.cgi?id=227192
<rdar://problem/79828322>

Reviewed by Geoffrey Garen.

Source/WebCore:

Deploy WeakHashMap and WeakPtr with Node/Element in more places.

  • dom/Document.cpp:

(WebCore::Document::elementForAccessKey):
(WebCore::Document::buildAccessKeyCache):
(WebCore::Document::registerForVisibilityStateChangedCallbacks):
(WebCore::Document::unregisterForVisibilityStateChangedCallbacks):
(WebCore::Document::visibilityStateChanged):

  • dom/Document.h:
  • dom/VisibilityChangeClient.h:
  • html/FormController.cpp:

(WebCore::FormKeyGenerator::formKey):
(WebCore::FormKeyGenerator::willDeleteForm):

  • html/HTMLAnchorElement.cpp:

(WebCore::rootEditableElementMap):
(WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown const):
(WebCore::HTMLAnchorElement::clearRootEditableElementForSelectionOnMouseDown):
(WebCore::HTMLAnchorElement::setRootEditableElementForSelectionOnMouseDown):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::bind):
(WebCore::InspectorDOMAgent::unbind):
(WebCore::InspectorDOMAgent::nodeForId):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::boundNodeId):
(WebCore::InspectorDOMAgent::willDestroyDOMNode):
(WebCore::InspectorDOMAgent::mediaMetricsTimerFired):

  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorLayerTreeAgent.cpp:

(WebCore::InspectorLayerTreeAgent::bindPseudoElement):
(WebCore::InspectorLayerTreeAgent::unbindPseudoElement):

  • inspector/agents/InspectorLayerTreeAgent.h:
  • style/StyleSharingResolver.h:

Source/WTF:

  • wtf/WeakHashMap.h:

(WTF::WeakHashMap::WeakHashMapIteratorBase::makePeek): Fixed type mismatch errors.
(WTF::WeakHashMap::ensure): Made this function return AddResult like HashMap::ensure.
(WTF::WeakHashMap::take): Added.
(WTF::WeakHashMap::removeIf): Fixed the bug that the callback was called with the iterator
of m_impl and not WeakHashMapIterator.

  • wtf/WeakHashSet.h:

(WTF::HashTraits<Ref<WeakPtrImpl<Counter>>>::isReleasedWeakValue): Moved to WeakPtr.h

  • wtf/WeakPtr.h:

(WTF::HashTraits<Ref<WeakPtrImpl<Counter>>>::isReleasedWeakValue): Moved from WeakHashSet.h

3:34 PM Changeset in webkit [279438] by Alan Coon
  • 1 copy in tags/Safari-612.1.21

Tag Safari-612.1.21.

3:25 PM Changeset in webkit [279437] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ MacOS wk1 ] crypto/workers/subtle/hrsa-postMessage-worker.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=227540.

Unreviewed test gardnening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-06-30

  • platform/mac-wk1/TestExpectations:
3:18 PM Changeset in webkit [279436] by Alan Coon
  • 7 edits in branches/safari-612.1.21-branch/Source/JavaScriptCore

Revert r279249. rdar://problem/79987808

3:18 PM Changeset in webkit [279435] by Alan Coon
  • 3 edits in branches/safari-612.1.21-branch/Source/JavaScriptCore

Revert r279253. rdar://problem/79987808

3:17 PM Changeset in webkit [279434] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Updated to use smart pointers in MutationObserver.
https://bugs.webkit.org/show_bug.cgi?id=227518

Patch by venky dass <yaranamavenkataramana@apple.com> on 2021-06-30
Reviewed by Ryosuke Niwa.

  • dom/MutationObserver.cpp:

(WebCore::MutationObserver::~MutationObserver):
(WebCore::MutationObserver::disconnect):
(WebCore::MutationObserver::observationStarted):
(WebCore::MutationObserver::observationEnded):
(WebCore::MutationObserver::isReachableFromOpaqueRoots const):
(WebCore::MutationObserver::deliver):

  • dom/MutationObserver.h:
  • dom/MutationObserverRegistration.h:
3:09 PM Changeset in webkit [279433] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[BigSur wk2] imported/w3c/web-platform-tests/webrtc/simplecall-no-ssrcs.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=227536

Unreviewed test gardening

Patch by Eric Hutchison <Eric Hutchison> on 2021-06-30

  • platform/mac-wk2/TestExpectations:
2:16 PM Changeset in webkit [279432] by Truitt Savell
  • 20 edits
    2 moves
    2 deletes in trunk

Unreviewed, reverting r279405.

Casued 50+ webrtc crashes on Big Sur Debug

Reverted changeset:

"[Cocoa] Migrate WebRTC UDP socket handling to NW API"
https://bugs.webkit.org/show_bug.cgi?id=227210
https://commits.webkit.org/r279405

2:01 PM Changeset in webkit [279431] by Russell Epstein
  • 1 copy in tags/Safari-612.1.18.11.3

Tag Safari-612.1.18.11.3.

1:40 PM Changeset in webkit [279430] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build.

  • UIProcess/ios/ProcessAssertionIOS.mm:
1:07 PM Changeset in webkit [279429] by Darin Adler
  • 4 edits in trunk

CSS specification prohibits numbers with trailing decimal point (e.g. "1.px"), but we allow them
https://bugs.webkit.org/show_bug.cgi?id=227517

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-syntax/decimal-points-in-numbers-expected.txt:

Expect a pass instead of a fail.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-syntax/decimal-points-in-numbers.html

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseCSSNumber): Added. Checks for the trailing decimal point. Also uses
std::optional instead of a bool plus an out argument; should refactor the other functions
to work that way at some point.
(WebCore::parseSimpleLength): Use parseCSSNumber and isASCIIAlphaCaselessEqual.
(WebCore::parseSimpleAngle): Ditto.
(WebCore::parseTransformNumberArguments): Ditto.

12:48 PM Changeset in webkit [279428] by Russell Epstein
  • 8 edits in branches/safari-612.1.18.11-branch/Source

Versioning.

WebKit-7612.1.18.11.3

11:43 AM Changeset in webkit [279427] by Chris Dumez
  • 392 edits
    93 copies
    2 moves
    1054 adds
    67 deletes in trunk/LayoutTests

Resync html WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227460

Reviewed by Sam Weinig.

Resync html WPT tests from upstream a38612f39e7752c3532.

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/html/*: Updated.

LayoutTests:

  • TestExpectations:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • tests-options.json:
11:33 AM Changeset in webkit [279426] by commit-queue@webkit.org
  • 6 edits in trunk/Source/ThirdParty/ANGLE

ASSERT in webgl/1.0.x/conformance/glsl/misc/uninitialized-local-global-variables.html IdGen ASSERT(*base != '_');
https://bugs.webkit.org/show_bug.cgi?id=227482

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-30
Reviewed by Kenneth Russell.

Give unnamed structs normal "_<number>" name.
The original code thought it gave "ANGLEunnamed<number>", but in reality it
gave "
unnamed<number>".
Since other constructs already create names of form "_<number>", it is unwarranted to
special case this particular case to give "_unnamed<number>" or "ANGLE_unnamed<number" or
"ANGLE_<number>".

  • src/compiler/translator/TranslatorMetalDirect/SeparateCompoundStructDeclarations.cpp:
  • src/tests/compiler_tests/MSLOutput_test.cpp:

(TEST_F):

11:31 AM Changeset in webkit [279425] by Chris Dumez
  • 43 edits
    59 adds
    1 delete in trunk/LayoutTests

Resync workers WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227512

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Resync workers WPT tests from upstream a38612f39e7752c353208.

  • resources/resource-files.json:
  • web-platform-tests/workers/*: Updated.

LayoutTests:

  • tests-options.json:
11:29 AM Changeset in webkit [279424] by commit-queue@webkit.org
  • 3 edits in trunk

toDataURL image upside down if premultipliedAlpha=false
https://bugs.webkit.org/show_bug.cgi?id=156129
<rdar://problem/53942867>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-30
Reviewed by Kenneth Russell.

Flip the result PixelBuffer of GraphicsContextGL::paintRenderingResultsToPixelBuffer()
along the y-axis manually with memcpy.
ReadPixels returns the pixels upside down.
The PixelBuffer code-path is only used for reading unpremultiplied
image contents so that toDataURL() can encode the premultipliedAlpha=false
WebGL content as was rendered.

Other code-paths, such as Context2D.drawImage and drawing to the document,
use GraphicsContextGL::paintRenderingResultsToCanvas().
In those cases y-flip is done by constructing a ImageBuffer for the PixelBuffer
and then using y-flip transform to draw the ImageBuffer to the target ImageBuffer
using GraphicsContext.

Fixes webgl/1.0.x/conformance/canvas/to-data-url-test.html

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToPixelBuffer):

11:26 AM Changeset in webkit [279423] by Wenson Hsieh
  • 4 edits in trunk

[iOS] [Live Text] "Text from Camera" should not be shown in callout bar when selecting text
https://bugs.webkit.org/show_bug.cgi?id=227535
rdar://79936981

Reviewed by Devin Rousso.

Source/WebKit:

Match new system behavior in rdar://79758142 by not showing the "Text from Camera" item in the callout bar when
the selection is a (non-collapsed) range.

Test: WebKit.CaptureTextFromCamera

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):

Tools:

Add an API test to exercise the change. See WebKit ChangeLog for more detail.

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:

(canPerformActionWithSender):
(TEST):

11:14 AM Changeset in webkit [279422] by Patrick Angle
  • 4 edits
    2 adds in trunk

Web Inspector: Styles: Autocomplete should support function completions
https://bugs.webkit.org/show_bug.cgi?id=227097

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Covered by new test:

  • inspector/unit-tests/css-keyword-completions.html

Add support for completing autocompleting values as part of a CSS function in the Styles sidebar panel.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forPartialPropertyName):
(WI.CSSKeywordCompletions.forPartialPropertyValue):
Tokenize the provided partial value text to correct provide completion for functions, like env(.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
Moved logic to WI.CSSKeywordCompletions.

LayoutTests:

  • inspector/unit-tests/css-keyword-completions-expected.txt: Added.
  • inspector/unit-tests/css-keyword-completions.html: Added.
10:45 AM Changeset in webkit [279421] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

[webkit.css] make the active tab more obvious
https://bugs.webkit.org/show_bug.cgi?id=227515

Reviewed by Jonathan Bedard.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.tabs .tab.active .link):

10:09 AM Changeset in webkit [279420] by graouts@webkit.org
  • 23 edits
    3 adds in trunk/Source

[Model] [iOS] Add support for displaying <model> in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=227443
<rdar://problem/79859937>

Reviewed by Sam Weinig.

Source/WebCore:

Expose a new enterFullscreen() method on HTMLModelElement allowing to enter a fullscreen AR experience
where the resource may be displayed in the user's environment. This differs from the existing
Element.requestFullscreen() method since the experience is provided by the platform and we're not
presenting the inline <model> element in a fullscreen window.

From the WebProcess side, this requires obtaining a reference to the content layer for the <model> element
and sending it in an IPC message to the UIProcess.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::enterFullscreen):

  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElement.idl:
  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::takeModelElementFullscreen const):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::takeModelElementFullscreen const):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::contentsLayerIDForModel const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::contentsLayerIDForModel const):

  • platform/graphics/ca/GraphicsLayerCA.h:

Source/WebCore/PAL:

Declare additional ASVInlinePreview methods required for fullscreen support.

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

Displaying a model element in fullscreen requires making some calls on the ASVInlinePreview object
created by a WKModelView. We send the content layer ID we receive through an IPC call from the
WebProcess to the new ModelElementController. We then look at the remote layer tree for a node
matching that ID and find its related UIView. If we find a WKModelView, as expected, we can carry
on and call -[ASVInlinePreview createFullscreenInstanceWithInitialFrame:previewOptions:completionHandler:]
to enter fullscreen using the presentingViewController provided by the UI client, and then observe
when we exit fullscreen using -[ASVInlinePreview observeDismissFullscreenWithCompletionHandler:]
to make sure the presenting view controller is removed.

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/Cocoa/ModelElementControllerCocoa.mm: Added.

(WebKit::ModelElementController::takeModelElementFullscreen):

  • UIProcess/ModelElementController.cpp: Added.

(WebKit::ModelElementController::ModelElementController):

  • UIProcess/ModelElementController.h: Added.

(WebKit::ModelElementController::page):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didAttachToRunningProcess):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::takeModelElementFullscreen):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::takeModelElementFullscreen const):

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

(WebKit::WebPage::takeModelElementFullscreen):

  • WebProcess/WebPage/WebPage.h:
9:43 AM Changeset in webkit [279419] by Alan Coon
  • 7 edits in branches/safari-612.1.21-branch/Source/WebKit

Cherry-pick r279411. rdar://problem/79970312

Unreviewed, reverting r279155.

Caused a PLT5 regression

Reverted changeset:

"[macOS] Suspend WebProcesses that are in the process cache"
https://bugs.webkit.org/show_bug.cgi?id=227269
https://commits.webkit.org/r279155

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

9:43 AM Changeset in webkit [279418] by Alan Coon
  • 4 edits in branches/safari-612.1.21-branch/Source

Cherry-pick r279392. rdar://problem/79970322

WebKit_iosmac build failure: SystemPreviewSPI.h:29:9: fatal error: 'AssetViewer/ARQuickLookWebKitItem.h' file not found
https://bugs.webkit.org/show_bug.cgi?id=227507
<rdar://problem/79902043>

Reviewed by Dean Jackson.

When we added new SPIs in Source/WebCore/PAL/pal/spi/ios/SystemPreviewSPI.h as part of r279312 we also included this file
from a new file that is compiled on Catalyst. This revealed an issue where existing SPIs included in that file weren't
actually available on Catalyst. We now make sure we compile those out on Catalyst.

Source/WebCore/PAL:

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:

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

9:43 AM Changeset in webkit [279417] by Alan Coon
  • 4 edits
    4 deletes in branches/safari-612.1.21-branch

Cherry-pick r279382. rdar://problem/79970297

Unreviewed, reverting r279250.
https://bugs.webkit.org/show_bug.cgi?id=227499

Sometimes causes YouTube audio to cut out

Reverted changeset:

"[Cocoa] Last few seconds of 'audio/webm; codecs=vorbis'
appended to a SampleBuffer are not played"
https://bugs.webkit.org/show_bug.cgi?id=226069
https://commits.webkit.org/r279250

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

9:43 AM Changeset in webkit [279416] by Alan Coon
  • 9 edits
    1 add in branches/safari-612.1.21-branch/Source

Cherry-pick r279365. rdar://problem/79969742

Enable Probabilistic Guard Malloc for RuleData and RuleFeature vectors
https://bugs.webkit.org/show_bug.cgi?id=227446

Reviewed by Geoffrey Garen.

Source/WebCore:

Help for catching a crash.

  • style/RuleFeature.cpp: (WebCore::Style::RuleFeatureSet::collectFeatures): (WebCore::Style::RuleFeatureSet::add):
  • style/RuleFeature.h:
  • style/RuleSet.h:
  • style/StyleScopeRuleSets.cpp: (WebCore::Style::makeRuleSet): (WebCore::Style::ensureInvalidationRuleSets):

Source/WTF:

Add SystemMalloc type that can be used with containers like Vector and
ProbabilisticGuardMalloc alias for it on Mac/iOS platforms.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/SystemMalloc.h: Added. (WTF::SystemMalloc::malloc): (WTF::SystemMalloc::tryMalloc): (WTF::SystemMalloc::zeroedMalloc): (WTF::SystemMalloc::tryZeroedMalloc): (WTF::SystemMalloc::realloc): (WTF::SystemMalloc::tryRealloc): (WTF::SystemMalloc::free):
  • wtf/Vector.h: (WTF::Malloc>::appendVector):

Include all template parameters for the appendVector argument.

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

9:39 AM Changeset in webkit [279415] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[MacOS wk1] fast/shadow-dom/style-resolver-sharing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=227516

Unreviewed test gardening

Patch by Eric Hutchison <Eric Hutchison> on 2021-06-30

  • platform/mac-wk1/TestExpectations:
9:31 AM Changeset in webkit [279414] by ntim@apple.com
  • 18 edits
    2 adds
    1 delete in trunk

Add modal dialog UA styles
https://bugs.webkit.org/show_bug.cgi?id=226175

Reviewed by Antti Koivisto.

This adds an :-internal-modal-dialog pseudo class and a test to make sure it does not leak.

This improves WPT results a lot and expectations have been updated. Some tests start failing,
but those are mainly top-layer related (which isn't implemented yet).

LayoutTests/imported/w3c:

  • web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt:

Source/WebCore:

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText const):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

  • css/SelectorCheckerTestFunctions.h:

(WebCore::matchesModalDialogPseudoClass):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/dialog.css:

(dialog:-internal-modal-dialog):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION):
(WebCore::SelectorCompiler::addPseudoClassType):

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::parseAttribute):
(WebCore::HTMLDialogElement::isModal const):

  • html/HTMLDialogElement.h:

LayoutTests:

  • TestExpectations:
  • fast/css/pseudo-class-internal-expected.txt: Added.
  • fast/css/pseudo-class-internal.html: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt: Removed.
9:28 AM Changeset in webkit [279413] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r278884): [Nicosia] Fix empty stack check in CairoOperationRecorder::restore()
https://bugs.webkit.org/show_bug.cgi?id=227525

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-06-30
Reviewed by Myles C. Maxfield.

We keep our own state stack, with a state added at construction, so we should check our stack instead.

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::restore):

8:37 AM Changeset in webkit [279412] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Unreviewed, reverting r276969.

Causes previous assertion to get released before the new one
is taken (asynchronously)

Reverted changeset:

"[iOS] Use async API to take RunningBoard assertions"
https://bugs.webkit.org/show_bug.cgi?id=225324
https://commits.webkit.org/r276969

8:22 AM Changeset in webkit [279411] by Chris Dumez
  • 7 edits in trunk/Source/WebKit

Unreviewed, reverting r279155.

Caused a PLT5 regression

Reverted changeset:

"[macOS] Suspend WebProcesses that are in the process cache"
https://bugs.webkit.org/show_bug.cgi?id=227269
https://commits.webkit.org/r279155

7:13 AM Changeset in webkit [279410] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

Unskip interpreter-wasm.js on ARM and MIPS
https://bugs.webkit.org/show_bug.cgi?id=227295

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-06-30
Reviewed by Caio Araujo Neponoceno de Lima.

Changed the testcase to be guarded by $vm.isWasmSupported(), so the
test will be executed once wasm is available in the arch

  • microbenchmarks/interpreter-wasm.js:

(key.in.Module.Module.hasOwnProperty): Deleted.
(quit_): Deleted.
(locateFile): Deleted.
(ENVIRONMENT_IS_NODE.read_): Deleted.
(ENVIRONMENT_IS_NODE.readBinary): Deleted.
(ENVIRONMENT_IS_NODE.quit_): Deleted.
(ENVIRONMENT_IS_NODE.Module.string_appeared_here): Deleted.
(else.read_): Deleted.
(else.readBinary): Deleted.
(else.quit_): Deleted.
(else): Deleted.
(else.xhr.onload): Deleted.
(else.readAsync): Deleted.
(else.setWindowTitle): Deleted.
(key.in.moduleOverrides.moduleOverrides.hasOwnProperty): Deleted.
(dynamicAlloc): Deleted.
(getNativeTypeSize): Deleted.
(warnOnce): Deleted.
(convertJsFunctionToWasm): Deleted.
(addFunctionWasm): Deleted.
(removeFunctionWasm): Deleted.
(): Deleted.
(setTempRet0): Deleted.
(setValue): Deleted.
(assert): Deleted.
(getCFunc): Deleted.
(toC.string_appeared_here): Deleted.
(convertReturnValue): Deleted.
(ccall): Deleted.
(UTF8ArrayToString): Deleted.
(UTF8ToString): Deleted.
(stringToUTF8Array): Deleted.
(stringToUTF8): Deleted.
(lengthBytesUTF8): Deleted.
(allocateUTF8OnStack): Deleted.
(writeArrayToMemory): Deleted.
(writeAsciiToMemory): Deleted.
(updateGlobalBufferAndViews): Deleted.
(callRuntimeCallbacks): Deleted.
(preRun): Deleted.
(initRuntime): Deleted.
(preMain): Deleted.
(exitRuntime): Deleted.
(postRun): Deleted.
(addOnPreRun): Deleted.
(addOnPostRun): Deleted.
(addRunDependency): Deleted.
(removeRunDependency): Deleted.
(hasPrefix): Deleted.
(isDataURI): Deleted.
(isFileURI): Deleted.
(getBinary): Deleted.
(getBinaryPromise): Deleted.
(createWasm.receiveInstance): Deleted.
(createWasm.receiveInstantiatedSource): Deleted.
(createWasm.instantiateArrayBuffer): Deleted.
(createWasm.instantiateAsync.): Deleted.
(createWasm.instantiateAsync): Deleted.
(createWasm): Deleted.
(ATINIT.push.func): Deleted.
(demangle): Deleted.
(demangleAll): Deleted.
(_emscripten_get_sbrk_ptr): Deleted.
(_emscripten_memcpy_big): Deleted.
(abortOnCannotGrowMemory): Deleted.
(_emscripten_resize_heap): Deleted.
(PATH.splitPath): Deleted.
(PATH.normalizeArray): Deleted.
(PATH.normalize): Deleted.
(PATH.dirname): Deleted.
(PATH.basename): Deleted.
(PATH.extname): Deleted.
(PATH.join): Deleted.
(PATH.join2): Deleted.
(SYSCALLS.printChar): Deleted.
(SYSCALLS.getStr): Deleted.
(SYSCALLS.get64): Deleted.
(_fd_write): Deleted.
(_setTempRet0): Deleted.
(_wasm_call_ctors.Module.string_appeared_here): Deleted.
(_main.Module.string_appeared_here): Deleted.
(_malloc.Module.string_appeared_here): Deleted.
(
_errno_location.Module.string_appeared_here): Deleted.
(_free.Module.string_appeared_here): Deleted.
(stackSave.Module.string_appeared_here): Deleted.
(stackAlloc.Module.string_appeared_here): Deleted.
(stackRestore.Module.string_appeared_here): Deleted.
(growWasmMemory.Module.string_appeared_here): Deleted.
(dynCall_ii.Module.string_appeared_here): Deleted.
(dynCall_iiii.Module.string_appeared_here): Deleted.
(dynCall_jiji.Module.string_appeared_here): Deleted.
(ExitStatus): Deleted.
(dependenciesFulfilled): Deleted.
(callMain): Deleted.
(run.doRun): Deleted.
(run): Deleted.
(exit): Deleted.

6:36 AM Changeset in webkit [279409] by ntim@apple.com
  • 14 edits
    5 adds
    2 deletes in trunk/LayoutTests

Re-import html/semantics/interactive-elements/the-dialog-element WPT
https://bugs.webkit.org/show_bug.cgi?id=227523

Reviewed by Antti Koivisto.

WPT Revision: https://github.com/web-platform-tests/wpt/commit/616577e3962171d2ffe41472e13f6353e6ea43ef

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-iframe.sub.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-audio-video-crash.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-not-in-tree-crash.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-scrolled-viewport-expected.txt: Removed.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-scrolled-viewport.html: Removed.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission-expected.txt:
5:53 AM Changeset in webkit [279408] by ntim@apple.com
  • 8 edits in trunk

Support -internal- prefix for pseudo classes and rename :-webkit-direct-focus to :-internal-direct-focus
https://bugs.webkit.org/show_bug.cgi?id=227522

Reviewed by Antti Koivisto.

:-webkit-direct-focus was already UA-sheet only, so I took an opportunity to rename it here, also just to
test that the script is working. Test updated accordingly.

Source/WebCore:

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText const):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/html.css:

(:-internal-direct-focus):
(:-webkit-direct-focus): Deleted.

  • css/makeSelectorPseudoClassAndCompatibilityElementMap.py:

(enumerablePseudoType):

LayoutTests:

  • fast/shadow-dom/direct-focus-pseudo-does-not-match-in-author-stylesheet.html:
  • fast/shadow-dom/direct-focus-pseudo-does-not-match-in-author-stylesheet-expected.txt:
3:19 AM Changeset in webkit [279407] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Fix the build.

  • wtf/PlatformHave.h:

This is not available on the simulator; disable it.

3:18 AM Changeset in webkit [279406] by ntim@apple.com
  • 25 edits in trunk

Implement support for <dialog> element close event
https://bugs.webkit.org/show_bug.cgi?id=227493

Reviewed by Antti Koivisto.

With this change, the m_isOpen flag of HTMLDialogElement is only changed on attribute change, so attribute changes can
be detected more easily to fire this new "close" event.

Test: web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close.html
Adjusted existing test expectations for new close event.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt:
  • web-platform-tests/html/dom/idlharness.https-expected.txt:
  • web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:

Source/WebCore:

  • dom/GlobalEventHandlers.idl:
  • html/HTMLAttributeNames.in:
  • html/HTMLDialogElement.cpp:

(WebCore::dialogCloseEventSender):
(WebCore::HTMLDialogElement::~HTMLDialogElement):
(WebCore::HTMLDialogElement::show):
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):
(WebCore::HTMLDialogElement::dispatchPendingEvent):
(WebCore::HTMLDialogElement::parseAttribute):
(WebCore::HTMLDialogElement::setOpen):
(WebCore::HTMLDialogElement::toggleOpen): Deleted.

  • html/HTMLDialogElement.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
1:46 AM Changeset in webkit [279405] by youenn@apple.com
  • 20 edits
    1 copy
    2 moves
    1 add in trunk

[Cocoa] Migrate WebRTC UDP socket handling to NW API
https://bugs.webkit.org/show_bug.cgi?id=227210
LayoutTests/imported/w3c:

Reviewed by Eric Carlson.

Rebasing tests as timing changes a bit.
This aligns with Chrome and Firefox behavior.

  • web-platform-tests/webrtc/no-media-call-expected.txt:
  • web-platform-tests/webrtc/promises-call-expected.txt:

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Reviewed by Eric Carlson.

Add infrastructure to new experimental feature flag for NW backed UDP sockets.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webRTCPlatformTCPSocketsEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCPlatformTCPSocketsEnabled):
(WebCore::RuntimeEnabledFeatures::webRTCPlatformUDPSocketsEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCPlatformUDPSocketsEnabled):

Source/WebKit:

Reviewed by Eric Carlson.

Migrate UDP socket handling from WebRTC physical socket server to nw API for Cocoa ports.

For each UDP socket opened, we open a nw_listener that will listen to inbound connections.
On inbound connection, we receive a nw_connection that we store in a address -> connection map.

Whenever sending a packet, we look at the remote address.
If needed, we create a nw_connection to that particular remote address and store it in the address -> connection map.
We then use the pre-existing or newly created nw_connection to send the packet.

Make sure to cancel NW connection in case of failure before releasing the socket.

Covered by existing tests

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createUDPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:

(WebKit::NetworkRTCProvider::setPlatformTCPSocketsEnabled):
(WebKit::NetworkRTCProvider::setPlatformUDPSocketsEnabled):

  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocketCocoa.h.
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm: Renamed from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocketCocoa.mm.

(WebKit::tcpSocketQueue):
(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):
(WebKit::NetworkRTCTCPSocketCocoa::close):
(WebKit::NetworkRTCTCPSocketCocoa::setOption):
(WebKit::NetworkRTCTCPSocketCocoa::createMessageBuffer):
(WebKit::NetworkRTCTCPSocketCocoa::sendTo):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h: Added.

(WTF::DefaultHash<rtc::SocketAddress>::hash):
(WTF::DefaultHash<rtc::SocketAddress>::equal):
(WTF::HashTraits<rtc::SocketAddress>::emptyValue):
(WTF::HashTraits<rtc::SocketAddress>::constructDeletedValue):
(WTF::HashTraits<rtc::SocketAddress>::isDeletedValue):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm: Added.

(WebKit::NetworkRTCUDPSocketCocoaConnections::create):
(WebKit::NetworkRTCUDPSocketCocoaConnections::WTF_GUARDED_BY_LOCK):
(WebKit::udpSocketQueue):
(WebKit::NetworkRTCUDPSocketCocoa::createUDPSocket):
(WebKit::NetworkRTCUDPSocketCocoa::NetworkRTCUDPSocketCocoa):
(WebKit::NetworkRTCUDPSocketCocoa::~NetworkRTCUDPSocketCocoa):
(WebKit::NetworkRTCUDPSocketCocoa::close):
(WebKit::NetworkRTCUDPSocketCocoa::setOption):
(WebKit::NetworkRTCUDPSocketCocoa::sendTo):
(WebKit::NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections):
(WebKit::NetworkRTCUDPSocketCocoaConnections::close):
(WebKit::NetworkRTCUDPSocketCocoaConnections::setOption):
(WebKit::processUDPData):
(WebKit::NetworkRTCUDPSocketCocoaConnections::createNWConnection):
(WebKit::NetworkRTCUDPSocketCocoaConnections::setupNWConnection):
(WebKit::NetworkRTCUDPSocketCocoaConnections::sendTo):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::setConnection):

Source/WTF:

Reviewed by Eric Carlson.

Add a new experimental flag for NW backed UDP sockets.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

<rdar://problem/79859045>

Reviewed by Eric Carlson.

  • platform/ios-simulator-wk2/TestExpectations:

Mark test as failed, as this test is using unsupported API (transport).

12:56 AM Changeset in webkit [279404] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[SOUP] Implement CertificateInfo::summary
https://bugs.webkit.org/show_bug.cgi?id=227484

Reviewed by Michael Catanzaro.

GLib now provides API to get the information required to fill the CertificateSummary.

  • platform/network/soup/CertificateInfo.h:

(WebCore::CertificateInfo::summary const): Deleted.

  • platform/network/soup/CertificateInfoSoup.cpp:

(WebCore::CertificateInfo::summary const):

12:50 AM Changeset in webkit [279403] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] mark fast/text/international/system-language/navigator-language/navigator-language-en{,-US}.html as passing
https://bugs.webkit.org/show_bug.cgi?id=227513

These tests use the declarative language override feature in the test
harness, which is currently not supported on glib platforms. These
tests likely pass by coincidence in the testing environment.
Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-06-30

  • platform/glib/TestExpectations:
12:30 AM Changeset in webkit [279402] by graouts@webkit.org
  • 8 edits
    2 adds in trunk/Source

[Model] [iOS] Add support for manipulating <model> inline
https://bugs.webkit.org/show_bug.cgi?id=227448
<rdar://problem/79863579>

Reviewed by Tim Horton.

Source/WebCore/PAL:

Declare additional ASVInlinePreview methods.

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

ASVInlinePreview instances allow for UITouch and UIEvent objects to be forwarded in order to manipulate
the object inline. We create a UIGestureRecognizer subclass that is attached to WKModelView and forwards
touchesBegan: and similar UIResponder messages over to the ASVInlinePreview managed by the WKModelView.
This allows multiple <model> elements to be manipulated at once.

We will add support for disallowing such interaction with an attribute and/or a call to preventDefault()
at a later time.

  • SourcesCocoa.txt:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:

(WebKit::collectDescendantViewsAtPoint):
(-[UIView _web_findDescendantViewAtPoint:withEvent:]):

  • UIProcess/ios/WKModelInteractionGestureRecognizer.h: Added.
  • UIProcess/ios/WKModelInteractionGestureRecognizer.mm: Added.

(-[WKModelInteractionGestureRecognizer touchesBegan:withEvent:]):
(-[WKModelInteractionGestureRecognizer touchesMoved:withEvent:]):
(-[WKModelInteractionGestureRecognizer touchesEnded:withEvent:]):
(-[WKModelInteractionGestureRecognizer touchesCancelled:withEvent:]):

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

(-[WKModelView initWithModel:]):

  • WebKit.xcodeproj/project.pbxproj:

Jun 29, 2021:

10:37 PM Changeset in webkit [279401] by ntim@apple.com
  • 23 edits
    1 add in trunk

Implement form[method=dialog]
https://bugs.webkit.org/show_bug.cgi?id=226172

Reviewed by Chris Dumez.

Marked relevant WPT as pass & unskipped relevant test.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/reflection-forms-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission-expected.txt:

Source/WebCore:

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::resultForDialogSubmit const):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::submitDialog):

  • html/HTMLFormElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::resultForDialogSubmit const):

  • html/HTMLInputElement.h:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::resultForDialogSubmit const):

  • html/ImageInputType.h:
  • html/InputType.cpp:

(WebCore::InputType::resultForDialogSubmit const):

  • html/InputType.h:
  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::Attributes::parseMethodType):
(WebCore::FormSubmission::FormSubmission):
(WebCore::FormSubmission::create):
(WebCore::FormSubmission::populateFrameLoadRequest):
(WebCore::FormSubmission::requestURL const):

  • loader/FormSubmission.h:

(WebCore::FormSubmission::Attributes::methodString):
(WebCore::FormSubmission::data const):
(WebCore::FormSubmission::returnValue const):

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • TestExpectations:
7:13 PM Changeset in webkit [279400] by Chris Dumez
  • 15 edits
    10 adds
    4 deletes in trunk/LayoutTests

Resync speech-api WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227503

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Resync speech-api WPT tests from upstream a38612f39e7752c353208.

  • web-platform-tests/speech-api/*: Updated.

LayoutTests:

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
7:12 PM Changeset in webkit [279399] by commit-queue@webkit.org
  • 1 edit
    2 deletes in trunk/LayoutTests

[GLIB] Unreviewed test gardening, update baselines after r279169
https://bugs.webkit.org/show_bug.cgi?id=227407

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-06-29

  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-none-block-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-self-block-expected.txt: Removed.
6:09 PM Changeset in webkit [279398] by Chris Dumez
  • 16 edits
    1 copy
    13 adds in trunk/LayoutTests

Resync css/cssom WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227506

Reviewed by Sam Weinig.

Resync css/cssom WPT tests from upstream a38612f39e7752c353208.

  • resources/resource-files.json:
  • web-platform-tests/css/cssom/*: Updated.
5:14 PM Changeset in webkit [279397] by Devin Rousso
  • 2 edits in trunk/LayoutTests

5 media/modern-media-controls/* tests are failing constantly on Catalina
https://bugs.webkit.org/show_bug.cgi?id=227319
<rdar://problem/79693462>

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:

Skip these tests on Catalina while the underlying issue is investigated.

5:09 PM Changeset in webkit [279396] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ BigSur ] webrtc/multi-audio.html is now flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=223043.

Unreviewed test gardnening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-06-29

  • platform/mac/TestExpectations:
4:51 PM Changeset in webkit [279395] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur WK1] imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-v* is consistently failing.
https://bugs.webkit.org/show_bug.cgi?id=221300.

Unreviewed test gardening.

Updating prior test expectations.

  • platform/mac-wk1/TestExpectations:
4:49 PM Changeset in webkit [279394] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

Add new argument of device os version for reporting JavaScriptCore test result
https://bugs.webkit.org/show_bug.cgi?id=227363

Reviewed by Dewei Zhu.

  • Scripts/run-javascriptcore-tests:

(configurationForUpload):

4:48 PM Changeset in webkit [279393] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove "function declared ‘static’ but never defined" build warnings since r278971.
https://bugs.webkit.org/show_bug.cgi?id=227436

This patch removes the build warnings below.
warning: ‘bool JSC::cannotBeIdentPartOrEscapeStart(LChar)’ declared ‘static’ but never defined [-Wunused-function]

Reviewed by Michael Catanzaro.

  • runtime/LiteralParser.cpp: Add definitions for cannotBeIdentPartOrEscapeStart.

(JSC::cannotBeIdentPartOrEscapeStart):

3:50 PM Changeset in webkit [279392] by graouts@webkit.org
  • 4 edits in trunk/Source

WebKit_iosmac build failure: SystemPreviewSPI.h:29:9: fatal error: 'AssetViewer/ARQuickLookWebKitItem.h' file not found
https://bugs.webkit.org/show_bug.cgi?id=227507
<rdar://problem/79902043>

Reviewed by Dean Jackson.

When we added new SPIs in Source/WebCore/PAL/pal/spi/ios/SystemPreviewSPI.h as part of r279312 we also included this file
from a new file that is compiled on Catalyst. This revealed an issue where existing SPIs included in that file weren't
actually available on Catalyst. We now make sure we compile those out on Catalyst.

Source/WebCore/PAL:

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:
3:25 PM Changeset in webkit [279391] by commit-queue@webkit.org
  • 4 edits in trunk

Encoding specified in the 'charset' attribute should have precedence over 'content' attribute
https://bugs.webkit.org/show_bug.cgi?id=227464

Patch by Johnson Zhou <qiaosong_zhou@apple.com> on 2021-06-29
LayoutTests/imported/w3c:

Reviewed by Geoffrey Garen.

  • web-platform-tests/html/syntax/parsing/meta-inhead-insertion-mode-expected.txt:

Source/WebCore:

Reviewed by Geoffrey Garen.

Puts precedence on 'charset' attribute by breaking out of the parsing process.

This test passes Firefox and Chrome. Tested using
http://wpt.live/html/syntax/parsing/meta-inhead-insertion-mode.html

  • html/parser/HTMLMetaCharsetParser.cpp:

(WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes):

3:17 PM Changeset in webkit [279390] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Updating test expectations for webanimations/css-transition-retargeting-during-ready-promise.html
https://bugs.webkit.org/show_bug.cgi?id=215335

Unreviewed test gardening

Patch by Eric Hutchison <Eric Hutchison> on 2021-06-29

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
3:04 PM Changeset in webkit [279389] by Chris Dumez
  • 104 edits
    2 copies
    3 moves
    55 adds
    8 deletes in trunk/LayoutTests

Resync service-worker WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227490

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync service-worker WPT tests from upstream a38612f39e7752c353208.

  • web-platform-tests/service-workers/*: Updated.

LayoutTests:

2:51 PM Changeset in webkit [279388] by Cameron McCormack
  • 2 edits in trunk/Source/WebKit

Don't null check destination in the RemoteRenderingBackend::nextDestinationImageBufferAfterApply main loop
https://bugs.webkit.org/show_bug.cgi?id=227475

Reviewed by Wenson Hsieh.

We already null check it and return early as part of the
MESSAGE_CHECK_WITH_RETURN_VALUE call just above.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

2:50 PM Changeset in webkit [279387] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: accessibility/table-title.html is a flaky timeout on BigSur wk2 Debug
https://bugs.webkit.org/show_bug.cgi?id=227504

Unreviewed test gardening

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-06-29

  • platform/mac-wk2/TestExpectations:
2:17 PM Changeset in webkit [279386] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[Big Sur Release wk2 arm64] fast/css/sticky/sticky-left.html is a flaky image failure

https://bugs.webkit.org/show_bug.cgi?id=227467

Unreviewed test gardnening

Patch by Eric Hutchison <Eric Hutchison> on 2021-06-29

  • platform/mac-wk2/TestExpectations:
2:03 PM Changeset in webkit [279385] by Chris Dumez
  • 80 edits
    4 moves
    77 adds
    6 deletes in trunk/LayoutTests

Resync IDL interfaces from upstream web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=227485

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Resync IDL interfaces from upstream web-platform-tests a38612f39e7752c353208.

  • web-platform-tests/content-security-policy/securitypolicyviolation/idlharness.window-expected.txt:
  • web-platform-tests/css/css-images/idlharness.html:
  • web-platform-tests/css/cssom/idlharness-expected.txt:
  • web-platform-tests/css/cssom/idlharness.html:
  • web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any-expected.txt: Removed.
  • web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.html: Removed.
  • web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.js: Removed.
  • web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt: Removed.
  • web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.worker.html: Removed.
  • web-platform-tests/fetch/cors-rfc1918/w3c-import.log: Removed.
  • web-platform-tests/geolocation-API/idlharness.https.window-expected.txt:
  • web-platform-tests/html/dom/idlharness.worker-expected.txt:
  • web-platform-tests/mediacapture-streams/idlharness.https.window-expected.txt:
  • web-platform-tests/mediacapture-streams/idlharness.https.window.js:

(async idl_array):

  • web-platform-tests/payment-request/idlharness.https.window-expected.txt:
  • web-platform-tests/pointerevents/idlharness.window-expected.txt:
  • web-platform-tests/uievents/idlharness.window-expected.txt:
  • web-platform-tests/wasm/jsapi/idlharness.any-expected.txt:
  • web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt:

Update / rebaseline a few tests due to IDL interface changes.

  • web-platform-tests/interfaces/*: Updated.

LayoutTests:

Rebaseline a few tests.

  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
2:01 PM Changeset in webkit [279384] by Chris Dumez
  • 2 edits
    2 adds in trunk/LayoutTests/imported/w3c

Resync intersection-observer WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227500

Reviewed by Sam Weinig.

Resync intersection-observer WPT tests from upstream a38612f39e7752c353208.

  • web-platform-tests/intersection-observer/target-is-root-expected.txt: Added.
  • web-platform-tests/intersection-observer/target-is-root.html: Added.
  • web-platform-tests/intersection-observer/w3c-import.log:
1:36 PM Changeset in webkit [279383] by Darin Adler
  • 4 edits in trunk

CSS style sheets loaded by HTMLLinkElement do not fall back correctly when charset is an invalid encoding name
https://bugs.webkit.org/show_bug.cgi?id=227498

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus-expected.txt:

Expect a pass instead of a fail.

Source/WebCore:

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process): Check for invalid text encoding names rather than
just empty string.

1:21 PM Changeset in webkit [279382] by commit-queue@webkit.org
  • 4 edits
    3 deletes in trunk

Unreviewed, reverting r279250.
https://bugs.webkit.org/show_bug.cgi?id=227499

Sometimes causes YouTube audio to cut out

Reverted changeset:

"[Cocoa] Last few seconds of 'audio/webm; codecs=vorbis'
appended to a SampleBuffer are not played"
https://bugs.webkit.org/show_bug.cgi?id=226069
https://commits.webkit.org/r279250

12:27 PM Changeset in webkit [279381] by Jonathan Bedard
  • 3 edits
    2 adds in trunk/Tools

[webkitcorepy] Add NestedFuzzyDict
https://bugs.webkit.org/show_bug.cgi?id=227150
<rdar://problem/79475464>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py: Added.

(NestedFuzzyDict):
(NestedFuzzyDict.assert_valid_key): Ensure that the provided key is fuzz-able.
(NestedFuzzyDict.init): Construct the object the same way a dictionary is constructed.
(NestedFuzzyDict.getitem): Split provided keyname and fuzzy match the second part.
(NestedFuzzyDict.get): Ditto.
(NestedFuzzyDict.getitem): Return the complete keyname and value.
(NestedFuzzyDict.setitem): Add value to dictionary.
(NestedFuzzyDict.update): Given a dictionary, insert it's contents into this object.
(NestedFuzzyDict.keys): Iterate through all keys in the object.
(NestedFuzzyDict.values): Iterate through all values in the object.
(NestedFuzzyDict.items): Iterate through all key/value pairs in the object.
(NestedFuzzyDict.dict): Return a standard dictionary with the contents of this object.
(NestedFuzzyDict.repr):
(NestedFuzzyDict.str):

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/nested_fuzzy_dict_unittest.py: Added.

(TestNestedFuzzyDict):
(TestNestedFuzzyDict.test_constructor):
(TestNestedFuzzyDict.test_index):
(TestNestedFuzzyDict.test_get):
(TestNestedFuzzyDict.test_getitem):
(TestNestedFuzzyDict.test_set):
(TestNestedFuzzyDict.test_dict):

12:07 PM Changeset in webkit [279380] by commit-queue@webkit.org
  • 9 edits
    1 move in trunk

xhr.send(URLSearchParams) should align default Content-Type header field with Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=227477

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

LayoutTests/imported/w3c:

  • web-platform-tests/xhr/setrequestheader-content-type-expected.txt:

Source/WebCore:

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):

  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequest.idl:

LayoutTests:

  • platform/ios-wk2/TestExpectations:
  • platform/ios/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt: Added.
  • platform/mac/TestExpectations:
11:55 AM Changeset in webkit [279379] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix more -Wreturn-type warnings
https://bugs.webkit.org/show_bug.cgi?id=227497

Unreviewed. This is getting stupid.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-29

  • page/EventHandler.cpp:

(WebCore::EventHandler::scrollDistance):
(WebCore::EventHandler::handleKeyboardScrolling):

  • page/KeyboardScroll.cpp:

(WebCore::unitVectorForScrollDirection):

11:41 AM Changeset in webkit [279378] by commit-queue@webkit.org
  • 9 edits in trunk/Source/JavaScriptCore

Add a new pattern to instruction selector to use SBX and SBFIZ supported by ARM64
https://bugs.webkit.org/show_bug.cgi?id=227203

Patch by Yijia Huang <Yijia Huang> on 2021-06-29
Reviewed by Filip Pizlo.

This patch includes two modifications:

  1. Introduce a strength reduction rule for sign extending bitfield.
  2. Add Signed Bitfield Extract (SBFX) and Signed Bitfield Insert in Zero (SBFIZ) to Air opcode to serve instruction selector.

### Part A Sign extending from a variable bit-width ###


According to Bit Twiddling Hacks, there are two ways to sign extend bitfield.
(https://graphics.stanford.edu/~seander/bithacks.html#VariableSignExtend)

int bf; sign extend this width-bit number to bfsx
int width;
number of bits representing the number in bf
int bfsx; resulting sign-extended number

Approach 1
mask1 = (1 << width) - 1
mask2 = 1 << (width - 1)
bf = bf & mask1 zero bits in bf above position width
bfsx = (bf mask2) - mask2

Approach 2
amount = CHAR_BIT * sizeof(bf) - width
bfsx = (bf << amount) >> amount

Then, a new strength reduction rule is introduced:

Turn this: ((bf & mask1) mask2) - mask2
Into this: (bf << amount) >> amount


### Part B SBFX ###


Given instruction:
sbfx Rd, Rn, lsb, width

Signed Bitfield Extract (SBFX) extracts width number of adjacent bits at lsb position
from a register Rn, sign-extends them to the size of the register, and writes the
result to the destination register Rd.

The equivalent patterns of this instruction are:

Pattern 1:

bf = src >> lsb
dst = ((bf & mask1) mask2) - mask2
mask1 = (1 << width) - 1
mask2 = 1 << (width - 1) (mask2 << 1) - 1 = mask1

Pattern 2:

bf = src >> lsb
amount = CHAR_BIT * sizeof(bf) - width
dst = (bf << amount) >> amount

Then, (bf << amount) >> amount is selected as the canonical form with the strength reduction
rule introduced above.

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = lsb
Int @2 = amount
Int @3 = ZShr(@0, @1)
Int @4 = Shl(@3, @2)
Int @5 = SShr(@4, @2)
Void@6 = Return(@5, Terminal)

Before Adding BIC:
Old optimized AIR
Urshift %x0, lsb, %x0, @3
Lshift %x0, amount, %x0, @4
Rshift %x0, amount, %x0, @5
Ret %x0, @6

After Adding BIC:
New optimized AIR
ExtractSignedBitfield %x0, lsb, width, %x0, @5
Ret %x0, @6


### Part B SBFIZ ###


Given instruction:
sbfiz Rd, Rn, lsb, width

Signed Bitfield Insert in Zero (SBFIZ) zeroes the destination register Rd and copies
width number of contiguous bits from a source register Rn into lsb position in the
destination register, sign-extending the most significant bit of the transferred value.

The equivalent patterns of this instruction are:

Pattern 1:

bfsx = ((src & mask1) mask2) - mask2
dst = bfsx << lsb
mask1 = (1 << width) - 1
mask2 = 1 << (width - 1) (mask2 << 1) - 1 = mask1

Pattern 2:

amount = CHAR_BIT * sizeof(bf) - width
bfsx = (src << amount) >> amount
dst = bfsx << lsb

Then, ((src << amount) >> amount) << lsb is selected as the canonical form with the
strength reduction rule introduced above.

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = lsb
Int @2 = amount
Int @3 = Shl(@0, @2)
Int @4 = SShr(@3, @2)
Int @5 = Shl(@4, @1)
Void@6 = Return(@5, Terminal)

Before Adding BIC:
Old optimized AIR
Lshift %x0, amount, %x0, @3
Rshift %x0, amount, %x0, @4
Lshift %x0, lsb, %x0, @5
Ret %x0, @6

After Adding BIC:
New optimized AIR
InsertSignedBitfieldInZero %x0, lsb, width, %x0, @5
Ret %x0, @6

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::insertSignedBitfieldInZero32):
(JSC::MacroAssemblerARM64::insertSignedBitfieldInZero64):
(JSC::MacroAssemblerARM64::extractSignedBitfield32):
(JSC::MacroAssemblerARM64::extractSignedBitfield64):

  • assembler/testmasm.cpp:

(JSC::testInsertSignedBitfieldInZero32):
(JSC::testInsertSignedBitfieldInZero64):
(JSC::testExtractSignedBitfield32):
(JSC::testExtractSignedBitfield64):

  • b3/B3LowerToAir.cpp:
  • b3/B3ReduceStrength.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_2.cpp:

(addBitTests):

  • b3/testb3_3.cpp:

(testInsertSignedBitfieldInZero32):
(testInsertSignedBitfieldInZero64):
(testExtractSignedBitfield32):
(testExtractSignedBitfield64):

11:07 AM Changeset in webkit [279377] by Jonathan Bedard
  • 3 edits
    2 copies in trunk/Tools

[webkitcorepy] Add MeasureTime python tool
https://bugs.webkit.org/show_bug.cgi?id=227313
<rdar://problem/79689588>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Export MeasureTime object.
  • Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py: Added.

(MeasureTime): Provide class which logs time elapsed in context.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/measure_time_unittest.py: Added.

(MeasureTimeTests):

11:00 AM Changeset in webkit [279376] by Alan Coon
  • 13 edits
    2 adds in branches/safari-612.1.21-branch

Cherry-pick r279361. rdar://problem/79923766

REGRESSION (r279310): Occasional crash when focusing login fields on iPad with a software keyboard
https://bugs.webkit.org/show_bug.cgi?id=227472
rdar://79876040

Reviewed by Tim Horton.

Source/WebKit:

I added a mechanism in r279310 to defer calling -[WKContentView _setSuppressSoftwareKeyboard:NO] until we've
gotten a response from the web process containing an up-to-date autocorrection context. However, in the case
where the WKWebView client sets _suppressSoftwareKeyboard to YES and then immediately to NO underneath the
scope of a call to -_webView:willStartInputSession:, we'll end up calling into -_setSuppressSoftwareKeyboard:
inside the scope of -requestAutocorrectionContextWithCompletionHandler:, when we've received an
autocorrection context while sync-waiting. This is problematic because it breaks UIKeyboardTaskQueue's state,
since the call to -_setSuppressSoftwareKeyboard: will attempt to enqueue a new task after the previous task's
context has already returned execution to the parent.

To fix this, we instead invoke self._suppressSoftwareKeyboard = NO; *before* calling the completion block in
-_handleAutocorrectionContext:. This allows the request for an autocorrection context underneath
-_setSuppressSoftwareKeyboard: to be handled (and completed) as a child task of the previous task, which keeps
UIKeyboardTaskQueue in a valid state.

Test: fast/forms/ios/suppress-software-keyboard-while-focusing-input.html

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

Tools:

Make it possible to induce the crash (prior to the fix) by introducing two new testing primitives on iOS:

  • UIScriptController.suppressSoftwareKeyboard, a readwrite attribute that can be used to suppress the

appearance of the software keyboard on iOS by calling -[WKWebView _setSuppressSoftwareKeyboard:].

  • UIScriptController.willStartInputSessionCallback, a callback that is invoked when we're about to start a

UI-process-side input session. On iOS, this corresponds to
-[_WKInputDelegate _webView:willStartInputSession:].

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptContext.h:
  • TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::suppressSoftwareKeyboard const): (WTR::UIScriptController::setSuppressSoftwareKeyboard):
  • TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::UIScriptController::setWillStartInputSessionCallback): (WTR::UIScriptController::willStartInputSessionCallback const):
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView initWithFrame:configuration:]): (-[TestRunnerWKWebView resetInteractionCallbacks]): (-[TestRunnerWKWebView _webView:willStartInputSession:]):
  • WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues):

Make sure that we revert _suppressSoftwareKeyboard to NO, in case a layout test ends while leaving this on,
to prevent subsequent layout tests from behaving in unexpected ways.

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setWillStartInputSessionCallback): (WTR::UIScriptControllerIOS::suppressSoftwareKeyboard const): (WTR::UIScriptControllerIOS::setSuppressSoftwareKeyboard):

LayoutTests:

Add a new layout test to exercise the crash. See Tools and Source/WebKit ChangeLogs for more information.
This new test suppresses and then immediately un-suppresses the software keyboard inside the
-_webView:willStartInputSession: input delegate hook while focusing a regular text field.

  • fast/forms/ios/suppress-software-keyboard-while-focusing-input-expected.txt: Added.
  • fast/forms/ios/suppress-software-keyboard-while-focusing-input.html: Added.

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

10:11 AM Changeset in webkit [279375] by jer.noble@apple.com
  • 12 edits
    3 adds in trunk

Loading WebM hangs if server sends only small amount of data
https://bugs.webkit.org/show_bug.cgi?id=226217
<rdar://problem/78709010>

Source/WebCore/PAL:

Reviewed by Eric Carlson.

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
  • pal/spi/cf/CoreMediaSPI.h:

Source/WebKit:

Reviewed by Eric Carlson.

Test: http/tests/media/video-webm-stall.html

Adopt FigThread{Un,}RegisterAbortAction() when blocking against track parsing.

CoreMedia will attempt to abort reads during AVPlayer teardown, but because the parsing
thread is blocked on a Condition variable in WebKit code, the abort request has no effect.
Adopt methods from CoreMedia to run code during an abort request, and wrap these calls in a
stack-based object. The new AbortAction object takes a Condition variable to notify during
an abort, and its aborted() state can be queried by the Condition's predicate.

Drive-by Fix: enable running an unsigned MTFormatReaderPlugin in the GPU process for
engineering builds.

  • Configurations/BaseTarget.xcconfig:
  • GPUProcess/mac/GPUProcessMac.mm:

(WebKit::GPUProcess::initializeProcess):

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::AbortAction::AbortAction):
(WebKit::AbortAction::~AbortAction):
(WebKit::AbortAction::aborted const):
(WebKit::AbortAction::action):
(WebKit::MediaFormatReader::copyProperty):
(WebKit::MediaFormatReader::copyTrackArray):

LayoutTests:

Reviewed by NOBODY Eric Carlson.

  • http/tests/media/resources/.htaccess: Added.
  • http/tests/media/video-webm-stall-expected.txt: Added.
  • http/tests/media/video-webm-stall.html: Added.
8:19 AM Changeset in webkit [279374] by yoshiaki.jitsukawa@sony.com
  • 5 edits in trunk/LayoutTests

P-384 EC public JWK key in layout tests is wrong
https://bugs.webkit.org/show_bug.cgi?id=227432

Reviewed by Chris Dumez.

Fix the y value of the JWK keys. The y value was derived from the x value with openssl,
using EC_POINT_set_compressed_coordinates_GFp() and EC_POINT_get_affine_coordinates_GFp(),
and was verified with EC_KEY_check_key().

  • crypto/subtle/ec-import-key-malformed-parameters.html:
  • crypto/subtle/ecdh-import-jwk-public-key-p384.html:
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html:
  • crypto/workers/subtle/resources/ec-import-jwk-key-public.js:
6:53 AM Changeset in webkit [279373] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/ANGLE

ANGLE Metal primitive restart range computation could index with size_t
https://bugs.webkit.org/show_bug.cgi?id=227449

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-29
Reviewed by Kenneth Russell.

Make the calculateRestartRanges() a bit simpler in order
for it to be easier to understand.

  • src/libANGLE/renderer/metal/BufferMtl.h:

(rx::IndexRange::IndexRange):
Add documentation what the mtl::IndexRange is.
Add constructor so that std::vector::emplace_back() works.

  • src/libANGLE/renderer/metal/BufferMtl.mm:

(rx::calculateRestartRanges):
Index with size_t to make it simpler to understand if the index
overflows or not.
Use reinterpret_cast in order to not accidentally cast away
const from mtl::BufferRef::mapReadOnly().
Skip the non-marker elements with continue to avoid deep nesting.
Give a name to the restart range marker value.
Remove intermediate variable value = bufferData[i] as it is never
used more than once. This simplifies the code as the do-while loop
does not need to check the if condition as the loop ending condition
already checks.
Make the array a returned result instead of out variable.

(rx::BufferMtl::getRestartIndices):

6:52 AM Changeset in webkit [279372] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

ANGLE Metal primitive restart range computation should not be done unless primitive restart is enabled
https://bugs.webkit.org/show_bug.cgi?id=227452

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-29
Reviewed by Kenneth Russell.

Primitive restart needs to scan the whole index buffer for values.
This should not be done unless needed.

  • src/libANGLE/renderer/metal/VertexArrayMtl.mm:

(rx::VertexArrayMtl::getDrawIndices):
First check for primitive restart enabledness.
Compute the primitive restart values after this.
The algoritm should succeed when the count of primitive
restart ranges is zero, and it does not do much of work.
Use the restart range vector as reference, so that no copy
would be done.
Add spaces the if statements, comments and references.
Move the else arm of the if statement with return statement
to body of the function to reduce nesting.

5:06 AM Changeset in webkit [279371] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in HTMLStackItem::create via DocumentFragment::parseHTML
https://bugs.webkit.org/show_bug.cgi?id=227390

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-29
Reviewed by Ryosuke Niwa.

Source/WebCore:

DOM manipulation can mean document.body() can return null, causing the
crash/ASSERT in DocumentFragment::parseHTML in the test case. Since the
only use of it was to force InBody insertion mode, instead use a fake body element.

Test: editing/pasteboard/paste-create-fragment-crash.html

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::createFragment):

LayoutTests:

Add test for this.

  • editing/pasteboard/paste-create-fragment-crash-expected.txt: Added.
  • editing/pasteboard/paste-create-fragment-crash.html: Added.
2:38 AM Changeset in webkit [279370] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash in SharedBuffer::data
https://bugs.webkit.org/show_bug.cgi?id=227173

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-29
Reviewed by Ryosuke Niwa.

Source/WebCore:

Null check data in openFunc.

Test: fast/xsl/xslt-transformToDocument-crash.html

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::openFunc):

LayoutTests:

  • fast/xsl/xslt-transformToDocument-crash-expected.txt: Added.
  • fast/xsl/xslt-transformToDocument-crash.html: Added.
2:12 AM Changeset in webkit [279369] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Check GApplication has a valid ID before trying to create the flatpack info
https://bugs.webkit.org/show_bug.cgi?id=227344

Reviewed by Michael Catanzaro.

Show a warning if GApplication is used but app ID is nullptr.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::createFlatpakInfo):

1:11 AM Changeset in webkit [279368] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

OES_texture_float should implicitly enable EXT_float_blend
https://bugs.webkit.org/show_bug.cgi?id=227456
<rdar://79804439>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-29
Reviewed by Kenneth Russell.

Tested by webgl/1.0.x/conformance/extensions/oes-texture-float.html

  • html/canvas/OESTextureFloat.cpp:

(WebCore::OESTextureFloat::OESTextureFloat):
Request EXT_float_blend when user requests OES_texture_float.
WEBGL_color_buffer_float and EXT_color_buffer_float already have
the code.

12:59 AM Changeset in webkit [279367] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Bubblewrap: allow to set DBus proxy logging per proxy
https://bugs.webkit.org/show_bug.cgi?id=227447

Reviewed by Michael Catanzaro.

It's currently global using env var WEBKIT_ENABLE_DBUS_PROXY_LOGGING. Add WEBKIT_ENABLE_A11Y_DBUS_PROXY_LOGGING
to enable logging only on a11y bus.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::XDGDBusProxyLauncher::launch):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):

12:25 AM Changeset in webkit [279366] by youenn@apple.com
  • 15 edits
    9 deletes in trunk/Source

Remove RemoteAudioMediaStreamTrackRenderer and RemoteAudioMediaStreamTrackRendererManager
https://bugs.webkit.org/show_bug.cgi?id=227438

Reviewed by Eric Carlson.

Source/WebCore:

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp:

(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::start):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::stop):
Add some logging.

Source/WebKit:

Remove code no longer enabled.
This code was obsoleted by RemoteAudioMediaStreamTrackRendererInternalUnitManager and friends.
Update GPUProcess to not exit if RemoteAudioMediaStreamTrackRendererInternalUnitManager has some units,
like was done by RemoteAudioMediaStreamTrackRendererManager.

  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::~GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::allowsExitUnderMemoryPressure const):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::audioMediaStreamTrackRendererQueue): Deleted.

  • GPUProcess/GPUProcess.h:
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: Removed.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.h: Removed.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.messages.in: Removed.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:

(WebKit::renderCallback):
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::Unit):
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::start):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.h:

(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::hasUnits):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp: Removed.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h: Removed.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.messages.in: Removed.
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp: Removed.
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h: Removed.
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererIdentifier.h: Removed.
12:19 AM Changeset in webkit [279365] by Antti Koivisto
  • 9 edits
    1 add in trunk/Source

Enable Probabilistic Guard Malloc for RuleData and RuleFeature vectors
https://bugs.webkit.org/show_bug.cgi?id=227446

Reviewed by Geoffrey Garen.

Source/WebCore:

Help for catching a crash.

  • style/RuleFeature.cpp:

(WebCore::Style::RuleFeatureSet::collectFeatures):
(WebCore::Style::RuleFeatureSet::add):

  • style/RuleFeature.h:
  • style/RuleSet.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::makeRuleSet):
(WebCore::Style::ensureInvalidationRuleSets):

Source/WTF:

Add SystemMalloc type that can be used with containers like Vector and
ProbabilisticGuardMalloc alias for it on Mac/iOS platforms.

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

(WTF::SystemMalloc::malloc):
(WTF::SystemMalloc::tryMalloc):
(WTF::SystemMalloc::zeroedMalloc):
(WTF::SystemMalloc::tryZeroedMalloc):
(WTF::SystemMalloc::realloc):
(WTF::SystemMalloc::tryRealloc):
(WTF::SystemMalloc::free):

  • wtf/Vector.h:

(WTF::Malloc>::appendVector):

Include all template parameters for the appendVector argument.

12:14 AM Changeset in webkit [279364] by commit-queue@webkit.org
  • 8 edits in trunk

CSS scroll snap should allow scrolling to the middle of snap areas that overflow the snapport
https://bugs.webkit.org/show_bug.cgi?id=223021
<rdar://problem/75518606>

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-06-29
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scroll-snap/overflowing-snap-areas-expected.txt: Update test

expectations to reflect newly passing tests.

Source/WebCore:

No new tests. This is covered by existing tests and, in particular, a WPT test:

  • web-platform-tests/css/css-scroll-snap/overflowing-snap-areas.html
  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::searchForPotentialSnapPoints): Record when the target snap offset happens to
fall in the interior of a snap area that overflows the snap port.
(WebCore::closestSnapOffsetWithInfoAndAxis): When this happens and we are in a spec-compliant
sitaution, just snap to the original target offset.

LayoutTests:

Update some existing tests that were relying on non-spec compliant behavior. These tests
used snap areas that were larger than the snapport and didn't expect that the parent
scroller could scroll into them.

  • css3/scroll-snap/scroll-snap-click-scrollbar-gutter.html: This test used snap areas that

overflow the snapport, thus meant that it relied on non-spec compliant behavior. Rework it so
that the snap areas do not overflow, maintaining the existing behavior.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html: Ditto.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow.html: Ditto.
Note: See TracTimeline for information about the timeline view.