WebKit-https.git
4 months agothere is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
philn@webkit.org [Wed, 10 Apr 2019 13:46:01 +0000 (13:46 +0000)]
there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
https://bugs.webkit.org/show_bug.cgi?id=196615

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Add vp8.0 and vp9.0 in supported mime-types if the corresponding video decoders are found.

No new tests, existing web-platform-tests cover this change.

* platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::initialize):

LayoutTests:

Update WPE baselines and add/unskip the
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html test in GTK.

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt: Copied from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt:

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

4 months agoUnreviewed. Fix WPE accessibility tests after r244059.
philn@webkit.org [Wed, 10 Apr 2019 11:08:40 +0000 (11:08 +0000)]
Unreviewed. Fix WPE accessibility tests after r244059.

We are failing to load the injected bundle due to undefined symbol
AccessibilityUIElement::replaceTextInRange().

* WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
(WTR::AccessibilityUIElement::replaceTextInRange):

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

4 months ago[GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
philn@webkit.org [Wed, 10 Apr 2019 09:14:18 +0000 (09:14 +0000)]
[GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
https://bugs.webkit.org/show_bug.cgi?id=196765

Reviewed by Xabier Rodriguez-Calvar.

Without the following patch in gst-plugins-bad, the uridownloader
doesn't relay need-context messages to its parent, so in our case
the player can't share its context with secondary webkitwebsrc
elements and a RELEASE_ASSERT is hit in the WebProcess.

So the workaround is to use again webkit+ protocol prefixes for
GStreamer versions older than 1.12.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/8cf858fb27919e1d631223375f81b98055623733

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::convertToInternalProtocol):
(WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
(webKitWebSrcGetProtocols):
(convertPlaybinURI):
(webKitWebSrcSetUri):
(CachedResourceStreamingClient::responseReceived):
(webKitSrcWouldTaintOrigin):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:

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

4 months ago[WPE] Avoid async IO starving timers
eocanha@igalia.com [Wed, 10 Apr 2019 08:55:55 +0000 (08:55 +0000)]
[WPE] Avoid async IO starving timers
https://bugs.webkit.org/show_bug.cgi?id=196733

Reviewed by Carlos Garcia Campos.

If AsyncIONetwork and DiskCacheRead priorities are higher than
MainThreadSharedTimer the timers get starved. This causes the NetworkProcess
to accumulate MB of data instead of handing it down to the WebProcess (done
using a Timer). This eventually causes an Out Of Memory kill on the
NetworkProcess on some embedded platforms with low memory limits.

This patch levels the three priorities to the same value, while still leaving
DiskCacheWrite with less priority than DiskCacheRead.

* wtf/glib/RunLoopSourcePriority.h: Changed RunLoopSourcePriority values for WPE.

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

4 months ago[ATK] Defer the emision of AtkObject::children-changed signal after layout is done
carlosgc@webkit.org [Wed, 10 Apr 2019 08:01:01 +0000 (08:01 +0000)]
[ATK] Defer the emision of AtkObject::children-changed signal after layout is done
https://bugs.webkit.org/show_bug.cgi?id=187948

Reviewed by Michael Catanzaro.

Source/WebCore:

The signal AtkObject::children-changed is emitted from AXObjectCache::attachWrapper() and
AXObjectCache::detachWrapper(). Both can be called in the middle of a layout, so we need to defer the emission
of the signal after the layout is done, to avoid other atk entry points from being called at that point, since
most of them update the backing store at the beginning.

Fixes: accessibility/children-changed-sends-notification.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::performDeferredCacheUpdate): Call platformPerformDeferredCacheUpdate().
* accessibility/AXObjectCache.h:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::wrapperParent): Helper to get the AtkObject parent of a given WebKitAccessible.
(WebCore::AXObjectCache::detachWrapper): Add wrapper to m_deferredDetachedWrapperList.
(WebCore::AXObjectCache::attachWrapper): Add object to m_deferredAttachedWrapperObjectList.
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Emit AtkObject::children-changed::add for objects
in m_deferredAttachedWrapperObjectList and AtkObject::children-changed::remove for wrappers in m_deferredDetachedWrapperList.
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
* accessibility/wpe/AXObjectCacheWPE.cpp:
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):

LayoutTests:

Remove expectations of accessibility/children-changed-sends-notification.html that passes now.

* platform/gtk/TestExpectations:

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

4 months ago[WinCairo][MiniBrowser] Pull down menu "Disable JavaScript" doesn't work.
commit-queue@webkit.org [Wed, 10 Apr 2019 08:00:41 +0000 (08:00 +0000)]
[WinCairo][MiniBrowser] Pull down menu "Disable JavaScript" doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=196727

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-04-10
Reviewed by Fujii Hironori.

* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::create):

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

4 months ago[ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
carlosgc@webkit.org [Wed, 10 Apr 2019 07:59:14 +0000 (07:59 +0000)]
[ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
https://bugs.webkit.org/show_bug.cgi?id=172281
<rdar://problem/37030990>

Reviewed by Joanmarie Diggs.

Source/WebCore:

The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
things differently, we don't include the static text elements individually, but parent element uses
textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.

Fixes: accessibility/insert-children-assert.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement const):

LayoutTests:

Update the test to expect the whole content text on atk and remove the test expectations.

* accessibility/insert-children-assert.html:
* platform/gtk/TestExpectations:

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

4 months agoUnreviewed, build fix for r244097
dpino@igalia.com [Wed, 10 Apr 2019 07:22:52 +0000 (07:22 +0000)]
Unreviewed, build fix for r244097

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::resume):
Added guards for ENABLE(SERVICE_WORKER)

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

4 months ago[CMake] WEBKIT_COMPUTE_SOURCES should use the target's derived sources directory
don.olmstead@sony.com [Wed, 10 Apr 2019 01:28:33 +0000 (01:28 +0000)]
[CMake] WEBKIT_COMPUTE_SOURCES should use the target's derived sources directory
https://bugs.webkit.org/show_bug.cgi?id=196741

Reviewed by Michael Catanzaro.

WEBKIT_COMPUTE_SOURCES is using ${DERIVED_SOURCES_DIR} directly. Instead it should
rely on the directory specified by the target.

* Source/cmake/WebKitFS.cmake:
Add variables that can be expanded within CMake to the derived sources directory for
a target.

* Source/cmake/WebKitMacros.cmake:
Use variable expansion rather than ${DERIVED_SOURCES_DIR} to determine the target's
derived sources directory.

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

4 months ago[ews-build] Add unit tests for PrintConfiguration
aakash_jain@apple.com [Wed, 10 Apr 2019 01:06:42 +0000 (01:06 +0000)]
[ews-build] Add unit tests for PrintConfiguration
https://bugs.webkit.org/show_bug.cgi?id=196752

Reviewed by Dewei Zhu.

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

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

4 months agoAdd Resource Load Statistics test case for Ping
wilander@apple.com [Wed, 10 Apr 2019 01:03:28 +0000 (01:03 +0000)]
Add Resource Load Statistics test case for Ping
https://bugs.webkit.org/show_bug.cgi?id=196748

Reviewed by Alex Christensen.

* http/tests/resourceLoadStatistics/ping-to-prevalent-resource-expected.txt: Added.
* http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html: Added.

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

4 months agoUnreviewed build maintenance -- update .xcfilelists.
krollin@apple.com [Wed, 10 Apr 2019 00:35:18 +0000 (00:35 +0000)]
Unreviewed build maintenance -- update .xcfilelists.

Source/JavaScriptCore:

* DerivedSources-input.xcfilelist:

Source/WebCore:

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:

Source/WebKit:

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:

Tools:

* DumpRenderTree/DerivedSources-input.xcfilelist:
* DumpRenderTree/DerivedSources-output.xcfilelist:

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

4 months agoTurn on editing test that should pass now
megan_gardner@apple.com [Tue, 9 Apr 2019 23:56:37 +0000 (23:56 +0000)]
Turn on editing test that should pass now
https://bugs.webkit.org/show_bug.cgi?id=196747
<rdar://problem/38779179>

Reviewed by Tim Horton.

Just turning on a test that needed to be turns off for a while due to compatibility changes
with the system.

* platform/ios-wk2/TestExpectations:

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

4 months ago[AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide...
zalan@apple.com [Tue, 9 Apr 2019 23:42:18 +0000 (23:42 +0000)]
[AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
https://bugs.webkit.org/show_bug.cgi?id=196743
<rdar://problem/43897551>

Reviewed by Tim Horton.

Source/WebCore:

This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
Now with the initial containing block width is firmly set to auto-sizing width, the overflow content will not stretch the ICB. Instead it overflows the ICB
and triggers scrolling the same way the non-auto-sizing mode does.

* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::enableAutoSizeMode):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::enableAutoSizeMode):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewLayoutSize):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: expected behavior change.
(TEST):

LayoutTests:

* css3/viewport-percentage-lengths/vh-auto-size-expected.html:
* css3/viewport-percentage-lengths/vh-auto-size.html:
* fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html:
* fast/dynamic/mail-autosize-viewport-unit.html:

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

4 months agoClose service worker database on network process suspension
youenn@apple.com [Tue, 9 Apr 2019 23:37:17 +0000 (23:37 +0000)]
Close service worker database on network process suspension
https://bugs.webkit.org/show_bug.cgi?id=196623
<rdar://problem/48930869>

Reviewed by Alex Christensen.

Source/WebCore:

Add suspend/resume support to SWServer.
On suspend, close the service worker database and stop pushing for changes.
On resume, push changes if needed.

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::close):
* workers/service/server/RegistrationDatabase.h:
(WebCore::RegistrationDatabase::isClosed const): Deleted.
* workers/service/server/RegistrationStore.cpp:
(WebCore::RegistrationStore::closeDatabase):
* workers/service/server/RegistrationStore.cpp:
(WebCore::RegistrationStore::pushChangesToDatabase):
(WebCore::RegistrationStore::clearAll):
(WebCore::RegistrationStore::startSuspension):
(WebCore::RegistrationStore::endSuspension):
* workers/service/server/RegistrationStore.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::startSuspension):
(WebCore::SWServer::endSuspension):
* workers/service/server/SWServer.h:

Source/WebKit:

Close service worker database when preparing to suspend.
On resume, push changes if any is needed.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::cancelPrepareToSuspend):
(WebKit::NetworkProcess::processDidResume):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _sendNetworkProcessWillSuspendImminently]):
(-[WKProcessPool _sendNetworkProcessDidResume]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::sendNetworkProcessWillSuspendImminently):
(WebKit::WebProcessPool::sendNetworkProcessDidResume):
* UIProcess/WebProcessPool.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

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

4 months ago[iPad] Should open popover when the spacebar is pressed
commit-queue@webkit.org [Tue, 9 Apr 2019 21:45:03 +0000 (21:45 +0000)]
[iPad] Should open popover when the spacebar is pressed
https://bugs.webkit.org/show_bug.cgi?id=196360
<rdar://problem/49389129>

Patch by Daniel Bates <dabates@apple.com> on 2019-04-09
Reviewed by Brent Fulgham.

Source/WebKit:

Pressing the spacebar should open the popover for a focused popup button (e.g. <select>) on iOS
just like it does on the Mac.

For now, we keep the iPhone behavior of blurring the element when the Done button is pressed and
hence pressing spacebar does nothing (because there is no focused element).

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryOpen]): Added. Extracted the logic from -_elementDidFocus to scroll to
the focused element, update the accessory and then tell the accessory to begin editing.
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Write in terms of -accessoryOpen.
* UIProcess/ios/forms/WKFormPeripheralBase.mm:
(-[WKFormPeripheralBase handleKeyEvent:]): Interpret the spacebar when the peripheral is closed (!_editing)
and call -accessoryOpen to ultimately call back to this peripheral to tell it to begin editing,
which will cause the popover to appear again.

Tools:

Add testing infrastructure to support waiting for a popover to be presented or dismissed.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::isShowingPopover const): Added.
(WTR::UIScriptController::platformSetWillPresentPopoverCallback): Added.
(WTR::UIScriptController::platformSetDidDismissPopoverCallback): Added.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptContext.h:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setWillPresentPopoverCallback): Added.
(WTR::UIScriptController::willPresentPopoverCallback const): Added.
(WTR::UIScriptController::setDidDismissPopoverCallback): Added.
(WTR::UIScriptController::didDismissPopoverCallback const): Added.
(WTR::UIScriptController::isShowingPopover const): Added.
(WTR::UIScriptController::platformSetWillPresentPopoverCallback): Added.
(WTR::UIScriptController::platformSetDidDismissPopoverCallback): Added.
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView initWithFrame:configuration:]): Update some state.
(-[TestRunnerWKWebView resetInteractionCallbacks]): Ditto.
(-[TestRunnerWKWebView _willPresentPopover]): Added.
(-[TestRunnerWKWebView _didDismissPopover]): Added.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::isShowingPopover const): Added.
(WTR::UIScriptController::platformSetWillPresentPopoverCallback): Added.
(WTR::UIScriptController::platformSetDidDismissPopoverCallback): Added.

LayoutTests:

Add an iPad-specific test to ensure that pressing the spacebar opens the popover and scrolls
the form control into view.

* fast/forms/ios/ipad/open-picker-using-keyboard-expected.txt: Added.
* fast/forms/ios/ipad/open-picker-using-keyboard.html: Added.
* platform/ios/TestExpectations: Skip tests in fast/forms/ios/ipad. We will unskip for iPad below.
* platform/ipad/TestExpectations: Mark tests in fast/forms/ios/ipad as PASS so we run them.
* resources/ui-helper.js:
(window.UIHelper.waitForPopoverToPresent):
(window.UIHelper.waitForPopoverToDismiss):

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

4 months agoUnreviewed, fix webkitpy failure after r244085.
cdumez@apple.com [Tue, 9 Apr 2019 21:42:32 +0000 (21:42 +0000)]
Unreviewed, fix webkitpy failure after r244085.

Use a list instead of a set for header includes so that the order is
maintained.

* Scripts/webkit/messages.py:

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

4 months agoRefresh WPT service worker expectations
youenn@apple.com [Tue, 9 Apr 2019 20:17:50 +0000 (20:17 +0000)]
Refresh WPT service worker expectations
https://bugs.webkit.org/show_bug.cgi?id=196732

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/window/cache-abort.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/worker/cache-abort.https-expected.txt:
* web-platform-tests/service-workers/service-worker/client-navigate.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall-include-uncontrolled.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-image-cache.https-expected.txt:
* web-platform-tests/service-workers/service-worker/multipart-image.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/performance-timeline.https-expected.txt:
* web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt:
* web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https-expected.txt:
* web-platform-tests/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt:
* web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https-expected.txt:

LayoutTests:

* TestExpectations:

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

4 months ago[Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
justin_fan@apple.com [Tue, 9 Apr 2019 20:03:18 +0000 (20:03 +0000)]
[Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
https://bugs.webkit.org/show_bug.cgi?id=196719

Reviewed by Myles C. Maxfield.

Source/WebCore:

Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.

Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html

* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::setBlendColor):
(WebCore::WebGPURenderPassEncoder::setViewport):
(WebCore::WebGPURenderPassEncoder::setScissorRect):
* Modules/webgpu/WebGPURenderPassEncoder.h:
* Modules/webgpu/WebGPURenderPassEncoder.idl:
* platform/graphics/gpu/GPURenderPassEncoder.h:
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setBlendColor):
(WebCore::GPURenderPassEncoder::setViewport):
(WebCore::GPURenderPassEncoder::setScissorRect):

LayoutTests:

Add blend-color-triangle-strip to set and blend with a custom blend color on the renderpass encoder.
Add viewport-scissor-rect-triangle-strip to draw a checkerboard by restricting the drawing viewport or scissor rectangle.

* webgpu/blend-color-triangle-strip.html: Added.
* webgpu/js/webgpu-functions.js:
(beginBasicRenderPass):
* webgpu/viewport-scissor-rect-triangle-strip-expected.html: Added.
* webgpu/viewport-scissor-rect-triangle-strip.html: Added.

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

4 months ago[Apple Pay] Add release logging to PaymentCoordinator
aestes@apple.com [Tue, 9 Apr 2019 19:53:35 +0000 (19:53 +0000)]
[Apple Pay] Add release logging to PaymentCoordinator
https://bugs.webkit.org/show_bug.cgi?id=196738

Reviewed by Alex Christensen.

Source/WebCore:

When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.

The following information might be logged: names of functions called, merchant API versions,
boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
completePaymentSession() was called with a final state result, boolean results of
shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
user scripts, and whether a client supports unrestricted Apple Pay.

* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::supportsVersion const):
(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::openPaymentSetup):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::completeMerchantValidation):
(WebCore::PaymentCoordinator::completeShippingMethodSelection):
(WebCore::PaymentCoordinator::completeShippingContactSelection):
(WebCore::PaymentCoordinator::completePaymentMethodSelection):
(WebCore::PaymentCoordinator::completePaymentSession):
(WebCore::PaymentCoordinator::abortPaymentSession):
(WebCore::PaymentCoordinator::cancelPaymentSession):
(WebCore::PaymentCoordinator::validateMerchant):
(WebCore::PaymentCoordinator::didAuthorizePayment):
(WebCore::PaymentCoordinator::didSelectPaymentMethod):
(WebCore::PaymentCoordinator::didSelectShippingMethod):
(WebCore::PaymentCoordinator::didSelectShippingContact):
(WebCore::PaymentCoordinator::didCancelPaymentSession):
(WebCore::PaymentCoordinator::shouldAllowApplePay const):
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
* Modules/applepay/PaymentCoordinatorClient.h:
(WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
* platform/Logging.h:
* testing/MockPaymentCoordinator.h:

Source/WebKit:

* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::isAlwaysOnLoggingAllowed const):
* WebProcess/ApplePay/WebPaymentCoordinator.h:

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

4 months ago[Cocoa] Awaken UIProcess if WebContent process is awakened from suspensions unexpectedly.
jer.noble@apple.com [Tue, 9 Apr 2019 19:37:28 +0000 (19:37 +0000)]
[Cocoa] Awaken UIProcess if WebContent process is awakened from suspensions unexpectedly.
https://bugs.webkit.org/show_bug.cgi?id=196659

Reviewed by Chris Dumez.

* Platform/IPC/Connection.h:
(IPC::Connection::sendWithAsyncReply):
* Platform/spi/ios/AssertionServicesSPI.h:
* Shared/Cocoa/ProcessTaskStateObserver.h: Added.
(WebKit::ProcessTaskStateObserver::setClient):
(WebKit::ProcessTaskStateObserver::client):
(WebKit::ProcessTaskStateObserver::taskState const):
* Shared/Cocoa/ProcessTaskStateObserver.mm: Added.
(-[WKProcessTaskStateObserverDelegate process:taskStateDidChange:]):
(WebKit::toProcessTaskStateObserverTaskState):
(WebKit::ProcessTaskStateObserver::ProcessTaskStateObserver):
(WebKit::ProcessTaskStateObserver::~ProcessTaskStateObserver):
(WebKit::ProcessTaskStateObserver::setTaskState):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended):
* UIProcess/ProcessAssertion.h:
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertion):
* UIProcess/ProcessThrottler.h:
(WebKit::ProcessThrottler::shouldBeRunnable const):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::reasonForState):
(WebKit::toBKSProcessAssertionReason):
(WebKit::ProcessAssertion::ProcessAssertion):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::processTaskStateDidChange):

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

4 months ago[CMake] WTF derived sources should only be referenced inside WTF
don.olmstead@sony.com [Tue, 9 Apr 2019 19:32:08 +0000 (19:32 +0000)]
[CMake] WTF derived sources should only be referenced inside WTF
https://bugs.webkit.org/show_bug.cgi?id=196706

Reviewed by Konstantin Tokarev.

.:

* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFS.cmake:

Source/WTF:

Use ${WTF_DERIVED_SOURCES_DIR} instead of ${DERIVED_SOURCES_DIR} within WTF.

* wtf/CMakeLists.txt:
* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:

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

4 months agoClicking "Go Back" from a safe browsing warning from an iframe should navigate the...
commit-queue@webkit.org [Tue, 9 Apr 2019 19:07:55 +0000 (19:07 +0000)]
Clicking "Go Back" from a safe browsing warning from an iframe should navigate the WKWebView back to the previous page
https://bugs.webkit.org/show_bug.cgi?id=196665
<rdar://45115669>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-09
Reviewed by Geoff Garen.

Source/WebKit:

It is insufficient to just not navigate the subframe.  We must leave the page that contained it.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::showSafeBrowsingWarning):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(goBack):
(+[SimpleLookupContext sharedLookupContext]):
(-[SimpleLookupContext lookUpURL:completionHandler:]):
(TEST):
(+[Simple3LookupContext sharedLookupContext]): Deleted.
(-[Simple3LookupContext lookUpURL:completionHandler:]): Deleted.

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

4 months agoJSC should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
ross.kirsling@sony.com [Tue, 9 Apr 2019 18:50:00 +0000 (18:50 +0000)]
JSC should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
https://bugs.webkit.org/show_bug.cgi?id=193073

Reviewed by Keith Miller.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEqualityOpImpl):
(JSC::BytecodeGenerator::emitEqualityOp): Deleted.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitEqualityOp):
Factor out the logic that uses the template parameter and keep it in the header.

* jit/JITPropertyAccess.cpp:
List off the template specializations needed by JITOperations.cpp.
This is unfortunate but at least there are only two (x2) by definition?
Trying to do away with this incurs a severe domino effect...

* API/JSValueRef.cpp:
* b3/B3OptimizeAssociativeExpressionTrees.cpp:
* b3/air/AirHandleCalleeSaves.cpp:
* builtins/BuiltinNames.cpp:
* bytecode/AccessCase.cpp:
* bytecode/BytecodeIntrinsicRegistry.cpp:
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/BytecodeRewriter.cpp:
* bytecode/BytecodeUseDef.h:
* bytecode/CodeBlock.cpp:
* bytecode/InstanceOfAccessCase.cpp:
* bytecode/MetadataTable.cpp:
* bytecode/PolyProtoAccessChain.cpp:
* bytecode/StructureSet.cpp:
* bytecompiler/NodesCodegen.cpp:
* dfg/DFGCFAPhase.cpp:
* dfg/DFGPureValue.cpp:
* heap/GCSegmentedArray.h:
* heap/HeapInlines.h:
* heap/IsoSubspace.cpp:
* heap/LocalAllocator.cpp:
* heap/LocalAllocator.h:
* heap/LocalAllocatorInlines.h:
* heap/MarkingConstraintSolver.cpp:
* inspector/ScriptArguments.cpp:
(Inspector::ScriptArguments::isEqual const):
* inspector/ScriptCallStackFactory.cpp:
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
* interpreter/StackVisitor.cpp:
* llint/LLIntEntrypoint.cpp:
* runtime/ArrayIteratorPrototype.cpp:
* runtime/BigIntPrototype.cpp:
* runtime/CachedTypes.cpp:
* runtime/ErrorType.cpp:
* runtime/IndexingType.cpp:
* runtime/JSCellInlines.h:
* runtime/JSImmutableButterfly.h:
* runtime/Operations.h:
* runtime/RegExpCachedResult.cpp:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpGlobalData.cpp:
* runtime/StackFrame.h:
* wasm/WasmSignature.cpp:
* wasm/js/JSToWasm.cpp:
* wasm/js/JSToWasmICCallee.cpp:
* wasm/js/WebAssemblyFunction.h:
Fix includes / forward declarations (and a couple of nearby clang warnings).

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

4 months agoUnreviewed, fix test failures after r239698.
drousso@apple.com [Tue, 9 Apr 2019 18:45:33 +0000 (18:45 +0000)]
Unreviewed, fix test failures after r239698.
<rdar://problem/47223615>

* http/tests/inspector/network/resource-security-connection.html:
Security connection information is sent as part of the metrics, not the response.

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

4 months agoPick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirected...
wilander@apple.com [Tue, 9 Apr 2019 18:19:59 +0000 (18:19 +0000)]
Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
https://bugs.webkit.org/show_bug.cgi?id=196558
<rdar://problem/47650245>

Reviewed by Youenn Fablet.

Source/WebCore:

Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html
       http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
       http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html

The existing API tests were expanded too.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAdClickAttribution const):
   Enhanced the use of AdClickAttribution::MaxEntropy.
* loader/AdClickAttribution.cpp:
(WebCore::AdClickAttribution::parseConversionRequest):
    New function to parse and validate URLs with a path starting with
    /.well-known/ad-click-attribution/.
(WebCore::AdClickAttribution::toString const):
    Added output for the conversion priority for testing purposes.
* loader/AdClickAttribution.h:
(WebCore::AdClickAttribution::Campaign::isValid const):
(WebCore::AdClickAttribution::Conversion::isValid const):
   Enhanced the use of AdClickAttribution::MaxEntropy.

Source/WebKit:

So called pixel requests have traditionally been used to send ad click
attribution data to click sources. The privacy implications of such
pixel requests are severe which is in part why browsers have started to
block cookies from being sent in such third-party requests.

To allow for a smooth transition to more privacy-friendly ad click
attribution, we should allow servers to make a redirect to
https://click-source.example/.well-known/ad-click-attribution/ to
trigger a so called conversion.

This patch checks for the well-known location in the path component of
the redirect URL. If the request indeed goes to the well-known location,
we parse the conversion data and send it to the storage in the network
session.

* NetworkProcess/NetworkAdClickAttribution.cpp:
(WebKit::NetworkAdClickAttribution::convert):
    Reporting function.
* NetworkProcess/NetworkAdClickAttribution.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
    Now checks for the well-known location through a call to
    WebCore::AdClickAttribution::parseConversionRequest().
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::convertAdClickAttribution):
    Piping to WebKit::NetworkAdClickAttribution::convert().
* NetworkProcess/NetworkSession.h:

Tools:

* TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp:
(TestWebKitAPI::TEST):
    Added tests of WebCore::AdClickAttribution::parseConversionRequest().

LayoutTests:

* http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:
   Enhanced the use of AdClickAttribution::MaxEntropy.
* http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt: Added.
* http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html: Added.
* http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt: Added.
* http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html: Added.
* http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt: Added.
* http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html: Added.
* http/tests/adClickAttribution/resources/redirectToConversion.php: Added.
* http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php: Added.
* platform/ios-wk2/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:
   Enhanced the use of AdClickAttribution::MaxEntropy.

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

4 months ago[iOS] WebContent processes should be marked as "Foreground Running" when their view...
cdumez@apple.com [Tue, 9 Apr 2019 18:08:27 +0000 (18:08 +0000)]
[iOS] WebContent processes should be marked as "Foreground Running" when their view is visible
https://bugs.webkit.org/show_bug.cgi?id=196695
<rdar://problem/48073787>

Reviewed by Tim Horton.

In order for WebContent processes to get marked as "Foreground Running" when their view
is visible on iOS, we now construct a _UILayerHostView in the UIProcess and add it as
a subview of the WKContentView. The _UILayerHostView's visibility target is the
WebContent process currently associated with the view.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/PageClient.h:
(WebKit::PageClient::didCreateContextForVisibilityPropagation):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::contextIDForVisibilityPropagation):
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didCreateContextForVisibilityPropagation):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView _setupVisibilityPropagationView]):
(-[WKContentView _processDidExit]):
(-[WKContentView _didRelaunchProcess]):
(-[WKContentView _processDidCreateContextForVisibilityPropagation]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCreateContextForVisibilityPropagation):
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::didCreateContextForVisibilityPropagation):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

4 months agoinspector/canvas/css-canvas-clients.html is a flaky failure
sroberts@apple.com [Tue, 9 Apr 2019 18:07:25 +0000 (18:07 +0000)]
inspector/canvas/css-canvas-clients.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=174272

Unreviewed test gardening

* platform/mac/TestExpectations: Updating expectations to unskip test and just mark as a flaky failure

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

4 months agoinspector/console/console-time.html is a flaky failure
sroberts@apple.com [Tue, 9 Apr 2019 18:04:02 +0000 (18:04 +0000)]
inspector/console/console-time.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=158006

Unreviewed test gardening.

* platform/mac/TestExpectations: Updating expecations for flaky failure

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

4 months ago[ Mac ] REGRESSION (r237587) Layout Test compositing/visible-rect/animated-from-none...
graouts@webkit.org [Tue, 9 Apr 2019 17:50:11 +0000 (17:50 +0000)]
[ Mac ] REGRESSION (r237587) Layout Test compositing/visible-rect/animated-from-none.html is flaky text diff failure
https://bugs.webkit.org/show_bug.cgi?id=194798
<rdar://problem/48181898>

Reviewed by Dean Jackson.

When using the Web Animations engine, the best way to run code as an animation start is to use the "ready" promise, whereas
DOM events are dispatched asynchronously and, in the case of this test, might have an animation progress that is greater
than 0 and yield an animated transform that isn't quite the identity matrix.

* compositing/visible-rect/animated-from-none.html:

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

4 months ago[CMake] Apple builds should use ICU_INCLUDE_DIRS
don.olmstead@sony.com [Tue, 9 Apr 2019 16:57:22 +0000 (16:57 +0000)]
[CMake] Apple builds should use ICU_INCLUDE_DIRS
https://bugs.webkit.org/show_bug.cgi?id=196720

Reviewed by Konstantin Tokarev.

.:

The Apple platform is using ${DERIVED_SOURCES_WTF_DIR} for hosting the ICU headers.
Instead it should stage the headers into ${ICU_INCLUDE_DIRS} so no special handling
is needed.

* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/OptionsMac.cmake:

Source/JavaScriptCore:

* PlatformMac.cmake:

Source/WebCore:

* PlatformMac.cmake:

Source/WebCore/PAL:

* pal/PlatformMac.cmake:

Source/WTF:

Copy ICU headers for Apple builds into ICU_INCLUDE_DIRS.

* CMakeLists.txt:
* wtf/PlatformMac.cmake:

Tools:

* TestWebKitAPI/PlatformMac.cmake:

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

4 months agoiOS 12 Simulator Release WK2 frequently timing out while running layout tests
jbedard@apple.com [Tue, 9 Apr 2019 16:14:43 +0000 (16:14 +0000)]
iOS 12 Simulator Release WK2 frequently timing out while running layout tests
https://bugs.webkit.org/show_bug.cgi?id=196694
<rdar://problem/48388734>

Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer.diff_image): If the ImageDiff process has data, kill it before running again.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.has_available_stdout): Check if stdout has data in it.
(ServerProcess._wait_for_data_and_update_buffers_using_select):
(ServerProcess._wait_for_data_and_update_buffers_using_win32_apis):
* Scripts/webkitpy/port/server_process_mock.py:
(MockServerProcess.has_available_stdout):
* Scripts/webkitpy/port/server_process_unittest.py:
(TestServerProcess.serial_test_basic):

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

4 months agoClean up Int52 code and some bugs in it
sbarati@apple.com [Tue, 9 Apr 2019 16:06:48 +0000 (16:06 +0000)]
Clean up Int52 code and some bugs in it
https://bugs.webkit.org/show_bug.cgi?id=196639
<rdar://problem/49515757>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/spec-any-int-as-double-produces-any-int52-from-int52-rep.js: Added.

Source/JavaScriptCore:

This patch fixes bugs in our Int52 code. The primary change in this patch is
adopting a segregated type lattice for Int52. Previously, for Int52 values,
we represented them with SpecInt32Only and SpecInt52Only. For an Int52,
SpecInt32Only meant that the value is in int32 range. And SpecInt52Only meant
that the is outside of the int32 range.

However, this got confusing because we reused SpecInt32Only both for JSValue
representations and Int52 representations. This actually lead to some bugs.

1. It's possible that roundtripping through Int52 representation would say
it produces the wrong type. For example, consider this program and how we
used to annotate types in AI:
a: JSConstant(10.0) => m_type is SpecAnyIntAsDouble
b: Int52Rep(@a) => m_type is SpecInt52Only
c: ValueRep(@b) => m_type is SpecAnyIntAsDouble

In AI, for the above program, we'd say that @c produces SpecAnyIntAsDouble.
However, the execution semantics are such that it'd actually produce a boxed
Int32. This patch fixes the bug where we'd say that Int52Rep over SpecAnyIntAsDouble
would produce SpecInt52Only. This is clearly wrong, as SpecAnyIntAsDouble can
mean an int value in either int32 or int52 range.

2. AsbstractValue::validateTypeAcceptingBoxedInt52 was wrong in how it
accepted Int52 values. It was wrong in two different ways:
a: If the AbstractValue's type was SpecInt52Only, and the incoming value
was a boxed double, but represented a value in int32 range, the incoming
value would incorrectly validate as being acceptable. However, we should
have rejected this value.
b: If the AbstractValue's type was SpecInt32Only, and the incoming value
was an Int32 boxed in a double, this would not validate, even though
it should have validated.

Solving 2 was easiest if we segregated out the Int52 type into its own
lattice. This patch makes a new Int52 lattice, which is composed of
SpecInt32AsInt52 and SpecNonInt32AsInt52.

The conversion rules are now really simple.

Int52 rep => JSValue rep
SpecInt32AsInt52 => SpecInt32Only
SpecNonInt32AsInt52 => SpecAnyIntAsDouble

JSValue rep => Int52 rep
SpecInt32Only => SpecInt32AsInt52
SpecAnyIntAsDouble => SpecInt52Any

With these rules, the program in (1) will now correctly report that @c
returns SpecInt32Only | SpecAnyIntAsDouble.

* bytecode/SpeculatedType.cpp:
(JSC::dumpSpeculation):
(JSC::speculationToAbbreviatedString):
(JSC::int52AwareSpeculationFromValue):
(JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):
(JSC::speculationFromString):
* bytecode/SpeculatedType.h:
(JSC::isInt32SpeculationForArithmetic):
(JSC::isInt32OrBooleanSpeculationForArithmetic):
(JSC::isAnyInt52Speculation):
(JSC::isIntAnyFormat):
(JSC::isInt52Speculation): Deleted.
(JSC::isAnyIntSpeculation): Deleted.
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::fixTypeForRepresentation):
(JSC::DFG::AbstractValue::checkConsistency const):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::isInt52Any const):
(JSC::DFG::AbstractValue::validateTypeAcceptingBoxedInt52 const):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupArithMul):
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupGetPrototypeOf):
(JSC::DFG::FixupPhase::fixupToThis):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::observeUseKindOnNode):
(JSC::DFG::FixupPhase::fixIntConvertingEdge):
(JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):
(JSC::DFG::FixupPhase::fixupChecksInBlock):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::addShouldSpeculateInt52):
(JSC::DFG::Graph::binaryArithShouldSpeculateInt52):
(JSC::DFG::Graph::unaryArithShouldSpeculateInt52):
(JSC::DFG::Graph::addShouldSpeculateAnyInt): Deleted.
(JSC::DFG::Graph::binaryArithShouldSpeculateAnyInt): Deleted.
(JSC::DFG::Graph::unaryArithShouldSpeculateAnyInt): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateInt52):
(JSC::DFG::Node::shouldSpeculateAnyInt): Deleted.
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::setIntTypedArrayLoadResult):
(JSC::DFG::SpeculativeJIT::compileArithAdd):
(JSC::DFG::SpeculativeJIT::compileArithSub):
(JSC::DFG::SpeculativeJIT::compileArithNegate):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt52):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* dfg/DFGVariableAccessData.cpp:
(JSC::DFG::VariableAccessData::makePredictionForDoubleFormat):
(JSC::DFG::VariableAccessData::couldRepresentInt52Impl):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):
(JSC::FTL::DFG::LowerDFGToB3::setIntTypedArrayLoadResult):

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

4 months agoSource/WebCore:
jer.noble@apple.com [Tue, 9 Apr 2019 15:57:45 +0000 (15:57 +0000)]
Source/WebCore:
Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

Test: media/track/track-in-band-metadata-display-order.html

Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
TextTrackCueGeneric for testing.

Drive-by fixes:

Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
a HTMLMediaElement*

TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
enable use of is<> and downcast<>.

* Source/WebCore/CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Sources.txt:
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::parentMediaElement):
* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::logger const):
(WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
(WebCore::MediaControlTextTrackContainerElement::logChannel const):
* html/shadow/MediaControlElements.h:
* html/track/DataCue.h:
(isType):
* html/track/TextTrackCueGeneric.h:
(isType):
* html/track/TextTrackCueGeneric.idl: Added.
* html/track/VTTCue.h:
(isType):
* testing/Internals.cpp:
(WebCore::Internals::createGenericCue):
* testing/Internals.h:
* testing/Internals.idl:

Tools:
Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

Drive-by bug fix: allow tests to play audio without a user gesture by default.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:
Add test for fix of #196095
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

* media/track/track-in-band-metadata-display-order-expected.txt: Added.
* media/track/track-in-band-metadata-display-order.html: Added.

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

4 months agoRemove unnecessary network process assertion for IDB close
sihui_liu@apple.com [Tue, 9 Apr 2019 15:56:45 +0000 (15:56 +0000)]
Remove unnecessary network process assertion for IDB close
https://bugs.webkit.org/show_bug.cgi?id=196693

Reviewed by Geoffrey Garen.

Source/WebCore:

We already took assertion at WebCore::SQLiteDatabase::close.

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::m_quotaManagerGetter): Deleted.
(WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
(WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.
* Modules/indexeddb/server/IDBServer.h:
(WebCore::IDBServer::IDBServer::create): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
(WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createIDBServer):
(WebKit::NetworkProcess::notifyHoldingLockedFiles): Deleted.
* NetworkProcess/NetworkProcess.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::setIsIDBDatabaseHoldingLockedFiles): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:

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

4 months ago[JSCOnly] Add an i386 JSCOnly EWS that runs tests
commit-queue@webkit.org [Tue, 9 Apr 2019 15:43:00 +0000 (15:43 +0000)]
[JSCOnly] Add an i386 JSCOnly EWS that runs tests
https://bugs.webkit.org/show_bug.cgi?id=196690

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2019-04-09
Reviewed by Michael Catanzaro.

* QueueStatusServer/config/queues.py:
* Scripts/webkitpy/common/config/ews.json:
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(test_ews_name):

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

4 months agoLoads using loadHTMLString() cause flashing when process-swapping
cdumez@apple.com [Tue, 9 Apr 2019 14:20:12 +0000 (14:20 +0000)]
Loads using loadHTMLString() cause flashing when process-swapping
https://bugs.webkit.org/show_bug.cgi?id=196714
<rdar://problem/49637354>

Reviewed by Antti Koivisto.

Source/WebKit:

Our logic to decide if we should construct a SuspendedPageProxy on process-swap was assuming
a SuspendedPageProxy is only useful for PageCache and would therefore not create one if PageCache
is disabled or if there is no associated WebBackForwardListItem. However, constructing a
SuspendedPageProxy is also useful to prevent flashing when process-swapping as we need to keep
displaying the layer of the previous process until there is something meaningful to show in the
new process.

This patch makes it so that we now construct a SuspendedPageProxy on process-swap, even if
PageCache is disabled or if there is no associated WebBackForwardListItem. The process in
question will not be useful for PageCache but it will avoid flashing. The SuspendedPageProxy's
process may also get used for future navigations to the same site (as demonstrated by the
API test) which is beneficial for performance.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
* UIProcess/SuspendedPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::suspendCurrentPageIfPossible):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::findReusableSuspendedPageProcess):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

4 months agoInitialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
commit-queue@webkit.org [Tue, 9 Apr 2019 10:21:03 +0000 (10:21 +0000)]
Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
https://bugs.webkit.org/show_bug.cgi?id=196350

Patch by Eike Rathke <erack@redhat.com> on 2019-04-09
Reviewed by Xabier Rodriguez-Calvar.

trackTypeAsString was uninitialized in the
TrackPrivateBaseGStreamer::TrackType::Text case when calling
GST_INFO_OBJECT().

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::enableTrack):

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

4 months agoUnreviewed. Fix ATK accessibility tests after r244059.
carlosgc@webkit.org [Tue, 9 Apr 2019 09:48:21 +0000 (09:48 +0000)]
Unreviewed. Fix ATK accessibility tests after r244059.

We are failing to load the injected bundle due to undefined symbol
AccessibilityUIElement::replaceTextInRange().

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::replaceTextInRange):

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

4 months ago[ATK] Cleanup WebKitAccessibleHyperlink
carlosgc@webkit.org [Tue, 9 Apr 2019 09:01:35 +0000 (09:01 +0000)]
[ATK] Cleanup WebKitAccessibleHyperlink
https://bugs.webkit.org/show_bug.cgi?id=196602

Reviewed by Michael Catanzaro.

Cleanups:

 - Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set
   the object data here.
 - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
   struct are no longer leaked.
 - Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
 - Use nullptr instead of 0 and other coding style issues.

* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(webkitAccessibleHyperlinkActionDoAction):
(webkitAccessibleHyperlinkActionGetNActions):
(webkitAccessibleHyperlinkActionGetDescription):
(webkitAccessibleHyperlinkActionGetKeybinding):
(webkitAccessibleHyperlinkActionGetName):
(atk_action_interface_init):
(webkitAccessibleHyperlinkGetURI):
(webkitAccessibleHyperlinkGetObject):
(rangeLengthForObject):
(webkitAccessibleHyperlinkGetStartIndex):
(webkitAccessibleHyperlinkGetEndIndex):
(webkitAccessibleHyperlinkIsValid):
(webkitAccessibleHyperlinkGetNAnchors):
(webkitAccessibleHyperlinkIsSelectedLink):
(webkitAccessibleHyperlinkGetProperty):
(webkitAccessibleHyperlinkSetProperty):
(webkit_accessible_hyperlink_class_init):
(webkitAccessibleHyperlinkGetOrCreate):
(core): Deleted.
(atkActionInterfaceInit): Deleted.
(getRangeLengthForObject): Deleted.
(webkitAccessibleHyperlinkFinalize): Deleted.
(webkitAccessibleHyperlinkClassInit): Deleted.
(webkitAccessibleHyperlinkInit): Deleted.
(webkitAccessibleHyperlinkGetType): Deleted.
(webkitAccessibleHyperlinkNew): Deleted.
(webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.
* accessibility/atk/WebKitAccessibleHyperlink.h:
* accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
(webkitAccessibleHyperlinkImplGetHyperlink):
(webkitAccessibleHyperlinkImplInterfaceInit):

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

4 months agoASSERTION FAILED: !scope.exception() || !hasProperty in JSObject::get
tzagallo@apple.com [Tue, 9 Apr 2019 07:54:18 +0000 (07:54 +0000)]
ASSERTION FAILED: !scope.exception() || !hasProperty in JSObject::get
https://bugs.webkit.org/show_bug.cgi?id=196708
<rdar://problem/49556803>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/proxy-getter-stack-overflow.js: Added.
(const.handler.get target):
(const.handler.has):
(try.with):
(catch):

Source/JavaScriptCore:

`operationPutToScope` needs to return early if an exception is thrown while
checking if `hasProperty`.

* jit/JITOperations.cpp:

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

4 months agoRemove some iOS #ifdefs around sticky-related code
simon.fraser@apple.com [Tue, 9 Apr 2019 06:23:21 +0000 (06:23 +0000)]
Remove some iOS #ifdefs around sticky-related code
https://bugs.webkit.org/show_bug.cgi?id=196726

Reviewed by Zalan Bujtas.

Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
should not have iOS-only code.

The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
overflow:scroll can be the container for sticky. The assertion can be removed.

* rendering/RenderLayer.cpp: Fix spacing in some logging.
(WebCore::outputPaintOrderTreeRecursive):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):

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

4 months ago[JSC] DFG should respect node's strict flag
ysuzuki@apple.com [Tue, 9 Apr 2019 03:23:15 +0000 (03:23 +0000)]
[JSC] DFG should respect node's strict flag
https://bugs.webkit.org/show_bug.cgi?id=196617

Reviewed by Saam Barati.

JSTests:

* stress/put-by-val-direct-should-respect-strict-mode-of-inlining-codeblock.js: Added.
(shouldEqual):
(makeUnwriteableUnconfigurableObject):
(runTest):
* stress/put-dynamic-var-strict-and-sloppy.js: Added.
(shouldBe):
(shouldThrow):
(with.result):
(with.putValueStrict):
(with.putValueSloppy):

Source/JavaScriptCore:

We accidentally use codeBlock->isStrictMode() directly in DFG and FTL. But this is wrong since this CodeBlock is the top level DFG/FTL CodeBlock,
and this code does not respect the isStrictMode flag for the inlined CodeBlocks. In this patch, we start using isStrictModeFor(CodeOrigin) consistently
in DFG and FTL to get the right isStrictMode flag for the DFG node.
And we also split compilePutDynamicVar into compilePutDynamicVarStrict and compilePutDynamicVarNonStrict since (1) it is cleaner than accessing inlined
callframe in the operation function, and (2) it is aligned to the other functions like operationPutByValDirectNonStrict etc.
This bug is discovered by RandomizingFuzzerAgent by expanding the DFG coverage.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupToThis):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutDynamicVar):
(JSC::DFG::SpeculativeJIT::compileToThis):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutDynamicVar):

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

4 months agoAX: Support API: accessibilityReplaceRange:withText
Hironori.Fujii@sony.com [Tue, 9 Apr 2019 01:54:24 +0000 (01:54 +0000)]
AX: Support API: accessibilityReplaceRange:withText
https://bugs.webkit.org/show_bug.cgi?id=196636

Unreviewed build fix for Windows port.

* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::replaceTextInRange): Added.

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

4 months ago[CMake][WinCairo] Separate copied headers into different directories
don.olmstead@sony.com [Tue, 9 Apr 2019 01:38:50 +0000 (01:38 +0000)]
[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

.:

Add variables for the paths to copied framework headers. This is done to be
explicit rather than relying on ${FORWARDING_HEADERS_DIR}.

Currently all ports but WinCairo will default to ${FORWARDING_HEADERS_DIR}.
WinCairo overrides them to provide a directory structure that looks more
like what happens in an XCode build. This is meant as an intermediate step
towards making all CMake ports behave like this.

* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* CMakeLists.txt:
* shell/PlatformWin.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:

Source/WebCore/PAL:

* pal/CMakeLists.txt:

Source/WebKit:

* CMakeLists.txt:
* PlatformWin.cmake:

Source/WebKitLegacy:

* CMakeLists.txt:
* PlatformWin.cmake:

Source/WTF:

* wtf/CMakeLists.txt:

Tools:

* DumpRenderTree/CMakeLists.txt:
* MiniBrowser/win/CMakeLists.txt:
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformWin.cmake:

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

4 months agoLog stack-trace for run-webkit-tests when interrupted
jbedard@apple.com [Tue, 9 Apr 2019 01:32:17 +0000 (01:32 +0000)]
Log stack-trace for run-webkit-tests when interrupted
https://bugs.webkit.org/show_bug.cgi?id=176393
<rdar://problem/34262310>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/common/interrupt_debugging.py: Added.
(log_stack_trace): Given a Python frame object, log a stack trace to the provided file.
(StackTraceFileContext): Context which allows stack-traces to be printed to stderr or to a file.
(log_stack_trace_on_term): Attach a listener to SIGTERM so that a stack-trace can be logged when a program is terminated.
(log_stack_trace_on_ctrl_c): Attach a listener to SIGINT so that a stack-trace can be logged when a program is CTRL+Ced.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(main): Set handlers to log stack trace on interruption.

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

4 months agoWeb Inspector: Elements tab: Classes toggle should use accent color on hover
mattbaker@apple.com [Tue, 9 Apr 2019 01:31:54 +0000 (01:31 +0000)]
Web Inspector: Elements tab: Classes toggle should use accent color on hover
https://bugs.webkit.org/show_bug.cgi?id=196266

Reviewed by Devin Rousso.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected:active::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected): Deleted.
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover): Deleted.

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

4 months agoAX: Support API: accessibilityReplaceRange:withText
Hironori.Fujii@sony.com [Tue, 9 Apr 2019 01:26:23 +0000 (01:26 +0000)]
AX: Support API: accessibilityReplaceRange:withText
https://bugs.webkit.org/show_bug.cgi?id=196636

Unreviewed build fix for Windows port.

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::replaceTextInRange): Changed the return value type from void to bool.

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

4 months agoAX: Automatically compute accessibility labels for Apple Pay buttons
cfleizach@apple.com [Tue, 9 Apr 2019 00:58:19 +0000 (00:58 +0000)]
AX: Automatically compute accessibility labels for Apple Pay buttons
https://bugs.webkit.org/show_bug.cgi?id=196661

Reviewed by Joanmarie Diggs.

Source/WebCore:

Detect Apple Pay buttons and return a standard role and label for them based on their type.

Test: accessibility/mac/apple-pay-labels.html
      accessibility/mac/apple-pay-session-v4.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isControl const):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::applePayButtonDescription const):
(WebCore::AccessibilityRenderObject::titleElementText const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::isApplePayButton const):
(WebCore::AccessibilityRenderObject::applePayButtonType const):
* accessibility/AccessibilityRenderObject.h:
* en.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::AXApplePayPlainLabel):
(WebCore::AXApplePayBuyLabel):
(WebCore::AXApplePaySetupLabel):
(WebCore::AXApplePayDonateLabel):
(WebCore::AXApplePayCheckOutLabel):
(WebCore::AXApplePayBookLabel):
(WebCore::AXApplePaySubscribeLabel):
* platform/LocalizedStrings.h:

LayoutTests:

* accessibility/mac/apple-pay-labels-expected.txt: Added.
* accessibility/mac/apple-pay-labels.html: Added.
* accessibility/mac/apple-pay-session-v4-expected.txt: Added.
* accessibility/mac/apple-pay-session-v4.html: Added.

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

4 months ago[ews-build] Scripts using Buildbot API have CORS error
aakash_jain@apple.com [Tue, 9 Apr 2019 00:42:28 +0000 (00:42 +0000)]
[ews-build] Scripts using Buildbot API have CORS error
https://bugs.webkit.org/show_bug.cgi?id=196709

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/ews-build/master.cfg: Set allowed_origins appropriately.

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

4 months agoAX: Support API: accessibilityReplaceRange:withText
cfleizach@apple.com [Tue, 9 Apr 2019 00:39:50 +0000 (00:39 +0000)]
AX: Support API: accessibilityReplaceRange:withText
https://bugs.webkit.org/show_bug.cgi?id=196636

Reviewed by Daniel Bates.

Source/WebCore:

Support this platform API on mac to provide a way to replace a range of editable text.

Test: accessibility/mac/replace-text-with-range.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::replaceTextInRange):
* accessibility/AccessibilityObject.h:
* accessibility/mac/AccessibilityObjectBase.mm:
(WebCore::PlainTextRange::PlainTextRange):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(replaceTextInRangeCallback):
(AccessibilityUIElement::replaceTextInRange):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::replaceTextInRange):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::replaceTextInRange):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::replaceTextInRange):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::replaceTextInRange):

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

4 months ago[JSC] isRope jump in StringSlice should not jump over register allocations
ysuzuki@apple.com [Tue, 9 Apr 2019 00:00:24 +0000 (00:00 +0000)]
[JSC] isRope jump in StringSlice should not jump over register allocations
https://bugs.webkit.org/show_bug.cgi?id=196716

Reviewed by Saam Barati.

JSTests:

* stress/is-rope-check-in-string-slice-should-not-jump-over-register-allocations.js: Added.
(foo.bar):
(foo):

Source/JavaScriptCore:

Jumping over the register allocation code in DFG (like the following) is wrong.

    auto jump = m_jit.branchXXX();
    {
        GPRTemporary reg(this);
        GPRReg regGPR = reg.gpr();
        ...
    }
    jump.link(&m_jit);

When GPRTemporary::gpr allocates a new register, it can flush the previous register value into the stack and make the register usable.
Jumping over this register allocation code skips the flushing code, and makes the DFG's stack and register content tracking inconsistent:
DFG thinks that the content is flushed and stored in particular stack slot even while this flushing code is skipped.
In this patch, we perform register allocations before jumping to the slow path based on `isRope` condition in StringSlice.

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

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

4 months ago[JSC] to_index_string should not assume incoming value is Uint32
ysuzuki@apple.com [Mon, 8 Apr 2019 23:33:05 +0000 (23:33 +0000)]
[JSC] to_index_string should not assume incoming value is Uint32
https://bugs.webkit.org/show_bug.cgi?id=196713

Reviewed by Saam Barati.

JSTests:

* stress/to-index-string-should-not-assume-incoming-value-is-uint32.js: Added.
(foo):

Source/JavaScriptCore:

The slow path of to_index_string assumes that incoming value is Uint32. But we should not have
this assumption since DFG may decide we should have it double format. This patch removes this
assumption, and instead, we should assume that incoming value is AnyInt and the range of this
is within Uint32.

* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

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

4 months ago[iOS] Do not allow starting selection drags when selection views are not visible
wenson_hsieh@apple.com [Mon, 8 Apr 2019 22:49:20 +0000 (22:49 +0000)]
[iOS] Do not allow starting selection drags when selection views are not visible
https://bugs.webkit.org/show_bug.cgi?id=196686
<rdar://problem/49399192>

Reviewed by Tim Horton.

Source/WebCore:

See WebKit ChangeLog for more details.

Tests:  DragAndDropTests.CanDragImageWhenNotFirstResponder
        DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder

* page/DragController.cpp:
(WebCore::DragController::draggableElement const):

Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.

Source/WebKit:

Currently, on iOS, it's possible to start dragging selected text in a web view even if the selection itself is
not visible. This can happen if the user selects some text, focuses a native text field, and then long presses
the previously selected text. This is because the text is still selected in the document since we don't clear
the selection when resigning first responder on iOS, despite the fact that the native selection view is no
longer present.

To fix this, we add plumbing to specify the set of allowed drag source actions when requesting drag start; this
set of allowed drag source actions only includes DragSourceActionSelection if the selection view can be visible
(i.e. the content view is first responder, and isn't suppressing text interactions). We then update WebPage's
allowed drag source actions with this given set of actions, while sending "dragstart" to the page.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Only bail out of text selection in text that is already selected if the web view allows dragging text selections
(i.e. the web view is first responder, and is not suppressing text interactions).

(-[WKContentView _allowedDragSourceActions]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):

Pass the set of allowed drag source actions when requesting a drag start or adding items to an existing session.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::requestDragStart):
(WebKit::WebPageProxy::requestAdditionalItemsForDragSession):

Plumb the allowed drag source actions from the UI process (WKContentView) over to the web process (WebPage).

* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::dragSourceActionMaskForPoint):

Instead of always returning Any, consult WebPage's allowed drag source actions.

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::allowedDragSourceActions const):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDragStart):
(WebKit::WebPage::requestAdditionalItemsForDragSession):

Set WebPage's allowed drag source actions to the given set of actions when sending a drag start to the page.

Tools:

Adjust some existing API tests to make the web view become first responder before trying to begin dragging, and
also add some new API tests to cover scenarios where the web view is not first responder.

* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:

Add a switch to optionally make the web view first responder when starting the simulated drag.

* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator initWithWebView:]):
(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):

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

4 months agoAdd a test to check for the service worker process name
youenn@apple.com [Mon, 8 Apr 2019 22:29:47 +0000 (22:29 +0000)]
Add a test to check for the service worker process name
https://bugs.webkit.org/show_bug.cgi?id=196621

Reviewed by Chris Dumez.

Source/WebCore:

Add a service worker internal API to get process name.
Covered by updated test.

* WebCore.xcodeproj/project.pbxproj:
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::processName const):
* testing/ServiceWorkerInternals.h:
* testing/ServiceWorkerInternals.idl:
* testing/ServiceWorkerInternals.mm: Added.

LayoutTests:

* http/wpt/service-workers/online-worker.js:
(async.doTest):

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

4 months agoUnreviewed, speculative fix for build failure in old macOS after r243887
ysuzuki@apple.com [Mon, 8 Apr 2019 22:26:19 +0000 (22:26 +0000)]
Unreviewed, speculative fix for build failure in old macOS after r243887
https://bugs.webkit.org/show_bug.cgi?id=196475

* dom/NodeList.h:

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

4 months ago[Web GPU] Fix Web GPU experimental feature on iOS
justin_fan@apple.com [Mon, 8 Apr 2019 22:11:01 +0000 (22:11 +0000)]
[Web GPU] Fix Web GPU experimental feature on iOS
https://bugs.webkit.org/show_bug.cgi?id=196632

Reviewed by Myles C. Maxfield.

Source/JavaScriptCore:

Properly make Web GPU available on iOS 11+.

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty/libwebrtc:

Add conditionals for iOS 11.

* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore/PAL:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKit:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKitLegacy/mac:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

* Configurations/FeatureDefines.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Tools:

Properly make Web GPU available on iOS 11+.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

4 months ago[JSC] Add more tests for r243966
ysuzuki@apple.com [Mon, 8 Apr 2019 22:01:32 +0000 (22:01 +0000)]
[JSC] Add more tests for r243966
https://bugs.webkit.org/show_bug.cgi?id=196711

Reviewed by Saam Barati.

Adding one more test for r243966 fix. The added test will not crash after r243966.

* stress/stress-cleared-calllinkinfo.js: Added.
(runNearStackLimit.t):
(runNearStackLimit):
(repeat):
(cls):
(let.item.of.array.runNearStackLimit):

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

4 months agoFix selector name after r243834
achristensen@apple.com [Mon, 8 Apr 2019 21:42:47 +0000 (21:42 +0000)]
Fix selector name after r243834
https://bugs.webkit.org/show_bug.cgi?id=196549

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
I forgot the colon in the setter's name.

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

4 months agofast/parser/xml-error-adopted.xml is a flaky timeout
sroberts@apple.com [Mon, 8 Apr 2019 21:41:49 +0000 (21:41 +0000)]
fast/parser/xml-error-adopted.xml is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=186581

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 months agoUnreviewed build fix for iOSMac after r243893.
timothy@apple.com [Mon, 8 Apr 2019 21:31:52 +0000 (21:31 +0000)]
Unreviewed build fix for iOSMac after r243893.
https://bugs.webkit.org/show_bug.cgi?id=196707

* dom/Element.cpp:
(WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
no longer uses parentCrossingFrameBoundaries().

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

4 months agoFixed a typo on a test expectation
sroberts@apple.com [Mon, 8 Apr 2019 21:29:16 +0000 (21:29 +0000)]
Fixed a typo on a test expectation
https://bugs.webkit.org/show_bug.cgi?id=187391

Unreviewed test gardening.

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

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

4 months ago-f[no-]var-tracking-assignments is GCC-only
ross.kirsling@sony.com [Mon, 8 Apr 2019 20:57:38 +0000 (20:57 +0000)]
-f[no-]var-tracking-assignments is GCC-only
https://bugs.webkit.org/show_bug.cgi?id=196699

Reviewed by Don Olmstead.

* CMakeLists.txt:
Just remove the build flag altogether -- it supposedly doesn't solve the problem it was meant to
and said problem evidently no longer occurs as of GCC 9.

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

4 months agoLazily construct Navigator serviceWorker
youenn@apple.com [Mon, 8 Apr 2019 20:51:20 +0000 (20:51 +0000)]
Lazily construct Navigator serviceWorker
https://bugs.webkit.org/show_bug.cgi?id=196692

Reviewed by Chris Dumez.

Make NavigatorBase a ContextDestructionObserver.
This allows to get the navigator script execution context.
Use it when creating the navigator ServiceWorkerContainer object.
For GC, introduce serviceWorkerIfAny which returns the container if created.
No JS observable change of behavior.
Covered by existing tests.

* bindings/js/JSNavigatorCustom.cpp:
(WebCore::JSNavigator::visitAdditionalChildren):
* bindings/js/JSWorkerNavigatorCustom.cpp:
(WebCore::JSWorkerNavigator::visitAdditionalChildren):
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::NavigatorBase):
(WebCore::NavigatorBase::serviceWorkerIfAny):
(WebCore::NavigatorBase::serviceWorker):
* page/NavigatorBase.h:

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

4 months agoCompute touch actions for touch point from remote layer tree regions
antti@apple.com [Mon, 8 Apr 2019 20:50:08 +0000 (20:50 +0000)]
Compute touch actions for touch point from remote layer tree regions
https://bugs.webkit.org/show_bug.cgi?id=196701

Reviewed by Simon Fraser.

Add a function for finding the right layer and getting the touch actions in UI process side.

The code is not used yet.

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

Use the same code as overlap hit testing for collecting the candidate layers for the touch point,
taking event regions into account.
Return the touch actions from the deepest event sensitive layer hit.

(-[UIView _web_findDescendantViewAtPoint:withEvent:]):

Modernize.

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

4 months agoinspector/canvas/css-canvas-clients.html is a constant timeout/failure
sroberts@apple.com [Mon, 8 Apr 2019 20:48:19 +0000 (20:48 +0000)]
inspector/canvas/css-canvas-clients.html is a constant timeout/failure
https://bugs.webkit.org/show_bug.cgi?id=174272

Unreviewed test gardening.

* platform/mac/TestExpectations: Updating test expectations to skip test

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

4 months agoWebAssembly.RuntimeError missing exception check
sbarati@apple.com [Mon, 8 Apr 2019 20:46:39 +0000 (20:46 +0000)]
WebAssembly.RuntimeError missing exception check
https://bugs.webkit.org/show_bug.cgi?id=196700
<rdar://problem/49693932>

Reviewed by Yusuke Suzuki.

JSTests:

* wasm/js-api/runtime-error-should-exception-check.js: Added.

Source/JavaScriptCore:

* wasm/js/JSWebAssemblyRuntimeError.h:
* wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
(JSC::constructJSWebAssemblyRuntimeError):

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

4 months agoWeb Inspector: REGRESSION: Audit: default audits aren't added when an existing audit...
drousso@apple.com [Mon, 8 Apr 2019 20:46:34 +0000 (20:46 +0000)]
Web Inspector: REGRESSION: Audit: default audits aren't added when an existing audit is present
https://bugs.webkit.org/show_bug.cgi?id=196663
<rdar://problem/49660757>

Reviewed by Timothy Hatcher.

Rather than have a button that allows the user to re-add the default audits, prevent them
from being deletable in the first place. "Deleting" a default audit will instead mark it as
disabled (and beep if it is already disabled).

* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.loadStoredTests):
(WI.AuditManager.prototype.removeTest):
(WI.AuditManager.prototype._addDefaultTests): Added.
(WI.AuditManager.prototype.addDefaultTestsIfNeeded): Deleted.

* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype._addTest):
(WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
(WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
* UserInterface/Views/AuditNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.audit.has-results > .content > .message-text-view.no-enabled-audits): Added.
(.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view): Deleted.
(.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > .message): Deleted.
(.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > button): Deleted.

* Localizations/en.lproj/localizedStrings.js:

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

4 months agoUnreviewed, rolling in r243948 with test fix
ysuzuki@apple.com [Mon, 8 Apr 2019 20:43:18 +0000 (20:43 +0000)]
Unreviewed, rolling in r243948 with test fix
https://bugs.webkit.org/show_bug.cgi?id=196486

JSTests:

* stress/arrow-function-and-use-strict-directive.js: Added.
* stress/arrow-function-syntax.js: Added.
(checkSyntax):
(checkSyntaxError):

Source/JavaScriptCore:

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createString):
* parser/Lexer.cpp:
(JSC::Lexer<T>::parseMultilineComment):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
(JSC::Lexer<T>::lex): Deleted.
* parser/Lexer.h:
(JSC::Lexer::hasLineTerminatorBeforeToken const):
(JSC::Lexer::setHasLineTerminatorBeforeToken):
(JSC::Lexer<T>::lex):
(JSC::Lexer::prevTerminator const): Deleted.
(JSC::Lexer::setTerminator): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::allowAutomaticSemicolon):
(JSC::Parser<LexerType>::parseSingleFunction):
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseYieldExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/Parser.h:
(JSC::Parser::nextWithoutClearingLineTerminator):
(JSC::Parser::lexCurrentTokenAgainUnderCurrentContext):
(JSC::Parser::internalSaveLexerState):
(JSC::Parser::restoreLexerState):

LayoutTests:

The test relied on the wrong EOF token's offset. This patch also fixes the test.

* inspector/runtime/parse-expected.txt:
* inspector/runtime/parse.html:

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

4 months agoUpdate touch-action region on property changes
antti@apple.com [Mon, 8 Apr 2019 20:32:53 +0000 (20:32 +0000)]
Update touch-action region on property changes
https://bugs.webkit.org/show_bug.cgi?id=196608

Reviewed by Simon Fraser.

Source/WebCore:

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

* rendering/EventRegion.cpp:
(WebCore::EventRegion::touchActionsForPoint const):

Correctly return 'auto' when nothing is found from the regions (this code is not used yet).

* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):

React to 'touch-action' property changes, similarly to 'pointer-events'.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::invalidateEventRegion):

Test if need to invalidate.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
that we update the top level event region correctly when we have touch-actions.

LayoutTests:

* pointerevents/ios/touch-action-region-dynamic-expected.txt: Added.
* pointerevents/ios/touch-action-region-dynamic.html: Added.

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

4 months agoImplement white-space:break-spaces value
jfernandez@igalia.com [Mon, 8 Apr 2019 20:31:05 +0000 (20:31 +0000)]
Implement white-space:break-spaces value
https://bugs.webkit.org/show_bug.cgi?id=177327

Reviewed by Myles Maxfield and Zalan Bujtas.

LayoutTests/imported/w3c:

Imoprted a few aditional tests from the CSS Text WPT suite that are relevant for this change.

* web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008-expected.html: Added.
* web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html: Added.
* web-platform-tests/css/css-text/overflow-wrap/w3c-import.log:
* web-platform-tests/css/css-text/parsing/white-space-valid-expected.txt:
* web-platform-tests/css/css-text/white-space/break-spaces-003-expected.html: Added.
* web-platform-tests/css/css-text/white-space/break-spaces-003.html: Added.
* web-platform-tests/css/css-text/white-space/break-spaces-009-expected.html: Added.
* web-platform-tests/css/css-text/white-space/break-spaces-009.html: Added.
* web-platform-tests/css/css-text/white-space/w3c-import.log:

Source/WebCore:

Finally the CSS WG decided [1] to move back the 'break-spaces' value to
the 'white-space' property. This makes the parsing logic easier than
the previous approach of using the 'overflow-wrap' property.

This new value prevents the white-space sequence to collapse and gives
breaking opportunities after every preserved white-space.

https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces

Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
end of a line cannot be hung or visually collapsed, since we want them
to be preserved and broken.

[1] https://github.com/w3c/csswg-drafts/pull/2841

Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html
       imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
       imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
(WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.
* css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
* css/CSSValueKeywords.in: new break-spaces keyword
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* rendering/SimpleLineLayout.cpp:  The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.
(WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
(WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
(WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
(WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): New style fields to determine whether the break-space feature is being used. Also split out the break-all and breal-all values.
* rendering/SimpleLineLayoutTextFragmentIterator.h:
* rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.
(WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
(WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
(WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
(WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.
* rendering/style/RenderStyleConstants.h: A new constan added.

LayoutTests:

Removed many failure expectations of tests that pass now thanks to this change.

The overflow-wrap-break-word-003.html tests fails in mac and iOS platforms due to an issue related to
how we compute widths using 'ch' units and 'monospace' fonts. I filed bug #196169 to report the specific
case of this test (break-word+pre-wrap) but the root cause it's probably the bug #196353.

I have submitted a PR [1] to the Web Platform Tests to change several tests that failed only if the
monospace font is used, but pass with the Ahem font. Additionally, I've requested another PR [2] to
add new layout tests, with the same case than overflow-wrap-break-word-003.html but using the Ahem
font.

[1] https://github.com/web-platform-tests/wpt/pull/16137
[2] https://github.com/web-platform-tests/wpt/pull/16124

* TestExpectations: Removed many Failure entries on tests that pass now thanks to this change.
* platform/mac/TestExpectations: Added one Failure entry and filed the corresponding bug report.

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

4 months agoMake HSTS list handling more robust against unexpected content
bfulgham@apple.com [Mon, 8 Apr 2019 20:24:34 +0000 (20:24 +0000)]
Make HSTS list handling more robust against unexpected content
https://bugs.webkit.org/show_bug.cgi?id=196552
<rdar://problem/43403817>

Reviewed by Chris Dumez.

Crash logs indicate we sometimes encounter null key values during processing.
This patch adds some debug assertions to catch this in test environments, and
allows the code to skip the bad entries if encountered.

It also avoids calling CFDictionaryApplyFunction when the HSTS policies returned
by _CFNetworkCopyHSTSPolicies is nullptr, which is a possible return value.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::filterPreloadHSTSEntry):
(WebKit::NetworkProcess::getHostNamesWithHSTSCache):

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

4 months agoLibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
youenn@apple.com [Mon, 8 Apr 2019 20:22:11 +0000 (20:22 +0000)]
LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
https://bugs.webkit.org/show_bug.cgi?id=196697
<rdar://problem/47477113>

Reviewed by Eric Carlson.

It is not thread safe to use m_backend in another thread than the main thread.
It is not useful anymore to hop to the signaling thread to gather stats.
No change of behavior.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::getStats):
(WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):

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

4 months agoWeb Automation: clean up some WebAutomationSession methods to use modern async IPC
bburg@apple.com [Mon, 8 Apr 2019 19:31:45 +0000 (19:31 +0000)]
Web Automation: clean up some WebAutomationSession methods to use modern async IPC
https://bugs.webkit.org/show_bug.cgi?id=196168

Reviewed by Devin Rousso.

Modern WebKit IPC is capable of providing completion handlers and can track callback IDs.
So, most messages between WebAutomationSession and its proxy can use this facility and stop
keeping track of callback IDs manually. This makes most code easier to read on both the
sender and receiver side.

There are two cases that could not be converted:
- For evaluateJavaScript, we cannot use async IPC because WebAutomationSession expects to
be able to cancel all pending replies when a page navigates away, the web process crashes,
or when handling an alert.
- For takeScreenshot, there is not currently support in the modern async IPC code paths for
sending the result back. ShareableBitmap and friends lack a modern decoder implementation.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::selectOptionElement):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
(WebKit::WebAutomationSession::didResolveChildFrame): Deleted.
(WebKit::WebAutomationSession::didResolveParentFrame): Deleted.
(WebKit::WebAutomationSession::didComputeElementLayout): Deleted.
(WebKit::WebAutomationSession::didSelectOptionElement): Deleted.
(WebKit::WebAutomationSession::didGetCookiesForFrame): Deleted.
(WebKit::WebAutomationSession::didDeleteCookie): Deleted.
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/WebAutomationSession.messages.in:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):
* WebProcess/Automation/WebAutomationSessionProxy.h:
* WebProcess/Automation/WebAutomationSessionProxy.messages.in:

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

4 months ago[ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests...
graouts@webkit.org [Mon, 8 Apr 2019 18:50:41 +0000 (18:50 +0000)]
[ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=195233
<rdar://problem/48527231>

Reviewed by Dean Jackson.

We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.

* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime):

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

4 months ago[Web Animations] JS wrapper may be deleted while animation is yet to dispatch its...
graouts@webkit.org [Mon, 8 Apr 2019 18:49:04 +0000 (18:49 +0000)]
[Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
https://bugs.webkit.org/show_bug.cgi?id=196118
<rdar://problem/46614137>

Reviewed by Chris Dumez.

Source/WebCore:

Test: webanimations/js-wrapper-kept-alive.html

We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
cache when running animations.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::canSuspendForDocumentSuspension const):
(WebCore::WebAnimation::stop):
(WebCore::WebAnimation::hasPendingActivity const):
* animation/WebAnimation.h:

LayoutTests:

Add a test that starts a short animation, sets a custom property on it, registers a "finish" event listener on it and deletes
the sole reference to it in the JS world before triggering garbage collection. Prior to this fix, this test would time out
because the JS wrapper would be garbage-collected prior to the animation completing and thus the event listener would not
be called. To complete successfully, this test checks that it receives the event and its target is the same animation object
that was originally created by checking the custom property is still set.

We also make sure that a test, which was found to have regressed with a previous version of this patch, uses the animation
engine that it is expected to be testing.

* legacy-animation-engine/animations/resume-after-page-cache.html:
* webanimations/js-wrapper-kept-alive-expected.txt: Added.
* webanimations/js-wrapper-kept-alive.html: Added.

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

4 months agoREGRESSION(236463) DownloadManager can call a null CompletionHandler
achristensen@apple.com [Mon, 8 Apr 2019 18:45:15 +0000 (18:45 +0000)]
REGRESSION(236463) DownloadManager can call a null CompletionHandler
https://bugs.webkit.org/show_bug.cgi?id=196414
<rdar://problem/48389434>

Reviewed by Geoff Garen.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::convertToDownload):
DownloadManager::continueDecidePendingDownloadDestination is being called when there is no completion handler.
r236463 introduced an unchecked code path that can allow this to happen.

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

4 months agoAX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
commit-queue@webkit.org [Mon, 8 Apr 2019 18:09:33 +0000 (18:09 +0000)]
AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
https://bugs.webkit.org/show_bug.cgi?id=156774

Patch by Eric Liang <ericliang@apple.com> on 2019-04-08
Reviewed by Chris Fleizach.

Source/WebCore:

Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.

Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup.
Also added back functionalities from last patch of determining whether a SVG element should be ignored.

Test: accessibility/svg-shape-labelled.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
* accessibility/AccessibilitySVGElement.cpp:
(WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):

LayoutTests:

Added tests that verify svgs shapes that are labelled are exposed as images.
* accessibility/resources/apple-logo.svg: Added.
* accessibility/svg-shape-labelled-expected.txt: Added.
* accessibility/svg-shape-labelled.html: Added.

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

4 months agoUnreviewed, rolling out r243948.
ryanhaddad@apple.com [Mon, 8 Apr 2019 18:01:42 +0000 (18:01 +0000)]
Unreviewed, rolling out r243948.

Caused inspector/runtime/parse.html to fail

Reverted changeset:

"SIGSEGV in JSC::BytecodeGenerator::addStringConstant"
https://bugs.webkit.org/show_bug.cgi?id=196486
https://trac.webkit.org/changeset/243948

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

4 months agoMake sure UniqueIDBDatabaseConnection unregisters itself even if its database is...
youenn@apple.com [Mon, 8 Apr 2019 17:29:51 +0000 (17:29 +0000)]
Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
https://bugs.webkit.org/show_bug.cgi?id=196651

Reviewed by Brady Eidson.

In UniqueIDBDatabase methods, many operations are refing the transaction
so that it stays alive until a quota check decision is made.
This extends the lifetime of the transaction which may be lasting
longer than its database that may be cleared without waiting for the quota check decisions.

We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.

Make sure that the transaction is unregistering itself from its IDBServer.
To do so, the transaction keeps a weak ref to the IDBServer.

This is timing sensitive hence difficult to test.

* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
add a check to ensure that either the database is we are in an error case.
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

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

4 months agoLayout tests imported/w3c/IndexedDB-private-browsing/idbobjectstore_createIndex7...
sroberts@apple.com [Mon, 8 Apr 2019 17:29:05 +0000 (17:29 +0000)]
Layout tests imported/w3c/IndexedDB-private-browsing/idbobjectstore_createIndex7-event_order.html
imported/w3c/IndexedDB-private-browsing/idbobjectstore_createIndex6-event_order.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=195961

Unreviewed test gardening

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

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

4 months agoUndefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElem...
chris.reid@sony.com [Mon, 8 Apr 2019 17:27:35 +0000 (17:27 +0000)]
Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
https://bugs.webkit.org/show_bug.cgi?id=196664

Reviewed by Ross Kirsling.

No observable change in behavior.

Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)

* html/HTMLImageElement.cpp:

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

4 months ago[ews-build] Do not upload archive when Compile Fails
aakash_jain@apple.com [Mon, 8 Apr 2019 16:32:11 +0000 (16:32 +0000)]
[ews-build] Do not upload archive when Compile Fails
https://bugs.webkit.org/show_bug.cgi?id=196674

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/ews-build/factories.py:
(BuildFactory.__init__): Remove steps which require dynamic decision about whether to run or not.
* BuildSlaveSupport/ews-build/steps.py:
(CompileWebKit.evaluateCommand): Dynamically decide which steps to run based on compile status.
(CompileWebKitToT.evaluateCommand): Explicitly override Compile.evaluateCommand so that it
doesn't inherit CompileWebKit.evaluateCommand which dynamically adds more steps.

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

4 months agoUnreviewed, rolling out r243943.
ryanhaddad@apple.com [Mon, 8 Apr 2019 15:51:19 +0000 (15:51 +0000)]
Unreviewed, rolling out r243943.

Caused test262 failures.

Reverted changeset:

"[JSC] Filter DontEnum properties in
ProxyObject::getOwnPropertyNames()"
https://bugs.webkit.org/show_bug.cgi?id=176810
https://trac.webkit.org/changeset/243943

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

4 months ago[JSC] Partially fix the build with unified builds disabled
csaavedra@igalia.com [Mon, 8 Apr 2019 14:45:08 +0000 (14:45 +0000)]
[JSC] Partially fix the build with unified builds disabled
https://bugs.webkit.org/show_bug.cgi?id=196647

Reviewed by Konstantin Tokarev.

If you disable unified builds you find all kind of build
errors. This partially tries to fix them but there's a lot
more.

* API/JSBaseInternal.h:
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:
* b3/air/AirHandleCalleeSaves.h:
* bytecode/ExecutableToCodeBlockEdge.cpp:
* bytecode/ExitFlag.h:
* bytecode/ICStatusUtils.h:
* bytecode/UnlinkedMetadataTable.h:
* dfg/DFGPureValue.h:
* heap/IsoAlignedMemoryAllocator.cpp:
* heap/IsoAlignedMemoryAllocator.h:

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

4 months agoEnable DFG on MIPS
guijemont@igalia.com [Mon, 8 Apr 2019 12:32:57 +0000 (12:32 +0000)]
Enable DFG on MIPS
https://bugs.webkit.org/show_bug.cgi?id=196689

Reviewed by Žan Doberšek.

Since the bytecode change, we enabled the baseline JIT on mips in
r240432, but DFG is still missing. With this change, all tests are
passing on a ci20 board.

Source/JavaScriptCore:

* jit/RegisterSet.cpp:
(JSC::RegisterSet::calleeSaveRegisters):
Added s0, which is used in llint.

Source/WTF:

* wtf/Platform.h: Enable DFG on MIPS by default.

Tools:

* Scripts/run-jsc-stress-tests: Enable DFG tests on MIPS.

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

4 months ago[Flatpak] Second run update-webkitwpe-flatpak fails
commit-queue@webkit.org [Mon, 8 Apr 2019 12:14:43 +0000 (12:14 +0000)]
[Flatpak] Second run update-webkitwpe-flatpak fails
https://bugs.webkit.org/show_bug.cgi?id=192702

Patch by Philippe Normand <pnormand@igalia.com> on 2019-04-08
Reviewed by Carlos Garcia Campos.

* flatpak/flatpakutils.py:
(FlatpakObject.flatpak): Fix typo.
(FlatpakPackage.install): When installing, also update to the configured remote commit.
* flatpak/org.webkit.WebKit.yaml: Update GNOME 3.28 SDK/runtime hashes.

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

4 months ago[CMake] Detect SSE2 at compile time
commit-queue@webkit.org [Mon, 8 Apr 2019 10:16:22 +0000 (10:16 +0000)]
[CMake] Detect SSE2 at compile time
https://bugs.webkit.org/show_bug.cgi?id=196488

Patch by Xan Lopez <xan@igalia.com> on 2019-04-08
Reviewed by Carlos Garcia Campos.

.:

* CMakeLists.txt: Use FindSSE2.cmake to detect SSE2 support.
* Source/cmake/FindSSE2.cmake: Added.

Source/JavaScriptCore:

* assembler/MacroAssemblerX86Common.cpp: Remove unnecessary (and
incorrect) static_assert.

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

4 months ago[GTK][WPE] outlook.live.com displays old-fashioned UI
svillar@igalia.com [Mon, 8 Apr 2019 09:09:01 +0000 (09:09 +0000)]
[GTK][WPE] outlook.live.com displays old-fashioned UI
https://bugs.webkit.org/show_bug.cgi?id=196642

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The new good looking UI is shown as long as pretend we're a Mac in the UA.

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

Tools:

* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST): New Mac platform quirk test.

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

4 months ago[ATK] Cleanup accessible wrapper base class
carlosgc@webkit.org [Mon, 8 Apr 2019 08:11:19 +0000 (08:11 +0000)]
[ATK] Cleanup accessible wrapper base class
https://bugs.webkit.org/show_bug.cgi?id=196601

Reviewed by Mario Sanchez Prada.

Cleanups:

 - Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
 - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
   struct are no longer leaked.
 - Move core object pointer to the private struct.
 - Remove confusing core() function and simply get the core object from the private struct.
 - Use nullptr instead of 0 and other coding style issues.
 - Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as
   instance parameter.
 - Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it
   never returns nullptr.
 - Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.

* SourcesGTK.txt:
* accessibility/atk/AXObjectCacheAtk.cpp:
* accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.
(webkitAccessibleGetName):
(webkitAccessibleGetDescription):
(setAtkRelationSetFromCoreObject):
(isRootObject):
(webkitAccessibleGetParent):
(webkitAccessibleGetNChildren):
(webkitAccessibleRefChild):
(webkitAccessibleGetIndexInParent):
(webkitAccessibleGetAttributes):
(atkRole):
(webkitAccessibleGetRole):
(webkitAccessibleRefStateSet):
(webkitAccessibleRefRelationSet):
(webkitAccessibleInit):
(webkitAccessibleGetObjectLocale):
(webkit_accessible_class_init):
(interfaceMaskFromObject):
(uniqueAccessibilityTypeName):
(accessibilityTypeFromObject):
(webkitAccessibleNew):
(webkitAccessibleGetAccessibilityObject):
(webkitAccessibleDetach):
(webkitAccessibleIsDetached):
(webkitAccessibleCacheAndReturnAtkProperty):
* accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
(core):
(webkitAccessibleActionGetKeybinding):
(webkitAccessibleActionGetName):
* accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
(core):
(documentAttributeValue):
* accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
(core):
(webkitAccessibleImageGetImageDescription):
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(core):
* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(core):
* accessibility/atk/WebKitAccessibleUtil.cpp:
(objectFocusedAndCaretOffsetUnignored):
* accessibility/atk/WebKitAccessibleUtil.h:
* editing/atk/FrameSelectionAtk.cpp:

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

4 months agoUnreviewed, rolling out r243956.
commit-queue@webkit.org [Mon, 8 Apr 2019 02:58:26 +0000 (02:58 +0000)]
Unreviewed, rolling out r243956.
https://bugs.webkit.org/show_bug.cgi?id=196688

Broke API Test SafeBrowsing.WKWebViewGoBackIFrame (Requested
by aakashjain on #webkit).

Reverted changeset:

"Clicking "Go Back" from a safe browsing warning from an
iframe should navigate the WKWebView back to the previous
page"
https://bugs.webkit.org/show_bug.cgi?id=196665
https://trac.webkit.org/changeset/243956

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

4 months agoRemove stray byte added by r241131
ggaren@apple.com [Sun, 7 Apr 2019 23:31:01 +0000 (23:31 +0000)]
Remove stray byte added by r241131
https://bugs.webkit.org/show_bug.cgi?id=196682

Reviewed by Alexey Proskuryakov.

Sublime Text thinks WKWebView.mm is binary instead of text.

According to online documentation and bisecting, this is because r241131
introduced a stray byte (probably a null byte?) into the file.

I fixed this with Cmd-C Cmd-V.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):

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

4 months agoREGRESSION (r243642): Crash in reddit.com page
msaboff@apple.com [Sun, 7 Apr 2019 23:24:45 +0000 (23:24 +0000)]
REGRESSION (r243642): Crash in reddit.com page
https://bugs.webkit.org/show_bug.cgi?id=196684

Reviewed by Geoffrey Garen.

JSTests:

New regression test.

* stress/regexp-nongreedy-charclass-backtracks.js: Added.

Source/JavaScriptCore:

In r243642, the code that saves and restores the count for non-greedy character classes
was inadvertently put inside an if statement.  This code should be generated for all
non-greedy character classes.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

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

4 months ago[JSC] CallLinkInfo should clear Callee or CodeBlock even if it is unlinked by jettison
ysuzuki@apple.com [Sun, 7 Apr 2019 19:25:59 +0000 (19:25 +0000)]
[JSC] CallLinkInfo should clear Callee or CodeBlock even if it is unlinked by jettison
https://bugs.webkit.org/show_bug.cgi?id=196683

Reviewed by Saam Barati.

JSTests:

* stress/clear-callee-or-codeblock-in-calllinkinfo-even-cleared-by-jettison.js: Added.
(foo):

Source/JavaScriptCore:

In r243626, we stop repatching CallLinkInfo when the CallLinkInfo is held by jettisoned CodeBlock.
But we still need to clear the Callee or CodeBlock since they are now dead. Otherwise, CodeBlock's
visitWeak eventually accesses this dead cells and crashes because the owner CodeBlock of CallLinkInfo
can be still live.

We also move all repatching operations from CallLinkInfo.cpp to Repatch.cpp for consistency because the
other repatching operations in CallLinkInfo are implemented in Repatch.cpp side.

* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::setCallee):
(JSC::CallLinkInfo::clearCallee):
* jit/Repatch.cpp:
(JSC::linkFor):
(JSC::revertCall):

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

4 months agoAdded tests for WeakHashSet::computesEmpty and WeakHashSet::computeSize
rniwa@webkit.org [Sun, 7 Apr 2019 03:55:59 +0000 (03:55 +0000)]
Added tests for WeakHashSet::computesEmpty and WeakHashSet::computeSize
https://bugs.webkit.org/show_bug.cgi?id=196669

Reviewed by Geoffrey Garen.

Source/WTF:

Removed the superflous type names from forward declarations, and made WeakHashSet::add
take a const object to match other container types in WTF.

* wtf/WeakHashSet.h:
(WTF::WeakHashSet::add):
* wtf/WeakPtr.h:

Tools:

Added three new unit tests for WeakHashSet.

* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(WTF_WeakPtr.WeakHashSetConstObjects):
(WTF_WeakPtr.WeakHashSetComputesEmpty):
(WTF_WeakPtr.WeakHashSetComputeSize):

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

4 months agoREGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't...
nvasilyev@apple.com [Sun, 7 Apr 2019 02:54:58 +0000 (02:54 +0000)]
REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible
https://bugs.webkit.org/show_bug.cgi?id=196667
<rdar://problem/49664912>

Reviewed by Timothy Hatcher.

Explicitly define `hidden` and `shown` methods instead of relying on SidebarPanel's `visible` getter.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): Deleted.
(WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Added.
(WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Added.

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

4 months agoHide next and previous form control buttons when WKWebView is editable
wenson_hsieh@apple.com [Sun, 7 Apr 2019 02:25:36 +0000 (02:25 +0000)]
Hide next and previous form control buttons when WKWebView is editable
https://bugs.webkit.org/show_bug.cgi?id=196672
<rdar://problem/35625321>

Reviewed by Tim Horton.

Source/WebKit:

Adopt new UIKit SPI to hide or show next and previous controls in the form accessory view when changing
editability.

Test: KeyboardInputTests.FormNavigationAssistantBarButtonItems

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setEditable:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateAccessory]):
(-[WKContentView _didChangeWebViewEditability]):

Tools:

Add a new API test.

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(-[TestWKWebView lastTrailingBarButtonGroup]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/UIKitSPI.h:

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

4 months agoCombine event and touch action regions into a single class
antti@apple.com [Sat, 6 Apr 2019 16:48:58 +0000 (16:48 +0000)]
Combine event and touch action regions into a single class
https://bugs.webkit.org/show_bug.cgi?id=196644
<rdar://problem/49643614>

Reviewed by Darin Adler.

Source/WebCore:

This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
It collects both the overall event region and the touch action regions. This avoids duplication
and simplifies the code.

The patch also adds serialization support for EventRegion, so touch-action regions gets passed
to the UI process too.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setEventRegion):
(WebCore::GraphicsLayer::dumpProperties const):
(WebCore::GraphicsLayer::setTouchActionRegion): Deleted.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::eventRegion const):
(WebCore::GraphicsLayer::touchActionRegion const): Deleted.
* platform/graphics/Region.cpp:
(WebCore::operator<<):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setEventRegion):
(WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.
(WebCore::EventRegion::operator== const):
(WebCore::EventRegion::unite):
(WebCore::EventRegion::translate):
(WebCore::EventRegion::uniteTouchActions):
(WebCore::EventRegion::touchActionsForPoint const):
(WebCore::operator<<):
(WebCore::TouchActionRegion::unite): Deleted.
(WebCore::TouchActionRegion::actionsForPoint const): Deleted.
(WebCore::TouchActionRegion::translate): Deleted.
* rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.
(WebCore::EventRegion::isEmpty const):
(WebCore::EventRegion::contains const):
(WebCore::EventRegion::hasTouchActions const):
(WebCore::EventRegion::encode const):
(WebCore::EventRegion::decode):
(WebCore::TouchActionRegion::isEmpty const): Deleted.
(WebCore::TouchActionRegion::operator== const): Deleted.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/PaintInfo.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectEventRegionForFragments):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateEventRegion):
* rendering/RenderLayerModelObject.cpp:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/TouchActionRegion.cpp: Removed.
* rendering/TouchActionRegion.h: Removed.

Source/WebKit:

* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
* UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
(WebKit::RemoteLayerTreeNode::eventRegion const):
* UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(WebKit::RemoteLayerTreeNode::setEventRegion):
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::setEventRegion):
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:

LayoutTests:

* pointerevents/ios/touch-action-region-basic-expected.txt:
* pointerevents/ios/touch-action-region-layers-expected.txt:
* pointerevents/ios/touch-action-region-pan-x-y-expected.txt:

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

4 months agoWe should pass minimumEffectiveDeviceWidth to web process on new page creation.
commit-queue@webkit.org [Sat, 6 Apr 2019 03:41:26 +0000 (03:41 +0000)]
We should pass minimumEffectiveDeviceWidth to web process on new page creation.
https://bugs.webkit.org/show_bug.cgi?id=196077
<rdar://problem/49108202>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-04-05
Reviewed by Chris Dumez.

Source/WebCore:

If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
the page to fit the window width.

Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size
    when the default configuration is changed.
(WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content
    to window width.

Source/WebKit:

When a new web view is created, it is possible we don't have the web content process till a load
is requested. This patch stashes minimumEffectiveDeviceWidth in WebPageProxy.cpp and passes that
value down to web process via WebPageCreationParameters when a new process is created, just like
we did for other values like viewportConfigurationLayoutSizeScaleFactor or viewportConfigurationViewLayoutSize.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const): Encode viewportConfigurationMinimumEffectiveDeviceWidth value.
(WebKit::WebPageCreationParameters::decode): Decode viewportConfigurationMinimumEffectiveDeviceWidth value.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm: Now that we stash the minimumEffectiveDeviceWidth value in WebPageProxy, we
    don't need the iVar in WKWebView any more.
(-[WKWebView _dispatchSetViewLayoutSize:]): Use _page->minimumEffectiveDeviceWidth().
(-[WKWebView _setViewScale:]): Ditto.
(-[WKWebView _setMinimumEffectiveDeviceWidth:]): Ditto.
(-[WKWebView _minimumEffectiveDeviceWidth]): Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Also add viewportConfigurationMinimumEffectiveDeviceWidth to
    web process creation parameter.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::minimumEffectiveDeviceWidth const): Returns m_viewportConfigurationMinimumEffectiveDeviceWidth.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize): Pass parameters.viewportConfigurationMinimumEffectiveDeviceWidth
    to web process.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Take viewportConfigurationMinimumEffectiveDeviceWidth value from the parameter and
    set that to viewport configuration.

Tools:

Add an API test to verify the minimumEffectDeviceWidth is passed to web content process
on new web view.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

LayoutTests:

Add a layout test to verify the page shrinks to fit the window width when ignoreMetaViewport
flag is turned on.

* fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta-expected.txt: Added.
* fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html: Added.

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

4 months agoMake compare-results understand MotionMark
sbarati@apple.com [Sat, 6 Apr 2019 02:05:11 +0000 (02:05 +0000)]
Make compare-results understand MotionMark
https://bugs.webkit.org/show_bug.cgi?id=196666

Reviewed by Yusuke Suzuki.

* Scripts/compare-results:
(PLT5Results):
(detectMotionMark):
(detectMotionMark1_1):
(motionMarkResults):
(motionMark1_1Results):
(detectBenchmark):
(biggerIsBetter):
(main):

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