WebKit-https.git
3 months ago[WHLSL] Educate the property resolver about IndexExpressions
mmaxfield@apple.com [Thu, 13 Jun 2019 03:44:24 +0000 (03:44 +0000)]
[WHLSL] Educate the property resolver about IndexExpressions
https://bugs.webkit.org/show_bug.cgi?id=198399

Unreviewed test gardening.

Failing WebGPU tests should fail instead of time out.

* webgpu/blend-color-triangle-strip.html:
* webgpu/blend-triangle-strip.html:
* webgpu/blit-commands.html:
* webgpu/buffer-command-buffer-races.html:
* webgpu/buffer-resource-triangles.html:
* webgpu/color-write-mask-triangle-strip.html:
* webgpu/depth-enabled-triangle-strip.html:
* webgpu/draw-indexed-triangles.html:
* webgpu/propertyresolver/ander-abstract-lvalue.html:
* webgpu/propertyresolver/ander-lvalue-3-levels.html:
* webgpu/propertyresolver/ander-lvalue.html:
* webgpu/propertyresolver/ander.html:
* webgpu/propertyresolver/getter.html:
* webgpu/propertyresolver/indexer-ander-abstract-lvalue.html:
* webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html:
* webgpu/propertyresolver/indexer-ander-lvalue.html:
* webgpu/propertyresolver/indexer-ander.html:
* webgpu/propertyresolver/indexer-getter.html:
* webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html:
* webgpu/propertyresolver/indexer-setter-abstract-lvalue.html:
* webgpu/propertyresolver/indexer-setter-lvalue.html:
* webgpu/propertyresolver/indexer-setter.html:
* webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html:
* webgpu/propertyresolver/setter-abstract-lvalue.html:
* webgpu/propertyresolver/setter-lvalue.html:
* webgpu/simple-triangle-strip.html:
* webgpu/texture-triangle-strip.html:
* webgpu/vertex-buffer-triangle-strip.html:
* webgpu/viewport-scissor-rect-triangle-strip.html:
* webgpu/whlsl-arbitrary-vertex-attribute-locations.html:
* webgpu/whlsl-dereference-pointer-should-type-check.html:
* webgpu/whlsl-do-while-loop-break.html:
* webgpu/whlsl-do-while-loop-continue.html:
* webgpu/whlsl-do-while-loop.html:
* webgpu/whlsl-dont-crash-parsing-enum.html:
* webgpu/whlsl-dot-expressions.html:
* webgpu/whlsl-ensure-proper-variable-lifetime-2.html:
* webgpu/whlsl-ensure-proper-variable-lifetime-3.html:
* webgpu/whlsl-ensure-proper-variable-lifetime.html:
* webgpu/whlsl-loops-break.html:
* webgpu/whlsl-loops-continue.html:
* webgpu/whlsl-loops.html:
* webgpu/whlsl-nested-dot-expression-rvalue.html:
* webgpu/whlsl-nested-loop.html:
* webgpu/whlsl-return-local-variable.html:
* webgpu/whlsl-store-to-property-updates-properly.html:
* webgpu/whlsl-while-loop-break.html:
* webgpu/whlsl-while-loop-continue.html:
* webgpu/whlsl-zero-initialize-values-2.html:
* webgpu/whlsl-zero-initialize-values.html:
* webgpu/whlsl.html:

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

3 months agopaddingBoxRect() is wrong with RTL scrollbars on the left
simon.fraser@apple.com [Thu, 13 Jun 2019 03:21:36 +0000 (03:21 +0000)]
paddingBoxRect() is wrong with RTL scrollbars on the left
https://bugs.webkit.org/show_bug.cgi?id=198816

Reviewed by Jon Lee.

Source/WebCore:

RenderBox::paddingBoxRect() needs to offset the left side of the box for the
vertical scrollbar, if it's placed on the left.

Test: compositing/geometry/rtl-overflow-scroll.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paddingBoxRect const):
* rendering/RenderBox.h:
(WebCore::RenderBox::paddingBoxRect const): Deleted.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::controlClipRect const):

LayoutTests:

* compositing/geometry/rtl-overflow-scroll-expected.html: Added.
* compositing/geometry/rtl-overflow-scroll.html: Added.

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

3 months agoUse NSURLSession for WebSocket
youenn@apple.com [Thu, 13 Jun 2019 01:04:16 +0000 (01:04 +0000)]
Use NSURLSession for WebSocket
https://bugs.webkit.org/show_bug.cgi?id=198568

Reviewed by Geoffrey Garen.

Source/WebCore:

Add a runtime flag to either choose the new WebSocket code path or the previously existing one.
The switch is done at WebSocket channel API level which offers the necessary high level API to abstract the two code paths.
By default, we continue using the current WebSocket implementation.
Covered by manual testing on current WebSocket tests.

* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::document):
* Modules/websockets/WebSocketChannel.h:
* WebCore.xcodeproj/project.pbxproj:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::isNSURLSessionWebSocketEnabled const):
(WebCore::RuntimeEnabledFeatures::setIsNSURLSessionWebSocketEnabled):
* page/SocketProvider.cpp:
(WebCore::SocketProvider::createWebSocketChannel):
* page/SocketProvider.h:

Source/WebKit:

Implement socket channel provider on WebProcess level by sending IPC to NetworkProcess.
On NetworkProcess side, use NSURLSession API to implement the WebSocket functionality.
This is a partial implementation:
- inspector integration is not working.
- some error cases are not well handled or are not producing the same error messages.
- some features are not implemented (extensions, subprotocols, handshake authentication challenge, cookie handling...).

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::createSocketChannel):
(WebKit::NetworkConnectionToWebProcess::removeSocketChannel):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::createWebSocketTask):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::removeWebSocketTask):
(WebKit::NetworkSession::addWebSocketTask):
* NetworkProcess/NetworkSocketChannel.cpp: Added.
(WebKit::NetworkSocketChannel::create):
(WebKit::NetworkSocketChannel::NetworkSocketChannel):
(WebKit::NetworkSocketChannel::~NetworkSocketChannel):
(WebKit::NetworkSocketChannel::sendString):
(WebKit::NetworkSocketChannel::sendData):
(WebKit::NetworkSocketChannel::finishClosingIfPossible):
(WebKit::NetworkSocketChannel::close):
(WebKit::NetworkSocketChannel::didConnect):
(WebKit::NetworkSocketChannel::didReceiveText):
(WebKit::NetworkSocketChannel::didReceiveBinaryData):
(WebKit::NetworkSocketChannel::didClose):
(WebKit::NetworkSocketChannel::messageSenderConnection const):
* NetworkProcess/NetworkSocketChannel.h: Added.
* NetworkProcess/NetworkSocketChannel.messages.in: Added.
* NetworkProcess/NetworkSocketStream.messages.in:
* NetworkProcess/WebSocketTask.h: Added.
(WebKit::WebSocketTask::sendString):
(WebKit::WebSocketTask::sendData):
(WebKit::WebSocketTask::close):
(WebKit::WebSocketTask::cancel):
(WebKit::WebSocketTask::resume):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate existingWebSocketTask:]):
(-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]):
(-[WKNetworkSessionDelegate URLSession:webSocketTask:didCloseWithCode:reason:]):
(WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
(WebKit::NetworkSessionCocoa::createWebSocketTask):
(WebKit::NetworkSessionCocoa::addWebSocketTask):
(WebKit::NetworkSessionCocoa::removeWebSocketTask):
(WebKit::NetworkSessionCocoa::webSocketDataTaskForIdentifier):
* NetworkProcess/cocoa/WebSocketTaskCocoa.h: Added.
* NetworkProcess/cocoa/WebSocketTaskCocoa.mm: Added.
(WebKit::WebSocketTask::WebSocketTask):
(WebKit::WebSocketTask::~WebSocketTask):
(WebKit::WebSocketTask::readNextMessage):
(WebKit::WebSocketTask::cancel):
(WebKit::WebSocketTask::resume):
(WebKit::WebSocketTask::didConnect):
(WebKit::WebSocketTask::didClose):
(WebKit::WebSocketTask::sendString):
(WebKit::WebSocketTask::sendData):
(WebKit::WebSocketTask::close):
(WebKit::WebSocketTask::identifier const):
* Shared/WebPreferences.yaml:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
* WebProcess/Network/WebSocketChannel.cpp: Added.
(WebKit::WebSocketChannel::create):
(WebKit::WebSocketChannel::WebSocketChannel):
(WebKit::WebSocketChannel::~WebSocketChannel):
(WebKit::WebSocketChannel::messageSenderConnection const):
(WebKit::WebSocketChannel::messageSenderDestinationID const):
(WebKit::WebSocketChannel::subprotocol):
(WebKit::WebSocketChannel::extensions):
(WebKit::WebSocketChannel::connect):
(WebKit::WebSocketChannel::send):
(WebKit::WebSocketChannel::bufferedAmount const):
(WebKit::WebSocketChannel::close):
(WebKit::WebSocketChannel::fail):
(WebKit::WebSocketChannel::disconnect):
(WebKit::WebSocketChannel::didConnect):
(WebKit::WebSocketChannel::didReceiveText):
(WebKit::WebSocketChannel::didReceiveBinaryData):
(WebKit::WebSocketChannel::didClose):
(WebKit::WebSocketChannel::didFail):
(WebKit::WebSocketChannel::networkProcessCrashed):
* WebProcess/Network/WebSocketChannel.h: Added.
* WebProcess/Network/WebSocketChannel.messages.in: Added.
* WebProcess/Network/WebSocketChannelManager.cpp: Added.
(WebKit::WebSocketChannelManager::createWebSocketChannel):
(WebKit::WebSocketChannelManager::networkProcessCrashed):
(WebKit::WebSocketChannelManager::didReceiveMessage):
* WebProcess/Network/WebSocketChannelManager.h: Added.
* WebProcess/Network/WebSocketProvider.cpp:
(WebKit::WebSocketProvider::createWebSocketChannel):
* WebProcess/Network/WebSocketProvider.h:
* WebProcess/Network/WebSocketStream.cpp:
* WebProcess/Network/WebSocketStream.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::webSocketChannelManager):

Source/WTF:

* wtf/Platform.h:
Introduce compile flag for WebSocket NSURLSession

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

3 months ago[High Sierra / Mojave Debug WK2] Layout Test media/video-restricted-invisible-autopla...
eric.carlson@apple.com [Thu, 13 Jun 2019 00:02:17 +0000 (00:02 +0000)]
[High Sierra / Mojave Debug WK2] Layout Test media/video-restricted-invisible-autoplay-allowed-when-visible.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=190885
<rdar://problem/45590590>

Reviewed by Youenn Fablet.

* media/video-restricted-invisible-autoplay-allowed-when-visible.html: Increase the amount of
 time it takes for the test to fail so it isn't flaky on slow machines.

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

3 months ago[iOS] Adjust tests platform/ipad/fast/forms/{select-form-run-twice, unfocus-inside...
dbates@webkit.org [Wed, 12 Jun 2019 23:07:57 +0000 (23:07 +0000)]
[iOS] Adjust tests platform/ipad/fast/forms/{select-form-run-twice, unfocus-inside-fixed-hittest}.html following r243808
https://bugs.webkit.org/show_bug.cgi?id=198799
<rdar://problem/50181023>

Reviewed by Brent Fulgham.

Following r243808 we no longer defocus a <select> on iPad when its popover is dismissed as a
result of picking a value for it. This is to make the behavior of <select> on iPad like the Mac.
However the tests platform/ipad/fast/forms/{select-form-run-twice, unfocus-inside-fixed-hittest}.html
depend on the old behavior. So, we need to update them to no longer expect a defocusing of the
<select>/the end of form control interaction.

* platform/ipad/fast/forms/select-form-run-twice.html:
* platform/ipad/fast/forms/unfocus-inside-fixed-hittest.html:

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

3 months ago[WHLSL] Educate the property resolver about IndexExpressions
mmaxfield@apple.com [Wed, 12 Jun 2019 22:59:40 +0000 (22:59 +0000)]
[WHLSL] Educate the property resolver about IndexExpressions
https://bugs.webkit.org/show_bug.cgi?id=198399

Reviewed by Saam Barati.

Source/WebCore:

This is part one of two patches which will allow buffers to work. This patch
adds support in the property resolver for index expressions. Index expressions
get turned into calls to "getter indexers", "setter indexers", or "ander
indexers". They work almost identically to dot expressions, except there is an
extra "index" expression which gets turned into an extra argument to those
functions.

There's actually a bit of a trick here. Let's say we need to run a getter and
a setter separately (e.g. "foo[3]++;"). The index expression can't be duplicated
for both the getter and the setter (e.g. the functions are
int operator[](Foo, uint) and Foo operator[]=(Foo, uint, int), and we aren't
allowed to execute the index expression multiple times. Consider if that "3"
in the example is actually "bar()" with some side effect. So, we have to run
the index expression once at the correct time, and save its result to a temporary
variable, and then pass in the temporary variable into the getter and setter.

So, if the code says "foo[bar()][baz()] = quux();" the following sequence of
functions get run:

- bar()
- operator[](Foo, uint)
- baz()
- quux()
- operator[]=(OtherType, uint, OtherOtherType)
- operator[]=(Foo, uint, OtherType)

The next patch will modify the WebGPU JavaScript implementation to send buffer
lengths to the shader, and for the shader compiler to correctly unpack this
information and place it inside the array references. That should be everything
that's needed to get buffers to work. After that, hooking up compute should be
fairly trivial.

Tests: webgpu/propertyresolver/ander-abstract-lvalue.html
       webgpu/propertyresolver/ander-lvalue-3-levels.html
       webgpu/propertyresolver/ander-lvalue.html
       webgpu/propertyresolver/ander.html
       webgpu/propertyresolver/getter.html
       webgpu/propertyresolver/indexer-ander-abstract-lvalue.html
       webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html
       webgpu/propertyresolver/indexer-ander-lvalue.html
       webgpu/propertyresolver/indexer-ander.html
       webgpu/propertyresolver/indexer-getter.html
       webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html
       webgpu/propertyresolver/indexer-setter-abstract-lvalue.html
       webgpu/propertyresolver/indexer-setter-lvalue.html
       webgpu/propertyresolver/indexer-setter.html
       webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html
       webgpu/propertyresolver/setter-abstract-lvalue.html
       webgpu/propertyresolver/setter-lvalue.html

* Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
(WebCore::WHLSL::AST::toString):
* Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
(WebCore::WHLSL::AST::toString):
* Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
(WebCore::WHLSL::AST::IndexExpression::takeIndex):
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeFunction):
(WebCore::WHLSL::Metal::convertAddressSpace): Deleted.
* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::checkOperatorOverload):
(WebCore::WHLSL::Checker::finishVisiting):
(WebCore::WHLSL::Checker::visit):
* Modules/webgpu/WHLSL/WHLSLInferTypes.h:
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
(WebCore::WHLSL::PropertyResolver::visit):
(WebCore::WHLSL::setterCall):
(WebCore::WHLSL::getterCall):
(WebCore::WHLSL::modify):
(WebCore::WHLSL::PropertyResolver::simplifyRightValue):
(WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
(WebCore::WHLSL::LeftValueSimplifier::visit):
* Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
* Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
(WebCore::WHLSL::synthesizeStructureAccessors):

LayoutTests:

* webgpu/propertyresolver/ander-abstract-lvalue-expected.html: Added.
* webgpu/propertyresolver/ander-abstract-lvalue.html: Added.
* webgpu/propertyresolver/ander-expected.html: Added.
* webgpu/propertyresolver/ander-lvalue-3-levels-expected.html: Added.
* webgpu/propertyresolver/ander-lvalue-3-levels.html: Added.
* webgpu/propertyresolver/ander-lvalue-expected.html: Added.
* webgpu/propertyresolver/ander-lvalue.html: Added.
* webgpu/propertyresolver/ander.html: Added.
* webgpu/propertyresolver/getter-expected.html: Added.
* webgpu/propertyresolver/getter.html: Added.
* webgpu/propertyresolver/indexer-ander-abstract-lvalue-expected.html: Added.
* webgpu/propertyresolver/indexer-ander-abstract-lvalue.html: Added.
* webgpu/propertyresolver/indexer-ander-expected.html: Added.
* webgpu/propertyresolver/indexer-ander-lvalue-3-levels-expected.html: Added.
* webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html: Added.
* webgpu/propertyresolver/indexer-ander-lvalue-expected.html: Added.
* webgpu/propertyresolver/indexer-ander-lvalue.html: Added.
* webgpu/propertyresolver/indexer-ander.html: Added.
* webgpu/propertyresolver/indexer-getter-expected.html: Added.
* webgpu/propertyresolver/indexer-getter.html: Added.
* webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels-expected.html: Added.
* webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html: Added.
* webgpu/propertyresolver/indexer-setter-abstract-lvalue-expected.html: Added.
* webgpu/propertyresolver/indexer-setter-abstract-lvalue.html: Added.
* webgpu/propertyresolver/indexer-setter-expected.html: Added.
* webgpu/propertyresolver/indexer-setter-lvalue-expected.html: Added.
* webgpu/propertyresolver/indexer-setter-lvalue.html: Added.
* webgpu/propertyresolver/indexer-setter.html: Added.
* webgpu/propertyresolver/setter-abstract-lvalue-3-levels-expected.html: Added.
* webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html: Added.
* webgpu/propertyresolver/setter-abstract-lvalue-expected.html: Added.
* webgpu/propertyresolver/setter-abstract-lvalue.html: Added.
* webgpu/propertyresolver/setter-lvalue-expected.html: Added.
* webgpu/propertyresolver/setter-lvalue.html: Added.

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

3 months agoWeb Inspector: artificial context menus don't work when Web Inspector is zoomed
drousso@apple.com [Wed, 12 Jun 2019 22:46:14 +0000 (22:46 +0000)]
Web Inspector: artificial context menus don't work when Web Inspector is zoomed
https://bugs.webkit.org/show_bug.cgi?id=198801

Reviewed by Joseph Pecoraro.

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
Use the `absoluteLocation` of the `MouseEvent`, which takes into account zoom and scale.

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

3 months agoAdd assertions to help debug crash at WebKit::HistoryEntryDataEncoder::operator<<
sihui_liu@apple.com [Wed, 12 Jun 2019 22:36:31 +0000 (22:36 +0000)]
Add assertions to help debug crash at WebKit::HistoryEntryDataEncoder::operator<<
https://bugs.webkit.org/show_bug.cgi?id=198766

Reviewed by Geoffrey Garen.

* Shared/SessionState.h:
(WebKit::FrameState::~FrameState):
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
(WebKit::encodeFrameStateNode):

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

3 months agoRemove dead code in user agent construction
weinig@apple.com [Wed, 12 Jun 2019 21:57:08 +0000 (21:57 +0000)]
Remove dead code in user agent construction
https://bugs.webkit.org/show_bug.cgi?id=198802

Reviewed by Anders Carlsson.

* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform const):
Drop dead architures.

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

3 months ago[GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
commit-queue@webkit.org [Wed, 12 Jun 2019 20:43:36 +0000 (20:43 +0000)]
[GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
https://bugs.webkit.org/show_bug.cgi?id=198787

Patch by Ludovico de Nittis <ludovico.denittis@collabora.com> on 2019-06-12
Reviewed by Michael Catanzaro.

Source/WebCore:

No behaviour changes.

* platform/graphics/gtk/IconGtk.cpp:
(WebCore::lookupIconName):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::loadMissingImageIconFromTheme):

Source/WebKit:

We completely remove the gtkStockIDFromContextMenuAction function in order to get rid of the stock items.
This function was used only in "createActionIfNeeded" where now we pass a nullptr as a stock_id variable.

* Shared/glib/WebContextMenuItemGlib.cpp:
(WebKit::gtkStockIDFromContextMenuAction):

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

3 months agoReplace double-quotes with single quotes in loadConfig.py
aakash_jain@apple.com [Wed, 12 Jun 2019 20:38:18 +0000 (20:38 +0000)]
Replace double-quotes with single quotes in loadConfig.py
https://bugs.webkit.org/show_bug.cgi?id=198792

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/loadConfig.py:
* BuildSlaveSupport/ews-build/steps_unittest.py:

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

3 months ago[JSC] Polymorphic call stub's slow path should restore callee saves before performing...
ysuzuki@apple.com [Wed, 12 Jun 2019 20:31:11 +0000 (20:31 +0000)]
[JSC] Polymorphic call stub's slow path should restore callee saves before performing tail call
https://bugs.webkit.org/show_bug.cgi?id=198770

Reviewed by Saam Barati.

JSTests:

* stress/poly-call-stub-slow-path-should-restore-callee-saves-when-doing-tail-call.js: Added.
(test):

Source/JavaScriptCore:

Polymorphic call stub is a bit specially patched in JS call site. Typical JS call site for tail calls
are the following.

    if (callee == patchableCallee) {
        restore callee saves for tail call
        prepare for tail call
        jump to the target function
    }
    restore callee saves for slow path
    call the slow path function

And linking patches patchableCallee, target function, and slow path function. But polymorphic call stub
patches the above `if` statement with the jump to the stub.

    jump to the polymorphic call stub

This is because polymorphic call stub wants to use CallFrameShuffler to get scratch registers. As a result,
"restore callee saves for tail call" thing needs to be done in the polymorphic call stubs. While it is
correctly done for the major cases, we have `slowPath` skips, and that path missed restoring callee saves.
This skip happens if the callee is non JSCell or non JS function, so typically, InternalFunction is handled
in that path.

This patch does that skips after restoring callee saves.

* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::CallLinkInfo):
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::setUpCall):
(JSC::CallLinkInfo::calleeGPR):
(JSC::CallLinkInfo::setCalleeGPR): Deleted.
* jit/Repatch.cpp:
(JSC::revertCall):
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
* jit/Repatch.h:
* jit/ThunkGenerators.cpp:
(JSC::virtualThunkFor):

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

3 months agoscrollbars/scrollbar-iframe-click-does-not-blur-content.html is timing out on WK1...
sroberts@apple.com [Wed, 12 Jun 2019 20:21:52 +0000 (20:21 +0000)]
scrollbars/scrollbar-iframe-click-does-not-blur-content.html is timing out on WK1 testers
https://bugs.webkit.org/show_bug.cgi?id=198800

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations: Updating expecations for test

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

3 months agoUnreviewed fix after r246360.
bfulgham@apple.com [Wed, 12 Jun 2019 19:52:48 +0000 (19:52 +0000)]
Unreviewed fix after r246360.

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

3 months agoREGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transp...
jiewen_tan@apple.com [Wed, 12 Jun 2019 19:06:16 +0000 (19:06 +0000)]
REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
https://bugs.webkit.org/show_bug.cgi?id=197917
<rdar://problem/51524958>

Reviewed by Brent Fulgham.

Source/WebKit:

This is a race condition that when a new request comes in the middle between the previous one finishes and the clearStateAsync is queued in the main thread.
Therefore, when the new request starts discovery, it will still see previous request's state.

To fix this issue, clearState() will be called unconditionally for every request. And a guard is added to clearState() to prevent double clearance.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::makeCredential):
(WebKit::AuthenticatorManager::getAssertion):
(WebKit::AuthenticatorManager::clearState):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

3 months agoUnreviewed, rolling out r246322.
commit-queue@webkit.org [Wed, 12 Jun 2019 18:40:56 +0000 (18:40 +0000)]
Unreviewed, rolling out r246322.
https://bugs.webkit.org/show_bug.cgi?id=198796

"It's a huge page load regression on iOS" (Requested by
saamyjoon on #webkit).

Reverted changeset:

"Roll out PAC cage"
https://bugs.webkit.org/show_bug.cgi?id=198726
https://trac.webkit.org/changeset/246322

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

3 months ago(Async scrolling) Handle 'position:fixed' inside 'position:sticky' correctly.
antti@apple.com [Wed, 12 Jun 2019 18:27:35 +0000 (18:27 +0000)]
(Async scrolling) Handle 'position:fixed' inside 'position:sticky' correctly.
https://bugs.webkit.org/show_bug.cgi?id=198788
<rdar://problem/51589759>

Reviewed by Simon Fraser.

Source/WebCore:

Handle 'position:fixed' inside 'position:sticky' correctly.

Also fix nested 'position:fixed' in case where there is an overflow scroller between them.

Tests: scrollingcoordinator/ios/fixed-inside-overflow-inside-fixed.html
       scrollingcoordinator/ios/fixed-inside-sticky-frame.html
       scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2.html
       scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context.html
       scrollingcoordinator/ios/fixed-inside-sticky-stacking-context.html

* page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::applyLayerPositions):

Take offsets from sticky nodes into account.

* page/scrolling/cocoa/ScrollingTreeStickyNode.h:
(WebCore::ScrollingTreeStickyNode::layer):
* page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):

Factor into a function.

(WebCore::ScrollingTreeStickyNode::applyLayerPositions):
(WebCore::ScrollingTreeStickyNode::scrollDeltaSinceLastCommit const):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):

We need to generate a scrolling tree node for position:fixed in nested case if there is an overflow scroller
between the layers.

LayoutTests:

* scrollingcoordinator/ios/fixed-inside-overflow-inside-fixed-expected.html: Added.
* scrollingcoordinator/ios/fixed-inside-overflow-inside-fixed.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-frame-expected.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-frame.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2-expected.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-expected.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-stacking-context-expected.html: Added.
* scrollingcoordinator/ios/fixed-inside-sticky-stacking-context.html: Added.

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

3 months agoUpdate WPT service workers test up to 0df7c68
youenn@apple.com [Wed, 12 Jun 2019 17:47:27 +0000 (17:47 +0000)]
Update WPT service workers test up to 0df7c68
https://bugs.webkit.org/show_bug.cgi?id=198720

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers: Resynced.

LayoutTests:

* TestExpectations:
* tests-options.json:

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

3 months agoAlso fix incorrect bug titles in ChangeLog
mcatanzaro@igalia.com [Wed, 12 Jun 2019 17:26:18 +0000 (17:26 +0000)]
Also fix incorrect bug titles in ChangeLog

There's nothing we can do to fix the old commit messages, but at least we can fix the ChangeLog.

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

3 months agoFix ChangeLog entries referencing the wrong bug and rdar
mcatanzaro@igalia.com [Wed, 12 Jun 2019 17:22:09 +0000 (17:22 +0000)]
Fix ChangeLog entries referencing the wrong bug and rdar

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

3 months agoAdd mechanism and test case to check if ITP is active
bfulgham@apple.com [Wed, 12 Jun 2019 17:18:24 +0000 (17:18 +0000)]
Add mechanism and test case to check if ITP is active
https://bugs.webkit.org/show_bug.cgi?id=198694
<rdar://problem/51557704>

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

3 months agoMake sure libwebrtc ObjC codec interfaces do not conflict
youenn@apple.com [Wed, 12 Jun 2019 16:52:34 +0000 (16:52 +0000)]
Make sure libwebrtc ObjC codec interfaces do not conflict
https://bugs.webkit.org/show_bug.cgi?id=198782
<rdar://problem/51503247>

Reviewed by Eric Carlson.

Rename some ObjC interfaces that we are now using in libwebrtc.

* Source/webrtc/sdk/objc/api/video_codec/RTCVideoDecoderVP8.h:
* Source/webrtc/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.h:
* Source/webrtc/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.h:
* libwebrtc.xcodeproj/project.pbxproj:

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

3 months agoMany layout tests are failing on iPad simulator due to unexpected viewport dimensions
wenson_hsieh@apple.com [Wed, 12 Jun 2019 16:45:39 +0000 (16:45 +0000)]
Many layout tests are failing on iPad simulator due to unexpected viewport dimensions
https://bugs.webkit.org/show_bug.cgi?id=198789
<rdar://problem/51595519>

Reviewed by Simon Fraser.

Prevent the shrink-to-fit-content timer from activating on layout tests that use the testing viewport
configuration.

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

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

3 months agoVersioning.
kocsen_chung@apple.com [Wed, 12 Jun 2019 16:29:38 +0000 (16:29 +0000)]
Versioning.

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

3 months agoUnreviewed, rolling out r246350.
tsavell@apple.com [Wed, 12 Jun 2019 16:21:20 +0000 (16:21 +0000)]
Unreviewed, rolling out r246350.

r246350 Introduced a failing and timing out test svg/clip-path
/clip-hidpi.svg

Reverted changeset:

"[cairo][SVG] Putting multiple path elements in clippath
causes rendering artifacts"
https://bugs.webkit.org/show_bug.cgi?id=198701
https://trac.webkit.org/changeset/246350

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

3 months ago[WPE][GTK] Deprecate WebSQL APIs
mcatanzaro@igalia.com [Wed, 12 Jun 2019 16:07:42 +0000 (16:07 +0000)]
[WPE][GTK] Deprecate WebSQL APIs
https://bugs.webkit.org/show_bug.cgi?id=195011

Reviewed by Carlos Garcia Campos.

Source/WebKit:

* UIProcess/API/glib/WebKitSettings.cpp:
(webkit_settings_class_init):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextConstructed):
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkitWebsiteDataManagerGetProperty):
(webkit_website_data_manager_class_init):
* UIProcess/API/gtk/WebKitWebsiteData.h:
* UIProcess/API/gtk/WebKitWebsiteDataManager.h:
* UIProcess/API/wpe/WebKitWebsiteData.h:
* UIProcess/API/wpe/WebKitWebsiteDataManager.h:

Tools:

* MiniBrowser/gtk/main.c:
(gotWebsiteDataCallback):
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):
(testWebsiteDataEphemeral):
(testWebsiteDataDatabases):

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

3 months ago[WPE][GTK] Enable hyperlink auditing
mcatanzaro@igalia.com [Wed, 12 Jun 2019 14:50:16 +0000 (14:50 +0000)]
[WPE][GTK] Enable hyperlink auditing
https://bugs.webkit.org/show_bug.cgi?id=197845

Reviewed by Carlos Garcia Campos.

Source/WebKit:

* UIProcess/API/glib/WebKitSettings.cpp:
(webkit_settings_class_init):

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings):

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

3 months ago[GTK] gtk_misc_set_alignment is deprecated since GTK 3.14
commit-queue@webkit.org [Wed, 12 Jun 2019 14:09:09 +0000 (14:09 +0000)]
[GTK] gtk_misc_set_alignment is deprecated since GTK 3.14
https://bugs.webkit.org/show_bug.cgi?id=198785

Patch by Ludovico de Nittis <ludovico.denittis@collabora.com> on 2019-06-12
Reviewed by Carlos Garcia Campos.

Replace the deprecated gtk_misc_set_alignment with halign and valign.

* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(createLabelWithLineWrap):

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

3 months ago[cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
carlosgc@webkit.org [Wed, 12 Jun 2019 13:43:37 +0000 (13:43 +0000)]
[cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
https://bugs.webkit.org/show_bug.cgi?id=198701
<rdar://problem/51620347>

Reviewed by Don Olmstead.

Source/WebCore:

We need to save the current transformation matrix at the moment the image mask is set and set it again on
restore right before applying the mask. This patch also creates a pattern for the image mask surface and set its
transformation matrix according to the mask position, so that we don't need to save the mask rectangle too.

Tests: svg/clip-path/clip-hidpi-expected.svg
       svg/clip-path/clip-hidpi.svg
       svg/clip-path/clip-opacity-translate-expected.svg
       svg/clip-path/clip-opacity-translate.svg

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::restore):
(WebCore::PlatformContextCairo::pushImageMask):

LayoutTests:

* svg/clip-path/clip-hidpi-expected.svg: Added.
* svg/clip-path/clip-hidpi.svg: Added.
* svg/clip-path/clip-opacity-translate-expected.svg: Added.
* svg/clip-path/clip-opacity-translate.svg: Added.

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

3 months ago[GTK] Some reftest fail with only one or two pixel differences in diff image
Hironori.Fujii@sony.com [Wed, 12 Jun 2019 10:39:50 +0000 (10:39 +0000)]
[GTK] Some reftest fail with only one or two pixel differences in diff image
https://bugs.webkit.org/show_bug.cgi?id=168426

Unreviewed test gardening.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:
svg/clip-path/clip-opacity.html results in 0.01% image diff. Marked it as ImageOnlyFailure of Bug 168426.

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

3 months ago[iOS] Idempotent text autosizing needs to react properly to viewport changes
wenson_hsieh@apple.com [Wed, 12 Jun 2019 04:51:10 +0000 (04:51 +0000)]
[iOS] Idempotent text autosizing needs to react properly to viewport changes
https://bugs.webkit.org/show_bug.cgi?id=198736
<rdar://problem/50591911>

Reviewed by Zalan Bujtas.

Source/WebCore:

Minor refactoring and some adjustments around StyleResolver::adjustRenderStyleForTextAutosizing. See below for
more details, as well as the WebKit ChangeLog.

Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-after-changing-initial-scale.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

Rewrite this using early return statements, to make it easier to debug why elements fall out of text autosizing.
Additionally, this function currently bails if the initial scale is exactly 1, whereas we can really avoid text
autosizing in the case where the initial scale is at least 1; handle this by making idempotentTextSize return
immediately with the specified size, in the case where the scale is at least 1.

Lastly, remove the null check for element by making this method take an Element&, and only call this from
adjustRenderStyle if the element is nonnull (which matches adjustRenderStyleForSiteSpecificQuirks).

(WebCore::StyleResolver::adjustRenderStyle):
* css/StyleResolver.h:
* rendering/style/TextSizeAdjustment.cpp:
(WebCore::AutosizeStatus::idempotentTextSize):

Source/WebKit:

If idempotent text autosizing is enabled, respond to viewport initial scale changes by forcing a style recalc,
since the amount by which idempotent text autosizing boosts font sizes depends on the Page's initial scale.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::resetIdempotentTextAutosizingIfNeeded):
(WebKit::WebPage::viewportConfigurationChanged):

LayoutTests:

Add a new layout test that programmatically adjusts the meta viewport initial scale, and dumps the resulting
computed sizes of several paragraphs of text, after adjusting for text autosizing.

* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-after-changing-initial-scale-expected.txt: Added.
* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-after-changing-initial-scale.html: Added.

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

3 months agoLayoutTests/fast/events/touch/ios/double-tap-for-double-click* test cases are failing
zalan@apple.com [Wed, 12 Jun 2019 04:13:36 +0000 (04:13 +0000)]
LayoutTests/fast/events/touch/ios/double-tap-for-double-click* test cases are failing
https://bugs.webkit.org/show_bug.cgi?id=198764
<rdar://problem/51035459>

Reviewed by Wenson Hsieh.

Source/WebKit:

This patch replaces the existing, _doubleTapGestureRecognizerForDoubleClick based double click handling with a WebProcess based implementation using
the potentialTapAtPosition/commitPotentialTap infrastructure.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::doubleTapForDoubleClickDelay):
(WebKit::PageClientImpl::doubleTapForDoubleClickRadius):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _ensureNonBlockingDoubleTapGestureRecognizer]):
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _didStartProvisionalLoadForMainFrame]):
(-[WKContentView _doubleTapForDoubleClickDelay]):
(-[WKContentView _doubleTapForDoubleClickRadius]):
(-[WKContentView _doubleTapRecognizedForDoubleClick:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::handleDoubleTapForDoubleClickAtPoint): Deleted.
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
(WebKit::WebPage::commitPotentialTap):
(WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint): Deleted.

LayoutTests:

* fast/events/touch/ios/double-tap-for-double-click1.html:
* fast/events/touch/ios/double-tap-for-double-click2.html:
* fast/events/touch/ios/double-tap-for-double-click3.html:

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

3 months agoJSC should throw if proxy set returns falsish in strict mode context
commit-queue@webkit.org [Wed, 12 Jun 2019 03:18:53 +0000 (03:18 +0000)]
JSC should throw if proxy set returns falsish in strict mode context
https://bugs.webkit.org/show_bug.cgi?id=177398

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-06-11
Reviewed by Yusuke Suzuki.

JSTests:

1. Add coverage for Proxy `set` trap returning falsy value in strict mode.
2. RegExp methods throw unless [[Set]] succeeds. Return `true` from Proxy `set` traps to fix the tests.

* stress/proxy-set.js: Add 2 test cases.
* stress/regexp-match-proxy.js: Fix test.
* stress/regexp-replace-proxy.js: Fix test.

Source/JavaScriptCore:

Throw TypeError exception if Proxy's `set` trap returns falsy value.
(step 6.c of https://tc39.es/ecma262/#sec-putvalue)

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performPut):
(JSC::ProxyObject::put):
(JSC::ProxyObject::putByIndexCommon):
* runtime/ProxyObject.h:

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

3 months ago[Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinato...
aestes@apple.com [Wed, 12 Jun 2019 03:18:25 +0000 (03:18 +0000)]
[Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinatorProxy::showPaymentUI
https://bugs.webkit.org/show_bug.cgi?id=198776
<rdar://problem/49123795>

Reviewed by Brian Weinstein.

It's possible that an active session is aborted before the completion handler passed to
platformShowPaymentUI() has executed. When that happens, m_state will be Idle even though we
assert that it is Activating. Fix this by returning early in the platformShowPaymentUI()
completion handler when m_state is Idle.

It's not possible to write a layout test for this because MockPaymentCoordinator handles
showing payment UI directly in the web process, so this code is not executed in layout
tests. The assertion can be reproduced manually by loading
https://w3c-test.org/payment-request/payment-is-showing.https.html and clicking the button.

* Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::showPaymentUI):

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

3 months ago[GTK] Fix a11y support in bubblewrap sandbox
commit-queue@webkit.org [Wed, 12 Jun 2019 02:50:48 +0000 (02:50 +0000)]
[GTK] Fix a11y support in bubblewrap sandbox
https://bugs.webkit.org/show_bug.cgi?id=198777

Patch by Patrick Griffis <pgriffis@igalia.com> on 2019-06-11
Reviewed by Michael Catanzaro.

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

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

3 months agoFlash when tapping compose button after switching to/from dark mode without restartin...
timothy@apple.com [Wed, 12 Jun 2019 00:44:40 +0000 (00:44 +0000)]
Flash when tapping compose button after switching to/from dark mode without restarting Mail.
https://bugs.webkit.org/show_bug.cgi?id=198769
rdar://problem/51370037

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Make LocalCurrentTraitCollection.h a private header.

Source/WebKit:

Accessing a dynamic color outside a normal UIView choke point without setting
UITraitCollection.currentTraitCollection first can cause undefined results.
Use LocalCurrentTraitCollection inside scrollViewBackgroundColor when accessing
the dynamic system UIColors. Also use systemBackgroundColor instead of white.

* UIProcess/API/Cocoa/WKWebView.mm:
(scrollViewBackgroundColor):

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

3 months agoIntegrate scrollbar gestures for iOS
megan_gardner@apple.com [Wed, 12 Jun 2019 00:24:09 +0000 (00:24 +0000)]
Integrate scrollbar gestures for iOS
https://bugs.webkit.org/show_bug.cgi?id=198767

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(_WKGestureRecognizerIsBuiltInScrollViewGestureRecognizer):
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):

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

3 months agoScrollbar can show as white on white in dark mode on iOS.
timothy@apple.com [Tue, 11 Jun 2019 23:55:18 +0000 (23:55 +0000)]
Scrollbar can show as white on white in dark mode on iOS.
https://bugs.webkit.org/show_bug.cgi?id=198772
rdar://problem/51516743

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]): Use UIScrollViewIndicatorStyleBlack instead
of UIScrollViewIndicatorStyleDefault to prevent getting a white scrollbar in dark mode.

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

3 months agoUnreviewed, rolling out r246320.
commit-queue@webkit.org [Tue, 11 Jun 2019 23:40:08 +0000 (23:40 +0000)]
Unreviewed, rolling out r246320.
https://bugs.webkit.org/show_bug.cgi?id=198773

New test is failing, and commit is causing another test to
fail. (Requested by ShawnRoberts on #webkit).

Reverted changeset:

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

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

3 months agoSort the computed styles list
drousso@apple.com [Tue, 11 Jun 2019 23:32:47 +0000 (23:32 +0000)]
Sort the computed styles list
https://bugs.webkit.org/show_bug.cgi?id=198743

Reviewed by Simon Fraser

LayoutTests/imported/w3c:

* web-platform-tests/infrastructure/assumptions/html-elements-expected.txt:

Source/WebCore:

* css/CSSComputedStyleDeclaration.cpp:

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/wpe/fast/css/getComputedStyle/computed-style-expected.txt:

* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/wpe/fast/css/getComputedStyle/computed-style-font-family-expected.txt:

* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/wpe/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:

* svg/css/getComputedStyle-basic-expected.txt:
* platform/gtk/svg/css/getComputedStyle-basic-expected.txt:
* platform/ios/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt:
* platform/wpe/svg/css/getComputedStyle-basic-expected.txt:

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

3 months ago[iOS] Adjust test fast/events/ios/keyup.html to ignore Shift keyups
dbates@webkit.org [Tue, 11 Jun 2019 23:00:58 +0000 (23:00 +0000)]
[iOS] Adjust test fast/events/ios/keyup.html to ignore Shift keyups
https://bugs.webkit.org/show_bug.cgi?id=198768
<rdar://problem/46082743>

Reviewed by Brent Fulgham.

Ignore Shift keyups as in the future they will be emitted. We have existing test coverage for them
currently skipped in OpenSource that will be unskipped in the future once we enable ENABLE(FULL_KEYBOARD_ACCESS).

* fast/events/ios/keyup.html:

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

3 months agoFix up test result following r245161.
dbates@webkit.org [Tue, 11 Jun 2019 22:31:00 +0000 (22:31 +0000)]
Fix up test result following r245161.
<rdar://problem/51032967>

Until we get UIKit support, almost all keys, including the numpad comma key (on JIS keyboards)
report Dead for their key property and Unidentified for their keyIdentifier property.

* fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt:

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

3 months agor246018 introduced a falkey test on WK1
tsavell@apple.com [Tue, 11 Jun 2019 21:44:36 +0000 (21:44 +0000)]
r246018 introduced a falkey test on WK1
https://bugs.webkit.org/show_bug.cgi?id=196508

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 months agoError message for non-callable Proxy `construct` trap is misleading
commit-queue@webkit.org [Tue, 11 Jun 2019 21:42:41 +0000 (21:42 +0000)]
Error message for non-callable Proxy `construct` trap is misleading
https://bugs.webkit.org/show_bug.cgi?id=198637

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-06-11
Reviewed by Saam Barati.

JSTests:

* stress/proxy-construct.js:

Source/JavaScriptCore:

Just like other traps, Proxy `construct` trap is invoked with [[Call]], not [[Construct]].

* runtime/ProxyObject.cpp:
(JSC::performProxyConstruct): Tweak error message.

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

3 months agoAI BitURShift's result should not be unsigned
tzagallo@apple.com [Tue, 11 Jun 2019 21:06:45 +0000 (21:06 +0000)]
AI BitURShift's result should not be unsigned
https://bugs.webkit.org/show_bug.cgi?id=198689
<rdar://problem/51550063>

Reviewed by Saam Barati.

JSTests:

* stress/urshift-int32-overflow.js: Added.
(foo.):
(foo):

Source/JavaScriptCore:

Treating BitURShift's result as unsigned in the abstract interpreter incorrectly overflows it.
This breaks the DFG and FTL, since they assume that BitURShift's result is an int32 value, but
get a double constant from AI. Since the result will be converted to unsigned by UInt32ToNumber,
all we have to do is store the result as a signed int32.

* dfg/DFGAbstractInterpreterInlines.h:

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

3 months agoFix non-internal builds after r246327.
simon.fraser@apple.com [Tue, 11 Jun 2019 20:34:16 +0000 (20:34 +0000)]
Fix non-internal builds after r246327.

* Platform/spi/ios/UIKitSPI.h:

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

3 months agoImport Content Security Policy Web Platform Tests
dbates@webkit.org [Tue, 11 Jun 2019 20:14:40 +0000 (20:14 +0000)]
Import Content Security Policy Web Platform Tests
https://bugs.webkit.org/show_bug.cgi?id=198676
<rdar://problem/51533785>

Reviewed by Youenn Fablet.

Import tests as of 3840f46213d9a991acc9288e3863530f7502c05e (origin/master).

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/content-security-policy/META.yml: Added.
* web-platform-tests/content-security-policy/README.css: Added.
(.code):
(.codeTitle):
(.highlight1):
(.highlight2):
(body):
* web-platform-tests/content-security-policy/README.html: Added.
* web-platform-tests/content-security-policy/base-uri/base-uri-allow.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/base-uri/base-uri-allow.sub.html: Added.
* web-platform-tests/content-security-policy/base-uri/base-uri-deny.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/base-uri/base-uri-deny.sub.html: Added.
* web-platform-tests/content-security-policy/base-uri/base-uri_iframe_sandbox.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html: Added.
* web-platform-tests/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html: Added.
* web-platform-tests/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.sub.headers: Added.
* web-platform-tests/content-security-policy/base-uri/w3c-import.log: Added.
* web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub.html: Added.
* web-platform-tests/content-security-policy/blob/blob-urls-match-blob.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/blob/blob-urls-match-blob.sub.html: Added.
* web-platform-tests/content-security-policy/blob/self-doesnt-match-blob.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/blob/self-doesnt-match-blob.sub.html: Added.
* web-platform-tests/content-security-policy/blob/star-doesnt-match-blob.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/blob/star-doesnt-match-blob.sub.html: Added.
* web-platform-tests/content-security-policy/blob/w3c-import.log: Added.
* web-platform-tests/content-security-policy/child-src/child-src-about-blank-allowed-by-default.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/child-src/child-src-about-blank-allowed-by-default.sub.html: Added.
* web-platform-tests/content-security-policy/child-src/child-src-about-blank-allowed-by-scheme.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/child-src/child-src-about-blank-allowed-by-scheme.sub.html: Added.
* web-platform-tests/content-security-policy/child-src/child-src-allowed.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/child-src/child-src-allowed.sub.html: Added.
[...]
* web-platform-tests/content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-child.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-fallback.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-list.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-none.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-self.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-worker-src-child-fallback-blocked.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html: Added.
* web-platform-tests/content-security-policy/worker-src/w3c-import.log: Added.

LayoutTests:

* TestExpectations: Skip some tests for features we do not support.
* platform/mac-wk1/TestExpectations: Skip some tests.
* platform/win/TestExpectations: Ditto.
* tests-options.json:

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

3 months agoOpen up xcfilelist processing to more platforms
krollin@apple.com [Tue, 11 Jun 2019 19:40:24 +0000 (19:40 +0000)]
Open up xcfilelist processing to more platforms
https://bugs.webkit.org/show_bug.cgi?id=198675
<rdar://problem/51533238>

Reviewed by Jonathan Bedard.

Now that it's been tested, add AppleTV{OS,Simulator} to the set of
platforms on which to perform xcfilelist generation/updating.

* Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
(JavaScriptCoreGenerator):
(WebCoreGenerator):
(WebKitGenerator):

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

3 months agoUnreviewed build warning fixes
mcatanzaro@igalia.com [Tue, 11 Jun 2019 19:33:57 +0000 (19:33 +0000)]
Unreviewed build warning fixes

Source/JavaScriptCore:

Silence -Wreturn-type warning

* wasm/WasmTable.cpp:
(JSC::Wasm::Table::tryCreate):

Source/WebCore:

Silence -Wunused-parameter warning

* testing/Internals.cpp:
(WebCore::Internals::storeRegistrationsOnDisk):

Source/WebKit:

Silence -Wunused-variable warning

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):

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

3 months agoAdd logging for UI-side compositing hit-testing
simon.fraser@apple.com [Tue, 11 Jun 2019 19:02:31 +0000 (19:02 +0000)]
Add logging for UI-side compositing hit-testing
https://bugs.webkit.org/show_bug.cgi?id=198739

Reviewed by Antti Koivisto.

Source/WebCore:

Export the TextStream output operator.

* platform/TouchAction.h:

Source/WebKit:

Make it easier to debug UI-side compositing hit-testing issues with a UIHitTesting log
channel, which logs information about the UIView hierarchy, which views are found by
hit-testing, and what touch-actions apply.

This log channel can be set by passing the argument '-WebKit2Logging "UIHitTesting"' when
launching a debug iOS MobileSafari instance.

* Platform/Logging.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(-[UIView _web_findDescendantViewAtPoint:withEvent:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hitTest:withEvent:]):
(-[WKContentView _handleTouchActionsForTouchEvent:]):

Source/WTF:

Make it possible to output an Objective-C object to TextStream, which will
log its -description.

Also add a template for OptionSet<> printing.

* WTF.xcodeproj/project.pbxproj:
* wtf/text/TextStream.h:
(WTF::operator<<):
* wtf/text/cocoa/TextStreamCocoa.mm: Added.
(WTF::TextStream::operator<<):

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

3 months agowebkitpy: Fix device ASan reporting, add testing for report configurations
jbedard@apple.com [Tue, 11 Jun 2019 18:44:53 +0000 (18:44 +0000)]
webkitpy: Fix device ASan reporting, add testing for report configurations
https://bugs.webkit.org/show_bug.cgi?id=198756

Reviewed by Aakash Jain.

ASan results were reporting an incorrect style. This indicates we need to be testing this upload
configuration thoroughly in webkitpy.

* Scripts/webkitpy/port/config.py:
(clear_cached_configuration): Clearing configurations should clear the ASan cache as well.
* Scripts/webkitpy/port/device_port.py:
(DevicePort.configuration_for_upload): Add ASan as style.
* Scripts/webkitpy/port/ios_device_unittest.py:
(IOSDeviceTest):
(IOSDeviceTest.test_default_upload_configuration):
* Scripts/webkitpy/port/ios_simulator_unittest.py:
(IOSSimulatorTest.test_default_upload_configuration):
* Scripts/webkitpy/port/mock_drt_unittest.py:
(MockDRTPortTest.test_asan_upload_configuration):
* Scripts/webkitpy/port/port_testcase.py:
(test_default_upload_configuration):
(test_debug_upload_configuration):
(test_asan_upload_configuration):
(test_guard_malloc_configuration):
* Scripts/webkitpy/port/watch_simulator_unittest.py:
(WatchSimulatorTest):
(WatchSimulatorTest.test_default_upload_configuration):

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

3 months agoSkip test http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html as
dbates@webkit.org [Tue, 11 Jun 2019 18:17:24 +0000 (18:17 +0000)]
Skip test http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html as
testRunner.queueLoad() does not support loading data URLs in Legacy WebKit on Mac and iOS

* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:

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

3 months ago[Win] Layout test http/tests/security/contentSecurityPolicy/navigate-self-to-blob...
dbates@webkit.org [Tue, 11 Jun 2019 17:45:01 +0000 (17:45 +0000)]
[Win] Layout test http/tests/security/contentSecurityPolicy/navigate-self-to-blob.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=198758

It is a longstanding known issue (since 2015) that navigating to a blob URL times out on Windows.
Further investigation is needed. Skip another test for now.

* platform/win/TestExpectations:

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

3 months agocompositing/fixed-with-main-thread-scrolling.html is a flaky timeout
sroberts@apple.com [Tue, 11 Jun 2019 17:25:25 +0000 (17:25 +0000)]
compositing/fixed-with-main-thread-scrolling.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=198757

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations: Updating expectations for flaky test

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

3 months agoRoll out PAC cage
sbarati@apple.com [Tue, 11 Jun 2019 17:18:47 +0000 (17:18 +0000)]
Roll out PAC cage
https://bugs.webkit.org/show_bug.cgi?id=198726

Reviewed by Keith Miller.

Source/bmalloc:

* bmalloc/Gigacage.h:
(Gigacage::isEnabled):
(Gigacage::caged):
(Gigacage::cagedMayBeNull): Deleted.

Source/JavaScriptCore:

This patch rolls out: r245064, r245145, r245168, r245313, r245432, r245622.

The resulting state we're in is we have Gigacage enabled on arm64.
There is no more PAC caging.

We're doing this because there are performance issues with PAC caging
that we haven't resolved yet.

* assembler/CPU.h:
(JSC::isARM64E): Deleted.
* assembler/MacroAssemblerARM64E.h:
(JSC::MacroAssemblerARM64E::tagArrayPtr): Deleted.
(JSC::MacroAssemblerARM64E::untagArrayPtr): Deleted.
(JSC::MacroAssemblerARM64E::removeArrayPtrTag): Deleted.
* b3/B3LowerToAir.cpp:
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::admitsStack):
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
(JSC::B3::StackmapSpecial::isArgValidForRep):
* b3/B3Validate.cpp:
* b3/B3ValueRep.cpp:
(JSC::B3::ValueRep::addUsedRegistersTo const):
(JSC::B3::ValueRep::dump const):
(WTF::printInternal):
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::ValueRep):
(JSC::B3::ValueRep::isReg const):
* dfg/DFGOperations.cpp:
(JSC::DFG::newTypedArrayWithSize):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::jumpForTypedArrayIsNeuteredIfOutOfBounds):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileDataViewGet):
(JSC::FTL::DFG::LowerDFGToB3::compileDataViewSet):
(JSC::FTL::DFG::LowerDFGToB3::caged):
(JSC::FTL::DFG::LowerDFGToB3::speculateTypedArrayIsNotNeutered):
(JSC::FTL::DFG::LowerDFGToB3::untagArrayPtr): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::removeArrayPtrTag): Deleted.
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::genericAddPointer):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::cageConditionally):
* jit/IntrinsicEmitter.cpp:
(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitDirectArgumentsGetByVal):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallNode::clearCallLinkInfo):
* jit/RegisterSet.h:
* llint/LowLevelInterpreter64.asm:
* runtime/ArrayBuffer.cpp:
(JSC::SharedArrayBufferContents::SharedArrayBufferContents):
(JSC::SharedArrayBufferContents::~SharedArrayBufferContents):
(JSC::ArrayBufferContents::ArrayBufferContents):
(JSC::ArrayBufferContents::destroy):
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBufferContents::makeShared):
(JSC::ArrayBufferContents::copyTo):
* runtime/ArrayBuffer.h:
(JSC::SharedArrayBufferContents::data const):
(JSC::ArrayBufferContents::data const):
(JSC::ArrayBuffer::data):
(JSC::ArrayBuffer::data const):
(JSC::ArrayBuffer::byteLength const):
* runtime/ArrayBufferView.cpp:
(JSC::ArrayBufferView::ArrayBufferView):
* runtime/ArrayBufferView.h:
(JSC::ArrayBufferView::baseAddress const):
(JSC::ArrayBufferView::setRangeImpl):
(JSC::ArrayBufferView::getRangeImpl):
(JSC::ArrayBufferView::byteLength const): Deleted.
* runtime/CachedTypes.cpp:
(JSC::CachedScopedArgumentsTable::encode):
(JSC::CachedScopedArgumentsTable::decode const):
* runtime/CagedBarrierPtr.h:
(JSC::CagedBarrierPtr::CagedBarrierPtr):
(JSC::CagedBarrierPtr::set):
(JSC::CagedBarrierPtr::get const):
(JSC::CagedBarrierPtr::getMayBeNull const):
(JSC::CagedBarrierPtr::operator== const):
(JSC::CagedBarrierPtr::operator!= const):
(JSC::CagedBarrierPtr::operator bool const):
(JSC::CagedBarrierPtr::setWithoutBarrier):
(JSC::CagedBarrierPtr::operator* const):
(JSC::CagedBarrierPtr::operator-> const):
(JSC::CagedBarrierPtr::operator[] const):
(JSC::CagedBarrierPtr::getUnsafe const): Deleted.
(JSC::CagedBarrierPtr::at const): Deleted.
* runtime/DataView.cpp:
(JSC::DataView::DataView):
* runtime/DataView.h:
(JSC::DataView::get):
(JSC::DataView::set):
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::visitChildren):
(JSC::DirectArguments::overrideThings):
(JSC::DirectArguments::unmapArgument):
* runtime/DirectArguments.h:
* runtime/GenericArguments.h:
* runtime/GenericArgumentsInlines.h:
(JSC::GenericArguments<Type>::visitChildren):
(JSC::GenericArguments<Type>::initModifiedArgumentsDescriptor):
(JSC::GenericArguments<Type>::setModifiedArgumentDescriptor):
(JSC::GenericArguments<Type>::isModifiedArgumentDescriptor):
* runtime/GenericTypedArrayView.h:
* runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView):
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::JSArrayBufferView):
(JSC::JSArrayBufferView::finalize):
(JSC::JSArrayBufferView::slowDownAndWasteMemory):
* runtime/JSArrayBufferView.h:
(JSC::JSArrayBufferView::ConstructionContext::vector const):
(JSC::JSArrayBufferView::isNeutered):
(JSC::JSArrayBufferView::vector const):
(JSC::JSArrayBufferView::hasVector const): Deleted.
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::JSGenericTypedArrayView<Adaptor>::estimatedSize):
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren):
* runtime/Options.h:
* runtime/ScopedArgumentsTable.cpp:
(JSC::ScopedArgumentsTable::clone):
(JSC::ScopedArgumentsTable::setLength):
* runtime/ScopedArgumentsTable.h:
* runtime/SymbolTable.h:
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::complete):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmInstance.h:
(JSC::Wasm::Instance::cachedMemory const):
(JSC::Wasm::Instance::updateCachedMemory):
* wasm/WasmMemory.cpp:
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::dump const):
* wasm/WasmMemory.h:
(JSC::Wasm::Memory::memory const):
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/CagedPtr.h:
(WTF::CagedPtr::CagedPtr):
(WTF::CagedPtr::get const):
(WTF::CagedPtr::getMayBeNull const):
(WTF::CagedPtr::operator=):
(WTF::CagedPtr::operator== const):
(WTF::CagedPtr::operator!= const):
(WTF::CagedPtr::operator bool const):
(WTF::CagedPtr::operator* const):
(WTF::CagedPtr::operator-> const):
(WTF::CagedPtr::operator[] const):
(WTF::CagedPtr::getUnsafe const): Deleted.
(WTF::CagedPtr::at const): Deleted.
(WTF::CagedPtr::recage): Deleted.
* wtf/CagedUniquePtr.h:
(WTF::CagedUniquePtr::CagedUniquePtr):
(WTF::CagedUniquePtr::create):
(WTF::CagedUniquePtr::operator=):
(WTF::CagedUniquePtr::~CagedUniquePtr):
(WTF::CagedUniquePtr::destroy):
* wtf/Gigacage.h:
(Gigacage::caged):
(Gigacage::cagedMayBeNull): Deleted.
* wtf/PtrTag.h:
(WTF::tagArrayPtr): Deleted.
(WTF::untagArrayPtr): Deleted.
(WTF::removeArrayPtrTag): Deleted.
(WTF::retagArrayPtr): Deleted.
* wtf/TaggedArrayStoragePtr.h:
(WTF::TaggedArrayStoragePtr::TaggedArrayStoragePtr): Deleted.
(WTF::TaggedArrayStoragePtr::get const): Deleted.
(WTF::TaggedArrayStoragePtr::getUnsafe const): Deleted.
(WTF::TaggedArrayStoragePtr::resize): Deleted.
(WTF::TaggedArrayStoragePtr::operator bool const): Deleted.

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

3 months agoSkip stress/ftl-gettypedarrayoffset-wasteful.js on Arm/Linux
guijemont@igalia.com [Tue, 11 Jun 2019 16:53:15 +0000 (16:53 +0000)]
Skip stress/ftl-gettypedarrayoffset-wasteful.js on Arm/Linux

Unreviewed gardening.

* stress/ftl-gettypedarrayoffset-wasteful.js:
Skipped on arm/linux as it always times out on the bot since a change
between r246270 and r246278 inclusive.

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

3 months agoWeb Inspector: AXI: Audit: image label test is throwing spurious errors on elements...
commit-queue@webkit.org [Tue, 11 Jun 2019 16:42:39 +0000 (16:42 +0000)]
Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
https://bugs.webkit.org/show_bug.cgi?id=194754
<rdar://problem/48144534>

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

Source/WebCore:

Tests: accessibility/img-alt-attribute-empty-string.html
       accessibility/img-alt-attribute-no-value.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::computedRoleString const):

LayoutTests:

* accessibility/img-alt-attribute-empty-string-expected.txt: Added.
* accessibility/img-alt-attribute-empty-string.html: Added.
* accessibility/img-alt-attribute-no-value-expected.txt: Added.
* accessibility/img-alt-attribute-no-value.html: Added.

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

3 months agoAdd a quirk for washingtonpost.com and nytimes.com
sihui_liu@apple.com [Tue, 11 Jun 2019 16:26:29 +0000 (16:26 +0000)]
Add a quirk for washingtonpost.com and nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=198678

Reviewed by Geoffrey Garen.

Covered by manual test.

* page/Quirks.cpp:
(WebCore::Quirks::hasWebSQLSupportQuirk const):

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

3 months agohttp/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with...
sroberts@apple.com [Tue, 11 Jun 2019 16:19:36 +0000 (16:19 +0000)]
http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky failure and timeout
https://bugs.webkit.org/show_bug.cgi?id=198185

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations: Skipping test on iOS

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

3 months agoUnreviewed, fix test failures after r246292.
drousso@apple.com [Tue, 11 Jun 2019 16:16:09 +0000 (16:16 +0000)]
Unreviewed, fix test failures after r246292.

* inspector/timeline/timeline-recording.html:
* inspector/timeline/timeline-recording-expected.txt:
Filter the contents of `sampleStackTraces` and `sampleDurations` when exporting.

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

3 months agoREGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
antti@apple.com [Tue, 11 Jun 2019 15:55:17 +0000 (15:55 +0000)]
REGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
https://bugs.webkit.org/show_bug.cgi?id=198753
<rdar://problem/51355686>

Reviewed by Simon Fraser.

Source/WebKit:

If an element with 'overflow:scroll' also had 'visibility:hidden' or 'pointer-events:none' it would
capture touches and prevent scrolling of any overlapped scrollers.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(WebKit::collectDescendantViewsAtPoint):

Filter out views with 'isUserInteractionEnabled == NO' (set for hidden and pointer-events:none layers).
This prevents it being considered as the first view hit when determining scrolling relationships.

(-[UIView _web_findDescendantViewAtPoint:withEvent:]):

No need to skip here anymore.

LayoutTests:

* fast/scrolling/ios/overflow-scroll-user-interaction-disabled-expected.txt: Added.
* fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html: Added.

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

3 months agoInclude `touch-action` in the computed styles list
drousso@apple.com [Tue, 11 Jun 2019 15:33:46 +0000 (15:33 +0000)]
Include `touch-action` in the computed styles list
https://bugs.webkit.org/show_bug.cgi?id=198742

Reviewed by Antoine Quint.

* css/CSSComputedStyleDeclaration.cpp:

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

3 months agotu-berlin university email web interface (Outlook Web App) goes directly to the light...
mcatanzaro@igalia.com [Tue, 11 Jun 2019 15:27:08 +0000 (15:27 +0000)]
tu-berlin university email web interface (Outlook Web App) goes directly to the light version instead of the normal web app
https://bugs.webkit.org/show_bug.cgi?id=198749

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Add user agent quirk for exchange.tu-berlin.de, which has lost the right to receive an
accurate user agent from WebKit.

* platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresMacintoshPlatform):

Tools:

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

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

3 months agoMediaStreamAudioSourceNode::setFormat should check for m_sourceSampleRate equality
youenn@apple.com [Tue, 11 Jun 2019 15:13:59 +0000 (15:13 +0000)]
MediaStreamAudioSourceNode::setFormat should check for m_sourceSampleRate equality
https://bugs.webkit.org/show_bug.cgi?id=198740
<rdar://problem/47088939>

Reviewed by Eric Carlson.

Source/WebCore:

Covered by tests that are now passing.

* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::setFormat):

LayoutTests:

* platform/mac/TestExpectations:

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

3 months agoQuotes are always inserted as smart quotes on stackblitz.com, causing compilation...
wenson_hsieh@apple.com [Tue, 11 Jun 2019 14:46:23 +0000 (14:46 +0000)]
Quotes are always inserted as smart quotes on stackblitz.com, causing compilation errors
https://bugs.webkit.org/show_bug.cgi?id=198735
<rdar://problem/51557159>

Reviewed by Megan Gardner.

Source/WebKit:

Add a flag in FocusedElementInformation to indicate whether spellchecking is allowed in the focused element.
If spellchecking is not allowed, then disable smart quotes and dashes, which matches behavior on macOS.

* Shared/FocusedElementInformation.cpp:
(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):
* Shared/FocusedElementInformation.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInputTraits]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getFocusedElementInformation):

Tools:

Add a test to verify that spellcheck="false" disables smart quotes and dashes, but any other value defers to the
user's preferences by using UITextSmartQuotesTypeDefault and UITextSmartDashesTypeDefault.

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(TestWebKitAPI::TEST):

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

3 months ago[GTK] Replace gdk_screen_get_monitor_geometry and gdk_screen_get_monitor_workarea
commit-queue@webkit.org [Tue, 11 Jun 2019 12:52:21 +0000 (12:52 +0000)]
[GTK] Replace gdk_screen_get_monitor_geometry and gdk_screen_get_monitor_workarea
https://bugs.webkit.org/show_bug.cgi?id=198750

Patch by Ludovico de Nittis <ludovico.denittis@collabora.com> on 2019-06-11
Reviewed by Carlos Garcia Campos.

Since GTK 3.22 gdk_screen_get_monitor_geometry and
gdk_screen_get_monitor_workarea has been deprecated.

No behavior change.

* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenRect):
(WebCore::screenAvailableRect):

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

3 months ago[cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
Hironori.Fujii@sony.com [Tue, 11 Jun 2019 12:50:50 +0000 (12:50 +0000)]
[cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
https://bugs.webkit.org/show_bug.cgi?id=198701

Source/WebCore:

PlatformContextCairo::pushImageMask blits wrong position of the
surface to the background of masking objects. And, I don't know
the reason why this blitting is needed. Removed the blitting.

Reviewed by Carlos Garcia Campos.

Tests: svg/clip-path/clip-opacity.html
       svg/clip-path/svg-in-html.html

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::pushImageMask): Don't blit the
surface to the background.

LayoutTests:

Reviewed by Carlos Garcia Campos.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:
Unskipped svg/gradients/spreadMethodDiagonal3.svg and svg/gradients/spreadMethodDiagonal4.svg.

* svg/clip-path/clip-opacity-expected.html: Added.
* svg/clip-path/clip-opacity.html: Added.
* svg/clip-path/svg-in-html-expected.html: Added.
* svg/clip-path/svg-in-html.html: Added.

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

3 months ago[GTK] Remove option REDIRECTED_XCOMPOSITE_WINDOW
carlosgc@webkit.org [Tue, 11 Jun 2019 11:17:31 +0000 (11:17 +0000)]
[GTK] Remove option REDIRECTED_XCOMPOSITE_WINDOW
https://bugs.webkit.org/show_bug.cgi?id=198748

Reviewed by Žan Doberšek.

.:

* Source/cmake/OptionsGTK.cmake: Remove USE_REDIRECTED_XCOMPOSITE_WINDOW build option.

Source/WebKit:

It's unused and untested, we kept that code path only because the redirected window caused performance issues in
some drivers in embedded devices. Nowadays there are much better solutions for those cases like using WPE port
or GTK port under wayland instead of X11.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::create): Remove the ShouldDoFrameSync parameter since it always receives Yes.
(WebKit::ThreadedCompositor::ThreadedCompositor): Ditto.
(WebKit::ThreadedCompositor::createGLContext): Remove the code to handle the case of ShouldDoFrameSync being No,
since it's always Yes.
(WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
(webkitWebViewBaseUnrealize): Ditto.
(webkitWebViewBaseDraw): acceleratedBackingStore member can't be nullptr now.
(webkitWebViewBaseEnterAcceleratedCompositingMode): Ditto.
(webkitWebViewBaseUpdateAcceleratedCompositingMode): Ditto.
(webkitWebViewBaseExitAcceleratedCompositingMode): Ditto.
(webkitWebViewBaseMakeGLContextCurrent): Ditto.
(webkitWebViewBaseDidRelaunchWebProcess): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
(webkitWebViewBasePageClosed): Ditto.
(webkitWebViewBaseRenderHostFileDescriptor): acceleratedBackingStore member can't be nullptr now.
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateBackingStoreState): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
(WebKit::DrawingAreaProxyCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
(WebKit::DrawingAreaProxyCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
* UIProcess/gtk/AcceleratedBackingStore.cpp:
(WebKit::AcceleratedBackingStore::create): Add an assert to ensure we create an AcceleratedBackingStore.
* UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
* UIProcess/gtk/AcceleratedBackingStoreX11.h:
* UIProcess/gtk/HardwareAccelerationManager.cpp:
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
* WebProcess/WebPage/AcceleratedSurface.cpp:
(WebKit::AcceleratedSurface::create): Add an assert to ensure we create an AcceleratedSurface.
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
(WebKit::DrawingAreaCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
(WebKit::DrawingAreaCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::LayerTreeHost): m_surface can't be nullptr now.
(WebKit::LayerTreeHost::sizeDidChange): Ditto.
(WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged): Ditto.
(WebKit::LayerTreeHost::nativeSurfaceHandleForCompositing): Ditto.
(WebKit::LayerTreeHost::didDestroyGLContext): Ditto.
(WebKit::LayerTreeHost::willRenderFrame): Ditto.
(WebKit::LayerTreeHost::didRenderFrame): Ditto.
(WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::nativeWindowHandle): Deleted.
* WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
* WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:

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

3 months agoUnreviewed, add myself to the JavaScriptCore watchlist.
tzagallo@apple.com [Tue, 11 Jun 2019 09:11:24 +0000 (09:11 +0000)]
Unreviewed, add myself to the JavaScriptCore watchlist.

* Scripts/webkitpy/common/config/watchlist:

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

3 months agoUnreviewed, change my status to be a WebKit reviewer
tzagallo@apple.com [Tue, 11 Jun 2019 09:02:24 +0000 (09:02 +0000)]
Unreviewed, change my status to be a WebKit reviewer

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

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

3 months ago[WPE][GTK] bubblewrap sandbox should grant access to web extensions directory
mcatanzaro@igalia.com [Tue, 11 Jun 2019 08:01:39 +0000 (08:01 +0000)]
[WPE][GTK] bubblewrap sandbox should grant access to web extensions directory
https://bugs.webkit.org/show_bug.cgi?id=198734

Reviewed by Carlos Garcia Campos.

* UIProcess/API/glib/WebKitWebContext.cpp:
(webkit_web_context_set_web_extensions_directory):

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

3 months ago[WPE] Use new exported image API from fdo backend
carlosgc@webkit.org [Tue, 11 Jun 2019 07:43:06 +0000 (07:43 +0000)]
[WPE] Use new exported image API from fdo backend
https://bugs.webkit.org/show_bug.cgi?id=198558

Reviewed by Philippe Normand.

* WebKitTestRunner/PlatformWPE.cmake: Do not find fdo backend and libxkb again here, since WKTR depends on
WPEToolingBackends that already depends on fdo backend and libxkb
* wpe/backends/CMakeLists.txt: Bump fdo requirements to 1.3.0 version.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):
* wpe/backends/HeadlessViewBackend.h:
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::initialize):
* wpe/backends/ViewBackend.h:
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::displayBuffer):
* wpe/backends/WindowViewBackend.h:

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

3 months agoExtend run-benchmark to allow diagnosing before closing browser on test failure.
dewei_zhu@apple.com [Tue, 11 Jun 2019 05:05:19 +0000 (05:05 +0000)]
Extend run-benchmark to allow diagnosing before closing browser on test failure.
https://bugs.webkit.org/show_bug.cgi?id=198729

Reviewed by Ryosuke Niwa.

Add '--diagnose-directory' option to store diagnose information when test failed.

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver.diagnose_test_failure): Add default no-op function to base class.
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Added '--diagnose-directory' option.
(parse_args):
(run_benchmark_plan):
* Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
(WebDriverBenchmarkRunner._run_one_test): Added 'diagnose_test_failure' invocation on test failure.
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
(WebServerBenchmarkRunner.__init__):
(WebServerBenchmarkRunner._run_one_test): Added 'diagnose_test_failure' invocation on test failure.

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

3 months ago[WinCairo][MediaFoundation] Remove the unused video window
Hironori.Fujii@sony.com [Tue, 11 Jun 2019 01:14:23 +0000 (01:14 +0000)]
[WinCairo][MediaFoundation] Remove the unused video window
https://bugs.webkit.org/show_bug.cgi?id=198523

Reviewed by Don Olmstead.

Remove the video window which had been unused since Bug 150941.

No behavior change.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):
(WebCore::MediaPlayerPrivateMediaFoundation::paint):
(WebCore::MediaPlayerPrivateMediaFoundation::hostWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setDestinationRect):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSwapChain): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::updateDestRect): Deleted.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

3 months agoAdd visualization of touch action regions
simon.fraser@apple.com [Tue, 11 Jun 2019 00:54:11 +0000 (00:54 +0000)]
Add visualization of touch action regions
https://bugs.webkit.org/show_bug.cgi?id=198718

Reviewed by Antoine Quint.

Add a way to show which elements of the page have touch-action set on them by
painting an overlay with small text that shows the type of action(s).

The event regions are painted into GraphicsLayers at paint time in
RenderLayerBacking by making a pattern image and filling the region rects
with the pattern.

* page/DebugPageOverlays.cpp:
(WebCore::touchEventRegionColors):
* rendering/EventRegion.cpp:
(WebCore::EventRegion::regionForTouchAction const):
* rendering/EventRegion.h:
(WebCore::EventRegion::region const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateEventRegion):
(WebCore::patternForTouchAction):
(WebCore::RenderLayerBacking::paintContents):

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

3 months ago[iOS] Use PDFKit SPI for taking snapshots when the hosting app is not entitled for...
aestes@apple.com [Tue, 11 Jun 2019 00:45:50 +0000 (00:45 +0000)]
[iOS] Use PDFKit SPI for taking snapshots when the hosting app is not entitled for global capture
https://bugs.webkit.org/show_bug.cgi?id=198731
<rdar://problem/46215174>

Reviewed by Tim Horton.

Source/WebKit:

PDFHostViewController renders PDF contents in a view service, and apps are unable to
snapshot views rendered out-of-process without an entitlement.

When an app is missing this entitlement and calls WKWebView's
takeSnapshotWithConfiguration: API when a PDF is displayed, fall back to calling
PDFHostViewController's snapshotting SPI.

Testing is blocked by <https://webkit.org/b/175204>.

* Platform/spi/ios/PDFKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/WKPDFView.mm:
(+[WKPDFView web_requiresCustomSnapshotting]):
(-[WKPDFView web_snapshotRectInContentViewCoordinates:snapshotWidth:completionHandler:]):
* UIProcess/ios/WKSystemPreviewView.mm:
(+[WKSystemPreviewView web_requiresCustomSnapshotting]):

Source/WTF:

* wtf/FeatureDefines.h:

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

3 months ago[WinCairo] Remove build warning from RemoteInspector.
Basuke.Suzuki@sony.com [Tue, 11 Jun 2019 00:38:48 +0000 (00:38 +0000)]
[WinCairo] Remove build warning from RemoteInspector.
https://bugs.webkit.org/show_bug.cgi?id=198724

Reviewed by Joseph Pecoraro.

In `RemoteInspectorConnectionClient.h`, an interface was defined with empty implementation.
This method is to be overwritten by sub classes so that parameter name is important
so they are commented out rather than just removing from the definition.

* inspector/remote/RemoteInspector.h:

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

3 months agoWeb Inspector: Timelines: imported recordings do not have JavaScript call trees
drousso@apple.com [Mon, 10 Jun 2019 23:15:41 +0000 (23:15 +0000)]
Web Inspector: Timelines: imported recordings do not have JavaScript call trees
https://bugs.webkit.org/show_bug.cgi?id=197490
<rdar://problem/50589158>

Reviewed by Joseph Pecoraro.

* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording.prototype.initializeCallingContextTrees):
Make sure to actually save the provided stack traces and samples in the export data.

* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.fromJSON):
(WI.ScriptTimelineRecord.prototype.toJSON):
Drive-by: include `extraDetails`, which contains useful information like "default prevented".
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 months agoWeb Inspector: DNS names in SymmaryInfo was wrong.
Basuke.Suzuki@sony.com [Mon, 10 Jun 2019 22:47:46 +0000 (22:47 +0000)]
Web Inspector: DNS names in SymmaryInfo was wrong.
https://bugs.webkit.org/show_bug.cgi?id=198732

Reviewed by Devin Rousso.

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):

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

3 months ago[CSP] Blob URLs should inherit their CSP policy
dbates@webkit.org [Mon, 10 Jun 2019 22:36:24 +0000 (22:36 +0000)]
[CSP] Blob URLs should inherit their CSP policy
https://bugs.webkit.org/show_bug.cgi?id=198579
<rdar://problem/51366878>

Reviewed by Brent Fulgham.

Actually add the tests that I inadvertently omitted from r246277.

* http/tests/security/contentSecurityPolicy/navigate-self-to-blob-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/navigate-self-to-blob.html: Added.
* http/tests/security/contentSecurityPolicy/navigate-self-to-data-url-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html: Added.

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

3 months ago[GTK] 2.25.1 does not build on 32-bit ARM due to bit-packing assertion, requires...
mcatanzaro@igalia.com [Mon, 10 Jun 2019 22:18:53 +0000 (22:18 +0000)]
[GTK] 2.25.1 does not build on 32-bit ARM due to bit-packing assertion, requires -DENABLE_DARK_MODE_CSS=OFF
https://bugs.webkit.org/show_bug.cgi?id=198274

Reviewed by Timothy Hatcher.

Rather than reorder everything in StyleRareInheritedData, let's slightly increase the size
of GreaterThanOrSameSizeAsStyleRareInheritedData to allow the static assert to pass.

At the same time, remove an obsolote iOS-specific member that is probably no longer needed.

* rendering/style/StyleRareInheritedData.cpp:

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

3 months agoRemove Dashboard support
weinig@apple.com [Mon, 10 Jun 2019 22:16:37 +0000 (22:16 +0000)]
Remove Dashboard support
https://bugs.webkit.org/show_bug.cgi?id=198615

Reviewed by Ryosuke Niwa.

.:

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):
* css/CSSPrimitiveValue.h:
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* css/DashboardRegion.h: Removed.
* css/StyleBuilderCustom.h:
(WebCore::convertToIntLength): Deleted.
(WebCore::StyleBuilderCustom::applyValueWebkitDashboardRegion): Deleted.
* css/StyleResolver.cpp:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeWebkitDashboardRegion): Deleted.
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::createForUpdatingDropTarget):
* dom/Document.cpp:
(WebCore::Document::invalidateRenderingDependentRegions):
(WebCore::Document::annotatedRegions const): Deleted.
(WebCore::Document::setAnnotatedRegions): Deleted.
(WebCore::Document::updateAnnotatedRegions): Deleted.
(WebCore::Document::invalidateScrollbarDependentRegions): Deleted.
(WebCore::Document::updateZOrderDependentRegions): Deleted.
* dom/Document.h:
(WebCore::Document::setHasAnnotatedRegions): Deleted.
(WebCore::Document::setAnnotatedRegionsDirty): Deleted.
(WebCore::Document::annotatedRegionsDirty const): Deleted.
(WebCore::Document::hasAnnotatedRegions const): Deleted.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createContext2d):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::sourceURI const):
* html/canvas/CanvasGradient.cpp:
(WebCore::CanvasGradient::addColorStop):
* html/canvas/CanvasGradient.h:
(WebCore::CanvasGradient::setDashboardCompatibilityMode): Deleted.
(): Deleted.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::create):
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::CanvasRenderingContext2DBase):
(WebCore::CanvasRenderingContext2DBase::fill):
(WebCore::CanvasRenderingContext2DBase::stroke):
(WebCore::CanvasRenderingContext2DBase::clip):
(WebCore::CanvasRenderingContext2DBase::createLinearGradient):
(WebCore::CanvasRenderingContext2DBase::createRadialGradient):
(WebCore::CanvasRenderingContext2DBase::prepareGradientForDashboard const): Deleted.
(WebCore::CanvasRenderingContext2DBase::clearPathForDashboardBackwardCompatibilityMode): Deleted.
* html/canvas/CanvasRenderingContext2DBase.h:
* html/canvas/OffscreenCanvasRenderingContext2D.cpp:
(WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D):
* html/canvas/PaintRenderingContext2D.cpp:
(WebCore::PaintRenderingContext2D::PaintRenderingContext2D):
* page/Chrome.cpp:
(WebCore::ChromeClient::annotatedRegionsChanged): Deleted.
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::didLayout):
(WebCore::FrameView::didPaintContents):
* page/Settings.yaml:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addAnnotatedRegions): Deleted.
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::setHasVerticalScrollbar):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addAnnotatedRegions): Deleted.
(WebCore::RenderObject::collectAnnotatedRegions): Deleted.
* rendering/RenderObject.h:
(WebCore::AnnotatedRegionValue::operator== const): Deleted.
(WebCore::AnnotatedRegionValue::operator!= const): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::rareNonInheritedDataChangeRequiresLayout):
(WebCore::RenderStyle::initialDashboardRegions): Deleted.
(WebCore::RenderStyle::noneDashboardRegions): Deleted.
(WebCore::RenderStyle::setDashboardRegion): Deleted.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::dashboardRegions const): Deleted.
(WebCore::RenderStyle::setDashboardRegions): Deleted.
* rendering/style/StyleDashboardRegion.h: Removed.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::operator== const):
* rendering/style/StyleRareNonInheritedData.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode const): Deleted.
* xml/XMLHttpRequest.h:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetUseDashboardCompatibilityMode): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setUseDashboardCompatibilityMode): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::annotatedRegionsChanged): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

Removes implementation, but keeps privatly exported interfaces and enums
around until we can confirm there are no more users of them.

* Configurations/FeatureDefines.xcconfig:
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:]):
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::annotatedRegionsChanged): Deleted.
* WebView/WebClipView.mm:
(-[WebClipView _focusRingVisibleRect]):
(-[WebClipView scrollWheel:]):
* WebView/WebDashboardRegion.h:
* WebView/WebDashboardRegion.mm:
* WebView/WebHTMLView.mm:
(-[WebHTMLView _updateMouseoverWithEvent:]):
(-[WebHTMLView acceptsFirstMouse:]):
(-[WebHTMLView setDataSource:]):
* WebView/WebPreferences.mm:
(cacheModelForMainBundle):
* WebView/WebUIDelegatePrivate.h:
* WebView/WebView.mm:
(-[WebView _needsPreHTML5ParserQuirks]):
(-[WebView _preferencesChanged:]):
(-[WebView _addScrollerDashboardRegions:]):
(-[WebView _dashboardRegions]):
(-[WebView _setDashboardBehavior:to:]):
(-[WebView _dashboardBehavior:]):
(-[WebView _addControlRect:clip:fromView:toDashboardRegions:]): Deleted.
(-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]): Deleted.
(-[WebView _addScrollerDashboardRegions:from:]): Deleted.
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate init]):
* WebView/WebViewPrivate.h:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
(setUseDashboardCompatibilityModeCallback): Deleted.
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setUseDashboardCompatibilityMode): Deleted.
* ImageDiff/cg/Configurations/Base.xcconfig:
* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm: Removed.
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setUseDashboardCompatibilityMode): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

* TestExpectations:
* cssom/cssvalue-comparison-expected.txt:
* cssom/cssvalue-comparison.html:
* fast/canvas/canvas-gradient-addStop-error-expected.txt:
* fast/canvas/canvas-gradient-addStop-error.html:
* fast/canvas/fill-stroke-clip-reset-path-expected.txt:
* fast/canvas/fill-stroke-clip-reset-path.html:
* fast/css/dashboard-regions-attr-crash-expected.txt: Removed.
* fast/css/dashboard-regions-attr-crash.html: Removed.
* fast/css/dashboard-regions-undefined-length-assertion-expected.txt: Removed.
* fast/css/dashboard-regions-undefined-length-assertion.html: Removed.
* fast/xmlhttprequest/set-dangerous-headers-in-dashboard-expected.txt: Removed.
* fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html: Removed.
* http/tests/xmlhttprequest/default-content-type-dashboard-expected.txt: Removed.
* http/tests/xmlhttprequest/default-content-type-dashboard.html: Removed.
* http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard-expected.txt: Removed.
* http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard.html: Removed.
* legacy-animation-engine/cssom/cssvalue-comparison-expected.txt:
* legacy-animation-engine/cssom/cssvalue-comparison.html:
* mathml/mathml-in-dashboard-expected.txt: Removed.
* mathml/mathml-in-dashboard.html: Removed.
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/ios/TestExpectations:
* platform/ios/mathml/mathml-in-dashboard-expected.txt: Removed.
* platform/mac/TestExpectations:
* platform/mac/fast/css/dashboard-region-parser-expected.txt: Removed.
* platform/mac/fast/css/dashboard-region-parser.html: Removed.
* platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk-expected.txt: Removed.
* platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html: Removed.
* platform/mac/mathml/mathml-in-dashboard-expected.png: Removed.
* platform/mac/mathml/mathml-in-dashboard-expected.txt: Removed.
* platform/mac/svg/custom/embedded-svg-disallowed-in-dashboard-expected.png: Removed.
* platform/mac/svg/custom/manually-parsed-embedded-svg-disallowed-in-dashboard-expected.png: Removed.
* platform/mac/svg/custom/manually-parsed-svg-disallowed-in-dashboard-expected.png: Removed.
* platform/mac/svg/custom/svg-disallowed-in-dashboard-object-expected.png: Removed.
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* svg/custom/embedded-svg-allowed-in-dashboard-expected.txt: Removed.
* svg/custom/embedded-svg-allowed-in-dashboard.xml: Removed.
* svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard-expected.txt: Removed.
* svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html: Removed.
* svg/custom/manually-parsed-svg-allowed-in-dashboard-expected.txt: Removed.
* svg/custom/manually-parsed-svg-allowed-in-dashboard.html: Removed.
* svg/custom/svg-allowed-in-dashboard-object-expected.txt: Removed.
* svg/custom/svg-allowed-in-dashboard-object.html: Removed.

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

3 months agoTool binaries like WebKitTestRunner have too aggressive stripping, resulting in non...
ryanhaddad@apple.com [Mon, 10 Jun 2019 21:35:13 +0000 (21:35 +0000)]
Tool binaries like WebKitTestRunner have too aggressive stripping, resulting in non-symbolicated crash logs
https://bugs.webkit.org/show_bug.cgi?id=198616
rdar://problem/36386573

Patch by Alexey Proskuryakov <ap@apple.com> on 2019-06-10
Reviewed by David Kilzer.

Adding an explicit STRIP_STYLE to appropriate xcconfigs.

* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
* DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig:
* ImageDiff/cg/Configurations/ImageDiff.xcconfig:
* MiniBrowser/Configurations/MiniBrowser.xcconfig:
* MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig:
* TestWebKitAPI/Configurations/TestWTF.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:

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

3 months ago[ iOS Sim WK2 ] Layout Test editing/deleting/delete-emoji* is failing
ryanhaddad@apple.com [Mon, 10 Jun 2019 21:29:57 +0000 (21:29 +0000)]
[ iOS Sim WK2 ] Layout Test editing/deleting/delete-emoji* is failing

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations: Remove failure expectation.
* platform/ios/editing/deleting/delete-emoji-1-expected.txt: Rebaseline test.
* platform/ios/editing/deleting/delete-emoji-9-expected.txt: Ditto.
* platform/ios/editing/deleting/delete-emoji-expected.txt: Ditto.

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

3 months agoWeb Automation: add notifications for when remote automation is enabled/disabled
drousso@apple.com [Mon, 10 Jun 2019 21:18:01 +0000 (21:18 +0000)]
Web Automation: add notifications for when remote automation is enabled/disabled
https://bugs.webkit.org/show_bug.cgi?id=198703
<rdar://problem/50588975>

Reviewed by Timothy Hatcher.

* inspector/remote/RemoteInspectorConstants.h:

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

3 months agoREGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn...
nvasilyev@apple.com [Mon, 10 Jun 2019 21:13:55 +0000 (21:13 +0000)]
REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work
https://bugs.webkit.org/show_bug.cgi?id=198508
<rdar://problem/51375503>

Reviewed by Matt Baker.

It didn't work because the detached sidebar panel tried to access its parent view (this.parentSidebar).

* UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Added.
(WI.ComputedStyleDetailsSidebarPanel):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Deleted.
Move computedStyleDetailsPanelShowProperty to ComputedStyleDetailsSidebarPanel since it's the only
panel where it's needed.

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

3 months agoEvent region should be set on scrolledContentsLayer if it exists
antti@apple.com [Mon, 10 Jun 2019 20:43:17 +0000 (20:43 +0000)]
Event region should be set on scrolledContentsLayer if it exists
https://bugs.webkit.org/show_bug.cgi?id=198717
<rdar://problem/51572169>

Reviewed by Simon Fraser.

Source/WebCore:

Test: pointerevents/ios/touch-action-region-overflow.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):

Move to updateBackingAndHierarchy.

(WebCore::RenderLayerBacking::updateEventRegion):

- Set event region on scrolledContentsLayer if it exists
- Translate away the scroll offset
- Get the offset from renderer from the GraphicsLayer so scrolling and non-scrolling case can be handled uniformly.

* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

Invoke updateEventRegion after geometry update so offsets are already available on GraphicsLayer.

LayoutTests:

* pointerevents/ios/touch-action-region-backing-sharing-expected.txt:
* pointerevents/ios/touch-action-region-overflow-expected.txt: Added.
* pointerevents/ios/touch-action-region-overflow.html: Added.

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

3 months ago[CSP] Blob URLs should inherit their CSP policy
dbates@webkit.org [Mon, 10 Jun 2019 20:30:50 +0000 (20:30 +0000)]
[CSP] Blob URLs should inherit their CSP policy
https://bugs.webkit.org/show_bug.cgi?id=198579
<rdar://problem/51366878>

Reviewed by Brent Fulgham.

Source/WebCore:

As per <https://w3c.github.io/webappsec-csp/#security-inherit-csp> (Editor's Draft, 28 February 2019) blob
URLs should inherit their CSP policy from their parent (if they have one).

Test: http/tests/security/contentSecurityPolicy/navigate-self-to-blob.html
      http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html

* dom/Document.cpp:
(WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const): Return true if the document's URL
is a Blob URL.
(WebCore::Document::initContentSecurityPolicy): Take a pointer to a ContentSecurityPolicy object that
represents the previous document's CSP. We only make us of this if the current URL is a Blob URL or a data
URL. Otherwise, do what we do now and take the policy from the owner frame.
* dom/Document.h:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin): Extend the lifetime of the previous document temporarily so that we can
pass its CSP to FrameLoader::didBeginDocument(). We need to do this extension because this function calls
FrameLoader::clear(), which can destroy the previous document and its ContentSecurityPolicy object. This
extension is also no different than if this function was called with a non-null ownerDocument except that
in that case it is the caller that extends the previous document's lifetime. Although it is tempting to
make use of ownerDocument to fix this bug by having the caller of begin() pass the previous document as
the ownerDocument when the new document's url (the one we are begin()ing) is a Blob URL. The ownerDocument
concept would privilege the Blob URL more than necessary; we only need to inherit the CSP policy from the
previous document for a Blob URL, not inherit the cookie URL or strict mixed content checking bit, etc.
We could make ContentSecurityPolicy ref-counted or even steal the ContentSecurityPolicy object from the
previous document. The latter is not of the question as a future enhancement, but the former seemed excessive
as a way to avoid extending the lifetime of the previous document because this would be the *only* call site
that actaully takes out a second ref of a ContentSecurityPolicy object. In general, shared ownership of
a ContentSecurityPolicy object does not make sense.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument): Pass the specified content security policy through to
Document::initContentSecurityPolicy().
* loader/FrameLoader.h:

LayoutTests:

Add tests to ensure that a self navigation to a Blob or Data URL inherits its CSP policy from
its parent document.

* http/tests/security/contentSecurityPolicy/navigate-self-to-blob-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/navigate-self-to-blob.html: Added.
* http/tests/security/contentSecurityPolicy/navigate-self-to-data-url-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html: Added.

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

3 months ago[iOS] fast/xsl tests are flaky when run after certain viewport shrink-to-fit tests
wenson_hsieh@apple.com [Mon, 10 Jun 2019 20:11:17 +0000 (20:11 +0000)]
[iOS] fast/xsl tests are flaky when run after certain viewport shrink-to-fit tests
https://bugs.webkit.org/show_bug.cgi?id=198699
<rdar://problem/50501718>

Reviewed by Simon Fraser.

Source/WebKit:

Lift logic that sets the "IsKnownToLayOutWiderThanViewport" flag out of resetViewportDefaultConfiguration, and
into didCommitLoad instead (along with other logic for resetting viewport arguments). The previous method,
resetViewportDefaultConfiguration, was being triggered very frequently undo didReceiveMobileDocType, causing the
shrink-to-fit heuristic to sometimes take no effect. The original intention here was simply to reset the flag
upon page load.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::resetViewportDefaultConfiguration):

Tools:

Add logic to platformResetPreferencesToConsistentValues, to reset the "ShouldIgnoreMetaViewport" preference.
While this is already being adjusted in platformConfigureViewForTest using the correct, TestOptions, this might
happen too late, allowing the shrink-to-fit-content heuristic to unexpectedly kick in on tests where testing
viewport parameters are used.

* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):

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

3 months agoUnreviewed, build fix for non-DFG configurations, part 2
ysuzuki@apple.com [Mon, 10 Jun 2019 20:10:37 +0000 (20:10 +0000)]
Unreviewed, build fix for non-DFG configurations, part 2
https://bugs.webkit.org/show_bug.cgi?id=198023

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):

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

3 months agoUnreviewed, build fix for non-DFG configurations
ysuzuki@apple.com [Mon, 10 Jun 2019 20:02:28 +0000 (20:02 +0000)]
Unreviewed, build fix for non-DFG configurations
https://bugs.webkit.org/show_bug.cgi?id=198023

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):

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

3 months ago[WHLSL] Auto initialize local variables
sbarati@apple.com [Mon, 10 Jun 2019 19:58:19 +0000 (19:58 +0000)]
[WHLSL] Auto initialize local variables
https://bugs.webkit.org/show_bug.cgi?id=198426

Reviewed by Myles Maxfield.

Source/WebCore:

This patch implements zero-filling for local variables in two parts:
1. We add a new pass, autoInitializeVariables, which makes any variable declaration
without an initializer call the default constructor for the variable's type.
Since we auto generate the default constructor, it's a native function whose
implementation we control.

2. Each native constructor is implemented as a memset(&value, sizeof(value), 0).
This memset is an inlined loop in each constructor. The reason this turns
everything into zero is that for every primitive type, the "zero" value is
represented as all zeroes in memory: float, int, pointers, etc.

Since our ability to test some of this is limited, I opened a follow-up bug to
test this more:
https://bugs.webkit.org/show_bug.cgi?id=198413

Tests: webgpu/whlsl-zero-initialize-values-2.html
       webgpu/whlsl-zero-initialize-values.html

* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
(WebCore::WHLSL::AST::VariableDeclaration::setInitializer):
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeFunction):
* Modules/webgpu/WHLSL/WHLSLASTDumper.h:
* Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: Added.
(WebCore::WHLSL::AutoInitialize::AutoInitialize):
(WebCore::WHLSL::AutoInitialize::visit):
(WebCore::WHLSL::autoInitializeVariables):
* Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h: Added.
* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::checkOperatorOverload):
(WebCore::WHLSL::Checker::visit):
* Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
(WebCore::WHLSL::inferTypesForCallImpl):
(WebCore::WHLSL::inferTypesForCall):
* Modules/webgpu/WHLSL/WHLSLInferTypes.h:
* Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
(WebCore::WHLSL::prepareShared):
* Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
(WebCore::WHLSL::resolveFunctionOverloadImpl):
(WebCore::WHLSL::resolveFunctionOverload):
* Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

* webgpu/whlsl-zero-initialize-values-2-expected.html: Added.
* webgpu/whlsl-zero-initialize-values-2.html: Added.
* webgpu/whlsl-zero-initialize-values-expected.html: Added.
* webgpu/whlsl-zero-initialize-values.html: Added.

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

3 months ago[JSC] UnlinkedCodeBlock should be eventually jettisoned in VM mini mode
ysuzuki@apple.com [Mon, 10 Jun 2019 19:49:58 +0000 (19:49 +0000)]
[JSC] UnlinkedCodeBlock should be eventually jettisoned in VM mini mode
https://bugs.webkit.org/show_bug.cgi?id=198023

Reviewed by Saam Barati.

JSTests:

* stress/reparsing-unlinked-codeblock.js: Added.
(shouldBe):
(hello):

Source/JavaScriptCore:

While CodeBlock is periodically jettisoned, UnlinkedCodeBlock and UnlinkedFunctionExecutable can be retained almost forever in certain type of applications.
When we execute a program, which has UnlinkedProgramCodeBlock retained in CodeCache. And UnlinkedProgramCodeBlock holds array of UnlinkedFunctionExecutable.
And UnlinkedFunctionExecutables hold UnlinkedFunctionCodeBlocks once it is generated. So eventually, this tree gets larger and larger until we purge
UnlinkedProgramCodeBlock from CodeCache. This is OK in the browser case. We navigate to various other pages, and UnlinkedProgramCodeBlocks should eventually
be pruned from CodeCache with the new ones. So this tree won't be retained forever. But the behavior is different in the other applications that do not have
navigations. If they only have one program which holds all, we basically retain this tree during executing this application. The same thing can happen in
web applications which does not have navigation and keeps alive for a long time. Once we hit CodeCache limit by periodically executing a new script, we will
hit the uppermost of memory footprint. But until that, we increase our memory footprint.

However, destroying these UnlinkedCodeBlocks and UnlinkedFunctionExecutables causes a tricky problem. In the browser environment, navigation can happen at any
time. So even if the given UnlinkedCodeBlock seems unused in the current page, it can be used when navigating to a new page which is under the same domain.
One example is initializing function in a script. It is only executed once per page. So once it is executed, it seems that this UnlinkedCodeBlock is unused.
But this will be used when we navigate to a new page. Pruning code blocks based on usage could cause performance regression.

But if our VM is mini VM mode, the story is different. In mini VM mode, we focus on memory footprint rather than performance e.g. daemons. The daemon never
reuse these CodeCache since we do not have the navigation.

This patch logically makes UnlinkedFunctionExecutable -> UnlinkedCodeBlock reference weak when VM is mini mode. If UnlinkedCodeBlock is used in previous GC
cycle, we retain it. But if it is not used, and if UnlinkedFunctionExecutable is only the cell keeping UnlinkedCodeBlock alive, we destroy it. It is a
heuristic. In a super pathological case, it could increase memory footprint. Consider the following example.

    UnlinkedFunctionExecutable(A1) -> UnlinkedCodeBlock(B1) -> UnlinkedFunctionExecutable(C1) -> UnlinkedCodeBlock(D1)
                                                                                                     ^
                                                                                                 CodeBlock(E1)

We could delete A1, B1, and C1 while keeping D1. But if we eventually re-execute the same code corresponding to A1, B1, C1, they will be newly created, and
we will create duplicate UnlinkedCodeBlock and instructions stream for D1.

                                                                                                 UnlinkedCodeBlock(D1)
                                                                                                     ^
                                                                                                 CodeBlock(E1)

    UnlinkedFunctionExecutable(A2) -> UnlinkedCodeBlock(B2) -> UnlinkedFunctionExecutable(C2) -> UnlinkedCodeBlock(D2)

But this does not happen in practice and even it happens, we eventually discard D1 and D2 since CodeBlock E1 will be jettisoned anyway. So in practice, we do
not see memory footprint increase. We tested it in Gmail and the target application, but both said memory footprint reduction (30 MB / 400 MB and 1 MB /6 MB).
While this affects on performance much on tests which has navigation (1-3 % regression in Speedometer2, note that JetStream2 does not show regression in x64,
while it is not enabling mini mode), we do not apply this to non mini mode VM until we come up with a good strategy to fasten performance of re-generation.
Personally I think flushing destroyed UnlinkedCodeBlock to the disk sounds promising.

If UnlinkedCodeBlock is generated from bytecode cache, we do not make UnlinkedFunctionExecutable -> UnlinkedCodeBlock link weak because the decoder of the bytecode
cache assumes that generated JSCells won't be destroyed while the parent cells of that cell are live. This is true in the current implementation, and this assumption
will be broken with this patch. So, for now, we do not make this link weak. Currently, our target application does not use bytecode cache so it is OK.

This patch also introduce simple heuristic. We are counting UnlinkedCodeBlock's age. And once the age becomes maximum size, we make UnlinkedFunctionExecutable ->
UnlinkedCodeBlock link weak. We also use execution counter information to reset this age: CodeBlock will reset undelying UnlinkedCodeBlock's age if it has executed
While this heuristic is quite simple, it has some effect in practice. Basically what happens with this heuristic is that UnlinkedFunctionExecutable ->
UnlinkedCodeBlock link strong. When GC happens, we are executing some CodeBlocks, which become live. And ScriptExecutables -> UnlinkedFunctionExecutables held
by this CodeBlock become also live. Then UnlinkedFunctionExecutables can mark the child UnlinkedCodeBlocks if it is not so old.
If some of parent UnlinkedFunctionExecutable becomes dead, child UnlinkedCodeBlocks tends to be dead unless some live CodeBlock holds it. But it is OK for a first
heuristics since this means that parent code block is now considered old, reachable UnlinkedCodeBlock will be used when the parent is executed again. So destroying
the tree is OK even if the tree may include some new UnlinkedCodeBlock. While we could make more sophisticated mechanism to manage these lifetime, I think this is a
good starting point.

Based on measurement, we pick 7 as a maximum age. If we pick 0, we can get more memory reduction (1 - 1.5 MB!), while we ends up reparsing codes so many times.
It seems that 7 can reduce fair amount of memory while doing small # of reparsing on average (usually, 1, 2. Sometimes, 100. But not 300, which is the case in 0).
If we want to get more memory reduction for the sake of performance, we could decrease this age limit.

Since we do not have an automated script right now so it is a bit difficult to measure memory footprint precisely. But manual testing shows that this patch improves
memory footprint of our target application from about 6.5 MB to about 5.9 MB.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):
* bytecode/CodeBlock.h:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::UnlinkedCodeBlock::visitChildren):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::age const):
(JSC::UnlinkedCodeBlock::resetAge):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::visitChildren):
(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):
(JSC::UnlinkedFunctionExecutable::decodeCachedCodeBlocks):
(JSC::UnlinkedFunctionExecutable::finalizeUnconditionally):
* bytecode/UnlinkedFunctionExecutable.h:
* heap/Heap.cpp:
(JSC::Heap::finalizeUnconditionalFinalizers):
* runtime/CachedTypes.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* runtime/CodeSpecializationKind.h:
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::isInMiniMode): Deleted.
* runtime/VM.h:
(JSC::VM::isInMiniMode):
(JSC::VM::useUnlinkedCodeBlockJettisoning):

Tools:

* Scripts/run-jsc-stress-tests:

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

3 months agoWeb Inspector: "Copy Path to Property" doesn't work with multiline keys
commit-queue@webkit.org [Mon, 10 Jun 2019 19:32:00 +0000 (19:32 +0000)]
Web Inspector: "Copy Path to Property" doesn't work with multiline keys
https://bugs.webkit.org/show_bug.cgi?id=198691

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-06-10
Reviewed by Matt Baker.

Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.

* UserInterface/Base/Utilities.js: Use JSON.stringify.

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

3 months agoIntegrate dark mode support for iOS.
timothy@apple.com [Mon, 10 Jun 2019 19:19:16 +0000 (19:19 +0000)]
Integrate dark mode support for iOS.
https://bugs.webkit.org/show_bug.cgi?id=198687
rdar://problem/51545643

Reviewed by Tim Horton.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Tests: css-dark-mode

* Configurations/FeatureDefines.xcconfig:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::showLetterpressedGlyphsWithAdvances):
* platform/ios/LocalCurrentTraitCollection.h: Added.
* platform/ios/LocalCurrentTraitCollection.mm: Added.
* platform/ios/PasteboardIOS.mm:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemColor const):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* pal/spi/ios/UIKitSPI.h:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _effectiveAppearanceIsDark]):
(-[WKWebView _effectiveAppearanceIsInactive]):
(-[WKWebView _dynamicUserInterfaceTraitDidChange]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::effectiveAppearanceIsDark const):
(WebKit::PageClientImpl::effectiveAppearanceIsInactive const):
* UIProcess/ios/WKPasswordView.mm:
(-[WKPasswordView showInScrollView:]):
(configureScrollView): Deleted.

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/Platform.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

* platform/ios/TestExpectations:

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

3 months agowebkitpy: xcrun simctl spawn *** launchctl print system output is not utf-8
jbedard@apple.com [Mon, 10 Jun 2019 18:01:05 +0000 (18:01 +0000)]
webkitpy: xcrun simctl spawn *** launchctl print system output is not utf-8
https://bugs.webkit.org/show_bug.cgi?id=198723

Reviewed by Aakash Jain.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.is_usable): Do not decode 'print system' output, it's already ASCII.

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

3 months agoWeb Inspector: REGRESSION(r246025): prototypes in object previews are visible even...
drousso@apple.com [Mon, 10 Jun 2019 17:59:28 +0000 (17:59 +0000)]
Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
https://bugs.webkit.org/show_bug.cgi?id=198721

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only.json-only .object-tree-property.prototype-property): Added.
(.object-tree.properties-only.json-only .object-tree-property .prototype-property): Deleted.

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

3 months agoREGRESSION (r245396): Page load time performance regression
ajuma@chromium.org [Mon, 10 Jun 2019 17:41:32 +0000 (17:41 +0000)]
REGRESSION (r245396): Page load time performance regression
https://bugs.webkit.org/show_bug.cgi?id=198382

Reviewed by Per Arne Vollan.

Use a delay of 2000ms instead of 500ms when scheduling rendering updates
for IntersectionObserver targets added during page load. This is a
speculative fix for a page load time regression caused by r245396 and
still not fixed after r245958.

* dom/Document.cpp:
(WebCore::Document::scheduleTimedRenderingUpdate):

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

3 months ago[JSC] Linker fails when unified sources are not in use
aperez@igalia.com [Mon, 10 Jun 2019 17:16:18 +0000 (17:16 +0000)]
[JSC] Linker fails when unified sources are not in use
https://bugs.webkit.org/show_bug.cgi?id=198722

Reviewed by Keith Miller.

Added missing inclusions of headers in several files which make use of inline functions.

* b3/B3AtomicValue.cpp:
* b3/B3BlockInsertionSet.cpp:
* b3/B3FenceValue.cpp:
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3PureCSE.cpp:
* b3/B3StackmapValue.cpp:
* b3/B3SwitchValue.cpp:
* b3/B3UseCounts.cpp:
* b3/B3VariableValue.cpp:
* b3/B3WasmAddressValue.cpp:
* b3/B3WasmBoundsCheckValue.cpp:
* ftl/FTLCompile.cpp:
* wasm/WasmSectionParser.cpp:
* wasm/WasmTable.cpp:
* wasm/WasmValidate.cpp:

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

3 months agoMake new Symbol/Promise API public
keith_miller@apple.com [Mon, 10 Jun 2019 16:35:00 +0000 (16:35 +0000)]
Make new Symbol/Promise API public
https://bugs.webkit.org/show_bug.cgi?id=198709

Reviewed by Saam Barati.

We also need to #ifdef some tests when building for older
platforms because the signatures for some methods are outdated on
those platforms.

* API/JSObjectRef.h:
* API/JSObjectRefPrivate.h:
* API/JSValue.h:
* API/JSValuePrivate.h:
* API/JSValueRef.h:
* API/tests/testapi.mm:
(testObjectiveCAPIMain):

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