WebKit.git
4 months ago[Cocoa] Fix incorrect rebase
pvollan@apple.com [Thu, 26 Mar 2020 16:12:49 +0000 (16:12 +0000)]
[Cocoa] Fix incorrect rebase
https://bugs.webkit.org/show_bug.cgi?id=209600

Reviewed by Brent Fulgham.

A rebase went wrong in <https://bugs.webkit.org/show_bug.cgi?id=203214> and placed the method call to
enableRemoteInspectorIfNeeded() in the wrong method. It should be called in WebProcessProxy::didFinishLaunching.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::mayBecomeUnresponsive):
(WebKit::WebProcessProxy::didFinishLaunching):

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

4 months ago[Flatpak SDK] Pass all the arguments of build-webkit to webkit-flatpak
philn@webkit.org [Thu, 26 Mar 2020 15:24:51 +0000 (15:24 +0000)]
[Flatpak SDK] Pass all the arguments of build-webkit to webkit-flatpak
https://bugs.webkit.org/show_bug.cgi?id=209558

Reviewed by Žan Doberšek.

When using flatpak some of the arguments we pass to build-webkit
are not meant to be used by that script but by webkit-flatpak. However we are
not passing all of them to webkit-flatpak but just the configuration ones
(port, release/debug...). This means that all the arguments that configure the
behaviour of webkit-flatpak are lost.

* Scripts/webkitdirs.pm:
(runInFlatpak): Filter-out Flatpak SDK-specific arguments to a
separate array, passed to webkit-flatpak.

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

4 months ago[GTK] Crash in WebKit::LayerTreeHost::LayerTreeHost with bubblewrap sandbox enabled
commit-queue@webkit.org [Thu, 26 Mar 2020 15:22:42 +0000 (15:22 +0000)]
[GTK] Crash in WebKit::LayerTreeHost::LayerTreeHost with bubblewrap sandbox enabled
https://bugs.webkit.org/show_bug.cgi?id=209106

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-03-26
Reviewed by Carlos Garcia Campos.

Don't bind the WaylandCompositor socket unless we're running under Wayland and it's actually
started successfully.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bindWayland):

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

4 months agoUnreviewed, reverting r259035.
commit-queue@webkit.org [Thu, 26 Mar 2020 14:31:28 +0000 (14:31 +0000)]
Unreviewed, reverting r259035.
https://bugs.webkit.org/show_bug.cgi?id=209597

broke windows layout-tests (Requested by aakashjain on
#webkit).

Reverted changeset:

"[Win] lld-link: error: /manifestdependency: is not allowed in
.drectve"
https://bugs.webkit.org/show_bug.cgi?id=204831
https://trac.webkit.org/changeset/259035

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

4 months agoBump boringssl version to M82
youenn@apple.com [Thu, 26 Mar 2020 11:43:14 +0000 (11:43 +0000)]
Bump boringssl version to M82
https://bugs.webkit.org/show_bug.cgi?id=209538

Reviewed by Eric Carlson.

* CMakeLists.txt:
* Source/third_party/boringssl: Updated.
* WebKit/0001-Tweaking-boringssl-include-of-internal.h.patch: Removed.
* libwebrtc.xcodeproj/project.pbxproj:

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

4 months agoVideoFullscreenManagerProxy::setupFullscreenWithID should message check videoLayerID
ddkilzer@apple.com [Thu, 26 Mar 2020 10:39:08 +0000 (10:39 +0000)]
VideoFullscreenManagerProxy::setupFullscreenWithID should message check videoLayerID
<https://webkit.org/b/209578>
<rdar://problem/60703503>

Reviewed by Eric Carlson.

* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(MESSAGE_CHECK): Define (and undef) new macro for assertions.
(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
Change ASSERT() to MESSAGE_CHECK().

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

4 months ago[GTK] Gardening, add missing expectation files
dpino@igalia.com [Thu, 26 Mar 2020 10:10:59 +0000 (10:10 +0000)]
[GTK] Gardening, add missing expectation files
https://bugs.webkit.org/show_bug.cgi?id=209588

Unreviewed gardening.

* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-mixed-expected.txt: Added.
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-mixed-expected.txt: Added.
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-mixed-expected.txt: Added.
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-mixed-expected.txt: Added.
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-center-mixed-expected.txt: Added.
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-justify-mixed-expected.txt: Added.
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-left-mixed-expected.txt: Added.
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-right-mixed-expected.txt: Added.
* platform/gtk/fast/html/details-marker-style-mixed-expected.txt: Added.
* platform/gtk/fast/html/details-writing-mode-mixed-expected.txt: Added.
* platform/gtk/fast/multicol/tall-image-behavior-lr-mixed-expected.txt: Added.
* platform/gtk/fast/text/vertical-rl-rtl-linebreak-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/background-vertical-lr-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/background-vertical-rl-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/basic-vertical-line-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/border-styles-vertical-lr-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/border-styles-vertical-rl-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/vertical-baseline-alignment-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/vertical-lr-replaced-selection-mixed-expected.txt: Added.
* platform/gtk/fast/writing-mode/vertical-rl-replaced-selection-mixed-expected.txt: Added.

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

4 months ago[Flatpak SDK] update-webkitgtk-libs fails
philn@webkit.org [Thu, 26 Mar 2020 10:06:18 +0000 (10:06 +0000)]
[Flatpak SDK] update-webkitgtk-libs fails
https://bugs.webkit.org/show_bug.cgi?id=209546

Reviewed by Žan Doberšek.

Simplify the code a bit, add a `--assumeyes` argument to the
`flatpak update` command to make it non-interactive and improve
error handling/reporting a bit as well.

* flatpak/flatpakutils.py:
(FlatpakObject.flatpak):
(WebkitFlatpak.main):
(WebkitFlatpak.run):
(WebkitFlatpak.install_all):
(WebkitFlatpak.update_all): Deleted.

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

4 months ago[Flatpak SDK] Crash post-mortem debugging is broken
philn@webkit.org [Thu, 26 Mar 2020 10:05:11 +0000 (10:05 +0000)]
[Flatpak SDK] Crash post-mortem debugging is broken
https://bugs.webkit.org/show_bug.cgi?id=209537

Reviewed by Žan Doberšek.

webkit-flatpak --gdb now properly launches gdb to inspect the last
crash reported to coredumpctl. The -m argument can be used to
select another crash dump.

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run_gdb):

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

4 months agoSyscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s) in IPC::Connect...
commit-queue@webkit.org [Thu, 26 Mar 2020 09:01:53 +0000 (09:01 +0000)]
Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s) in IPC::Connection::sendOutgoingMessage
https://bugs.webkit.org/show_bug.cgi?id=146729

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-03-26
Reviewed by Carlos Garcia Campos.

The entire MessageInfo is passed to write(), so we have to zero the padding bytes to avoid
writing uninitialized memory.

* Platform/IPC/unix/UnixMessage.h:
(IPC::MessageInfo::MessageInfo):

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

4 months agoTake into account referrer-policy in append Origin header algorithm
commit-queue@webkit.org [Thu, 26 Mar 2020 07:38:24 +0000 (07:38 +0000)]
Take into account referrer-policy in append Origin header algorithm
https://bugs.webkit.org/show_bug.cgi?id=209066

Patch by Rob Buis <rbuis@igalia.com> on 2020-03-26
Reviewed by Youenn Fablet.

Start taking into account referrer-policy in more places when we
append the origin header [1]. To prevent computing SecurityOrigin
needlessly add a helper function doesRequestNeedHTTPOriginHeader.

[1] https://fetch.spec.whatwg.org/#append-a-request-origin-header

* loader/FormSubmission.cpp:
(WebCore::FormSubmission::populateFrameLoadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::FrameLoader::addHTTPOriginIfNeeded): Deleted.
* loader/FrameLoader.h:
* loader/NavigationScheduler.cpp:
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendPing):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
* platform/network/ResourceRequestBase.cpp:
(WebCore::doesRequestNeedHTTPOriginHeader):
* platform/network/ResourceRequestBase.h:

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

4 months ago[Win] lld-link: error: /manifestdependency: is not allowed in .drectve
Hironori.Fujii@sony.com [Thu, 26 Mar 2020 06:43:11 +0000 (06:43 +0000)]
[Win] lld-link: error: /manifestdependency: is not allowed in .drectve
https://bugs.webkit.org/show_bug.cgi?id=204831

Reviewed by Ross Kirsling.

.:

clang-cl doesn't support #pragma comment(linker, "/manifestdependency ..").
Use an linker option instead.

* Source/cmake/WebKitMacros.cmake (WEBKIT_EXECUTABLE): Added -manifestdependency linkder option if WIN32.

Source/JavaScriptCore:

* shell/DLLLauncherMain.cpp: Removed /manifestdependency for Microsoft.VC80.CRT which seems leftover of Bug 116562 (r178530).

Tools:

* TestWebKitAPI/win/main.cpp:
* win/DLLLauncher/DLLLauncherMain.cpp:

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

4 months agoIndexedDB: destroy UniqueIDBDatabase when it's not used
sihui_liu@apple.com [Thu, 26 Mar 2020 06:26:51 +0000 (06:26 +0000)]
IndexedDB: destroy UniqueIDBDatabase when it's not used
https://bugs.webkit.org/show_bug.cgi?id=209532

Reviewed by Geoffrey Garen.

Reviewed by Geoffrey Garen.

When all connections of a UniqueIDBDatabase object are closed and there are no pending reuqests, the
object may not be used any more. We should delete it for better memory use.

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::removeUniqueIDBDatabase):
(WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase): Deleted.
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::tryCloseAndRemoveFromServer):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

4 months agoUnreviewed test gardening for Win10.
ryanhaddad@apple.com [Thu, 26 Mar 2020 04:44:08 +0000 (04:44 +0000)]
Unreviewed test gardening for Win10.

* platform/win/TestExpectations: Skip two webanimations tests that are consistently timing out.

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

4 months agoUnreviewed, reimport test262 once more to make bot green.
ross.kirsling@sony.com [Thu, 26 Mar 2020 04:29:26 +0000 (04:29 +0000)]
Unreviewed, reimport test262 once more to make bot green.

* test262/expectations.yaml:
* test262/harness/assert.js:
* test262/harness/propertyHelper.js:
* test262/latest-changes-summary.txt:
* test262/test/built-ins/JSON/stringify/replacer-function-stack-overflow.js: Removed.
* test262/test/built-ins/JSON/stringify/value-tojson-stack-overflow.js: Removed.
* test262/test/built-ins/NativeErrors/AggregateError/newtarget-is-undefined.js: Added.
* test262/test/built-ins/RegExp/prototype/Symbol.replace/poisoned-stdlib.js:
* test262/test/harness/assert-samevalue-zeros.js:
* test262/test/language/expressions/class/elements/private-field-after-optional-chain.js: Added.
* test262/test/language/statements/class/elements/private-field-after-optional-chain.js: Added.
* test262/test262-Revision.txt:

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

4 months ago[ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
commit-queue@webkit.org [Thu, 26 Mar 2020 04:28:40 +0000 (04:28 +0000)]
[ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
https://bugs.webkit.org/show_bug.cgi?id=208532

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

Source/WebCore:

In this layout test, the id of a <path> element changes. This <path> is
referenced by a <textPath> element which is a child of a <pattern> element.
The <pattern> element is used to fill a <rect> element.

This patch ensures all clients (<rect>) of the resource ancestor (<pattern>)
of any sub-resource (<textPath>) is marked for repaint when the id of a
sub-sub-resource (<path>) changes.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForRepaint):
* rendering/svg/RenderSVGResourceContainer.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::buildPendingResourcesIfNeeded):
(WebCore::SVGElement::invalidateInstances):
Unrelated change. This is a leftover from r179807 which was converting a
"do { } while();" statement to "while() { }" statement.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

4 months agoUnable to build WebKit with iOS 13.4 SDK
timothy_horton@apple.com [Thu, 26 Mar 2020 03:26:41 +0000 (03:26 +0000)]
Unable to build WebKit with iOS 13.4 SDK
https://bugs.webkit.org/show_bug.cgi?id=209317

* Platform/spi/ios/UIKitSPI.h:
Address post-landing review comment; use SDK conditionals, not deployment
target conditionals, since SPI headers are mimicing SDK content.

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

4 months agoRegExp.prototype[@@replace] relies on globals and doesn't perform ToLength
shvaikalesh@gmail.com [Thu, 26 Mar 2020 02:24:29 +0000 (02:24 +0000)]
RegExp.prototype[@@replace] relies on globals and doesn't perform ToLength
https://bugs.webkit.org/show_bug.cgi?id=173867

Reviewed by Ross Kirsling.

JSTests:

* test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This change:

a) Adds "lastIndex" ToLength coercion [1], which is observable, unlike ToLength coercion
   of RegExpExec result [2] that we omit, just like the one in @@split [3].

b) Removes `lastPosition` checks/updates, as there are none in the spec, and it was
   equivalent to checking `nextSourcePosition`.

c) Removes reliance of @@replace on globals and also replaces @stringSubstrInternal
   built-in with @stringSubstringInternal, as the former is Annex B and accepts size
   as 2nd paramter, which is not very handy because ECMA-262 usually says "substring
   of S consisting of the code units at indices X (inclusive) through Y (exclusive)".

[1]: https://tc39.es/ecma262/#sec-regexp.prototype-@@replace (step 11.c.iii.2.a)
[2]: https://tc39.es/ecma262/#sec-regexp.prototype-@@replace (step 14.a)
[3]: https://tc39.es/ecma262/#sec-regexp.prototype-@@split (step 19.d.iv.6)

* builtins/BuiltinNames.h:
* builtins/RegExpPrototype.js:
(getSubstitution):
(Symbol.replace):
(Symbol.split):
* builtins/StringPrototype.js:
(globalPrivate.repeatCharactersSlowPath):
* bytecode/LinkTimeConstant.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/StringPrototype.cpp:
(JSC::stringIndexOfImpl):
(JSC::stringProtoFuncIndexOf):
(JSC::builtinStringIndexOfInternal):
(JSC::stringProtoFuncSubstr):
(JSC::stringSubstringImpl):
(JSC::stringProtoFuncSubstring):
(JSC::builtinStringSubstringInternal):
(JSC::stringProtoFuncSubstrImpl): Deleted.
(JSC::builtinStringSubstrInternal): Deleted.
* runtime/StringPrototype.h:

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

4 months agoMini browser immediately hit an assertion in debug build
rniwa@webkit.org [Thu, 26 Mar 2020 02:10:38 +0000 (02:10 +0000)]
Mini browser immediately hit an assertion in debug build
https://bugs.webkit.org/show_bug.cgi?id=209575

Reviewed by Simon Fraser.

Use 1 instead of 0 as the desination ID to avoid hitting assertions.

* WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):

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

4 months agoNullptr crash in WebCore::Node::isDescendantOf when inserting list
shihchieh_lee@apple.com [Thu, 26 Mar 2020 01:51:14 +0000 (01:51 +0000)]
Nullptr crash in WebCore::Node::isDescendantOf when inserting list
https://bugs.webkit.org/show_bug.cgi?id=209529
<rdar://problem/60693542>

Reviewed by Darin Adler.

Source/WebCore:

The visible positions may be null if the DOM tree is altered before an edit command is applied.
Add null check for visible positions at the beginning of InsertListCommand::doApply.

Test: editing/inserting/insert-list-during-node-removal-crash.html

* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApply):

LayoutTests:

Added a regression test for the crash.

* editing/inserting/insert-list-during-node-removal-crash-expected.txt: Added.
* editing/inserting/insert-list-during-node-removal-crash.html: Added.

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

4 months agoInvalid numeric and named references should be early syntax errors
shvaikalesh@gmail.com [Thu, 26 Mar 2020 01:24:05 +0000 (01:24 +0000)]
Invalid numeric and named references should be early syntax errors
https://bugs.webkit.org/show_bug.cgi?id=178175

Reviewed by Ross Kirsling.

JSTests:

* test262/expectations.yaml: Mark 44 test cases as passing.

Source/JavaScriptCore:

This patch:

1. Fixes named reference parsing in parseEscape(), making /\k/u throw SyntaxError per spec [1].

2. Reworks containsIllegalNamedForwardReferences(), making dangling (e.g. /\k<a>(?<b>.)/) and
   incomplete (e.g. /\k<(?<a>.)/) named references throw SyntaxError if the non-Unicode pattern
   contains a named group [2].

3. Moves reparsing logic from YarrPattern to YarrParser, ensuring syntax errors due to illegal
   references (named & numeric) are thrown at parse time; drops isValidNamedForwardReference()
   from Delegate, refactors saveUnmatchedNamedForwardReferences(), and overall improves cohesion
   of illegal references logic.

[1]: https://tc39.es/ecma262/#prod-IdentityEscape
[2]: https://tc39.es/ecma262/#sec-regexpinitialize (step 7.b)

* yarr/YarrErrorCode.cpp:
(JSC::Yarr::errorMessage):
(JSC::Yarr::errorToThrow):
* yarr/YarrErrorCode.h:
* yarr/YarrParser.h:
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomNamedBackReference):
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseParenthesesBegin):
(JSC::Yarr::Parser::parse):
(JSC::Yarr::Parser::handleIllegalReferences):
(JSC::Yarr::Parser::containsIllegalNamedForwardReference):
(JSC::Yarr::Parser::resetForReparsing):
(JSC::Yarr::parse):
(JSC::Yarr::Parser::CharacterClassParserDelegate::isValidNamedForwardReference): Deleted.
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::atomBackReference):
(JSC::Yarr::YarrPatternConstructor::atomNamedForwardReference):
(JSC::Yarr::YarrPattern::compile):
(JSC::Yarr::YarrPatternConstructor::saveUnmatchedNamedForwardReferences): Deleted.
(JSC::Yarr::YarrPatternConstructor::isValidNamedForwardReference): Deleted.
* yarr/YarrPattern.h:
(JSC::Yarr::YarrPattern::resetForReparsing):
(JSC::Yarr::YarrPattern::containsIllegalBackReference): Deleted.
(JSC::Yarr::YarrPattern::containsIllegalNamedForwardReferences): Deleted.
* yarr/YarrSyntaxChecker.cpp:
(JSC::Yarr::SyntaxChecker::atomNamedBackReference):
(JSC::Yarr::SyntaxChecker::resetForReparsing):
(JSC::Yarr::SyntaxChecker::isValidNamedForwardReference): Deleted.

Source/WebCore:

Accounts for changes of YarrParser's Delegate interface, no behavioral changes.
resetForReparsing() is never called because we disable numeric backrefences
and named forward references (see arguments of Yarr::parse() call).

Test: TestWebKitAPI.ContentExtensionTest.ParsingFailures

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::PatternParser::resetForReparsing):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::PatternParser::isValidNamedForwardReference): Deleted.

Tools:

Removes FIXME as YarrParser is correct not to throw errors as it is
parsing in non-Unicode mode. Also adds a few named groups tests.

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

LayoutTests:

* js/regexp-named-capture-groups-expected.txt:
* js/script-tests/regexp-named-capture-groups.js:

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

4 months agoUnable to build WebKit with iOS 13.4 SDK
timothy_horton@apple.com [Thu, 26 Mar 2020 00:32:00 +0000 (00:32 +0000)]
Unable to build WebKit with iOS 13.4 SDK
https://bugs.webkit.org/show_bug.cgi?id=209317

Reviewed by Megan Gardner.

* Platform/spi/ios/UIKitSPI.h:
Stop defining some UIKit SPI that is now API (hurray!).

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

4 months agoCanvasRenderingContext2D.putImageData() should not process neutered ImageData
commit-queue@webkit.org [Thu, 26 Mar 2020 00:28:36 +0000 (00:28 +0000)]
CanvasRenderingContext2D.putImageData() should not process neutered ImageData
https://bugs.webkit.org/show_bug.cgi?id=208303

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-03-25
Reviewed by Said Abou-Hallawa.

Source/WebCore:

Test: fast/canvas/canvas-putImageData-neutered-ImageData.html

The crash happens when putImageData is called on a neutered ImageData object.
Added a check to exit from CanvasRenderingContext2D.putImageData() function when ImageData object is neutered.

* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::putImageData):

LayoutTests:

Added slightly modified version of testcase from bugzilla.
This testcase checks that a neutered ImageData object is not considered to be put onto the canvas.

* fast/canvas/canvas-putImageData-neutered-ImageData-expected.txt: Added.
* fast/canvas/canvas-putImageData-neutered-ImageData.html: Added.

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

4 months ago[macOS] Fix sandbox violations related to media playback
pvollan@apple.com [Wed, 25 Mar 2020 23:52:24 +0000 (23:52 +0000)]
[macOS] Fix sandbox violations related to media playback
https://bugs.webkit.org/show_bug.cgi?id=209568
<rdar://problem/60262125>

Reviewed by Brent Fulgham.

Fix observed sandbox violations during media playback.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::mediaRelatedMachServices):

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

4 months agoUse JSC::EnsureStillAliveScope RAII object in the generated bindings code
cdumez@apple.com [Wed, 25 Mar 2020 23:41:50 +0000 (23:41 +0000)]
Use JSC::EnsureStillAliveScope RAII object in the generated bindings code
https://bugs.webkit.org/show_bug.cgi?id=209552

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Add method to EnsureStillAliveScope to retrieve its internal JSValue.

* runtime/JSCJSValue.h:
(JSC::EnsureStillAliveScope::value const):

Source/WebCore:

Use JSC::EnsureStillAliveScope RAII object in the generated bindings code
instead of explicit ensureStillAlive() calls. This makes the bindings
generator code simpler and results in nicer generated code too.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
(GenerateWriteBarriersForArguments):
(GenerateImplementationFunctionCall):
(GenerateEnsureStillAliveCallsForArguments): Deleted.
* bindings/scripts/test/JS/JSMapLike.cpp:
(WebCore::jsMapLikePrototypeFunctionGetBody):
(WebCore::jsMapLikePrototypeFunctionHasBody):
(WebCore::jsMapLikePrototypeFunctionForEachBody):
(WebCore::jsMapLikePrototypeFunctionSetBody):
(WebCore::jsMapLikePrototypeFunctionDeleteBody):
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
(WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
* bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
(WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
* bindings/scripts/test/JS/JSSetLike.cpp:
(WebCore::jsSetLikePrototypeFunctionHasBody):
(WebCore::jsSetLikePrototypeFunctionForEachBody):
(WebCore::jsSetLikePrototypeFunctionAddBody):
(WebCore::jsSetLikePrototypeFunctionDeleteBody):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body):
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
(WebCore::jsTestDOMJITPrototypeFunctionItemBody):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
* bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
(WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItemBody):
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
(WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
(WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::construct):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
(WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
(WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::construct):
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
(WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
(WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
(WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
(WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
(WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::construct):
(WebCore::callJSTestObj1):
(WebCore::callJSTestObj2):
(WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
(WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
(WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
(WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
(WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
(WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
(WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
(WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
(WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
(WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
(WebCore::jsTestObjPrototypeFunctionConvert1Body):
(WebCore::jsTestObjPrototypeFunctionConvert2Body):
(WebCore::jsTestObjPrototypeFunctionConvert3Body):
(WebCore::jsTestObjPrototypeFunctionConvert4Body):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
(WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
(WebCore::jsTestObjPrototypeFunctionAnyBody):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
(WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
(WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
(WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
(WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
(WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
(WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
(WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::constructJSTestOverloadedConstructorsWithSequence1):
(WebCore::constructJSTestOverloadedConstructorsWithSequence2):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
(WebCore::JSTestPromiseRejectionEventConstructor::construct):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::construct):
(WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
(WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
(WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):

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

4 months agoUnreviewed, fix the watchOS build after r259008
wenson_hsieh@apple.com [Wed, 25 Mar 2020 23:26:37 +0000 (23:26 +0000)]
Unreviewed, fix the watchOS build after r259008

Put a call to Pasteboard::nameOfDragPasteboard behind ENABLE(DRAG_SUPPORT); additionally, update an out-of-date
comment to reflect the fact that arbitrary UIPasteboards can be converted to a list of NSItemProviders, whose
data can be traversed in fidelity order.

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::respectsUTIFidelities const):

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

4 months ago[Timeline] A better default get label function, which fit the assumpation the label...
zhifei_fang@apple.com [Wed, 25 Mar 2020 23:19:32 +0000 (23:19 +0000)]
[Timeline] A better default get label function, which fit the assumpation the label is always a string
https://bugs.webkit.org/show_bug.cgi?id=209567

Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

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

4 months ago[PlayStation] Specify a 16 KB minimum page size
chris.reid@sony.com [Wed, 25 Mar 2020 23:19:01 +0000 (23:19 +0000)]
[PlayStation] Specify a 16 KB minimum page size
https://bugs.webkit.org/show_bug.cgi?id=209566

Reviewed by Ross Kirsling.

* wtf/PageBlock.h:

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

4 months ago[Timeline] Fix the out of bound dot index
zhifei_fang@apple.com [Wed, 25 Mar 2020 23:05:41 +0000 (23:05 +0000)]
[Timeline] Fix the out of bound dot index
https://bugs.webkit.org/show_bug.cgi?id=209492

Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
(Timeline.CanvasSeriesComponent):

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

4 months agoRemove unused suspend functions in CrossThreadTaskHandler
sihui_liu@apple.com [Wed, 25 Mar 2020 22:53:10 +0000 (22:53 +0000)]
Remove unused suspend functions in CrossThreadTaskHandler
https://bugs.webkit.org/show_bug.cgi?id=209553

Reviewed by Geoffrey Garen.

* wtf/CrossThreadTaskHandler.cpp:
(WTF::CrossThreadTaskHandler::taskRunLoop):
(WTF::CrossThreadTaskHandler::suspendAndWait): Deleted.
(WTF::CrossThreadTaskHandler::resume): Deleted.
* wtf/CrossThreadTaskHandler.h:

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

4 months agoFlashing and partly visible elements
simon.fraser@apple.com [Wed, 25 Mar 2020 22:28:41 +0000 (22:28 +0000)]
Flashing and partly visible elements
https://bugs.webkit.org/show_bug.cgi?id=204605

Reviewed by Zalan Bujtas.

Source/WebCore:

If, during a compositing update, a layer becomes non-composited, then we repaint its
location in its new target compositing layer. However, that layer might be in the list
of BackingSharingState's layers that may paint into backing provided by some ancestor,
so they'd be in a limbo state where their repaint target was unknown. We'd erroneously
repaint in some ancestor, resulting in missing content.

Fix by having BackingSharingState track a set of layers that can't be repainted currently
because their ancestor chain contains a maybe-sharing layer, and repaint them when
the backing sharing state is resolved.

This is only an issue during RenderLayerCompositor::computeCompositingRequirements()
when the backing sharing state is being computed, so most repaints are not affected.

Test: compositing/shared-backing/repaint-into-shared-backing.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::BackingSharingState::isPotentialBackingSharingLayer const):
(WebCore::RenderLayerCompositor::BackingSharingState::addLayerNeedingRepaint):
(WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::issuePendingRepaints):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::updateLayerCompositingState):
(WebCore::RenderLayerCompositor::layerRepaintTargetsBackingSharingLayer const):
* rendering/RenderLayerCompositor.h:

LayoutTests:

* compositing/shared-backing/repaint-into-shared-backing-expected.html: Added.
* compositing/shared-backing/repaint-into-shared-backing.html: Added.

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

4 months agoElement context character rects may be in wrong coordinate system
dbates@webkit.org [Wed, 25 Mar 2020 21:56:03 +0000 (21:56 +0000)]
Element context character rects may be in wrong coordinate system
https://bugs.webkit.org/show_bug.cgi?id=209493
<rdar://problem/60840261>

Reviewed by Wenson Hsieh.

Source/WebKit:

Convert the character rects from content view coordinates to root view coordinates
as that is the coordinate system callers of -requestDocumentContext expect.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDocumentEditingContext):

Tools:

Add some tests.

* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):

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

4 months agoUnreviewed, add new committer to contributors.json
dougk@apple.com [Wed, 25 Mar 2020 21:36:05 +0000 (21:36 +0000)]
Unreviewed, add new committer to contributors.json

* Scripts/webkitpy/common/config/contributors.json:

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

4 months ago[ Mac wk2 ] svg/as-image/svg-image-with-data-uri-background.html is flaky failing.
lawrence.j@apple.com [Wed, 25 Mar 2020 21:27:07 +0000 (21:27 +0000)]
[ Mac wk2 ] svg/as-image/svg-image-with-data-uri-background.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209564

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 months agoEvent listeners registered with 'once' option may get garbage collected too soon
cdumez@apple.com [Wed, 25 Mar 2020 21:16:13 +0000 (21:16 +0000)]
Event listeners registered with 'once' option may get garbage collected too soon
https://bugs.webkit.org/show_bug.cgi?id=209504
<rdar://problem/60541567>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Add EnsureStillAliveScope RAII object for ensureStillAliveHere().

* runtime/JSCJSValue.h:
(JSC::EnsureStillAliveScope::EnsureStillAliveScope):
(JSC::EnsureStillAliveScope::~EnsureStillAliveScope):

Source/WebCore:

In EventTarget::innerInvokeEventListeners, if the listener we're about to call is a one-time
listener (has 'once' flag set), we would first unregister the event listener and then call
it, as per the DOM specification. However, once unregistered, the event listener is no longer
visited for GC purposes and its internal JS Function may get garbage collected before we get
a chance to call it.

To address the issue, we now make sure the JS Function (and its wrapper) stay alive for the
duration of the scope using ensureStillAliveHere().

Test: http/tests/inspector/network/har/har-page-aggressive-gc.html

* bindings/js/JSEventListener.h:
* dom/EventListener.h:
(WebCore::EventListener::jsFunction const):
(WebCore::EventListener::wrapper const):
* dom/EventTarget.cpp:
(WebCore::EventTarget::innerInvokeEventListeners):

LayoutTests:

Add layout test coverage.

* http/tests/inspector/network/har/har-page-aggressive-gc-expected.txt: Added.
* http/tests/inspector/network/har/har-page-aggressive-gc.html: Added.
* platform/gtk/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:

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

4 months agoRename "data interaction pasteboard" to "drag and drop pasteboard"
wenson_hsieh@apple.com [Wed, 25 Mar 2020 21:13:55 +0000 (21:13 +0000)]
Rename "data interaction pasteboard" to "drag and drop pasteboard"
https://bugs.webkit.org/show_bug.cgi?id=209556

Reviewed by Tim Horton.

Source/WebCore:

"Data interaction" is an obsolete term for drag and drop on iOS, and was meant only to be used early on in
development. Replace this with the more descriptive name "drag and drop pasteboard", and additionally hide the
name behind a Cocoa-only Pasteboard helper method so that each call site won't need to repeat the string.

* platform/Pasteboard.h:
* platform/cocoa/DragDataCocoa.mm:
(WebCore::DragData::DragData):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::nameOfDragPasteboard):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::Pasteboard::respectsUTIFidelities const):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::PlatformPasteboard):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::nameOfDragPasteboard):

Source/WebKit:

Adopt Pasteboard::nameOfDragPasteboard instead of the literal string "data interaction pasteboard".

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidUpdate:]):
(-[WKContentView dropInteraction:sessionDidExit:]):
(-[WKContentView dropInteraction:performDrop:]):

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

4 months ago[ Mac wk1] ASSERTION FAILED: m_wrapper under WebCore::XMLHttpRequestUpload::dispatchP...
lawrence.j@apple.com [Wed, 25 Mar 2020 20:48:55 +0000 (20:48 +0000)]
[ Mac wk1] ASSERTION FAILED: m_wrapper under WebCore::XMLHttpRequestUpload::dispatchProgressEvent
https://bugs.webkit.org/show_bug.cgi?id=209560

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 months agoUnprefix -webkit-text-orientation
commit-queue@webkit.org [Wed, 25 Mar 2020 20:12:54 +0000 (20:12 +0000)]
Unprefix -webkit-text-orientation
https://bugs.webkit.org/show_bug.cgi?id=196139

Source/WebCore:

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-25
Reviewed by Myles C. Maxfield

In order to unprefix -webkit-text-orientation to be text-orientation,
a new property, "text-orientation" is added to CSSProperties.json.
I didn't use alias because the prefixed version still supports non-standard values,
and we want the unprefixed version to strictly follow the specs.
However only adding a new property is not enough because -webkit-text-orientation
is a high-priority property, and without extra logic, the CSS property
"last-one-wins" ordering rule cannot be enforced because high-priority properties
are applied to elements in the order they appear in the generated CSSPropertyNames.cpp file.
Therefore a codegen flag, "related-property" is added to both
-webkit-text-orientation and text-orientation to point to each other,
so that when applying high priorities, the algorithm will know that the
two properties are modifying the same style of the element (in our case, text orientation)
and thus the CSS property "last-one-wins" ordering rule will take effect.

This code change also helps future developments when we want to unprefix other high-priority properties.

Tests: fast/text/orientation-inheritance.html
       fast/text/orientation-mixed-unprefix.html
       fast/text/orientation-sideways-prefix-unprefix.html
       fast/text/orientation-sideways-unprefix.html
       fast/text/orientation-upright-unprefix.html
       fast/text/test-orientation-parsing-001.html
       fast/text/text-orientation-parse-competition.html
       fast/text/text-orientation-parse.html
       imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001.html

* css/CSSComputedStyleDeclaration.cpp:
    - added support for parsing "text-orientation"
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
    - added a new RenderStyle, CSSPropertyTextOrientation
* css/CSSProperties.json:
    - added a new codegen property, "related-property"
* css/makeprop.pl:
    - added new rules for generating code to parse related properties
(addProperty):
    - inserts new rule in the generated code to parse related properties
* css/parser/CSSParserFastPaths.cpp:
    - Specified the CSS property values that the unprefixed "text-orientation" can take
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
    - Only supports the standard values for text-orientation
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
    - Added switch case value CSSPropertyTextOrientation
* css/parser/CSSParserImpl.cpp:
    - Added rules to treat related properties differently
(WebCore::filterProperties):
    - For related rules that are also high priority,
      if we saw one in the property list, we will mark all the related property
      as seen, in order to enforce the "last-one-wins" ordering rule
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueTextOrientation):
    - added functionality to parse the newly added "text-orientation" property

Tools:

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-25
Reviewed by Myles C. Maxfield.

This change is made to add the extra flag "related-property" in CSSProperty.json
in the jsonchecker so that the jsonchecker would not complain about unrecognized key

* Scripts/webkitpy/style/checkers/jsonchecker.py: added check for related-property
(JSONCSSPropertiesChecker.check_codegen_properties):

LayoutTests:

Added test cases to check that Webkit can now parse text-orientation correctly,
as well as that the precedence rule for CSS property still applies when both
-webkit-text-orientation and text-orientation property are present, the second
one takes precedence.

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-25
Reviewed by Myles C. Maxfield

* fast/text/orientation-inheritance-expected.html: Added.
* fast/text/orientation-inheritance.html: Added.
* fast/text/orientation-mixed-unprefix-expected.html: Added.
* fast/text/orientation-mixed-unprefix.html: Added.
* fast/text/orientation-sideways-prefix-unprefix-expected.html: Added.
* fast/text/orientation-sideways-prefix-unprefix.html: Added.
* fast/text/orientation-sideways-unprefix-expected.html: Added.
* fast/text/orientation-sideways-unprefix.html: Added.
* fast/text/orientation-upright-unprefix-expected.html: Added.
* fast/text/orientation-upright-unprefix.html: Added.
* fast/text/test-orientation-parsing-001-expected.txt: Added.
* fast/text/test-orientation-parsing-001.html: Added.
* fast/text/text-orientation-parse-competition-expected.txt: Added.
* fast/text/text-orientation-parse-competition.html: Added.
* fast/text/text-orientation-parse-expected.txt: Added.
* fast/text/text-orientation-parse.html: Added.
* fast/text/text-orientation-parse-stylesheet-expected.txt: Added.
* fast/text/text-orientation-parse-stylesheet.html: Added.

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

4 months agoSome WKWebView.h header doc cleanup.
beidson@apple.com [Wed, 25 Mar 2020 20:02:59 +0000 (20:02 +0000)]
Some WKWebView.h header doc cleanup.
https://bugs.webkit.org/show_bug.cgi?id=209549

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.h:

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

4 months agoAdd ref test for apple pay button corner radius change
nmouchtaris@apple.com [Wed, 25 Mar 2020 19:49:39 +0000 (19:49 +0000)]
Add ref test for apple pay button corner radius change
https://bugs.webkit.org/show_bug.cgi?id=208959

Reviewed by Andy Estes.

Add ref test to check that providing a border-radius does not result in rendering
a default apple pay button.

* http/tests/ssl/applepay/ApplePayButtonCornerRadius-expected-mismatch.html: Added.
* http/tests/ssl/applepay/ApplePayButtonCornerRadius.html: Added.

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

4 months agoLayout Test fast/images/async-image-multiple-clients-repaint.html is flaky
said@apple.com [Wed, 25 Mar 2020 19:29:30 +0000 (19:29 +0000)]
Layout Test fast/images/async-image-multiple-clients-repaint.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=202328
<rdar://problem/54325032>

Unreviewed test gardening.

Put the skip statement for this test back in mac-wk1/TestExpectations
since <rdar://problem/42625657> has not been fixed yet.

* platform/mac-wk1/TestExpectations:

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

4 months agoRemove CompositingChangeRepaint which was always CompositingChangeRepaintNow
simon.fraser@apple.com [Wed, 25 Mar 2020 18:34:21 +0000 (18:34 +0000)]
Remove CompositingChangeRepaint which was always CompositingChangeRepaintNow
https://bugs.webkit.org/show_bug.cgi?id=209551

Reviewed by Zalan Bujtas.

All callers to updateBacking() passed CompositingChangeRepaintNow, so remove this argument
and the enum.

No behavior change.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::updateLayerCompositingState):
* rendering/RenderLayerCompositor.h:

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

4 months ago[ews] commit-queue should comment on bug if it fails to find any modified ChangeLog
aakash_jain@apple.com [Wed, 25 Mar 2020 18:24:31 +0000 (18:24 +0000)]
[ews] commit-queue should comment on bug if it fails to find any modified ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=209550

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(FindModifiedChangeLogs): Set haltOnFailure to false.
(FindModifiedChangeLogs.getResultSummary):
(FindModifiedChangeLogs.evaluateCommand): Add build steps to comment on bug and set cq- on patch appropriately.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.

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

4 months agoUnreviewed build fix for GTK.
svillar@igalia.com [Wed, 25 Mar 2020 18:11:47 +0000 (18:11 +0000)]
Unreviewed build fix for GTK.

In wkb.ug/209536 we replaced ENABLE_WEBGL by ENABLE_WEBXR for cmake
builds. We just forgot to do it the same for derived sources.

* Sources.txt: replaced ENABLE_WEBGL by ENABLE_WEBXR.

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

4 months ago[ews] status-bubble should link to buildbot queue while waiting in queue
aakash_jain@apple.com [Wed, 25 Mar 2020 18:08:01 +0000 (18:08 +0000)]
[ews] status-bubble should link to buildbot queue while waiting in queue
https://bugs.webkit.org/show_bug.cgi?id=209543

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._build_bubble): Link to buildbot queue whil patch is waiting in queue.
* BuildSlaveSupport/ews-app/ews/common/buildbot.py:
(Buildbot.update_icons_for_queues_mapping): Generate the mapping for shortname to full queue name.

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

4 months ago[ iOS ] http/tests/cache-storage/page-cache-domcache-pending-promise.html is flaky...
jacob_uphoff@apple.com [Wed, 25 Mar 2020 17:37:04 +0000 (17:37 +0000)]
[ iOS ] http/tests/cache-storage/page-cache-domcache-pending-promise.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209514

Fixing expectations.

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months agoRemove newline that I accidentally added in r258989.
dbates@webkit.org [Wed, 25 Mar 2020 17:32:07 +0000 (17:32 +0000)]
Remove newline that I accidentally added in r258989.

* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

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

4 months agoAvoid logging sensitive information for all network sessions
bfulgham@apple.com [Wed, 25 Mar 2020 17:27:01 +0000 (17:27 +0000)]
Avoid logging sensitive information for all network sessions
https://bugs.webkit.org/show_bug.cgi?id=209522
<rdar://problem/54807157>

Reviewed by Alex Christensen.

We avoid logging sensitive information (such as visited URLs) on production builds and for ephemeral sessions.

We should also avoid such logging for engineering and prerelease builds to reduce the possibility of any
personally identifiable information being retained in logs.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForSessionID): Deny senstive logging for all sessions.

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

4 months agoLayout Test fast/images/async-image-multiple-clients-repaint.html is flaky
said@apple.com [Wed, 25 Mar 2020 17:15:12 +0000 (17:15 +0000)]
Layout Test fast/images/async-image-multiple-clients-repaint.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=202328
<rdar://problem/54325032>

Unreviewed test gardening.

Remove flaky expectation for this test since it has been passing on all
Mac and iOS platforms. Make the iOS expected result the same for the
device and for the simulator.

* platform/ios-simulator/fast/images: Removed.
* platform/ios/TestExpectations:
* platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt: Added.
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

4 months agoFix build after https://trac.webkit.org/changeset/258977/webkit
youenn@apple.com [Wed, 25 Mar 2020 17:05:23 +0000 (17:05 +0000)]
Fix build after https://trac.webkit.org/changeset/258977/webkit
https://bugs.webkit.org/show_bug.cgi?id=209545

Unreviewed.

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

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

4 months agoLayoutTests/imported/w3c:
commit-queue@webkit.org [Wed, 25 Mar 2020 17:03:50 +0000 (17:03 +0000)]
LayoutTests/imported/w3c:
WebKit uses Alphabetic Baseline when "-webkit-text-orientation" is "mixed" in Vertical Writing Mode
https://bugs.webkit.org/show_bug.cgi?id=208824

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-25
Reviewed by Myles C. Maxfield.

Those -expected.txt files need to be updated since previously they are expecting
failures, but after the code change those failures are actually passing, so the
expected.txt files need to be updated.

* web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-008-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-container-baseline-001-expected.txt:

Source/WebCore:
WebKit uses Alphabetic Baseline when "-webkit-text-orientation" is "mixed" in Vertical Writing Mode
https://bugs.webkit.org/show_bug.cgi?id=208824

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-25
Reviewed by Myles C. Maxfield.

According to the CSS documentation, https://drafts.csswg.org/css-writing-modes/#text-orientation and
https://drafts.csswg.org/css-writing-modes/#text-baselines "In vertical typographic mode,
the central baseline is used as the dominant baseline when text-orientation is mixed or upright.
Otherwise the alphabetic baseline is used."

However, InlineFlowBox::requiresIdeographicsBaseline returns true only when text orientation is
"upright", meaning it applies the same baseline for mixed and sideways text orientation.
Therefore, a new clause is added to check if text-orientation is "mixed"

Currently in our implementation, text orientation is determinted by the following:
        - mixed:    FontDescription returns Vertical   and   nonCJKGlyphOrientation returns Mixed
        - upright:  FontDescription returns Vertical   and   nonCJKGlyphOrientation returns Upright
        - sideways: FontDescription returns Horizontal and   nonCJKGlyphOrientation returns Mixed
Original code only checks if FontDescription returns Vertical and nonCJKGlyphOrientation returns Mixed, which
is only checking if text orientation is "upright", and returns true for requiresIdeographicBaseline, treating
"mixed" and "sideways" the same, requesting alphabetic baseline, which is incorrect.

Therefore, to correct this bahavior, change the code so that requiresIdeographicsBaseline returns true either
when text-orientation is "mixed" or "upright". Equivalently, we return true when FontDescription returns Vertical
false otherwise.

Test: imported/w3c/web-platform-tests/css/css-writing-modes/

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::requiresIdeographicBaseline const):

LayoutTests:
WebKit uses Alphabetic Baseline when "-webkit-text-orientation" is "mixed" in Vertical Writing Mode
https://bugs.webkit.org/show_bug.cgi?id=208824

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-25
Reviewed by Myles C. Maxfield.

Fixed errors in existing test files and expected results regarding
baseline alignment. This baseline alignment bug is probably in the codebase
for a long time, and all the following tests are based on
two incorrect behaviors within WebKit, which is
   1) WebKit cannot parse "text-orientation" since it's not supported yet,
   2) WebKit doesn't distinguish "mixed" and "sideways" when selecting baselines,
so both orientations alphabetic baseline is selected. Therefore, for those test
cases, the expected files are actually reflecting the behavior of
"sideways" instead of "mixed". Now after this patch, "mixed" now
selects ideographic baseline, which will cause the tests to fail,
so I added "-webkit-text-orientation: sideways" to these tests, and
I also created new tests to cover "mixed" text orientation.

* editing/selection/vertical-rl-rtl-extend-line-backward-br.html:
* editing/selection/vertical-rl-rtl-extend-line-backward-p.html:
* editing/selection/vertical-rl-rtl-extend-line-forward-br.html:
* editing/selection/vertical-rl-rtl-extend-line-forward-p.html:
* fast/backgrounds/background-leakage-transforms.html:
* fast/css/vertical-text-overflow-ellipsis-text-align-center.html:
* fast/css/vertical-text-overflow-ellipsis-text-align-justify.html:
* fast/css/vertical-text-overflow-ellipsis-text-align-left.html:
* fast/css/vertical-text-overflow-ellipsis-text-align-right.html:
* fast/html/details-marker-style.html:
* fast/html/details-writing-mode.html:
* fast/inline-block/baseline-vertical-01-expected.html:
* fast/inline-block/baseline-vertical-01.html:
* fast/inline-block/baseline-vertical-02-expected.html:
* fast/inline-block/baseline-vertical-02.html:
* fast/inline-block/baseline-vertical-03-expected.html:
* fast/inline-block/baseline-vertical-03.html:
* fast/inline-block/baseline-vertical-04-expected.html:
* fast/inline-block/baseline-vertical-04.html:
* fast/inline-block/baseline-vertical-05-expected.html:
* fast/inline-block/baseline-vertical-05.html:
* fast/inline-block/baseline-vertical-06-expected.html:
* fast/inline-block/baseline-vertical-06.html:
* fast/inline-block/baseline-vertical-07-expected.html:
* fast/inline-block/baseline-vertical-07.html:
* fast/inline-block/baseline-vertical-08-expected.html:
* fast/inline-block/baseline-vertical-08.html:
* fast/lists/003-vertical.html:
* fast/lists/009-vertical.html:
* fast/multicol/tall-image-behavior-lr.html:
* fast/multicol/vertical-rl/rule-style.html:
* fast/ruby/overhang-vertical-no-overlap2.html:
* fast/ruby/overhang-vertical.html:
* fast/text/vertical-rl-rtl-linebreak.html:
* fast/writing-mode/background-vertical-lr.html:
* fast/writing-mode/background-vertical-rl.html:
* fast/writing-mode/basic-vertical-line.html:
* fast/writing-mode/border-image-vertical-lr.html:
* fast/writing-mode/border-image-vertical-rl.html:
* fast/writing-mode/border-styles-vertical-lr.html:
* fast/writing-mode/border-styles-vertical-rl.html:
* fast/writing-mode/vertical-lr-replaced-selection.html:
* fast/writing-mode/vertical-rl-replaced-selection.html:
* platform/ios/media/track/track-cue-rendering-vertical-expected.txt:
* platform/mac/fast/ruby/bopomofo-expected.txt:
* platform/mac/fast/ruby/bopomofo-letter-spacing-expected.txt:
* platform/mac/fast/ruby/bopomofo-rl-expected.txt:
* platform/mac/fast/text/orientation-sideways-expected.png: Removed.
* platform/mac/fast/writing-mode/text-orientation-basic-expected.txt:
* platform/mac/fast/writing-mode/vertical-baseline-alignment-expected.txt:
* platform/win/fast/ruby/bopomofo-expected.txt:
* platform/win/fast/ruby/bopomofo-letter-spacing-expected.txt:
* platform/win/fast/ruby/bopomofo-rl-expected.txt:
* platform/win/fast/writing-mode/text-orientation-basic-expected.txt:
* platform/win/fast/writing-mode/vertical-align-table-baseline-expected.txt:
* platform/win/fast/writing-mode/vertical-baseline-alignment-expected.txt:
* platform/win/fast/css/vertical-text-overflow-ellipsis-text-align-center-mixed-expected.txt: Added.
* platform/win/fast/css/vertical-text-overflow-ellipsis-text-align-justify-mixed-expected.txt: Added.
* platform/win/fast/css/vertical-text-overflow-ellipsis-text-align-left-mixed-expected.txt: Added.
* platform/win/fast/css/vertical-text-overflow-ellipsis-text-align-right-mixed-expected.txt: Added.
* platform/win/fast/html/details-marker-style-mixed-expected.txt: Added.
* platform/win/fast/html/details-writing-mode-mixed-expected.txt: Added.
* platform/win/fast/multicol/tall-image-behavior-lr-mixed-expected.txt: Added.
* platform/win/fast/ruby/bopomofo-mixed-expected.txt: Added.
* platform/win/fast/text/vertical-rl-rtl-linebreak-mixed-expected.txt: Added.
* platform/win/fast/writing-mode/vertical-baseline-alignment-mixed-expected.txt: Added.
* platform/win/fast/writing-mode/vertical-lr-replaced-selection-mixed-expected.txt: Added.
* platform/win/fast/writing-mode/vertical-rl-replaced-selection-mixed-expected.txt: Added.
* printing/resources/iframe-subframe-vertical-rl.html:
* editing/selection/vertical-rl-rtl-extend-line-backward-br-mixed-expected.txt: Added.
* editing/selection/vertical-rl-rtl-extend-line-backward-br-mixed.html: Added.
* editing/selection/vertical-rl-rtl-extend-line-backward-p-mixed-expected.txt: Added.
* editing/selection/vertical-rl-rtl-extend-line-backward-p-mixed.html: Added.
* editing/selection/vertical-rl-rtl-extend-line-forward-br-mixed-expected.txt: Added.
* editing/selection/vertical-rl-rtl-extend-line-forward-br-mixed.html: Added.
* editing/selection/vertical-rl-rtl-extend-line-forward-p-mixed-expected.txt: Added.
* editing/selection/vertical-rl-rtl-extend-line-forward-p-mixed.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-center-mixed-expected.txt: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-center-mixed.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-justify-mixed-expected.txt: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-justify-mixed.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-left-mixed-expected.txt: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-left-mixed.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-right-mixed-expected.txt: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-right-mixed.html: Added.
* fast/html/details-marker-style-mixed-expected.txt: Added.
* fast/html/details-marker-style-mixed.html: Added.
* fast/html/details-writing-mode-mixed-expected.txt: Added.
* fast/html/details-writing-mode-mixed.html: Added.
* fast/multicol/tall-image-behavior-lr-mixed-expected.txt: Added.
* fast/multicol/tall-image-behavior-lr-mixed.html: Added.
* fast/ruby/bopomofo-mixed-expected.txt: Added.
* fast/ruby/bopomofo-mixed.html: Added.
* fast/ruby/overhang-vertical-mixed-expected.txt: Added.
* fast/ruby/overhang-vertical-mixed.html: Added.
* fast/ruby/overhang-vertical-no-overlap2-mixed-expected.txt: Added.
* fast/ruby/overhang-vertical-no-overlap2-mixed.html: Added.
* fast/text/vertical-rl-rtl-linebreak-mixed-expected.txt: Added.
* fast/text/vertical-rl-rtl-linebreak-mixed.html: Added.
* fast/writing-mode/background-vertical-lr-mixed-expected.txt: Added.
* fast/writing-mode/background-vertical-lr-mixed.html: Added.
* fast/writing-mode/background-vertical-rl-mixed-expected.txt: Added.
* fast/writing-mode/background-vertical-rl-mixed.html: Added.
* fast/writing-mode/basic-vertical-line-mixed-expected.txt: Added.
* fast/writing-mode/basic-vertical-line-mixed.html: Added.
* fast/writing-mode/border-styles-vertical-lr-mixed-expected.txt: Added.
* fast/writing-mode/border-styles-vertical-lr-mixed.html: Added.
* fast/writing-mode/border-styles-vertical-rl-mixed-expected.txt: Added.
* fast/writing-mode/border-styles-vertical-rl-mixed.html: Added.
* fast/writing-mode/vertical-baseline-alignment-mixed-expected.txt: Added.
* fast/writing-mode/vertical-baseline-alignment-mixed.html: Added.
* fast/writing-mode/vertical-lr-replaced-selection-mixed-expected.txt: Added.
* fast/writing-mode/vertical-lr-replaced-selection-mixed.html: Added.
* fast/writing-mode/vertical-rl-replaced-selection-mixed-expected.txt: Added.
* fast/writing-mode/vertical-rl-replaced-selection-mixed.html: Added.
* LayoutTests/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

4 months ago[iOS] ASSERTION FAILURE: !isMissingPostLayoutData in WebKit::EditorState::postLayoutD...
dbates@webkit.org [Wed, 25 Mar 2020 16:50:27 +0000 (16:50 +0000)]
[iOS] ASSERTION FAILURE: !isMissingPostLayoutData in WebKit::EditorState::postLayoutData()
https://bugs.webkit.org/show_bug.cgi?id=199960
<rdar://problem/53323966>

Reviewed by Simon Fraser.

Source/WebKit:

Refactor the computation of editor state so that we can request that a layout be performed
each time we compute the editor state as part of asking the UI process to interpret a key
event. The full (read: after layout) editor state is needed for UIKit to perform a deletion
because UIKit wants to know how many characters are before the selection. Otherwise, we hit
an assert due to the fact the last editor state sent (when the Web process asked the UI process
to interpret the key) is missing layout data.

The refactoring also moves the Cocoa-common code out of the platform-independent WebPage.cpp
file into WebPageCocoa.mm.

One side effect of the refactoring is that we no longer allow the platformEditorState() function
to override the isMissingPostLayoutData bit. Currently it can even though the calling code, the
platform independent code (PIE) in WebPage, may have attached layout data. Now the PIE code sets
this bit if it attached layout data and the platformEditorState() function only attaches more
layout data if that bit is set. platformEditorState() never unsets that bit (i.e. sets isMissingPostLayoutData
to true).

The patch also removes m_isEditorStateMissingPostLayoutData in WebPage.h. This instance variable
has been unused since <https://trac.webkit.org/changeset/221064/webkit>. Also we haven't been using
IncludePostLayoutDataHint::No since the last reference to it was removed in <https://trac.webkit.org/changeset/244494/webkit>.

I also renamed platformEditorState() to getPlatformEditorState() since it has an out argument.

Test: editing/deleting/ios/backspace-last-character.html

* Shared/EditorState.h:
* UIProcess/API/glib/WebKitEditorState.cpp:
(webkitEditorStateCreate): Initialize _WebKitEditorStatePrivate::typingAttributes to WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::getPlatformEditorStateCommon const): Added. Moved Cocoa-common code from WebPage.cpp to here.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState const): Move Cocoa-common code to WebPageCocoa.mm. Change enum to
track whether a layout should be performed. Keep the current behavior of only including post layout
data if the frame view does not need a layout. This behavior is encoded in the enumerator ShouldPerformLayout::Default.
which is the default argument value for the argument shouldPerformLayout.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::platformNeedsLayoutForEditorState const): Added. Non-Cocoa port implementation
that returns false.
* WebProcess/WebPage/glib/WebPageGLib.cpp:
(WebKit::WebPage::getPlatformEditorState const): Early return if isMissingPostLayoutData is true.
(WebKit::WebPage::platformEditorState const): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformNeedsLayoutForEditorState const): Added. Keep the current behavior of
performing a layout if we have a composition or a hardware keyboard is attached.
(WebKit::WebPage::getPlatformEditorState const): Call platformEditorStateCommon(). Bail out early
if isMissingPostLayoutData is true.
(WebKit::WebPage::handleEditingKeyboardEvent): The important part of this patch. Request a layout
when computing the editor state that we will send to the UI process.
(WebKit::WebPage::platformEditorState const): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getPlatformEditorState const): Call platformEditorStateCommon(). Bail out early
if isMissingPostLayoutData is true.
(WebKit::WebPage::platformEditorState const): Deleted.
* WebProcess/WebPage/playstation/WebPagePlayStation.cpp:
(WebKit::WebPage::getPlatformEditorState const): Update as needed.
(WebKit::WebPage::platformEditorState const): Deleted.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::getPlatformEditorState const): Update as needed.
(WebKit::WebPage::platformEditorState const): Deleted.

LayoutTests:

Add a test to ensure we do not assert when using the software keyboard to type a character
into a <textarea> and then delete it.

* TestExpectations: Skip tests in editing/deleting/ios on all platforms.
* editing/deleting/ios/backspace-last-character-expected.txt: Added.
* editing/deleting/ios/backspace-last-character.html: Added.
* platform/ios/TestExpectations: Unskip tests in editing/deleting/ios on iOS.

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

4 months agoUse ENABLE_WEBXR to guard WebXR IDL files in CMakeLists.txt
svillar@igalia.com [Wed, 25 Mar 2020 16:32:00 +0000 (16:32 +0000)]
Use ENABLE_WEBXR to guard WebXR IDL files in CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=209536

Reviewed by Darin Adler.

* CMakeLists.txt: replaced ENABLE_WEBGL by ENABLE_WEBXR.

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

4 months agoApp-bound domain checks should provide more debugging details at script evaluation...
katherine_cheney@apple.com [Wed, 25 Mar 2020 16:29:54 +0000 (16:29 +0000)]
App-bound domain checks should provide more debugging details at script evaluation sites
https://bugs.webkit.org/show_bug.cgi?id=209521
<rdar://problem/60837954>

Reviewed by Chris Dumez.

Source/WebCore:

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
Return makeUnexpected object with an error message instead of null to
provide more details as to why the executeScriptInWorld()
call was not completed. Also add console logging and release logging.

* page/Frame.cpp:
(WebCore::Frame::injectUserScriptImmediately):
There is no option to return an exception here, so this patch adds
console logging and release logging.

Source/WebKit:

Return an exception because that option is available here, and also add
console and release logging for consistency across app-bound domain checks.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScript):

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

4 months agoREGRESSION (r251385): box-shadow interferes with backdrop-filter
simon.fraser@apple.com [Wed, 25 Mar 2020 16:19:00 +0000 (16:19 +0000)]
REGRESSION (r251385): box-shadow interferes with backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=208070
<rdar://problem/59683152>

Reviewed by Dean Jackson.

Source/WebCore:

updateClippingStrategy() compares the rounded rect passed in with the geometry
of the first layer argument, so the rect needs to have a zero origin. We do
the same computation in GraphicsLayerCA::updateContentsRects().

Test: compositing/filters/backdrop-filter-rect.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateBackdropFiltersRect):

LayoutTests:

* compositing/filters/backdrop-filter-rect-expected.html: Added.
* compositing/filters/backdrop-filter-rect.html: Added.

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

4 months agoBump opus to M82
youenn@apple.com [Wed, 25 Mar 2020 15:59:15 +0000 (15:59 +0000)]
Bump opus to M82
https://bugs.webkit.org/show_bug.cgi?id=209540

Reviewed by Eric Carlson.

* Source/third_party/opus: Updated.

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

4 months agoBump libyuv to M82
youenn@apple.com [Wed, 25 Mar 2020 15:57:54 +0000 (15:57 +0000)]
Bump libyuv to M82
https://bugs.webkit.org/show_bug.cgi?id=209539

Reviewed by Eric Carlson.

* Source/third_party/libyuv: Updated.

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

4 months agoBump rnnoise to M82
youenn@apple.com [Wed, 25 Mar 2020 15:53:05 +0000 (15:53 +0000)]
Bump rnnoise to M82
https://bugs.webkit.org/show_bug.cgi?id=209541

Reviewed by Eric Carlson.

* CMakeLists.txt:
* Source/third_party/rnnoise: Updated.
* libwebrtc.xcodeproj/project.pbxproj:

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

4 months ago[ios] svg/custom/object-sizing-explicit-width.xhtml is flaky failure
tsavell@apple.com [Wed, 25 Mar 2020 15:20:05 +0000 (15:20 +0000)]
[ios] svg/custom/object-sizing-explicit-width.xhtml is flaky failure
https://bugs.webkit.org/show_bug.cgi?id=209544

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months agoAvoid querying pasteboard strings while dragging content over a potential drop target
wenson_hsieh@apple.com [Wed, 25 Mar 2020 15:05:52 +0000 (15:05 +0000)]
Avoid querying pasteboard strings while dragging content over a potential drop target
https://bugs.webkit.org/show_bug.cgi?id=209531

Reviewed by Tim Horton and Ryosuke Niwa.

Source/WebCore:

A couple of places in WebCore currently use PasteboardStrategy::stringForType() to query for pasteboard URL
strings. These call sites attempt to read URL strings (using both readString and stringForType) for the purposes
of checking whether or not we should avoid exposing the URL string to web content (note that in the case of
containsPlainText, we actually check whether or not the string is empty, which depends on whether or not the
string is safe to expose to the web -- e.g., not a file URL).

This is incompatible with some changes in the near future which will prevent the web content process from
reading any data from the pasteboard, if a paste or drop action has not yet been performed. To address this
issue, we introduce an alternate PasteboardStrategy method, containsStringSafeForDOMToReadForType, which returns
(for a given platform pasteboard type) whether or not a string that can be safely exposed to bindings exists.

Rather than allow the web process to read the entire string, limit it to just this true/false answer.

* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/cocoa/DragDataCocoa.mm:
(WebCore::DragData::containsPlainText const):

Use containsStringSafeForDOMToReadForType instead of stringForType.

* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::fileContentState):

Use containsStringSafeForDOMToReadForType instead of readString.

* platform/cocoa/PlatformPasteboardCocoa.mm:
(WebCore::PlatformPasteboard::containsStringSafeForDOMToReadForType const):

Source/WebKit:

Add PasteboardStrategy and WebPasteboardProxy (IPC) plumbing; see WebCore for more details.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::containsStringSafeForDOMToReadForType):
* UIProcess/WebPasteboardProxy.cpp:
(WebKit::WebPasteboardProxy::containsStringSafeForDOMToReadForType):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::containsStringSafeForDOMToReadForType):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

Add PasteboardStrategy plumbing; see WebCore for more details.

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::containsStringSafeForDOMToReadForType):

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

4 months ago[GTK] Gardening, update TestExpectations
dpino@igalia.com [Wed, 25 Mar 2020 14:05:23 +0000 (14:05 +0000)]
[GTK] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=209534

Unreviewed gardening.

Gardening of flaky tests and of tests that are failing in the EWS bot
but not in the test bot.

* platform/gtk/TestExpectations:

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

4 months ago[GTK] Add user agent quirk for auth.mayohr.com
commit-queue@webkit.org [Wed, 25 Mar 2020 13:54:14 +0000 (13:54 +0000)]
[GTK] Add user agent quirk for auth.mayohr.com
https://bugs.webkit.org/show_bug.cgi?id=209378

Patch by Ting-Wei Lan <lantw44@gmail.com> on 2020-03-25
Reviewed by Michael Catanzaro.

Source/WebCore:

This site blocks the login page completely and asks the user to download
Google Chrome when using our standard user agent. It only blocks the
login page. After logging in, it works fine without user agent quirks.

Note that it is required to hide Version/X from the user agent string
for the site to recognize it as a valid Chrome user agent. Since Chrome
itself does not use Version/X, it should be safe to modify the existing
quirk instead of adding a new one to handle it.

* platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresNoSafariVersion):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
* platform/UserAgentQuirks.h:
* platform/glib/UserAgentGLib.cpp:
(WebCore::buildUserAgentString):

Tools:

* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::assertUserAgentForURLHasNoSafariVersionQuirk):
(TestWebKitAPI::TEST):

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

4 months agoAudio fails to capture stream in WebRTC if AudioSession gets interrupted
youenn@apple.com [Wed, 25 Mar 2020 13:44:17 +0000 (13:44 +0000)]
Audio fails to capture stream in WebRTC if AudioSession gets interrupted
https://bugs.webkit.org/show_bug.cgi?id=208516
<rdar://problem/60020467>

Reviewed by Eric Carlson.

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

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

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

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

Manually tested.

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

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

4 months ago\b escapes inside character classes should be valid in Unicode patterns
shvaikalesh@gmail.com [Wed, 25 Mar 2020 11:11:47 +0000 (11:11 +0000)]
\b escapes inside character classes should be valid in Unicode patterns
https://bugs.webkit.org/show_bug.cgi?id=209528

Reviewed by Darin Adler.

JSTests:

* test262/expectations.yaml: Mark 2 test cases as passing.

Source/JavaScriptCore:

This change removes isIdentityEscapeAnError('b') check, allowing \b escapes
inside character classes in Unicode patterns match U+0008 (BACKSPACE) characters,
aligning JSC with V8 and SpiderMonkey.

Grammar: https://tc39.es/ecma262/#prod-ClassEscape
('b' comes before CharacterEscape :: IdentityEscape)

* yarr/YarrParser.h:
(JSC::Yarr::Parser::parseEscape):

LayoutTests:

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:

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

4 months ago[GStreamer] Remove noisy warning about broken LC support
cturner@igalia.com [Wed, 25 Mar 2020 10:19:09 +0000 (10:19 +0000)]
[GStreamer] Remove noisy warning about broken LC support
https://bugs.webkit.org/show_bug.cgi?id=209472

Reviewed by Philippe Normand.

* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::initializeGStreamer): There's no seemingly nice way of
ensuring this message is issued once in WebKit the
lifetime. Issuing multiple times is upsetting users. We can't rely
on Gst logging at this point, and there's no established story of
using the LOG_CHANNEL stuff on WPE/GTK ports for suppressible
WebKit message AFAICT.

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

4 months agoUnreviewed, reverting r258945.
dbates@webkit.org [Wed, 25 Mar 2020 06:00:23 +0000 (06:00 +0000)]
Unreviewed, reverting r258945.

Revert change that broke API tests while I investigate
offline.

Reverted changeset:

"Element context character rects may be in wrong coordinate
system"
https://bugs.webkit.org/show_bug.cgi?id=209493
https://trac.webkit.org/changeset/258945

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

4 months agoUnreviewed, skips a test for iOS
jiewen_tan@apple.com [Wed, 25 Mar 2020 05:55:45 +0000 (05:55 +0000)]
Unreviewed, skips a test for iOS

* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

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

4 months agoAvoid multiple unnecessary updates of the IsolatedTree.
andresg_22@apple.com [Wed, 25 Mar 2020 03:48:33 +0000 (03:48 +0000)]
Avoid multiple unnecessary updates of the IsolatedTree.
https://bugs.webkit.org/show_bug.cgi?id=209409

Reviewed by Chris Fleizach.

AXObjectCache::notificationPostTimerFired was updating the isolated tree
in every single notification, causing a big performance hit.
This change filters out repeated notifications for the same node, thus
reducing significantly the number of times the isolated tree is updated.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::postNotification):
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::generateIsolatedTree):
(WebCore::AXObjectCache::updateIsolatedTree):
(WebCore::appendIfNotContainsMatching): Helper function that might be
added to WTF::Vector.
(WebCore::createIsolatedTreeHierarchy): Became AXIsolatedTree::createSubtree
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityObjectInterface.h:
(WebCore::AXCoreObject::childrenIDs):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::removeTreeForPageID):
(WebCore::AXIsolatedTree::generateSubtree):
(WebCore::AXIsolatedTree::createSubtree):
(WebCore::AXIsolatedTree::updateNode): Updates only the given node.
(WebCore::AXIsolatedTree::updateSubtree): Recreates the entire subtree.
(WebCore::AXIsolatedTree::updateChildren): Updates the associated object,
recreating only the children that are added and removing the ones that
are no longer present in the AX tree.
(WebCore::AXIsolatedTree::removeNode):
(WebCore::AXIsolatedTree::removeSubtree):
(WebCore::AXIsolatedTree::appendNodeChanges):
(WebCore::AXIsolatedTree::applyPendingChanges):
* accessibility/isolatedtree/AXIsolatedTree.h:

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

4 months agoBuild fix for deprecated DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection
wilander@apple.com [Wed, 25 Mar 2020 03:31:27 +0000 (03:31 +0000)]
Build fix for deprecated DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection
https://bugs.webkit.org/show_bug.cgi?id=209530
<rdar://problem/60855794>

Unreviewed build fix. Solution suggested by Darin Adler.

* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
    Use of DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection put between
    ALLOW_DEPRECATED_DECLARATIONS_BEGIN and ALLOW_DEPRECATED_DECLARATIONS_END.
(WebCore::ServicesOverlayController::buildSelectionHighlight):
    Use of DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection put between
    ALLOW_DEPRECATED_DECLARATIONS_BEGIN and ALLOW_DEPRECATED_DECLARATIONS_END.

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

4 months agoRefactor ResourceLoadStatisticsStore::registrableDomainsToDeleteOrRestrictWebsiteData...
wilander@apple.com [Wed, 25 Mar 2020 03:21:25 +0000 (03:21 +0000)]
Refactor ResourceLoadStatisticsStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor() to return a struct instead of a Vector of pairs
https://bugs.webkit.org/show_bug.cgi?id=209463
<rdar://problem/60808759>

Reviewed by Alex Christensen.

This change does three things:

1. Replaces the Vector<std::pair<RegistrableDomain, WebsiteDataToRemove>> with a new struct called
RegistrableDomainsToDeleteOrRestrictWebsiteDataFor for sending around which domains to delete website data for.

2. Removes the enum WebsiteDataToRemove, replacing its structure with the members of the above mentioned struct:
- domainsToDeleteAllCookiesFor
- domainsToDeleteAllButHttpOnlyCookiesFor
- domainsToDeleteAllNonCookieWebsiteDataFor

3. Consistently renames "domainsToDeleteFor" to "domainsToDeleteOrRestrictFor" in preparation for website data
policies that are not about deletion, see for instance recently landed https://trac.webkit.org/changeset/258884.

No new tests. No changed functionality. This code is covered by several existing tests.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor):
(WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToRemoveWebsiteDataFor): Deleted.
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::domainsToString):
(WebKit::ResourceLoadStatisticsStore::removeDataRecords):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomains): Deleted.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
(WebKit::RegistrableDomainsToDeleteOrRestrictWebsiteDataFor::isolatedCopy const):
(WebKit::RegistrableDomainsToDeleteOrRestrictWebsiteDataFor::isEmpty const):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::deleteCookiesForTesting):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkSession::deleteWebsiteDataForRegistrableDomains): Deleted.
* NetworkProcess/NetworkSession.h:

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

4 months agoIntroduce @tryGetByIdWithWellKnownSymbol instead of repurposing @tryGetById itself
ross.kirsling@sony.com [Wed, 25 Mar 2020 02:07:38 +0000 (02:07 +0000)]
Introduce @tryGetByIdWithWellKnownSymbol instead of repurposing @tryGetById itself
https://bugs.webkit.org/show_bug.cgi?id=209524

Reviewed by Saam Barati and Yusuke Suzuki.

r258865 allowed @tryGetById to take any ResolveNode, such that a built-in could pass a well-known symbol.
This is much more permissive than necessary, since we shouldn't really need a ResolveNode in the first place;
instead, let's make a new bytecode intrinsic function @tryGetByIdWithWellKnownSymbol for this purpose.

* builtins/RegExpPrototype.js:
(globalPrivate.hasObservableSideEffectsForRegExpSplit):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emit_intrinsic_tryGetById): Revert change from r258865.
(JSC::BytecodeIntrinsicNode::emit_intrinsic_tryGetByIdWithWellKnownSymbol): Added.

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

4 months ago[MultiColumn] Infinite recursion in RenderBlockFlow::relayoutToAvoidWidows
zalan@apple.com [Wed, 25 Mar 2020 01:46:09 +0000 (01:46 +0000)]
[MultiColumn] Infinite recursion in RenderBlockFlow::relayoutToAvoidWidows
https://bugs.webkit.org/show_bug.cgi?id=209527
<rdar://problem/56993589>

Reviewed by Simon Fraser.

Source/WebCore:

This patch expands on r204980. This is yet another case when we can't possibly accommodate widows in the current column.

Test: fast/multicol/page-cant-accommodate-widow-crash.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):

LayoutTests:

* fast/multicol/page-cant-accommodate-widow-crash-expected.txt: Added.
* fast/multicol/page-cant-accommodate-widow-crash.html: Added.

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

4 months agoRename DragDataMac and DragImageMac to DragDataCocoa and DragImageCocoa
wenson_hsieh@apple.com [Wed, 25 Mar 2020 01:22:03 +0000 (01:22 +0000)]
Rename DragDataMac and DragImageMac to DragDataCocoa and DragImageCocoa
https://bugs.webkit.org/show_bug.cgi?id=209523

Reviewed by Megan Gardner.

Rename DragDataMac to DragDataCocoa, and DragImageMac to DragImageCocoa. These files contain logic relevant to
both macOS and iOS, and as such, belong in platform/cocoa rather than platform/mac.

No change in behavior.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/DragDataCocoa.mm: Renamed from Source/WebCore/platform/mac/DragDataMac.mm.
(WebCore::rtfPasteboardType):
(WebCore::rtfdPasteboardType):
(WebCore::stringPasteboardType):
(WebCore::urlPasteboardType):
(WebCore::htmlPasteboardType):
(WebCore::colorPasteboardType):
(WebCore::pdfPasteboardType):
(WebCore::tiffPasteboardType):
(WebCore::DragData::DragData):
(WebCore::DragData::containsURLTypeIdentifier const):
(WebCore::DragData::canSmartReplace const):
(WebCore::DragData::containsColor const):
(WebCore::DragData::containsFiles const):
(WebCore::DragData::numberOfFiles const):
(WebCore::DragData::asFilenames const):
(WebCore::DragData::containsPlainText const):
(WebCore::DragData::asPlainText const):
(WebCore::DragData::asColor const):
(WebCore::DragData::containsCompatibleContent const):
(WebCore::DragData::containsPromise const):
(WebCore::DragData::containsURL const):
(WebCore::DragData::asURL const):
* platform/cocoa/DragImageCocoa.mm: Renamed from Source/WebCore/platform/mac/DragImageMac.mm.
(WebCore::dragImageSize):
(WebCore::deleteDragImage):
(WebCore::scaleDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
(WebCore::createDragImageIconForCachedImageFilename):
(WebCore::dragOffsetForLinkDragImage):
(WebCore::anchorPointForLinkDragImage):
(WebCore::LinkImageLayout::LinkImageLayout):
(WebCore::createDragImageForLink):
(WebCore::createDragImageForColor):
* platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:

Unrelated build fix due to changing unified sources.

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

4 months agoLLIntGenerator must link switch jumps to otherwise redundant labels
tzagallo@apple.com [Wed, 25 Mar 2020 00:51:44 +0000 (00:51 +0000)]
LLIntGenerator must link switch jumps to otherwise redundant labels
https://bugs.webkit.org/show_bug.cgi?id=209333
<rdar://problem/60827987>

Reviewed by Saam Barati.

JSTests:

* wasm/stress/terminal-jump-switch-target.js: Added.

Source/JavaScriptCore:

The LLIntGenerator optimizes jumps at the end of blocks. It does so when a block ends, by checking if
the last instruction emitted was a jump, if it pointed to the end of the current block and if it was
the only jump that pointed there. If all those conditions are satisfied, the jump is removed and it's
not necessary to emit the label at the end of block, since the only jump that pointed to it was removed.
However, switches (br_table) are handled specially by the LLIntGenerator and therefore are not counted
in Label::unresolvedJumps, which was used to check whether we could skip emitting the label.
The end result is that we might skip linking a switch jump if it points to a block that ends with a jump.

* wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):
(JSC::Wasm::LLIntGenerator::linkSwitchTargets):
(JSC::GenericLabel<Wasm::GeneratorTraits>::setLocation):

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

4 months agoMemory::fastMappedBytes() is wrong
sbarati@apple.com [Wed, 25 Mar 2020 00:27:56 +0000 (00:27 +0000)]
Memory::fastMappedBytes() is wrong
https://bugs.webkit.org/show_bug.cgi?id=209488

Reviewed by Mark Lam.

* wasm/WasmMemory.cpp:
(JSC::Wasm::Memory::fastMappedBytes):

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

4 months agoUpdate test262 to commit dfc7ecc6785e
shvaikalesh@gmail.com [Wed, 25 Mar 2020 00:20:06 +0000 (00:20 +0000)]
Update test262 to commit dfc7ecc6785e
https://bugs.webkit.org/show_bug.cgi?id=209449

Unreviewed test gardening.

* test262/expectations.yaml:
* test262/harness/propertyHelper.js:
* test262/latest-changes-summary.txt:
* test262/test/*: Updated.
* test262/test262-Revision.txt:

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

4 months agoREGRESSION(r258314): Leak in MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuf...
jer.noble@apple.com [Wed, 25 Mar 2020 00:18:10 +0000 (00:18 +0000)]
REGRESSION(r258314): Leak in MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer()
https://bugs.webkit.org/show_bug.cgi?id=209519

Reviewed by Eric Carlson.

Obey the "copy" rule and adopt the results of -copyPixelBufferForSourceTime:sourceTimeForDisplay:.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer):

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

4 months ago[WebAuthn] Customize a bit more on the macOS LocalAuthentication prompt
jiewen_tan@apple.com [Wed, 25 Mar 2020 00:03:19 +0000 (00:03 +0000)]
[WebAuthn] Customize a bit more on the macOS LocalAuthentication prompt
https://bugs.webkit.org/show_bug.cgi?id=208703
<rdar://problem/60136974>

Reviewed by Brent Fulgham.

Part 2.

This patch adds a different LocalAuthentication prompt title for getAssertion.
It also polishes the text used for makeCredential.

Besides that, it also enhances the iOS title strings.

Source/WebCore:

* en.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::getAssertionTouchIDPromptTitle):
* platform/LocalizedStrings.h:

Source/WebKit:

* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::continueMakeCredentialAfterDecidePolicy):
(WebKit::LocalAuthenticator::continueGetAssertionAfterResponseSelected):
* UIProcess/WebAuthentication/Cocoa/LocalConnection.h:
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::verifyUser const):
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::verifyUser const):

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

4 months ago[ macOS ] fast/images/slower-decoding-than-animation-image.html is flaky failing
said@apple.com [Wed, 25 Mar 2020 00:02:05 +0000 (00:02 +0000)]
[ macOS ] fast/images/slower-decoding-than-animation-image.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207859

Unreviewed tiny follow-up to make the test more reliable on slow bots.

* fast/images/slower-decoding-than-animation-image-expected.txt:
* fast/images/slower-decoding-than-animation-image.html:

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

4 months agoFunction passed to addEventListener may get garbage collected before the event listen...
cdumez@apple.com [Wed, 25 Mar 2020 00:01:27 +0000 (00:01 +0000)]
Function passed to addEventListener may get garbage collected before the event listener is even added
https://bugs.webkit.org/show_bug.cgi?id=209445

Reviewed by Yusuke Suzuki.

Function passed to addEventListener may get garbage collected before the event listener is even added.
The issue is that the JS bindings for addEventListener() would first create a JSEventListener to store
the JSC Function that was passed in and then add this JSEventListener as an event listener on the
EventTarget. The JSC function held by JSEventListener is supposed to get visited by
JSEventListener::visitJSFunction() which gets called by EventTarget::visitJSEventListeners() which
gets called every time an EventTarget wrapper gets visited. The issue is that when the JSEventListener
gets created, the JSEventListener is not yet connected to its EventTarget and thus
EventTarget::visitJSEventListeners() would not visit it. However, the constructor of JSEventListener
would issue a write barrier on that JSC Function.

Several changes were made to address this issue in the generated bindings:
1. We now create a local variable (named argumentX, X being argument index) for each argument that gets
   passed in to an operation
2. At the end of the operation implementation, we call ensureStillAliveHere() on each JSValue argument
   to make sure they stay alive until the end of the operation
3. For EventListeners / EventHandlers, we also issue a write barrier at the end of the operation
   implementation, when it is safe to do so. Now that we do this here in the bindings, I dropped the
   code in the JSEventListener constructor to issue the write barrier (as this was too early).

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/scripts/CodeGeneratorJS.pm:
(GetOperationReturnedParameterName):
(GenerateAttributeSetterBodyDefinition):
(GenerateParametersCheck):
(GenerateEnsureStillAliveCallsForArguments):
(GenerateImplementationFunctionCall):
* bindings/scripts/test/JS/JSMapLike.cpp:
(WebCore::jsMapLikePrototypeFunctionGetBody):
(WebCore::jsMapLikePrototypeFunctionHasBody):
(WebCore::jsMapLikePrototypeFunctionEntriesBody):
(WebCore::jsMapLikePrototypeFunctionKeysBody):
(WebCore::jsMapLikePrototypeFunctionValuesBody):
(WebCore::jsMapLikePrototypeFunctionForEachBody):
(WebCore::jsMapLikePrototypeFunctionSetBody):
(WebCore::jsMapLikePrototypeFunctionDeleteBody):
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
(WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionEntriesBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionKeysBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionValuesBody):
(WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
* bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
(WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionEntriesBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionKeysBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionValuesBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
* bindings/scripts/test/JS/JSSetLike.cpp:
(WebCore::jsSetLikePrototypeFunctionHasBody):
(WebCore::jsSetLikePrototypeFunctionEntriesBody):
(WebCore::jsSetLikePrototypeFunctionKeysBody):
(WebCore::jsSetLikePrototypeFunctionValuesBody):
(WebCore::jsSetLikePrototypeFunctionForEachBody):
(WebCore::jsSetLikePrototypeFunctionAddBody):
(WebCore::jsSetLikePrototypeFunctionDeleteBody):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body):
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
(WebCore::jsTestCEReactionsStringifierPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
(WebCore::jsTestDOMJITPrototypeFunctionItemBody):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttributeBody):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
* bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
(WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItemBody):
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
(WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
(WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::construct):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
(WebCore::jsTestInterfacePrototypeFunctionTakeNodesBody):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
(WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
(WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::construct):
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
(WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
(WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
(WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
(WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
(WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
(WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::construct):
(WebCore::callJSTestObj1):
(WebCore::callJSTestObj2):
(WebCore::setJSTestObjOnfooSetter):
(WebCore::setJSTestObjOnwebkitfooSetter):
(WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
(WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
(WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
(WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
(WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionByteMethodBody):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionOctetMethodBody):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionLongMethodBody):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
(WebCore::jsTestObjPrototypeFunctionObjMethodBody):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
(WebCore::jsTestObjInstanceFunctionUnforgeableMethodBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
(WebCore::jsTestObjPrototypeFunctionNullableStringMethodBody):
(WebCore::jsTestObjConstructorFunctionNullableStringStaticMethodBody):
(WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLongBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectBody):
(WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
(WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
(WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
(WebCore::jsTestObjPrototypeFunctionWithExecStateObjBody):
(WebCore::jsTestObjPrototypeFunctionWithExecStateObjExceptionBody):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjExceptionBody):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpacesBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
(WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
(WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocumentBody):
(WebCore::jsTestObjPrototypeFunctionConvert1Body):
(WebCore::jsTestObjPrototypeFunctionConvert2Body):
(WebCore::jsTestObjPrototypeFunctionConvert3Body):
(WebCore::jsTestObjPrototypeFunctionConvert4Body):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunctionBody):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
(WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
(WebCore::jsTestObjPrototypeFunctionAnyBody):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
(WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody):
(WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
(WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
(WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
(WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
(WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
(WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
(WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
(WebCore::jsTestObjPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::constructJSTestOverloadedConstructorsWithSequence1):
(WebCore::constructJSTestOverloadedConstructorsWithSequence2):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
(WebCore::JSTestPromiseRejectionEventConstructor::construct):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturningBody):
* bindings/scripts/test/JS/JSTestStringifier.cpp:
(WebCore::jsTestStringifierPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
(WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
(WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifierBody):
(WebCore::jsTestStringifierNamedOperationPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
(WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifierBody):
(WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
(WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
(WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
(WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToStringBody):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::construct):
(WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
(WebCore::jsTestTypedefsPrototypeFunctionPointFunctionBody):
(WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
(WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):

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

4 months agoIgnore in-app browser privacy checks for apps with com.apple.private.applemediaservic...
katherine_cheney@apple.com [Tue, 24 Mar 2020 23:51:04 +0000 (23:51 +0000)]
Ignore in-app browser privacy checks for apps with com.apple.private.applemediaservices entitlement
https://bugs.webkit.org/show_bug.cgi?id=209509
<rdar://problem/60750956>

Reviewed by Brent Fulgham.

* UIProcess/WebPageProxy.cpp:
(WebKit::m_ignoresAppBoundDomains):
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
* UIProcess/WebPageProxy.h:

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

4 months agoAdd console message when legacy TLS is used
commit-queue@webkit.org [Tue, 24 Mar 2020 23:33:58 +0000 (23:33 +0000)]
Add console message when legacy TLS is used
https://bugs.webkit.org/show_bug.cgi?id=209444

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

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse):
Indent less, add host to inspector, add release logging without host.

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

4 months agoresults.webkit.org: Documentation for uncollapsed failure endpoints is wrong
jbedard@apple.com [Tue, 24 Mar 2020 23:27:48 +0000 (23:27 +0000)]
results.webkit.org: Documentation for uncollapsed failure endpoints is wrong
https://bugs.webkit.org/show_bug.cgi?id=209496

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/templates/documentation.html:

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

4 months ago[ iOS ] http/tests/security/cookies/third-party-cookie-blocking.html is flaky timing out
jacob_uphoff@apple.com [Tue, 24 Mar 2020 23:17:09 +0000 (23:17 +0000)]
[ iOS ] http/tests/security/cookies/third-party-cookie-blocking.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209517

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months ago[ iOS wk2 ] http/wpt/fetch/dnt-header-after-redirection.html is flaky timing out.
lawrence.j@apple.com [Tue, 24 Mar 2020 23:07:01 +0000 (23:07 +0000)]
[ iOS wk2 ] http/wpt/fetch/dnt-header-after-redirection.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209520

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months agoFix isEmpty AssemblyHelpers function and add isNotEmpty
keith_miller@apple.com [Tue, 24 Mar 2020 22:53:03 +0000 (22:53 +0000)]
Fix isEmpty AssemblyHelpers function and add isNotEmpty
https://bugs.webkit.org/show_bug.cgi?id=209507

Reviewed by Saam Barati.

This fixes the 32 version of my HasIndexedProperty patch as well
as properly names the functions for what they do.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::isEmpty):
(JSC::AssemblyHelpers::isNotEmpty):

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

4 months agoresults.webkit.org: Filter suite results by expectation by default
jbedard@apple.com [Tue, 24 Mar 2020 22:52:04 +0000 (22:52 +0000)]
results.webkit.org: Filter suite results by expectation by default
https://bugs.webkit.org/show_bug.cgi?id=209500

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/timeline.js: Allow the Legend constructor
to set a willFilterExpected default.
* resultsdbpy/resultsdbpy/view/templates/suite_results.html:

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

4 months ago[ iOS ] http/tests/cache-storage/page-cache-domcache-pending-promise.html is flaky...
jacob_uphoff@apple.com [Tue, 24 Mar 2020 22:42:48 +0000 (22:42 +0000)]
[ iOS ] http/tests/cache-storage/page-cache-domcache-pending-promise.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209514

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months ago[Cocoa] Fix launch time regression with CF prefs direct mode enabled
pvollan@apple.com [Tue, 24 Mar 2020 22:41:13 +0000 (22:41 +0000)]
[Cocoa] Fix launch time regression with CF prefs direct mode enabled
https://bugs.webkit.org/show_bug.cgi?id=209244
Source/WebKit:

<rdar://problem/60542149>

Reviewed by Darin Adler.

When CF prefs direct mode was enabled in https://trac.webkit.org/changeset/258064/webkit, it introduced
a significant launch time regression. This patch addresses this regression. The number of observed domains
is reduced and domain observation is initiated later when Safari is first activated. Swizzling code is
removed, since that has a performance cost in the Objective-C runtime. Normal priority instead of
QOS_CLASS_BACKGROUND is used in the thread which starts the observing, since using a background priority
class can lead to priority inversion. Finally, a dictionary comparison is removed when a notification
about a preference change is received, since this check is redundant and doubles the cost of this method.

* UIProcess/Cocoa/PreferenceObserver.mm:
(-[WKPreferenceObserver init]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
* UIProcess/WebProcessPool.h:

Source/WTF:

Reviewed by Darin Adler.

Re-enable CF prefs direct mode.

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:

Tools:

Reviewed by Darin Adler.

* TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
(TEST):
(sharedInstanceMethodOverride):

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

4 months ago[ iOS wk2 ] http/tests/cache/disk-cache/disk-cache-vary-cookie-private.html is flaky...
lawrence.j@apple.com [Tue, 24 Mar 2020 22:34:20 +0000 (22:34 +0000)]
[ iOS wk2 ] http/tests/cache/disk-cache/disk-cache-vary-cookie-private.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209512

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months agoresults.webkit.org: Correct UUID capitalization in documentation
jbedard@apple.com [Tue, 24 Mar 2020 22:30:49 +0000 (22:30 +0000)]
results.webkit.org: Correct UUID capitalization in documentation
https://bugs.webkit.org/show_bug.cgi?id=209497

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/view/templates/documentation.html:

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

4 months ago[ews] commit-queue should comment on bug if it fails to create git commit
aakash_jain@apple.com [Tue, 24 Mar 2020 22:26:45 +0000 (22:26 +0000)]
[ews] commit-queue should comment on bug if it fails to create git commit
https://bugs.webkit.org/show_bug.cgi?id=209487

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(CreateLocalGITCommit):
(CreateLocalGITCommit.start):
(CreateLocalGITCommit.evaluateCommand):
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.

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

4 months agoElement context character rects may be in wrong coordinate system
dbates@webkit.org [Tue, 24 Mar 2020 22:08:58 +0000 (22:08 +0000)]
Element context character rects may be in wrong coordinate system
https://bugs.webkit.org/show_bug.cgi?id=209493
<rdar://problem/60840261>

Reviewed by Wenson Hsieh.

Source/WebKit:

Convert the character rects from content view coordinates to root view coordinates
as that is the coordinate system callers of -requestDocumentContext expect.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDocumentEditingContext):

Tools:

Add some tests.

* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):

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

4 months ago[ iOS ] REGRESSION: fast/dom/window-open-ephemeral.html is flaky timing out
jacob_uphoff@apple.com [Tue, 24 Mar 2020 22:05:53 +0000 (22:05 +0000)]
[ iOS ] REGRESSION: fast/dom/window-open-ephemeral.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209502

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months agoUpdate test262 to commit 79146e5cf48d
shvaikalesh@gmail.com [Tue, 24 Mar 2020 22:03:13 +0000 (22:03 +0000)]
Update test262 to commit 79146e5cf48d
https://bugs.webkit.org/show_bug.cgi?id=209449

Reviewed by Keith Miller.

* test262/config.yaml: Add 3 tests that timeout.
* test262/expectations.yaml:
* test262/latest-changes-summary.txt:
* test262/test/*: Updated.
* test262/test262-Revision.txt:

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

4 months ago[ Mac wk2 Debug] http/tests/referrer-policy-anchor/origin/cross-origin-http.https...
lawrence.j@apple.com [Tue, 24 Mar 2020 21:59:19 +0000 (21:59 +0000)]
[ Mac wk2 Debug] http/tests/referrer-policy-anchor/origin/cross-origin-http.https.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=209503

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 months agoUse SimpleRange in characterRectsForRange()
dbates@webkit.org [Tue, 24 Mar 2020 21:56:27 +0000 (21:56 +0000)]
Use SimpleRange in characterRectsForRange()
https://bugs.webkit.org/show_bug.cgi?id=209495

Reviewed by Darin Adler.

The function characterRectsForRange() is capable of working correctly with a SimpleRange
instead of a Range. Callers currently pass a Range. So, there is still a conversion, but
maybe someday they can pass a SimpleRange. This change is towards that future.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDocumentEditingContext):

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

4 months agoREGRESSION: [ Catalina wk1 ] storage/indexeddb/modern/abort-requests flaky crashing.
lawrence.j@apple.com [Tue, 24 Mar 2020 21:38:34 +0000 (21:38 +0000)]
REGRESSION: [ Catalina wk1 ] storage/indexeddb/modern/abort-requests flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=209499

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 months ago[ Mac wk1 ] fast/events/mouse-cursor-no-mousemove.html is flaky failing.
lawrence.j@apple.com [Tue, 24 Mar 2020 21:07:47 +0000 (21:07 +0000)]
[ Mac wk1 ] fast/events/mouse-cursor-no-mousemove.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209494

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 months ago[ews] position in queue shown in status-bubble is larger than actual position
aakash_jain@apple.com [Tue, 24 Mar 2020 20:36:30 +0000 (20:36 +0000)]
[ews] position in queue shown in status-bubble is larger than actual position
https://bugs.webkit.org/show_bug.cgi?id=209481

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._queue_position): Use created timestamp instead of modified.

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