Timeline



Jun 22, 2019:

10:05 PM Changeset in webkit [246718] by Alan Bujtas
  • 2 edits in trunk/Tools

[LFC] Expand tests coverage (328 new tests -> 2652).

  • LayoutReloaded/misc/LFC-passing-tests.txt:
2:09 PM Changeset in webkit [246717] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style.
https://bugs.webkit.org/show_bug.cgi?id=199127
<rdar://problem/52017744>

Reviewed by Antti Koivisto.

<span style="vertical-align: bottom">bottom aligned text</span>
The InlineBox wrapper for the "bottom aligned text" content should take the parent span's style.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createSubTree):

1:09 PM Changeset in webkit [246716] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
https://bugs.webkit.org/show_bug.cgi?id=198999
<rdar://problem/52005663>

Reviewed by Dean Jackson.

We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::processPendingPointerCapture):

11:59 AM Changeset in webkit [246715] by commit-queue@webkit.org
  • 7 edits
    1 copy
    3 adds in trunk

Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link.
https://bugs.webkit.org/show_bug.cgi?id=199107
<rdar://problem/43663611>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-06-22
Reviewed by Chris Fleizach.

Source/WebCore:

Tests: accessibility/ios-simulator/button-with-aria-haspopup-role.html

accessibility/ios-simulator/element-haspopup.html

If an accessibility object is contained within an <a>, we should check
the aria-haspopup attribute on the ancestor <a> element. This was done
before in the iOS WebKit accessibility bunddle override.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::hasPopup const):

Tools:

iOS implementation for AccessibilityUIElement::hasPopup.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::hasPopup const):

LayoutTests:

  • accessibility/element-haspopup-expected.txt:
  • accessibility/element-haspopup.html: Added cases for a <p> element contained within <a>.
  • accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt: Added.
  • accessibility/ios-simulator/button-with-aria-haspopup-role.html: Added. Existed for MacOS and now also for iOS.
  • accessibility/ios-simulator/element-haspopup-expected.txt: Copied from LayoutTests/accessibility/element-haspopup-expected.txt.
  • accessibility/ios-simulator/element-haspopup.html: Added.
11:46 AM Changeset in webkit [246714] by ysuzuki@apple.com
  • 103 edits
    1 add in trunk

All prototypes should call didBecomePrototype()
https://bugs.webkit.org/show_bug.cgi?id=196315

Reviewed by Saam Barati.

JSTests:

  • stress/function-prototype-indexed-accessor.js: Added.

Source/JavaScriptCore:

Otherwise we won't remember to run haveABadTime() when someone adds to them an indexed accessor.

I added a check used in both Structure::finishCreation() and Structure::changePrototypeTransition to make sure we don't
create structures with invalid prototypes.
It found a lot of objects that are used as prototypes in JSGlobalObject and yet were missing didBecomePrototype() in their finishCreation().
Somewhat surprisingly, some of them have names like FunctionConstructor and not only FooPrototype.

  • runtime/BigIntPrototype.cpp:

(JSC::BigIntPrototype::finishCreation):

  • runtime/BooleanPrototype.cpp:

(JSC::BooleanPrototype::finishCreation):

  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::finishCreation):

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::finishCreation):

  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototype::finishCreation):

  • runtime/FunctionConstructor.cpp:

(JSC::FunctionConstructor::finishCreation):

  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::finishCreation):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototype::finishCreation):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):

  • runtime/IntlPluralRulesPrototype.cpp:

(JSC::IntlPluralRulesPrototype::finishCreation):

  • runtime/JSArrayBufferPrototype.cpp:

(JSC::JSArrayBufferPrototype::finishCreation):

  • runtime/JSDataViewPrototype.cpp:

(JSC::JSDataViewPrototype::finishCreation):

  • runtime/JSGenericTypedArrayViewPrototypeInlines.h:

(JSC::JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation):

  • runtime/JSGlobalObject.cpp:

(JSC::createConsoleProperty):

  • runtime/JSPromisePrototype.cpp:

(JSC::JSPromisePrototype::finishCreation):

  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::JSTypedArrayViewConstructor::finishCreation):

  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSTypedArrayViewPrototype::finishCreation):

  • runtime/NumberPrototype.cpp:

(JSC::NumberPrototype::finishCreation):

  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::finishCreation):

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):

  • runtime/Structure.cpp:

(JSC::Structure::isValidPrototype):
(JSC::Structure::changePrototypeTransition):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::setPrototypeWithoutTransition):

  • runtime/SymbolPrototype.cpp:

(JSC::SymbolPrototype::finishCreation):

  • wasm/js/WebAssemblyCompileErrorPrototype.cpp:

(JSC::WebAssemblyCompileErrorPrototype::finishCreation):

  • wasm/js/WebAssemblyInstancePrototype.cpp:

(JSC::WebAssemblyInstancePrototype::finishCreation):

  • wasm/js/WebAssemblyLinkErrorPrototype.cpp:

(JSC::WebAssemblyLinkErrorPrototype::finishCreation):

  • wasm/js/WebAssemblyMemoryPrototype.cpp:

(JSC::WebAssemblyMemoryPrototype::finishCreation):

  • wasm/js/WebAssemblyModulePrototype.cpp:

(JSC::WebAssemblyModulePrototype::finishCreation):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::WebAssemblyPrototype::finishCreation):

  • wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:

(JSC::WebAssemblyRuntimeErrorPrototype::finishCreation):

  • wasm/js/WebAssemblyTablePrototype.cpp:

(JSC::WebAssemblyTablePrototype::finishCreation):

Source/WebCore:

  • bindings/js/JSDOMIterator.h:

(WebCore::IteratorTraits>::finishCreation):

  • bindings/js/JSDOMWindowProperties.h:

(WebCore::JSDOMWindowProperties::create): Deleted.
(WebCore::JSDOMWindowProperties::createStructure): Deleted.
(WebCore::JSDOMWindowProperties::JSDOMWindowProperties): Deleted.

  • bindings/js/JSWindowProxy.cpp:

(WebCore::JSWindowProxy::setWindow):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePrototypeDeclaration):
(GenerateConstructorHelperMethods):

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

(WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):

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

(WebCore::JSMapLikePrototype::JSMapLikePrototype):

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

(WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype):

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

(WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):

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

(WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype):

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

(WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype):

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

(WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype):

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

(WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):

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

(WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype):
(WebCore::JSTestDOMJITConstructor::prototypeForStructure):

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

(WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype):

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

(WebCore::JSTestEnabledForContextPrototype::JSTestEnabledForContextPrototype):

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

(WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
(WebCore::JSTestEventConstructorConstructor::prototypeForStructure):

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

(WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
(WebCore::JSTestEventTargetConstructor::prototypeForStructure):

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

(WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):

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

(WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):

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

(WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):

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

(WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype):

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

(WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype):

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

(WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype):

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

(WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):

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

(WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype):

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

(WebCore::JSTestIterablePrototype::JSTestIterablePrototype):

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

(WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):

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

(WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):

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

(WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype):

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

(WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype):

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

(WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype):

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

(WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):

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

(WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype):

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

(WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype):

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

(WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype):

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

(WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype):

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

(WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype):

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

(WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype):

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

(WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype):

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

(WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype):

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

(WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype):

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

(WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype):

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

(WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype):

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

(WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype):

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

(WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype):

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

(WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype):

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

(WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype):

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

(WebCore::JSTestNodePrototype::JSTestNodePrototype):
(WebCore::JSTestNodeConstructor::prototypeForStructure):

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

(WebCore::JSTestObjPrototype::JSTestObjPrototype):

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

(WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):

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

(WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype):

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

(WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):

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

(WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype):

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

(WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype):
(WebCore::JSTestPromiseRejectionEventConstructor::prototypeForStructure):

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

(WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype):

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

(WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype):
(WebCore::JSTestSerializationIndirectInheritanceConstructor::prototypeForStructure):

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

(WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype):
(WebCore::JSTestSerializationInheritConstructor::prototypeForStructure):

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

(WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype):
(WebCore::JSTestSerializationInheritFinalConstructor::prototypeForStructure):

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

(WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):

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

(WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype):

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

(WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype):

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

(WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype):

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

(WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype):

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

(WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype):

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

(WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype):

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

(WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype):

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

(WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):

11:28 AM Changeset in webkit [246713] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r241980): Web Inspector: Styles: Pressing Tab/Enter on last property no longer focuses on selector on next rule
https://bugs.webkit.org/show_bug.cgi?id=199125
<rdar://problem/52011182>

Reviewed by Matt Baker.

Since SpreadsheetSelectorField's focus handler was removed in r241980, focusing on the selector element
doesn't start editing it.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):

11:05 AM Changeset in webkit [246712] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
https://bugs.webkit.org/show_bug.cgi?id=199090
<rdar://problem/51965431>

Reviewed by Matt Baker.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
Unbalanced quotes and parenthesis are fixed inside of CSSProperty's rawValue setter.
Render the value from the model, not the view.

9:14 AM Changeset in webkit [246711] by Konstantin Tokarev
  • 2 edits in trunk/Tools

Unreviewed, add myself to CMake watchlist

  • Scripts/webkitpy/common/config/watchlist:
8:51 AM Changeset in webkit [246710] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

webkitgtk 2.24.2 fails to build w/gstreamer 1.12.5
https://bugs.webkit.org/show_bug.cgi?id=198080

Patch by Mike Gorse <mgorse@suse.com> on 2019-06-22
Reviewed by Philippe Normand.

No new tests (build fix only).

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

Move includes of gst/gl/gl.h and epoxy/gl.h into
MediaPlayerPrivateGStreamerBase.h.

12:48 AM Changeset in webkit [246709] by ysuzuki@apple.com
  • 9 edits
    2 adds in trunk

[JSC] Strict, Sloppy and Arrow functions should have different classInfo
https://bugs.webkit.org/show_bug.cgi?id=197631

Reviewed by Saam Barati.

JSTests:

  • stress/has-own-property-arguments.js: Added.

(shouldBe):
(A):

Source/JavaScriptCore:

If a constructor inherits a builtin class, it creates a Structure which is subclassing the builtin class.
This is done by using InternalFunction::createSubclassStructure. But to accelerate the common cases, we
cache the created structure in InternalFunctionAllocationProfile. Whether the cache is valid is checked
by comparing classInfo of the cached structure and the given base structure. This implicitly assume that
each builtin class's InternalFunction creates an instance based on one structure.

However, Function constructor is an exception: Function constructor creates an instance which has different
structures based on a parameter. If a strict code is given (e.g. "'use strict'"), it creates a function
instance with strict function structure.

As a result, InternalFunctionAllocationProfile incorrectly caches the structure. Consider the following code.

class A extends Function { };
let a = new A("'use strict'");
let b = new A("");

While a and b should have different structures, A caches the structure for a, and reuse it even the given
code is not a strict code. This is problematic: We are separating structures of strict, sloppy, and arrow functions
because they have different properties. However, in the above case, a and b have the same structure while they have
different properties. So it causes incorrect structure-based caching in JSC. One of the example is HasOwnPropertyCache.

In this patch, we introduce JSStrictFunction, JSSloppyFunction, and JSArrowFunction classes and classInfos. This design
works well and already partially accepted for JSGeneratorFunction, JSAsyncGeneratorFunction, and JSAsyncFunction. Each
structure now has a different classInfo so that InternalFunctionAllocationProfile correctly caches and invalidates the
cached one based on the classInfo. Since we already have different structures for these instances, and DFG and FTL
optimizations are based on JSFunctionType (not classInfo), introducing these three classInfo do not break the optimization.

Note that structures on ArrayConstructor does not cause the same problem. It only uses Undecided indexing typed array
structure in InternalFunctionAllocationProfile, and once haveABadTime happens, it clears InternalFunctionAllocationProfile.

  • runtime/JSAsyncFunction.h: This subspaceFor is not necessary since it is defined in JSFunction. And we already ensure that

sizeof(JSAsyncFunction) == sizeof(JSFunction).

  • runtime/JSAsyncGeneratorFunction.cpp:
  • runtime/JSAsyncGeneratorFunction.h: Ditto.
  • runtime/JSFunction.cpp:
  • runtime/JSFunction.h:
  • runtime/JSGeneratorFunction.h: Ditto.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

12:16 AM Changeset in webkit [246708] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] ClassExpr should not store result in the middle of evaluation
https://bugs.webkit.org/show_bug.cgi?id=199106

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/class-expression-should-store-result-at-last.js: Added.

(shouldThrow):
(shouldThrow.let.a):

Source/JavaScriptCore:

Let's consider the case,

let a = class A {

static get[a=0x12345678]() {
}

};

When evaluating class A expression, we should not use the local register for let a
until we finally store it to that register. Otherwise, a=0x12345678 will override it.
Out BytecodeGenerator does that this by using tempDestination and finalDestination, but
we did not do that in ClassExprNode.

This patch leverages tempDestination and finalDestination to store class A result finally,
while we attempt to reduce mov.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ClassExprNode::emitBytecode):

Jun 21, 2019:

10:50 PM Changeset in webkit [246707] by sihui_liu@apple.com
  • 11 edits
    2 adds in trunk

openDatabase should return an empty object when WebSQL is disabled
https://bugs.webkit.org/show_bug.cgi?id=198805

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/JSFunction.cpp:

(JSC::JSFunction::createFunctionThatMasqueradesAsUndefined):

  • runtime/JSFunction.h:

Source/WebCore:

Some websites rely on calling openDatabase with null parameters to check for private browsing. To not break
those sites, we now expose openDatabase interface even if Web SQL is disabled. When Web SQL is disabled,
window.openDatabase returns false, but it is callable and returns empty object.

Test: WebSQL.OpenDatabaseAlwaysExists

  • Modules/webdatabase/DOMWindowWebDatabase.idl:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody):
(WebCore::IDLOperation<JSDOMWindow>::cast):
(WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
(WebCore::JSDOMWindow::openDatabase const):

Tools:

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

(-[WebSQLBasicsMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/opendatabase-always-exists.html: Added.

LayoutTests:

Modify test expectation as openDatabase is not a function but an attribute of window now.

  • js/dom/global-function-resolve-expected.txt:
  • js/dom/script-tests/global-function-resolve.js:
9:04 PM Changeset in webkit [246706] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Nullptr crash in DeleteSelectionCommand::handleGeneralDelete
https://bugs.webkit.org/show_bug.cgi?id=199126

Reviewed by Wenson Hsieh.

Added null checks to handleGeneralDelete as well as mergeParagraphs which runs after handleGeneralDelete to be defensive.

Unfortunately no new tests since there is no reproducible test case.

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::mergeParagraphs):

5:28 PM Changeset in webkit [246705] by Alan Coon
  • 1 copy in tags/Safari-608.1.31

Tag Safari-608.1.31.

5:26 PM Changeset in webkit [246704] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, a build fix after r246701

  • Shared/LoadParameters.h:

Add a default value for shouldOpenExternalURLsPolicy.

5:11 PM Changeset in webkit [246703] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

ResourceLoadNotifier should check whether its frame document loader is null
https://bugs.webkit.org/show_bug.cgi?id=199118

Reviewed by Geoffrey Garen.

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

3:52 PM Changeset in webkit [246702] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit

Adjust sandboxes based on seed feedback
https://bugs.webkit.org/show_bug.cgi?id=199119
<rdar://problem/50164879>

Reviewed by Geoffrey Garen.

Update our sandboxes to address test failures and bugs encountered during initial iOS 13 and
macOS Catalina testing.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
3:47 PM Changeset in webkit [246701] by jiewen_tan@apple.com
  • 20 edits in trunk

WebPageProxy::loadData should accept ShouldOpenExternalURLsPolicy
https://bugs.webkit.org/show_bug.cgi?id=199114
<rdar://problem/51671674>

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by new test content within existing tests.

  • loader/FrameLoaderTypes.h:

Adds an EnumTraits for ShouldOpenExternalURLsPolicy.

Source/WebKit:

This patch teaches WebPageProxy::loadData to accept ShouldOpenExternalURLsPolicy policy,
and then utilize it in RedirectSOAuthorizationSession. Therefore, the response loaded after
successful interceptions will be able to propagate the same policy from the last navigation
as it were continuous loading.

Besides the above, this patch also fixes some minor issues.

  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm:

(WebKit::NavigationSOAuthorizationSession::shouldStartInternal):
(WebKit::NavigationSOAuthorizationSession::webViewDidMoveToWindow):

  • UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h:
  • UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.mm:

(WebKit::PopUpSOAuthorizationSession::completeInternal):

  • UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.h:
  • UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.mm:

(WebKit::shouldOpenExternalURLsPolicy):
(WebKit::RedirectSOAuthorizationSession::completeInternal):

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h:
  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:

(WebKit::SOAuthorizationSession::complete):

  • UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h:
  • UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm:

(WebKit::SubFrameSOAuthorizationSession::fallBackToWebPathInternal):
(WebKit::SubFrameSOAuthorizationSession::completeInternal):
(WebKit::SubFrameSOAuthorizationSession::loadDataToFrame):
(WebKit::SubFrameSOAuthorizationSession::postDidCancelMessageToParent):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadData):

  • WebProcess/WebPage/WebPage.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:

(-[TestSOAuthorizationNavigationDelegate init]):
(-[TestSOAuthorizationNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(configureSOAuthorizationWebView):
(TestWebKitAPI::TEST):

3:14 PM Changeset in webkit [246700] by sbarati@apple.com
  • 3 edits
    4 adds in trunk

[WHLSL] Code that accesses an undefined variable crashes
https://bugs.webkit.org/show_bug.cgi?id=198775

Reviewed by Myles C. Maxfield.

Source/WebCore:

Myles mostly fixed this in r246631 when he made NameResolver propagate
its error to its parent NameResolver. However, there was still one bug
where we ended up calling setError twice for an if statement. This patch
fixes that and adds tests.

Tests: webgpu/whlsl-use-undefined-variable-2.html

webgpu/whlsl-use-undefined-variable.html

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::visit):

LayoutTests:

  • webgpu/whlsl-use-undefined-variable-2-expected.txt: Added.
  • webgpu/whlsl-use-undefined-variable-2.html: Added.
  • webgpu/whlsl-use-undefined-variable-expected.txt: Added.
  • webgpu/whlsl-use-undefined-variable.html: Added.
3:08 PM Changeset in webkit [246699] by Truitt Savell
  • 13 edits
    4 deletes in trunk

Unreviewed, rolling out r246611.

Introduced a flakey test.

Reverted changeset:

"iOS 12.2 Drawing portrait video to canvas is sideways"
https://bugs.webkit.org/show_bug.cgi?id=196772
https://trac.webkit.org/changeset/246611

2:31 PM Changeset in webkit [246698] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[bmalloc] IsoTLS Layout extension initializes one IsoTLSEntry twice
https://bugs.webkit.org/show_bug.cgi?id=199077

Reviewed by Saam Barati.

Found that IsoTLS::ensureEntries can construct the same IsoTLSEntry many times, it can leak memory because the construction clears previous fields including freelist.

  1. We have oldLastEntry.
  2. In that case, startEntry is oldLastEntry.
  3. We find some targetEntry.
  4. Finally, if startEntry exists, we newly construct [startEntry, targetEntry]
  5. In the above sequence, oldLastEntry (== startEntry) is constructed again, while oldLastEntry is already constructed previously.

We fix this issue by changing the startEntry. We already have RELEASE_BASSERT(!oldLastEntry || oldLastEntry->offset() < offset);
assertion. This means that oldLastEntry->m_next must exist, otherwise the following loop would not find a targetEntry. And layout.head()
must return non nullptr at IsoTLS::ensureEntries because IsoTLS::ensureEntries requires that IsoHeap<> is initialized, and IsoHeap<>
must add at least one TLS entry to the IsoTLSLayout.

  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::ensureEntries):

2:22 PM Changeset in webkit [246697] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

WebKit context menu highlights include extra padding
https://bugs.webkit.org/show_bug.cgi?id=199080
<rdar://problem/51140126>

Reviewed by Dean Jackson.

  • Shared/ios/InteractionInformationRequest.cpp:

(WebKit::InteractionInformationRequest::encode const):
(WebKit::InteractionInformationRequest::decode):
(WebKit::InteractionInformationRequest::isValidForRequest):
(WebKit::InteractionInformationRequest::isApproximatelyValidForRequest):

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

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::linkIndicatorPositionInformation):
Disable the margin going forward, but leave it if we're using the legacy
API, because there is no way to add margin at the platform level with
the legacy API.

In the future we should always have no margin in our indicator, and just
apply it in whatever consumes the indicator, so that there is no
disagreement between clients about the size of the margin.

2:02 PM Changeset in webkit [246696] by mmaxfield@apple.com
  • 1 edit
    1 add in trunk/LayoutTests

[WHLSL] read modify write expressions do no work as expected
https://bugs.webkit.org/show_bug.cgi?id=195864

Unreviewed test gardening.

  • webgpu/whlsl-read-modify-write-expected.txt: Added.
1:52 PM Changeset in webkit [246695] by timothy_horton@apple.com
  • 10 edits
    3 adds in trunk

Preview of <picture> element doesn't match element bounds
https://bugs.webkit.org/show_bug.cgi?id=199049
<rdar://problem/51474402>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/text-indicator/text-indicator-uses-img-size-inside-picture.html

  • dom/DOMRectReadOnly.idl:
  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText const):
(WebCore::Range::absoluteTextRects const):
(WebCore::Range::borderAndTextRects const):
(WebCore::Range::boundingRect const):
(WebCore::Range::absoluteBoundingRect const):

  • dom/Range.h:

(WebCore::Range::absoluteTextRects):
(WebCore::Range::absoluteBoundingRect):
(WebCore::Range::borderAndTextRects):
(WebCore::Range::boundingRect):

  • page/TextIndicator.cpp:

(WebCore::absoluteBoundingRectForRange):
(WebCore::estimatedBackgroundColorForRange):
(WebCore::initializeIndicator):

  • rendering/RenderBlock.h:
  • testing/Internals.cpp:

(WebCore::Internals::TextIndicatorData::TextIndicatorData):
(WebCore::Internals::TextIndicatorData::~TextIndicatorData):
(WebCore::Internals::textIndicatorForRange):

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

LayoutTests:

  • fast/text-indicator/text-indicator-uses-img-size-inside-picture-expected.txt: Added.
  • fast/text-indicator/text-indicator-uses-img-size-inside-picture.html: Added.
1:36 PM Changeset in webkit [246694] by youenn@apple.com
  • 12 edits in trunk

WebPageProxy should use the right path for sandbox extension
https://bugs.webkit.org/show_bug.cgi?id=198902
<rdar://problem/50772810>

Reviewed by Geoffrey Garen.

Source/WebKit:

Store the sandbox path, if any, in UIProcess for each page in its PageLoadState.
This allows proper sandbox handling for reload after crash and process swap cases.
Store the sandbox path, if any, in the b/w list so that the sandbox path can be properly computed
during b/f navigation works.

Add SPI for test purposes to check what is the current sandbox path.

  • Shared/WebBackForwardListItem.h:

(WebKit::WebBackForwardListItem::resourceDirectoryURL const):
(WebKit::WebBackForwardListItem::setResourceDirectoryURL):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _resourceDirectoryURL]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/PageLoadState.cpp:

(WebKit::PageLoadState::resourceDirectoryURL const):
(WebKit::PageLoadState::setPendingAPIRequestURL):

  • UIProcess/PageLoadState.h:

(WebKit::PageLoadState::setPendingAPIRequestURL):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::backForwardAddItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::currentResourceDirectoryURL const):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileURL.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1:31 PM Changeset in webkit [246693] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

[iOS] Compatibility mouse events aren't prevented by calling preventDefault() on pointerdown
https://bugs.webkit.org/show_bug.cgi?id=198124
Source/WebKit:

<rdar://problem/50410863>

Reviewed by Dean Jackson.

Ensure we wait until completion of a tap before removing the pointer ID and the preventDefault() state along with it.

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

(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _commitPotentialTapFailed]):
(-[WKContentView _didCompleteSyntheticClick]):
(-[WKContentView _singleTapRecognized:]):

LayoutTests:

Reviewed by Dean Jackson.

Add a new test that checks that calling preventDefault() within a "pointerdown" event handler correctly prevents
the dispatch of compatibility mouse events even with a slow tap.

  • pointerevents/ios/pointer-events-no-mousedown-when-prevent-default-called-on-pointerdown-expected.txt: Added.
  • pointerevents/ios/pointer-events-no-mousedown-when-prevent-default-called-on-pointerdown.html: Added.
1:28 PM Changeset in webkit [246692] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Remove extra check in RegExp @matchSlow
https://bugs.webkit.org/show_bug.cgi?id=198846

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-06-21
Reviewed by Joseph Pecoraro.

Type of RegExp exec result is already asserted in @regExpExec.

  • builtins/RegExpPrototype.js:

(globalPrivate.matchSlow): Remove isObject check.

1:01 PM Changeset in webkit [246691] by Alan Coon
  • 1 edit in tags/Safari-608.1.30.1/Source/WTF/wtf/Platform.h

Apply patch. rdar://problem/51994084

12:57 PM Changeset in webkit [246690] by Alan Coon
  • 7 edits in tags/Safari-608.1.30.1/Source

Versioning.

12:54 PM Changeset in webkit [246689] by Alan Coon
  • 1 copy in tags/Safari-608.1.30.1

New tag.

12:50 PM Changeset in webkit [246688] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Layout Test animations/change-one-anim.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=190882

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-21

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
12:12 PM Changeset in webkit [246687] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

Address reference to UIColor.groupTableViewBackgroundColor in WKPasswordView.mm
https://bugs.webkit.org/show_bug.cgi?id=199111
<rdar://problem/51992107>

Reviewed by Timothy Hatcher.

WKPasswordView.mm is used on iOS-family devices. However, it doesn't
build on tvOS or watchOS when "treat deprecation warnings as errors"
is enabled. This build failure is due to a reference to
UIColor.groupTableViewBackgroundColor in a branch of non-dark-mode
code. Address this by surrounding the reference with
ALLOW_DEPRECATED_DECLARATIONS_* macros.

Attempting to address the build failure by unconditionally enabling
the dark-mode code works for tvOS, but fails for watchOS due to lack
of dark-mode support on that platform.

  • UIProcess/ios/WKPasswordView.mm:

(-[WKPasswordView showInScrollView:]):

12:02 PM perl-zxcvbn_license created by lingho@apple.com
11:57 AM WikiStart edited by lingho@apple.com
(diff)
11:21 AM Changeset in webkit [246686] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: remove unused DataGrid style .force-focus
https://bugs.webkit.org/show_bug.cgi?id=199112
<rdar://problem/51993412>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/HeapAllocationsTimelineView.css:

(.timeline-view.heap-allocations > .data-grid:not(:focus) tr.selected.invalid):
(.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid): Deleted.

  • UserInterface/Views/ResourceTreeElement.css:

(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open,):
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting,):
Missed in https://bugs.webkit.org/show_bug.cgi?id=190480.

11:01 AM Changeset in webkit [246685] by youenn@apple.com
  • 5 edits
    2 adds in trunk

Safari crashes after ~2028 OfflineAudioContext objects are created (they never get garbage collected, consuming a thread each)
https://bugs.webkit.org/show_bug.cgi?id=198964
<rdar://problem/51891520>

Reviewed by Jer Noble.

Source/WebCore:

Move from setPendingActivity/unsetPendingActivity to an
m_pendingActivity member which is easier to manage.

Keep setting a pending activity for AudioContext at construction time
but do not do that for Offline contexts.
Instead, set the pending activity when startRendering is called.
Unset the pending activity when the rendering activity is finished.

Make m_audioDecoder a unique pointer so that it can lazily be initialized.
This removes the burden of creating an audio decoder thread for each context.

Test: webaudio/offlineaudiocontext-gc.html

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::constructCommon):
(WebCore::AudioContext::clear):
(WebCore::AudioContext::decodeAudioData):
(WebCore::AudioContext::startRendering):
(WebCore::AudioContext::finishedRendering):
(WebCore::AudioContext::dispatchEvent):
(WebCore::AudioContext::clearPendingActivity):
(WebCore::AudioContext::makePendingActivity):
To keep it consistent with setPendingActivity/unsetPendingActivity, we
explicitly ref/unref the AudioContext. We should try to remove this ref/unref.

  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/OfflineAudioDestinationNode.cpp:

(WebCore::OfflineAudioDestinationNode::startRendering):

LayoutTests:

  • webaudio/offlineaudiocontext-gc-expected.txt: Added.
  • webaudio/offlineaudiocontext-gc.html: Added.
10:53 AM Changeset in webkit [246684] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: remove .legacy-mac/.latest-mac CSS classes, standardize on .latest-mac UI
https://bugs.webkit.org/show_bug.cgi?id=199109
<rdar://problem/51991129>

Reviewed by Timothy Hatcher.

Drop legacy macOS version support from Web Inspector UI.

  • UserInterface/Base/Main.js:
  • UserInterface/Views/DefaultDashboardView.css:

(@media (prefers-color-scheme: dark)):
(body.latest-mac .toolbar .dashboard .item.button): Deleted.

  • UserInterface/Views/Toolbar.css:

(.toolbar):
(.toolbar .item.button,):
(.toolbar .search-bar > input[type="search"]):
(.toolbar .search-bar > input[type="search"]:focus):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.toolbar .item.button:active):
(body.window-inactive .toolbar .item.button,):
(@media (prefers-color-scheme: dark)):
(.toolbar .search-bar > input[type="search"]::placeholder):
(body.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
(body.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
(.toolbar .dashboard-container):
(body .toolbar): Deleted.
(body.legacy-mac .toolbar .item.button,): Deleted.
(body.legacy-mac .toolbar .search-bar > input[type="search"]): Deleted.
(body.legacy-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
(body.legacy-mac .toolbar .item.button:active): Deleted.
(body.window-inactive.legacy-mac .toolbar .item.button,): Deleted.
(body.latest-mac .toolbar .item.button,): Deleted.
(body.latest-mac .toolbar .search-bar > input[type="search"]): Deleted.
(body.latest-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
(body.latest-mac .toolbar .item.button:active): Deleted.
(body.latest-mac.window-inactive .toolbar .item.button,): Deleted.
(body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
(body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
(body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.
(body.latest-mac .toolbar .dashboard-container): Deleted.

10:45 AM Changeset in webkit [246683] by Truitt Savell
  • 4 edits
    2 deletes in trunk

Unreviewed, rolling out r246655.

Introduced a failing test

Reverted changeset:

"Web Inspector: AXI: Audit: image label test is throwing
spurious errors on elements with existing alt attr, but no
value: <img alt>"
https://bugs.webkit.org/show_bug.cgi?id=194754
https://trac.webkit.org/changeset/246655

10:12 AM Changeset in webkit [246682] by youenn@apple.com
  • 2 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Make sure to check for file descriptor value before using FD_CLR
https://bugs.webkit.org/show_bug.cgi?id=199097
<rdar://problem/51479074>

Reviewed by Eric Carlson.

  • Source/webrtc/rtc_base/physicalsocketserver.cc:
  • WebKit/0001-fix-fd-clr.patch: Added.
9:59 AM Changeset in webkit [246681] by mmaxfield@apple.com
  • 3 edits
    1 add in trunk

[WHLSL] read modify write expressions do no work as expected
https://bugs.webkit.org/show_bug.cgi?id=195864

Reviewed by Saam Barati.

Source/WebCore:

Turns out https://bugs.webkit.org/show_bug.cgi?id=199037 already fixed everything.
This patch just adds a test.

Test: webgpu/whlsl-read-modify-write.html

  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

  • webgpu/whlsl-read-modify-write.html: Added.
8:49 AM Changeset in webkit [246680] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Adjust baseline top when the baseline moves.
https://bugs.webkit.org/show_bug.cgi?id=199091
<rdar://problem/51966257>

Reviewed by Antti Koivisto.

Currently only "text-align: bottom" adjusts the baseline top. This patch fixes the "text-align: baseline" case when
the growing ascent pushes the baseline top closer to the line top.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::adjustBaselineAndLineHeight):

8:43 AM Changeset in webkit [246679] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=199100
<rdar://problem/51973614>

Reviewed by Antti Koivisto.

m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::close):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::logicalHeight const):

8:31 AM Changeset in webkit [246678] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] LineBox::Baseline should have a height getter.
https://bugs.webkit.org/show_bug.cgi?id=199092
<rdar://problem/51966958>

Reviewed by Antti Koivisto.

The baseline height does not need to be a getter on the Line (no one calls it).

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::adjustBaselineAndLineHeight):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::contentLogicalWidth const):
(WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted.

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::Baseline::height const):

7:20 AM Changeset in webkit [246677] by Michael Catanzaro
  • 72 edits in trunk

[WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
https://bugs.webkit.org/show_bug.cgi?id=199094

Reviewed by Carlos Garcia Campos.

.:

We can remove a lot of preprocessor guards in our code if we bump the minimum required
versions of certain dependencies:

GStreamer 1.8 -> 1.10
GTK 3.6 -> 3.22
ATK 2.16
libsoup 2.42 -> 2.54
glib 2.40 -> 2.44
cairo 1.14

I'm being extremely conservative with all these dependency bumps. All of these versions are
already available in Debian Stretch, which we will soon no longer support building on anyway
due to the impending GCC 7 requirement. Dependencies are also bumped no further than we
actually have guards for. For example, ATK 2.22 is available in Stretch, but the highest
ATK_CHECK_VERSION guards we use below 2.22 are for 2.16, so I set the min version to 2.16.

We still have a few preprocessor guards remaining for everything here except glib and cairo,
but this removes the vast majority of them. Deleting code is fun!

  • Source/cmake/FindGTK3.cmake:
  • Source/cmake/GStreamerChecks.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/atk/WebKitAccessible.cpp:

(atkRole):
(setAtkStateSetFromCoreObject):
(interfaceMaskFromObject):

  • accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
  • accessibility/atk/WebKitAccessibleInterfaceTableCell.h:
  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(webkitAccessibleTextGetStringAtOffset):
(webkitAccessibleTextInterfaceInit):

  • accessibility/atk/WebKitAccessibleInterfaceValue.cpp:

(webkitAccessibleValueInterfaceInit):

  • platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:

(WebCore::AudioTrackPrivateGStreamer::kind const):

  • platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::derefGPtr<GstStreamCollection>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h:
  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::initializeGStreamerAndRegisterWebKitElements):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:

(WebCore::InbandTextTrackPrivateGStreamer::create):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
(WebCore::MediaPlayerPrivateGStreamer::enableTrack):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
(WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
(WebCore::MediaPlayerPrivateGStreamer::supportsType):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext):
(WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:

(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::disconnect):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):

  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:

(WebCore::TrackPrivateBaseGStreamer::stream):

  • platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:

(WebCore::VideoTrackPrivateGStreamer::kind const):

  • platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::eventTypeForGdkKeyEvent):

  • platform/gtk/PlatformMouseEventGtk.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent):

  • platform/gtk/PlatformScreenGtk.cpp:

(WebCore::screenRect):
(WebCore::screenAvailableRect):
(WebCore::screenHasTouchDevice):
(WebCore::screenIsTouchPrimaryInputDevice):
(): Deleted.
(WebCore::isTouchDevice): Deleted.
(WebCore::deviceAddedCallback): Deleted.
(WebCore::deviceRemovedCallback): Deleted.

  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):

  • platform/gtk/RenderThemeGadget.cpp:
  • platform/gtk/RenderThemeGadget.h:
  • platform/gtk/RenderThemeWidget.cpp:
  • platform/gtk/RenderThemeWidget.h:
  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk):
(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::ScrollbarThemeGtk::trackRect):
(WebCore::ScrollbarThemeGtk::forwardButtonRect):
(WebCore::ScrollbarThemeGtk::paint):
(WebCore::ScrollbarThemeGtk::scrollbarThickness):
(WebCore::createStyleContext): Deleted.
(WebCore::createChildStyleContext): Deleted.
(WebCore::paintStepper): Deleted.
(WebCore::adjustRectAccordingToMargin): Deleted.

  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
  • platform/network/soup/ResourceRequest.h:

(WebCore::toSoupMessagePriority):

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession):

  • rendering/RenderThemeGtk.cpp:

(WebCore::themePartStateFlags):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::menuListColor):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::RenderThemeGtk::systemColor const):
(WebCore::RenderThemeGtk::paintMediaButton):
(WebCore::createStyleContext): Deleted.
(WebCore::loadThemedIcon): Deleted.
(WebCore::gtkTextDirection): Deleted.
(WebCore::gtkIconStateFlags): Deleted.
(WebCore::adjustRectForFocus): Deleted.
(WebCore::renderButton): Deleted.
(WebCore::getIconSizeForPixelSize): Deleted.
(WebCore::paintIcon): Deleted.
(WebCore::paintEntryIcon): Deleted.
(WebCore::centerRectVerticallyInParentInputElement): Deleted.
(WebCore::spinButtonArrowSize): Deleted.
(WebCore::paintSpinArrowButton): Deleted.

Source/WebKit:

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::createRequest):
(WebKit::NetworkDataTaskSoup::writeDownloadCallback):
(WebKit::NetworkDataTaskSoup::writeDownload):
(WebKit::NetworkDataTaskSoup::startingCallback):
(WebKit::NetworkDataTaskSoup::requestStartedCallback): Deleted.

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::buttonForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):
(WebKit::WebEventFactory::createWebTouchEvent):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::doneWithTouchEvent):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(ClickCounter::currentClickCountForGdkButtonEvent):
(webkitWebViewBaseRealize):
(webkitWebViewBaseHandleMouseEvent):
(webkitWebViewBaseGetTouchPointsForEvent):
(webkitWebViewBaseTouchEvent):
(webkitWebViewBaseGestureController):
(webkitWebViewBaseEvent):
(deviceScaleFactorChanged):
(webkitWebViewBaseCreateWebPage):
(webkitWebViewBaseTakeViewSnapshot):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewDialog.cpp:

(webkitWebViewDialogDraw):
(webkitWebViewDialogConstructed):
(webkit_web_view_dialog_class_init):

  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:

(fileChooserDialogResponseCallback):
(webkitWebViewRunFileChooser):

  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:

(WebKit::doMouseEvent):
(WebKit::doMotionEvent):
(WebKit::doKeyStrokeEvent):

  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):
(WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext):
(WebKit::AcceleratedBackingStoreWayland::makeContextCurrent):
(WebKit::AcceleratedBackingStoreWayland::paint):

  • UIProcess/gtk/AcceleratedBackingStoreWayland.h:
  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::startDrag):
(WebKit::DragAndDropHandler::fillDragData):
(WebKit::DragAndDropHandler::finishDrag):

  • UIProcess/gtk/DragAndDropHandler.h:
  • UIProcess/gtk/GestureController.cpp:

(WebKit::GestureController::handleEvent):

  • UIProcess/gtk/GestureController.h:
  • UIProcess/gtk/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::filterKeyEvent):
(WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
(WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):

  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::isEventStop):
(WebKit::createScrollEvent):

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::append):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):

  • UIProcess/gtk/WebKitInspectorWindow.cpp:

(webkit_inspector_window_init):
(webkitInspectorWindowSetSubtitle):

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::getCenterForZoomGesture):

  • UIProcess/gtk/WebPopupMenuProxyGtk.cpp:

(WebKit::WebPopupMenuProxyGtk::showPopupMenu):
(WebKit::WebPopupMenuProxyGtk::hidePopupMenu):

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

(WebKit::WebPage::getCenterForZoomGesture):

Tools:

  • MiniBrowser/gtk/BrowserTab.c:

(runColorChooserCallback):
(browserTabConstructed):

  • TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:

(testWebViewSyncRequestOnMaxConns):
(beforeAll):

  • TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:

(testWebSocketTLSErrors):
(beforeAll):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:

(WebKitTestServer::~WebKitTestServer):
(WebKitTestServer::getWebSocketURIForPath const):

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::isAttributeSettable):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::stringAtOffset):

3:32 AM Changeset in webkit [246676] by Carlos Garcia Campos
  • 3 edits in trunk/LayoutTests

Unreviewed GTK gardening. Rebaseline css-dark-mode/default-colors.html.

  • platform/gtk/TestExpectations:
  • platform/gtk/css-dark-mode/default-colors-expected.txt:
3:22 AM Changeset in webkit [246675] by Carlos Garcia Campos
  • 2 edits
    2 deletes in trunk/LayoutTests

Unreviewed GTK gardening. Skip touch event tests.

Since r245788 touch events support is enabled at runtime depending on whether there's an actual touch device
attached or not. We need to skip the tests in the bots since they don't have a touch screen.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/events/event-attribute-expected.txt: Removed.
  • platform/gtk/fast/events/touch/document-create-touch-list-expected.txt: Removed.
1:47 AM Changeset in webkit [246674] by graouts@webkit.org
  • 15 edits
    1 copy
    3 deletes in trunk

[Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
https://bugs.webkit.org/show_bug.cgi?id=198999

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Record progressions in two WPT tests and mark updated failures in two other WPT tests.

  • web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_click_during_capture-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt:

Source/WebCore:

Up until now, we would not account for pointer capture (see https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
for it when updating :hover styles.

Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
boundary mouse events. Additionally, when calling EventHandler::prepareMouseEvent(), we also use the pointer capture element to
eventually pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.

This also means that we need to re-run EventHandler::prepareMouseEvent() during mouse state changes to ensure that the :hover styles
are applied correctly should the pointer capture element change during dispatch of boundary mouse events.

  • dom/Document.cpp:

(WebCore::Document::prepareMouseEvent): If there is one, use the pointer capture element instead of the hit-test target.
(WebCore::Document::updateHoverActiveState): Relax the mustBeInActiveChain condition in case the pointer capture element changed when
updating the :hover/:active chains.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
(WebCore::EventHandler::handleMouseMoveEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
(WebCore::EventHandler::handleMouseReleaseEvent): As we know the pointer capture element will be reset as part of the mouse being
released, we reset the pointer capture element and EventHandler's capture element prior to invalidating hover styles and boundary events.
(WebCore::EventHandler::setCapturingMouseEventsElement): Dispatch boundary events when a new element is set.
(WebCore::EventHandler::dispatchMouseEvent): New dispatchMouseEvent() variant that re-processes the provided MouseEventWithHitTestResults
in case the pointer capture element changes during event dispatch, as called by handleMousePressEvent() and handleMouseMoveEvent().

  • page/EventHandler.h:
  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::pointerCaptureElement): We now need to query whay the pointer capture element might be from EventHandler,
so expose a new method to access it.
(WebCore::PointerCaptureController::releasePointerCapture): Since we may not call processPendingPointerCapture() until the dispatch of the
next event, we must reset EventHandler's capturing mouse element right now so that the next event processed does not use it as an overriding target.
(WebCore::PointerCaptureController::hasPointerCapture): We would mistakenly return true if the provided element was null, which could be the
case of EventHandler's capturing element. Rather than changing call sites to check that the provided value exists, we change the method to
return false when the provided element is null. Note that this does not affect the API since it's exposed on Element itself.
(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex): Call dispatchEvent() instead of calling pointerEventWillBeDispatched() and
pointerEventWasDispatched().
(WebCore::PointerCaptureController::dispatchEvent): Remove all code specific to pointer capture since now the events will be dispatched on the
pointer capture element by EventHandler.
(WebCore::PointerCaptureController::processPendingPointerCapture): Make sure this method is not re-entrant since it dispatches events.

  • page/PointerCaptureController.h:
  • rendering/HitTestRequest.h:

(WebCore::HitTestRequest::pointerCaptureElementChanged const): Add a new HitTestRequestType bit such that we can indicate to Document::updateHoverActiveState()
that it must be update the :hover/:active chains when the pointer capture element has just changed.

LayoutTests:

Record progressions in two WPT tests and mark updated failures in two other WPT tests.

  • platform/mac-highsierra-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt: Removed.
  • platform/mac-highsierra/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_click_during_capture-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_pointercapture_in_frame-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt:
12:05 AM Changeset in webkit [246673] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

fast/events/ios/click-event-and-display-contents.html times out on iPad
https://bugs.webkit.org/show_bug.cgi?id=199068
<rdar://problem/51899547>

Reviewed by Dean Jackson.

Querying the bounds of a "display: contents" element will always return 0 width and height. So let's position the element at 0,0
so that we can send a tap at that location and reliably tap on that element.

  • fast/events/ios/click-event-and-display-contents.html:

Jun 20, 2019:

10:44 PM Changeset in webkit [246672] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: rename shadowRootPushed parameter to match protocol
https://bugs.webkit.org/show_bug.cgi?id=199098

Reviewed by Devin Rousso.

  • UserInterface/Protocol/DOMObserver.js:

(WI.DOMObserver.prototype.shadowRootPushed):

10:37 PM Changeset in webkit [246671] by commit-queue@webkit.org
  • 6 edits
    5 adds in trunk/Source/WebKit

[GTK][WPE] Implement a basic DNS cache
https://bugs.webkit.org/show_bug.cgi?id=196094

Patch by Patrick Griffis <Patrick Griffis> and Carlos Garcia Campos <cgarcia@igalia.com> on 2019-06-20
Reviewed by Michael Catanzaro.

This adds a simple cache to all DNS operations in the network process.

  • NetworkProcess/glib/DNSCache.cpp: Added.

(WebKit::DNSCache::DNSCache):
(WebKit::DNSCache::mapForType):
(WebKit::DNSCache::lookup):
(WebKit::DNSCache::update):
(WebKit::DNSCache::removeExpiredResponsesInMap):
(WebKit::DNSCache::pruneResponsesInMap):
(WebKit::DNSCache::removeExpiredResponsesFired):
(WebKit::DNSCache::clear):

  • NetworkProcess/glib/DNSCache.h: Added.
  • NetworkProcess/glib/WebKitCachedResolver.cpp: Added.

(addressListVectorToGList):
(addressListGListToVector):
(webkitCachedResolverLookupByName):
(webkitCachedResolverLookupByNameAsync):
(webkitCachedResolverLookupByNameFinish):
(dnsCacheType):
(webkitCachedResolverLookupByNameWithFlags):
(webkitCachedResolverLookupByNameWithFlagsAsync):
(webkitCachedResolverLookupByNameWithFlagsFinish):
(webkitCachedResolverLookupByAddress):
(webkitCachedResolverLookupByAddressAsync):
(webkitCachedResolverLookupByAddressFinish):
(webkitCachedResolverLookupRecords):
(webkitCachedResolverLookupRecordsAsync):
(webkitCachedResolverLookupRecordsFinish):
(webkitCachedResolverReload):
(webkit_cached_resolver_class_init):
(webkitCachedResolverNew):

  • NetworkProcess/glib/WebKitCachedResolver.h: Added.
  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
10:19 PM Changeset in webkit [246670] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

Try to use C++14 std::enable_if_t in CheckedArithmetic.h again
https://bugs.webkit.org/show_bug.cgi?id=199099

Reviewed by Ross Kirsling.

r242235 changed CheckedArithmetic to not use C++14. Let's try
C++14 again.

  • wtf/CheckedArithmetic.h: Use C++14 std::make_unsigned_t and std::enable_if_t.
10:15 PM Changeset in webkit [246669] by Carlos Garcia Campos
  • 9 edits in trunk/Source

[GTK] Stop pretending WebCore::Widget can have a platform widget
https://bugs.webkit.org/show_bug.cgi?id=199066

Reviewed by Michael Catanzaro.

Source/WebCore:

That was only possible in legacy WebKit that we no longer support. The code can be simplified a bit.

  • platform/Widget.cpp:

(WebCore::Widget::init):

  • platform/Widget.h:

(WebCore::Widget::setPlatformWidget):
(WebCore::Widget::releasePlatformWidget): Deleted.
(WebCore::Widget::retainPlatformWidget): Deleted.

  • platform/gtk/PlatformScreenGtk.cpp:

(WebCore::systemVisual):
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
(WebCore::getToplevel): Deleted.
(WebCore::getVisual): Deleted.
(WebCore::getScreen): Deleted.

  • platform/gtk/WidgetGtk.cpp:

(WebCore::Widget::~Widget):
(WebCore::Widget::show):
(WebCore::Widget::hide):
(WebCore::Widget::setIsSelected):
(WebCore::Widget::setFrameRect):
(WebCore::Widget::releasePlatformWidget): Deleted.
(WebCore::Widget::retainPlatformWidget): Deleted.

  • platform/ios/WidgetIOS.mm:

(WebCore::Widget::~Widget):

Source/WebKit:

Rename PlatformWidget as PlatformViewWidget to avoid conflict with PlatformWidget defined in WebCore.

  • UIProcess/WebPageProxy.h:
  • UIProcess/win/WebPageProxyWin.cpp:

(WebKit::WebPageProxy::viewWidget):

7:30 PM Changeset in webkit [246668] by Simon Fraser
  • 14 edits in trunk

Make it possible to include clipping in GraphicsLayer tree dumps
https://bugs.webkit.org/show_bug.cgi?id=199096

Reviewed by Zalan Bujtas.

Source/WebCore:

Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning
it on for a couple of tests.

  • page/Frame.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/GraphicsLayerClient.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerTreeAsText):

  • testing/Internals.cpp:

(WebCore::toLayerTreeFlags):

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

LayoutTests:

  • compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
  • compositing/clipping/border-radius-async-overflow-clipping-layer.html:
  • compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt:
  • compositing/clipping/border-radius-overflow-hidden-stacking-context.html:
  • platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
6:21 PM Changeset in webkit [246667] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=199082

Reviewed by Matt Baker.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
The script syntax tree may be fetched even if the resource hasn't finished parsing (or had
a syntax error), so it's possible for it to be null.

5:54 PM Changeset in webkit [246666] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: inactive tab bar item should get darker on hover
https://bugs.webkit.org/show_bug.cgi?id=199022

Reviewed by Darin Adler.

  • UserInterface/Views/TabBar.css:

(.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
(@media not (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
(@media (prefers-color-scheme: dark) .tab-bar):
(@media (prefers-color-scheme: dark) .tab-bar > .item):
(@media (prefers-color-scheme: dark) .tab-bar > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected):hover):
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar):
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item):
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item.selected):

  • UserInterface/Views/Toolbar.css:

(@media (prefers-color-scheme: dark) body .toolbar):

5:50 PM Changeset in webkit [246665] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Remove change that was causing hangs
https://bugs.webkit.org/show_bug.cgi?id=199055
<rdar://problem/51820516>

Reviewed by Darin Adler.

This fix can sometimes cause deadlocks in the UIProcess.
We have a different fix that will go into UIKit <rdar://problem/51927701>.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _selectionChanged]):

5:49 PM Changeset in webkit [246664] by dbates@webkit.org
  • 6 edits in trunk/Source

[iOS] Evernote crashes when creating a note
https://bugs.webkit.org/show_bug.cgi?id=199083
<rdar://problem/51759247>

Reviewed by Brent Fulgham.

Source/WebCore:

Add runtime check whether WebKit is being used in Evernote. Evernote's bundle ID
references iPhone, but they use the same ID for their iPad app as well.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isEvernote): Added.

Source/WebKit:

Add a hack just for Evernote linked before iOS 13 that dynamically adds a placeholder -[WKContentView keyCommands]
method (it just calls super). Evernote swizzles the IPI -[WKContentView keyCommands], but this
method may not always be present in the WebKit binary following r240514. So, Evernote may end
up swizzling -[UIResponder keyCommands], but their implementation doesn't account for this
scenario and they end up crashing because they call an unrecognized selector.

  • UIProcess/Cocoa/VersionChecks.h: Add version check.
  • UIProcess/ios/WKContentView.mm:

(keyCommandsPlaceholderHackForEvernote): Added.
(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Install the hack.

4:53 PM Changeset in webkit [246663] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Fix a bug that 'test_metrics' and 'tests' tables are not joined correctly in CommitLogFetcher.fetch_latest_for_platform
https://bugs.webkit.org/show_bug.cgi?id=199062

Reviewed by Ryosuke Niwa.

'test_metrics' and 'tests' should be joined based on 'metric_test' and 'test_id'.

  • public/include/commit-log-fetcher.php: Fix the typo in the query.
  • server-tests/api-commits-tests.js: Added a unit test for this change.
4:13 PM Changeset in webkit [246662] by dean_johnson@apple.com
  • 2 edits in trunk/Tools

test-webkitpy is broken on macOS Catalina
https://bugs.webkit.org/show_bug.cgi?id=199078

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/test/main.py: Check if lldb tests are supported before adding them

to the runner.
(main):
(_supports_building_and_running_lldb_tests): Check if you are running macOS Catalina.

3:58 PM Changeset in webkit [246661] by dean_johnson@apple.com
  • 2 edits in trunk/Tools

Change status to "committer" in contributors.json

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
3:52 PM Changeset in webkit [246660] by beidson@apple.com
  • 6 edits in trunk/Source/WebKit

WebURLSchemeHandlerProxy::loadSynchronously crash with sync request.
<rdar://problem/51862206> and https://bugs.webkit.org/show_bug.cgi?id=199063

Reviewed by Geoffrey Garen.

Don't use a DataReference for the sync reply type.

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::didComplete):

  • UIProcess/WebURLSchemeTask.h:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:

(WebKit::WebURLSchemeHandlerProxy::loadSynchronously):

3:52 PM Changeset in webkit [246659] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger: setting a breakpoint on a non-JavaScript line should immediately show as unresolved
https://bugs.webkit.org/show_bug.cgi?id=199033

Reviewed by Matt Baker.

Remove the shouldSpeculativelyResolve parameter, as it was resolving breakpoints even in
the case that there were no resolved locations for the given breakpoint.

In the case that there are resolved locations, the breakpoint would've already been resolved
by the time that shouldSpeculativelyResolve would've taken effect, so it's unnecessary.

This parameter was only used when setting a breakpoint from a SourceCodeTextEditor gutter.

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):

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

Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
https://bugs.webkit.org/show_bug.cgi?id=199052
<rdar://problem/51923906>

Reviewed by Matt Baker.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):

  • Don't show an "Edit > Tag" for <html>, <head>, and <body> nodes
  • Disable any "Edit" submenu item if it's target is already being edited
  • Prevent "Add" submenu items from being shown for text nodes
3:28 PM Changeset in webkit [246657] by achristensen@apple.com
  • 10 edits
    3 adds in trunk

Add unit test for UIContextMenuConfiguration API
https://bugs.webkit.org/show_bug.cgi?id=199043

Reviewed by Wenson Hsieh.

Source/WebKit:

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::clickInteractionDriverForTesting const):
(API::PageConfiguration::setClickInteractionDriverForTesting):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _setClickInteractionDriverForTesting:]):
(-[WKWebViewConfiguration _clickInteractionDriverForTesting]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _registerPreview]):

Tools:

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

(-[TestContextMenuUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuUIDelegate webView:contextMenuWillPresentForElement:]):
(-[TestContextMenuUIDelegate webView:contextMenuForElement:willCommitWithAnimator:]):
(-[TestContextMenuUIDelegate webView:contextMenuDidEndForElement:]):
(TEST):

  • TestWebKitAPI/cocoa/TestContextMenuDriver.h: Added.
  • TestWebKitAPI/cocoa/TestContextMenuDriver.mm: Added.

(-[TestContextMenuDriver delegate]):
(-[TestContextMenuDriver setDelegate:]):
(-[TestContextMenuDriver view]):
(-[TestContextMenuDriver setView:]):
(-[TestContextMenuDriver allowableMovement]):
(-[TestContextMenuDriver setAllowableMovement:]):
(-[TestContextMenuDriver primaryGestureRecognizer]):
(-[TestContextMenuDriver setPrimaryGestureRecognizer:]):
(-[TestContextMenuDriver touchDuration]):
(-[TestContextMenuDriver setTouchDuration:]):
(-[TestContextMenuDriver locationInCoordinateSpace:]):
(-[TestContextMenuDriver cancelInteraction]):
(-[TestContextMenuDriver begin:]):
(-[TestContextMenuDriver clickDown]):
(-[TestContextMenuDriver clickUp]):
(-[TestContextMenuDriver end]):

  • TestWebKitAPI/ios/UIKitSPI.h:
3:25 PM Changeset in webkit [246656] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Status bubble should not turn orange when any build step is skipped
https://bugs.webkit.org/show_bug.cgi?id=199079

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
3:06 PM Changeset in webkit [246655] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
https://bugs.webkit.org/show_bug.cgi?id=194754

Patch by Greg Doolittle <gr3g@apple.com> on 2019-06-20
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/img-alt-attribute-unassigned-value.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::computedRoleString const):

LayoutTests:

  • accessibility/img-alt-attribute-unassigned-value-expected.txt: Added.
  • accessibility/img-alt-attribute-unassigned-value.html: Added.
  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
3:00 PM Changeset in webkit [246654] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix an internal engineering build after r246605

https://bugs.webkit.org/show_bug.cgi?id=197800

  • TestWebKitAPI/TCPServer.cpp:
2:42 PM Changeset in webkit [246653] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r245912): Crash in TextIterator::range via visiblePositionForIndexUsingCharacterIterator
https://bugs.webkit.org/show_bug.cgi?id=199061

Reviewed by Wenson Hsieh.

Avoid calling CharacterIterator::range when it's at the end. Otherwise, we'd crash with null pointer dereferencing.

Unfortunately no new tests since we don't have any reproducible test case.

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator):

1:39 PM Changeset in webkit [246652] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Resolve frequent crashes in topPrivatelyControlledDomain
https://bugs.webkit.org/show_bug.cgi?id=199072
<rdar://problem/51428162>

Reviewed by Youenn Fablet.

Crash data indicates that we are frequently crashing when multiple threads call
WebCore::topPrivatelyControlledDomain.

Code review showed the potential for a thread contention issue, since WebKit builds
with '--fno-threadsafe-statics'.

This patch corrects the thread safety issue in WebCore::topPrivatelyControlledDomain.

  • platform/mac/PublicSuffixMac.mm:

(WebCore::topPrivatelyControlledDomain): Only instantiate the static cache after the
current thread has achieved its lock.

1:35 PM Changeset in webkit [246651] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews-build] Triggered builds should use same revision as parent build
https://bugs.webkit.org/show_bug.cgi?id=198289

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckOutSpecificRevision): Build step to checkout specific revision.
(CheckOutSpecificRevision.doStepIf): Run this step only if ews_revision property is set.
(CheckOutSpecificRevision.hideStepIf): Hide this step when it is skipped.
(CheckOutSpecificRevision.start): Run appropriate git command.
(Trigger.propertiesToPassToTriggers): Pass ews_revision property to triggered builds, so that triggered
builds use same revision as parent build.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
  • BuildSlaveSupport/ews-build/factories.py:

(Factory.init): Added CheckOutSpecificRevision step.

1:24 PM Changeset in webkit [246650] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add unit tests for AnalyzeCompileWebKitResults
https://bugs.webkit.org/show_bug.cgi?id=199073

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests for AnalyzeCompileWebKitResults.
1:10 PM Changeset in webkit [246649] by sbarati@apple.com
  • 5 edits
    2 adds in trunk

[WHLSL] Property resolver needs to recurse on newValueExpression for RMW operations
https://bugs.webkit.org/show_bug.cgi?id=199037

Reviewed by Myles C. Maxfield.

Source/WebCore:

When we had an expression like <e1> += <e2>, we weren't running the property
resolver on <e2>. If <e2> was something like mat[1][2], we wouldn't end up
simplifying that into the needed getter calls. This patch fixes this by having
the property resolver recurse on <e2>.

This patch also fixes a bug in the property resolver where we weren't marking some
dereference expressions as LValues. This was causing bugs in the metal code generator.

This patch also adds a way to dump the AST between passes that are
guaranteed to not fail.

Test: webgpu/whlsl-read-modify-write-high-zombies.html

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::prepareShared):

  • Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:

(WebCore::WHLSL::PropertyResolver::visit):

  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

  • webgpu/whlsl-read-modify-write-high-zombies-expected.txt: Added.
  • webgpu/whlsl-read-modify-write-high-zombies.html: Added.
1:06 PM Changeset in webkit [246648] by Kocsen Chung
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r245911. rdar://problem/51656609

Network process crash when decoding SecItemResponseData
https://bugs.webkit.org/show_bug.cgi?id=198388
<rdar://problem/50408046>

Reviewed by Alex Christensen.

  • Shared/cf/ArgumentCodersCF.cpp: (IPC::decode): When decoding the elements inside a CFArrayRef, if decoding was successful but the CFTypeRef element is still null then skip it instead of trying to append it to the array. A CFArray container is not allowed to contain null. Some of our decoders for CFTypeRef types may not initialize the element even if the decode() function returns true. For example, the decoders for CFArrayRef and CFDictionaryRef return true if the encoded container was null but do not create a container.
  • Shared/mac/SecItemResponseData.cpp: (WebKit::SecItemResponseData::SecItemResponseData): nit: The wrong parameter was being moved. This is more efficient.

(WebKit::SecItemResponseData::encode const):
nit: Drop unnecessary .get().

  • UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::secItemRequest): nit: Use nullptr instead of 0.

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

1:03 PM Changeset in webkit [246647] by wilander@apple.com
  • 3 edits in trunk/Source/WebCore

Storage Access API: Cap the number of times an iframe document can request access
https://bugs.webkit.org/show_bug.cgi?id=199074
<rdar://problem/51857195>

Reviewed by Brent Fulgham.

Tested manually.

This change just adds a counter to the number of times the user explicitly
denies storage access and returns early if the counter has reached the limit
of 2.

We hoped that iframes that request storage access would count the number
of times the user has been asked and not repeat the request over and over.
However, we're seeing pretty aggressive use of the API and users are
complaining. Therefore, we need a cap on how many times an iframed
document can ask if it is explicitly denied access by the user.

This is a first measure. If we see continued aggressive use of the API,
we'll have to consider more drastic measures.

  • dom/DocumentStorageAccess.cpp:

(WebCore::DocumentStorageAccess::requestStorageAccess):

  • dom/DocumentStorageAccess.h:
12:57 PM Changeset in webkit [246646] by Justin Fan
  • 2 edits in trunk/LayoutTests

[WebGPU] High Sierra/Intel HD Graphics 4000: whlsl-harness-test.html crashes during dispatch call.
https://bugs.webkit.org/show_bug.cgi?id=199076

Unreviewed test gardening.

  • platform/mac/TestExpectations: Skip the test on High Sierra.
12:42 PM Changeset in webkit [246645] by Justin Michaud
  • 16 edits
    9 adds in trunk

[WASM-References] Add extra tests for Wasm references + fix element parsing and subtyping bugs
https://bugs.webkit.org/show_bug.cgi?id=199044

Reviewed by Saam Barati.

JSTests:

Add wasm references spec tests as well as a worker test.

  • wasm.yaml:
  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Element):

  • wasm/js-api/element.js:

(assert.throws.new.WebAssembly.Module.builder.WebAssembly):

  • wasm/references-spec-tests/ref_is_null.js: Added.

(hostref):
(is_hostref):
(is_funcref):
(eq_ref):
(let.handler.get target):
(register):
(module):
(instance):
(call):
(get instance):
(exports):
(run):
(assert_malformed):
(assert_invalid):
(assert_unlinkable):
(assert_uninstantiable):
(assert_trap):
(try.f):
(catch):
(assert_exhaustion):
(assert_return):
(assert_return_canonical_nan):
(assert_return_arithmetic_nan):
(assert_return_ref):
(assert_return_func):

  • wasm/references-spec-tests/ref_null.js: Added.

(hostref):
(is_hostref):
(is_funcref):
(eq_ref):
(let.handler.get target):
(register):
(module):
(instance):
(call):
(get instance):
(exports):
(run):
(assert_malformed):
(assert_invalid):
(assert_unlinkable):
(assert_uninstantiable):
(assert_trap):
(try.f):
(catch):
(assert_exhaustion):
(assert_return):
(assert_return_canonical_nan):
(assert_return_arithmetic_nan):
(assert_return_ref):
(assert_return_func):

  • wasm/references/element_parsing.js: Added.

(module):

  • wasm/references/func_ref.js:
  • wasm/references/multitable.js:
  • wasm/references/table_misc.js:

(TableSize.0.End.End.WebAssembly):

  • wasm/references/validation.js:

(assert.throws):

Source/JavaScriptCore:

Fix parsing table indices from the element section. The byte that we previously read as the table index actually tells us how to parse the table index.
Fix some areas where we got the isSubtype check wrong, causing funcrefs to not be considred anyrefs.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::unify):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseElement):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::unify):

LayoutTests:

Add wasm references spec tests as well as a worker test.

  • workers/wasm-references.html: Added.
  • workers/wasm-references/test.js: Added.

(const._fail):
(const.isNotA.assert.isNotA):
(const):
(switch.typeof):
(Builder):
(Builder.prototype.setChecked):
(Builder.prototype.setPreamble):
(Builder.prototype._functionIndexSpaceKeyHash):
(Builder.prototype._registerFunctionToIndexSpace):
(Builder.prototype._getFunctionFromIndexSpace):
(Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
(Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.const.codeBuilder.End.switch.case.string_appeared_here.e):
(Builder.prototype._registerSectionBuilders.this.Unknown):
(done):
(runTest.worker.onmessage):
(runTest):
(doGC):

  • workers/wasm-references/worker.js: Added.

(const._fail):
(const.isNotA.assert.isNotA):

11:55 AM Changeset in webkit [246644] by youenn@apple.com
  • 17 edits
    2 copies
    2 adds in trunk

Changing settings of a MediaStreamTrack clone should not alter the settings of the original track
https://bugs.webkit.org/show_bug.cgi?id=198840

Reviewed by Eric Carlson.

Source/WebCore:

Rename RealtimeVideoSource in RealtimeVideoCaptureSource.
Introduce RealtimeVideoSource as a class wrapping RealtimeVideoCaptureSource.
Its goal is to be able to have independent settings from its underlying RealtimeVideoCaptureSource.
It can also adapt size based on its settings if different than its RealtimeVideoCaptureSource.
Apply this wrapping for AV video sources as well as mock video sources.
Test: fast/mediastream/mediastreamtrack-video-clone.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::clone):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp: Added.

(WebCore::RealtimeVideoCaptureSource::RealtimeVideoCaptureSource):
(WebCore::RealtimeVideoCaptureSource::~RealtimeVideoCaptureSource):
(WebCore::RealtimeVideoCaptureSource::prepareToProduceData):
(WebCore::RealtimeVideoCaptureSource::presets):
(WebCore::RealtimeVideoCaptureSource::setSupportedPresets):
(WebCore::RealtimeVideoCaptureSource::standardVideoSizes):
(WebCore::updateMinMax):
(WebCore::RealtimeVideoCaptureSource::updateCapabilities):
(WebCore::RealtimeVideoCaptureSource::supportsSizeAndFrameRate):
(WebCore::RealtimeVideoCaptureSource::frameRateRangeIncludesRate):
(WebCore::RealtimeVideoCaptureSource::presetSupportsFrameRate):
(WebCore::RealtimeVideoCaptureSource::supportsCaptureSize):
(WebCore::RealtimeVideoCaptureSource::shouldUsePreset):
(WebCore::RealtimeVideoCaptureSource::bestSupportedSizeAndFrameRate):
(WebCore::RealtimeVideoCaptureSource::setSizeAndFrameRate):
(WebCore::RealtimeVideoCaptureSource::adaptVideoSample):
(WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
(WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):
(WebCore::SizeAndFrameRate::toJSONObject const):
(WebCore::SizeAndFrameRate::toJSONString const):

  • platform/mediastream/RealtimeVideoCaptureSource.h: Added.

(WebCore::RealtimeVideoCaptureSource::sampleRotation const):
(WebCore::RealtimeVideoCaptureSource::prefersPreset):
(WebCore::RealtimeVideoCaptureSource::setFrameRateWithPreset):
(WebCore::RealtimeVideoCaptureSource::canResizeVideoFrames const):
(WebCore::RealtimeVideoCaptureSource::setDefaultSize):
(WebCore::RealtimeVideoCaptureSource::observedFrameRate const):
(WTF::LogArgument<WebCore::SizeAndFrameRate>::toString):

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::RealtimeVideoSource):
(WebCore::m_source):
(WebCore::RealtimeVideoSource::~RealtimeVideoSource):
(WebCore::RealtimeVideoSource::startProducingData):
(WebCore::RealtimeVideoSource::stopProducingData):
(WebCore::RealtimeVideoSource::supportsSizeAndFrameRate):
(WebCore::RealtimeVideoSource::setSizeAndFrameRate):
(WebCore::RealtimeVideoSource::sourceMutedChanged):
(WebCore::RealtimeVideoSource::sourceSettingsChanged):
(WebCore::RealtimeVideoSource::preventSourceFromStopping):
(WebCore::RealtimeVideoSource::sourceStopped):
(WebCore::RealtimeVideoSource::videoSampleAvailable):
(WebCore::RealtimeVideoSource::clone):

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:

(WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):

  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::create):
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):

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

(WebCore::MockRealtimeVideoSource::create):

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::supportsSizeAndFrameRate):
(WebCore::MockRealtimeVideoSource::setSizeAndFrameRate):

  • platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

  • fast/mediastream/mediastreamtrack-video-clone-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-clone.html: Added.
11:28 AM Changeset in webkit [246643] by sbarati@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. More speculative build fixing for watchOS after r246631.

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
11:03 AM Changeset in webkit [246642] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Layout Test imported/blink/fast/css/user-select-none.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=199071

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-20

  • platform/ios-wk2/TestExpectations:
10:58 AM Changeset in webkit [246641] by Shawn Roberts
  • 3 edits in trunk/LayoutTests

Moving expectations files
https://bugs.webkit.org/show_bug.cgi?id=196495

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
10:35 AM Changeset in webkit [246640] by sbarati@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Speculative build fix for watchOS after r246631.

  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
10:05 AM Changeset in webkit [246639] by commit-queue@webkit.org
  • 13 edits
    1 copy in trunk

[GTK] Enable navigation swipe layout tests
https://bugs.webkit.org/show_bug.cgi?id=198995

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-06-20
Reviewed by Michael Catanzaro.

Source/WebKit:

Implement API for enabling and controlling swipes from WebKitTestRunner.

Implement beginSimulatedSwipeInDirectionForTesting() and completeSimulatedSwipeInDirectionForTesting()
in ViewGestureController for controlling the test swipes. Add functions in WebKitWebViewBase for calling
them.

Simulate the gesture by generating two scroll events: one to begin the gesture and one to complete it.

Since there's no reliable way to set source device type of the generated events to touchpad, don't check
source device type for simulated swipes.

  • UIProcess/API/C/gtk/WKView.cpp:

(WKViewSetEnableBackForwardNavigationGesture): Added.
(WKViewBeginBackSwipeForTesting): Added.
(WKViewCompleteBackSwipeForTesting): Added.

  • UIProcess/API/C/gtk/WKViewPrivate.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseBeginBackSwipeForTesting): Added.
(webkitWebViewBaseCompleteBackSwipeForTesting): Added.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/ViewGestureController.h:
  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
Skip source device type check for simulated swipes. Also, remove an incorrect FIXME.
(WebKit::createScrollEvent): Added.
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting): Implemented.
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting): Implemented.

Tools:

Add a way for tests to enable and then control swipe gesture on GTK.

  • TestRunnerShared/UIScriptContext/UIScriptController.cpp: Hide

empty implementations of beginBackSwipe() and completeBackSwipe() for GTK.

  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:

(WTR::PlatformWebView::setNavigationGesturesEnabled): Implemented.

  • WebKitTestRunner/gtk/UIScriptControllerGtk.cpp: Added.

(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):

LayoutTests:

Enable the existing tests for the swipe gesture.

swipe/pushState-programmatic-back-while-swiping-crash.html is not applicable because
it deals with NSEvents directly, skip it.

swipe/main-frame-pinning-requirement.html is flaky, same as on Mac.

swipe/pushstate-with-manual-scrollrestoration.html passes, don't mark it as failure.

  • platform/gtk/TestExpectations:
10:04 AM Changeset in webkit [246638] by cturner@igalia.com
  • 2 edits in trunk/Source/WebKit

[GTK] Make startup pause available in DEVELOPER_MODE rather than DEBUG.
https://bugs.webkit.org/show_bug.cgi?id=199069

Reviewed by Michael Catanzaro.

  • WebProcess/gtk/WebProcessMainGtk.cpp: Allow developers to pause

the web process in DEVELOPER_MODE rather than only DEBUG, matching
the WPE behaviour and also the purpose of DEVELOPER_MODE.

10:04 AM Changeset in webkit [246637] by commit-queue@webkit.org
  • 5 edits in trunk

[GTK] HTTP layout tests don't run in flatpak
https://bugs.webkit.org/show_bug.cgi?id=199067

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-06-20
Reviewed by Michael Catanzaro.

Tools:

Stop bind mounting /app/lib/perl to /etc/perl because Perl doesn't actually
check that path. Instead, add /app/lib/perl to Apache config directly.

/usr/manifest.json file is not guaranteed to exist in sandbox, check for
/.flatpak-info instead.

  • Scripts/webkitpy/port/base.py:

(Port._is_flatpak):
(Port._in_flatpak_sandbox):

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):
(is_sandboxed):

LayoutTests:

Set PERL5LIB environment variable in Apache config.

  • http/conf/flatpak-httpd.conf:
9:21 AM Changeset in webkit [246636] by Darin Adler
  • 26 edits in trunk

Tidy up the remaining bits of the AtomicString to AtomString rename
https://bugs.webkit.org/show_bug.cgi?id=198990

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage): Use flagIsAtom.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile): Ditto.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile): Ditto.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileHasOwnProperty): Ditto.
(JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent): Ditto.

Source/WebCore:

  • bindings/scripts/test/JS/JSTestObj.cpp: Updated names.
  • bindings/scripts/test/TestObj.idl: Ditto.
  • css/makeprop.pl: Updated comment.
  • css/makevalues.pl: Ditto.
  • html/FormController.cpp:

(WebCore::FormKeyGenerator::formKey): Ditto.

Source/WTF:

  • wtf/text/AtomString.cpp: Fix a comment.
  • wtf/text/AtomString.h: Tweak formatting a bit. Use nullptr instead of 0.

Removed "using AtomicString = AtomString".

  • wtf/text/AtomStringImpl.cpp:

(WTF::CStringTranslator::translate): Use setIsAtom instead of setIsAtomic.
(WTF::UCharBufferTranslator::translate): Ditto.
(WTF::HashAndUTF8CharactersTranslator::translate): Ditto.
(WTF::SubstringTranslator::translate): Ditto.
(WTF::LCharBufferTranslator::translate): Ditto.
(WTF::BufferFromStaticDataTranslator::translate): Ditto.
(WTF::AtomStringImpl::addSlowCase): Ditto.
(WTF::AtomStringImpl::lookUpSlowCase): Updated assertion message.

  • wtf/text/AtomStringImpl.h: Tweaked the implementation of add.

Updated comments to say AtomString.

  • wtf/text/AtomStringTable.cpp:

(WTF::AtomStringTable::~AtomStringTable): Use setIsAtom.

  • wtf/text/StringImpl.h: Updated name of StringAtomic and

s_hashFlagStringKindIsAtom. Renamed to flagIsAtom and setIsAtom.

  • wtf/text/WTFString.cpp:

(WTF::String::isSafeToSendToAnotherThread const): Updated comment.

Tools:

  • Scripts/do-webcore-rename: Removed already-done renames.
  • TestWebKitAPI/Tests/WTF/StringImpl.cpp: Rename one use of "atomic".

LayoutTests:

  • js/dopey-rope-with-16-bit-propertyname-expected.txt: Rename to AtomString.
  • js/dopey-rope-with-16-bit-propertyname.html: Ditto.
8:55 AM Changeset in webkit [246635] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

[GTK] The Previous/Next gesture should handle RTL
https://bugs.webkit.org/show_bug.cgi?id=198707

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-06-20
Reviewed by Michael Catanzaro.

The gesture uses PageClientImpl::userInterfaceLayoutDirection() to determine the text
direction. Implement that method, then adjust drawing so that the pages move from/to
the left instead of right side for RTL locales.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::): Implemented.

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

(WebKit::ViewGestureController::draw):

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

[LFC][IFC] Make the initial strut explicit
https://bugs.webkit.org/show_bug.cgi?id=199057
<rdar://problem/51927864>

Reviewed by Antti Koivisto.

The strut always sets the initial vertical constraints on the new line in strict mode. However in quirks mode
we can ignore it as long as there's no baseline type content on the line.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):

  • layout/inlineformatting/InlineLine.h:
6:59 AM Changeset in webkit [246633] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Introduce Line::InitialConstraints
https://bugs.webkit.org/show_bug.cgi?id=199056
<rdar://problem/51927597>

Reviewed by Antti Koivisto.

Line::InitialConstraints, as the name suggests, holds the initial constraint values for the new line.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Line):
(WebCore::Layout::m_skipVerticalAligment):
(WebCore::Layout::m_lineLogicalWidth): Deleted.

  • layout/inlineformatting/InlineLine.h:
4:08 AM Changeset in webkit [246632] by Carlos Garcia Campos
  • 51 edits
    4 deletes in trunk

[GTK] Remove support for GTK2 plugins
https://bugs.webkit.org/show_bug.cgi?id=199065

Reviewed by Sergio Villar Senin.

.:

  • Source/cmake/FindGDK2.cmake: Removed.
  • Source/cmake/FindGTK2.cmake: Removed.
  • Source/cmake/OptionsGTK.cmake:

PerformanceTests:

  • StitchMarker/wtf/Platform.h:

Source/WebCore:

  • PlatformGTK.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • platform/FreeType.cmake:
  • platform/SourcesGLib.txt:
  • platform/graphics/Color.h:
  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::createPlatformDisplay):

  • platform/graphics/gtk/ColorGtk.cpp:

(WebCore::Color::operator GdkRGBA const):

  • platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:

(WebCore::onFrameClockUpdate):
(WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback):

  • platform/graphics/gtk/DisplayRefreshMonitorGtk.h:

(WebCore::DisplayRefreshMonitorGtk::create):

  • platform/graphics/gtk/GdkCairoUtilities.cpp:
  • platform/gtk/GRefPtrGtk.cpp:
  • platform/gtk/GRefPtrGtk.h:
  • platform/gtk/GtkVersioning.c: Removed.
  • platform/gtk/GtkVersioning.h: Removed.
  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::getClipboardContents):

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::modifiersForGdkKeyEvent):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

  • platform/gtk/PlatformMouseEventGtk.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent):

  • platform/gtk/PlatformScreenGtk.cpp:

(WebCore::screenIsTouchPrimaryInputDevice):

  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):

  • platform/gtk/ScrollbarThemeGtk.cpp:
  • platform/gtk/ScrollbarThemeGtk.h:
  • platform/gtk/WidgetGtk.cpp:
  • rendering/RenderThemeGtk.cpp:
  • rendering/RenderThemeGtk.h:

Source/WebKit:

  • PlatformGTK.cmake:
  • Shared/Plugins/Netscape/NetscapePluginModule.cpp:

(WebKit::moduleMixesGtkSymbols):

  • Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:

(WebKit::NetscapePluginModule::getPluginInfo):

  • Shared/Plugins/PluginModuleInfo.h:
  • Shared/gtk/WebEventFactory.cpp:

(WebKit::isGdkKeyCodeFromKeyPad):
(WebKit::buttonForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):
(WebKit::WebEventFactory::createWebTouchEvent):

  • SourcesGTK.txt:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:
  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/Plugins/gtk/PluginInfoCache.cpp:

(WebKit::PluginInfoCache::getPluginInfo):
(WebKit::PluginInfoCache::updatePluginInfo):

  • UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:

(WebKit::PluginInfoStore::getPluginInfo):

  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:

(WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes):
(WebKit::PluginProcessProxy::scanPlugin):

  • WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

Source/WTF:

  • wtf/Platform.h:
  • wtf/glib/GTypedefs.h:

Tools:

  • EWSTools/ubuntu-ews-packages:
  • TestWebKitAPI/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformGTK.cmake:
  • flatpak/org.webkit.GTK.yaml:
  • gtk/install-dependencies:
2:40 AM Changeset in webkit [246631] by mmaxfield@apple.com
  • 37 edits
    2 copies
    6 adds in trunk

[WHLSL] Hook up common texture functions
https://bugs.webkit.org/show_bug.cgi?id=198704
<rdar://problem/51668841>

Reviewed by Saam Barati.

Source/WebCore:

This patch adds the Metal implementation of the Sample(), Load(), and GetDimensions()
texture functions. The implementation simply performs string concatenation to produce the
correct results, and adds many new native functions to the standard library.

We can't zero-fill texture types or sampler types, so this patch forbids default
constructors for those types. It also forbids those types to exist within arrays, array
references, or pointers, becuase an out-of-bounds access may cause us to try to zero-fill
them.

Tests: webgpu/whlsl-textures-getdimensions.html

webgpu/whlsl-textures-load.html
webgpu/whlsl-textures-sample.html

  • Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h: Add some more introspection functions

so we can generate the necessary Metal functions for the appropriate texture types.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const):
(WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const):
(WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const):
(WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const):
(WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const):
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray):
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture):
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture):
(WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension):
(WebCore::WHLSL::AST::NativeTypeDeclaration::isAtom const): Deleted.

  • Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Native types can be passed into

entry points, too.
(WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Entry points that return void don't need a

semantic.
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Implement the functions.

(WebCore::WHLSL::Metal::vectorLength):
(WebCore::WHLSL::Metal::vectorInnerType):
(WebCore::WHLSL::Metal::vectorSuffix):
(WebCore::WHLSL::Metal::writeNativeFunction):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp: Textures come in two flavors: sample-able

and read/write-able. Make sure we produce the correct Metal types for them.
(WebCore::WHLSL::Metal::writeNativeType):

  • Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: We can't auto-initialize textures and

samplers. Therefore, this function needs to be able to fail.
(WebCore::WHLSL::AutoInitialize::visit):
(WebCore::WHLSL::autoInitializeVariables):

  • Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h:
  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: We can't auto-initialize textures, so users

shouldn't be able to either.
(WebCore::WHLSL::checkDuplicateFunctions):

  • Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp: Added. Make sure textures and samplers can't

exist inside arrays, array references, or pointers. This is because out-of-bounds accesses may cause
us to attempt to zero-fill the inner type, but we can't zero-fill textures and samplers.
(WebCore::WHLSL::TextureReferencesChecker::TextureReferencesChecker):
(WebCore::WHLSL::Searcher::Searcher):
(WebCore::WHLSL::Searcher::found const):
(WebCore::WHLSL::Searcher::visit):
(WebCore::WHLSL::TextureReferencesChecker::containsTextureOrSampler):
(WebCore::WHLSL::TextureReferencesChecker::visit):
(WebCore::WHLSL::checkTextureReferences):

  • Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h.
  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:
  • Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp: Record more detailed information about texture types,

so we can emit correct Metal code.
(WebCore::WHLSL::Intrinsics::addFullTexture):
(WebCore::WHLSL::Intrinsics::addDepthTexture):

  • Modules/webgpu/WHLSL/WHLSLIntrinsics.h:

(WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: Nested NameResolvers need to propagate their error. Also,

native functions with named arguments shouldn't be adding their arguments to the global scope.
(WebCore::WHLSL::NameResolver::visit):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:
  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::prepareShared):

  • Modules/webgpu/WHLSL/WHLSLProgram.h:

(WebCore::WHLSL::Program::intrinsics const):

  • Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: Metal doesn't have writable depth textures.
  • Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Don't generate default constructors for textures

or samplers.
(WebCore::WHLSL::synthesizeConstructors):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPUTexture.h: Make texture usages more clear.

(WebCore::GPUTexture::isSampled const):
(WebCore::GPUTexture::isStorage const):

  • platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Ditto.

(WebCore::GPUBindGroup::tryCreate):

  • platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Ditto.

(WebCore::GPUProgrammablePassEncoder::setBindGroup):

  • platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Ditto.

(WebCore::mtlTextureUsageForGPUTextureUsageFlags):

LayoutTests:

Make the text tests play better with js-test-pre.js.

  • webgpu/whlsl-buffer-length.html:
  • webgpu/whlsl-compute-expected.txt:
  • webgpu/whlsl-compute.html:
  • webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html:
  • webgpu/whlsl-null-dereference-expected.txt:
  • webgpu/whlsl-null-dereference.html:
  • webgpu/whlsl-oob-access-expected.txt:
  • webgpu/whlsl-oob-access.html:
  • webgpu/whlsl-textures-getdimensions-expected.txt: Added.
  • webgpu/whlsl-textures-getdimensions.html: Copied from LayoutTests/webgpu/whlsl-buffer-length.html.
  • webgpu/whlsl-textures-load-expected.html: Added.
  • webgpu/whlsl-textures-load.html: Added.
  • webgpu/whlsl-textures-sample-expected.html: Added.
  • webgpu/whlsl-textures-sample.html: Added.

Jun 19, 2019:

9:41 PM Changeset in webkit [246630] by ysuzuki@apple.com
  • 8 edits in trunk

[bmalloc] IsoHeap's initialization is racy with IsoHeap::isInitialized
https://bugs.webkit.org/show_bug.cgi?id=199053

Reviewed by Saam Barati.

Source/bmalloc:

IsoHeap's initialization code is racy. Let's see the isInitialized and the initialization code.

isInitialized:

template<typename Type>
bool IsoHeap<Type>::isInitialized()
{

std::atomic<unsigned>* atomic =

reinterpret_cast<std::atomic<unsigned>*>(&m_allocatorOffsetPlusOne);

return !!atomic->load(std::memory_order_acquire);

}

initialization:

if (!handle.isInitialized()) {

std::lock_guard<Mutex> locker(handle.m_initializationLock);
if (!handle.isInitialized()) {

auto* heap = new IsoHeapImpl<typename api::IsoHeap<Type>::Config>();
std::atomic_thread_fence(std::memory_order_seq_cst);
handle.setAllocatorOffset(heap->allocatorOffset()); <================= (1)
handle.setDeallocatorOffset(heap->deallocatorOffset());
(2)
handle.m_impl = heap;

}

}

IsoHeap::isInitialized is loading m_allocatorOffsetPlusOne with acquire fence. On the other hand, the initialization
code configures m_allocatorOffsetPlusOne (1) before configuring m_deallocatorOffsetPlusOne (2). Let's consider the following
case.

  1. Thread A is at (1)
  2. Thread B calls handle.isInitialized(). Then B think that handle is already initialized while it lacks m_deallocatorOffsetPlusOne and m_impl pointer.
  3. Thread B uses this handle, and does std::max(handle.allocatorOffset(), handle.deallocatorOffset()). But m_deallocatorOffsetPlusOne is not configured yet. As a result, deallocatorOffset() returns 0xffffffff (b/c it calculates m_deallocatorOffsetPlusOne - 1, and m_deallocatorOffsetPlusOne is first zero-initialized before IsoHeap initialization happens).
  4. std::max returns 0xffffffff as an offset. Of course, this is wrong, and leading to the release assertion.

This patch fixes the above issue by,

  1. Add IsoHeap::initialize() function instead of initializing it in IsoTLS
  2. Change isInitialized() function to load m_impl pointer instead of m_allocatorOffsetPlusOne with acquire fence.
  3. In initialize() function, we store m_heap with release fence at last.
  • bmalloc/IsoHeap.h:
  • bmalloc/IsoHeapInlines.h:

(bmalloc::api::IsoHeap<Type>::isInitialized):
(bmalloc::api::IsoHeap<Type>::initialize):

  • bmalloc/IsoTLSInlines.h:

(bmalloc::IsoTLS::ensureHeap):

Source/WTF:

Add constexpr static functions to generate pseudo random numbers from LINE.

  • wtf/WeakRandom.h:

(WTF::WeakRandom::nextState):
(WTF::WeakRandom::generate):
(WTF::WeakRandom::advance):

Tools:

Added a test stressing IsoHeap with multiple threads.

  • TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp:

(assertHasObjects):
(assertHasOnlyObjects):
(assertClean):
(TEST):

9:36 PM Changeset in webkit [246629] by commit-queue@webkit.org
  • 4 edits
    1 delete in trunk/LayoutTests

Make preload/link-header-preload-imagesrcset.html work on DPR != 1
https://bugs.webkit.org/show_bug.cgi?id=198533

Patch by Rob Buis <rbuis@igalia.com> on 2019-06-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Make the test take DPR into account.

  • web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html:
  • web-platform-tests/preload/link-header-preload-imagesrcset.html:

LayoutTests:

Remove unneeded iOS test expectations.

  • platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset-expected.txt: Removed.
  • platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset-expected.txt: Removed.
8:18 PM Changeset in webkit [246628] by Justin Fan
  • 4 edits
    3 adds in trunk

[WHLSL] Create a shading language test harness
https://bugs.webkit.org/show_bug.cgi?id=198978

Reviewed by Myles C. Maxfield.

Source/WebCore:

When creating MTLArgumentEncoders for argument buffers, the user's arguments
must match the order that they are declared in the shader. Move back-end information
such as buffer lengths to the end of the argument arrays.

Test: webgpu/whlsl-harness-test.html

  • Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:

(WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):

  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:

(WebCore::GPUBindGroupLayout::tryCreate):

LayoutTests:

Introduce a test harness that can be used to test WebGPU shader compilation and functionality.
Currently using MSL.
Will be replaced with WHLSL as it gains the minimum features needed to support.

  • webgpu/js/whlsl-test-harness.js: Added.

(isVectorType):
(convertTypeToArrayType):
(convertTypeToWHLSLType):
(Data):
(Data.prototype.async.getArrayBuffer):
(Data.prototype.get type):
(Data.prototype.get isPointer):
(Data.prototype.get buffer):
(Data.prototype.get byteLength):
(Harness.prototype._initialize):
(Harness.prototype.async.callTypedFunction):
(Harness.prototype.async.callVoidFunction):
(Harness.prototype._setUpArguments):
(Harness.prototype._callFunction):
(Harness):
(harness._initialize.async):
(makeBool):
(makeInt):
(makeUchar):
(makeUint):
(makeFloat):
(makeFloat4):
(async.callBoolFunction):
(async.callIntFunction):
(async.callUcharFunction):
(async.callUintFunction):
(async.callFloatFunction):
(async.callFloat4Function):
(callVoidFunction):

  • webgpu/whlsl-harness-test-expected.txt: Added.
  • webgpu/whlsl-harness-test.html: Added.
7:18 PM Changeset in webkit [246627] by Alan Bujtas
  • 2 edits in trunk/Tools

[LFC] Expand tests coverage (1126 new tests -> 2324).

  • LayoutReloaded/misc/LFC-passing-tests.txt:
7:17 PM Changeset in webkit [246626] by dino@apple.com
  • 5 edits in trunk/Source

No menu pop-up when long pressing on a link in Firefox app
https://bugs.webkit.org/show_bug.cgi?id=199045
<rdar://problem/51422407>

Reviewed by Tim Horton.

Add a version check for linking on-or-after iOS 13. When
that isn't true, we don't use UIContextMenuInteraction
and instead fall back on the legacy UIPreviewItem API.

  • UIProcess/Cocoa/VersionChecks.h: Add FirstThatHasUIContextMenuInteraction.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _shouldUseContextMenus]): New method to decide if we should
use context menus or preview items.
(-[WKContentView setupInteraction]): Make the decision at runtime rather than
compile time.
(-[WKContentView _contentsOfUserInterfaceItem:]): Ditto.
(-[WKContentView _registerPreview]): Ditto.
(-[WKContentView _unregisterPreview]): Ditto.

7:05 PM Changeset in webkit [246625] by sbarati@apple.com
  • 5 edits
    2 adds in trunk

[WHLSL] The checker needs to resolve types for the anonymous variables in ReadModifyWrite expressions
https://bugs.webkit.org/show_bug.cgi?id=198988

Reviewed by Dean Jackson and Myles C. Maxfield.

Source/WebCore:

This patch makes it so that the Checker assigns types to the internal variables
in a read modify write expression. These were the only variables that didn't have
types ascribed to them.

This patch also does a fly by fix where we kept pointers to value types
in a HashMap in the checker. This is wrong precisely when the HashMap gets
resized. Instead, we now just store the value itself since we're just
dealing with a simple Variant that wraps either an empty struct or an
enum.

Test: webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html

  • Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:

(WebCore::WHLSL::AST::VariableDeclaration::setType):
(WebCore::WHLSL::AST::VariableDeclaration::type const):

  • Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Make it obvious that read

modify write expressions are such by prefixing them with "RMW".
(WebCore::WHLSL::ASTDumper::visit):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::Checker::visit):

LayoutTests:

  • webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables-expected.txt: Added.
  • webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html: Added.
6:47 PM Changeset in webkit [246624] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Debugger: current call frame indicator isn't vertically centered
https://bugs.webkit.org/show_bug.cgi?id=199015

Reviewed by Matt Baker.

  • UserInterface/Views/CallFrameTreeElement.css:

(.tree-outline .item.call-frame .status):

5:51 PM Changeset in webkit [246623] by Fujii Hironori
  • 6 edits
    1 add in trunk

Add WTF::crossThreadCopy(T&&) to utilize String::isolatedCopy() &&
https://bugs.webkit.org/show_bug.cgi?id=198957

Reviewed by Alex Christensen.

Source/WTF:

&&-qualified String::isolatedCopy() has a optimization path which
does just WTFMove if it isSafeToSendToAnotherThread which means
the object hasOneRef.

However, WTF::crossThreadCopy was using only &-qualified
isolatedCopy. To use the optimization, added
WTF::crossThreadCopy(T&&) overloading.

  • wtf/CrossThreadCopier.h:

(WTF::crossThreadCopy): Added a overload of (T&&).

  • wtf/CrossThreadTask.h:

(WTF::createCrossThreadTask): Removed explicit template arguments of crossThreadCopy.

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/CrossThreadCopier.cpp: Added.
5:50 PM Changeset in webkit [246622] by aestes@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS] Fall back to taking a UIView snapshohot for UITargetedPreviews if InteractionInformationAtPosition does not have an image
https://bugs.webkit.org/show_bug.cgi?id=199038
<rdar://problem/50555810>

Reviewed by Tim Horton.

In -contextMenuInteraction:previewForHighlightingMenuWithConfiguration: and friend, we
should always return a non-nil UITargetedPreview. When we do return nil, UIKit uses the web
view itself as the snapshot view, creating an unsightly animation.

For cases where we fail to create a UITargetedPreview from the information in
InteractionInformationAtPosition, this patch falls back to creating a UITargetedPreview with
a snapshot view obtained from
-[UIView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:].

Also renamed -targetedPreview to -_ensureTargetedPreview and cached the UITargetedPreview
for reuse in -contextMenuInteraction:previewForDismissingMenuWithConfiguration:.

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

(createFallbackTargetedPreview):
(-[WKContentView _ensureTargetedPreview]):
(-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteractionDidEnd:]):
(-[WKContentView _targetedPreview]): Renamed to _ensureTargetedPreview.

5:40 PM Changeset in webkit [246621] by Nikita Vasilyev
  • 5 edits in trunk

REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
https://bugs.webkit.org/show_bug.cgi?id=198505
<rdar://problem/51374780>

Reviewed by Matt Baker.

Source/WebInspectorUI:

Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.set text):

LayoutTests:

  • inspector/css/modify-css-property.html:

Listen for PropertiesChanged on the specific inline style declaration.
In Debug, PropertiesChanged may fire on a computed style declaration first,
causing the test to fail.

  • inspector/css/pseudo-element-matches-for-pseudo-element-node.html:

Drive-by: fix trailing white space.

5:38 PM Changeset in webkit [246620] by commit-queue@webkit.org
  • 4 edits in trunk

Optimize resolve method lookup in Promise static methods
https://bugs.webkit.org/show_bug.cgi?id=198864

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-06-19
Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml: Mark 18 test cases as passing.

Source/JavaScriptCore:

Lookup resolve method only once in Promise.{all,allSettled,race}.
(https://github.com/tc39/ecma262/pull/1506)

Already implemented in V8.

  • builtins/PromiseConstructor.js:
5:18 PM Changeset in webkit [246619] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
https://bugs.webkit.org/show_bug.cgi?id=199012

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Limit the failure expectation to High Sierra.
5:15 PM Changeset in webkit [246618] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove unused _pendingFilter from NetworkTableContentView
https://bugs.webkit.org/show_bug.cgi?id=199026

Reviewed by Devin Rousso.

This flag is no longer set as of https://trac.webkit.org/changeset/225895.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype._processPendingEntries):

5:14 PM Changeset in webkit [246617] by Keith Rollin
  • 7 edits in trunk/Tools

Relocate some test tools in non-mac builds
https://bugs.webkit.org/show_bug.cgi?id=198984
<rdar://problem/51873261>

Reviewed by Andy Estes.

The tools DumpRenderTree, WebKitTestRunner, LayoutTestHelper, and
TestNetscapePlugin get created in
WebKit.framework/Versions/A/Resources on non-mac builds. This is
incorrect, as those bundles are shallow bundles that don't use the
Versions hierarchy. Instead, store these files directly in
WebKit.framework.

Note that getting rid of just the "Versions/A" path components and
putting the files in WebKit.framework/Resources doesn't work as
codesign treats the result as an invalid layout.

The work in this patch involves changing the definition of the custom
build variable WEBKIT_FRAMEWORK_RESOURCES_PATH. The standard build
variable INSTALL_PATH is defined in terms of this variable. In order
to increase visiblity into this relationship, move both of these
variables into .xcconfig files if they weren't already. This
refactoring was done in a way to be the least disruptive and most
compatible with the previous definitions, even at the cost of being
repetitive.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
  • DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig:
  • DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig:
  • WebKitTestRunner/Configurations/BaseTarget.xcconfig:
5:13 PM Changeset in webkit [246616] by Devin Rousso
  • 8 edits in trunk/Source

Web Inspector: Network: replace CFNetwork SPI with new API where able
https://bugs.webkit.org/show_bug.cgi?id=198762

Reviewed by Timothy Hatcher.

Source/WebCore:

  • platform/network/NetworkLoadMetrics.h:

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

Source/WTF:

  • wtf/Platform.h:
4:36 PM Changeset in webkit [246615] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

DownloadMonitor::measuredThroughputRate should approach zero with no throughput
https://bugs.webkit.org/show_bug.cgi?id=198981
<rdar://problem/51456914>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-19
Reviewed by Geoffrey Garen.

When the timer fires to approximate the download rate, add a new timestamp with 0 bytes received since the last time we received bytes.
Then, if there's only one timestamp, assume the throughput rate is 0 instead of infinite.
This will prevent false positives estimating large download rates based on old data when the throughput drops to 0.

  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::measuredThroughputRate const):
(WebKit::DownloadMonitor::timerFired):

4:30 PM Changeset in webkit [246614] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Layout Tests in imported/w3c/web-platform-tests/websockets/ are flakey failures after r246406.
https://bugs.webkit.org/show_bug.cgi?id=199013

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-19

3:45 PM Changeset in webkit [246613] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Patch link should open the pretty patch
https://bugs.webkit.org/show_bug.cgi?id=199031

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ConfigureBuild.getPatchURL): Use the prettypatch url for patch.

2:47 PM Changeset in webkit [246612] by Simon Fraser
  • 18 edits in trunk

Source/WebCore:
REGRESSION (246538): Newyorker.com header scrolls on page

Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):
(WebCore::RenderLayerCompositor::updateScrollLayerClipping):
(WebCore::RenderLayerCompositor::frameViewDidScroll):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
(WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.

  • rendering/RenderLayerCompositor.h:

LayoutTests:
Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

  • compositing/iframes/scrolling-iframe-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt:
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
  • platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
2:33 PM Changeset in webkit [246611] by jer.noble@apple.com
  • 13 edits
    4 adds in trunk

iOS 12.2 Drawing portrait video to canvas is sideways
https://bugs.webkit.org/show_bug.cgi?id=196772
<rdar://problem/49781802>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-orientation-canvas.html

Move rotation code into its own ImageRotationSessionVT class for re-use across
all existing classes with rotation operations. Should slightly increase performance
for painting rotated media files, as the rotation only occurs once per frame, rather
than once per drawing operation.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:

(WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.

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

(WebCore::ImageDecoderAVFObjC::readTrackMetadata):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::setTrack):
(WebCore::transformToRotationProperties): Deleted.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

  • platform/graphics/cv/ImageRotationSessionVT.h: Added.

(WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
(WebCore::ImageRotationSessionVT::rotationProperties const):
(WebCore::ImageRotationSessionVT::rotatedSize):

  • platform/graphics/cv/ImageRotationSessionVT.mm: Added.

(WebCore::transformToRotationProperties):
(WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
(WebCore::ImageRotationSessionVT::rotate):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:

(WebCore::rotationToAngle):
(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
(WebCore::computeRotatedWidthAndHeight): Deleted.

LayoutTests:

  • media/content/no-rotation.mp4:
  • media/media-source/only-bcp47-language-tags-accepted-as-valid-expected.txt:
  • media/video-orientation-canvas-expected.html: Added.
  • media/video-orientation-canvas.html: Added.
  • media/video-test.js:

(waitFor):

2:29 PM Changeset in webkit [246610] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Some of the ASSERTs in CachedTypes.cpp should be RELEASE_ASSERTs
https://bugs.webkit.org/show_bug.cgi?id=199030

Reviewed by Mark Lam.

These assertions represent strong assumptions that the cache makes so
it's not safe to keep executing if they fail.

  • runtime/CachedTypes.cpp:

(JSC::Encoder::malloc):
(JSC::Encoder::Page::alignEnd):
(JSC::Decoder::ptrForOffsetFromBase):
(JSC::Decoder::handleForEnvironment const):
(JSC::Decoder::setHandleForEnvironment):
(JSC::CachedPtr::get const):
(JSC::CachedOptional::encode):
(JSC::CachedOptional::decodeAsPtr const): Deleted.

1:49 PM Changeset in webkit [246609] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add step to analyze Compile WebKit failures
https://bugs.webkit.org/show_bug.cgi?id=199025

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(CompileWebKit.evaluateCommand): Add AnalyzeCompileWebKitResults step.
(CompileWebKitToT): set haltOnFailure to False since we need to run AnalyzeCompileWebKitResults step.
(AnalyzeCompileWebKitResults): Class to analyze compile webkit steps results.
(AnalyzeCompileWebKitResults.start): If ToT fails to build, retry the build, else marked the build as failed. Note that
this step is run only when compile-webkit failed.

1:34 PM Changeset in webkit [246608] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Remove unused originsWithCredentials from WebsiteData
https://bugs.webkit.org/show_bug.cgi?id=199020

Reviewed by Geoffrey Garen.

  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::encode const):
(WebKit::WebsiteData::decode):

  • Shared/WebsiteData/WebsiteData.h:
1:28 PM Changeset in webkit [246607] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Send email notifications for failures
https://bugs.webkit.org/show_bug.cgi?id=198919

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/master.cfg:
12:44 PM Changeset in webkit [246606] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebKit

Crash at com.apple.WebKit: WebKit::WebsiteDataStore::processPools const
https://bugs.webkit.org/show_bug.cgi?id=198935
<rdar://problem/51549308>

Reviewed by Geoffrey Garen.

When WebProcessProxy is in WebProcessCache or is pre-warmed, it does not hold a strong reference of
WebProcessPool. In this case, we should not store the raw pointer of WebProcessPool and perform websiteDataStore
operations with it.
This patch should fix the crash at dereferencing null pointer of WebProcessPool in
WebsiteDataStore::processPools, but it is unclear why websiteDataStore comes to observe cached or prewarmed web
process that should not have web page. The release log may help us find the cause.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::processPoolIfExists const):

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

(WebKit::WebsiteDataStore::processPools const):

12:28 PM Changeset in webkit [246605] by achristensen@apple.com
  • 12 edits in trunk

Add a unit test for client certificate authentication
https://bugs.webkit.org/show_bug.cgi?id=197800

Reviewed by Youenn Fablet.

Source/WebKit:

  • Shared/cf/ArgumentCodersCF.cpp:

Move SPI declarations to SecuritySPI.h.

Source/WTF:

  • wtf/spi/cocoa/SecuritySPI.h:

Move declarations from ArgumentCodersCF.cpp so they can be shared.

Tools:

Make better abstractions for reading and writing from/to TCPServer.
Add a unit test that causes a client certificate authentication challenge to happen.

  • TestWebKitAPI/TCPServer.cpp:

(TestWebKitAPI::TCPServer::TCPServer):
(TestWebKitAPI::TCPServer::read):
(TestWebKitAPI::TCPServer::write):
(TestWebKitAPI::TCPServer::respondWithChallengeThenOK):
(TestWebKitAPI::TCPServer::respondWithOK):

  • TestWebKitAPI/TCPServer.h:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(credentialWithIdentity):
(-[ChallengeDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(TEST):
(-[ClientCertificateDelegate webView:didFinishNavigation:]):
(-[ClientCertificateDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[ClientCertificateDelegate challengeCount]):
(TestWebKitAPI::TEST):
(respondWithChallengeThenOK): Deleted.
(credentialWithIdentityAndKeychainPath): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:

(TEST):
(readRequest): Deleted.
(writeResponse): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::respondWithChallengeThenOK): Deleted.

12:21 PM Changeset in webkit [246604] by aboya@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=199021

  • platform/gtk/TestExpectations:
12:00 PM Changeset in webkit [246603] by Kocsen Chung
  • 29 edits in tags/Safari-608.1.30

Revert r246538. rdar://problem/51905737

11:59 AM Changeset in webkit [246602] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'sourceCodePosition.lineNumber')
https://bugs.webkit.org/show_bug.cgi?id=199019

Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

(WI.linkifyLocation):

11:45 AM Changeset in webkit [246601] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Correct the error object link color in dark mode.
https://bugs.webkit.org/show_bug.cgi?id=198033

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-06-19
Reviewed by Devin Rousso.

  • UserInterface/Views/ErrorObjectView.css:

(@media (prefers-dark-interface)):
(.error-object-link-container):

11:33 AM Changeset in webkit [246600] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

11:26 AM Changeset in webkit [246599] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.30

Tag Safari-608.1.30.

11:01 AM Changeset in webkit [246598] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Update preview API deprecation message.
https://bugs.webkit.org/show_bug.cgi?id=198974

  • UIProcess/API/Cocoa/WKUIDelegate.h:
10:42 AM Changeset in webkit [246597] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[GTK] Fix compilation errors for the GTK2 plugin process
https://bugs.webkit.org/show_bug.cgi?id=199000

Reviewed by Michael Catanzaro.

  • Shared/gtk/WebEventFactory.cpp: Use the GdkEvent union fields

when directly accessing event struct fields.
(WebKit::buttonForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

10:42 AM Changeset in webkit [246596] by Adrian Perez de Castro
  • 29 edits in trunk/Source

[WPE][GTK] Fix build with unified sources disabled
https://bugs.webkit.org/show_bug.cgi?id=198752

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • runtime/WeakObjectRefConstructor.h: Add missing inclusion of InternalFunction.h

and forward declaration of WeakObjectRefPrototype.

  • wasm/js/WebAssemblyFunction.cpp: Add missing inclusion of JSWebAssemblyHelpers.h

Source/WebCore:

No new tests needed.

  • Modules/indexeddb/server/UniqueIDBDatabase.h: Add missing forward declaration for IDBGetRecordData,

replace inclusion of UniqueIDBDatabaseConnection.h with a forward declaration.

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: Remove unneeded inclusion of

UniqueIDBDatabaseTransaction.h, add missing inclusion of UniqueIDBDatabase.h

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: Remove unneeded inclusion of

UniqueIDBDatabaseConnection.h inclusion.

  • bridge/c/c_class.cpp: Add inclusion of JSCJSValueInlines.h to avoid linker errors due

to missing JSValue inline functions.

  • dom/DocumentParser.h: Replace forward declaration of Document with inclusion of Document.h,

to avoid error due to usage of incomplete type in template expansion.

  • dom/Microtasks.h: Add missing forward declaration of JSC::VM
  • editing/markup.cpp: Add missing inclusion of PasteboardItemInfo.h
  • page/Quirks.h: Add missing forward declaration of WebCore::EventTarget
  • page/RuntimeEnabledFeatures.h: Add missing inclusion of wtf/Optional.h to avoid error due to

expansion of undefined template.

  • page/SocketProvider.h: Add missing forward declaration for Document.
  • platform/graphics/GraphicsLayerClient.h: Add missing inclusion of wtf/OptionSet.h to avoid

error due to expansion of undefined template.

  • rendering/RenderMultiColumnSpannerPlaceholder.h: Replace forward declaration of RenderMultiColumnFlow

with inclusion of RenderMultiColumnFlow.h to avoid error due to usage of undefined class.

Source/WebKit:

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker): Qualify SQLiteDatabase
with its namespace.

  • UIProcess/WebFrameProxy.h: Replace forward declaration of WebPageProxy with inclusion

of WebPageProxy.h to avoid build error due to usage of undefined class. Moved DataCallback
definition from WebPageProxy.h to avoid code using the type before its declaration.

  • UIProcess/WebPageProxy.h: Remove definition of DataCallback.
  • UIProcess/wpe/WebInspectorProxyWPE.cpp: Add missing forward declaration of

WebCore::FloatRect.
(WebKit::WebInspectorProxy::platformSetSheetRect): Qualify FloatRect with its namespace.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp: Qualify all occurrences of

PageIdentifier with its namespace.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::focusFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):

  • WebProcess/Cache/WebCacheStorageConnection.cpp: Ditto.

(WebKit::WebCacheStorageConnection::open):
(WebKit::WebCacheStorageConnection::remove):
(WebKit::WebCacheStorageConnection::retrieveCaches):
(WebKit::WebCacheStorageConnection::retrieveRecords):
(WebKit::WebCacheStorageConnection::batchDeleteOperation):
(WebKit::WebCacheStorageConnection::batchPutOperation):

  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Add missing inclusion of WebPage.h
  • WebProcess/WebPage/gtk/WebPageGtk.cpp: Add missing inclusion of gtk/gtk.h
  • WebProcess/WebPage/wpe/WebPageWPE.cpp: Add missing inclusion of WebPageProxy.h

Source/WTF:

  • wtf/text/StringBuilder.h: Add missing include of StringConcatenateNumbers.h
10:38 AM Changeset in webkit [246595] by Truitt Savell
  • 2 edits in trunk/LayoutTests

webgpu/blend-color-triangle-strip.html is a flakey failure since introduction.
https://bugs.webkit.org/show_bug.cgi?id=198921

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-19

  • platform/mac-wk2/TestExpectations:
10:29 AM Changeset in webkit [246594] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/websockets/Create-Secure-verify-url-set-non-default-port.any.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=199013

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-19

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
10:21 AM Changeset in webkit [246593] by Antti Koivisto
  • 17 edits
    2 adds in trunk

RequestedScrollPosition shouldn't be applied after node reattach
https://bugs.webkit.org/show_bug.cgi?id=198994
<rdar://problem/51439685>

Reviewed by Simon Fraser.

Source/WebCore:

Test: scrollingcoordinator/ios/scroll-position-after-reattach.html

If a scrolling node gets reattached, its scroll position resets to (0,0) or whatever the previous
requestedScrollPosition was, and the current position is lost.

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateFixedNode::setAllPropertiesChanged): Deleted.

Rename to better reflect what this is for.

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateFrameHostingNode.cpp:

(WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateFrameHostingNode.h:
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStatePositionedNode.cpp:

(WebCore::ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStatePositionedNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):

Don't set RequestedScrollPosition. It is a special property that is applied only once on request
and shouldn't get reapplied. Nodes should keep their existing scroll position on reattach.

(WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateStickyNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::nodeWasReattachedRecursive):

LayoutTests:

  • scrollingcoordinator/ios/scroll-position-after-reattach-expected.html: Added.
  • scrollingcoordinator/ios/scroll-position-after-reattach.html: Added.
10:13 AM Changeset in webkit [246592] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[GTK] Page blinks after navigation swipe if it triggered PSON
https://bugs.webkit.org/show_bug.cgi?id=198996

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-06-19
Reviewed by Michael Catanzaro.

Disconnect and then reconnect ViewGestureController during process swap
instead of destroying and re-creating it.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::PageClientImpl::processWillSwap): Added.
(WebKit::PageClientImpl::PageClientImpl::processDidExit): Implemented.

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

(webkitWebViewBaseWillSwapWebProcess): Added.
Disconnect ViewGestureController if it exists.
(webkitWebViewBaseDidExitWebProcess): Added.
Destroy ViewGestureController.
(webkitWebViewBaseDidRelaunchWebProcess):
Reconnect the ViewGestureController if it exists.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
9:59 AM Changeset in webkit [246591] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
https://bugs.webkit.org/show_bug.cgi?id=199012

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:41 AM Changeset in webkit [246590] by Michael Catanzaro
  • 2 edits in trunk/Tools

Unreviewed, fix build warnings in TestWebKitAPIInjectedBundle

System headers are being included without SYSTEM again here.

  • TestWebKitAPI/PlatformGTK.cmake:
8:36 AM Changeset in webkit [246589] by Justin Michaud
  • 53 edits in trunk

[WASM-References] Rename anyfunc to funcref
https://bugs.webkit.org/show_bug.cgi?id=198983

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/function-tests/basic-element.js:
  • wasm/function-tests/context-switch.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(makeInstance):
(assert.eq.makeInstance):

  • wasm/function-tests/exceptions.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/grow-memory-2.js:

(assert.eq.instance.exports.foo):

  • wasm/function-tests/nameSection.js:

(const.compile):

  • wasm/function-tests/stack-overflow.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(assertOverflows.makeInstance):

  • wasm/function-tests/table-basic-2.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/table-basic.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/trap-from-start-async.js:
  • wasm/function-tests/trap-from-start.js:
  • wasm/js-api/Module.exports.js:

(assert.truthy):

  • wasm/js-api/Module.imports.js:

(assert.truthy):

  • wasm/js-api/call-indirect.js:

(const.oneTable):
(const.multiTable):
(multiTable.const.makeTable):
(multiTable):
(multiTable.Polyphic2Import):
(multiTable.VirtualImport):

  • wasm/js-api/element-data.js:
  • wasm/js-api/element.js:

(assert.throws.new.WebAssembly.Module.builder.WebAssembly):
(assert.throws):
(badInstantiation.makeModule):
(badInstantiation.test):
(badInstantiation):

  • wasm/js-api/extension-MemoryMode.js:
  • wasm/js-api/table.js:

(new.WebAssembly.Module):
(assert.throws):
(assertBadTableImport):
(assert.throws.WebAssembly.Table.prototype.grow):
(new.WebAssembly.Table):
(assertBadTable):
(assert.truthy):

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/js-api/unique-signature.js:

(CallIndirectWithDuplicateSignatures):

  • wasm/js-api/wrapper-function.js:
  • wasm/modules/table.wat:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wat:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wat:
  • wasm/modules/wasm-imports-wasm-exports/imports.wat:
  • wasm/modules/wasm-imports-wasm-exports/sum.wat:
  • wasm/references/anyref_table.js:
  • wasm/references/anyref_table_import.js:

(doSet):
(assert.throws):

  • wasm/references/func_ref.js:

(makeFuncrefIdent):
(assert.eq.instance.exports.fix):
(GetLocal.0.I32Const.0.TableSet.0.End.End.WebAssembly.assert.throws):
(GetLocal.0.I32Const.0.TableSet.0.End.End.WebAssembly):
(let.importedFun.of):
(makeAnyfuncIdent): Deleted.
(makeAnyfuncIdent.fun): Deleted.

  • wasm/references/multitable.js:

(assert.eq):
(assert.throws):

  • wasm/references/table_misc.js:

(GetLocal.0.TableFill.0.End.End.WebAssembly):

  • wasm/references/validation.js:

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/spec-harness/index.js:
  • wasm/spec-harness/wasm-constants.js:
  • wasm/spec-harness/wasm-module-builder.js:

(WasmModuleBuilder.prototype.toArray):

  • wasm/spec-harness/wast.js:

(elem_type):
(string_of_elem_type):
(string_of_table_type):

  • wasm/spec-tests/jsapi.js:
  • wasm/stress/wasm-table-grow-initialize.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

Anyfunc should become funcref since it was renamed in the spec. We should also support the string 'anyfunc' in the table constructor since this is
the only non-binary-format place where it is exposed to users.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::gFuncref):
(JSC::Wasm::AirIRGenerator::tmpForType):
(JSC::Wasm::AirIRGenerator::emitCCall):
(JSC::Wasm::AirIRGenerator::moveOpForValueType):
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addLocal):
(JSC::Wasm::AirIRGenerator::addConstant):
(JSC::Wasm::AirIRGenerator::addRefFunc):
(JSC::Wasm::AirIRGenerator::addReturn):
(JSC::Wasm::AirIRGenerator::gAnyfunc): Deleted.

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConventionAir::marshallArgument const):
(JSC::Wasm::CallingConventionAir::setupCall const):

  • wasm/WasmExceptionType.h:
  • wasm/WasmFormat.h:

(JSC::Wasm::isValueType):
(JSC::Wasm::isSubtype):
(JSC::Wasm::TableInformation::wasmType const):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseTableHelper):
(JSC::Wasm::SectionParser::parseElement):
(JSC::Wasm::SectionParser::parseInitExpr):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addRefFunc):

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/wasm.json:
8:11 AM Changeset in webkit [246588] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[Curl] CurlRequestScheduler doesn't terminate worker thread in a certain situation.
https://bugs.webkit.org/show_bug.cgi?id=198993

Cancel CurlRequest before invalidation to remove tasks from CurlRequestScheduler certainly in ~NetworkDataTaskCurl.

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-06-19
Reviewed by Fujii Hironori.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::~NetworkDataTaskCurl):

8:07 AM Changeset in webkit [246587] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

[CMake][Win] CombinedDomains.json is generated twice in JavaScriptCore_CopyPrivateHeaders and JavaScriptCore projects
https://bugs.webkit.org/show_bug.cgi?id=198853

Reviewed by Don Olmstead.

JavaScriptCore_CopyPrivateHeaders target needs to have a direct or
indirect dependency of JavaScriptCore target for CMake Visual
Studio generator to eliminate duplicated custom commands.

  • CMakeLists.txt: Added JavaScriptCore as a dependency of JavaScriptCore_CopyPrivateHeaders.
5:03 AM Changeset in webkit [246586] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WTF

USE_ANGLE macro can be evaluated without being defined
https://bugs.webkit.org/show_bug.cgi?id=198991

Reviewed by Carlos Garcia Campos.

  • wtf/Platform.h: On platforms not yet defining USE_ANGLE, the

incompatibility check with some other flags leads to the macro being
evaluated even when it was not defined, producing compiler warnings.
To avoid this, the macro should be defined to 0 before the check in
case it was not defined already.

5:02 AM Changeset in webkit [246585] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

[Nicosia] Invalidate SceneIntegration in LayerTreeHost::invalidate()
https://bugs.webkit.org/show_bug.cgi?id=198992

Reviewed by Carlos Garcia Campos.

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::invalidate): Invalidate the
Nicosia::SceneIntegration object. This should properly disassociate
the now-invalited LayerTreeHost (a SceneIntegration client) from the
SceneIntegration object that can still be shared with platform layers
originating from this LayerTreeHost.

3:54 AM Changeset in webkit [246584] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

resize-observer/element-leak.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=198666

Patch by Cathie Chen <cathiechen> on 2019-06-19
Reviewed by Frédéric Wang.

It takes a very long time to construct iframes which create and remove 1000 elements. This would cause timeout sometimes.
In order to make it more effective, reduce the number of elements to 200 and put them into a container first,
then attach the container to DOM tree.

  • resize-observer/resources/element-leak-frame.html:
2:43 AM Changeset in webkit [246583] by dino@apple.com
  • 10 edits in trunk/Source

UIContextMenuInteraction implementation for WKContentView
https://bugs.webkit.org/show_bug.cgi?id=198986
<rdar://problem/51875189>

Reviewed by Andy Estes.

Source/WebCore/PAL:

Include + soft link DDContextMenuAction.

  • pal/spi/ios/DataDetectorsUISPI.h:

Source/WebKit:

Implement UIContextMenuInteraction and its delegate as a
replacement for UIPreviewItemController in iOS 13.

In order to preserve existing behaviour as much as possible,
we check for the implementation of new WebKit API to configure
the menu. If that is not present, we attempt to convert
the results of the existing WebKit WKPreviewAction delegates
into something that works with UIContextMenus.

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

(-[WKContentView setupInteraction]):
(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _registerPreview]):
(-[WKContentView _unregisterPreview]):
(-[WKContentView _showLinkPreviewsPreferenceChanged:]):
(needsDeprecatedPreviewAPI):
(uiActionForPreviewAction):
(menuFromPreviewOrDefaults):
(titleForMenu):
(-[WKContentView assignLegacyDataForContextMenuInteraction]):
(-[WKContentView contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView continueContextMenuInteraction:]):
(uiImageForImage):
(createTargetedPreview):
(-[WKContentView _targetedPreview]):
(-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteractionWillPresent:]):
(-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteraction:willCommitWithAnimator:]):
(-[WKContentView contextMenuInteractionDidEnd:]):
(-[WKContentView shouldUsePreviewForLongPress]): Deleted.

Source/WTF:

Add USE_UICONTEXTMENU for iOS 13+.

  • wtf/Platform.h:

Jun 18, 2019:

11:55 PM Changeset in webkit [246582] by Megan Gardner
  • 2 edits in trunk/LayoutTests

Text Selection gesture has changed behavior, change test to match new behavior
https://bugs.webkit.org/show_bug.cgi?id=198980
<rdar://problem/51713918>

Reviewed by Wenson Hsieh.

Long press and drag now starts a selection and entends the range, rather than changing
the start of the text selection. Update the test to match the new behavior.

  • fast/events/touch/ios/long-press-then-drag-to-select-text.html:
10:12 PM Changeset in webkit [246581] by Dewei Zhu
  • 5 edits in trunk/Websites/perf.webkit.org

Customizable test group form should allow user to supply a revision prefix of a commit and revision starts with 'r'.
https://bugs.webkit.org/show_bug.cgi?id=198940

Reviewed by Ryosuke Niwa.

Customizable test group form should adapt prefix matching when fetching for a commit.

  • browser-tests/customizable-test-group-form-tests.js: Updated and added unit tests.
  • public/v3/components/customizable-test-group-form.js: Removed loggings those a unintentionally committed.
  • public/v3/models/commit-set.js: Adapted prefix matching API when fetching a commit.

(IntermediateCommitSet.prototype._fetchCommitLogAndOwnedCommits):

  • unit-tests/commit-set-tests.js: Updated unit tests accordingly.
9:44 PM Changeset in webkit [246580] by Ryan Haddad
  • 3 edits in trunk/Source/WebKit

Unreviewed, rolling out r246575.

Breaks internal builds.

Reverted changeset:

"Update WebKit API to separately retrieve actions and use
context menus"
https://bugs.webkit.org/show_bug.cgi?id=198974
https://trac.webkit.org/changeset/246575

7:36 PM Changeset in webkit [246579] by sbarati@apple.com
  • 7 edits
    4 adds in trunk

[WHLSL] Support matrices
https://bugs.webkit.org/show_bug.cgi?id=198876
<rdar://problem/51768882>

Reviewed by Dean Jackson and Myles Maxfield.

Source/WebCore:

This patch adds in support for matrices to WHLSL. Most matrix related code
is defined by the standard library. This patch just needed to add support
for the native functions operator[] and operator[]= on matrix types. The only
native functions that are named operator[] and operator[]= are for matrix
operations, so we strongly assume when generating code for native operator[] and
operator[]= that we're dealing with matrix types.

operator[]= ignores the write if the index is out of bounds. operator[]
returns a zeroed vector if the index is out of bounds.

This patch also incorporates two bug fixes:

  1. This patch takes Robin's patch in https://bugs.webkit.org/show_bug.cgi?id=198313 to ensure

we don't have pointers to values in a hash map. This was needed in this patch
otherwise we'd crash parsing the standard library.

  1. This patch fixes how we handle "break" in metal codegen. When I first

implemented break, I strongly assumed we were in a loop. However, break
can be either from a loop or from switch. This patch teaches the metal code
generator to track which context we're in and to emit code accordingly.

Tests: webgpu/whlsl-matrix-2.html

webgpu/whlsl-matrix.html

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):

  • Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:

(WebCore::WHLSL::Metal::generateMetalCodeShared):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::writeNativeFunction):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::Checker::assignTypes):
(WebCore::WHLSL::Checker::getInfo):
(WebCore::WHLSL::Checker::assignType):
(WebCore::WHLSL::Checker::forwardType):

  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

  • webgpu/whlsl-matrix-2-expected.txt: Added.
  • webgpu/whlsl-matrix-2.html: Added.
  • webgpu/whlsl-matrix-expected.txt: Added.
  • webgpu/whlsl-matrix.html: Added.
6:19 PM Changeset in webkit [246578] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] JSLock should be WebThread aware
https://bugs.webkit.org/show_bug.cgi?id=198911

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Since WebKitLegacy content rendering is done in WebThread instead of the main thread in iOS, user of WebKitLegacy (e.g. UIWebView) needs
to grab the WebThread lock (which is a recursive lock) in the main thread when touching the WebKitLegacy content.
But, WebKitLegacy can expose JSContext for the web view. And we can interact with the JS content through JavaScriptCore APIs. However,
since WebThread is a concept in WebCore, JavaScriptCore APIs do not grab the WebThread lock. As a result, WebKitLegacy web content can be
modified from the main thread without grabbing the WebThread lock through JavaScriptCore APIs.

This patch makes JSC aware of WebThread: JSLock grabs the WebThread lock before grabbing JS's lock. While this seems layering violation,
we already have many USE(WEB_THREAD) and WebThread aware code in WTF. Eventually, we should move WebThread code from WebCore to WTF since
JSC and WTF need to be aware of WebThread. But, for now, we just use the function pointer exposed by WebCore.

Since both JSLock and the WebThread lock are recursive locks, nested locking is totally OK. The possible problem is the order of locking.
We ensure that we always grab locks in (1) the WebThread lock and (2) JSLock order.

In JSLock, we take the WebThread lock, but we do not unlock it. This is how we use the WebThread lock: the WebThread lock is released
automatically when RunLoop finishes the current cycle, and in WebKitLegacy, we do not call unlocking function of the WebThread lock except
for some edge cases.

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine isWebThreadAware]):

  • API/JSVirtualMachineInternal.h:
  • runtime/JSLock.cpp:

(JSC::JSLockHolder::JSLockHolder):
(JSC::JSLock::lock):
(JSC::JSLockHolder::init): Deleted.

  • runtime/JSLock.h:

(JSC::JSLock::makeWebThreadAware):
(JSC::JSLock::isWebThreadAware const):

Source/WebCore:

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/JSLockTakesWebThreadLock.mm: Added.

(TestWebKitAPI::TEST):

6:18 PM Changeset in webkit [246577] by Justin Michaud
  • 13 edits
    1 add in trunk

[WASM-References] Add support for Table.size, grow and fill instructions
https://bugs.webkit.org/show_bug.cgi?id=198761

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/Builder_WebAssemblyBinary.js:

(const.putOp):

  • wasm/references/table_misc.js: Added.

(TableSize.End.End.WebAssembly):
(GetLocal.0.GetLocal.1.TableGrow.End.End.WebAssembly):

  • wasm/wasm.json:

Source/JavaScriptCore:

Add support for Table.size, grow and fill instructions. This also required
adding support for two-byte opcodes to the ops generator.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::gAnyref):
(JSC::Wasm::AirIRGenerator::tmpForType):
(JSC::Wasm::AirIRGenerator::addTableSize):
(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):

  • wasm/WasmExceptionType.h:
  • wasm/WasmFormat.h:

(JSC::Wasm::TableInformation::wasmType const):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::doWasmTableGrow):
(JSC::Wasm::doWasmTableFill):

  • wasm/WasmInstance.h:
  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::grow):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addTableSize):
(JSC::Wasm::Validate::addTableGrow):
(JSC::Wasm::Validate::addTableFill):

  • wasm/generateWasmOpsHeader.py:

(opcodeMacroizer):
(ExtTableOpType):

  • wasm/wasm.json:
4:08 PM Changeset in webkit [246576] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/content-security-policy/reporting/report-only-in-meta.sub.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=198977

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-18

  • platform/mac-wk1/TestExpectations:
3:55 PM Changeset in webkit [246575] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Update WebKit API to separately retrieve actions and use context menus
https://bugs.webkit.org/show_bug.cgi?id=198974
<rdar://problem/50735687>

Reviewed by Tim Horton.

Update API and SPI, and add infrastructure for asynchronously requesting interaction information.

  • UIProcess/API/Cocoa/WKUIDelegate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3:31 PM Changeset in webkit [246574] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Layout test http/tests/websocket/tests/hybi/send-object-tostring-check.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=176030

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-18

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:29 PM Changeset in webkit [246573] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebCore

WebSocketDeflater uses an unnecessarily constrained compression memory level
https://bugs.webkit.org/show_bug.cgi?id=198973

Reviewed by Alex Christensen.

  • Modules/websockets/WebSocketDeflater.cpp:

Set the memLevel to the deflateInit2 default value, not a minimum value.

3:24 PM Changeset in webkit [246572] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix signature of currentWeakRefVersion to return an uintptr_t.

  • runtime/VM.h:

(JSC::VM::currentWeakRefVersion const):

3:01 PM Changeset in webkit [246571] by Justin Michaud
  • 26 edits
    1 add in trunk

[WASM-References] Add support for multiple tables
https://bugs.webkit.org/show_bug.cgi?id=198760

Reviewed by Saam Barati.

JSTests:

  • wasm/Builder.js:
  • wasm/js-api/call-indirect.js:

(const.oneTable):
(const.multiTable):
(multiTable):
(multiTable.Polyphic2Import):
(multiTable.VirtualImport):
(const.wasmModuleWhichImportJS): Deleted.
(const.makeTable): Deleted.
(): Deleted.
(Polyphic2Import): Deleted.
(VirtualImport): Deleted.

  • wasm/js-api/table.js:

(new.WebAssembly.Module):
(assert.throws):
(assertBadTableImport):
(assert.truthy):
(assert.throws.new.WebAssembly.Module.builder.WebAssembly): Deleted.

  • wasm/references/anyref_table.js:
  • wasm/references/anyref_table_import.js:

(makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl.makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl):

  • wasm/references/multitable.js: Added.

(assert.throws.1.exports.set_tbl0):
(assert.throws):
(assert.eq):

  • wasm/references/validation.js:

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/spec-tests/imports.wast.js:
  • wasm/wasm.json:
  • wasm/Builder.js:
  • wasm/js-api/call-indirect.js:

(const.oneTable):
(const.multiTable):
(multiTable):
(multiTable.Polyphic2Import):
(multiTable.VirtualImport):
(const.wasmModuleWhichImportJS): Deleted.
(const.makeTable): Deleted.
(): Deleted.
(Polyphic2Import): Deleted.
(VirtualImport): Deleted.

  • wasm/js-api/table.js:

(new.WebAssembly.Module):
(assert.throws):
(assertBadTableImport):
(assert.truthy):
(assert.throws.new.WebAssembly.Module.builder.WebAssembly): Deleted.

  • wasm/references/anyref_table.js:
  • wasm/references/anyref_table_import.js:

(makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl.makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl):

  • wasm/references/func_ref.js:

(GetLocal.0.I32Const.0.TableSet.End.End.WebAssembly.fun): Deleted.
(GetLocal.0.I32Const.0.TableSet.End.End.WebAssembly.assert.throws): Deleted.
(GetLocal.0.I32Const.0.TableSet.End.End.WebAssembly): Deleted.

  • wasm/references/multitable.js: Added.

(assert.throws.1.exports.set_tbl0):
(assert.throws):
(assert.eq):
(string_appeared_here.tableInsanity):
(I32Const.0.GetLocal.0.TableSet.1.End.End.WebAssembly.):
(I32Const.0.GetLocal.0.TableSet.1.End.End.WebAssembly):

  • wasm/references/validation.js:

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/spec-tests/imports.wast.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

Support multiple wasm tables. We turn tableInformation into a tables array, and update all of the
existing users to give a table index. The array of Tables in Wasm::Instance is hung off the tail
to make it easier to use from jit code.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addCallIndirect):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmExceptionType.h:
  • wasm/WasmFormat.h:

(JSC::Wasm::Element::Element):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::extraMemoryAllocated const):
(JSC::Wasm::Instance::table):
(JSC::Wasm::Instance::setTable):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::updateCachedMemory):
(JSC::Wasm::Instance::offsetOfGlobals):
(JSC::Wasm::Instance::offsetOfTablePtr):
(JSC::Wasm::Instance::allocationSize):
(JSC::Wasm::Instance::table): Deleted.
(JSC::Wasm::Instance::setTable): Deleted.
(JSC::Wasm::Instance::offsetOfTable): Deleted.

  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::tableCount const):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseImport):
(JSC::Wasm::SectionParser::parseTableHelper):
(JSC::Wasm::SectionParser::parseTable):
(JSC::Wasm::SectionParser::parseElement):

  • wasm/WasmTable.h:

(JSC::Wasm::Table::owner const):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addTableGet):
(JSC::Wasm::Validate::addTableSet):
(JSC::Wasm::Validate::addCallIndirect):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/wasm.json:
2:50 PM Changeset in webkit [246570] by dbates@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r240757): Cannot dismiss the keyboard on http://apple.com/apple-tv-plus
https://bugs.webkit.org/show_bug.cgi?id=198922
<rdar://problem/50300056>

Reviewed by Wenson Hsieh.

Source/WebKit:

Actually dismiss the keyboard as intended in r240757. Do not wait for the round-trip
to the WebProcess to run through the -elementDidBlur steps in the UIProcess and hide
the keyboard when a person explicitly dismisses the keyboard via the Done button (iPhone)
or hide keyboard button (iPad).

Note that r240757 revealed another bug in this code, <https://bugs.webkit.org/show_bug.cgi?id=198928>.
I am unclear of the implications of that bug, but it is clear for this bug that it
never makes sense to round-trip to the WebProcess when the keyboard is dismissed by
a user gesture.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): Invoke -_elementDidBlur
to blur the element in the UIProcess and hide the keyboard.
(-[WKContentView _elementDidBlur]): Prevent duplicate invocations of -didEndFormControlInteraction
and setIsShowingInputViewForFocusedElement messages by only doing these actions when
editablity changes. This covers the case where -_elementDidBlur may be invoked a second
time (the reply in the round-trip). In that case we don't need to do these actions.

LayoutTests:

Add a test to ensure that pressing Done hides the keyboard after tapping outside the focused
element's frame.

  • fast/events/ios/should-be-able-to-dismiss-form-accessory-after-tapping-outside-iframe-with-focused-field-expected.txt: Added.
  • fast/events/ios/should-be-able-to-dismiss-form-accessory-after-tapping-outside-iframe-with-focused-field.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.dismissFormAccessoryView): Added.

2:40 PM Changeset in webkit [246569] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebKit

NetworkSession::networkStorageSession can return null
https://bugs.webkit.org/show_bug.cgi?id=198947
<rdar://problem/51394449>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-18
Reviewed by Youenn Fablet.

We are seeing evidence of crashes from the map owning NetworkSessions and the map owning NetworkStorageSessions becoming out of sync
because NetworkSession is refcounted but NetworkStorageSession is not. I started the complete fix in https://bugs.webkit.org/show_bug.cgi?id=194926
but for now let's add less risky null checks to prevent fallout.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::updateClientSideCookiesAgeCap):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
(WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::networkStorageSession const):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):

2:30 PM Changeset in webkit [246568] by beidson@apple.com
  • 3 edits in trunk/Source/WebKit

Handle NSProgress calling our cancellation handler on background threads (and calling it more than once).
<rdar://problem/51392926> and https://bugs.webkit.org/show_bug.cgi?id=198945

Reviewed by Alex Christensen.

If you have a download in progress and quickly tap the button to cancel it multiple times, then:

  • NSProgress calls our cancellation handler on a non-main thread, which we can't handle.
  • They do it more than once, which is also bad.
  • They might even do it multiple times concurrently (on different background dispatch queues)

Let's work around these.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::cancel): Double check we're on the main thread, and handle being called twice.

  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:

(-[WKDownloadProgress performCancel]): Actually cancel the WebKit::Download if we still have one.
(-[WKDownloadProgress progressCancelled]): Called when NSProgress calls the cancellation handler, no matter

which thread it does it on. By leveraging std::call_once we handle multiple calls as well as being called
concurrently from different threads. call_once punts the *actual* cancel operation off to the main thread.

(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]): The cancellation handler is

now simply calling 'progressCancelled' on self, assuming the weak pointer for self is still valid.

2:21 PM Changeset in webkit [246567] by commit-queue@webkit.org
  • 24 edits
    3 adds in trunk

[ESNExt] String.prototype.matchAll
https://bugs.webkit.org/show_bug.cgi?id=186694

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-06-18
Reviewed by Yusuke Suzuki.

Implement String.prototype.matchAll.
(https://tc39.es/ecma262/#sec-string.prototype.matchall)

JSTests:

  • test262/config.yaml:

Source/JavaScriptCore:

Also rename @globalPrivate @constructor functions and C++ variables holding them.

Shipping in Chrome since version 73.
Shipping in Firefox since version 67.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/wkbuiltins/builtins_generate_combined_header.py:

(get_var_name):
(generate_section_for_global_private_code_name_macro):

  • Sources.txt:
  • builtins/ArrayPrototype.js:

(globalPrivate.ArrayIterator):
(values):
(keys):
(entries):
(globalPrivate.createArrayIterator): Deleted.

  • builtins/AsyncFromSyncIteratorPrototype.js:

(globalPrivate.createAsyncFromSyncIterator):
(globalPrivate.AsyncFromSyncIterator):
(globalPrivate.AsyncFromSyncIteratorConstructor): Deleted.

  • builtins/BuiltinNames.h:
  • builtins/MapPrototype.js:

(globalPrivate.MapIterator):
(values):
(keys):
(entries):
(globalPrivate.createMapIterator): Deleted.

  • builtins/RegExpPrototype.js:

(globalPrivate.RegExpStringIterator):
(overriddenName.string_appeared_here.matchAll):

  • builtins/RegExpStringIteratorPrototype.js: Added.

(next):

  • builtins/SetPrototype.js:

(globalPrivate.SetIterator):
(values):
(entries):
(globalPrivate.createSetIterator): Deleted.

  • builtins/StringPrototype.js:

(matchAll):

  • builtins/TypedArrayPrototype.js:

(values):
(keys):
(entries):

  • runtime/CommonIdentifiers.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::finishCreation):

  • runtime/RegExpStringIteratorPrototype.cpp: Added.

(JSC::RegExpStringIteratorPrototype::finishCreation):

  • runtime/RegExpStringIteratorPrototype.h: Added.
  • runtime/StringPrototype.cpp:

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
2:11 PM Changeset in webkit [246566] by keith_miller@apple.com
  • 2 edits in trunk/Tools

webkit-patch should allow for a bugzilla url not just bugzilla id
https://bugs.webkit.org/show_bug.cgi?id=198972

Reviewed by Dewei Zhu.

When prompting for a bugzilla id or a new title we should also
allow for a bugzilla url.

  • Scripts/webkitpy/tool/steps/promptforbugortitle.py:

(PromptForBugOrTitle.run):

2:02 PM Changeset in webkit [246565] by keith_miller@apple.com
  • 17 edits
    18 adds in trunk

Add support for WeakRef
https://bugs.webkit.org/show_bug.cgi?id=198710

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Add support for WeakRefs which are now at stage 3
(https://tc39.es/proposal-weakrefs). This patch doesn't add
support for FinalizationGroups, which I'll add in another patch.

Some other things of interest. Per the spec, we cannot collect a
weak refs target unless it has not been dereffed (or created) in
the current microtask turn. i.e. WeakRefs are only allowed to be
collected at the end of a drain of the Microtask queue. My
understanding for this behavior is to reduce implementation
dependence on specific GC behavior in a given browser.

We track if a WeakRef is retaining its target by using a version
number on each WeakRef as well as on the VM. Whenever a WeakRef is
derefed we update its version number to match the VM's then
WriteBarrier ourselves. During marking if the VM and the WeakRef
have the same version number, the target is visited.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionReleaseWeakRefs):

  • runtime/CommonIdentifiers.h:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSWeakObjectRef.cpp: Added.

(JSC::JSWeakObjectRef::finishCreation):
(JSC::JSWeakObjectRef::visitChildren):
(JSC::JSWeakObjectRef::finalizeUnconditionally):
(JSC::JSWeakObjectRef::toStringName):

  • runtime/JSWeakObjectRef.h: Added.
  • runtime/VM.cpp:

(JSC::VM::drainMicrotasks):

  • runtime/VM.h:

(JSC::VM::setOnEachMicrotaskTick):
(JSC::VM::finalizeSynchronousJSExecution):
(JSC::VM::currentWeakRefVersion const):

  • runtime/WeakObjectRefConstructor.cpp: Added.

(JSC::WeakObjectRefConstructor::finishCreation):
(JSC::WeakObjectRefConstructor::WeakObjectRefConstructor):
(JSC::callWeakRef):
(JSC::constructWeakRef):

  • runtime/WeakObjectRefConstructor.h: Added.

(JSC::WeakObjectRefConstructor::create):
(JSC::WeakObjectRefConstructor::createStructure):

  • runtime/WeakObjectRefPrototype.cpp: Added.

(JSC::WeakObjectRefPrototype::finishCreation):
(JSC::getWeakRef):
(JSC::protoFuncWeakRefDeref):

  • runtime/WeakObjectRefPrototype.h: Added.

Source/WebCore:

We need to make sure the Web MicrotaskQueue notifies the JSC VM
that it has finished performing a microtask checkpoint. This lets
the JSC VM know it is safe to collect referenced WeakRefs. Since
there was no way to get the VM from the MicrotaskQueue I have
added a RefPtr to the queue's VM. For the main thread the VM lives
forever so is fine. For workers the queue and the VM share an
owner so this shouldn't matter either.

Tests: js/weakref-async-is-collected.html

js/weakref-eventually-collects-values.html
js/weakref-microtasks-dont-collect.html
js/weakref-weakset-consistency.html

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::MicrotaskQueue):
(WebCore::MicrotaskQueue::mainThreadQueue):
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • dom/Microtasks.h:

(WebCore::MicrotaskQueue::vm const):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):

LayoutTests:

Add an asyncTestStart that mirrors the asyncTestStart behavior in
the JSC cli.

  • http/tests/resources/js-test-pre.js:

(asyncTestStart):

  • js/script-tests/weakref-async-is-collected.js: Added.

(makeWeakRef):
(turnEventLoop):
(async.foo):
(async.test):

  • js/script-tests/weakref-eventually-collects-values.js: Added.

(makeWeakRef):
(turnEventLoop):
(let.weakRefs.async.test):

  • js/script-tests/weakref-microtasks-dont-collect.js: Added.

(asyncTestStart.1.makeWeakRef):
(turnEventLoop):
(async.foo):
(async.test):

  • js/script-tests/weakref-weakset-consistency.js: Added.

(makeWeakRef):
(turnEventLoop):
(async.foo):
(async.test):

  • js/weakref-async-is-collected-expected.txt: Added.
  • js/weakref-async-is-collected.html: Added.
  • js/weakref-eventually-collects-values-expected.txt: Added.
  • js/weakref-eventually-collects-values.html: Added.
  • js/weakref-microtasks-dont-collect-expected.txt: Added.
  • js/weakref-microtasks-dont-collect.html: Added.
  • js/weakref-weakset-consistency-expected.txt: Added.
  • js/weakref-weakset-consistency.html: Added.
  • resources/js-test-pre.js:

(asyncTestStart):

1:59 PM Changeset in webkit [246564] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

[iOS] Pressing key while holding Command should not insert character
https://bugs.webkit.org/show_bug.cgi?id=198925
<rdar://problem/51778811>

Reviewed by Brent Fulgham.

Source/WebKit:

Do not insert a character for an unhandled key command that has a Command modifier.
For example, pressing Command + Shift + v, which is an unhandled key command (at the
time of writing) should not insert v. This matches iOS and Mac platform conventions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interpretKeyEvent:isCharEvent:]):

LayoutTests:

Add a test that Command + Shift + v does not insert a v as we don't expect it
to as of the time of writing. A more comprehensive test would be needed to
ensure that all unhandled key commands with Command modifiers do not insert
a character. For now, the added test seems good enough.

  • fast/events/ios/command+shift+v-should-not-insert-v-expected.txt: Added.
  • fast/events/ios/command+shift+v-should-not-insert-v.html: Added.
1:53 PM Changeset in webkit [246563] by Tadeu Zagallo
  • 3 edits in trunk/Source/JavaScriptCore

Add missing mutator fence in compileNewFunction
https://bugs.webkit.org/show_bug.cgi?id=198849
<rdar://problem/51733890>

Reviewed by Saam Barati.

Follow-up after r246553. Saam pointed out that we still need a mutator
fence before allocating the FunctionRareData, since the allocation
might trigger a slow path call.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

1:43 PM Changeset in webkit [246562] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] Layout Test http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is frequently failing or timing out.
https://bugs.webkit.org/show_bug.cgi?id=198185.

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-18

  • platform/ios-wk2/TestExpectations:
1:22 PM Changeset in webkit [246561] by wilander@apple.com
  • 5 edits in trunk/Source/WebKit

Change log channel name from ResourceLoadStatisticsDebug to ITPDebug and remove unnecessary #if !RELEASE_LOG_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=198970
<rdar://problem/51855836>

Reviewed by Brent Fulgham.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::domainsToString):
(WebKit::ResourceLoadStatisticsStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):

  • Platform/Logging.h:
12:50 PM Changeset in webkit [246560] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: detail view shouldn't stay open when the related entry is removed
https://bugs.webkit.org/show_bug.cgi?id=198951

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._mainResourceDidChange):
Hide the detail view if the main resource changes and we aren't preserving the log.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.reloadVisibleColumnCells):
Only attempt to populate cells for rows that the _dataSource actually has. Without this,
the _delegate may be asked to populate a cell for a row it doesn't have, which would error.

12:37 PM Changeset in webkit [246559] by Devin Rousso
  • 5 edits in trunk

Web Inspector: parseQueryParameters fails to successfully parse query parameter values that contain "="
https://bugs.webkit.org/show_bug.cgi?id=198971
<rdar://problem/51852782>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Base/URLUtilities.js:

(parseQueryString):

LayoutTests:

  • inspector/unit-tests/url-utilities.html:
  • inspector/unit-tests/url-utilities-expected.txt:
12:33 PM Changeset in webkit [246558] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Heap: subsequent snapshots taken manually don't appear in the list
https://bugs.webkit.org/show_bug.cgi?id=198941

Reviewed by Joseph Pecoraro.

Since heap snapshot records can be added at any time, including when not actively recording,
when the "Entire Recording" range is selected, make sure to set the filterEndTime to be an
effectively infinite number so that records added later aren't filtered out.

This isn't done for other timeline views as they may have graphs that don't expect to render
from time 0 till infinity, not to mention being unable to add records when not recording.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):

12:13 PM Changeset in webkit [246557] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Canvas: cannot select saved recordings
https://bugs.webkit.org/show_bug.cgi?id=198953

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.treeElementToggled):
Don't early return if the TreeElement isn't selectable as the owner TreeOutline may
want to dispatch an event that it was clicked.

12:13 PM Changeset in webkit [246556] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
https://bugs.webkit.org/show_bug.cgi?id=198952

Reviewed by Joseph Pecoraro.

Prevent any content from being generated until initialLayout is called, as otherwise it's
possible for the CanvasNavigationSidebar to update the current action index before the
preview element has been created, which would throw an error.

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.initialLayout):
(WI.RecordingContentView.prototype._updateSliderValue):
(WI.RecordingContentView.prototype._handleRecordingProcessedAction):
Drive-by: update the slider max each time the selected action index is changed.

12:09 PM Changeset in webkit [246555] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas: imported recordings aren't selectable from the overview if there are no canvases in the page
https://bugs.webkit.org/show_bug.cgi?id=198955

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView.prototype._addSavedRecording):
Hide the content placeholder when a recording is imported. It won't be shown again because
the subviews list will never be empty, as there's no way to remove an imported recording.

  • UserInterface/Views/CollectionContentView.js:

(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.showContentPlaceholder): Added.
(WI.CollectionContentView.prototype.hideContentPlaceholder): Added.
(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype._selectItem):
(WI.CollectionContentView.prototype._showContentPlaceholder): Deleted.
(WI.CollectionContentView.prototype._hideContentPlaceholder): Deleted.
Make showContentPlaceholder/hideContentPlaceholder protected for any subclasses to call.

12:01 PM Changeset in webkit [246554] by dino@apple.com
  • 20 edits
    2 copies
    5 adds in trunk/Source

Add preliminary ANGLE backend to WebCore
https://bugs.webkit.org/show_bug.cgi?id=197755

Patch by Kenneth Russell <kbr@chromium.org> on 2019-06-18
Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

Add a build step which processes ANGLE's copied public headers so they
can all be referred to under the <ANGLE/xyz.h> prefix. This avoids
touching ANGLE's headers and allows WebCore to include them with no
additional include path modifications.

  • ANGLE.xcodeproj/project.pbxproj:
  • adjust-angle-include-paths.sh: Added.

Source/WebCore:

Add new files supplying an ANGLE version of GraphicsContext3D and
Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
build these files. This option compiles and links successfully.

FIXMEs remain in several common files which will be addressed in
subsequent patches.

This work will be tested with the preexisting WebGL conformance
suite.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/GraphicsContext3DManager.cpp:

(WebCore::GraphicsContext3DManager::updateAllContexts):
(WebCore::GraphicsContext3DManager::updateHighPerformanceState):
(WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):

  • platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.

(WebCore::Extensions3DANGLE::Extensions3DANGLE):
(WebCore::Extensions3DANGLE::supports):
(WebCore::Extensions3DANGLE::ensureEnabled):
(WebCore::Extensions3DANGLE::isEnabled):
(WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
(WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
(WebCore::Extensions3DANGLE::initializeAvailableExtensions):
(WebCore::Extensions3DANGLE::readnPixelsEXT):
(WebCore::Extensions3DANGLE::getnUniformfvEXT):
(WebCore::Extensions3DANGLE::getnUniformivEXT):
(WebCore::Extensions3DANGLE::blitFramebuffer):
(WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
(WebCore::Extensions3DANGLE::createVertexArrayOES):
(WebCore::Extensions3DANGLE::deleteVertexArrayOES):
(WebCore::Extensions3DANGLE::isVertexArrayOES):
(WebCore::Extensions3DANGLE::bindVertexArrayOES):
(WebCore::Extensions3DANGLE::insertEventMarkerEXT):
(WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
(WebCore::Extensions3DANGLE::popGroupMarkerEXT):
(WebCore::Extensions3DANGLE::supportsExtension):
(WebCore::Extensions3DANGLE::drawBuffersEXT):
(WebCore::Extensions3DANGLE::drawArraysInstanced):
(WebCore::Extensions3DANGLE::drawElementsInstanced):
(WebCore::Extensions3DANGLE::vertexAttribDivisor):
(WebCore::Extensions3DANGLE::getExtensions):

  • platform/graphics/angle/Extensions3DANGLE.h: Added.
  • platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.

(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore::wipeAlphaChannelFromPixels):
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::validateAttributes):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContext3D::renderbufferStorage):
(WebCore::GraphicsContext3D::getIntegerv):
(WebCore::GraphicsContext3D::getShaderPrecisionFormat):
(WebCore::GraphicsContext3D::texImage2D):
(WebCore::GraphicsContext3D::depthRange):
(WebCore::GraphicsContext3D::clearDepth):
(WebCore::GraphicsContext3D::getExtensions):
(WebCore::GraphicsContext3D::readPixels):
(WebCore::setCurrentNameHashMapForShader):
(WebCore::nameHashForShader):
(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::readRenderingResults):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::checkVaryingsPacking const):
(WebCore::GraphicsContext3D::precisionsMatch const):
(WebCore::GraphicsContext3D::getInternalFramebufferSize const):
(WebCore::GraphicsContext3D::activeTexture):
(WebCore::GraphicsContext3D::attachShader):
(WebCore::GraphicsContext3D::bindAttribLocation):
(WebCore::GraphicsContext3D::bindBuffer):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::bindRenderbuffer):
(WebCore::GraphicsContext3D::bindTexture):
(WebCore::GraphicsContext3D::blendColor):
(WebCore::GraphicsContext3D::blendEquation):
(WebCore::GraphicsContext3D::blendEquationSeparate):
(WebCore::GraphicsContext3D::blendFunc):
(WebCore::GraphicsContext3D::blendFuncSeparate):
(WebCore::GraphicsContext3D::bufferData):
(WebCore::GraphicsContext3D::bufferSubData):
(WebCore::GraphicsContext3D::mapBufferRange):
(WebCore::GraphicsContext3D::unmapBuffer):
(WebCore::GraphicsContext3D::copyBufferSubData):
(WebCore::GraphicsContext3D::getInternalformativ):
(WebCore::GraphicsContext3D::renderbufferStorageMultisample):
(WebCore::GraphicsContext3D::texStorage2D):
(WebCore::GraphicsContext3D::texStorage3D):
(WebCore::GraphicsContext3D::getActiveUniforms):
(WebCore::GraphicsContext3D::checkFramebufferStatus):
(WebCore::GraphicsContext3D::clearColor):
(WebCore::GraphicsContext3D::clear):
(WebCore::GraphicsContext3D::clearStencil):
(WebCore::GraphicsContext3D::colorMask):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::compileShaderDirect):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::cullFace):
(WebCore::GraphicsContext3D::depthFunc):
(WebCore::GraphicsContext3D::depthMask):
(WebCore::GraphicsContext3D::detachShader):
(WebCore::GraphicsContext3D::disable):
(WebCore::GraphicsContext3D::disableVertexAttribArray):
(WebCore::GraphicsContext3D::drawArrays):
(WebCore::GraphicsContext3D::drawElements):
(WebCore::GraphicsContext3D::enable):
(WebCore::GraphicsContext3D::enableVertexAttribArray):
(WebCore::GraphicsContext3D::finish):
(WebCore::GraphicsContext3D::flush):
(WebCore::GraphicsContext3D::framebufferRenderbuffer):
(WebCore::GraphicsContext3D::framebufferTexture2D):
(WebCore::GraphicsContext3D::frontFace):
(WebCore::GraphicsContext3D::generateMipmap):
(WebCore::GraphicsContext3D::getActiveAttribImpl):
(WebCore::GraphicsContext3D::getActiveAttrib):
(WebCore::GraphicsContext3D::getActiveUniformImpl):
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore::GraphicsContext3D::getAttachedShaders):
(WebCore::generateHashedName):
(WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
(WebCore::GraphicsContext3D::mappedSymbolName):
(WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
(WebCore::GraphicsContext3D::originalSymbolName):
(WebCore::GraphicsContext3D::getAttribLocation):
(WebCore::GraphicsContext3D::getAttribLocationDirect):
(WebCore::GraphicsContext3D::getContextAttributes):
(WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
(WebCore::GraphicsContext3D::getError):
(WebCore::GraphicsContext3D::getString):
(WebCore::GraphicsContext3D::hint):
(WebCore::GraphicsContext3D::isBuffer):
(WebCore::GraphicsContext3D::isEnabled):
(WebCore::GraphicsContext3D::isFramebuffer):
(WebCore::GraphicsContext3D::isProgram):
(WebCore::GraphicsContext3D::isRenderbuffer):
(WebCore::GraphicsContext3D::isShader):
(WebCore::GraphicsContext3D::isTexture):
(WebCore::GraphicsContext3D::lineWidth):
(WebCore::GraphicsContext3D::linkProgram):
(WebCore::GraphicsContext3D::pixelStorei):
(WebCore::GraphicsContext3D::polygonOffset):
(WebCore::GraphicsContext3D::sampleCoverage):
(WebCore::GraphicsContext3D::scissor):
(WebCore::GraphicsContext3D::shaderSource):
(WebCore::GraphicsContext3D::stencilFunc):
(WebCore::GraphicsContext3D::stencilFuncSeparate):
(WebCore::GraphicsContext3D::stencilMask):
(WebCore::GraphicsContext3D::stencilMaskSeparate):
(WebCore::GraphicsContext3D::stencilOp):
(WebCore::GraphicsContext3D::stencilOpSeparate):
(WebCore::GraphicsContext3D::texParameterf):
(WebCore::GraphicsContext3D::texParameteri):
(WebCore::GraphicsContext3D::uniform1f):
(WebCore::GraphicsContext3D::uniform1fv):
(WebCore::GraphicsContext3D::uniform2f):
(WebCore::GraphicsContext3D::uniform2fv):
(WebCore::GraphicsContext3D::uniform3f):
(WebCore::GraphicsContext3D::uniform3fv):
(WebCore::GraphicsContext3D::uniform4f):
(WebCore::GraphicsContext3D::uniform4fv):
(WebCore::GraphicsContext3D::uniform1i):
(WebCore::GraphicsContext3D::uniform1iv):
(WebCore::GraphicsContext3D::uniform2i):
(WebCore::GraphicsContext3D::uniform2iv):
(WebCore::GraphicsContext3D::uniform3i):
(WebCore::GraphicsContext3D::uniform3iv):
(WebCore::GraphicsContext3D::uniform4i):
(WebCore::GraphicsContext3D::uniform4iv):
(WebCore::GraphicsContext3D::uniformMatrix2fv):
(WebCore::GraphicsContext3D::uniformMatrix3fv):
(WebCore::GraphicsContext3D::uniformMatrix4fv):
(WebCore::GraphicsContext3D::useProgram):
(WebCore::GraphicsContext3D::validateProgram):
(WebCore::GraphicsContext3D::vertexAttrib1f):
(WebCore::GraphicsContext3D::vertexAttrib1fv):
(WebCore::GraphicsContext3D::vertexAttrib2f):
(WebCore::GraphicsContext3D::vertexAttrib2fv):
(WebCore::GraphicsContext3D::vertexAttrib3f):
(WebCore::GraphicsContext3D::vertexAttrib3fv):
(WebCore::GraphicsContext3D::vertexAttrib4f):
(WebCore::GraphicsContext3D::vertexAttrib4fv):
(WebCore::GraphicsContext3D::vertexAttribPointer):
(WebCore::GraphicsContext3D::viewport):
(WebCore::GraphicsContext3D::createVertexArray):
(WebCore::GraphicsContext3D::deleteVertexArray):
(WebCore::GraphicsContext3D::isVertexArray):
(WebCore::GraphicsContext3D::bindVertexArray):
(WebCore::GraphicsContext3D::getBooleanv):
(WebCore::GraphicsContext3D::getBufferParameteriv):
(WebCore::GraphicsContext3D::getFloatv):
(WebCore::GraphicsContext3D::getInteger64v):
(WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
(WebCore::GraphicsContext3D::getProgramiv):
(WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount):
(WebCore::GraphicsContext3D::getUnmangledInfoLog):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getRenderbufferParameteriv):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
(WebCore::GraphicsContext3D::getTexParameterfv):
(WebCore::GraphicsContext3D::getTexParameteriv):
(WebCore::GraphicsContext3D::getUniformfv):
(WebCore::GraphicsContext3D::getUniformiv):
(WebCore::GraphicsContext3D::getUniformLocation):
(WebCore::GraphicsContext3D::getVertexAttribfv):
(WebCore::GraphicsContext3D::getVertexAttribiv):
(WebCore::GraphicsContext3D::getVertexAttribOffset):
(WebCore::GraphicsContext3D::texSubImage2D):
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
(WebCore::GraphicsContext3D::createBuffer):
(WebCore::GraphicsContext3D::createFramebuffer):
(WebCore::GraphicsContext3D::createProgram):
(WebCore::GraphicsContext3D::createRenderbuffer):
(WebCore::GraphicsContext3D::createShader):
(WebCore::GraphicsContext3D::createTexture):
(WebCore::GraphicsContext3D::deleteBuffer):
(WebCore::GraphicsContext3D::deleteFramebuffer):
(WebCore::GraphicsContext3D::deleteProgram):
(WebCore::GraphicsContext3D::deleteRenderbuffer):
(WebCore::GraphicsContext3D::deleteShader):
(WebCore::GraphicsContext3D::deleteTexture):
(WebCore::GraphicsContext3D::synthesizeGLError):
(WebCore::GraphicsContext3D::markContextChanged):
(WebCore::GraphicsContext3D::markLayerComposited):
(WebCore::GraphicsContext3D::layerComposited const):
(WebCore::GraphicsContext3D::forceContextLost):
(WebCore::GraphicsContext3D::recycleContext):
(WebCore::GraphicsContext3D::dispatchContextChangedNotification):
(WebCore::GraphicsContext3D::texImage2DDirect):
(WebCore::GraphicsContext3D::drawArraysInstanced):
(WebCore::GraphicsContext3D::drawElementsInstanced):
(WebCore::GraphicsContext3D::vertexAttribDivisor):

  • platform/graphics/angle/TemporaryANGLESetting.cpp: Added.

(WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
(WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):

  • platform/graphics/angle/TemporaryANGLESetting.h: Added.
  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::checkGPUStatus):
(WebCore::GraphicsContext3D::screenDidChange):

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

(-[WebGLLayer display]):

  • platform/graphics/cv/TextureCacheCV.mm:

(WebCore::TextureCacheCV::create):
(WebCore::TextureCacheCV::textureFromImage):

  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::enumToStringMap):
(WebCore::VideoTextureCopierCV::initializeContextObjects):
(WebCore::VideoTextureCopierCV::initializeUVContextObjects):
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

  • platform/graphics/opengl/Extensions3DOpenGL.cpp:
  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

Source/WTF:

Add a USE_ANGLE definition to wtf/Platform.h (currently disabled)
which, when enabled, uses ANGLE instead of the OpenGL or OpenGL ES
backend.

  • wtf/Platform.h:
11:56 AM Changeset in webkit [246553] by Tadeu Zagallo
  • 13 edits
    1 add in trunk

DFG code should not reify the names of builtin functions with private names
https://bugs.webkit.org/show_bug.cgi?id=198849
<rdar://problem/51733890>

Reviewed by Filip Pizlo.

JSTests:

  • stress/builtin-private-function-name.js: Added.

(then):
(PromiseLike):

Source/JavaScriptCore:

Builtin functions that have a private name call setHasReifiedName from finishCreation.
When compiled with DFG and FTL, that does not get called and the function ends up reifying
its name. In order to fix that, we initialize FunctionRareData and set m_hasReifiedName to
true from compileNewFunction in both DFG and FTL.

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::offsetOfStructure):

  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfileWithPrototype::offsetOfPrototype):

  • bytecode/UnlinkedFunctionExecutable.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::isAnonymousBuiltinFunction const):

11:10 AM Changeset in webkit [246552] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

StorageManager::removeAllowedSessionStorageNamespaceConnection should make sure its storageNamespaceID is valid
https://bugs.webkit.org/show_bug.cgi?id=198966
rdar://problem/51352080

Reviewed by Alex Christensen.

Make sure the namespace ID is a key of the map before using the value.
The namespace ID is coming straight from IPC so should not be trusted.
Also, namespace IDs are added/removed based on web pages being created/deleted.
Namespace IDs are supposed to be scoped by session IDs.
Using page IDs for namespace IDs works as long as the page does not change of session ID during its lifetime, which is not guaranteed.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection):

10:51 AM Changeset in webkit [246551] by david_quesada@apple.com
  • 2 edits in trunk/Source/WebKit

Network process crash in SandboxExtension::consume() via Download::publishProgress
https://bugs.webkit.org/show_bug.cgi?id=198968
rdar://problem/51732997

Reviewed by Alex Christensen.

Add an early return if the network process fails to resolve a sandbox extension handle for publishing
progress on a download. Creating the NSProgress doesn't do much since the progress reporting service
won't honor the attempt to publish progress on a URL the process does not have access to, and nothing
else in the Network process makes any use of the progress.

  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::publishProgress):

10:49 AM Changeset in webkit [246550] by sbarati@apple.com
  • 26 edits
    2 adds in trunk

[WHLSL] Do not generate duplicate constructors/copy constructors in synthesizeConstructors
https://bugs.webkit.org/show_bug.cgi?id=198580

Reviewed by Robin Morisset.

Source/WebCore:

Prior to this patch, we were generating duplicate constructors
for unnamed types. This is bad for two reasons:

  1. It's inefficient, since we'd generate a constructor for every place in

the AST where we'd visit this unnamed type.

  1. It made it impossible to resolve function overloads to call

the default constructor. This made it so that the autoInitializeVariables
pass would crash if we ever generated more than one of these functions
for the same type.

To make this work, this patch splits up what used to be the resolveNamesInFunctions
pass. Previously, this pass would both resolve calls and resolve type names.
Synthesize constructors would run before this, since resolving calls meant we
may resolve a call to one of these synthesized constructors. However, synthesize
constructors now needs to test for the equality unnamed types, so it now requires
running the type resolution part of resolveNamesInFunctions before it runs.

This patch splits resolveNamesInFunctions into two parts:
resolveTypeNamesInFunctions and resolveCallsInFunctions.

So we used to run:
synthesizeConstructors
resolveNamesInFunctions

And now we run:
resolveTypeNamesInFunctions
synthesizeConstructors
resolveCallsInFunctions

Test: webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html

  • Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:

(WebCore::WHLSL::AST::BooleanLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:

(WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLExpression.h:

(WebCore::WHLSL::AST::Expression::copyTypeTo const):

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:

(WebCore::WHLSL::AST::FloatLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:

(WebCore::WHLSL::AST::FloatLiteralType::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:

(WebCore::WHLSL::AST::IntegerLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:

(WebCore::WHLSL::AST::IntegerLiteralType::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:

(WebCore::WHLSL::AST::NullLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
  • Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:

(WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:

(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
  • Modules/webgpu/WHLSL/WHLSLASTDumper.h:
  • Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:

(WebCore::WHLSL::matches):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::NameResolver):
(WebCore::WHLSL::NameResolver::visit):
(WebCore::WHLSL::resolveTypeNamesInFunctions):
(WebCore::WHLSL::resolveCallsInFunctions):
(WebCore::WHLSL::resolveNamesInFunctions): Deleted.

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:

(WebCore::WHLSL::NameResolver::setIsResolvingCalls):

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::prepareShared):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:

(WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey):
(WebCore::WHLSL::UnnamedTypeKey::isEmptyValue const):
(WebCore::WHLSL::UnnamedTypeKey::isHashTableDeletedValue const):
(WebCore::WHLSL::UnnamedTypeKey::hash const):
(WebCore::WHLSL::UnnamedTypeKey::operator== const):
(WebCore::WHLSL::UnnamedTypeKey::unnamedType const):
(WebCore::WHLSL::UnnamedTypeKey::Hash::hash):
(WebCore::WHLSL::UnnamedTypeKey::Hash::equal):
(WebCore::WHLSL::UnnamedTypeKey::Traits::isEmptyValue):
(WebCore::WHLSL::FindAllTypes::takeUnnamedTypes):
(WebCore::WHLSL::FindAllTypes::appendNamedType):
(WebCore::WHLSL::synthesizeConstructors):

LayoutTests:

  • webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors-expected.txt: Added.
  • webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html: Added.
10:26 AM Changeset in webkit [246549] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

MaybeParseAsGeneratorForScope sometimes loses track of its scope ref
https://bugs.webkit.org/show_bug.cgi?id=198969
<rdar://problem/51620714>

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/nested-yield-in-arrow-function-should-be-a-syntax-error.js: Added.

(catch):

Source/JavaScriptCore:

Sometimes if the parser has enough nested scopes
MaybeParseAsGeneratorForScope can lose track of the ScopeRef it
should be tracking. This is because the parser sometimes relocates
its ScopeRefs. To fix this MaybeParseAsGeneratorForScope should
hold the scope ref it's watching.

  • parser/Parser.cpp:

(JSC::Scope::MaybeParseAsGeneratorForScope::MaybeParseAsGeneratorForScope):
(JSC::Scope::MaybeParseAsGeneratorForScope::~MaybeParseAsGeneratorForScope):

10:20 AM Changeset in webkit [246548] by david_quesada@apple.com
  • 2 edits in trunk/Tools

REGRESSION: _WKDownload.OriginatingWebView and _WKDownload.CrashAfterDownloadDidFinishWhenDownloadProxyHoldsTheLastRefOnWebProcessPool failing
https://bugs.webkit.org/show_bug.cgi?id=198954
rdar://problem/51711556

Reviewed by Alex Christensen.

For these tests, kill the web process after the download starts. This makes the deallocation
of the download-originating web views, which these tests depend on, more reliable.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
(-[WaitUntilDownloadCanceledDelegate _downloadDidStart:]):

10:19 AM Changeset in webkit [246547] by Adrian Perez de Castro
  • 4 edits in trunk

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.25.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.25.1
10:02 AM Changeset in webkit [246546] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

Expose DataDetectors context generation on WKContentViewInteraction
https://bugs.webkit.org/show_bug.cgi?id=198950
<rdar://problem/51116021>

Reviewed by Andy Estes.

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

(-[WKActionSheetAssistant currentPositionInformation]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):

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

(-[WKContentView dataDetectionContextForPositionInformation:]):
(-[WKContentView dataDetectionContextForActionSheetAssistant:]):
For use by other clients, add -dataDetectionContextForPositionInformation:
and make -dataDetectionContextForActionSheetAssistant: use it.
Also, pull the code to augment the context with surrounding text out of
from WKActionSheetAssistant.

9:52 AM Changeset in webkit [246545] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[WPE] Fix building the documentation

Unreviewed.

  • UIProcess/API/wpe/docs/wpe-docs.sgml: Fix typo "2.62" -> "2.26"
9:48 AM Changeset in webkit [246544] by Truitt Savell
  • 5 edits in trunk/Source/WebKit

Unreviewed, rolling out r246531.

Broke internal builds.

Reverted changeset:

"Expose DataDetectors context generation on
WKContentViewInteraction"
https://bugs.webkit.org/show_bug.cgi?id=198950
https://trac.webkit.org/changeset/246531

9:44 AM Changeset in webkit [246543] by Truitt Savell
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r246524.

Caused 45 webgpu/ crashes.

Reverted changeset:

"[WHLSL] The name resolver does not deal with
nativeFunctionDeclaration"
https://bugs.webkit.org/show_bug.cgi?id=198306
https://trac.webkit.org/changeset/246524

9:41 AM Changeset in webkit [246542] by Truitt Savell
  • 4 edits
    1 add in trunk/Source/WebCore/PAL

Link to the new AppSSO private framework
https://bugs.webkit.org/show_bug.cgi?id=198949
<rdar://problem/51281897>

Patch by Jiewen Tan <jiewen_tan@apple.com> on 2019-06-18
Reviewed by Brent Fulgham.

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AppSSOSoftLink.h:
  • pal/cocoa/AppSSOSoftLink.mm:
  • pal/spi/cocoa/AppSSOSPI.h: Added.
9:36 AM Changeset in webkit [246541] by Truitt Savell
  • 4 edits
    1 delete in trunk/Source/WebCore/PAL

Unreviewed, rolling out r246534.

Caused 45 webgpu/ tests to crash.

Reverted changeset:

"Link to the new AppSSO private framework"
https://bugs.webkit.org/show_bug.cgi?id=198949
https://trac.webkit.org/changeset/246534

9:04 AM Changeset in webkit [246540] by Alan Bujtas
  • 9 edits
    1 add in trunk/Source/WebCore

[LFC][IFC] Inline quirks should have their dedicated class.
https://bugs.webkit.org/show_bug.cgi?id=198962
<rdar://problem/51848170>

Reviewed by Antti Koivisto.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/LayoutState.h:
  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp: Added.

(WebCore::Layout::InlineFormattingContext::Quirks::collapseLineDescent):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::close):

  • layout/inlineformatting/InlineLineBreaker.cpp:
  • layout/inlineformatting/InlineLineBreaker.h:
8:23 AM Changeset in webkit [246539] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Line::append() should take care of all the inline types.
https://bugs.webkit.org/show_bug.cgi?id=198961
<rdar://problem/51847712>

Reviewed by Antti Koivisto.

Make all the existing Line::append* functions private.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): fix a typo.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::append):

  • layout/inlineformatting/InlineLine.h:
8:16 AM Changeset in webkit [246538] by Simon Fraser
  • 29 edits in trunk

Convert macOS to scroll by changing layer boundsOrigin
https://bugs.webkit.org/show_bug.cgi?id=198917

Reviewed by Antti Koivisto.

Source/WebCore:

macOS did frame and overflow scrolling by changing the position of the scrolled
contents layer. iOS scrolls by changing the boundsOrigin of the scrollContainer layer
(which it has to, to match how UIScrollView works).

The iOS approach removes the need for an extra layer whose only role is for
scroll positioning, so migrate macOS to the same approach. A later patch can remove
m_scrolledContentsLayer.

We can remove RenderLayerCompositor::m_clipLayer since m_scrollContainerLayer has exactly
the same role now.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

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

(-[CALayer _web_setLayerBoundsOrigin:]):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::setLocationOfScrolledContents):
(WebCore::RenderLayerBacking::updateScrollOffset):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateLayersForScrollPosition):
(WebCore::RenderLayerCompositor::updateScrollContainerGeometry):
(WebCore::RenderLayerCompositor::frameViewDidScroll):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateScrollLayerPosition): Deleted.
(WebCore::RenderLayerCompositor::updateScrollLayerClipping): Deleted.

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Remove unreached and confusing code.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::repositionScrollingLayers):

LayoutTests:

  • compositing/iframes/scrolling-iframe-expected.txt:
  • compositing/overflow/textarea-scroll-touch-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt:
  • compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt:
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
7:47 AM Changeset in webkit [246537] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Identify elements with monotonically increasing counters
https://bugs.webkit.org/show_bug.cgi?id=198916

Reviewed by Xabier Rodriguez-Calvar.

Those ids tend to be shorter, easier to read for humans and for
diff tools :) Underscores were also replaced by dashes, for
consistency with the usual GStreamer element naming untold
conventions.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoder::makeElement):
(WebCore::GStreamerVideoEncoder::InitEncode):

3:52 AM Changeset in webkit [246536] by zandobersek@gmail.com
  • 5 edits in trunk

[WebGL] Extensions3DOpenGLES::bindVertexArrayOES() should allow zero array object
https://bugs.webkit.org/show_bug.cgi?id=198929

Reviewed by Carlos Garcia Campos.

Source/WebCore:

A 0 object parameter for the glBindVertexArrayOES() call is a valid
value since it binds the default vertex array object for any updates and
draws. As such the Extensions3DOpenGLES implementation shouldn't return
early if the object value is 0.

No new tests -- covered by existing tests.

  • platform/graphics/opengl/Extensions3DOpenGLES.cpp:

(WebCore::Extensions3DOpenGLES::bindVertexArrayOES):

LayoutTests:

Enable the passing tests and update one baseline.

  • platform/wpe/TestExpectations:
  • platform/wpe/webgl/2.0.0/conformance/extensions/oes-vertex-array-object-expected.txt:
3:46 AM Changeset in webkit [246535] by dino@apple.com
  • 3 edits in trunk/Source/WebKit

Attachment elements are missing context menu previews
https://bugs.webkit.org/show_bug.cgi?id=198946

Reviewed by Tim Horton.

When requesting position information on an <attachment> element,
we were not providing a snapshot image.

  • WebProcess/WebPage/WebPage.h: New common method to take a snapshot.
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::shareableBitmapSnapshotForNode): New helper.
(WebKit::WebPage::positionInformation): If the element is an attachment,
then ask for a snapshot.

1:17 AM Changeset in webkit [246534] by jiewen_tan@apple.com
  • 4 edits
    1 add in trunk/Source/WebCore/PAL

Link to the new AppSSO private framework
https://bugs.webkit.org/show_bug.cgi?id=198949
<rdar://problem/51281897>

Reviewed by Brent Fulgham.

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AppSSOSoftLink.h:
  • pal/cocoa/AppSSOSoftLink.mm:
  • pal/spi/cocoa/AppSSOSPI.h: Added.
1:11 AM Changeset in webkit [246533] by mitz@apple.com
  • 2 edits in trunk/Tools

Revert workaround for bug 198904 from run-webkit-archive
https://bugs.webkit.org/show_bug.cgi?id=198931

Reviewed by Alexey Proskuryakov.

Reverted r245965, now that the load commands in the XPC service binaries make them correctly
pick up the built frameworks.

  • WebKitArchiveSupport/run-webkit-archive:

(set_dyld_framework_path):

Note: See TracTimeline for information about the timeline view.