WebKit-https.git
11 months agoSynchronize MathML WPT tests against upstream
commit-queue@webkit.org [Fri, 20 Sep 2019 11:00:53 +0000 (11:00 +0000)]
Synchronize MathML WPT tests against upstream
https://bugs.webkit.org/show_bug.cgi?id=201975

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-20
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Sync is based on a3a4442b04c37155f81c4ad4ae9c06339f76ce14.

* resources/import-expectations.json:
* web-platform-tests/mathml/presentation-markup/direction/direction-006.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-007.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-008.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-009.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-010.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html: Added.
* web-platform-tests/mathml/presentation-markup/menclose/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001-expected.txt:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001.html:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002-expected.txt:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form-dynamic.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form-fallback.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html: Added.
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-paint-lspace-rspace.html:
* web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html: Added.
* web-platform-tests/mathml/presentation-markup/operators/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html: Added.
* web-platform-tests/mathml/presentation-markup/radicals/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html: Added.
* web-platform-tests/mathml/presentation-markup/scripts/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/spaces/space-like-004-expected.txt:
* web-platform-tests/mathml/presentation-markup/spaces/space-like-004.html:
* web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/tables/table-001.html: Added.
* web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/tables/table-002.html: Added.
* web-platform-tests/mathml/presentation-markup/tables/w3c-import.log:
* web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-011.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-012.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-013.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-014.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-015.html:
* web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
* web-platform-tests/mathml/relations/css-styling/ignored-properties-001.html: Added.
* web-platform-tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html:
* web-platform-tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-auto.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-script.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-fraktur.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-initial.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-looped.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-monospace.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-script.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-stretched.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-tailed.html:
* web-platform-tests/mathml/relations/css-styling/not-participating-to-parent-layout.html:
* web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html:
* web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-002.html:
* web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002.html:
* web-platform-tests/mathml/relations/css-styling/w3c-import.log:
* web-platform-tests/mathml/relations/css-styling/width-height-001.html:
* web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html:
* web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative-expected.html:
* web-platform-tests/mathml/relations/html5-tree/display-2-expected.html: Added.
* web-platform-tests/mathml/relations/html5-tree/display-2.html: Added.
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html:
* web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt: Added.
* web-platform-tests/mathml/relations/html5-tree/tabindex-001.html: Added.
* web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt: Added.
* web-platform-tests/mathml/relations/html5-tree/tabindex-002.html: Added.
* web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
* web-platform-tests/mathml/support/box-navigation.js: Added.
(IsInFlow):
(firstInFlowChild):
(nextInFlowSibling):
(previousInFlowSibling):
* web-platform-tests/mathml/support/feature-detection.js:
(MathMLFeatureDetection.string_appeared_here):
(MathMLFeatureDetection.has_mspace): Deleted.
(MathMLFeatureDetection.has_operator_spacing): Deleted.
(MathMLFeatureDetection.has_mfrac): Deleted.
(MathMLFeatureDetection.has_msqrt): Deleted.
(MathMLFeatureDetection.has_menclose): Deleted.
(MathMLFeatureDetection.has_dir): Deleted.
* web-platform-tests/mathml/support/mathml-fragments.js:
(FragmentHelper.createElement):
(FragmentHelper.forceNonEmptyElement):
(FragmentHelper.forceNonEmptyDescendants):
* web-platform-tests/mathml/support/operator-dictionary.js: Added.
(async.fetchOperatorDictionary):
(splitKey):
(spaceIndexToLength):
(defaultPropertyValue):
* web-platform-tests/mathml/support/operator-dictionary.json: Added.
* web-platform-tests/mathml/support/w3c-import.log:
* web-platform-tests/mathml/tools/mathvariant-transforms.py:
* web-platform-tests/mathml/tools/operator-dictionary.py: Added.
(parseHexaNumber):
(parseHexaSequence):
(parseSpaces):
(parseProperties):
(buildKeyAndValueFrom):
(createSizeVariants):
(createStretchy):
* web-platform-tests/mathml/tools/operator-dictionary.xsl: Added.
* web-platform-tests/mathml/tools/utils/misc.py:
* web-platform-tests/mathml/tools/utils/w3c-import.log:
* web-platform-tests/mathml/tools/w3c-import.log:

LayoutTests:

* TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/dir-mo-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt: Added.
* platform/ios-wk1/imported/w3c/web-platform-tests/matml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
* platform/ios-wk1/imported/w3c/web-platform-tests/matml/relations/css-styling/ignored-properties-001-expected.txt: Added.
* platform/mac/TestExpectations:
* tests-options.json:

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

11 months agoUI process crash when using callOnMainThread() after the main thread dispatcher has...
commit-queue@webkit.org [Fri, 20 Sep 2019 08:45:03 +0000 (08:45 +0000)]
UI process crash when using callOnMainThread() after the main thread dispatcher has been destroyed
https://bugs.webkit.org/show_bug.cgi?id=197266

Patch by Libor Bukata <libor.bukata@oracle.com> on 2019-09-20
Reviewed by Carlos Garcia Campos.

* wtf/generic/MainThreadGeneric.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):

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

11 months agoUnreviewed. Remove duplicated HashMap iteration since r248734.
jh718.park@samsung.com [Fri, 20 Sep 2019 08:33:26 +0000 (08:33 +0000)]
Unreviewed. Remove duplicated HashMap iteration since r248734.

ASSERT statement already exists for |storageNamespaceID|,
so |HashMap.get| for the parameter is not needed.

* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::destroySessionStorageNamespace):

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

11 months agoASSERT NOT REACHED in Inspector::InjectedScriptModule::ensureInjected() seen with...
drousso@apple.com [Fri, 20 Sep 2019 08:28:09 +0000 (08:28 +0000)]
ASSERT NOT REACHED in Inspector::InjectedScriptModule::ensureInjected() seen with inspector/heap/getRemoteObject.html
https://bugs.webkit.org/show_bug.cgi?id=201713
<rdar://problem/55290349>

Reviewed by Joseph Pecoraro.

Expose the `Exception` object by leveraging an `Expected` of `JSValue` as the return value
instead of using a referenced `bool` (which wouldn't include any of the exception's info).

* bindings/ScriptFunctionCall.h:
* bindings/ScriptFunctionCall.cpp:
(Deprecated::ScriptFunctionCall::call):

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapCallFrames const):
(Inspector::InjectedScript::wrapObject const):
(Inspector::InjectedScript::wrapJSONString const):
(Inspector::InjectedScript::wrapTable const):
(Inspector::InjectedScript::previewValue const):
(Inspector::InjectedScript::findObjectById const):
(Inspector::InjectedScript::releaseObjectGroup):

* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled const):
(Inspector::InjectedScriptBase::makeCall):
(Inspector::InjectedScriptBase::makeAsyncCall):

* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::createInjectedScript):
(Inspector::InjectedScriptManager::injectedScriptFor):

* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected):

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

11 months agoUnreviewed. Fix Build warning below since r248734.
jh718.park@samsung.com [Fri, 20 Sep 2019 07:09:59 +0000 (07:09 +0000)]
Unreviewed. Fix Build warning below since r248734.

warning: unused variable ‘foo’ [-Wunused-variable]

* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::destroySessionStorageNamespace):
* NetworkProcess/WebStorage/StorageManagerSet.cpp:
(WebKit::StorageManagerSet::add):
(WebKit::StorageManagerSet::waitUntilTasksFinished):

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

11 months ago[FTW] Enable WebKitTestRunner build
bfulgham@apple.com [Fri, 20 Sep 2019 04:55:55 +0000 (04:55 +0000)]
[FTW] Enable WebKitTestRunner build
https://bugs.webkit.org/show_bug.cgi?id=201996

Reviewed by Fujii Hironori.

It's time to start getting the test system up and running for FTW.

This patch does the following:

1. Adds relevant CMake changes to get things building.
2. Adds a "--ftw" flag to the build scripts that will trigger a relevant build.
3. Updates 'webkitpy' to recognize the 'ftw' port.

Note: Pixel tests are not yet supported.

* PlatformFTW.cmake: Build the WK2 test runner.
* Scripts/build-webkit: Update to recognize the FTW port.
* Scripts/webkitdirs.pm: Ditto.
* Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl: Ditto.
* Scripts/webkitpy/common/config/ports.py: Ditto.
* Scripts/webkitpy/common/config/ports_unittest.py: Ditto.
* Scripts/webkitpy/common/version_name_map.py: Ditto.
* Scripts/webkitpy/port/factory.py: Ditto.
* Scripts/webkitpy/port/win.py: Ditto.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive): Don't build or run this method
on Windows.
* WebKitTestRunner/PlatformFTW.cmake: Added.
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
* WebKitTestRunner/win/TestInvocationDirect2D.cpp: Added.
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Add stub implementation.

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

11 months agoUnreviewed. Fix Build error below since r248879.
jh718.park@samsung.com [Fri, 20 Sep 2019 04:47:51 +0000 (04:47 +0000)]
Unreviewed. Fix Build error below since r248879.

warning: unused variable ‘canvas’ [-Wunused-variable]

No new tests, no new behavioral changes.

* html/canvas/GPUBasedCanvasRenderingContext.cpp:
(WebCore::GPUBasedCanvasRenderingContext::notifyCanvasContentChanged):

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

11 months ago[FTW, WinCairo] Support running tests in Release mode
bfulgham@apple.com [Fri, 20 Sep 2019 03:51:38 +0000 (03:51 +0000)]
[FTW, WinCairo] Support running tests in Release mode
https://bugs.webkit.org/show_bug.cgi?id=202021

Reviewed by Don Olmstead.

In Bug 201597, we added new features to better lock down JSC features in the
potentially untrusted WebContent process.

Unfortunately, this change included XPC Dictionary items used at startup to
lock down JSC features before entering the main execution of the process. These
changes were not done for the WinCairo or FTW ports.

We need to pass the state of the JIT and whether to enable certain JSC features
at process launch. Since the XPC mechanisms we use on macOS and iOS do not exist
on Windows, I am implementing them as command-line flags.

    -configure-jsc-for-testing: Sets the JSC in testing mode.
    -disable-jit: Disables the JIT.

See r249808 for the equivalent changes on macOS and iOS.

* PlatformFTW.cmake: Add some missing header files needed when building tests.
* Shared/win/AuxiliaryProcessMainWin.cpp:
(WebKit::AuxiliaryProcessMainBase::parseCommandLine):
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
(WebKit::ProcessLauncher::launchProcess):

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

11 months agoWeb Inspector: searching in overrides doesn't work
pecoraro@apple.com [Fri, 20 Sep 2019 03:36:15 +0000 (03:36 +0000)]
Web Inspector: searching in overrides doesn't work
https://bugs.webkit.org/show_bug.cgi?id=202020

Reviewed by Devin Rousso.

* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
Do not go to agents for a local resource. Search locally in the TextEditor.

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

11 months ago[Win][MiniBrowser] Use _com_ptr_t methods instead of calling QueryInterface explictly
Hironori.Fujii@sony.com [Fri, 20 Sep 2019 03:18:45 +0000 (03:18 +0000)]
[Win][MiniBrowser] Use _com_ptr_t methods instead of calling QueryInterface explictly
https://bugs.webkit.org/show_bug.cgi?id=201976

Reviewed by Don Olmstead.

This change consists of three refactorings:
1. Replaced explicit QueryInterface with _com_ptr_t methods
2. Replaced typedef with _COM_SMARTPTR_TYPEDEF macro
3. Replaced WebCore's COMPtr with _com_ptr_t because it is not a public WebKit API

* MiniBrowser/win/MiniBrowserWebHost.cpp:
(MiniBrowserWebHost::didFirstLayoutInFrame): Deleted.
* MiniBrowser/win/MiniBrowserWebHost.h:
(MiniBrowserWebHost::didFirstLayoutInFrame):
* MiniBrowser/win/PrintWebUIDelegate.cpp:
(getHandleFromWebView):
(PrintWebUIDelegate::webViewPrintingMarginRect):
(PrintWebUIDelegate::runModal):
(PrintWebUIDelegate::createModalDialog):
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(WebKitLegacyBrowserWindow::init):
(WebKitLegacyBrowserWindow::setToDefaultPreferences):
(WebKitLegacyBrowserWindow::showLastVisitedSites):
(WebKitLegacyBrowserWindow::reload):
(WebKitLegacyBrowserWindow::resetZoom):
(WebKitLegacyBrowserWindow::zoomIn):
(WebKitLegacyBrowserWindow::zoomOut):
(WebKitLegacyBrowserWindow::showLayerTree):
(WebKitLegacyBrowserWindow::print):
* MiniBrowser/win/WebKitLegacyBrowserWindow.h:
(WebKitLegacyBrowserWindow::privatePreferences):
* MiniBrowser/win/WinMain.cpp:
(wWinMain):
* MiniBrowser/win/stdafx.h:

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

11 months ago[JSC] DFG op_call_varargs should not assume that one-previous-local of freeReg is...
ysuzuki@apple.com [Fri, 20 Sep 2019 02:31:45 +0000 (02:31 +0000)]
[JSC] DFG op_call_varargs should not assume that one-previous-local of freeReg is usable
https://bugs.webkit.org/show_bug.cgi?id=202014

Reviewed by Saam Barati.

JSTests:

* stress/call-varargs-inlining-should-not-clobber-previous-to-free-register.js: Added.
(__v0):

Source/JavaScriptCore:

Let's look into the bytecode generated by the test.

    [   0] enter
    [   1] get_scope          loc4
    [   3] mov                loc5, loc4
    [   6] check_traps
    [   7] mov                loc6, callee
    [  10] create_direct_arguments loc7
    [  12] to_this            this
    [  15] mov                loc8, loc7
    [  18] mov                loc9, loc6
    [  21] mov                loc12, Undefined(const0)
    [  24] get_by_id          loc11, loc6, 0
    [  29] jneq_ptr           loc11, ApplyFunction, 18(->47)
    [  34] mov                loc11, loc6
    [  37] call_varargs       loc11, loc11, this, loc8, loc13, 0
    [  45] jmp                17(->62)
    [  47] mov                loc16, loc6
    [  50] mov                loc15, this
    [  53] mov                loc14, loc8
    [  56] call               loc11, loc11, 3, 22
    ...

call_varargs uses loc13 as firstFreeReg (first usable bottom register in the current stack-frame to spread variadic arguments after this).
This is correct. And call_varargs uses |this| as this argument for the call_varargs. This |this| argument is not in a region starting from loc13.
And it is not in the previous place to loc13 (|this| is not loc12).

On the other hand, DFG::ByteCodeParser's inlining path is always assuming that the previous to firstFreeReg is usable and part of arguments.
But this is wrong. loc12 in the above bytecode is used for `[  56] call               loc11, loc11, 3, 22`'s argument later, and this call assumes
that loc12 is not clobbered by call_varargs. But DFG and FTL clobbers it.

The test is recursively calling the same function, and we inline the same function one-level. And stack-overflow error happens when inlined
CallForwardVarargs (from op_call_varargs) is called. FTL recovers the frames, and at this point, outer function's loc12 is recovered to garbage since
LoadVarargs clobbers it. And we eventually use it and crash.

    60:<!0:-> LoadVarargs(Check:Untyped:Kill:@30, MustGen, start = loc13, count = loc15, machineStart = loc7, machineCount = loc9, offset = 0, mandatoryMinimum = 0, limit = 2, R:World, W:Stack(-16),Stack(-14),Stack(-13),Heap, Exits, ClobbersExit, bc#37, ExitValid)

This LoadVarargs clobbers loc12, loc13, and loc15 while loc12 is used.

In all the tiers, op_call_varargs first allocates enough region to hold varargs including |this|. And we store |this| value to a correct place.
DFG should not assume that the previous register to firstFreeReg is used for |this|.

This patch fixes DFG::ByteCodeParser's stack region calculation for op_call_varargs inlining. And we rename maxNumArguments to maxArgumentCountIncludingThis to
represent that `maxArgumentCountIncludingThis` includes |this| count.

* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::setMaxArgumentCountIncludingThis):
(JSC::CallLinkInfo::setMaxNumArguments): Deleted.
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::addressOfMaxArgumentCountIncludingThis):
(JSC::CallLinkInfo::maxArgumentCountIncludingThis):
(JSC::CallLinkInfo::addressOfMaxNumArguments): Deleted.
(JSC::CallLinkInfo::maxNumArguments): Deleted.
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::dump const):
* bytecode/CallLinkStatus.h:
(JSC::CallLinkStatus::maxArgumentCountIncludingThis const):
(JSC::CallLinkStatus::maxNumArguments const): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleVarargsInlining):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
* jit/JITCall.cpp:
(JSC::JIT::compileSetupFrame):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileSetupFrame):
* jit/JITOperations.cpp:

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

11 months ago[GTK] Dependency hunspell-en-gb cannot be found on Fedora 30
jdiggs@igalia.com [Fri, 20 Sep 2019 01:39:00 +0000 (01:39 +0000)]
[GTK] Dependency hunspell-en-gb cannot be found on Fedora 30
https://bugs.webkit.org/show_bug.cgi?id=202009

Update package name to hunspell-en-GB.

Reviewed by Carlos Alberto Lopez Perez.

* gtk/install-dependencies:

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

11 months agoWeb Inspector: Canvas: show WebGPU shader pipelines
drousso@apple.com [Fri, 20 Sep 2019 01:20:31 +0000 (01:20 +0000)]
Web Inspector: Canvas: show WebGPU shader pipelines
https://bugs.webkit.org/show_bug.cgi?id=201675

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/Canvas.json:
Add a `ProgramType` enum that conveys the type of shader program/pipeline when notifying the
frontend of a new program

Source/WebCore:

Tests: inspector/canvas/requestShaderSource-webgpu.html
       inspector/canvas/shaderProgram-add-remove-webgpu.html
       inspector/canvas/updateShader-webgpu.html

Create common base classes for `WebGPUPipeline` and `GPUPipeline` so that Web Inspector can
instrument both render and compute shader pipelines.

Refactor `InspectorShaderProgram` to support both `WebGLProgram` and `WebGPUPipeline` so
that the same object can be used for all types of shader "program"s.

Keep a copy of each shader module's source, and allow the shader module to be updated.

* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createShaderModule const):
(WebCore::WebGPUDevice::createRenderPipeline): Added.
(WebCore::WebGPUDevice::createComputePipeline): Added.
(WebCore::WebGPUDevice::createRenderPipeline const): Deleted.
(WebCore::WebGPUDevice::createComputePipeline const): Deleted.

* Modules/webgpu/WebGPUPipeline.h: Added.
(WebCore::WebGPUPipeline::isRenderPipeline const):
(WebCore::WebGPUPipeline::isComputePipeline const):
(WebCore::WebGPUPipeline::scriptExecutionContext const):
* Modules/webgpu/WebGPUPipeline.cpp: Added.
(WebCore::WebGPUPipeline::instancesMutex):
(WebCore::WebGPUPipeline::WebGPUPipeline):
(WebCore::WebGPUPipeline::~WebGPUPipeline):
* platform/graphics/gpu/GPUPipeline.cpp: Added.
* platform/graphics/gpu/GPUPipeline.h: Added.
(WebCore::GPUPipeline::isRenderPipeline const):
(WebCore::GPUPipeline::isComputePipeline const):

* Modules/webgpu/WebGPUComputePipeline.idl:
* Modules/webgpu/WebGPUComputePipeline.h:
(WebCore::WebGPUComputePipeline::computePipeline const): Deleted.
* Modules/webgpu/WebGPUComputePipeline.cpp:
(WebCore::WebGPUComputePipeline::create):
(WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
(WebCore::WebGPUComputePipeline::recompile): Added.
* platform/graphics/gpu/GPUComputePipeline.h:
(WebCore::GPUComputePipeline::isComputePipeline): Added.
* platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
(WebCore::GPUComputePipeline::tryCreate):
(WebCore::GPUComputePipeline::GPUComputePipeline):
(WebCore::GPUComputePipeline::recompile): Added.

* Modules/webgpu/WebGPURenderPipeline.idl:
* Modules/webgpu/WebGPURenderPipeline.h:
(WebCore::WebGPURenderPipeline::renderPipeline const): Deleted.
* Modules/webgpu/WebGPURenderPipeline.cpp:
(WebCore::WebGPURenderPipeline::create):
(WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
(WebCore::WebGPURenderPipeline::recompile): Added.
* platform/graphics/gpu/GPURenderPipeline.h:
(WebCore::GPURenderPipeline::isRenderPipeline): Added.
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::tryCreateMtlRenderPipelineState):
(WebCore::GPURenderPipeline::tryCreate):
(WebCore::GPURenderPipeline::GPURenderPipeline):
(WebCore::GPURenderPipeline::recompile): Added.

* Modules/webgpu/WebGPUShaderModule.h:
(WebCore::WebGPUShaderModule::source const): Added.
* Modules/webgpu/WebGPUShaderModule.cpp:
(WebCore::WebGPUShaderModule::update): Added.
* Modules/webgpu/WebGPUProgrammableStageDescriptor.h:
* platform/graphics/gpu/GPUProgrammableStageDescriptor.h:
(WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):

* inspector/InspectorShaderProgram.h:
* inspector/InspectorShaderProgram.cpp:
(WebCore::InspectorShaderProgram::create):
(WebCore::InspectorShaderProgram::InspectorShaderProgram):
(WebCore::InspectorShaderProgram::program const): Added.
(WebCore::InspectorShaderProgram::pipeline const): Added.
(WebCore::shaderForType): Added.
(WebCore::InspectorShaderProgram::requestShaderSource): Added.
(WebCore::InspectorShaderProgram::updateShader): Added.
(WebCore::InspectorShaderProgram::context const): Deleted.
(WebCore::InspectorShaderProgram::shaderForType): Deleted.

* inspector/agents/InspectorCanvasAgent.h:
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::InspectorCanvasAgent::discardAgent):
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::disable):
(WebCore::InspectorCanvasAgent::requestShaderSource):
(WebCore::InspectorCanvasAgent::updateShader):
(WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
(WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
(WebCore::InspectorCanvasAgent::frameNavigated):
(WebCore::InspectorCanvasAgent::didCreateWebGLProgram): Added.
(WebCore::InspectorCanvasAgent::willDestroyWebGLProgram): Added.
(WebCore::InspectorCanvasAgent::isWebGLProgramDisabled): Added.
(WebCore::InspectorCanvasAgent::isWebGLProgramHighlighted): Added.
(WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Added.
(WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Added.
(WebCore::InspectorCanvasAgent::programDestroyedTimerFired): Added.
(WebCore::InspectorCanvasAgent::reset): Added.
(WebCore::InspectorCanvasAgent::unbindProgram):
(WebCore::InspectorCanvasAgent::findInspectorProgram):
(WebCore::InspectorCanvasAgent::didCreateProgram): Deleted.
(WebCore::InspectorCanvasAgent::willDeleteProgram): Deleted.
(WebCore::InspectorCanvasAgent::isShaderProgramDisabled): Deleted.
(WebCore::InspectorCanvasAgent::isShaderProgramHighlighted): Deleted.
(WebCore::InspectorCanvasAgent::clearCanvasData): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didCreateWebGLProgram): Added.
(WebCore::InspectorInstrumentation::willDestroyWebGLProgram): Added.
(WebCore::InspectorInstrumentation::isWebGLProgramDisabled): Added.
(WebCore::InspectorInstrumentation::isWebGLProgramHighlighted): Added.
(WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Added.
(WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Added.
(WebCore::InspectorInstrumentation::didCreateProgram): Deleted.
(WebCore::InspectorInstrumentation::willDeleteProgram): Deleted.
(WebCore::InspectorInstrumentation::isShaderProgramDisabled): Deleted.
(WebCore::InspectorInstrumentation::isShaderProgramHighlighted): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCreateWebGLProgramImpl): Added.
(WebCore::InspectorInstrumentation::willDestroyWebGLProgramImpl): Added.
(WebCore::InspectorInstrumentation::isWebGLProgramDisabledImpl): Added.
(WebCore::InspectorInstrumentation::isWebGLProgramHighlightedImpl): Added.
(WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Added.
(WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Added.
(WebCore::InspectorInstrumentation::didCreateProgramImpl): Deleted.
(WebCore::InspectorInstrumentation::willDeleteProgramImpl): Deleted.
(WebCore::InspectorInstrumentation::isShaderProgramDisabledImpl): Deleted.
(WebCore::InspectorInstrumentation::isShaderProgramHighlightedImpl): Deleted.

* html/canvas/WebGLProgram.h:
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::WebGLProgram):
(WebCore::WebGLProgram::~WebGLProgram):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::InspectorScopedShaderProgramHighlight::showHightlight):
(WebCore::WebGLRenderingContextBase::createProgram):
(WebCore::WebGLRenderingContextBase::deleteProgram):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
Rename WebGL program instrumentation points to be less ambiguous.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Show WebGPU shader pipelines ("programs") underneath each corresponding WebGPU device.

Allow editing of attached shader modules for each WebGPU shader pipeline, but don't allow
highlighting/disabling, as WebGPU pipelines don't have those capabilities/concepts yet.

* UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.programCreated):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.programCreated):

* UserInterface/Models/Canvas.js:
(WI.Canvas.prototype.nextShaderProgramDisplayNumberForProgramType): Added.
(WI.Canvas.prototype.nextShaderProgramDisplayNumber): Deleted.

* UserInterface/Models/ShaderProgram.js:
(WI.ShaderProgram):
(WI.ShaderProgram.contextTypeSupportsProgramType): Added.
(WI.ShaderProgram.programTypeSupportsShaderType): Added.
(WI.ShaderProgram.prototype.get programType): Added.
(WI.ShaderProgram.prototype.get displayName):
(WI.ShaderProgram.prototype.set disabled):
(WI.ShaderProgram.prototype.requestShaderSource):
(WI.ShaderProgram.prototype.updateShader):
(WI.ShaderProgram.prototype.showHighlight):
(WI.ShaderProgram.prototype.hideHighlight):
(WI.ShaderProgram.prototype.requestVertexShaderSource): Deleted.
(WI.ShaderProgram.prototype.requestFragmentShaderSource): Deleted.
(WI.ShaderProgram.prototype.updateVertexShader): Deleted.
(WI.ShaderProgram.prototype.updateFragmentShader): Deleted.
(WI.ShaderProgram.prototype._requestShaderSource): Deleted.
(WI.ShaderProgram.prototype._updateShader): Deleted.

* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
(WI.ShaderProgramContentView.prototype.get navigationItems): Added.
(WI.ShaderProgramContentView.prototype.shown):
(WI.ShaderProgramContentView.prototype.hidden):
(WI.ShaderProgramContentView.prototype.get saveData):
(WI.ShaderProgramContentView.prototype._refreshContent):
(WI.ShaderProgramContentView.prototype._updateShader):
(WI.ShaderProgramContentView.prototype._contentDidChange):
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .shader): Added.
(.content-view.shader-program > .shader.compute): Added.
(body[dir=ltr] .content-view.shader-program > .shader.vertex,): Added.
(body[dir=ltr] .content-view.shader-program > .shader.fragment,): Added.
(.content-view.shader-program > .shader + .shader): Added.
(.content-view.shader-program > .shader > header > *): Added.
(.content-view.shader-program > .shader > header > .shader-type): Added.
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header): Added.
(.content-view.shader-program > .text-editor.shader): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader): Deleted.
(body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader): Deleted.
(.content-view.shader-program > .text-editor.shader > .type-title): Deleted.
(.content-view.shader-program > .text-editor.shader > .CodeMirror): Deleted.
* UserInterface/Views/CodeMirrorAdditions.js:

* UserInterface/Views/ShaderProgramTreeElement.js:
(WI.ShaderProgramTreeElement):
(WI.ShaderProgramTreeElement.prototype.onattach):
(WI.ShaderProgramTreeElement.prototype.ondetach):
(WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
(WI.ShaderProgramTreeElement.prototype.populateContextMenu):

* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

Split existing shader tests into WebGL and WebGPU sub-tests for different platforms.

* inspector/canvas/requestShaderSource.html:
* inspector/canvas/requestShaderSource-expected.txt:
* inspector/canvas/updateShader.html:
* inspector/canvas/updateShader-expected.txt:

* inspector/canvas/resources/shaderProgram-utilities-webgpu.js: Added.
* inspector/canvas/requestShaderSource-webgpu.html: Added.
* inspector/canvas/requestShaderSource-webgpu-expected.txt: Added.
* inspector/canvas/shaderProgram-add-remove-webgpu.html: Added.
* inspector/canvas/shaderProgram-add-remove-webgpu-expected.txt: Added.
* inspector/canvas/updateShader-webgpu-expected.txt: Added.
* inspector/canvas/updateShader-webgpu.html: Added.

* inspector/canvas/resources/shaderProgram-utilities-webgl.js: Renamed from LayoutTests/inspector/canvas/resources/shaderProgram-utilities.js.
* inspector/canvas/console-record-webgl.html:
* inspector/canvas/console-record-webgl2.html:
* inspector/canvas/recording-webgl-frameCount.html:
* inspector/canvas/recording-webgl-full.html:
* inspector/canvas/recording-webgl-memoryLimit.html:
* inspector/canvas/recording-webgl-snapshots.html:
* inspector/canvas/recording-webgl2-frameCount.html:
* inspector/canvas/recording-webgl2-full.html:
* inspector/canvas/recording-webgl2-memoryLimit.html:
* inspector/canvas/recording-webgl2-snapshots.html:
* inspector/canvas/requestShaderSource-webgl.html: Added.
* inspector/canvas/requestShaderSource-webgl-expected.txt: Added.
* inspector/canvas/setShaderProgramDisabled.html:
* inspector/canvas/setShaderProgramHighlighted.html:
* inspector/canvas/shaderProgram-add-remove-webgl.html:
* inspector/canvas/shaderProgram-add-remove-webgl2.html:
* inspector/canvas/updateShader-webgl.html: Added.
* inspector/canvas/updateShader-webgl-expected.txt: Added.

* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wpe/TestExpectations:

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

11 months agoresults.webkit.org: Collapse results with the same version name
jbedard@apple.com [Fri, 20 Sep 2019 00:46:11 +0000 (00:46 +0000)]
results.webkit.org: Collapse results with the same version name
https://bugs.webkit.org/show_bug.cgi?id=201779

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.const.ending.this.version_name.substring):
(Configuration.prototype.toKey): Prefer version_name over version number in key.
(Configuration.prototype.compare): version_name comparison should always override version comparison.
(Configuration.prototype.compareSDKs): Make SDK regex global.
(Configuration.prototype.toParams): Remove E tag on version_name.
(Configuration): Append E tag on the version_name based on the SDK.
* resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(TimelineFromEndpoint.prototype.toString): Print version number with SDK.

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

11 months agoRename VMInspector::m_list to m_vmList.
mark.lam@apple.com [Fri, 20 Sep 2019 00:29:56 +0000 (00:29 +0000)]
Rename VMInspector::m_list to m_vmList.
https://bugs.webkit.org/show_bug.cgi?id=202015

Reviewed by Yusuke Suzuki.

m_vmList is more descriptive, and this rename helps grep-ability by disambiguating
it from other m_lists in the code base.

* tools/VMInspector.cpp:
(JSC::VMInspector::add):
(JSC::VMInspector::remove):
* tools/VMInspector.h:
(JSC::VMInspector::iterate):

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

11 months agoAdd better logging for when the view visibility state changes
cdumez@apple.com [Fri, 20 Sep 2019 00:11:57 +0000 (00:11 +0000)]
Add better logging for when the view visibility state changes
https://bugs.webkit.org/show_bug.cgi?id=202008

Reviewed by Geoffrey Garen.

* UIProcess/ApplicationStateTracker.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateActivityState):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground):
(WebKit::WebPageProxy::applicationWillEnterForeground):

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

11 months agoRegression(r248832): Unable to quicklook HTML files in Mail
cdumez@apple.com [Thu, 19 Sep 2019 23:55:36 +0000 (23:55 +0000)]
Regression(r248832): Unable to quicklook HTML files in Mail
https://bugs.webkit.org/show_bug.cgi?id=202012
<rdar://problem/55285295>

Reviewed by Geoff Garen and Brent Fulgham.

r248832 inadvertently reverted the fix for Mail that landed in r247400 by not using
the same logic to initialize the sandbox extension if the process had already
finished launching or not. In particular, the new code path that happens on process
launch unconditionally used '/' as resource directory for the sandbox extension if
the client did not provide one. The logic in maybeInitializeSandboxExtensionHandle()
would use the file URL's base URL as resource directory when creating a sandbox
extension for '/' would fail (which it often does).

To address the issue, have the logic that runs on process launch call
maybeInitializeSandboxExtensionHandle() so avoid duplicating code and make sure
both cases now have the Mail fix.

* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::didFinishLaunching):
* UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::isLaunching const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.messages.in:

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

11 months agomacCatalyst apps crash under TextCheckingControllerProxy::replaceRelativeToSelection...
timothy_horton@apple.com [Thu, 19 Sep 2019 23:15:52 +0000 (23:15 +0000)]
macCatalyst apps crash under TextCheckingControllerProxy::replaceRelativeToSelection when spell checking
https://bugs.webkit.org/show_bug.cgi?id=202010
<rdar://problem/54974971>

Reviewed by Beth Dakin.

* WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:
(WebKit::TextCheckingControllerProxy::replaceRelativeToSelection):
relativeReplacementRange is in the coordinate space of the document's text,
not the replacement string. We need to adjust into replacement string
coordinates before slicing the replacement, or we'll throw an exception
trying to read past the end of the string, in the case where the
replacement string is shorter than the replaced string (by more than 2 characters).

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

11 months agoReduce the number of required tag bits for the JSValue.
mark.lam@apple.com [Thu, 19 Sep 2019 22:23:50 +0000 (22:23 +0000)]
Reduce the number of required tag bits for the JSValue.
https://bugs.webkit.org/show_bug.cgi?id=201990

Reviewed by Yusuke Suzuki.

We're reducing the number of tag bits to 15.  It should just work.

How did we arrive at 15 bits?
============================
Currently, the minimum number of top bits used by doubles is 13-bits.  The
highest double bit encoding are:

    "negative" pureNaN: starts with 0xfff8
    negative infinity:  starts with 0xfff0
    highest number:     starts with 0xffe*
    lowest number:      starts with 0x0000

Requirements:
1. We need tags for 2 range of numbers: pointers (all 0s at the top), and ints
   (all 1s at the top).

2. We want to be able to add an offset to double bits and ensure that they never
   end up in the ranges for pointers and ints.

3. The int tag must be higher than whatever value is produced in the top bits
   when boxing a double.  We have code that relies on this relationship being
   true and checks if a JSValue is an int by checking if the tag bits are above
   or equal to the int tag.

4. We don't want to burn more than 2 CPU registers for tag / mask registers.

Based on the bit encoding of doubles, the full number range of the top 13 bits
are used in valid double numbers.  This means the minimum tag bits must be greater
than 13.

Consider a 14-bit tag.  The DoubleEncodeOffset will be 1 << 50 i.e. starts with
0x0004.  With this encoding,
    "negative" pureNaN: maps to 0xfff8 + 0x0004 => 0xfffc

i.e. the top 14 bits are all set.  This conflicts with the int number range.

Next, consider a 15-bit tag.  The DoubleEncodeOffset will be 1 << 49 i.e. starts
with 0x0002.  With this encoding:
    "negative" pureNaN: maps to 0xfff8 + 0x0002 => 0xfffa
    negative infinity:  maps to 0xfff0 + 0x0002 => 0xfff2

i.e. 0xfffe (top 5 bits set) is available to represent ints.  This is the encoding
that we'll adopt in this patch.

Alternate encodings schemes to consider in the future:
=====================================================
1. If we're willing and able to purifyNaN at all the places that can produce a
   "negative" pureNaN, e.g. after a division, then we can remove the "negative"
   pureNaN as a valid double bit encoding.  With this, we can now box doubles
   with just a 14-bit tag, and DoubleEncodeOffset will be 1 << 50 i.e. starts with
   0x0004.

   With this encoding, the top double, negative infinity, is encoded as follows:

        negative infinity:  maps to 0xfff0 + 0x0004 => 0xfff4

   i.e. leaving 0xfffc as the tag for ints.

   We didn't adopt this scheme at this time because it adds complexity, and may
   have performance impact from the extra purifyNaN checks.

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

2. If we're willing to use 3 tag registers or always materialize one of them, we
   can also adopt a 14-bit tag as follows:

       Pointer {  0000:PPPP:PPPP:PPPP
                / 0002:****:****:****
       Double  {         ...
                \ FFFC:****:****:****
       Integer {  FFFF:0000:IIII:IIII

   where ...
       NumberMask is 0xfffc: any bits set in the top 14 bits is a number.
       IntMask is 0xffff: value is int if value & IntMask == IntMask.
       NotCellMask is NumberMask | OtherTag.

   Since the highest double is "negative" pureNaN i.e. starts with 0xfff8, adding
   a DoubleEncodeOffset of 1<<50 (starts with 0x0004) produces 0xfffc which is
   still less than 0xffff.

   We didn't adopt this scheme at this time because it adds complexity and may
   have a performance impact from either burning another register, or materializing
   the 3rd mask.

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

* runtime/JSCJSValue.h:

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

11 months agoWebStorageNamespaceProvider / StorageNamespaceImpl no longer need SessionIDs
commit-queue@webkit.org [Thu, 19 Sep 2019 21:46:03 +0000 (21:46 +0000)]
WebStorageNamespaceProvider / StorageNamespaceImpl no longer need SessionIDs
https://bugs.webkit.org/show_bug.cgi?id=201922
<rdar://problem/55505906>

Patch by Yury Semikhatsky <yurys@chromium.org> on 2019-09-19
Reviewed by Chris Dumez.

Fix GTK Debug compilation after https://trac.webkit.org/changeset/250083:
../../Source/WebKit/WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:75:55: error: no member named 'singleton' in namespace 'WebCore::Process'
ASSERT_UNUSED(sessionID, sessionID == WebProcess::singleton().sessionID());
                                  ~~~~~~~~~~~~^

* WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:

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

11 months agoREGRESSION: [iOS 13?] TestWebKitAPI.SharedBufferTest.tryCreateArrayBufferLargeSegment...
ryanhaddad@apple.com [Thu, 19 Sep 2019 21:34:10 +0000 (21:34 +0000)]
REGRESSION: [iOS 13?] TestWebKitAPI.SharedBufferTest.tryCreateArrayBufferLargeSegments is failing
https://bugs.webkit.org/show_bug.cgi?id=201902

Unreviewed test gardening.

* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: Disable the test on iOS.

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

11 months agoWorkerGlobalScope does not need a SessionID
cdumez@apple.com [Thu, 19 Sep 2019 21:19:21 +0000 (21:19 +0000)]
WorkerGlobalScope does not need a SessionID
https://bugs.webkit.org/show_bug.cgi?id=201991

Reviewed by Alex Christensen.

WorkerGlobalScope does not need a SessionID, now that we have a single session
per WebProcess.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::resume):
(WebCore::Document::privateBrowsingStateDidChange):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::matchRegistration):
(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
(WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
* testing/Internals.cpp:
(WebCore::Internals::serviceWorkerClientIdentifier const):
(WebCore::Internals::storeRegistrationsOnDisk):
(WebCore::Internals::hasServiceWorkerRegistration):
(WebCore::Internals::terminateServiceWorker):
(WebCore::Internals::hasServiceWorkerConnection):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerGlobalScope.h:
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::postMessage):
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::mainThreadConnection):
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::removeRegistration):
(WebCore::ServiceWorkerContainer::updateRegistration):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::notifyRegistrationIsSettled):
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):
(WebCore::ServiceWorkerContainer::ensureSWClientConnection):
* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::create):
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
* workers/service/ServiceWorkerGlobalScope.h:
* workers/service/ServiceWorkerProvider.cpp:
(WebCore::ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin):
(WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
* workers/service/ServiceWorkerProvider.h:
* workers/service/WorkerSWClientConnection.cpp:
(WebCore::WorkerSWClientConnection::WorkerSWClientConnection):
(WebCore::WorkerSWClientConnection::matchRegistration):
(WebCore::WorkerSWClientConnection::getRegistrations):
(WebCore::WorkerSWClientConnection::whenRegistrationReady):
(WebCore::WorkerSWClientConnection::addServiceWorkerRegistrationInServer):
(WebCore::WorkerSWClientConnection::removeServiceWorkerRegistrationInServer):
(WebCore::WorkerSWClientConnection::didResolveRegistrationPromise):
(WebCore::WorkerSWClientConnection::postMessageToServiceWorker):
(WebCore::WorkerSWClientConnection::serverConnectionIdentifier const):
(WebCore::WorkerSWClientConnection::syncTerminateWorker):
(WebCore::WorkerSWClientConnection::registerServiceWorkerClient):
(WebCore::WorkerSWClientConnection::finishFetchingScriptInServer):
(WebCore::WorkerSWClientConnection::scheduleJob):
* workers/service/WorkerSWClientConnection.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::ServiceWorkerThread::createWorkerGlobalScope):
* workers/service/context/ServiceWorkerThread.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
* workers/service/context/ServiceWorkerThreadProxy.h:
* worklets/WorkletGlobalScope.h:
(WebCore::WorkletGlobalScope::sessionID const):
* xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):
* xml/DOMParser.h:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.cpp:

Source/WebKit:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::serviceWorkerConnection):
(WebKit::WebServiceWorkerProvider::existingServiceWorkerConnection):
(WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession): Deleted.
(WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession): Deleted.
* WebProcess/Storage/WebServiceWorkerProvider.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateThrottleState):

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

11 months agoSource/WebCore:
commit-queue@webkit.org [Thu, 19 Sep 2019 20:52:30 +0000 (20:52 +0000)]
Source/WebCore:
[SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and<rect> elements
https://bugs.webkit.org/show_bug.cgi?id=199843

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-19
Reviewed by Simon Fraser, Nikolas Zimmermann.

The specification is: https://www.w3.org/TR/SVG2/geometry.html#RxProperty.

Change the initial value of rx and ry to be "auto". Change the parser to
parse LengthOrAuto for these properties. Handle the case if one of them
is missing.

Tests: svg/custom/ellipse-radius-auto-dynamic.svg
       svg/custom/ellipse-radius-auto-initial.svg
       svg/custom/ellipse-radius-length-initial.svg
       svg/custom/rect-radius-auto-dynamic.svg
       svg/custom/rect-radius-auto-initial.svg
       svg/custom/rect-radius-length-initial.svg

* css/CSSProperties.json:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeRxOrRy):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialRadius):
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleLayoutData::StyleLayoutData):
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::calculateRadiiAndCenter):

LayoutTests:
[SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and <rect> elements
https://bugs.webkit.org/show_bug.cgi?id=199843

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-19
Reviewed by Simon Fraser, Nikolas Zimmermann.

Add tests which exercise the initial setting for rx and ry: length, 'auto'.
Add tests to dynamically change the values of these properties from length
to 'auto'.

Skip the tests with dynamic changes till webkit.org/b/201918 is fixed.

* TestExpectations:
* svg/css/parse-length-expected.txt:
* svg/css/parse-length.html:
* svg/custom/ellipse-radius-auto-dynamic-expected.svg: Added.
* svg/custom/ellipse-radius-auto-dynamic.svg: Added.
* svg/custom/ellipse-radius-auto-initial-expected.svg: Added.
* svg/custom/ellipse-radius-auto-initial.svg: Added.
* svg/custom/ellipse-radius-length-initial-expected.svg: Added.
* svg/custom/ellipse-radius-length-initial.svg: Added.
* svg/custom/rect-radius-auto-dynamic-expected.svg: Added.
* svg/custom/rect-radius-auto-dynamic.svg: Added.
* svg/custom/rect-radius-auto-initial-expected.svg: Added.
* svg/custom/rect-radius-auto-initial.svg: Added.
* svg/custom/rect-radius-length-initial-expected.svg: Added.
* svg/custom/rect-radius-length-initial.svg: Added.

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

11 months ago[ews] Fix platform for JSC EWS
aakash_jain@apple.com [Thu, 19 Sep 2019 20:07:44 +0000 (20:07 +0000)]
[ews] Fix platform for JSC EWS
https://bugs.webkit.org/show_bug.cgi?id=201997

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/config.json:

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

11 months ago[WebGPU] Update messaging to reflect STP 92 requirement for demos
justin_fan@apple.com [Thu, 19 Sep 2019 19:36:35 +0000 (19:36 +0000)]
[WebGPU] Update messaging to reflect STP 92 requirement for demos
https://bugs.webkit.org/show_bug.cgi?id=201931

Reviewed by Jon Lee.

Demos don't work anymore on versions of Safari older than STP 92,
so update WebGPU feature detection to reflect that.

* demos/webgpu/babylon/babylonWebGpu.max.js:
* demos/webgpu/babylon/oneHelmetWebGPU.html:
* demos/webgpu/babylon/oneSphereWebGPU.html:
* demos/webgpu/compute-blur.html:
* demos/webgpu/compute-boids-compile.html:
* demos/webgpu/compute-boids.html:
* demos/webgpu/hello-cube.html:
* demos/webgpu/hello-triangle.html:
* demos/webgpu/scripts/compute-blur.js:
(async.init):
* demos/webgpu/scripts/compute-boids-compile.js:
* demos/webgpu/scripts/hello-triangle.js:
(async.helloTriangle):
* demos/webgpu/textured-cube.html:

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

11 months agoHTMLVideoElement with a broken poster image will take square dimension
commit-queue@webkit.org [Thu, 19 Sep 2019 19:19:37 +0000 (19:19 +0000)]
HTMLVideoElement with a broken poster image will take square dimension
https://bugs.webkit.org/show_bug.cgi?id=174122
<rdar://problem/33121806>

Patch by Peng Liu <peng.liu6@apple.com> on 2019-09-19
Reviewed by Daniel Bates.

Source/WebCore:

For a video element, if only the width attribute is given and the height attribute is missing,
an invalid poster image will make its aspect ratio to be 1, which is the historical WebKit behavior
if we're painting alt text and/or a broken image. This fix prevents that behavior to impact video elements.

We add a virtual function shouldDisplayBrokenImageIcon() to RenderImage and it will return true
only when the image source is given but cannot be downloaded. RenderMedia overrides this virtual function
and always return false because it never shows the broken image icon. RenderVideo inherits
that behavior from RenderMedia.

Then, in RenderImage::computeIntrinsicRatioInformation(), we only set the aspect ratio to 1
when we need to show the broken image icon. It is the historical WebKit behavior that we want to keep
for image element, but we also want to avoid its impact (this bug) on video elements.

We also replace the imageResource().errorOccurred() with shouldDisplayBrokenImageIcon() in
TreeBuilder::createLayoutBox() for the same reason.

The logic to display the broken image icon in RenderImage::renderReplaced() is also cleaned up.

Test: media/video-poster-not-found.html

* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::shouldDisplayBrokenImageIcon const):
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::computeIntrinsicRatioInformation const):
* rendering/RenderImage.h:
* rendering/RenderMedia.h:

LayoutTests:

When only the width (no height) attribute of a video element is given
and the the poster image is missing (cannot be downloaded),
the aspect ratio of the video element should not be 1, which is the default behavior
of WebKit to paint a broken image. Instead, it should be the aspect ratio of the video content.

* media/video-poster-not-found-expected.txt: Added.
* media/video-poster-not-found.html: Added.

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

11 months agoRefactoring: fix broken indentation in JSNonDestructibleProxy.h.
mark.lam@apple.com [Thu, 19 Sep 2019 19:02:06 +0000 (19:02 +0000)]
Refactoring: fix broken indentation in JSNonDestructibleProxy.h.
https://bugs.webkit.org/show_bug.cgi?id=201989

Reviewed by Saam Barati.

This patch only unindent the code to get it back to compliant formatting.
There is no actual code change.

* runtime/JSNonDestructibleProxy.h:
(JSC::JSNonDestructibleProxy::subspaceFor):
(JSC::JSNonDestructibleProxy::create):
(JSC::JSNonDestructibleProxy::createStructure):
(JSC::JSNonDestructibleProxy::JSNonDestructibleProxy):

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

11 months agoSyntax checker should report duplicate __proto__ properties
tzagallo@apple.com [Thu, 19 Sep 2019 18:45:12 +0000 (18:45 +0000)]
Syntax checker should report duplicate __proto__ properties
https://bugs.webkit.org/show_bug.cgi?id=201897
<rdar://problem/53201788>

Reviewed by Mark Lam.

JSTests:

* stress/syntax-checker-duplicate-underscore-proto.js: Added.
(catch):

Source/JavaScriptCore:

Currently we have two ways of parsing object literals:
- parseObjectLiteral: this is called in sloppy mode, and as an optimization for syntax checking,
  it doesn't allocate string literals while parsing properties. It does still allocate identifiers,
  but it won't store them in the Property object that it creates for each parsed property. This
  method backtracks and calls parseObjectStrictLiteral if it finds any getters or setters.
- parseObjectStrictLiteral: this is called in strict mode, or when the object contains getters/setters
  as stated above. This will always allocate string literals as well as identifiers and store them in
  the Property object, even during syntax checking.

From looking at the history, it seems that there was a distinction between these two methods:
parseStrictObjectLiteral was introduced in r62848 and contained an extra check for duplicate
getters/setters or properties defined as both getters/setters and constants. That distinction
was removed and the only distinction that remained was whether we build strings and store the
strings and properties as part of the Property object created by SyntaxChecker::createProperty.
However, this optimization is no longer valid, since we need to throw a SyntaxError for duplicate
__proto__ properties in object literals even in sloppy mode, which means that we do need to build
the strings and identifiers and store them as part of the Property objects.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseObjectLiteral):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseStrictObjectLiteral): Deleted.
* parser/Parser.h:

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

11 months agoRemove a now unnecessary hack to work around static const needing external linkage.
mark.lam@apple.com [Thu, 19 Sep 2019 18:28:19 +0000 (18:28 +0000)]
Remove a now unnecessary hack to work around static const needing external linkage.
https://bugs.webkit.org/show_bug.cgi?id=201988

Reviewed by Saam Barati.

MacroAssembler::dataTempRegister is now a constexpr, thereby ensuring that it's
inlinable.

* b3/B3Common.cpp:
(JSC::B3::pinnedExtendedOffsetAddrRegister):

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

11 months agoReplace JSValue #defines with static constexpr values.
mark.lam@apple.com [Thu, 19 Sep 2019 16:14:47 +0000 (16:14 +0000)]
Replace JSValue #defines with static constexpr values.
https://bugs.webkit.org/show_bug.cgi?id=201966

Reviewed by Yusuke Suzuki.

static constexpr is the modern C++ way to define these constants.

Some of the values are typed int64_t and some are int32_t.  The original #define
values are int64_t.  Hence, we adopt int64_t as the default type to use here.

However, some of these constants are being used as 32-bit values, and the code
was static_cast'ing them into int32_t.  This set of constants are all the small
values that fit in an int32_t anyway.  So, we're putting these in int32_t instead
so that we don't have to keep casting them.  In the few places where they are
used as int64_t, they will automatically get up-casted anyway.

In this patch, we also did the following:

1. Renamed TagMask to NotCellMask, because everywhere in the code, we're
   basically using it to filter out cells like this:

      if (value & NotCellMask) then goto handleNotCellCase;

2. Renamed TagTypeNumber to NumberTag for a shorter name.

   Ditto for TagBitTypeOther, TagBitBool, TagBitUndefined, TagBitsWasm, and TagWasmMask.
   They are now OtherTag, BoolTag, UndefinedTag, WasmTag, and WasmMask.

3. Introduced DoubleEncodeOffsetBit so that client code do not embed this value
   as a literal constant.  We now define DoubleEncodeOffset based on
   DoubleEncodeOffsetBit ensuring consistency.

4. Introduced MiscTag so that clients don't have to put this set of tags together
   themselves.

5. Removed static asserts for tags in LLIntData.cpp because the offlineasm now
   captures these values correctly with constexpr statements.  These static
   asserts were holdovers from the old days back when we had to define LLInt
   constant values manually, and we needed a mechanism to detect when the values
   have changed in the source.

6. Replaced some runtime asserts in RegisterSet.cpp with static_asserts.

7. In Wasm::wasmToJS(), we were constructing the value of JSValue::DoubleEncodeOffset
   constant by left shifting 1 by JSValue::DoubleEncodeOffsetBit.  There's no need
   to do this for ARM64 because the constant can be loaded efficiently with a single
   MOVZ instruction.  So, we add a CPU(ARM64) case to just move the constant into
   the target register.

* assembler/AbortReason.h:
* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateWithGuard):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::OSRExit::compileExit):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::SpeculativeJIT::getIntTypedArrayStoreOperand):
(JSC::DFG::SpeculativeJIT::speculateMisc):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::spill):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compileObjectStrictEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileInt52Compare):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::moveTrueTo):
(JSC::DFG::SpeculativeJIT::moveFalseTo):
(JSC::DFG::SpeculativeJIT::blessBoolean):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
(JSC::FTL::DFG::LowerDFGToB3::compileBooleanToNumber):
(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compilePutById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArgument):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorStructurePname):
(JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorGenericPname):
(JSC::FTL::DFG::LowerDFGToB3::getById):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):
(JSC::FTL::DFG::LowerDFGToB3::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::isInt32):
(JSC::FTL::DFG::LowerDFGToB3::isNotInt32):
(JSC::FTL::DFG::LowerDFGToB3::boxInt32):
(JSC::FTL::DFG::LowerDFGToB3::isCellOrMisc):
(JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc):
(JSC::FTL::DFG::LowerDFGToB3::unboxDouble):
(JSC::FTL::DFG::LowerDFGToB3::boxDouble):
(JSC::FTL::DFG::LowerDFGToB3::isNotCell):
(JSC::FTL::DFG::LowerDFGToB3::isCell):
(JSC::FTL::DFG::LowerDFGToB3::isNotMisc):
(JSC::FTL::DFG::LowerDFGToB3::isNotBoolean):
(JSC::FTL::DFG::LowerDFGToB3::boxBoolean):
(JSC::FTL::DFG::LowerDFGToB3::isNotOther):
(JSC::FTL::DFG::LowerDFGToB3::isOther):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::reboxAccordingToFormat):
(JSC::FTL::compileStub):
* interpreter/CalleeBits.h:
(JSC::CalleeBits::boxWasm):
(JSC::CalleeBits::isWasm const):
(JSC::CalleeBits::asWasmCallee const):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::jitAssertIsJSInt32):
(JSC::AssemblyHelpers::jitAssertIsJSNumber):
(JSC::AssemblyHelpers::jitAssertIsJSDouble):
(JSC::AssemblyHelpers::jitAssertIsCell):
(JSC::AssemblyHelpers::jitAssertTagsInPlace):
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitSaveThenMaterializeTagRegisters):
(JSC::AssemblyHelpers::emitRestoreSavedTagRegisters):
(JSC::AssemblyHelpers::emitMaterializeTagCheckRegisters):
(JSC::AssemblyHelpers::branchIfNotCell):
(JSC::AssemblyHelpers::branchIfCell):
(JSC::AssemblyHelpers::branchIfOther):
(JSC::AssemblyHelpers::branchIfNotOther):
(JSC::AssemblyHelpers::branchIfInt32):
(JSC::AssemblyHelpers::branchIfNotInt32):
(JSC::AssemblyHelpers::branchIfNumber):
(JSC::AssemblyHelpers::branchIfNotNumber):
(JSC::AssemblyHelpers::branchIfNotDoubleKnownNotInt32):
(JSC::AssemblyHelpers::branchIfBoolean):
(JSC::AssemblyHelpers::branchIfNotBoolean):
(JSC::AssemblyHelpers::boxDouble):
(JSC::AssemblyHelpers::unboxDoubleWithoutAssertions):
(JSC::AssemblyHelpers::boxInt52):
(JSC::AssemblyHelpers::boxBooleanPayload):
(JSC::AssemblyHelpers::boxInt32):
* jit/CallFrameShuffleData.h:
* jit/CallFrameShuffler.cpp:
(JSC::CallFrameShuffler::CallFrameShuffler):
(JSC::CallFrameShuffler::dump const):
(JSC::CallFrameShuffler::prepareAny):
* jit/CallFrameShuffler.h:
(JSC::CallFrameShuffler::getFreeRegister const):
* jit/CallFrameShuffler64.cpp:
(JSC::CallFrameShuffler::emitBox):
(JSC::CallFrameShuffler::tryAcquireNumberTagRegister):
(JSC::CallFrameShuffler::tryAcquireTagTypeNumber): Deleted.
* jit/GPRInfo.h:
(JSC::GPRInfo::reservedRegisters):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_compareAndJumpSlow):
* jit/JITBitAndGenerator.cpp:
(JSC::JITBitAndGenerator::generateFastPath):
* jit/JITBitOrGenerator.cpp:
(JSC::JITBitOrGenerator::generateFastPath):
* jit/JITBitXorGenerator.cpp:
(JSC::JITBitXorGenerator::generateFastPath):
* jit/JITCall.cpp:
(JSC::JIT::compileTailCall):
* jit/JITDivGenerator.cpp:
(JSC::JITDivGenerator::generateFastPath):
* jit/JITInlines.h:
(JSC::JIT::emitPatchableJumpIfNotInt):
* jit/JITLeftShiftGenerator.cpp:
(JSC::JITLeftShiftGenerator::generateFastPath):
* jit/JITMulGenerator.cpp:
(JSC::JITMulGenerator::generateFastPath):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jundefined_or_null):
(JSC::JIT::emit_op_jnundefined_or_null):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jit/JITRightShiftGenerator.cpp:
(JSC::JITRightShiftGenerator::generateFastPath):
* jit/RegisterSet.cpp:
(JSC::RegisterSet::runtimeTagRegisters):
(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):
(JSC::RegisterSet::dfgCalleeSaveRegisters):
(JSC::RegisterSet::ftlCalleeSaveRegisters):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::returnDouble):
(JSC::SpecializedThunkJIT::tagReturnAsInt32):
* jit/ThunkGenerators.cpp:
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::arityFixupGenerator):
(JSC::absThunkGenerator):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter.cpp:
(JSC::CLoop::execute):
* llint/LowLevelInterpreter64.asm:
* offlineasm/arm64.rb:
* offlineasm/cloop.rb:
* offlineasm/x86.rb:
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::isUndefinedOrNull const):
(JSC::JSValue::isCell const):
(JSC::JSValue::isInt32 const):
(JSC::JSValue::JSValue):
(JSC::JSValue::asDouble const):
(JSC::JSValue::isNumber const):
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

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

11 months agoCreate InjectedBundle SPI to better support NSSecureCoding
bfulgham@apple.com [Thu, 19 Sep 2019 16:11:31 +0000 (16:11 +0000)]
Create InjectedBundle SPI to better support NSSecureCoding
https://bugs.webkit.org/show_bug.cgi?id=201810
<rdar://problem/55265713>

The encoding/decoding routines used by WebKit’s InjectedBundles are based on NSCoding.
While we have changed WebKit internals to use NSSecureCoding, there are a number of
injected bundles that need to serialize custom classes between the InjectedBundle and
the relevant WebKit UIProcess.

We need to lock down this communications channel by enforcing NSSecureCoding.

This patch creates new SPI to allow the UIProcess to specify classes that it will accept
in messages from the WebContet Process (and Injected Bundle).

It adds the following property to the WKProcessPoolConfiguration:

    @property (nonatomic, copy) NSSet<Class> *customClassesForParameterCoder;

If no custom classes are specified, the standard serialization primitives are supported:
    NSArray, NSData, NSDate, NSDictionary, NSNull, NSNumber, NSSet, NSString,
    NSTimeZone, NSURL, and NSUUID.

Reviewed by Brady Eidson.

Source/WebKit:

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy): Copy any custom classes.
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyCustomClassesForParameterCoder): Added.
(WKContextConfigurationSetCustomClassesForParameterCoder): Added.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/Cocoa/WKProcessGroup.h:
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(toStringVector): Added.
(-[WKProcessGroup initWithInjectedBundleURL:andCustomClassesForParameterCoder:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setInputDelegate:]): Restrict serialization to allowed classes.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration customClassesForParameterCoder]): Added.
(-[_WKProcessPoolConfiguration setCustomClassesForParameterCoder:]): Added.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize): Register any custom classes
provided in the configuraton.
(WebKit::WebProcessPool::initializeClassesForParameterCoding): Added.
(WebKit::WebProcessPool::allowedClassesForParameterCoding const): Added.
* UIProcess/WebProcessPool.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::elementDidFocus): Restrict serialization to allowed
classes only.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/BundleFormDelegate.mm: Added.
(-[BundleFormDelegateRemoteObject didGetFocus]):
(-[FormInputDelegate _webView:decidePolicyForFocusedElement:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/BundleFormDelegatePlugIn.mm: Added.
(-[BundleFormDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleFormDelegatePlugIn _webProcessPlugInBrowserContextController:willBeginInputSessionForElement:inFrame:userIsInteracting:]):
(-[BundleFormDelegatePlugIn _webProcessPlugInBrowserContextController:didFocusTextField:inFrame:]):
* TestWebKitAPI/Tests/WebKitCocoa/BundleFormDelegateProtocol.h: Copied from Tools/TestWebKitAPI/WKWebViewConfigurationExtras.h.
* TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm:
(TEST):
* TestWebKitAPI/WKWebViewConfigurationExtras.h:
* TestWebKitAPI/WKWebViewConfigurationExtras.mm:
(+[WKWebViewConfiguration _test_configurationWithTestPlugInClassName:configureJSCForTesting:]):
(+[WKWebViewConfiguration _test_configurationWithTestPlugInClassName:configureJSCForTesting:andCustomParameterClasses:]):

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

11 months agoTurn static DocumentRuleSets::s_isInvalidatingStyleWithRuleSets assertion bit into...
antti@apple.com [Thu, 19 Sep 2019 15:52:43 +0000 (15:52 +0000)]
Turn static DocumentRuleSets::s_isInvalidatingStyleWithRuleSets assertion bit into a member
https://bugs.webkit.org/show_bug.cgi?id=201985
<rdar://problem/54851871>

Reviewed by Zalan Bujtas.

This assert bit was catching cases that are not dangerous. Turn it into a member to narrow the scope.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::~DocumentRuleSets):
(WebCore::DocumentRuleSets::collectFeatures const):
(): Deleted.
* css/DocumentRuleSets.h:
(WebCore::DocumentRuleSets::isInvalidatingStyleWithRuleSets):
* style/AttributeChangeInvalidation.cpp:
(WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
* style/ClassChangeInvalidation.cpp:
(WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):

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

11 months ago[LFC] Remove redundant Layout::Box::ElementTypes
zalan@apple.com [Thu, 19 Sep 2019 15:35:30 +0000 (15:35 +0000)]
[LFC] Remove redundant Layout::Box::ElementTypes
https://bugs.webkit.org/show_bug.cgi?id=201963

Reviewed by Antti Koivisto.

These types can be solved through RenderStyle.

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isPaddingApplicable const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isTableHeader const):
(WebCore::Layout::Box::isTableBody const):
(WebCore::Layout::Box::isTableFooter const):
(WebCore::Layout::Box::isTableRow const):
(WebCore::Layout::Box::isTableColumnGroup const):
(WebCore::Layout::Box::isTableColumn const):
(WebCore::Layout::Box::isTableCell const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
* page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):

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

11 months ago[WPE][GTK] Gardening after r250087
magomez@igalia.com [Thu, 19 Sep 2019 15:19:30 +0000 (15:19 +0000)]
[WPE][GTK] Gardening after r250087
https://bugs.webkit.org/show_bug.cgi?id=201984

Unreviewed WPE and GTK+ gardening after r250087.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

11 months ago[LFC][IFC] InlineFormattingContext::InlineLayout should not need to call LayoutState...
zalan@apple.com [Thu, 19 Sep 2019 14:58:43 +0000 (14:58 +0000)]
[LFC][IFC] InlineFormattingContext::InlineLayout should not need to call LayoutState::establishedFormattingState
https://bugs.webkit.org/show_bug.cgi?id=201972
<rdar://problem/55505869>

Reviewed by Antti Koivisto.

InlineLayout has access to InlineFormattingContext, so it should just query it instead of calling LayoutState::establishedFormattingState.

* layout/inlineformatting/InlineFormattingContext.h:
(WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
(WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState):
* layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
(WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
(WebCore::Layout::InlineFormattingContext::InlineLayout::layout const): Deleted.
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): Deleted.

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

12 months ago[LFC] FloatingContext should take the root container.
zalan@apple.com [Thu, 19 Sep 2019 13:25:46 +0000 (13:25 +0000)]
[LFC] FloatingContext should take the root container.
https://bugs.webkit.org/show_bug.cgi?id=201968
<rdar://problem/55505090>

Reviewed by Antti Koivisto.

Now FormattingContext::root() does not need to be public anymore.

* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::root const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
* layout/floats/FloatingContext.cpp:
(WebCore::Layout::FloatingContext::FloatingContext):
(WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
* layout/floats/FloatingContext.h:
(WebCore::Layout::FloatingContext::root const):
* layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

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

12 months agoWeb Inspector: Better handling for large arrays and collections in Object Trees
drousso@apple.com [Thu, 19 Sep 2019 05:58:27 +0000 (05:58 +0000)]
Web Inspector: Better handling for large arrays and collections in Object Trees
https://bugs.webkit.org/show_bug.cgi?id=143589
<rdar://problem/16135388>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Adds two buttons before the "Prototype" item in expanded object/collection previews:
 - Show %d More
 - Show All (%d More)

The default `fetchCount` increment is `100`. The first button will only be shown if there
are more than `100` items remaining (haven't been shown).

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.getProperties):
(InjectedScript.prototype.getDisplayableProperties):
(InjectedScript.prototype.getCollectionEntries):
(InjectedScript.prototype._getProperties):
(InjectedScript.prototype._internalPropertyDescriptors):
(InjectedScript.prototype._propertyDescriptors):
(InjectedScript.prototype._propertyDescriptors.createFakeValueDescriptor):
(InjectedScript.prototype._propertyDescriptors.processProperties):
(InjectedScript.prototype._getSetEntries):
(InjectedScript.prototype._getMapEntries):
(InjectedScript.prototype._getWeakMapEntries):
(InjectedScript.prototype._getWeakSetEntries):
(InjectedScript.prototype._getIteratorEntries):
(InjectedScript.prototype._entries):
(RemoteObject.prototype._generatePreview):
(InjectedScript.prototype._propertyDescriptors.arrayIndexPropertyNames): Deleted.
Don't include boolean property descriptor values if they are `false.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::weakMapEntries):
(Inspector::JSInjectedScriptHost::weakSetEntries):

* inspector/InjectedScript.h:
* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::getProperties):
(Inspector::InjectedScript::getDisplayableProperties):
(Inspector::InjectedScript::getCollectionEntries):

* inspector/agents/InspectorRuntimeAgent.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::asInt): Added.
(Inspector::InspectorRuntimeAgent::getProperties):
(Inspector::InspectorRuntimeAgent::getDisplayableProperties):
(Inspector::InspectorRuntimeAgent::getCollectionEntries):

* inspector/protocol/Runtime.json:
Add `fetchStart`/`fetchCount` to `getProperties`/`getDisplayableProperties`/`getCollectionEntries`.
Mark boolean properties as optional so they can be omitted if `false`.

Source/WebInspectorUI:

Adds two buttons before the "Prototype" item in expanded object/collection previews:
 - Show %d More
 - Show All (%d More)

The default `fetchCount` increment is `100`. The first button will only be shown if there
are more than `100` items remaining (haven't been shown).

* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.getPropertyDescriptors):
(WI.RemoteObject.prototype.getDisplayablePropertyDescriptors):
(WI.RemoteObject.prototype.getCollectionEntries):
(WI.RemoteObject.prototype.getOwnPropertyDescriptor.wrappedCallback):
(WI.RemoteObject.prototype._getProperties): Added.
(WI.RemoteObject.prototype._getDisplayableProperties): Added.

* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView):
(WI.ObjectTreeView.showMoreFetchCount): Added.
(WI.ObjectTreeView.addShowMoreIfNeeded): Added.
(WI.ObjectTreeView.prototype.update):
(WI.ObjectTreeView.prototype._updateChildren):
(WI.ObjectTreeView.prototype._updateEntries):
(WI.ObjectTreeView.prototype._updateProperties):
* UserInterface/Views/ObjectTreeView.css:
(.tree-outline.object li > button[disabled] + .indeterminate-progress-spinner): Added.
Avoid duplicating the button creation logic in `WI.ObjectTreePropertyTreeElement` by using a
`static` function. This expects the existence of and requires access to "private" values.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WI.ObjectTreePropertyTreeElement):
(WI.ObjectTreePropertyTreeElement.prototype.onpopulate):
(WI.ObjectTreePropertyTreeElement.prototype._updateChildren):
(WI.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WI.ObjectTreePropertyTreeElement.prototype._updateProperties):
(WI.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal): Deleted.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedArrayPropertyNames): Deleted.

* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.getPropertiesForRemoteObject): Deleted.
Remove unused function.
* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

* inspector/runtime/getCollectionEntries.html: Added.
* inspector/runtime/getCollectionEntries-expected.txt: Added.
* inspector/runtime/getDisplayableProperties.html: Added.
* inspector/runtime/getDisplayableProperties-expected.txt: Added.
* inspector/runtime/getProperties.html:
* inspector/runtime/getProperties-expected.txt:
* inspector/runtime/resources/property-descriptor-utilities.js: Added.
(makeArray):
(makeObject):
(makeMap):
(makeSet):
(makeWeakMap):
(makeWeakSet):
(TestPage.registerInitializer.ProtocolTest.PropertyDescriptorUtilities.logForEach):
(TestPage.registerInitializer.ProtocolTest.PropertyDescriptorUtilities.stringifyRemoteObject):

* inspector/model/remote-object-weak-collection.html:

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

12 months agoUnreviewed. Remove build warning since r249976.
jh718.park@samsung.com [Thu, 19 Sep 2019 05:45:38 +0000 (05:45 +0000)]
Unreviewed. Remove build warning since r249976.

No new tests, no behavioral changes.

This patch removes the build warning below.
warning: control reaches end of non-void function [-Wreturn-type]

* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::alreadyChecked const):

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

12 months ago[FTW] Correct ImageBufferData and clear operations
bfulgham@apple.com [Thu, 19 Sep 2019 04:53:49 +0000 (04:53 +0000)]
[FTW] Correct ImageBufferData and clear operations
https://bugs.webkit.org/show_bug.cgi?id=201862

Reviewed by Fujii Hironori.

This patch corrects several problems in the canvas implementation:
1. The implementation of ImageBufferDataDirect2D did not properly handle the case of a
   'getData' request for less than the size of the full bitmap.
2. The implementation of 'Clear' was not correct when the size of the region to be
   cleared is less than the size of the render target.
3. 'endDraw' fails if any clip regions are active at the end of the operation. The
   stack needs to be unwound when endDraw is called.

This patch corrects all three problems.

Tested by canvas LayoutTests.

* platform/graphics/win/Direct2DOperations.cpp:
(WebCore::Direct2D::clearRect): Correct partial render target case.
* platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::getData const): Correct partial buffer case.
(WebCore::ImageBufferData::putData): Ditto.
(WebCore::ImageBufferData::readDataFromBitmapIfNeeded): Added.
(WebCore::copyRectFromSourceToDest): Added.
(WebCore::ImageBufferData::copyRectFromSourceToData): Added.
* platform/graphics/win/PlatformContextDirect2D.cpp:
(WebCore::PlatformContextDirect2D::endDraw): Correct failures caused by
dangling clip regions when 'endDraw' is called.
(WebCore::PlatformContextDirect2D::flush): Don't call post-draw observer;
this is already handled in the draw operations, and endDraw.
(WebCore::PlatformContextDirect2D::restore): Recognize that the clip
and transparency stack might be empty when restore is called.

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

12 months agoAddPlugInAutoStartOriginHash / PlugInDidReceiveUserInteraction IPC should not need...
cdumez@apple.com [Thu, 19 Sep 2019 04:36:22 +0000 (04:36 +0000)]
AddPlugInAutoStartOriginHash / PlugInDidReceiveUserInteraction IPC should not need to pass a SessionID
https://bugs.webkit.org/show_bug.cgi?id=201962

Reviewed by Geoffrey Garen.

AddPlugInAutoStartOriginHash / PlugInDidReceiveUserInteraction IPC from the WebProcess to the UIProcess
should not need to pass a SessionID, since the UIProcess already knows the SessionID of a given WebProcess.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::addPlugInAutoStartOriginHash): Deleted.
(WebKit::WebProcessPool::plugInDidReceiveUserInteraction): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addPlugInAutoStartOriginHash):
(WebKit::WebProcessProxy::plugInDidReceiveUserInteraction):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::plugInDidStartFromOrigin):
(WebKit::WebProcess::plugInDidReceiveUserInteraction):

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

12 months agoWebStorageNamespaceProvider / StorageNamespaceImpl no longer need SessionIDs
cdumez@apple.com [Thu, 19 Sep 2019 04:18:58 +0000 (04:18 +0000)]
WebStorageNamespaceProvider / StorageNamespaceImpl no longer need SessionIDs
https://bugs.webkit.org/show_bug.cgi?id=201922

Reviewed by Geoffrey Garen.

WebStorageNamespaceProvider / StorageNamespaceImpl no longer need SessionIDs, now that
we have a single session per WebProcess.

* WebProcess/WebStorage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::connect):
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::sessionID const):
(WebKit::StorageNamespaceImpl::copy):
* WebProcess/WebStorage/StorageNamespaceImpl.h:
(): Deleted.
* WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):

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

12 months agoDecrease use of sessionID in WebLoaderStrategy
cdumez@apple.com [Thu, 19 Sep 2019 04:02:13 +0000 (04:02 +0000)]
Decrease use of sessionID in WebLoaderStrategy
https://bugs.webkit.org/show_bug.cgi?id=201961

Reviewed by Geoffrey Garen.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::loadResource):
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebLoaderStrategy.h:

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

12 months agoUnreviewed, fixed a crash in ssl/applepay/ApplePayCancelEvent.https.html
aestes@apple.com [Thu, 19 Sep 2019 03:51:48 +0000 (03:51 +0000)]
Unreviewed, fixed a crash in ssl/applepay/ApplePayCancelEvent.https.html

After r250060 (which landed very shortly after the patch that introduced ApplePayCancelEvent),
all Events must be IsoHeap-ed. ApplePayCancelEvent was not IsoHeap-ed, and so this caused
assertion failures in ssl/applepay/ApplePayCancelEvent.https.html.

Added the WTF_MAKE_ISO_ALLOCATED macros to ApplePayCancelEvent without a review to stop the
test from failing in EWS.

* Modules/applepay/ApplePayCancelEvent.cpp:
* Modules/applepay/ApplePayCancelEvent.h:

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

12 months agoWebSocketStream does not need a SessionID
cdumez@apple.com [Thu, 19 Sep 2019 03:45:06 +0000 (03:45 +0000)]
WebSocketStream does not need a SessionID
https://bugs.webkit.org/show_bug.cgi?id=201960

Reviewed by Geoffrey Garen.

WebSocketStream does not need a SessionID, now that we have a single session per WebProcess.

Source/WebCore:

* platform/network/cf/SocketStreamHandleImpl.h:
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):

Source/WebKit:

* WebProcess/Network/WebSocketProvider.cpp:
(WebKit::WebSocketProvider::createSocketStreamHandle):
* WebProcess/Network/WebSocketStream.cpp:
(WebKit::WebSocketStream::create):
(WebKit::WebSocketStream::WebSocketStream):
* WebProcess/Network/WebSocketStream.h:

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

12 months agoLibWebRTCProvider does not need sessionIDs anymore
cdumez@apple.com [Thu, 19 Sep 2019 03:27:00 +0000 (03:27 +0000)]
LibWebRTCProvider does not need sessionIDs anymore
https://bugs.webkit.org/show_bug.cgi?id=201959

Reviewed by Geoffrey Garen.

LibWebRTCProvider does not need sessionIDs anymore, now that we have a single session per WebProcess.

Source/WebCore:

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::registerMDNSName):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:

Source/WebKit:

* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::registerMDNSName):
(WebKit::LibWebRTCProvider::createSocketFactory):
* WebProcess/Network/webrtc/LibWebRTCProvider.h:

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

12 months ago[GTK] Compilation errors when GL is disabled
commit-queue@webkit.org [Thu, 19 Sep 2019 02:34:49 +0000 (02:34 +0000)]
[GTK] Compilation errors when GL is disabled
https://bugs.webkit.org/show_bug.cgi?id=200223

Fix following compilation error when building with ENABLE_OPENGL=OFF
../../Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:123:51: error: use of undeclared identifier 'WaylandCompositor'
parameters.waylandCompositorDisplayName = WaylandCompositor::singleton().displayName();
                                          ^
Patch by Yury Semikhatsky <yurys@chromium.org> on 2019-09-18
Reviewed by Philippe Normand.

* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): only make a call when using EGL, this matches
guards in WaylandCompositor.h. The condition was changed in r245807.

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

12 months agoWeb Inspector: console assertion when pressing up/down in empty console log view
joepeck@webkit.org [Thu, 19 Sep 2019 01:45:35 +0000 (01:45 +0000)]
Web Inspector: console assertion when pressing up/down in empty console log view
https://bugs.webkit.org/show_bug.cgi?id=201948

Reviewed by Devin Rousso.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._upArrowWasPressed):
(WI.LogContentView.prototype._downArrowWasPressed):
Ensure that a message exists before calling `_updateMessagesSelection`, which
would assert if given a bad message. Additionally, only perform preventDefault
when selecting a message. This allows us to fall back to a system beep if
this key event does nothing.

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

12 months ago[results.webkit.org] fix missing col classes
zhifei_fang@apple.com [Thu, 19 Sep 2019 00:23:20 +0000 (00:23 +0000)]
[results.webkit.org] fix missing col classes
https://bugs.webkit.org/show_bug.cgi?id=201949

Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:
(@media screen and (min-width: 768px)):
(.row):
(.col-1):
(.col-2):
(.col-3):
(.col-4):
(.col-5):
(.col-6):
(.col-7):
(.col-8):
(.col-9):
(.col-10):
(.col-11):
(.col-12):
(@media screen and (min-width: 600px)):

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

12 months agoEagerly create and add the m_layerHostingView to WKWebView.
timothy@apple.com [Thu, 19 Sep 2019 00:07:32 +0000 (00:07 +0000)]
Eagerly create and add the m_layerHostingView to WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=201942

Reviewed by Tim Horton.

Some apps will add subviews to WKWebView, and by the time we add our m_layerHostingView view we might be
adding it behind a view that should have been added behind our layer hosting view subview. This affected
the Spark email app, due to changes in order of loading delegate calls and when compositing is enabled.
Instead of delayed creation of m_layerHostingView, always create it and add it to to the WKWebView.
This ensures proper ordering of subviews when clients add a view behind all existing subviews.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl): Create and add m_layerHostingView here.
(WebKit::WebViewImpl::setAcceleratedCompositingRootLayer): Remove creation and removal of m_layerHostingView.
Just set the sublayers of m_layerHostingView's layer here.

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

12 months agoAdd -suspend and -resumeAllMediaPlayback to WebView
jer.noble@apple.com [Wed, 18 Sep 2019 23:49:42 +0000 (23:49 +0000)]
Add -suspend and -resumeAllMediaPlayback to WebView
https://bugs.webkit.org/show_bug.cgi?id=201951

Reviewed by Eric Carlson.

* WebView/WebView.mm:
(-[WebView suspendAllMediaPlayback]):
(-[WebView resumeAllMediaPlayback]):
* WebView/WebViewPrivate.h:

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

12 months agoTOCTOU bug in havingABadTime related assertion in DFGSpeculativeJIT
sbarati@apple.com [Wed, 18 Sep 2019 23:43:09 +0000 (23:43 +0000)]
TOCTOU bug in havingABadTime related assertion in DFGSpeculativeJIT
https://bugs.webkit.org/show_bug.cgi?id=201953
<rdar://problem/53803524>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/toctou-having-a-bad-time-new-array.js: Added.
(let.code):

Source/JavaScriptCore:

We had code in DFGSpeculativeJIT like:

if (!globalObject->isHavingABadTime()) {
    <-- here -->
    Structure* s = globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()));
    assert 's' has expected indexing type
}

The problem is, we may have a bad time before we actually load the structure
inside the if. We may have a bad time while we're at the "<-- here -->" in the
above program. The fix is to first load the structure, then check if we're
having a bad time. If we're still not having a bad time, it's valid to assert
things about the structure.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewArray):

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

12 months ago[LFC] FormattingContext::Geometry/MarginCollapse/Quirk classes should not need to...
zalan@apple.com [Wed, 18 Sep 2019 23:33:08 +0000 (23:33 +0000)]
[LFC] FormattingContext::Geometry/MarginCollapse/Quirk classes should not need to access non-const Display::Box
https://bugs.webkit.org/show_bug.cgi?id=201944
<rdar://problem/55493279>

Reviewed by Antti Koivisto.

This patch improves const correctness so that the Geometry/MarginCollapse/Quirk objects could not access non-const Display::Boxes (to mutate the display tree).
(The MarginCollapse::Update* functions are about updating the margin values on previously processed boxes so strictly speaking they are not margin collapsing related, but they somewhat belong to the MarginCollapse class -since they deal with margins.)

* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::formattingState const):
(WebCore::Layout::FormattingContext::formattingState):
* layout/FormattingState.cpp:
(WebCore::Layout::FormattingState::displayBox):
(WebCore::Layout::FormattingState::displayBox const): Deleted.
* layout/FormattingState.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/blockformatting/BlockFormattingContext.h:
(WebCore::Layout::BlockFormattingContext::formattingState const):
(WebCore::Layout::BlockFormattingContext::formattingState):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::collectInlineContent):
(WebCore::Layout::InlineFormattingContext::collectInlineContent const): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:
(WebCore::Layout::InlineFormattingContext::formattingState const):
(WebCore::Layout::InlineFormattingContext::formattingState):
* layout/tableformatting/TableFormattingContext.h:
(WebCore::Layout::TableFormattingContext::formattingState const):
(WebCore::Layout::TableFormattingContext::formattingState):

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

12 months agoWeb Inspector: Can't drag undocked Inspector window by its title text
pecoraro@apple.com [Wed, 18 Sep 2019 23:16:48 +0000 (23:16 +0000)]
Web Inspector: Can't drag undocked Inspector window by its title text
https://bugs.webkit.org/show_bug.cgi?id=190886
<rdar://problem/44574547>

Reviewed by Tim Horton.

* UIProcess/mac/WKInspectorWKWebView.mm:
(-[WKInspectorWKWebView _opaqueRectForWindowMoveWhenInTitlebar]):
Legendary.

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

12 months agoStop calling WTF::initializeMainThread() in JSGlobalContextCreate*()
cdumez@apple.com [Wed, 18 Sep 2019 22:56:19 +0000 (22:56 +0000)]
Stop calling WTF::initializeMainThread() in JSGlobalContextCreate*()
https://bugs.webkit.org/show_bug.cgi?id=201947
<rdar://problem/55453612>

Reviewed by Mark Lam.

Stop calling WTF::initializeMainThread() in JSGlobalContextCreate*(). I started doing so in <https://trac.webkit.org/changeset/248533>
but it is causing crashes for apps using this JS API on background threads. It is also no longer necessary as of
<https://trac.webkit.org/changeset/249064>.

* API/JSContextRef.cpp:
(JSContextGroupCreate):
(JSGlobalContextCreate):
(JSGlobalContextCreateInGroup):

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

12 months agoBlobRegistry no longer needs SessionIDs
cdumez@apple.com [Wed, 18 Sep 2019 22:30:39 +0000 (22:30 +0000)]
BlobRegistry no longer needs SessionIDs
https://bugs.webkit.org/show_bug.cgi?id=201936

Reviewed by Geoffrey Garen.

BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.

Source/WebCore:

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::getFile):
* Modules/entriesapi/DOMFileSystem.h:
* Modules/entriesapi/FileSystemFileEntry.cpp:
(WebCore::FileSystemFileEntry::file):
* Modules/entriesapi/FileSystemFileEntry.h:
* Modules/entriesapi/FileSystemFileEntry.idl:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::fromFormData):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::blobFromData):
(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::takeAsBlob):
* Modules/fetch/FetchBodyConsumer.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::blob):
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::~FetchLoader):
(WebCore::FetchLoader::startLoadingBlobURL):
* Modules/fetch/FetchLoader.h:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::putOrAddOnServer):
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::createRecordingDataBlob):
* Modules/mediasource/MediaSourceRegistry.cpp:
(WebCore::MediaSourceRegistry::unregisterURL):
* Modules/mediasource/MediaSourceRegistry.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::didReceiveRawData):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readFile):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
* bindings/js/SerializedScriptValue.h:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::DataTransfer):
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):
(WebCore::DataTransfer::createForInputEvent):
(WebCore::DataTransfer::createForDrag):
(WebCore::DataTransfer::createForDragStartEvent):
(WebCore::DataTransfer::createForDrop):
(WebCore::DataTransfer::createForUpdatingDropTarget):
* dom/DataTransfer.h:
* editing/ReplaceRangeWithTextCommand.cpp:
(WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::inputEventDataTransfer const):
* editing/WebCorePasteboardFileReader.cpp:
(WebCore::WebCorePasteboardFileReader::readFilename):
(WebCore::WebCorePasteboardFileReader::readBuffer):
* editing/WebCorePasteboardFileReader.h:
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragmentForImageAttachment):
(WebCore::replaceRichContentWithAttachments):
(WebCore::createFragmentAndAddResources):
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readImage):
(WebCore::attachmentForFilePath):
(WebCore::attachmentForData):
* editing/markup.cpp:
(WebCore::restoreAttachmentElementsInFragment):
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registerURL):
(WebCore::BlobURLRegistry::unregisterURL):
(WebCore::Blob::Blob):
(WebCore::Blob::~Blob):
* fileapi/Blob.h:
(WebCore::Blob::create):
(WebCore::Blob::deserialize):
(WebCore::Blob::slice const):
* fileapi/Blob.idl:
* fileapi/File.cpp:
(WebCore::File::createWithRelativePath):
(WebCore::File::create):
(WebCore::File::File):
* fileapi/File.h:
* fileapi/File.idl:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::~FileReaderLoader):
(WebCore::FileReaderLoader::start):
* fileapi/FileReaderLoader.h:
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerFileBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
(WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
(WebCore::ThreadableBlobRegistry::unregisterBlobURL):
* fileapi/ThreadableBlobRegistry.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::appendFormData const):
(WebCore::FileInputType::filesChosen):
* html/FileListCreator.cpp:
(WebCore::appendDirectoryFiles):
(WebCore::FileListCreator::FileListCreator):
(WebCore::FileListCreator::createFileList):
* html/FileListCreator.h:
(WebCore::FileListCreator::create):
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toBlob):
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::revoke):
(WebCore::PublicURLManager::stop):
* html/URLRegistry.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):
* platform/network/BlobRegistry.h:
* testing/Internals.cpp:
(WebCore::Internals::createFile):
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createResponseBlob):

Source/WebKit:

* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKitLegacy/win:

* WebCoreSupport/WebPlatformStrategies.cpp:

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

12 months agoMake all ScriptWrappable IsoHeap-ed
ysuzuki@apple.com [Wed, 18 Sep 2019 22:10:00 +0000 (22:10 +0000)]
Make all ScriptWrappable IsoHeap-ed
https://bugs.webkit.org/show_bug.cgi?id=201846
<rdar://problem/55407535>

Reviewed by Mark Lam.

This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
(WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
* Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
* Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
(WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
(WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
* Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingContactSelectedEvent.h:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
* Modules/applepay/ApplePayValidateMerchantEvent.cpp:
* Modules/applepay/ApplePayValidateMerchantEvent.h:
(WebCore::ApplePayValidateMerchantEvent::create): Deleted.
(WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
* Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
* Modules/encryptedmedia/MediaKeyMessageEvent.h:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
(WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
(WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
(WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
(WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
(WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
* Modules/gamepad/GamepadEvent.cpp:
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create): Deleted.
(WebCore::GamepadEvent::gamepad const): Deleted.
* Modules/indexeddb/IDBRequestCompletionEvent.cpp:
* Modules/indexeddb/IDBRequestCompletionEvent.h:
(WebCore::IDBRequestCompletionEvent::create): Deleted.
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/mediarecorder/BlobEvent.cpp:
* Modules/mediarecorder/BlobEvent.h:
* Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
* Modules/mediarecorder/MediaRecorderErrorEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.cpp:
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediarecorder/BlobEvent.h.
* Modules/mediastream/OverconstrainedErrorEvent.h:
(WebCore::OverconstrainedErrorEvent::create): Deleted.
(WebCore::OverconstrainedErrorEvent::error const): Deleted.
(WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDataChannelEvent.cpp:
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
* Modules/mediastream/RTCPeerConnectionIceEvent.h:
(WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
* Modules/mediastream/RTCTrackEvent.cpp:
* Modules/mediastream/RTCTrackEvent.h:
(WebCore::RTCTrackEvent::receiver const): Deleted.
(WebCore::RTCTrackEvent::track const): Deleted.
(WebCore::RTCTrackEvent::streams const): Deleted.
(WebCore::RTCTrackEvent::transceiver const): Deleted.
(WebCore::RTCTrackEvent::eventInterface const): Deleted.
* Modules/paymentrequest/MerchantValidationEvent.cpp:
* Modules/paymentrequest/MerchantValidationEvent.h:
* Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
* Modules/paymentrequest/PaymentMethodChangeEvent.h:
* Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
* Modules/paymentrequest/PaymentRequestUpdateEvent.h:
* Modules/speech/SpeechSynthesisEvent.cpp:
* Modules/speech/SpeechSynthesisEvent.h:
(WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
(WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
(WebCore::SpeechSynthesisEvent::name const): Deleted.
(WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
* Modules/webaudio/AudioProcessingEvent.cpp:
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/OfflineAudioCompletionEvent.cpp:
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/webgpu/GPUUncapturedErrorEvent.cpp:
* Modules/webgpu/GPUUncapturedErrorEvent.h:
* Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* Modules/websockets/CloseEvent.h:
(WebCore::CloseEvent::create): Deleted.
(WebCore::CloseEvent::wasClean const): Deleted.
(WebCore::CloseEvent::code const): Deleted.
(WebCore::CloseEvent::reason const): Deleted.
(WebCore::CloseEvent::CloseEvent): Deleted.
* Modules/webvr/VRDisplayEvent.cpp:
* Modules/webvr/VRDisplayEvent.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibleSetValueEvent.cpp:
* accessibility/AccessibleSetValueEvent.h:
(WebCore::AccessibleSetValueEvent::create): Deleted.
(WebCore::AccessibleSetValueEvent::value const): Deleted.
* animation/AnimationPlaybackEvent.cpp:
* animation/AnimationPlaybackEvent.h:
* bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
* bindings/js/ScriptWrappable.h:
* dom/AnimationEvent.cpp:
* dom/AnimationEvent.h:
* dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/BeforeLoadEvent.h:
* dom/BeforeTextInsertedEvent.cpp:
* dom/BeforeTextInsertedEvent.h:
* dom/BeforeUnloadEvent.cpp:
* dom/BeforeUnloadEvent.h:
* dom/ClipboardEvent.cpp:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.cpp:
* dom/CompositionEvent.h:
* dom/CustomEvent.cpp:
* dom/CustomEvent.h:
* dom/DeviceMotionEvent.cpp:
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationEvent.cpp:
* dom/DeviceOrientationEvent.h:
* dom/ErrorEvent.cpp:
* dom/ErrorEvent.h:
* dom/Event.cpp:
* dom/Event.h:
* dom/FocusEvent.cpp:
* dom/FocusEvent.h:
* dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/HashChangeEvent.h:
* dom/InputEvent.cpp:
* dom/InputEvent.h:
* dom/KeyboardEvent.cpp:
* dom/KeyboardEvent.h:
* dom/MessageEvent.cpp:
* dom/MessageEvent.h:
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
* dom/MouseRelatedEvent.h:
* dom/MutationEvent.cpp:
* dom/MutationEvent.h:
* dom/OverflowEvent.cpp:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.cpp:
* dom/PageTransitionEvent.h:
* dom/PointerEvent.cpp:
* dom/PointerEvent.h:
* dom/PopStateEvent.cpp:
* dom/PopStateEvent.h:
* dom/ProgressEvent.cpp:
* dom/ProgressEvent.h:
* dom/PromiseRejectionEvent.cpp:
* dom/PromiseRejectionEvent.h:
* dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/SecurityPolicyViolationEvent.h:
* dom/TextEvent.cpp:
* dom/TextEvent.h:
* dom/TouchEvent.cpp:
* dom/TouchEvent.h:
* dom/TransitionEvent.cpp:
* dom/TransitionEvent.h:
* dom/UIEvent.cpp:
* dom/UIEvent.h:
* dom/UIEventWithKeyState.cpp:
* dom/UIEventWithKeyState.h:
* dom/WebKitAnimationEvent.cpp:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.cpp:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.cpp:
* dom/WheelEvent.h:
* html/MediaEncryptedEvent.cpp:
* html/MediaEncryptedEvent.h:
* html/canvas/WebGLContextEvent.cpp:
* html/canvas/WebGLContextEvent.h:
* html/shadow/ProgressShadowElement.h:
* html/track/TrackEvent.cpp:
* html/track/TrackEvent.h:
* storage/StorageEvent.cpp:
* storage/StorageEvent.h:
(WebCore::StorageEvent::key const): Deleted.
(WebCore::StorageEvent::oldValue const): Deleted.
(WebCore::StorageEvent::newValue const): Deleted.
(WebCore::StorageEvent::url const): Deleted.
(WebCore::StorageEvent::storageArea const): Deleted.
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.h:
* svg/SVGZoomEvent.cpp:
* svg/SVGZoomEvent.h:
* workers/service/ExtendableEvent.cpp:
* workers/service/ExtendableEvent.h:
* workers/service/ExtendableMessageEvent.cpp:
* workers/service/ExtendableMessageEvent.h:
* workers/service/FetchEvent.cpp:
* workers/service/FetchEvent.h:
* xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
* xml/XMLHttpRequestProgressEvent.h:
(WebCore::XMLHttpRequestProgressEvent::create): Deleted.
(WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
(WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
(WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.

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

12 months agoUpdate flakiness dashboard configuration for iOS 13 queues
ryanhaddad@apple.com [Wed, 18 Sep 2019 22:08:13 +0000 (22:08 +0000)]
Update flakiness dashboard configuration for iOS 13 queues
https://bugs.webkit.org/show_bug.cgi?id=201711

Reviewed by Jonathan Bedard.

* TestResultServer/static-dashboards/builders.jsonp:

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

12 months agoPhantom insertion phase may disagree with arguments forwarding about live ranges
sbarati@apple.com [Wed, 18 Sep 2019 22:03:20 +0000 (22:03 +0000)]
Phantom insertion phase may disagree with arguments forwarding about live ranges
https://bugs.webkit.org/show_bug.cgi?id=200715
<rdar://problem/54301717>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/phantom-insertion-live-range-should-agree-with-arguments-forwarding.js: Added.
(main.v23):
(main.try.v43):
(main.):
(main):

Source/JavaScriptCore:

The issue is that Phantom insertion phase was disagreeing about live ranges
from the arguments forwarding phase. The effect is that Phantom insertion
would insert a Phantom creating a longer live range than what arguments
forwarding was analyzing. Arguments forwarding will look for the last DFG
use or the last bytecode use of a variable it wants to eliminate. It then
does an interference analysis to ensure that nothing clobbers other variables
it needs to recover the sunken allocation during OSR exit.

Phantom insertion works by ordering the program into OSR exit epochs. If a value was used
in the current epoch, there is no need to insert a phantom for it. We
determine where we might need a Phantom by looking at bytecode kills. In this
analysis, we have a mapping from bytecode local to DFG node. However, we
sometimes forgot to remove the entry when a local is killed. So, if the first
kill of a variable is in the same OSR exit epoch, we won't insert a Phantom by design.
However, if the variable gets killed again, we might errantly insert a Phantom
for the prior variable which should've already been killed. The solution is to
clear the entry in our mapping when a variable is killed.

The program in question was like this:

1: DirectArguments
...
2: MovHint(@1, loc1) // arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery
...

Arguments elimination would transform the program since between @1 and
@2, nothing clobbers values needed for exit and nothing escapes @1. The
program becomes:

1: PhantomDirectArguments
...
2: MovHint(@1, loc1) // arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery of @1
...

Phantom insertion would then transform the program into:

1: PhantomDirectArguments
...
2: MovHint(@1, loc1) // arguments forwarding treats this as the final kill for @1
...
clobber things needed for recovery of @1
...
3: Phantom(@1)
...

This is wrong because Phantom insertion and arguments forwarding must agree on live
ranges, otherwise the interference analysis performed by arguments forwarding will
not correctly analyze up until where the value might be recovered.

* dfg/DFGPhantomInsertionPhase.cpp:

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

12 months agoTry to fix the macOS High Sierra build after r250048.
aestes@apple.com [Wed, 18 Sep 2019 22:02:24 +0000 (22:02 +0000)]
Try to fix the macOS High Sierra build after r250048.

* pal/spi/cocoa/PassKitSPI.h:

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

12 months ago[LFC] Introduce UsedVerticalValues::Constraints
zalan@apple.com [Wed, 18 Sep 2019 21:48:03 +0000 (21:48 +0000)]
[LFC] Introduce UsedVerticalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=201933
<rdar://problem/55487485>

Reviewed by Antti Koivisto.

UsedVerticalValues::Constraints holds the constraint values ((optional)containing block height and contentbox top) for a particular box geometry computation.
This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
See webkit.org/b/201795

* layout/FormattingContext.cpp:
(WebCore::Layout::outOfFlowHorizontalConstraints):
(WebCore::Layout::outOfFlowVerticalConstraints):
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
(WebCore::Layout::outOfFlowConstraints): Deleted.
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
* layout/LayoutUnits.cpp:
(WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
(WebCore::Layout::UsedVerticalValues::UsedVerticalValues):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

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

12 months agoUnreviewed test gardening for iOS.
ryanhaddad@apple.com [Wed, 18 Sep 2019 21:35:08 +0000 (21:35 +0000)]
Unreviewed test gardening for iOS.

* platform/ios/TestExpectations: Mark quicklook/numbers-09.html as failing.

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

12 months agoUnreviewed, WinCairo build fix after r250045.
cdumez@apple.com [Wed, 18 Sep 2019 21:33:06 +0000 (21:33 +0000)]
Unreviewed, WinCairo build fix after r250045.

* platform/network/curl/CurlFormDataStream.cpp:
(WebCore::CurlFormDataStream::computeContentLength):

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

12 months agoNetworkLoadParameters shouldn't store sessionID
commit-queue@webkit.org [Wed, 18 Sep 2019 21:31:27 +0000 (21:31 +0000)]
NetworkLoadParameters shouldn't store sessionID
https://bugs.webkit.org/show_bug.cgi?id=201921

Patch by Benjamin Nham <nham@apple.com> on 2019-09-18
Reviewed by Chris Dumez.

Now that there's a single session id per WebProcess, we don't need to
store the session id in NetworkLoadParameters anymore. Clients can just
directly ask NetworkConnectionToWebProcess for the WebProcess's session
ID instead.

* NetworkProcess/AdClickAttributionManager.cpp:
(WebKit::AdClickAttributionManager::fireConversionRequest):
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/NetworkCORSPreflightChecker.cpp:
(WebKit::NetworkCORSPreflightChecker::startPreflight):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkResourceLoadMap.h:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::convertToDownload):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::NetworkSession):
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::loadRequest):
(WebKit::PingLoad::didReceiveChallenge):
* NetworkProcess/PingLoad.h:
* NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::PreconnectTask):
* NetworkProcess/PreconnectTask.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):

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

12 months agoUnreviewed, rolling out r250002.
commit-queue@webkit.org [Wed, 18 Sep 2019 21:13:26 +0000 (21:13 +0000)]
Unreviewed, rolling out r250002.
https://bugs.webkit.org/show_bug.cgi?id=201943

Patching of the callee and call is not atomic (Requested by
tadeuzagallo on #webkit).

Reverted changeset:

"Change WebAssembly calling conventions"
https://bugs.webkit.org/show_bug.cgi?id=201799
https://trac.webkit.org/changeset/250002

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

12 months ago[LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
zalan@apple.com [Wed, 18 Sep 2019 21:12:06 +0000 (21:12 +0000)]
[LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=201923
<rdar://problem/55485796>

Reviewed by Antti Koivisto.

Pass in the contentbox left constraint value to the FormattingContext::compute*() functions so that they don't need to read the containg block's geometry.
This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
See webkit.org/b/201795

* layout/FormattingContext.cpp:
(WebCore::Layout::outOfFlowConstraints):
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
* layout/LayoutUnits.cpp:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

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

12 months ago[LFC] Introduce UsedHorizontalValues::Constraints
zalan@apple.com [Wed, 18 Sep 2019 19:56:14 +0000 (19:56 +0000)]
[LFC] Introduce UsedHorizontalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=201919
<rdar://problem/55481927>

Reviewed by Antti Koivisto.

UsedHorizontalValues::Constraints holds the constraint values for a particular box geometry computation (currently it only has the horizontal width constraint)

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::computeBorderAndPadding):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
(WebCore::Layout::FormattingContext::Geometry::computedPadding const):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
(WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
* layout/FormattingContextQuirks.cpp:
(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
* layout/floats/FloatingContext.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
* layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

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

12 months agoRemove alternate declaration of CCECCryptorImportKey
krollin@apple.com [Wed, 18 Sep 2019 19:39:53 +0000 (19:39 +0000)]
Remove alternate declaration of CCECCryptorImportKey
https://bugs.webkit.org/show_bug.cgi?id=201903
<rdar://problem/55466589>

Reviewed by Chris Dumez.

In macOS 10.15 and iOS 13.0 SDKs, the keyPackage parameter of
CCECCryptorImportKey() was changed from "void*" to "const void*". This
change was accounted for in Bug 195754 by making the same change to
the parallel declarations in CommonCryptoSPI.h. But since this header
also needed to be used in macOS 10.14 contexts, the old declaration
was also kept.

But since this function is a "C" function, the types of parameters are
not included in the function signature, and it doesn't really matter
what parameter types are, so long as the right values are sent to the
called function. This means that we don't need two versions of the
function, one with a "const" parameter and one without. We only really
need one. In this case, it makes sense to keep the more-restrictive
one -- the with a "const void*" parameter. Therefore, remove the one
taking just "void*".

* pal/spi/cocoa/CommonCryptoSPI.h:

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

12 months ago[Apple Pay] Tell websites why a session was cancelled
aestes@apple.com [Wed, 18 Sep 2019 19:13:33 +0000 (19:13 +0000)]
[Apple Pay] Tell websites why a session was cancelled
https://bugs.webkit.org/show_bug.cgi?id=201912
Source/WebCore:

Reviewed by Brady Eidson.

Added ApplePayCancelEvent as the interface for ApplePaySession's cancel event. This event
object includes a `sessionError` attribute that exposes a Web-safe version of the PassKit
domain error we received from PKPaymentAuthorization(View)Controller. Currently, we report
all errors with code "unknown", but more codes will be added in future patches.

Test: http/tests/ssl/applepay/ApplePayCancelEvent.https.html

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/applepay/ApplePayCancelEvent.cpp: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
(WebCore::ApplePayCancelEvent::ApplePayCancelEvent):
(WebCore::ApplePayCancelEvent::sessionError const):
(WebCore::ApplePayCancelEvent::eventInterface const):
* Modules/applepay/ApplePayCancelEvent.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
(WebCore::ApplePayCancelEvent::create):
* Modules/applepay/ApplePayCancelEvent.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::didCancelPaymentSession):
* Modules/applepay/ApplePaySession.h:
* Modules/applepay/ApplePaySessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/ApplePaySessionError.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::didCancelPaymentSession):
* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentHeaders.h:
* Modules/applepay/PaymentSession.cpp:
* Modules/applepay/PaymentSession.h:
* Modules/applepay/PaymentSessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
* Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm: Copied from Source/WebCore/Modules/applepay/PaymentSession.h.
(WebCore::additionalError):
(WebCore::PaymentSessionError::PaymentSessionError):
(WebCore::PaymentSessionError::sessionError const):
(WebCore::PaymentSessionError::platformError const):
(WebCore::PaymentSessionError::unknownError const):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::didCancelPaymentSession):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
* Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.in:
* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::cancelPayment):

Source/WebCore/PAL:

<rdar://problem/55469706>

Reviewed by Brady Eidson.

Soft-linked PKPassKitErrorDomain and included PassKit headers more judiciously.

* pal/cocoa/PassKitSoftLink.h:
* pal/cocoa/PassKitSoftLink.mm:
* pal/spi/cocoa/PassKitSPI.h:

Source/WebKit:

<rdar://problem/55469706>

Reviewed by Brady Eidson.

Remembered the error passed to -[WKPaymentAuthorizationDelegate _willFinishWithError:] and
sent it to the WebContent process in Messages::WebPaymentCoordinator::DidCancelPaymentSession.

* Platform/cocoa/PaymentAuthorizationPresenter.h:
* Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
(-[WKPaymentAuthorizationDelegate _didFinish]):
(-[WKPaymentAuthorizationDelegate _willFinishWithError:]):
* Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession):
(WebKit::WebPaymentCoordinatorProxy::presenterDidFinish):
* Shared/ApplePay/WebPaymentCoordinatorProxy.h:
(WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession):
* Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentSessionError>::encode):
(IPC::ArgumentCoder<WebCore::PaymentSessionError>::decode):
* Shared/WebCoreArgumentCoders.h:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::networkProcessConnectionClosed):
(WebKit::WebPaymentCoordinator::didCancelPaymentSession):
* WebProcess/ApplePay/WebPaymentCoordinator.h:
* WebProcess/ApplePay/WebPaymentCoordinator.messages.in:

LayoutTests:

Reviewed by Brady Eidson.

* http/tests/ssl/applepay/ApplePayCancelEvent.https-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayCancelEvent.https.html: Added.

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

12 months agoWebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
cdumez@apple.com [Wed, 18 Sep 2019 18:47:03 +0000 (18:47 +0000)]
WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201882

Reviewed by Geoffrey Garen.

WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
sessionID per WebProcess.

Source/WebCore:

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::installContextData):
(WebCore::SWServer::runServiceWorker):
* workers/service/server/SWServerToContextConnection.h:

Source/WebKit:

* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
(WebKit::ServiceWorkerFrameLoaderClient::sessionID const):
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):

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

12 months agoStop passing sessionIDs to NetworkProcessConnection methods
cdumez@apple.com [Wed, 18 Sep 2019 18:38:25 +0000 (18:38 +0000)]
Stop passing sessionIDs to NetworkProcessConnection methods
https://bugs.webkit.org/show_bug.cgi?id=201886

Reviewed by Geoffrey Garen.

Stop passing sessionIDs to NetworkProcessConnection methods. This is no longer
necessary now that we have a single session per WebProcess.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
(WebKit::NetworkProcessConnection::didCacheResource):
(WebKit::NetworkProcessConnection::idbConnectionToServer):
(WebKit::NetworkProcessConnection::idbConnectionToServerForSession): Deleted.
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:

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

12 months agoCacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
cdumez@apple.com [Wed, 18 Sep 2019 18:37:13 +0000 (18:37 +0000)]
CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
https://bugs.webkit.org/show_bug.cgi?id=201920

Reviewed by Geoffrey Garen.

CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID.
This sessionID is no longer used now that we have a session per WebProcess.

Source/WebCore:

* Modules/cache/CacheStorageConnection.cpp:
(WebCore::formDataSize):
(WebCore::CacheStorageConnection::computeRealBodySize):
* Modules/cache/CacheStorageConnection.h:
* Modules/cache/DOMWindowCaches.cpp:
(WebCore::DOMWindowCaches::caches const):
* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::sessionID const): Deleted.
* Modules/cache/WorkerCacheStorageConnection.h:
* fileapi/Blob.cpp:
(WebCore::Blob::size const):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::blobSize):
* fileapi/ThreadableBlobRegistry.h:
* loader/cache/KeepaliveRequestTracker.cpp:
(WebCore::KeepaliveRequestTracker::tryRegisterRequest):
(WebCore::KeepaliveRequestTracker::registerRequest):
(WebCore::KeepaliveRequestTracker::unregisterRequest):
* page/CacheStorageProvider.h:
(WebCore::CacheStorageProvider::createCacheStorageConnection):
* platform/network/BlobRegistry.h:
* platform/network/FormData.cpp:
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormData::lengthInBytes const):
* platform/network/FormData.h:
* testing/Internals.cpp:
(WebCore::Internals::clearCacheStorageMemoryRepresentation):
(WebCore::Internals::cacheStorageEngineRepresentation):
(WebCore::Internals::updateQuotaBasedOnSpaceUsage):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::createCacheStorageConnection):
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection):
* workers/service/context/ServiceWorkerThreadProxy.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

Source/WebKit:

* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::sessionID const): Deleted.
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/Cache/WebCacheStorageProvider.cpp:
(WebKit::WebCacheStorageProvider::createCacheStorageConnection):
* WebProcess/Cache/WebCacheStorageProvider.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.mm:

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

12 months agoREGRESSION: (Catalina) fast/images/async-image-multiple-clients-repaint.html is a...
russell_e@apple.com [Wed, 18 Sep 2019 18:05:20 +0000 (18:05 +0000)]
REGRESSION: (Catalina) fast/images/async-image-multiple-clients-repaint.html is a flakey failure.
rdar://55484256

Unreviewed Test Gardening.

* platform/mac/TestExpectations:

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

12 months agoDrop FrameLoaderClient::sessionID()
cdumez@apple.com [Wed, 18 Sep 2019 17:14:15 +0000 (17:14 +0000)]
Drop FrameLoaderClient::sessionID()
https://bugs.webkit.org/show_bug.cgi?id=201916

Reviewed by Geoffrey Garen.

Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
can get the sessionID from the WebProcess singleton.

Source/WebCore:

* loader/EmptyClients.cpp:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* page/Frame.cpp:
(WebCore::Frame::sessionID const):

Source/WebKit:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

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

12 months agoWebServiceWorkerProvider::handleFetch() does not need to take in a sessionID
cdumez@apple.com [Wed, 18 Sep 2019 17:13:29 +0000 (17:13 +0000)]
WebServiceWorkerProvider::handleFetch() does not need to take in a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201917

Reviewed by Geoffrey Garen.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::handleFetch):
* WebProcess/Storage/WebServiceWorkerProvider.h:

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

12 months agoWebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs...
cdumez@apple.com [Wed, 18 Sep 2019 17:12:46 +0000 (17:12 +0000)]
WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201883

Reviewed by Geoffrey Garen.

WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID,
now that we have a single session per WebProcess.

Source/WebCore:

* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::postMessage):
* workers/service/context/SWContextManager.h:

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::postMessageToServiceWorkerClient):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
* WebProcess/Storage/WebSWContextManagerConnection.h:

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

12 months agoUnreviewed, rolling out r250030.
russell_e@apple.com [Wed, 18 Sep 2019 16:51:19 +0000 (16:51 +0000)]
Unreviewed, rolling out r250030.

Cause of Recent Build Failures.

Reverted changeset:

"Make all ScriptWrappable IsoHeap-ed"
https://bugs.webkit.org/show_bug.cgi?id=201846
https://trac.webkit.org/changeset/250030

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

12 months ago[WPE][GTK] Update build environments to use libwpe+WPEBackend-fdo 1.4.0
aperez@igalia.com [Wed, 18 Sep 2019 16:27:20 +0000 (16:27 +0000)]
[WPE][GTK] Update build environments to use libwpe+WPEBackend-fdo 1.4.0
https://bugs.webkit.org/show_bug.cgi?id=201915

Reviewed by Michael Catanzaro.

* flatpak/org.webkit.WPEModules.yaml: Bump versions of libwpe and WPEBackend-fdo to 1.4.0
* gtk/jhbuild.modules: Ditto.
* wpe/jhbuild.modules: Ditto.

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

12 months agoREGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
russell_e@apple.com [Wed, 18 Sep 2019 16:11:03 +0000 (16:11 +0000)]
REGRESSION (macOS): Many webgpu/whlsl* tests are flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=201877

Unreviewed Test Gardening.

Two additional tests are flaky, marking as such.

* platform/mac/TestExpectations:

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

12 months agoFollowup iOS 13 test gardening for r250023
tsavell@apple.com [Wed, 18 Sep 2019 15:55:08 +0000 (15:55 +0000)]
Followup iOS 13 test gardening for r250023

Unreviewed test gardening

* platform/ios-wk2/TestExpectations:

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

12 months ago[GTK][WPE] bubblewrap sandbox should be disabled when running inside docker
clopez@igalia.com [Wed, 18 Sep 2019 15:53:11 +0000 (15:53 +0000)]
[GTK][WPE] bubblewrap sandbox should be disabled when running inside docker
https://bugs.webkit.org/show_bug.cgi?id=201914

Reviewed by Michael Catanzaro.

Detect if running inside Docker by checking the file /.dockerenv
In that case, disable the sandbox.

* UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
(WebKit::isInsideDocker):
(WebKit::ProcessLauncher::launchProcess):

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

12 months ago[LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeig...
zalan@apple.com [Wed, 18 Sep 2019 15:53:06 +0000 (15:53 +0000)]
[LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeight only.
https://bugs.webkit.org/show_bug.cgi?id=201880
<rdar://problem/55449623>

Reviewed by Antti Koivisto.

Let's tighten the incoming vertical parameter.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
(WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
(WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):

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

12 months agoDocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
antti@apple.com [Wed, 18 Sep 2019 15:41:09 +0000 (15:41 +0000)]
DocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
https://bugs.webkit.org/show_bug.cgi?id=201911
<rdar://problem/55455458>

Reviewed by Zalan Bujtas.

DocumentMarkerController::addMarker may call ensureLineBoxes but TextIterator doesn't expect mutations during traversal.
Fix by doing range collection as a separate step.

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::collectTextRanges):
(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
(WebCore::DocumentMarkerController::addDictationResultMarker):
(WebCore::DocumentMarkerController::addDraggedContentMarker):
(WebCore::DocumentMarkerController::addPlatformTextCheckingMarker):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::filterMarkers):
* dom/DocumentMarkerController.h:

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

12 months ago[LFC] Shrink-to-fit-width needs the available width constraint value only
zalan@apple.com [Wed, 18 Sep 2019 15:38:17 +0000 (15:38 +0000)]
[LFC] Shrink-to-fit-width needs the available width constraint value only
https://bugs.webkit.org/show_bug.cgi?id=201896
<rdar://problem/55465382>

Reviewed by Antti Koivisto.

* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

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

12 months ago[WebGPU] Update demos to work on STP 92
mmaxfield@apple.com [Wed, 18 Sep 2019 14:31:12 +0000 (14:31 +0000)]
[WebGPU] Update demos to work on STP 92
https://bugs.webkit.org/show_bug.cgi?id=201872

Reviewed by Dean Jackson.

Websites/browserbench.org:

GPUShaderStageBit => GPUShaderStage

* MotionMark1.1/tests/3d/resources/webgpu.js:
(Stage.call.initialize):

Websites/webkit.org:

Updating for new WSL buffer layouts.
Updating for new WSL compiler struct validation rules.
GPUShaderStageBit => GPUShaderStage
GPUColorWriteBits => GPUColorWrite
GPUBufferUsage.TRANSFER_DST => GPUBufferUsage.COPY_DST
GPUBufferUsage.TRANSFER_SRC => GPUBufferUsage.COPY_SRC

* demos/webgpu/babylon/babylonWebGpu.max.js:
* demos/webgpu/babylon/oneHelmetWebGPUWSLShaders.js:
(sampler.bumpSamplerSampler.register):
(sampler.reflectionSamplerSampler.register):
(float2.uv.attribute): Deleted.
(float3.normal.attribute): Deleted.
* demos/webgpu/compute-boids.html:
* demos/webgpu/hello-cube.html:
* demos/webgpu/scripts/compute-blur.js:
(setUpCompute):
(createShaderCode):
* demos/webgpu/scripts/compute-boids-compile.js:
* demos/webgpu/scripts/hello-triangle.js:
(async.helloTriangle):
* demos/webgpu/textured-cube.html:

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

12 months agoREGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledF...
ddkilzer@apple.com [Wed, 18 Sep 2019 11:30:16 +0000 (11:30 +0000)]
REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()
<https://webkit.org/b/201893>
<rdar://problem/55464115>

Reviewed by Brent Fulgham.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::InstalledFont::InstalledFont): Use
adoptCF() to fix the leak.

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

12 months agoMake all ScriptWrappable IsoHeap-ed
ysuzuki@apple.com [Wed, 18 Sep 2019 10:33:16 +0000 (10:33 +0000)]
Make all ScriptWrappable IsoHeap-ed
https://bugs.webkit.org/show_bug.cgi?id=201846
<rdar://problem/55407535>

Reviewed by Mark Lam.

This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
(WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
* Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
* Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
(WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
(WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
* Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingContactSelectedEvent.h:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
* Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
* Modules/applepay/ApplePayValidateMerchantEvent.cpp:
* Modules/applepay/ApplePayValidateMerchantEvent.h:
(WebCore::ApplePayValidateMerchantEvent::create): Deleted.
(WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
* Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
* Modules/encryptedmedia/MediaKeyMessageEvent.h:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
(WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
(WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
(WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
(WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
(WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
* Modules/gamepad/GamepadEvent.cpp:
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create): Deleted.
(WebCore::GamepadEvent::gamepad const): Deleted.
* Modules/indexeddb/IDBRequestCompletionEvent.cpp:
* Modules/indexeddb/IDBRequestCompletionEvent.h:
(WebCore::IDBRequestCompletionEvent::create): Deleted.
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/mediarecorder/BlobEvent.cpp:
* Modules/mediarecorder/BlobEvent.h:
* Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
* Modules/mediarecorder/MediaRecorderErrorEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.cpp:
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h.
* Modules/mediastream/OverconstrainedErrorEvent.h:
(WebCore::OverconstrainedErrorEvent::create): Deleted.
(WebCore::OverconstrainedErrorEvent::error const): Deleted.
(WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDataChannelEvent.cpp:
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
* Modules/mediastream/RTCPeerConnectionIceEvent.h:
(WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
* Modules/mediastream/RTCTrackEvent.cpp:
* Modules/mediastream/RTCTrackEvent.h:
(WebCore::RTCTrackEvent::receiver const): Deleted.
(WebCore::RTCTrackEvent::track const): Deleted.
(WebCore::RTCTrackEvent::streams const): Deleted.
(WebCore::RTCTrackEvent::transceiver const): Deleted.
(WebCore::RTCTrackEvent::eventInterface const): Deleted.
* Modules/paymentrequest/MerchantValidationEvent.cpp:
* Modules/paymentrequest/MerchantValidationEvent.h:
* Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
* Modules/paymentrequest/PaymentMethodChangeEvent.h:
* Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
* Modules/paymentrequest/PaymentRequestUpdateEvent.h:
* Modules/speech/SpeechSynthesisEvent.cpp:
* Modules/speech/SpeechSynthesisEvent.h:
(WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
(WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
(WebCore::SpeechSynthesisEvent::name const): Deleted.
(WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
* Modules/webaudio/AudioProcessingEvent.cpp:
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/OfflineAudioCompletionEvent.cpp:
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/webgpu/GPUUncapturedErrorEvent.cpp:
* Modules/webgpu/GPUUncapturedErrorEvent.h:
* Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* Modules/websockets/CloseEvent.h:
(WebCore::CloseEvent::create): Deleted.
(WebCore::CloseEvent::wasClean const): Deleted.
(WebCore::CloseEvent::code const): Deleted.
(WebCore::CloseEvent::reason const): Deleted.
(WebCore::CloseEvent::CloseEvent): Deleted.
* Modules/webvr/VRDisplayEvent.cpp:
* Modules/webvr/VRDisplayEvent.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibleSetValueEvent.cpp:
* accessibility/AccessibleSetValueEvent.h:
(WebCore::AccessibleSetValueEvent::create): Deleted.
(WebCore::AccessibleSetValueEvent::value const): Deleted.
* animation/AnimationPlaybackEvent.cpp:
* animation/AnimationPlaybackEvent.h:
* bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
* bindings/js/ScriptWrappable.h:
* dom/AnimationEvent.cpp:
* dom/AnimationEvent.h:
* dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/BeforeLoadEvent.h:
* dom/BeforeTextInsertedEvent.cpp:
* dom/BeforeTextInsertedEvent.h:
* dom/BeforeUnloadEvent.cpp:
* dom/BeforeUnloadEvent.h:
* dom/ClipboardEvent.cpp:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.cpp:
* dom/CompositionEvent.h:
* dom/CustomEvent.cpp:
* dom/CustomEvent.h:
* dom/DeviceMotionEvent.cpp:
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationEvent.cpp:
* dom/DeviceOrientationEvent.h:
* dom/ErrorEvent.cpp:
* dom/ErrorEvent.h:
* dom/Event.cpp:
* dom/Event.h:
* dom/FocusEvent.cpp:
* dom/FocusEvent.h:
* dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/HashChangeEvent.h:
* dom/InputEvent.cpp:
* dom/InputEvent.h:
* dom/KeyboardEvent.cpp:
* dom/KeyboardEvent.h:
* dom/MessageEvent.cpp:
* dom/MessageEvent.h:
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
* dom/MouseRelatedEvent.h:
* dom/MutationEvent.cpp:
* dom/MutationEvent.h:
* dom/OverflowEvent.cpp:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.cpp:
* dom/PageTransitionEvent.h:
* dom/PointerEvent.cpp:
* dom/PointerEvent.h:
* dom/PopStateEvent.cpp:
* dom/PopStateEvent.h:
* dom/ProgressEvent.cpp:
* dom/ProgressEvent.h:
* dom/PromiseRejectionEvent.cpp:
* dom/PromiseRejectionEvent.h:
* dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
* dom/SecurityPolicyViolationEvent.h:
* dom/TextEvent.cpp:
* dom/TextEvent.h:
* dom/TouchEvent.cpp:
* dom/TouchEvent.h:
* dom/TransitionEvent.cpp:
* dom/TransitionEvent.h:
* dom/UIEvent.cpp:
* dom/UIEvent.h:
* dom/UIEventWithKeyState.cpp:
* dom/UIEventWithKeyState.h:
* dom/WebKitAnimationEvent.cpp:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.cpp:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.cpp:
* dom/WheelEvent.h:
* html/MediaEncryptedEvent.cpp:
* html/MediaEncryptedEvent.h:
* html/canvas/WebGLContextEvent.cpp:
* html/canvas/WebGLContextEvent.h:
* html/shadow/ProgressShadowElement.h:
* html/track/TrackEvent.cpp:
* html/track/TrackEvent.h:
* storage/StorageEvent.cpp:
* storage/StorageEvent.h:
(WebCore::StorageEvent::key const): Deleted.
(WebCore::StorageEvent::oldValue const): Deleted.
(WebCore::StorageEvent::newValue const): Deleted.
(WebCore::StorageEvent::url const): Deleted.
(WebCore::StorageEvent::storageArea const): Deleted.
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.h:
* svg/SVGZoomEvent.cpp:
* svg/SVGZoomEvent.h:
* workers/service/ExtendableEvent.cpp:
* workers/service/ExtendableEvent.h:
* workers/service/ExtendableMessageEvent.cpp:
* workers/service/ExtendableMessageEvent.h:
* workers/service/FetchEvent.cpp:
* workers/service/FetchEvent.h:
* xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
* xml/XMLHttpRequestProgressEvent.h:
(WebCore::XMLHttpRequestProgressEvent::create): Deleted.
(WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
(WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
(WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.

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

12 months agoJPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
Hironori.Fujii@sony.com [Wed, 18 Sep 2019 10:03:19 +0000 (10:03 +0000)]
JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
https://bugs.webkit.org/show_bug.cgi?id=200163

Reviewed by Carlos Garcia Campos.

Remove the workaround for old libjpeg-turbo which doesn't support
BGRA output for Adobe transform=0 images. The bug was fixed in
libjpeg-turbo 1.2.1.

No new tests, no behavior change.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
(colorSpaceHasAlpha): Removed an unused inline function.

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

12 months agoUnreviewed. Remove build warning since r248998.
jh718.park@samsung.com [Wed, 18 Sep 2019 09:19:33 +0000 (09:19 +0000)]
Unreviewed. Remove build warning since r248998.

This patch removes build warning below.
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

No new tests, no behavioral change.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-09-18

* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable):

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

12 months ago[cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
Hironori.Fujii@sony.com [Wed, 18 Sep 2019 07:55:42 +0000 (07:55 +0000)]
[cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
https://bugs.webkit.org/show_bug.cgi?id=201895

Reviewed by Carlos Garcia Campos.

In BackingStoreBackendCairoImpl::scroll, targetRect is calculated
wrongly by shifting maxX and maxY. Bug 59655 fixed the issue by
removing the shifting, but only for BackingStoreBackendCairoX11::scroll.

No new tests, no behavior change.

* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
(WebCore::BackingStoreBackendCairoImpl::scroll): Take intersection of targetRect and scrollRect.

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

12 months ago[Cocoa] Add a WKA extension point
aestes@apple.com [Wed, 18 Sep 2019 07:16:11 +0000 (07:16 +0000)]
[Cocoa] Add a WKA extension point
https://bugs.webkit.org/show_bug.cgi?id=201801
<rdar://problem/55372507>

Reviewed by Alexey Proskuryakov.

* Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::requiresSupportedNetworks):
(WebCore::convertAndValidate):

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

12 months ago[JSC] Generator should have internal fields
ysuzuki@apple.com [Wed, 18 Sep 2019 05:02:45 +0000 (05:02 +0000)]
[JSC] Generator should have internal fields
https://bugs.webkit.org/show_bug.cgi?id=201159

Reviewed by Keith Miller.

JSTests:

* stress/create-generator.js: Added.
(shouldBe):
(test.generator):
(test):
* stress/generator-construct-failure.js: Added.
(shouldThrow):
(TypeError):
* stress/generator-prototype-change.js: Added.
(shouldBe):
(gen):
* stress/generator-prototype-closure.js: Added.
(shouldBe):
(test.gen):
(test):
* stress/object-assign-fast-path.js:

Source/JavaScriptCore:

This patch makes generator's internal states InternalField instead of private properties.
Each generator function produces a generator with different [[Prototype]], which makes generators have different Structures.
As a result, Generator.prototype.next etc.'s implementation becomes megamorphic even if it is not necessary.

If we make these structures adaptively poly-proto, some generators get poly-proto structures while others are not, resulting
in megamorphic lookup in Generator.prototype.next. If we make all the generator's structure poly-proto, it makes Generator.prototype.next
lookup suboptimal for now.

In this patch, we start with a relatively simple solution. This patch introduces JSGenerator class, and it has internal fields for generator's internal
states. We extend promise-internal-field access bytecodes to access to these fields from bytecode so that Generator.prototype.next can access
these fields without using megamorphic get_by_id_direct.

And we attach JSGeneratorType to JSGenerator so that we can efficiently implement `@isGenerator()` check in bytecode.

We reserve the offset = 0 slot for the future poly-proto extension for JSGenerator. By reserving this slot, non-poly-proto JSGenerator and poly-proto
JSGenerator still can offer the way to access to the same Generator internal fields with the same offset while poly-proto JSGenerator can get offset = 0
inline-storage slot for PolyProto implementation.

This patch adds op_create_generator since it is distinct from op_create_promise once we add PolyProto support.
In the future when we introduce some kind of op_create_async_generator we will probably share only one bytecode for both generator and async generator.

This patch offers around 10% improvement in JetStream2/Basic. And this patch is the basis of optimization of JetStream2/async-fs which leverages async generators significantly.

This patch includes several design decisions.

    1. We add a new JSGenerator instead of leveraging JSFinalObject. The main reason is that we would like to have JSGeneratorType to quickly query `@isGenerator`.
    2. This patch currently does not include object-allocation-sinking support for JSGenerator, but it is trivial, and will be added. And this patch also does not include poly-proto
       support for JSGenerator. The main reason is simply because this patch is already large enough, and I do not want to make this patch larger and larger.
    3. We can support arbitrary sized inline-storage: Reserving 0-5 offsets for internal fields, and start putting all the other things to the subsequent internal fields. But for now,
       we are not taking this approach just because I'm not sure this is necessary. If we found such a pattern, we can easily extend the current one but for now, I would like to keep
       this patch simple.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* builtins/AsyncFunctionPrototype.js:
(globalPrivate.asyncFunctionResume):
* builtins/GeneratorPrototype.js:
(globalPrivate.generatorResume):
(next):
(return):
(throw):
* bytecode/BytecodeGeneratorification.cpp:
(JSC::BytecodeGeneratorification::run):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/BytecodeList.rb:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/SpeculatedType.cpp:
(JSC::speculationFromJSType):
* bytecode/SpeculatedType.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitPutGeneratorFields):
(JSC::BytecodeGenerator::emitCreateGenerator):
(JSC::BytecodeGenerator::emitNewGenerator):
(JSC::BytecodeGenerator::emitYield):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::emitGeneratorStateChange):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitIsGenerator):
(JSC::BytecodeGenerator::generatorStateRegister):
(JSC::BytecodeGenerator::generatorValueRegister):
(JSC::BytecodeGenerator::generatorResumeModeRegister):
(JSC::BytecodeGenerator::generatorFrameRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::generatorInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getGeneratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putGeneratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isGenerator):
(JSC::FunctionNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupIsCellWithType):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToNewGenerator):
(JSC::DFG::Node::speculatedTypeForQuery):
(JSC::DFG::Node::hasStructure):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCreatePromise):
(JSC::DFG::SpeculativeJIT::compileCreateGenerator):
(JSC::DFG::SpeculativeJIT::compileNewGenerator):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewGenerator):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateGenerator):
(JSC::FTL::DFG::LowerDFGToB3::isCellWithType):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructureSlow):
* runtime/InternalFunction.h:
(JSC::InternalFunction::createSubclassStructure):
* runtime/JSGenerator.cpp: Added.
(JSC::JSGenerator::create):
(JSC::JSGenerator::createStructure):
(JSC::JSGenerator::JSGenerator):
(JSC::JSGenerator::finishCreation):
(JSC::JSGenerator::visitChildren):
* runtime/JSGenerator.h: Copied from Source/JavaScriptCore/runtime/JSGeneratorFunction.h.
* runtime/JSGeneratorFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::generatorStructure const):
* runtime/JSType.cpp:
(WTF::printInternal):
* runtime/JSType.h:

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

12 months agoUnreviewed iOS 13 test gardening, update test expectations.
ryanhaddad@apple.com [Wed, 18 Sep 2019 04:33:54 +0000 (04:33 +0000)]
Unreviewed iOS 13 test gardening, update test expectations.

* platform/ios/TestExpectations:

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

12 months agoUnreviewed iOS 13 test gardening, udpate test expectations and baselines.
ryanhaddad@apple.com [Wed, 18 Sep 2019 04:22:07 +0000 (04:22 +0000)]
Unreviewed iOS 13 test gardening, udpate test expectations and baselines.

* platform/ios/TestExpectations:
* platform/ios/js/dom/navigator-maxtouchpoints-expected.txt: Added.
* platform/ios/platform/ios/ios/fast/text/opticalFont-expected.txt:

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

12 months agoUnreviewed test gardening, rebaseline a test after r249963.
ryanhaddad@apple.com [Wed, 18 Sep 2019 03:58:54 +0000 (03:58 +0000)]
Unreviewed test gardening, rebaseline a test after r249963.

* media/track/track-cue-rendering-rtl-expected.txt:

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

12 months agoMove comment explaining our Options to OptionsList.h
keith_miller@apple.com [Wed, 18 Sep 2019 03:23:28 +0000 (03:23 +0000)]
Move comment explaining our Options to OptionsList.h
https://bugs.webkit.org/show_bug.cgi?id=201891

Rubber-stamped by Mark Lam.

We moved the list so we should move the comment.

* runtime/Options.h:
* runtime/OptionsList.h:

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

12 months agoFollow-up: [iOS 13] Enable WebKit build
jbedard@apple.com [Wed, 18 Sep 2019 02:48:09 +0000 (02:48 +0000)]
Follow-up: [iOS 13] Enable WebKit build
https://bugs.webkit.org/show_bug.cgi?id=199481
<rdar://problem/52619048>

Unreviewed build-fix.

* WebKitPrivateFrameworkStubs/iOS/13/DeviceIdentity.framework: Added.
* WebKitPrivateFrameworkStubs/iOS/13/DeviceIdentity.framework/DeviceIdentity.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/13/IOSurfaceAccelerator.framework: Added.
* WebKitPrivateFrameworkStubs/iOS/13/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.

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

12 months ago[Win][MiniBrowser] Remove unused DOMDefaultImpl.cpp
Hironori.Fujii@sony.com [Wed, 18 Sep 2019 01:55:42 +0000 (01:55 +0000)]
[Win][MiniBrowser] Remove unused DOMDefaultImpl.cpp
https://bugs.webkit.org/show_bug.cgi?id=201867

Reviewed by Darin Adler.

* MiniBrowser/win/CMakeLists.txt: Removed DOMDefaultImpl.cpp.
* MiniBrowser/win/DOMDefaultImpl.cpp: Removed.
* MiniBrowser/win/DOMDefaultImpl.h: Removed.
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

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

12 months agoUnreviewed, revert change that Alex mistakenly committed at the same time as r250006...
cdumez@apple.com [Wed, 18 Sep 2019 01:43:06 +0000 (01:43 +0000)]
Unreviewed, revert change that Alex mistakenly committed at the same time as r250006 and broke the build.

* page/PerformanceObserver.idl:

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

12 months agoUnreviewed WinCairo build fix following r249985.
ross.kirsling@sony.com [Wed, 18 Sep 2019 01:27:23 +0000 (01:27 +0000)]
Unreviewed WinCairo build fix following r249985.

* Shared/WebProcessDataStoreParameters.h:

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

12 months agoRemove the "Show Link Previews" and "Hide Link Previews" action menus in the preview...
dino@apple.com [Wed, 18 Sep 2019 01:20:41 +0000 (01:20 +0000)]
Remove the "Show Link Previews" and "Hide Link Previews" action menus in the preview platter
https://bugs.webkit.org/show_bug.cgi?id=201864
<rdar://55190038>

Reviewed by Simon Fraser.

Source/WebKit:

* UIProcess/ios/WKActionSheetAssistant.mm: Remove the toggle action from the
default values.
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
* UIProcess/ios/WKContentViewInteraction.mm: No longer try to add a toggle when
it isn't there.
(-[WKContentView assignLegacyDataForContextMenuInteraction]):
(menuWithShowLinkPreviewAction): Deleted.

Tools:

Test for the suggested actions.

* TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuWillPresentForElement:]):
(TEST):

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