WebKit-https.git
12 months agoKeyframe animation doesn't 't show up in the Animations timeline
drousso@apple.com [Tue, 23 Jun 2020 16:12:36 +0000 (16:12 +0000)]
Keyframe animation doesn't 't show up in the Animations timeline
https://bugs.webkit.org/show_bug.cgi?id=213441

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/protocol/Animation.json:
An `interationCount` of `Infinity` is not JSON serializable, so represent it as `-1` instead.

Source/WebCore:

Test: inspector/animation/lifecycle-css-animation.html

* inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::buildObjectForEffect):

Source/WebInspectorUI:

* UserInterface/Models/Animation.js:
(WI.Animation):
(WI.Animation.prototype._updateEffect):
An `interationCount` of `Infinity` is not JSON serializable, so represent it as `-1` instead.

* UserInterface/Models/MediaTimelineRecord.js:
(WI.MediaTimelineRecord):
* UserInterface/Views/MediaTimelineDataGridNode.js:
(WI.MediaTimelineDataGridNode.prototype.createCellContent):
(WI.MediaTimelineDataGridNode.prototype.filterableDataForColumn):
The DOM node may not be able to be instrumented if the timeline recording starts before the
frontend has had a chance to request the main document, so it's possible for the DOM node
to not be set.

LayoutTests:

* inspector/animation/resources/lifecycle-utilities.js:
* inspector/animation/lifecycle-css-animation.html:
* inspector/animation/lifecycle-css-animation-expected.txt:

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

12 months ago[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages...
svillar@igalia.com [Tue, 23 Jun 2020 15:56:18 +0000 (15:56 +0000)]
[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them
https://bugs.webkit.org/show_bug.cgi?id=212264

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-flexbox/percentage-heights-003-expected.txt: There were 3 subtests
marked as failures. All of them work fine now.

Source/WebCore:

Implement https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8 which modified
the way percentages were resolved in flexible items with indefinite sizes. From now on we can pretend that
they're really definite.

This allows us to mark 3 tests which were testing percentages in flex items as correct.

Based on Blink's crrev.com/1247184 by <cbiesinger@chromium.org>

This is a reland of r262124 which got reverted due to the bug fixed in r263389.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): Do only check flex container main size
definiteness when computing the main size for percentage resolution, no need to check flex basis at all.

LayoutTests:

* css3/flexbox/definite-main-size-expected.txt: Updated expectation.
* css3/flexbox/definite-main-size.html: Updated comment.

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

12 months ago[ iOS ] REGRESSION: perf/htmlcollection-backwards-iteration.html is a flaky failure
jacob_uphoff@apple.com [Tue, 23 Jun 2020 15:50:57 +0000 (15:50 +0000)]
[ iOS ] REGRESSION: perf/htmlcollection-backwards-iteration.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=213520

Unreviewed test gardening

* platform/ios-wk2/TestExpectations:

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

12 months ago[flatpak] Ensure en_US.UTF-8 locale
aboya@igalia.com [Tue, 23 Jun 2020 15:48:20 +0000 (15:48 +0000)]
[flatpak] Ensure en_US.UTF-8 locale
https://bugs.webkit.org/show_bug.cgi?id=212459

Reviewed by Philippe Normand.

When developing WebKit we want as few system differences as possible
to make tests reproducible.

en_US.UTF-8 is indeed the only locale installed in our development
flatpak, but our scripts were not correctly clearing most locale
environment variables, which resulted in warnings when running some
tools (notably perl) when the user OS has a different locale.

This patch ensures all locale environment variables are cleared and
LANG is set to en_US.UTF-8. It also removes now redundant code from
flatpakutils.py.

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
* flatpak/webkit-bwrap:

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

12 months ago[ Catalina Debug WK2 ] fast/events/platform-wheelevent-in-scrolling-div.html is a...
simon.fraser@apple.com [Tue, 23 Jun 2020 15:14:11 +0000 (15:14 +0000)]
[ Catalina Debug WK2 ] fast/events/platform-wheelevent-in-scrolling-div.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=213351
<rdar://problem/64502429>

Reviewed by Tim Horton.

Tools:

The variadic CGEventCreateScrollWheelEvent() seems to have an issue that causes the resulting event
to rarely put the x value into the deltaY. Change to the non-variadic CGEventCreateScrollWheelEvent2()
to avoid this.

* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController mouseScrollByX:andY:continuously:]):
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):

LayoutTests:

Fix the test to use eventSender.monitorWheelEvents(). Also remove an initial 100ms timeout and
some ugly uses of "window.", and make it a proper js-test-pre/js-test-post test.

* fast/events/platform-wheelevent-in-scrolling-div-expected.txt:
* fast/events/platform-wheelevent-in-scrolling-div.html:
* platform/mac-wk2/TestExpectations:

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

12 months ago[ iOS ] fast/backgrounds/size/backgroundSize-in-background-shorthand.html is a flaky...
jacob_uphoff@apple.com [Tue, 23 Jun 2020 14:00:29 +0000 (14:00 +0000)]
[ iOS ] fast/backgrounds/size/backgroundSize-in-background-shorthand.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=213511

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

12 months ago[WPE] Unreviewed test gardening. Move flaky failures happening in WPE from GTK to...
dpino@igalia.com [Tue, 23 Jun 2020 13:29:34 +0000 (13:29 +0000)]
[WPE] Unreviewed test gardening. Move flaky failures happening in WPE from GTK to GLIB.

* platform/glib/TestExpectations:
* platform/gtk/TestExpectations:

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

12 months ago[ews] Rename 'JSCTestsFactory' to 'JSCBuildAndTestsFactory'
dpino@igalia.com [Tue, 23 Jun 2020 12:51:23 +0000 (12:51 +0000)]
[ews] Rename 'JSCTestsFactory' to 'JSCBuildAndTestsFactory'
https://bugs.webkit.org/show_bug.cgi?id=213503

Reviewed by Aakash Jain.

* BuildSlaveSupport/ews-build/config.json:
* BuildSlaveSupport/ews-build/factories.py:
(JSCBuildAndTestsFactory):
(JSCTestsFactory): Deleted.
(JSCTestsFactory.__init__): Deleted.
* BuildSlaveSupport/ews-build/loadConfig.py:

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

12 months ago[ews] Add JSC-Only builders for MIPS and ARMv7 architectures (follow-up fix)
aakash_jain@apple.com [Tue, 23 Jun 2020 12:05:30 +0000 (12:05 +0000)]
[ews] Add JSC-Only builders for MIPS and ARMv7 architectures (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=213366

Unreviewed follow-up fix.

Remove unused runTests parameter.
* BuildSlaveSupport/ews-build/factories.py:

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

12 months ago[WPE] Unreviewed test gardening. Update test expectations after r263390.
dpino@igalia.com [Tue, 23 Jun 2020 11:09:36 +0000 (11:09 +0000)]
[WPE] Unreviewed test gardening. Update test expectations after r263390.

Garden latest failures from test bot.

* platform/wpe/TestExpectations:

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

12 months ago[Flatpak SDK] relax restriction on build-webkit script name
commit-queue@webkit.org [Tue, 23 Jun 2020 09:15:41 +0000 (09:15 +0000)]
[Flatpak SDK] relax restriction on build-webkit script name
https://bugs.webkit.org/show_bug.cgi?id=213432

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-23
Reviewed by Žan Doberšek.

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox): Match the build-webkit string in the whole command-line
argument and thus allow alternative implementations of build-webkit. Also let the
MAX_CPU_LOAD env var in the sandbox.

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

12 months agoREGRESSION (r262124): Twitter videos go blank after exiting fullscreen
svillar@igalia.com [Tue, 23 Jun 2020 07:27:29 +0000 (07:27 +0000)]
REGRESSION (r262124): Twitter videos go blank after exiting fullscreen
https://bugs.webkit.org/show_bug.cgi?id=213110

Reviewed by Darin Adler.

Source/WebCore:

Test: fullscreen/video-inside-flex-item.html

Setting/unsetting position:absolute on a flex/grid item can potentially create/remove flex/grid items because
absolutely positioned children of those containers are out-of-flow and thus, do not generate flex/grid items.
Flex/grid items are potentially stretched by their containers so the style recalculation is not enough to get
a correct layout because the override size set by flex/grid containers is not reset.
In the particular case of this bug we had this hierarchy (highly simplified from twitter page):

Flexbox container
|___DIV (absolutelly positioned)
    |___<video> (height: 100% width: 100%)

When the <video> goes fullscreen the FullscreenManager replaces the
style of the DIV because it inserts a RenderFullScreen object in between
the DIV and the <video> (along with some anonymous blocks). This means
that the DIV which was not a flex item (as it was absolutely positioned)
became a flex item and thus its size is stretched as the flexbox
container mandates. When exiting fullscreen, the original style is
restored (and thus the position absolute). The DIV is then no longer a
flex item but the stretched size (overrideContentSize) is still set,
causing issues with the sizes of the <video>.

Note that it isn't possible to reproduce this bug with the current trunk because there is a bug in the flexbox
implementation (see bug 212264) preventing this to happen. However it becomes 100% reproducible with the patch for bug 212264
which is correct and fixes several tests related to wrapping in flexbox. It's also reproducible when the FULLSCREEN_API is
enabled, otherwise the codepath for full screen is totally different (there are no placeholders).

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange): clear the override sizes for grid/flex when flex/grid items become out-of-flow,
for example by changing position to absolute.

LayoutTests:

* fullscreen/video-inside-flex-item-expected.txt: Added.
* fullscreen/video-inside-flex-item.html: Added.

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

12 months agoREGRESSION(r258741): [GTK] anchor-file-blob-download-includes-backslash.html is failing
carlosgc@webkit.org [Tue, 23 Jun 2020 05:55:21 +0000 (05:55 +0000)]
REGRESSION(r258741): [GTK] anchor-file-blob-download-includes-backslash.html is failing
https://bugs.webkit.org/show_bug.cgi?id=209329

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Sanitize the suggested filename. We replace characters that can be problematic in filenames with '_' to match
what Chromium and Firefox do.

* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::sanitizeFilename):
(WebCore::ResourceResponse::platformSuggestedFilename const):

LayoutTests:

Rebaseline tests.

* platform/gtk/TestExpectations:
* platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt: Added.
* platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote-expected.txt: Added.
* platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes-expected.txt:

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

12 months ago[GTK] MiniBrowser: set a base directory for website data and cache
carlosgc@webkit.org [Tue, 23 Jun 2020 05:51:38 +0000 (05:51 +0000)]
[GTK] MiniBrowser: set a base directory for website data and cache
https://bugs.webkit.org/show_bug.cgi?id=213368

Reviewed by Michael Catanzaro.

Stop using the default ones.

* MiniBrowser/gtk/main.c:
(activate):

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

12 months ago[GTK][WPE] Add API to configure and handle DOM cache to WebKitWebsiteDataManager
carlosgc@webkit.org [Tue, 23 Jun 2020 05:49:25 +0000 (05:49 +0000)]
[GTK][WPE] Add API to configure and handle DOM cache to WebKitWebsiteDataManager
https://bugs.webkit.org/show_bug.cgi?id=213337

Reviewed by Adrian Perez de Castro.

Source/WebKit:

The default path is always used even for apps setting a base data directory. We should handle
WebsiteDataType::DOMCache to configure the directory and allow to fetch and clear it.

* UIProcess/API/glib/WebKitWebsiteData.cpp:
(recordContainsSupportedDataTypes):
(toWebKitWebsiteDataTypes):
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkitWebsiteDataManagerGetProperty):
(webkitWebsiteDataManagerSetProperty):
(webkitWebsiteDataManagerConstructed):
(webkit_website_data_manager_class_init):
(webkitWebsiteDataManagerGetDataStore):
(webkit_website_data_manager_get_dom_cache_directory):
(toWebsiteDataTypes):
* UIProcess/API/gtk/WebKitWebsiteData.h:
* UIProcess/API/gtk/WebKitWebsiteDataManager.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WebKitWebsiteData.h:
* UIProcess/API/wpe/WebKitWebsiteDataManager.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::websiteDataStoreFromSessionID): GTK and WPE ports don't use the default website
data store, so only use it when it already exists. Use the process pool website data store instead.

Tools:

Handle new website data in MiniBrowser and add a unit test.

* MiniBrowser/gtk/main.c:
(gotWebsiteDataCallback):
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):
(testWebsiteDataDOMCache):
(beforeAll):
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::Test):

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

12 months agoAttempt to fix watchOS simulator build.
sbarati@apple.com [Tue, 23 Jun 2020 05:27:25 +0000 (05:27 +0000)]
Attempt to fix watchOS simulator build.

* assembler/FastJITPermissions.h:
(threadSelfRestrictRWXToRW):
(threadSelfRestrictRWXToRX):

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

12 months ago[ews] Add JSC-Only builders for MIPS and ARMv7 architectures
dpino@igalia.com [Tue, 23 Jun 2020 05:04:56 +0000 (05:04 +0000)]
[ews] Add JSC-Only builders for MIPS and ARMv7 architectures
https://bugs.webkit.org/show_bug.cgi?id=213366

Reviewed by Aakash Jain.

In a follow-up patch the built product of these bots will be consumed
by the EWS JSC-Only testing bots.

* BuildSlaveSupport/ews-build/config.json:
* BuildSlaveSupport/ews-build/factories.py:
(JSCBuildFactory):
(JSCBuildFactory.__init__):
* BuildSlaveSupport/ews-build/factories_unittest.py:
(TestBuildFactory):
(TestBuildFactory.test_jsc_mipsel_factory):
(TestBuildFactory.test_jsc_armv7_factory):
* BuildSlaveSupport/ews-build/loadConfig.py:

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

12 months agoStorage Access API: Add the capability to call the Storage Access API as a quirk...
wilander@apple.com [Tue, 23 Jun 2020 04:13:24 +0000 (04:13 +0000)]
Storage Access API: Add the capability to call the Storage Access API as a quirk, on behalf of websites that should be doing it themselves
https://bugs.webkit.org/show_bug.cgi?id=213418
<rdar://problem/64549429>

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. This patch adds quirks for specific websites.
The general functionality that's touched has tests under
LayoutTests/http/tests/storageAccess/.

* dom/Document.h:
(WebCore::Document::isTopDocument const):
    New convenience function.
(WebCore::Document::setUserDidInteractWithPage):
    Use of the new convenience function.
(WebCore::Document::userDidInteractWithPage const):
    Use of the new convenience function.
* dom/DocumentStorageAccess.cpp:
(WebCore::DocumentStorageAccess::hasStorageAccessQuickCheck):
(WebCore::DocumentStorageAccess::hasStorageAccess):
(WebCore::DocumentStorageAccess::hasStorageAccessForDocumentQuirk):
(WebCore::DocumentStorageAccess::requestStorageAccess):
(WebCore::DocumentStorageAccess::requestStorageAccessQuickCheck):
(WebCore::DocumentStorageAccess::requestStorageAccessForDocumentQuirk):
(WebCore::DocumentStorageAccess::requestStorageAccessForNonDocumentQuirk):
(WebCore::DocumentStorageAccess::requestStorageAccessQuirk):
    These functions are split up to allow quirks to call directly into the
    implementation of the Storage Access API without the JavaScript
    promise that goes with the web API. It also allows for quirks to call
    the API without an iframe document.
* dom/DocumentStorageAccess.h:
* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):
    The two existing quirks are for click events.
* loader/ResourceLoadObserver.h:
(WebCore::ResourceLoadObserver::setDomainsWithUserInteraction):
(WebCore::ResourceLoadObserver::hasHadUserInteraction const):
    These two new functions allow the Storage Access API quirks
    to synchronously check if it's worth calling the API or not.
    If there has been no user interaction for the requesting
    domain, there is no need to call the API.
* page/Quirks.cpp:
(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
    This is the new quirks function, hiding the specifics of
    certain elements clicked and for which websites. It also
    calls the Storage Access API.
* page/Quirks.h:

Source/WebKit:

These changes are for forwarding ITP's knowledge of user interaction
for specific quirks domains to the WebKit::WebProcessPool where it in
turn can be distributed to all existing and new Web Content processes.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::needsUserInteractionQuirk const):
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* Shared/WebProcessDataStoreParameters.h:
(WebKit::WebProcessDataStoreParameters::encode const):
(WebKit::WebProcessDataStoreParameters::decode):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setDomainsWithUserInteraction):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::webProcessDataStoreParameters):
(WebKit::WebProcessPool::setDomainsWithUserInteraction):
* UIProcess/WebProcessPool.h:
* WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
(WebKit::WebResourceLoadObserver::hasHadUserInteraction const):
* WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setWebsiteDataStoreParameters):
(WebKit::WebProcess::setDomainsWithUserInteraction):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

12 months ago[WebDriver][GTK] Mark two scrolling tests as fail
lmoura@igalia.com [Tue, 23 Jun 2020 04:00:42 +0000 (04:00 +0000)]
[WebDriver][GTK] Mark two scrolling tests as fail

Unreviewed test gardening.

They are failing because element.location expects Get_Element_Rect to
return page coordinates instead of the browsing context coordinates.
There an open issue at https://github.com/w3c/webdriver/issues/1533
to clarify the correct behavior. Meanwhile, we should mark them as
failure.

The change that introduced this new behavior was r262997, and its bug
is used as the reference bug for these expectations.

* TestExpectations.json:

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

12 months agoIntroduce BaseAudioContext interface
cdumez@apple.com [Tue, 23 Jun 2020 03:25:56 +0000 (03:25 +0000)]
Introduce BaseAudioContext interface
https://bugs.webkit.org/show_bug.cgi?id=213491

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:

Source/WebCore:

Introduce BaseAudioContext interface as per W3C WebAudio specification:
- https://www.w3.org/TR/webaudio/#BaseAudioContext

No new tests, rebaselined existing test.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::close):
(WebCore::AudioContext::createMediaElementSource):
(WebCore::AudioContext::createMediaStreamSource):
(WebCore::AudioContext::createMediaStreamDestination):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::contextForBindings const):
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/BaseAudioContext.cpp: Copied from Source/WebCore/Modules/webaudio/AudioContext.cpp.
(WebCore::BaseAudioContext::isSampleRateRangeGood):
(WebCore::AudioContextBase::AudioContextBase):
(WebCore::BaseAudioContext::BaseAudioContext):
(WebCore::BaseAudioContext::constructCommon):
(WebCore::BaseAudioContext::~BaseAudioContext):
(WebCore::BaseAudioContext::lazyInitialize):
(WebCore::BaseAudioContext::clear):
(WebCore::BaseAudioContext::uninitialize):
(WebCore::BaseAudioContext::isInitialized const):
(WebCore::BaseAudioContext::addReaction):
(WebCore::BaseAudioContext::setState):
(WebCore::BaseAudioContext::stop):
(WebCore::BaseAudioContext::suspend):
(WebCore::BaseAudioContext::resume):
(WebCore::BaseAudioContext::activeDOMObjectName const):
(WebCore::AudioContextBase::document const):
(WebCore::BaseAudioContext::hostingDocumentIdentifier const):
(WebCore::BaseAudioContext::isSuspended const):
(WebCore::BaseAudioContext::visibilityStateChanged):
(WebCore::BaseAudioContext::wouldTaintOrigin const):
(WebCore::BaseAudioContext::createBuffer):
(WebCore::BaseAudioContext::decodeAudioData):
(WebCore::BaseAudioContext::createBufferSource):
(WebCore::BaseAudioContext::createScriptProcessor):
(WebCore::BaseAudioContext::createBiquadFilter):
(WebCore::BaseAudioContext::createWaveShaper):
(WebCore::BaseAudioContext::createPanner):
(WebCore::BaseAudioContext::createConvolver):
(WebCore::BaseAudioContext::createDynamicsCompressor):
(WebCore::BaseAudioContext::createAnalyser):
(WebCore::BaseAudioContext::createGain):
(WebCore::BaseAudioContext::createDelay):
(WebCore::BaseAudioContext::createChannelSplitter):
(WebCore::BaseAudioContext::createChannelMerger):
(WebCore::BaseAudioContext::createOscillator):
(WebCore::BaseAudioContext::createPeriodicWave):
(WebCore::BaseAudioContext::notifyNodeFinishedProcessing):
(WebCore::BaseAudioContext::derefFinishedSourceNodes):
(WebCore::BaseAudioContext::refNode):
(WebCore::BaseAudioContext::derefNode):
(WebCore::BaseAudioContext::derefUnfinishedSourceNodes):
(WebCore::BaseAudioContext::lock):
(WebCore::BaseAudioContext::tryLock):
(WebCore::BaseAudioContext::unlock):
(WebCore::BaseAudioContext::isAudioThread const):
(WebCore::BaseAudioContext::isGraphOwner const):
(WebCore::BaseAudioContext::addDeferredFinishDeref):
(WebCore::BaseAudioContext::handlePreRenderTasks):
(WebCore::BaseAudioContext::handlePostRenderTasks):
(WebCore::BaseAudioContext::handleDeferredFinishDerefs):
(WebCore::BaseAudioContext::markForDeletion):
(WebCore::BaseAudioContext::scheduleNodeDeletion):
(WebCore::BaseAudioContext::deleteMarkedNodes):
(WebCore::BaseAudioContext::markSummingJunctionDirty):
(WebCore::BaseAudioContext::removeMarkedSummingJunction):
(WebCore::BaseAudioContext::eventTargetInterface const):
(WebCore::BaseAudioContext::markAudioNodeOutputDirty):
(WebCore::BaseAudioContext::handleDirtyAudioSummingJunctions):
(WebCore::BaseAudioContext::handleDirtyAudioNodeOutputs):
(WebCore::BaseAudioContext::addAutomaticPullNode):
(WebCore::BaseAudioContext::removeAutomaticPullNode):
(WebCore::BaseAudioContext::updateAutomaticPullNodes):
(WebCore::BaseAudioContext::processAutomaticPullNodes):
(WebCore::AudioContextBase::scriptExecutionContext const):
(WebCore::BaseAudioContext::nodeWillBeginPlayback):
(WebCore::shouldDocumentAllowWebAudioToAutoPlay):
(WebCore::BaseAudioContext::willBeginPlayback):
(WebCore::BaseAudioContext::willPausePlayback):
(WebCore::BaseAudioContext::startRendering):
(WebCore::BaseAudioContext::mediaCanStart):
(WebCore::BaseAudioContext::mediaState const):
(WebCore::BaseAudioContext::pageMutedStateDidChange):
(WebCore::BaseAudioContext::isPlayingAudioDidChange):
(WebCore::BaseAudioContext::finishedRendering):
(WebCore::BaseAudioContext::dispatchEvent):
(WebCore::BaseAudioContext::incrementActiveSourceCount):
(WebCore::BaseAudioContext::decrementActiveSourceCount):
(WebCore::BaseAudioContext::suspendRendering):
(WebCore::BaseAudioContext::resumeRendering):
(WebCore::BaseAudioContext::suspendPlayback):
(WebCore::BaseAudioContext::mayResumePlayback):
(WebCore::BaseAudioContext::postTask):
(WebCore::BaseAudioContext::origin const):
(WebCore::BaseAudioContext::addConsoleMessage):
(WebCore::BaseAudioContext::clearPendingActivity):
(WebCore::BaseAudioContext::makePendingActivity):
(WebCore::BaseAudioContext::logChannel const):
* Modules/webaudio/BaseAudioContext.h: Copied from Source/WebCore/Modules/webaudio/AudioContext.h.
(WebCore::AudioContextBase::AutoLocker::AutoLocker):
(WebCore::AudioContextBase::AutoLocker::~AutoLocker):
(WebCore::BaseAudioContext::destination):
(WebCore::BaseAudioContext::activeSourceCount const):
(WebCore::BaseAudioContext::listener):
(WebCore::BaseAudioContext::state const):
(WebCore::BaseAudioContext::isClosed const):
(WebCore::BaseAudioContext::connectionCount const):
(WebCore::BaseAudioContext::audioThread const):
(WebCore::BaseAudioContext::maxNumberOfChannels):
(WebCore::BaseAudioContext::destinationNode const):
(WebCore::BaseAudioContext::userGestureRequiredForAudioStart const):
(WebCore::BaseAudioContext::pageConsentRequiredForAudioStart const):
(isType):
* Modules/webaudio/BaseAudioContext.idl: Copied from Source/WebCore/Modules/webaudio/AudioContext.idl.
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::OfflineAudioContext):
* Modules/webaudio/OfflineAudioContext.h:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
* Modules/webaudio/PannerNode.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/EventTargetFactory.in:
* testing/Internals.cpp:
(WebCore::Internals::setAudioContextRestrictions):
* testing/Internals.h:
* testing/Internals.idl:

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

12 months agoAllow building JavaScriptCore Mac+arm64 in public SDK build
sbarati@apple.com [Tue, 23 Jun 2020 01:28:17 +0000 (01:28 +0000)]
Allow building JavaScriptCore Mac+arm64 in public SDK build
https://bugs.webkit.org/show_bug.cgi?id=213472

Reviewed by Sam Weinig.

.:

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

We used to only builld code for fast permission switching when using the
Apple internal SDK. However, with arm64 on macOS, this is no longer a viable
implementation strategy.

This patch makes it so we can build JSC on macOS+arm64 using the public Xcode
SDK.

- ENABLE_FAST_JIT_PERMISSIONS is removed. We now use runtime checks instead.
- In the new suite of OS betas, pthreads has added API for fast permissions
  switching. We now use this API instead of using the non-public SDK found in
  the kernel headers.
- We fall back to the separated W/X heaps when fast permissions checking is
  not supported. This all happens at runtime.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::fillNops):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::fillNops):
* assembler/FastJITPermissions.h: Added.
(useFastJITPermissions):
(threadSelfRestrictRWXToRW):
(threadSelfRestrictRWXToRX):
(fastJITPermissionsIsSupported):
* assembler/LinkBuffer.cpp:
(JSC::memcpyWrapper):
(JSC::LinkBuffer::copyCompactAndLinkCode):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::fillNops):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::link):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::link):
* jit/ExecutableAllocator.cpp:
(JSC::initializeJITPageReservation):
* jit/ExecutableAllocator.h:
(JSC::performJITMemcpy):
(JSC::useFastJITPermissions): Deleted.
* runtime/JSCConfig.h:
* runtime/Options.cpp:
(JSC::Options::recomputeDependentOptions):
* runtime/OptionsList.h:

Source/WTF:

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

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

12 months ago[Win] fast/dom/Window/alert-with-unmatched-utf16-surrogate-should-not-crash.html...
Hironori.Fujii@sony.com [Tue, 23 Jun 2020 01:23:10 +0000 (01:23 +0000)]
[Win] fast/dom/Window/alert-with-unmatched-utf16-surrogate-should-not-crash.html is failing
https://bugs.webkit.org/show_bug.cgi?id=213452

Reviewed by Yusuke Suzuki.

Tools:

If window.alert() was given an invalid UTF-16 sequence, Windows
DumpRenderTree output it without any conversions. It should output
"(null)" to match with WebKitTestRunner behavior.

* DumpRenderTree/win/UIDelegate.cpp:
(toMessage): Added
(UIDelegate::runJavaScriptAlertPanelWithMessage):
(UIDelegate::runJavaScriptConfirmPanelWithMessage):
(UIDelegate::runJavaScriptTextInputPanelWithPrompt):
(UIDelegate::runBeforeUnloadConfirmPanelWithMessage):
(UIDelegate::setStatusText):

LayoutTests:

* platform/win/fast/dom/Window/alert-with-unmatched-utf16-surrogate-should-not-crash-expected.txt: Removed.
* platform/wincairo/fast/dom/Window/alert-with-unmatched-utf16-surrogate-should-not-crash-expected.txt: Removed.

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

12 months agoAXIsolatedTree::generateSubtree should properly assign the generated subtree to its...
andresg_22@apple.com [Mon, 22 Jun 2020 23:54:58 +0000 (23:54 +0000)]
AXIsolatedTree::generateSubtree should properly assign the generated subtree to its parent node.
https://bugs.webkit.org/show_bug.cgi?id=213435

Reviewed by Darin Adler.

AXIsolatedTree::generateSubtree now properly updates the children IDs
of the parent node of the subtree being generated.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::generateIsolatedTree):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateChildrenIDs):
(WebCore::AXIsolatedTree::generateSubtree): Takes the parent object
instead of the parent ID. This allows to retrieve the children IDs of
the parent object.
(WebCore::AXIsolatedTree::createSubtree):
(WebCore::AXIsolatedTree::updateSubtree):
(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::setRootNode):
(WebCore::AXIsolatedTree::removeSubtree):
(WebCore::AXIsolatedTree::appendNodeChanges): R-value parameter instead
of by reference.
* accessibility/isolatedtree/AXIsolatedTree.h:

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

12 months agoWeb Inspector: adjust height of undocked title area to match macOS Big Sur
drousso@apple.com [Mon, 22 Jun 2020 23:44:22 +0000 (23:44 +0000)]
Web Inspector: adjust height of undocked title area to match macOS Big Sur
https://bugs.webkit.org/show_bug.cgi?id=213490

Reviewed by Timothy Hatcher.

* UserInterface/Views/Variables.css:
(body.mac-platform:not(.big-sur):not(.docked)): Added.
(body.mac-platform.big-sur:not(.docked)): Added.
(body.mac-platform:not(.docked)): Deleted.

* UserInterface/Base/Platform.js:
Add logic for detecting macOS Big Sur (and Catalina).

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

12 months agoWeb Inspector: Elements: Node: use a `WI.ContextMenu` instead of a `<select>` for...
drousso@apple.com [Mon, 22 Jun 2020 23:43:47 +0000 (23:43 +0000)]
Web Inspector: Elements: Node: use a `WI.ContextMenu` instead of a `<select>` for listener filtering
https://bugs.webkit.org/show_bug.cgi?id=213492

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
(WI.DOMNodeDetailsSidebarPanel.prototype._populateEventListenersFilterContextMenu): Added.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter > select): Deleted.

* Localizations/en.lproj/localizedStrings.js:

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

12 months agolibwebrtc fails to build on arm64
timothy_horton@apple.com [Mon, 22 Jun 2020 23:42:01 +0000 (23:42 +0000)]
libwebrtc fails to build on arm64
https://bugs.webkit.org/show_bug.cgi?id=213476

Reviewed by Maciej Stachowiak.

* Configurations/libvpx.xcconfig:
* Configurations/libwebrtc.xcconfig:
* Configurations/opus.xcconfig:
Use architecture conditionals instead of SDK conditionals for code that is
architecture-dependent.

Remove an macOS-version-dependent definition of EXCLUDED_SOURCE_FILE_NAMES
which is no longer used after r232665.

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

12 months ago[macOS] WebPageProxy::setPromisedDataForImage should sanitize its filename
wenson_hsieh@apple.com [Mon, 22 Jun 2020 23:01:51 +0000 (23:01 +0000)]
[macOS] WebPageProxy::setPromisedDataForImage should sanitize its filename
https://bugs.webkit.org/show_bug.cgi?id=213486
<rdar://problem/56522262>

Reviewed by Megan Gardner.

Ensure that the filename passed into WebPageProxy::setPromisedDataForImage is sanitized in the UI process prior
to being used as a suggested filename when writing a dragged image to the pasteboard.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setPromisedDataForImage):

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

12 months agoWebEx can not share video from Safari on arm64
timothy_horton@apple.com [Mon, 22 Jun 2020 22:25:43 +0000 (22:25 +0000)]
WebEx can not share video from Safari on arm64
https://bugs.webkit.org/show_bug.cgi?id=213481

Reviewed by Dean Jackson.

* UIProcess/UserMediaProcessManager.cpp:
(WebKit::needsAppleCameraService):
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::revokeSandboxExtensionsIfNeeded):
Pass sandbox extension for "com.apple.applecamerad" to the Web Content
process after the user allows camera access, when running on hardware which requires it.

* WebProcess/com.apple.WebProcess.sb.in:
Make it possible to dynamically extend the sandbox as above.

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

12 months agoCannot play back encrypted media on arm64
timothy_horton@apple.com [Mon, 22 Jun 2020 22:17:58 +0000 (22:17 +0000)]
Cannot play back encrypted media on arm64
https://bugs.webkit.org/show_bug.cgi?id=213483

Reviewed by Jer Noble and Per Arne Vollan.

* WebProcess/com.apple.WebProcess.sb.in:
Extend the sandbox as necessary for encrypted media support.

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

12 months agoOnly use vm_kernel_page_size on arm architectures
sbarati@apple.com [Mon, 22 Jun 2020 22:17:57 +0000 (22:17 +0000)]
Only use vm_kernel_page_size on arm architectures
https://bugs.webkit.org/show_bug.cgi?id=213474

Reviewed by Sam Weinig.

We don't want to use this under catalyst.

* bmalloc/VMAllocate.h:
(bmalloc::vmPageSizePhysical):

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

12 months agoFix the build
timothy_horton@apple.com [Mon, 22 Jun 2020 22:17:32 +0000 (22:17 +0000)]
Fix the build

* wtf/TranslatedProcess.h:
(WTF::isX86BinaryRunningOnARM):

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

12 months ago[WPE][GTK] Public API should not allow trying to register a special URI scheme
commit-queue@webkit.org [Mon, 22 Jun 2020 21:57:20 +0000 (21:57 +0000)]
[WPE][GTK] Public API should not allow trying to register a special URI scheme
https://bugs.webkit.org/show_bug.cgi?id=209900
<rdar://problem/61200217>

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-06-22
Reviewed by Adrian Perez de Castro

Epiphany prior to 3.36 registers a scheme handler for ftp. This introduced criticals. Let's
use g_warning() instead, and avoid hardcoding the list of disallowed schemes.

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

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

12 months ago[ macOS iOS ] (r263321): TestWebKitAPI.SleepDisabler.Load & TestWebKitAPI.SleepDisabl...
jer.noble@apple.com [Mon, 22 Jun 2020 21:55:36 +0000 (21:55 +0000)]
[ macOS iOS ] (r263321): TestWebKitAPI.SleepDisabler.Load & TestWebKitAPI.SleepDisabler.Reload are constant failures
https://bugs.webkit.org/show_bug.cgi?id=213475
<rdar://problem/64603555>

Reviewed by Eric Carlson.

Looks like the SleepDisabler can come and go while the TestWebKitAPI process is spinning, so make the
Reload and Load tests more deterministic by only checking SleepDisabler after getting a "playing" message
from the WebContent process.

* TestWebKitAPI/Tests/WebKit/SleepDisabler.mm:
(SleepDisabler::runAndWaitUntilPlaying):
(SleepDisabler::loadPlayingPage):
(TEST_F):

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

12 months agoresultsdbpy: Make architecture differences explicit
jbedard@apple.com [Mon, 22 Jun 2020 21:53:39 +0000 (21:53 +0000)]
resultsdbpy: Make architecture differences explicit
https://bugs.webkit.org/show_bug.cgi?id=213473
<rdar://problem/64602736>

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.toString):

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

12 months agodlopen() always fails on arm64, cannot load soft-linked libraries
timothy_horton@apple.com [Mon, 22 Jun 2020 21:24:17 +0000 (21:24 +0000)]
dlopen() always fails on arm64, cannot load soft-linked libraries
https://bugs.webkit.org/show_bug.cgi?id=213480

Reviewed by Alexey Proskuryakov and Per Arne Vollan.

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::initializeSandboxParameters):
Expose the auxiliary process' CPU family as a parameter to the sandbox profile,
so that it can be used to predicate sandbox expressions.

* WebProcess/com.apple.WebProcess.sb.in:
Allow mremap_encrypted from the Web Content process, because the arm64 dlopen() needs it.

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

12 months agoDisable the JS JIT when running in a translated process
timothy_horton@apple.com [Mon, 22 Jun 2020 21:05:09 +0000 (21:05 +0000)]
Disable the JS JIT when running in a translated process
https://bugs.webkit.org/show_bug.cgi?id=213478

Reviewed by Saam Barati.

Source/JavaScriptCore:

* runtime/Options.cpp:
(JSC::Options::recomputeDependentOptions):
Based on our performance experiements, disable the JavaScript JIT
(but not the regular expression, DOM, or Wasm JIT) when running
in a translated process.

Source/WTF:

* wtf/PlatformHave.h:
* wtf/TranslatedProcess.h: Added.
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
Add a helper function that can be used to determine that the current process
is being translated; currently the only case is an x86_64 process running on arm64e.

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

12 months agoUpdate macOS version macros
timothy_horton@apple.com [Mon, 22 Jun 2020 20:48:59 +0000 (20:48 +0000)]
Update macOS version macros
https://bugs.webkit.org/show_bug.cgi?id=213484

Reviewed by Alexey Proskuryakov.

Source/bmalloc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty:

* gtest/xcode/Config/DebugProject.xcconfig:
* gtest/xcode/Config/ReleaseProject.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty/libwebrtc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore/PAL:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebInspectorUI:

* Configurations/DebugRelease.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKit:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Tools:

* ContentExtensionTester/Configurations/Base.xcconfig:
* ContentExtensionTester/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* ImageDiff/cg/Configurations/Base.xcconfig:
* ImageDiff/cg/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebEditingTester/Configurations/Base.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
* lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:

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

12 months agosysctl() fails due to sandbox violation
timothy_horton@apple.com [Mon, 22 Jun 2020 20:46:51 +0000 (20:46 +0000)]
sysctl() fails due to sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=213482

Reviewed by Maciej Stachowiak.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:
Extend the sandbox as necessary to make sysctl calls work.

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

12 months agoWebGL cannot create a context if there is no GPU on the PCIe bus
timothy_horton@apple.com [Mon, 22 Jun 2020 20:24:48 +0000 (20:24 +0000)]
WebGL cannot create a context if there is no GPU on the PCIe bus
https://bugs.webkit.org/show_bug.cgi?id=213479

Reviewed by Maciej Stachowiak and Dean Jackson.

* src/gpu_info_util/SystemInfo_macos.mm:
(angle::GetSystemInfo):
Do not bail from WebGL initialization if there are no GPUs on the PCIe bus.
Instead, continue on to context creation, and allow the system frameworks
to return an error if there truly is no GPU.

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

12 months agoAPI Test WeakLinking.WeakImport fails on arm64
timothy_horton@apple.com [Mon, 22 Jun 2020 20:22:35 +0000 (20:22 +0000)]
API Test WeakLinking.WeakImport fails on arm64
https://bugs.webkit.org/show_bug.cgi?id=213477

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS-v2.tbd:
* TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS.tbd:
* TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS-v2.tbd:
* TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS.tbd:
Add this architecture to the TBD files.

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

12 months agoREGRESSION (r263121): [ Catalina Debug ] media/video-fullscreen-only-playback.html...
eric.carlson@apple.com [Mon, 22 Jun 2020 19:59:20 +0000 (19:59 +0000)]
REGRESSION (r263121): [ Catalina Debug ] media/video-fullscreen-only-playback.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=213407
<rdar://problem/64545587>

Unreviewed speculative change as I have not been able to reproduce the reported bug.

* media/video-fullscreen-only-playback.html:

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

12 months agoAdded getFloatTimeDomainData method to AnalyserNode
commit-queue@webkit.org [Mon, 22 Jun 2020 19:26:44 +0000 (19:26 +0000)]
Added getFloatTimeDomainData method to AnalyserNode
https://bugs.webkit.org/show_bug.cgi?id=213393

Patch by Clark Wang <clark_wang@apple.com> on 2020-06-22
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Re-baselined test to show a new passing test.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:

Source/WebCore:

Added getFloatTimeDomainData method, as per spec: https://www.w3.org/TR/webaudio/#analysernode.
Implementation of RealtimeAnalyser::getFloatTimeDomainData(Float32Array* destinationArray) is based on:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/webaudio/realtime_analyser.cc.
Removed nullable option from some AnalyserNode methods.

Re-baselined existing tests to show new passing test.

* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::getFloatFrequencyData):
(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getFloatTimeDomainData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):
* Modules/webaudio/RealtimeAnalyser.h:

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

12 months agoBring up watchOS/tvOS on build.webkit.org (Follow-up fix x3)
jbedard@apple.com [Mon, 22 Jun 2020 18:58:22 +0000 (18:58 +0000)]
Bring up watchOS/tvOS on build.webkit.org (Follow-up fix x3)
https://bugs.webkit.org/show_bug.cgi?id=213402
<rdar://problem/64542588>

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot): 64 bit is more correct for watchOS embedded builds.

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

12 months agoUnreviewed, re-landing r262904.
ggaren@apple.com [Mon, 22 Jun 2020 17:43:31 +0000 (17:43 +0000)]
Unreviewed, re-landing r262904.

r263223 should fix the test flakiness we saw.

Re-landed changeset:

"[Cocoa] Build callOnMainThread on WTF::RunLoop rather than on
a timer"
https://bugs.webkit.org/show_bug.cgi?id=213063
https://trac.webkit.org/changeset/262904

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

12 months agoAdd referrerpolicy attribute support for <link>
commit-queue@webkit.org [Mon, 22 Jun 2020 17:20:50 +0000 (17:20 +0000)]
Add referrerpolicy attribute support for <link>
https://bugs.webkit.org/show_bug.cgi?id=213342

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-22
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Fix wrong resource file name usage.

* web-platform-tests/referrer-policy/generic/multiple-headers-and-values.html:
* web-platform-tests/referrer-policy/generic/multiple-headers-combined.html:
* web-platform-tests/referrer-policy/generic/multiple-headers-one-invalid.html:
* web-platform-tests/referrer-policy/generic/multiple-headers-one-unknown-token.html:
* web-platform-tests/referrer-policy/generic/multiple-headers.html:

Source/WebCore:

Add support for referrerpolicy attribute handling on
link prefetch/preload/stylesheet.

Tests: http/tests/security/referrer-policy-attribute-style-no-referrer.html
       http/wpt/preload/refferer-policy.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::setReferrerPolicyForBindings):
(WebCore::HTMLLinkElement::referrerPolicyForBindings const):
(WebCore::HTMLLinkElement::referrerPolicy const):
* html/HTMLLinkElement.h:
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::resourceRequest):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader):
(WebCore::LinkLoader::preloadIfNeeded):
(WebCore::LinkLoader::prefetchIfNeeded):
* loader/LinkLoader.h:

LayoutTests:

Add a tests for <link rel="stylesheet">, <link rel="preload"> and the
referrerpolicy attribute.
Unskip the referrer-policy/generic/link-rel-prefetch.html test.

* TestExpectations:
* http/tests/security/referrer-policy-attribute-style-no-referrer-expected.html: Added.
* http/tests/security/referrer-policy-attribute-style-no-referrer.html: Added.
* http/tests/security/resources/green-background.css: Added.
(body):
* http/tests/security/resources/green-if-no-referrer-css.php: Added.
* http/tests/security/resources/pass-if-no-referrer.php: Added.
* http/wpt/preload/refferer-policy-expected.txt: Added.
* http/wpt/preload/refferer-policy.html: Added.
* http/wpt/preload/resources/referrer-img.py: Added.
(main):

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

12 months agoFix build error with release build and "#define LOG_DISABLED 0"
simon.fraser@apple.com [Mon, 22 Jun 2020 17:01:18 +0000 (17:01 +0000)]
Fix build error with release build and "#define LOG_DISABLED 0"
https://bugs.webkit.org/show_bug.cgi?id=213420

Reviewed by Sam Weinig.

AnimationBase::updateStateMachine() uses LOG_ERROR so needs to test ERROR_DISABLED not LOG_DISABLED.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine):

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

12 months agoREGRESSION (r263150): http/tests/ssl/applepay/ApplePayInstallmentItems.https.html...
aestes@apple.com [Mon, 22 Jun 2020 16:58:57 +0000 (16:58 +0000)]
REGRESSION (r263150): http/tests/ssl/applepay/ApplePayInstallmentItems.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=213466
<rdar://problem/64537600>

Reviewed by Tim Horton.

* http/tests/ssl/applepay/ApplePayInstallmentItems.https.html: Restored two lines of code
that were accidentally removed in r263150 and are necessary for the test to pass.

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

12 months agoFix the case of "null type Blob slice" in wpt/FileAPI/blob/Blob-slice.html
commit-queue@webkit.org [Mon, 22 Jun 2020 16:34:13 +0000 (16:34 +0000)]
Fix the case of "null type Blob slice" in wpt/FileAPI/blob/Blob-slice.html
https://bugs.webkit.org/show_bug.cgi?id=213370

Patch by Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> on 2020-06-22
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/FileAPI/blob/Blob-slice-expected.txt:

Source/WebCore:

* fileapi/Blob.h:
(WebCore::Blob::slice const):
Remove unnecessary default arguments
These default arguments are introduced in r83873
but we don't need them because WebIDL binding handles them.

* fileapi/Blob.idl:
- Update the definition of `Blob.slice()` to match the latest spec.
  https://w3c.github.io/FileAPI/#blob-section

- We should use empty string as a default value by step 4-a of
  https://w3c.github.io/FileAPI/#dfn-slice

- In the previous code, we use `optional DOMString?` for the
  _contentType_ arguments for `Blob.slice()`.
  Then, our codegen generates a code which uses `convert<IDLNullable<IDLDOMString>>`
  and it returns `String()` if the JS value is `null`.
  This caused the failure case in this change.

LayoutTests:

* http/tests/local/fileapi/send-sliced-dragged-file-expected.txt:
* http/tests/local/fileapi/send-sliced-dragged-file.html:

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

12 months agoCode cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and position.
andresg_22@apple.com [Mon, 22 Jun 2020 16:31:54 +0000 (16:31 +0000)]
Code cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and position.
https://bugs.webkit.org/show_bug.cgi?id=213438

Reviewed by Darin Adler.

* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
Removed unnecessary call to axBackingObject.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper position]):
Check for isIsolatedTreeEnabled instead of for the request thread,
since isolated tree mode = 1 runs on the main thread.

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

12 months ago[WebRTC] Add support for freeze/pause receiver stats
youenn@apple.com [Mon, 22 Jun 2020 16:15:08 +0000 (16:15 +0000)]
[WebRTC] Add support for freeze/pause receiver stats
https://bugs.webkit.org/show_bug.cgi?id=212938
<rdar://problem/64141493>

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated tests.

Receiver stats are useful to check for freezes.
Let's introduce it in 'track' stats for now, we will later on move all
'receiver' stats to its own object once we fully align with spec.

* Modules/mediastream/RTCStatsReport.h:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
(WebCore::fillRTCMediaStreamTrackStats):

LayoutTests:

* webrtc/video-mediastreamtrack-stats.html:

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

12 months agoImage `crossorigin` mutations should be considered "relevant mutations"
commit-queue@webkit.org [Mon, 22 Jun 2020 16:09:37 +0000 (16:09 +0000)]
Image `crossorigin` mutations should be considered "relevant mutations"
https://bugs.webkit.org/show_bug.cgi?id=213335

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-22
Reviewed by Darin Adler.

As follow up to r263345, this check is not needed after all since the for loop
already does the same check.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):

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

12 months agoUnreviewed, reverting r263331.
lawrence.j@apple.com [Mon, 22 Jun 2020 15:26:32 +0000 (15:26 +0000)]
Unreviewed, reverting r263331.

This commit was causing 50+ iOS debug tests to crash.

Reverted changeset:

"Convert DateComponents parsing code to use Optional based
return values rather than out-parameters"
https://bugs.webkit.org/show_bug.cgi?id=213440
https://trac.webkit.org/changeset/263331

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

12 months ago[ macOS iOS ] REGRESSION: fast/mediastream/mediastrea mtrack-video-frameRate-clon...
jacob_uphoff@apple.com [Mon, 22 Jun 2020 15:06:38 +0000 (15:06 +0000)]
[ macOS iOS ] REGRESSION: fast/mediastream/mediastrea mtrack-video-frameRate-clon e-increasing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=213461

Unreviewed test gardening

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

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

12 months ago[ews] Switch contributors.json url from trac to svn server
aakash_jain@apple.com [Mon, 22 Jun 2020 14:32:38 +0000 (14:32 +0000)]
[ews] Switch contributors.json url from trac to svn server
https://bugs.webkit.org/show_bug.cgi?id=213457

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(ValidateCommiterAndReviewer):
(ValidateCommiterAndReviewer.load_contributors_from_trac):

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

12 months ago[WebXR] Add a preliminary implementation of XRWebGLLayer
svillar@igalia.com [Mon, 22 Jun 2020 12:28:08 +0000 (12:28 +0000)]
[WebXR] Add a preliminary implementation of XRWebGLLayer
https://bugs.webkit.org/show_bug.cgi?id=213022

Reviewed by Carlos Garcia Campos.

LayoutTests/imported/w3c:

Added new expectations.

* web-platform-tests/webxr/xrWebGLLayer_constructor.https-expected.txt: Added.
* web-platform-tests/webxr/xrWebGLLayer_framebuffer_sameObject.https-expected.txt: Added.

Source/WebCore:

Added a preliminary implementation of XRWebGLLayer. It does not have any functionality at the moment so
it cannot be used to render WebXR stuff. This patch adds all the machinery required to create and properly
initialize the layer according to the spec.

Two new wpt tests are passing now.

* Modules/webxr/WebXRSession.h: Expose session mode.
* Modules/webxr/WebXRWebGLLayer.cpp:
(WebCore::WebXRWebGLLayer::create): Implemented spec for XRWebGLLayer creation.
(WebCore::WebXRWebGLLayer::computeNativeWebGLFramebufferResolution): Added with mock implementation.
(WebCore::WebXRWebGLLayer::computeRecommendedWebGLFramebufferResolution): Added.
(WebCore::WebXRWebGLLayer::WebXRWebGLLayer):
(WebCore::WebXRWebGLLayer::framebuffer const): Returned type should be a pointer.
(WebCore::WebXRWebGLLayer::framebufferWidth const): Return framebuffer width if available, otherwise return
the base context width.
(WebCore::WebXRWebGLLayer::framebufferHeight const): Ditto but with heights.
(WebCore::WebXRWebGLLayer::getNativeFramebufferScaleFactor): Implemented.
* Modules/webxr/WebXRWebGLLayer.h: New methods and type adjustments.

LayoutTests:

* platform/wpe/TestExpectations: Added 2 more tests that are passing now.

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

12 months agoImage `crossorigin` mutations should be considered "relevant mutations"
commit-queue@webkit.org [Mon, 22 Jun 2020 10:49:20 +0000 (10:49 +0000)]
Image `crossorigin` mutations should be considered "relevant mutations"
https://bugs.webkit.org/show_bug.cgi?id=213335

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-22
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update improved test result.

* web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/drawimage_crossorigin.sub-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations-expected.txt:

Source/WebCore:

Make crossorigin attribute's state changes relevant mutations [1]. This change
also fixes several picture related mutations to be relevant [2].

Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html

[1] https://html.spec.whatwg.org/#reacting-to-dom-mutations:attr-img-crossorigin
[2] https://html.spec.whatwg.org/#reacting-to-dom-mutations

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::evaluateDynamicMediaQueryDependencies):
(WebCore::HTMLImageElement::selectImageSource):
(WebCore::parseCrossoriginState):
(WebCore::HTMLImageElement::attributeChanged):
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedIntoAncestor):
(WebCore::HTMLImageElement::removedFromAncestor):
* html/HTMLImageElement.h:
* html/HTMLPictureElement.cpp:
(WebCore::HTMLPictureElement::sourcesChanged):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedIntoAncestor):
(WebCore::HTMLSourceElement::removedFromAncestor):
(WebCore::HTMLSourceElement::parseAttribute):
* html/HTMLSourceElement.h:
* loader/ImageLoader.h:

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

12 months ago[Flatpak SDK] Persist sccache auth token across flatpak updates
commit-queue@webkit.org [Mon, 22 Jun 2020 09:23:19 +0000 (09:23 +0000)]
[Flatpak SDK] Persist sccache auth token across flatpak updates
https://bugs.webkit.org/show_bug.cgi?id=213427

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-22
Reviewed by Žan Doberšek.

After a successful flatpak update check if an sccache auth token exists and reuse it when
updating the sccache config file.

* flatpak/flatpakutils.py:
(WebkitFlatpak.save_config):

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

12 months ago[GTK] Ping attribute tests have been timeout since r204720
carlosgc@webkit.org [Mon, 22 Jun 2020 07:50:59 +0000 (07:50 +0000)]
[GTK] Ping attribute tests have been timeout since r204720
https://bugs.webkit.org/show_bug.cgi?id=162017

Reviewed by Adrian Perez de Castro.

The tests are using "TouchEvent" in window to check whether it's a touch screen and use
uiController.singleTapAtPoint() instead of the eventSender. TouchEvent is always added to the window object when
building with touch events enabled, which is the case of the GTK port. However, the ontouch event handlers are
added at runtime only when there's an actual touch screen (EnabledAtRuntime=TouchEvents). So, we can check
"ontouchstart" in window instead.

* http/tests/inspector/network/ping-type.html:
* http/tests/navigation/ping-attribute/resources/utilities.js:
(clickElement):
* platform/gtk/TestExpectations:

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

12 months agoWebKit fails to leave audio routing arbitration during navigation, closing.
graouts@webkit.org [Mon, 22 Jun 2020 07:18:56 +0000 (07:18 +0000)]
WebKit fails to leave audio routing arbitration during navigation, closing.
https://bugs.webkit.org/show_bug.cgi?id=213426
<rdar://problem/64395051>

Unreviewed build fix for an unannotated switch fall-through between switch labels.

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

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

12 months ago[WTF] Ensure ASCIILiteral is ASCII characters at compile time
ysuzuki@apple.com [Mon, 22 Jun 2020 06:51:27 +0000 (06:51 +0000)]
[WTF] Ensure ASCIILiteral is ASCII characters at compile time
https://bugs.webkit.org/show_bug.cgi?id=213449

Reviewed by Ross Kirsling.

The purpose of ASCIILiteral is ensure that this is compile-time (do not need to consider about ownership) ASCII characters.
By using `isASCII` and `ASSERT_UNDER_CONSTEXPR_CONTEXT`, we can make sure that this C string does not include non ASCII characters.
For example,

    auto globalVariable = "ラーメン (Ramen in Japanese)"_s;

becomes compile error.

* wtf/ASCIICType.h:
(WTF::isASCII):
* wtf/text/ASCIILiteral.h:
(WTF::StringLiterals::operator _s):

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

12 months ago[WTF] URL should support dataLog
ysuzuki@apple.com [Mon, 22 Jun 2020 06:50:21 +0000 (06:50 +0000)]
[WTF] URL should support dataLog
https://bugs.webkit.org/show_bug.cgi?id=213450

Reviewed by Mark Lam.

Source/WTF:

Add URL::dump(PrintStream&) to support `dataLog(url)` which is extremely useful for WTF / JSC developers.

* wtf/URL.cpp:
(WTF::URL::dump const):
* wtf/URL.h:

Tools:

Add test for URL::dump.

* TestWebKitAPI/Tests/WTF/URL.cpp:
(TestWebKitAPI::TEST_F):

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

12 months ago[WebDriver][GTK] Some executing_async_javascript_tests.py tests are failing with...
lmoura@igalia.com [Mon, 22 Jun 2020 04:43:09 +0000 (04:43 +0000)]
[WebDriver][GTK] Some executing_async_javascript_tests.py tests are failing with TimeoutExceptions
https://bugs.webkit.org/show_bug.cgi?id=211496

Unreviewed test gardening.

The two tests started passing with the updated selenium imported
tests from r263264;

* TestExpectations.json:

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

12 months agoWebDriver: several tests in imported/selenium/py/test/selenium/webdriver/common/visib...
lmoura@igalia.com [Mon, 22 Jun 2020 04:41:22 +0000 (04:41 +0000)]
WebDriver: several tests in imported/selenium/py/test/selenium/webdriver/common/visibility_tests.py fail
https://bugs.webkit.org/show_bug.cgi?id=182334

Unreviewed test gardening.

The last two remaining tests from this bug started passing after the
imported selenium tests were updated in r263264.

* TestExpectations.json:

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

12 months agoWebDriver: two selenium alert tests are failing
lmoura@igalia.com [Mon, 22 Jun 2020 04:39:33 +0000 (04:39 +0000)]
WebDriver: two selenium alert tests are failing
https://bugs.webkit.org/show_bug.cgi?id=181727

Unreviewed test gardening.

These tests also have been passing since r262861.

* TestExpectations.json:

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

12 months ago[WebDriver][GTK] Gardening failures related to missing selenium files
lmoura@igalia.com [Mon, 22 Jun 2020 04:38:12 +0000 (04:38 +0000)]
[WebDriver][GTK] Gardening failures related to missing selenium files

Unreviewed test gardening.

The relative_by_tests require some JS fragments built by Bazel,
Selenium's build tool.

* TestExpectations.json:

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

12 months agoAttempt to unskip stress test array-buffer-view-watchpoint-can-be-fired-really-add...
commit-queue@webkit.org [Sun, 21 Jun 2020 22:58:17 +0000 (22:58 +0000)]
Attempt to unskip stress test array-buffer-view-watchpoint-can-be-fired-really-add-in-dfg.js on most architectures
https://bugs.webkit.org/show_bug.cgi?id=213433

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-06-21
Reviewed by Darin Adler.

* stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js:

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

12 months agoConvert much of the SVG string parsing code to use Optional based return values rathe...
weinig@apple.com [Sun, 21 Jun 2020 22:47:09 +0000 (22:47 +0000)]
Convert much of the SVG string parsing code to use Optional based return values rather than out-parameters
https://bugs.webkit.org/show_bug.cgi?id=213416

Reviewed by Darin Adler.

Update SVG parsers to use Optional style return programming rather than out parameters.
To make things even nicer, SVGPathSource based parsers now have a type per-parse function,
which makes working with them much easier. In the future, we should consider exanding these
new types to be used by SVGPathConsumer family of classes as well.

* WebCore.xcodeproj/project.pbxproj:
Add SVGPathSegValue.h, which was missing from the Xcode project.

* svg/SVGAngleValue.cpp:
(WebCore::parseAngleType):
(WebCore::SVGAngleValue::setValueAsString):
Adopt updated parseNumber() function, and do a drive by removal of an easy to remove
upconvertedCharacters.

* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::calculateToAtEndOfDurationValue):
(WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
(WebCore::SVGAnimateMotionElement::calculateFromAndByValues):
(WebCore::SVGAnimateMotionElement::calculateDistance):
Now uses new parsePoint() function. Using Optional.valueOr() where
the old code would have had parsePoint() doing the clearing.

* svg/SVGAnimationElement.cpp:
(WebCore::parseKeySplines):
Now returns an Optional<Vector<UnitBezier>>.
(WebCore::SVGAnimationElement::parseAttribute):
Now uses new parseKeySplines, and does an explicit clear on parse failure (old code
did it implicitly in the parse function).

* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::parseAttribute):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::parseAttribute):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::parseAttribute):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::parseAttribute):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::parseAttribute):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::parseAttribute):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::parseAttribute):
Adopt Optional based parseNumberOptionalNumber.

* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::parseAttribute):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::parseAttribute):
Simplify by using the SVGPreserveAspectRatioValue constructor
which calls parse. No need for three lines.

* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseAttribute):
Adopt new Optional based parseViewBox.
Simplify by using the SVGPreserveAspectRatioValue constructor
which calls parse. No need for three lines.

(WebCore::SVGFitToViewBox::parseViewBox):
Convert to be Optional based, and adopt new parseNumber functions.

* svg/SVGFitToViewBox.h:
Updated signatures for new Optional based functions.

* svg/SVGGlyphRefElement.cpp:
(WebCore::parseFloat):
Adopt Optional based parseNumber.

* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::buildHorizontalKerningPair const):
* svg/SVGHKernElement.h:
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::buildVerticalKerningPair const):
* svg/SVGVKernElement.h:
Convert to be Optional based. Update a few callers to use makeString.

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::addKerningPair const):
(WebCore::SVGToOTFFontConverter::appendKERNSubtable):
Adopt new Optional based kerning pair builders. Add some moves
to avoid some copies.

* svg/SVGLengthValue.cpp:
(WebCore::SVGLengthValue::setValueAsString):
Adopt Optional based parseNumber.

* svg/SVGNumberList.h:
(WebCore::SVGNumberList::parse):
Adopt Optional based parseNumber.

* svg/SVGParserUtilities.cpp:
(WebCore::genericParseNumber):
(WebCore::parseNumber):
(WebCore::genericParseArcFlag):
(WebCore::parseArcFlag):
(WebCore::parseNumberOptionalNumber):
(WebCore::parsePoint):
(WebCore::parseRect):
(WebCore::parseGlyphName):
(WebCore::parseUnicodeRange):
(WebCore::parseKerningUnicodeString):
(WebCore::genericParseFloatPoint):
(WebCore::parseFloatPoint):
(WebCore::parseSVGNumber): Deleted.
(WebCore::parseNumberFromString): Deleted.
(WebCore::parseDelimitedString): Deleted.
(WebCore::parseFloatPoint2): Deleted.
(WebCore::parseFloatPoint3): Deleted.
* svg/SVGParserUtilities.h:
(WebCore::isSVGSpace):
(WebCore::skipOptionalSVGSpaces):
(WebCore::skipOptionalSVGSpacesOrDelimiter):
- Converts parse* functions to return Optional values rather than using outparameters.
- Removes unused parseSVGNumber and parseDelimitedString.
- Removes parseFloatPoint2 and parseFloatPoint3. They weren't useful enough to keep around.
- Renames parseNumberFromString to parseNumber. The argument is a String, it's clear enough.
- Replace boolean skip parameters with new enum SuffixSkippingPolicy.
- Make parseFloatPoint have two overloads rather than being templatized to be consistent.

* svg/SVGPathBlender.cpp:
(WebCore::pullFromSources):
(WebCore::SVGPathBlender::blendMoveToSegment):
(WebCore::SVGPathBlender::blendLineToSegment):
(WebCore::SVGPathBlender::blendLineToHorizontalSegment):
(WebCore::SVGPathBlender::blendLineToVerticalSegment):
(WebCore::SVGPathBlender::blendCurveToCubicSegment):
(WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
(WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
(WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
(WebCore::SVGPathBlender::blendArcToSegment):
(WebCore::SVGPathBlender::canBlendPaths):
(WebCore::SVGPathBlender::blendAnimatedPath):
Update to adopt new SVGPathSource interface. Added pullFromSources helper
which substantially simplifies pulling from both the from and to source at
the same time and is now possible due to all the SVGPathSource functions
returning the segment types rather than taking them as out parameters.

* svg/SVGPathByteStreamSource.cpp:
(WebCore::SVGPathByteStreamSource::nextCommand):
(WebCore::SVGPathByteStreamSource::parseSVGSegmentType):
(WebCore::SVGPathByteStreamSource::parseMoveToSegment):
(WebCore::SVGPathByteStreamSource::parseLineToSegment):
(WebCore::SVGPathByteStreamSource::parseLineToHorizontalSegment):
(WebCore::SVGPathByteStreamSource::parseLineToVerticalSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToCubicSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathByteStreamSource::parseArcToSegment):
* svg/SVGPathByteStreamSource.h:
Adopt new SVGPathSource interface.

* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parseMoveToSegment):
(WebCore::SVGPathParser::parseLineToSegment):
(WebCore::SVGPathParser::parseLineToHorizontalSegment):
(WebCore::SVGPathParser::parseLineToVerticalSegment):
(WebCore::SVGPathParser::parseCurveToCubicSegment):
(WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathParser::parseArcToSegment):
(WebCore::SVGPathParser::parsePathData):
Adapt to new SVGPathSource interface. Code reads a bit nicer now
that we don't have a ton of local variables in each method. Could
be made nicer in the future by adopting Segment types in the path
consumer code.

* svg/SVGPathSegListSource.cpp:
(WebCore::SVGPathSegListSource::nextCommand):
(WebCore::SVGPathSegListSource::parseSVGSegmentType):
(WebCore::SVGPathSegListSource::parseMoveToSegment):
(WebCore::SVGPathSegListSource::parseLineToSegment):
(WebCore::SVGPathSegListSource::parseLineToHorizontalSegment):
(WebCore::SVGPathSegListSource::parseLineToVerticalSegment):
(WebCore::SVGPathSegListSource::parseCurveToCubicSegment):
(WebCore::SVGPathSegListSource::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathSegListSource::parseCurveToQuadraticSegment):
(WebCore::SVGPathSegListSource::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathSegListSource::parseArcToSegment):
* svg/SVGPathSegListSource.h:
Adopt new SVGPathSource interface.

* svg/SVGPathSource.h:
Update interface to return Optionals, with a specific type for
segment kind that be parsed.

* svg/SVGPathStringSource.cpp:
(WebCore::nextCommandHelper):
(WebCore::SVGPathStringSource::nextCommand):
(WebCore::parseSVGSegmentTypeHelper):
(WebCore::SVGPathStringSource::parseSVGSegmentType):
(WebCore::SVGPathStringSource::parseMoveToSegment):
(WebCore::SVGPathStringSource::parseLineToSegment):
(WebCore::SVGPathStringSource::parseLineToHorizontalSegment):
(WebCore::SVGPathStringSource::parseLineToVerticalSegment):
(WebCore::SVGPathStringSource::parseCurveToCubicSegment):
(WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathStringSource::parseCurveToQuadraticSegment):
(WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathStringSource::parseArcToSegment):
(WebCore::parseArcToSegmentHelper): Deleted.
* svg/SVGPathStringSource.h:
Adopt new SVGPathSource interface. Replace out of line helpers (or use of things
like parseFloatPoint2) with generic lambda helpers, helping to keep the code more
localized.

* svg/SVGPointList.h:
(WebCore::SVGPointList::parse):
Adopt Optional based parseNumber.

* svg/SVGTransformList.h:
* svg/SVGTransformable.cpp:
(WebCore::parseTransformParamList):
(WebCore::SVGTransformable::parseTransformValue):
(WebCore::SVGTransformable::parseAndSkipType):
(WebCore::SVGTransformable::parseTransformType):
* svg/SVGTransformable.h:
Convert parseTransformValue/parseAndSkipType to be Optional based.

* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::parseViewSpec):
Adopt Optional based parseViewBox.

* svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
Adopt Optional based parseNumber.

* svg/properties/SVGPropertyTraits.h:
(WebCore::SVGPropertyTraits<float>::fromString):
(WebCore::SVGPropertyTraits<float>::parse):
(WebCore::SVGPropertyTraits<FloatPoint>::fromString):
(WebCore::SVGPropertyTraits<FloatPoint>::parse):
(WebCore::SVGPropertyTraits<FloatRect>::fromString):
(WebCore::SVGPropertyTraits<FloatRect>::parse):
Adopt Optional based parsers.

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

12 months ago[Flatpak] Nightly runner fails to extract zip files
commit-queue@webkit.org [Sun, 21 Jun 2020 20:33:33 +0000 (20:33 +0000)]
[Flatpak] Nightly runner fails to extract zip files
https://bugs.webkit.org/show_bug.cgi?id=213445

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-21
Reviewed by Darin Adler.

* Scripts/webkit-flatpak-run-nightly: Ensure the buffered zip data is written to disk before
extraction.

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

12 months agocompositing/video/video-border-radius-clipping.html was a flaky failure after r263223
ggaren@apple.com [Sun, 21 Jun 2020 20:20:23 +0000 (20:20 +0000)]
compositing/video/video-border-radius-clipping.html was a flaky failure after r263223
https://bugs.webkit.org/show_bug.cgi?id=213424

Reviewed by Darin Adler.

The last attempt to unflake this test was r253310. Let's try again.

I took a screen recording of a few hundred loads of this test @ r263222,
and it looks like it was always possible for canplaythrough and seeked
to fire before the video had rendered its first frame. So, this is a
test issue.

The screen recording seems to show that waiting for
requestAnimationFrame ensures that the video renders its first frame.
This might be for a principled system vsync reason, or just a lucky
delay. Either way, the test seems less flaky now.

This might mean that we can remove the previous seeked event workaround,
but I chose not to tempt fate, and left it in place.

* compositing/video/video-border-radius-clipping-expected.html:
* compositing/video/video-border-radius-clipping.html:
* media/video-test.js:
(_eventCallback):
(waitForEvent):

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

12 months agoConvert DateComponents parsing code to use Optional based return values rather than...
weinig@apple.com [Sun, 21 Jun 2020 19:58:25 +0000 (19:58 +0000)]
Convert DateComponents parsing code to use Optional based return values rather than out-parameters
https://bugs.webkit.org/show_bug.cgi?id=213440

Reviewed by Darin Adler.

Rework DateComponents and Date/Time related InputTypes to use Optional based programming
for parsing results. Also take the opportunity to remove unicode upconversion from
DateComponent parsing and instead separate UChar and LChar variants via templates.

* html/BaseDateAndTimeInputType.cpp:
* html/BaseDateAndTimeInputType.h:
* html/DateInputType.cpp:
* html/DateInputType.h:
* html/DateTimeInputType.cpp:
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.cpp:
* html/DateTimeLocalInputType.h:
* html/HTMLInputElement.cpp:
* html/HTMLInputElement.h:
* html/InputType.cpp:
* html/InputType.h:
* html/MonthInputType.cpp:
* html/MonthInputType.h:
* html/TimeInputType.cpp:
* html/TimeInputType.h:
* html/WeekInputType.cpp:
* html/WeekInputType.h:
    - Removes parseToDateComponentsInternal. No need it and parseToDateComponents.
    - Makes parseToDateComponents pure virtual. The old code had a default implementations
      down in InputType, but it had no callers.
    - Remove iOS vs. non-iOS difference for dateType(). It is now available on InputType
      on all platforms.
    - Make setMillisecondToDateComponents and parseToDateComponents return an Optional.

* platform/DateComponents.cpp:
* platform/DateComponents.h:
    - Replace member function based interfaces for parsing/setting explicit time offsets
      with new factory functions that return Optional<DateComponents>.
    - These factories are implemented using the existing member functions, which are
      now private.
    - Make max/min constants constexpr.
    - Make parse* member functions templates to allow factory parse functions to
      call them without upconverting.
    - Replace header guard with #pragma once.

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

12 months agofast/text/international/system-language/navigator-language/navigator-language tests...
mmaxfield@apple.com [Sun, 21 Jun 2020 18:43:40 +0000 (18:43 +0000)]
fast/text/international/system-language/navigator-language/navigator-language tests are failing on Mojave
<rdar://problem/64468227>

Unreviewed test gardening.

* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt: Added.

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

12 months ago[LFC] Add basic support for width: fit-content
zalan@apple.com [Sun, 21 Jun 2020 17:13:47 +0000 (17:13 +0000)]
[LFC] Add basic support for width: fit-content
https://bugs.webkit.org/show_bug.cgi?id=213444

Reviewed by Antti Koivisto.

Source/WebCore:

At this point this is just a shrink-to-fit sizing (missing the case when the available horizontal space is not specified).

Test: fast/layoutformattingcontext/fit-content-width-simple.html

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::computedWidthValue):

LayoutTests:

* fast/layoutformattingcontext/fit-content-width-simple-expected.html: Added.
* fast/layoutformattingcontext/fit-content-width-simple.html: Added.

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

12 months agoWebKit fails to leave audio routing arbitration during navigation, closing.
jer.noble@apple.com [Sun, 21 Jun 2020 15:34:12 +0000 (15:34 +0000)]
WebKit fails to leave audio routing arbitration during navigation, closing.
https://bugs.webkit.org/show_bug.cgi?id=213426
<rdar://problem/64395051>

Reviewed by Eric Carlson.

Source/WebCore:

When setting the AudioSession category, make sure to leave routing arbitration before bailing out early. Also,
HTMLMediaElement::canProduceAudio() should return `false` when the element's document is suspended or stopped.
Otherwise, the AudioSession will continue in the `MediaPlayback` category indefinitely, and routing arbitration
will remain active.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canProduceAudio const):
* platform/audio/mac/AudioSessionMac.mm:
(WebCore::AudioSession::setCategory):

Source/WebKit:

Add testing SPIs to verify whether a WebPage successfully entered or left audio routing
arbitration. Notify the Arbitration proxy when the page is shut down, which ensures arbitration
will end if the client closes the WKWebView.

* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _audioRoutingArbitrationStatus]):
* UIProcess/API/mac/WKWebViewTestingMac.mm:
* UIProcess/Media/AudioSessionRoutingArbitratorProxy.h:
(WebKit::AudioSessionRoutingArbitratorProxy::arbitrationStatus const):
* UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:
(WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate):
(WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory):
(WebKit::AudioSessionRoutingArbitratorProxy::endRoutingArbitration):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shutDown):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::audioSessionRoutingArbitrator):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AudioRoutingArbitration.mm: Added.
(AudioRoutingArbitration::statusShouldBecomeEqualTo):
(TEST_F):

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

12 months ago[LFC][TFC] Add support for percentage min/max-width
zalan@apple.com [Sun, 21 Jun 2020 13:51:01 +0000 (13:51 +0000)]
[LFC][TFC] Add support for percentage min/max-width
https://bugs.webkit.org/show_bug.cgi?id=213436

Reviewed by Antti Koivisto.

Source/WebCore:

1. The table generates a principal block container box called the table wrapper box that contains the table box itself and any caption boxes.
2. The table wrapper box establishes a block formatting context, and the table box establishes a table formatting context.
3. The computed values of properties 'position', 'float', 'margin-*', 'top', 'right', 'bottom', and 'left' on
   the table element are used on the table wrapper box and not the table box; all other values of non-inheritable
   properties are used on the table box and not the table wrapper box.
4. In a block formatting context, each box's left outer edge touches the left edge of the containing block.
   This is true even in the presence of floats, unless the box establishes a new block formatting context (in which case the
   box itself may become narrower due to the floats)

Now consider the following case:
<div style="display: block; width: 500px;">
    <div style="float: left; width: 100px;"></div>
    <div style="display: table; width: 10%;"></div>
</div>
1. We create a table wrapper box to wrap the "display: table" block level box (#1).
2. The table wrapper box's width property is set to auto (#3).
3. Since it establishes a new block formatting context, the available horizontal space gets shrunk by the float (#4)
4. The table wrapper box's used width computes to 500px - 100px -> 400px;

Now we are inside the BFC established by the table wrapper box and try to resolve the table's width -> %10.
According to the normal BFC rules, it should compute to 10% of the containing block's logical width: 400px -> 40px.
However in practice it computes to 50px (10% of 500px).

Similar setup with non-table content would resolve the inner block level box's width to 40px;
<div style="display: block; width: 500px">
    <div style="float: left; width: 100px;"></div>
    <div style="display: block; overflow: hidden;">
        <div style="display: block; width: 10%"></div>
    </div>
</div>
This needs clarification.

Test: fast/layoutformattingcontext/float-avoider-available-horizontal-space3.html

* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::isTableWrapperBlockFormattingContext const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
* layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp:
(WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox):
* layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h:

LayoutTests:

* fast/layoutformattingcontext/float-avoider-available-horizontal-space3-expected.html: Added.
* fast/layoutformattingcontext/float-avoider-available-horizontal-space3.html: Added.

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

12 months ago[WPE][GTK] Specify underlying storage type for InputMethodState::Hint
commit-queue@webkit.org [Sun, 21 Jun 2020 09:13:04 +0000 (09:13 +0000)]
[WPE][GTK] Specify underlying storage type for InputMethodState::Hint
https://bugs.webkit.org/show_bug.cgi?id=213401

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

Using unsigned types for flags enums seems nice to do.

* Shared/glib/InputMethodState.h:

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

12 months ago[WPE][GTK] Add autocleanup for WebKitWebsitePolicies
commit-queue@webkit.org [Sun, 21 Jun 2020 09:11:04 +0000 (09:11 +0000)]
[WPE][GTK] Add autocleanup for WebKitWebsitePolicies
https://bugs.webkit.org/show_bug.cgi?id=213399

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

Add missing autocleanups.

* UIProcess/API/gtk/WebKitAutocleanups.h:
* UIProcess/API/wpe/WebKitAutocleanups.h:

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

12 months ago[AppSSO] Should do null check on m_page in dismissViewController()
jiewen_tan@apple.com [Sun, 21 Jun 2020 06:10:37 +0000 (06:10 +0000)]
[AppSSO] Should do null check on m_page in dismissViewController()
https://bugs.webkit.org/show_bug.cgi?id=213415
<rdar://problem/59672418>

Reviewed by Alexey Proskuryakov.

* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
(WebKit::SOAuthorizationSession::dismissViewController):

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

12 months agoRecoveryOS: PAL::getAVPlayerLayerClass() will crash when AVFoundation is missing
jer.noble@apple.com [Sun, 21 Jun 2020 02:49:26 +0000 (02:49 +0000)]
RecoveryOS: PAL::getAVPlayerLayerClass() will crash when AVFoundation is missing
https://bugs.webkit.org/show_bug.cgi?id=213437
<rdar://problem/64563064>

Reviewed by Eric Carlson.

Check PAL::isAVFoundationAvailable() before calling PAL::getAVPlayerLayerClass();

Source/WebCore:

* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
(WebCore::VideoLayerManagerObjC::setVideoLayer):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::clone const):
(WebCore::PlatformCALayerCocoa::avPlayerLayer const):

Source/WebKit:

* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::clone const):

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

12 months agoCrash under ScrollController::startSnapRubberbandTimer() firing
simon.fraser@apple.com [Sun, 21 Jun 2020 02:13:55 +0000 (02:13 +0000)]
Crash under ScrollController::startSnapRubberbandTimer() firing
https://bugs.webkit.org/show_bug.cgi?id=213439
<rdar://problem/63986013>

Reviewed by Tim Horton.

A wholesale destruction of the ScrollingTree (e.g. via ScrollingCoordinatorMac::pageDestroyed()) never
ran the code to stop CFRunLoopTimers in ScrollController, which could lead to this crash.
Fix by calling removeAllNodes() in ThreadedScrollingTree::invalidate().

Add an assertion in ScrollController's destructor that stopAllTimers() has been called, and have
ScrollAnimator's destructor call stopAllTimers() too.

* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::invalidate):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::~ScrollAnimator):
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::~ScrollController):
(WebCore::ScrollController::stopAllTimers):

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

12 months agoREGRESSION(r259219): Sleep assertion remains active if WKWebView is closed or WebCont...
jer.noble@apple.com [Sun, 21 Jun 2020 01:13:21 +0000 (01:13 +0000)]
REGRESSION(r259219): Sleep assertion remains active if WKWebView is closed or WebContent process crashes
https://bugs.webkit.org/show_bug.cgi?id=213434
<rdar://problem/57541662>

Reviewed by Eric Carlson.

Source/WebKit:

Tests: TestWebKitAPI tests:
    SleepDisabler.Basic
    SleepDisabler.Pause
    SleepDisabler.Mute
    SleepDisabler.Unmute
    SleepDisabler.DisableAudioTrack
    SleepDisabler.Loop
    SleepDisabler.ChangeSrc
    SleepDisabler.Load
    SleepDisabler.Unload
    SleepDisabler.Navigate
    SleepDisabler.NavigateBack
    SleepDisabler.Reload
    SleepDisabler.Close
    SleepDisabler.Crash

Ensure the SleepDisablers are cleared when the WebProcess closes or crashes.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

Tools:

* TestWebKitAPI/Tests/WebKit/SleepDisabler.mm:
(SleepDisabler::loadPlayingPage):
(SleepDisabler::hasSleepDisablerShouldBecomeEqualTo):
(TEST_F):

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

12 months ago[iOS, macOS] Allow access to the container manager to support Mail InjectedBundle
bfulgham@apple.com [Sat, 20 Jun 2020 23:35:59 +0000 (23:35 +0000)]
[iOS, macOS] Allow access to the container manager to support Mail InjectedBundle
https://bugs.webkit.org/show_bug.cgi?id=213357
<rdar://problem/63837247>

Reviewed by Darin Adler.

The Mail Injected Bundle requires access to the container manager to support certain OS operations. We do not need
this access for web browsing, and should limit this access to this one case.

This patch creates a dynamic mach extension to the container manager for this single use case. It also denies the
non-extension access case with a backtrace so we can see if any other clients are hitting this.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

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

12 months agoBring up watchOS/tvOS on build.webkit.org (Follow-up fix x2)
jbedard@apple.com [Sat, 20 Jun 2020 23:16:05 +0000 (23:16 +0000)]
Bring up watchOS/tvOS on build.webkit.org (Follow-up fix x2)
https://bugs.webkit.org/show_bug.cgi?id=213402
<rdar://problem/64542588>

Unreviewed test fix.

* Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl: Native Macs never
use 32 bit tool binaries.

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

12 months ago[LFC][TFC][Quirk] Table height needs quirk handling
zalan@apple.com [Sat, 20 Jun 2020 15:24:07 +0000 (15:24 +0000)]
[LFC][TFC][Quirk] Table height needs quirk handling
https://bugs.webkit.org/show_bug.cgi?id=213430

Reviewed by Antti Koivisto.

Source/WebCore:

In quirks mode the used table height of an empty table is 0, while in standards mode
we take the specified value into account and size the table accordingly.

Tests: fast/layoutformattingcontext/empty-table-with-specified-height-quirk-simple.html
       fast/layoutformattingcontext/empty-table-with-specified-height-standards-simple.html

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.h:
* layout/blockformatting/BlockFormattingContext.h:
(WebCore::Layout::BlockFormattingContext::Quirks::geometry const):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
* layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp:
(WebCore::Layout::TableWrapperBlockFormattingContext::computeHeightAndMarginForTableBox):
* layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h:
(WebCore::Layout::TableWrapperBlockFormattingContext::Quirks::Quirks):
* layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContextQuirks.cpp: Copied from Source/WebCore/layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h.
(WebCore::Layout::TableWrapperBlockFormattingContext::Quirks::usedTableHeight const):

LayoutTests:

* fast/layoutformattingcontext/empty-table-with-specified-height-quirk-simple-expected.html: Added.
* fast/layoutformattingcontext/empty-table-with-specified-height-quirk-simple.html: Added.
* fast/layoutformattingcontext/empty-table-with-specified-height-standards-simple-expected.html: Added.
* fast/layoutformattingcontext/empty-table-with-specified-height-standards-simple.html: Added.

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

12 months ago[Windows] fast/forms/search-field-buttons-do-not-have-focus-rings.html is failing
wenson_hsieh@apple.com [Sat, 20 Jun 2020 07:08:38 +0000 (07:08 +0000)]
[Windows] fast/forms/search-field-buttons-do-not-have-focus-rings.html is failing
https://bugs.webkit.org/show_bug.cgi?id=213422

Reviewed by Tim Horton.

Refactor this test so that it doesn't attempt to hard-code the position and sizes of the search field buttons.
To do this, we use an internal helper to grab the `div` elements that correspond to the results and cancel
buttons, and then use their bounding rects to place the opaque `div`s to cover these buttons.

* fast/forms/search-field-buttons-do-not-have-focus-rings-expected.html:
* fast/forms/search-field-buttons-do-not-have-focus-rings.html:
* platform/win/TestExpectations:

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

12 months ago[JSC] Check Gigacage usage before launching VM
ysuzuki@apple.com [Sat, 20 Jun 2020 04:20:52 +0000 (04:20 +0000)]
[JSC] Check Gigacage usage before launching VM
https://bugs.webkit.org/show_bug.cgi?id=213410

Reviewed by Mark Lam.

JSTests:

* stress/exhaust-gigacage-and-allocate-vm.js: Added.
(foo):

Source/bmalloc:

Add Gigacage::footprint and Gigacage::size functions to expose usage to API users.
Rename Gigacage::size to Gigacage::maxSize.

* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):
(Gigacage::size):
(Gigacage::footprint):
* bmalloc/Gigacage.h:
(Gigacage::maxSize):
(Gigacage::alignment):
(Gigacage::mask):
(Gigacage::size):
(Gigacage::footprint):
* bmalloc/Heap.cpp:
(bmalloc::Heap::gigacageSize):
* bmalloc/Heap.h:

Source/JavaScriptCore:

Since VM allocates JSBigInt from Gigacage, it is possible that VM creation fails when Gigacage is exhausted.
As a work-around for internal testing, we insert ad-hoc Gigacage usage check before launching a new agent.
If 80% of Gigacage is used, we fail to launch a new VM gracefully.

* assembler/testmasm.cpp:
(JSC::testCagePreservesPACFailureBit):
* jsc.cpp:
(functionDollarAgentStart):

Source/WTF:

* wtf/Gigacage.h:
(Gigacage::footprint):
(Gigacage::maxSize):
(Gigacage::size):

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

12 months agoTyped array constructor behaves differently when length is not passed or when undefin...
commit-queue@webkit.org [Sat, 20 Jun 2020 04:06:38 +0000 (04:06 +0000)]
Typed array constructor behaves differently when length is not passed or when undefined is passed
https://bugs.webkit.org/show_bug.cgi?id=184232

Patch by James Darpinian <jdarpinian@chromium.org> on 2020-06-19
Reviewed by Yusuke Suzuki.

Passing undefined for length should have the same effect as omitting the argument. It was being
treated as 0 instead.

* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayView):

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

12 months agofast/text/international/system-language/navigator-language/navigator-language tests...
mmaxfield@apple.com [Sat, 20 Jun 2020 04:02:49 +0000 (04:02 +0000)]
fast/text/international/system-language/navigator-language/navigator-language tests are failing on Catalina and iOS
<rdar://problem/64468227>

Unreviewed test gardening.

Rather than marking the tests as flakey, we can just commit -expected results for every OS.

* fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt:
* fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt:
* fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt:
* fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt:
* fast/text/international/system-language/navigator-language/navigator-language-zh-Hant-expected.txt:
* platform/ios/TestExpectations:
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-en-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-es-419-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-es-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-ja-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-zh-HK-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-zh-Hant-HK-expected.txt: Added.
* platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-zh-Hant-expected.txt: Added.
* platform/mac/TestExpectations:

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

12 months ago[Cocoa] Delay issuing ManagedSession & Network Extension sandbox extensions until...
cdumez@apple.com [Sat, 20 Jun 2020 03:50:10 +0000 (03:50 +0000)]
[Cocoa] Delay issuing ManagedSession & Network Extension sandbox extensions until a load is actually issued
https://bugs.webkit.org/show_bug.cgi?id=213414
<rdar://problem/64548684>

Reviewed by Per Arne Vollan.

Source/WebCore:

setHasConsumedSandboxExtensions() can now get called several times, every time a WebPage is created.
Once a sandbox extension has been consumed, there is no going back so return early if the state is
already "Consumed".

* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::setHasConsumedSandboxExtensions):
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::setHasConsumedSandboxExtension):

Source/WebKit:

Delay issuing ManagedSession & Network Extension sandbox extensions until a load is actually issued.
This is a Safari launch time optimization since the checks needed to decide whether or not to issue
the extensions are expensive and there is no reason to issue them as soon as the process launches
(especially in the case of a prewarmed process).

* Shared/Cocoa/LoadParametersCocoa.mm:
(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):
* Shared/LoadParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addPlatformLoadParameters):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::addPlatformLoadParameters):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::loadWebArchiveData):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::hasNetworkExtensionSandboxAccess const):
(WebKit::WebProcessProxy::markHasNetworkExtensionSandboxAccess):
(WebKit::WebProcessProxy::hasManagedSessionSandboxAccess const):
(WebKit::WebProcessProxy::markHasManagedSessionSandboxAccess):
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

12 months ago[JSC] Attempt to reduce timeout failures on Apple Watch Series 3
ysuzuki@apple.com [Sat, 20 Jun 2020 03:17:41 +0000 (03:17 +0000)]
[JSC] Attempt to reduce timeout failures on Apple Watch Series 3
https://bugs.webkit.org/show_bug.cgi?id=213419

Reviewed by Mark Lam.

JSTests:

Look into timeout tests, and

1. If the test is using too many iterations, decrease the count.
2. If the test is still useful while iteration count is not so much, try attaching `slow!` to see the effect on the bot.

* stress/memcpy-typed-loops.js:
* stress/op_bitand.js:
* stress/op_bitor.js:
* stress/op_bitxor.js:
* stress/op_mul-ConstVar.js:
* stress/op_mul-VarConst.js:
* stress/op_mul-VarVar.js:
* stress/op_sub-ConstVar.js:
* stress/op_sub-VarConst.js:
* stress/op_sub-VarVar.js:
* stress/set-iteration-oas.js:
* stress/value-to-boolean.js:

Source/JavaScriptCore:

* tools/JSDollarVM.cpp:
(JSC::functionUseJIT):
(JSC::JSDollarVM::finishCreation):

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

12 months ago[AutoSizing] Resolve viewport units against the preferred content size
zalan@apple.com [Sat, 20 Jun 2020 02:44:55 +0000 (02:44 +0000)]
[AutoSizing] Resolve viewport units against the preferred content size
https://bugs.webkit.org/show_bug.cgi?id=213408
<rdar://problem/64267539>

Reviewed by Tim Horton.

Source/WebCore:

Instead of resolving the viewport units against the maximum content size constraints, let's use the preferred content size.
It ensures that content with vw, vh units does not grow beyond the preferred content size.

Test: fast/dynamic/size-to-content-autosize-with-viewport-units.html

* page/FrameView.cpp:
(WebCore::FrameView::performSizeToContentAutoSize):
(WebCore::FrameView::enableAutoSizeMode): Let's "ignore" viewport units during the initial
pass and use the preferred width to finalize the vw vh unit values (we don't really ignore them, but they are resolved against a [ 1, 1 ] viewport).
This approach fails if the main content has 100vw with overflow hidden. Such content would end up with a [ 1, 1 ] size (we might want to detect it
and resolved the values against the horizontal constraint).
(WebCore::FrameView::overrideViewportWidthForCSSViewportUnits):
(WebCore::FrameView::resetOverriddenViewportWidthForCSSViewportUnits):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::enableSizeToContentAutoSizeMode):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/dynamic/size-to-content-autosize-with-viewport-units-expected.txt: Added.
* fast/dynamic/size-to-content-autosize-with-viewport-units.html: Added.

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

12 months agoBring up watchOS/tvOS on build.webkit.org (Follow-up fix)
jbedard@apple.com [Sat, 20 Jun 2020 02:37:03 +0000 (02:37 +0000)]
Bring up watchOS/tvOS on build.webkit.org (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=213402
<rdar://problem/64542588>

Unreviewed build-fix.

* BuildSlaveSupport/build.webkit.org-config/config.json: Use arm64_32 to build watchOS device.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot): watchOS device should be considered 32 bit.
* Scripts/configure-xcode-for-embedded-development: Force-copy MediaAccessibility.framework.
* Scripts/webkitdirs.pm:
(extractNonMacOSHostConfiguration): Native Macs never use 32 bit tool binaries.

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

12 months ago[macOS] Move progress bar painting code off of Carbon API
wenson_hsieh@apple.com [Sat, 20 Jun 2020 02:26:14 +0000 (02:26 +0000)]
[macOS] Move progress bar painting code off of Carbon API
https://bugs.webkit.org/show_bug.cgi?id=213405
<rdar://problem/63958537>

Reviewed by Tim Horton.

Source/WebCore:

Adopts CoreUI constants and AppKit SPI (`-[NSAppearance _drawInRect:context:options:]`) when painting progress
elements. This is being done in light of recent changes around how `HIThemeDrawTrack` draws progress bars on
recent versions of macOS; it has been recommended to us that we move away from using Carbon, and instead use
AppKit.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):

The `NSControlSize` to `CUISize` mapping here looks counterintuitive, but matches our current behavior. This is
because `kThemeLargeProgressBar` and `kThemeLargeIndeterminateBar` both map to `kCUISizeRegular`, while
`kThemeMediumIndeterminateBar` and `kThemeMediumProgressBar` map to `kCUISizeSmall`.

Source/WebCore/PAL:

Add forward declarations for CoreUI SPI on non-internal SDKs.

* pal/spi/mac/CoreUISPI.h:

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

12 months agoDelete dead code for old ews api tests
aakash_jain@apple.com [Sat, 20 Jun 2020 01:22:52 +0000 (01:22 +0000)]
Delete dead code for old ews api tests
https://bugs.webkit.org/show_bug.cgi?id=213421

Rubber-stamped by Alexey Proskuryakov.

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.run_api_tests_command): Deleted.
* Scripts/webkitpy/common/net/apitestresults.py: Removed.
* Scripts/webkitpy/common/net/apitestresults_unittest.py: Removed.
* Scripts/webkitpy/port/base.py:
(Port.bindings_results_directory):
(Port.api_results_directory): Deleted.
* Scripts/webkitpy/tool/bot/apitestresultsreader.py: Removed.
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests._run_api_tests): Deleted.
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(test_runtests_api_debug): Deleted.

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

12 months agoUnreviewed, reverting r263287.
ryanhaddad@apple.com [Sat, 20 Jun 2020 01:07:52 +0000 (01:07 +0000)]
Unreviewed, reverting r263287.

Caused tests to exit early with crashes on Catalina.

Reverted changeset:

"[iOS, macOS] Allow access to the container manager to support Mail InjectedBundle"
https://bugs.webkit.org/show_bug.cgi?id=213357
https://trac.webkit.org/changeset/263287

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

12 months agoCrash under WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount()
cdumez@apple.com [Sat, 20 Jun 2020 01:04:35 +0000 (01:04 +0000)]
Crash under WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount()
https://bugs.webkit.org/show_bug.cgi?id=213417
<rdar://problem/63477676>

Reviewed by Darin Adler.

Make sure |this| is still alive in ProcessAndUIAssertion::processAssertionWasInvalidated()
after calling ProcessAssertion::processAssertionWasInvalidated() and before calling
updateRunInBackgroundCount(). Calling ProcessAssertion::processAssertionWasInvalidated()
notifies the client and the client may destroy the assertion as a result.

* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAndUIAssertion::processAssertionWasInvalidated):

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

12 months agoUnreviewed test gardening on Windows
wenson_hsieh@apple.com [Sat, 20 Jun 2020 00:57:32 +0000 (00:57 +0000)]
Unreviewed test gardening on Windows

Mark a test as failing while it's being investigated.

* platform/win/TestExpectations:

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

12 months agoRemove setVelocity() from PannerNode
commit-queue@webkit.org [Sat, 20 Jun 2020 00:53:41 +0000 (00:53 +0000)]
Remove setVelocity() from PannerNode
https://bugs.webkit.org/show_bug.cgi?id=213360

Patch by Clark Wang <clark_wang@apple.com> on 2020-06-19
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Re-baselined previous test that now passes with velocity removed.

* web-platform-tests/webaudio/historical-expected.txt:

Source/WebCore:

Removed setVelocity() and other velocity dependencies, as per spec: https://www.w3.org/TR/webaudio/#pannernode.
Simplified dopplerRate, since sourceVelocity is always zero.

Re-baselined previous test that now passes with velocity removed.

* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::dopplerRate):
* Modules/webaudio/PannerNode.h:
* Modules/webaudio/PannerNode.idl:

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

12 months agoREGRESSION (r263253): Search field results and cancel buttons have their own focus...
wenson_hsieh@apple.com [Sat, 20 Jun 2020 00:43:39 +0000 (00:43 +0000)]
REGRESSION (r263253): Search field results and cancel buttons have their own focus rings
https://bugs.webkit.org/show_bug.cgi?id=213413
<rdar://problem/64548419>

Reviewed by Tim Horton.

Source/WebCore:

After r263253, `paintCellAndSetFocusedElementNeedsRepaintIfNecessary` is used when painting the buttons in a
search field's shadow root. However, the renderer that is passed in (which is used to determine whether we
should additionally draw focus rings) is the input element's renderer rather than the renderers of the results
and cancel buttons themselves. This means that when the search field is focused, we will draw focus rings around
each of the buttons in the shadow root as well.

Address this by using `box` (the buttons' RenderBoxes) instead.

Test: fast/forms/search-field-buttons-do-not-have-focus-rings.html

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):

LayoutTests:

Add a ref test to verify that the search and cancel buttons don't draw individual focus rings. This test works
by verifying that no focus ring around either the cancel or results button bleeds outside of the bounds of a div
that obscures the buttons.

* fast/forms/search-field-buttons-do-not-have-focus-rings-expected.html: Added.
* fast/forms/search-field-buttons-do-not-have-focus-rings.html: Added.

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

12 months agoCrash in WebCore::Range::borderAndTextRects
commit-queue@webkit.org [Sat, 20 Jun 2020 00:16:12 +0000 (00:16 +0000)]
Crash in WebCore::Range::borderAndTextRects
https://bugs.webkit.org/show_bug.cgi?id=209379

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-06-19
Reviewed by Darin Adler.

When a parentless node is moved to a new document, then all ranges associated with this node and its children also should
be updated with new document information.

Test woould be submitted later.

* dom/Document.cpp:
(WebCore::Document::parentlessNodeMoveToNewDocument):
* dom/Document.h:
* dom/Node.cpp:
(WebCore::Node::moveNodeToNewDocument):
* dom/Range.cpp:
(WebCore::Range::parentlessNodeMoveToNewDocumentAffectsRange):
(WebCore::Range::updateRangeForParentlessNodeMoveToNewDocument):
* dom/Range.h:

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

12 months agoUnreviewed, reverting r263121.
tsavell@apple.com [Sat, 20 Jun 2020 00:11:31 +0000 (00:11 +0000)]
Unreviewed, reverting r263121.

Broke media/video-fullscreen-only-playback.html on Catalina
Debug

Reverted changeset:

"Don't claim to support fullscreen mode unless
fullScreenEnabled setting is enabled"
https://bugs.webkit.org/show_bug.cgi?id=213142
https://trac.webkit.org/changeset/263121

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