WebKit-https.git
2 months ago[macOS iOS ] animations/animation-direction-normal.html is flaky failing
graouts@webkit.org [Wed, 18 Mar 2020 15:59:03 +0000 (15:59 +0000)]
[macOS iOS ] animations/animation-direction-normal.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206685
<rdar://problem/58841791>

Reviewed by Antti Koivisto.

To make this test robust we animate a non-accelerated property and we use the Web Animations API to set the time
at which we want to pause the animation (2.5s).

* animations/animation-direction-normal-expected.txt:
* animations/animation-direction-normal.html:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

2 months ago[ iOS wk2 Release ] platform/ios/ios/plugin/youtube-flash-plugin-iframe-no-height...
lawrence.j@apple.com [Wed, 18 Mar 2020 15:38:13 +0000 (15:38 +0000)]
[ iOS wk2 Release ] platform/ios/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209234

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

2 months ago[ews] commit-queue should comment on bug in case patch fails to build
aakash_jain@apple.com [Wed, 18 Mar 2020 15:35:05 +0000 (15:35 +0000)]
[ews] commit-queue should comment on bug in case patch fails to build
https://bugs.webkit.org/show_bug.cgi?id=209227

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeCompileWebKitResults.start):
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.

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

2 months agoRemove status-bubble iframe from old EWS
aakash_jain@apple.com [Wed, 18 Mar 2020 15:31:18 +0000 (15:31 +0000)]
Remove status-bubble iframe from old EWS
https://bugs.webkit.org/show_bug.cgi?id=209215

Reviewed by Jonathan Bedard.

* code-review.js:
* js/status-bubble.js:
(handleStatusBubbleLoadNewEWS): Deleted.
* template/en/default/attachment/edit.html.tmpl: Removed old EWS iframe.
* template/en/default/attachment/list.html.tmpl: Ditto.
* template/en/default/attachment/reviewform.html.tmpl: Ditto.

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

2 months agoUnreviewed. Remove the build warnings below since r256756
jh718.park@samsung.com [Wed, 18 Mar 2020 15:30:09 +0000 (15:30 +0000)]
Unreviewed. Remove the build warnings below since r256756
warning: unused parameter ‘foo’ [-Wunused-parameter]

no new tests, no new behaviours.

* testing/Internals.cpp:
(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
(WebCore::Internals::getUTIFromMIMEType):
(WebCore::Internals::getUTIFromTag):

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

2 months agoanimations/animation-direction-reverse.html is flaky failing
commit-queue@webkit.org [Wed, 18 Mar 2020 15:26:51 +0000 (15:26 +0000)]
animations/animation-direction-reverse.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206671
<rdar://problem/58838216>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-18
Reviewed by Antti Koivisto.

To make this test robust we animate a non-accelerated property.

* animations/animation-direction-reverse-expected.txt:
* animations/animation-direction-reverse.html:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

2 months agoUnreviewed. Remove the build warning below since r256196
jh718.park@samsung.com [Wed, 18 Mar 2020 15:17:47 +0000 (15:17 +0000)]
Unreviewed. Remove the build warning below since r256196
warning: variable ‘highlightEnd’ set but not used [-Wunused-but-set-variable]

no new tests, no new behaviours.

* rendering/HighlightData.cpp:
(WebCore::HighlightData::highlightStateForRenderer):

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

2 months agoUpdate some fast/mediastream to make failures easier to diagnose.
eric.carlson@apple.com [Wed, 18 Mar 2020 15:11:09 +0000 (15:11 +0000)]
Update some fast/mediastream to make failures easier to diagnose.
https://bugs.webkit.org/show_bug.cgi?id=209205
<rdar://problem/60561372>

Log more state when a test fails.

Reviewed by Alex Christensen.

* fast/mediastream/MediaStream-video-element-displays-buffer.html:
* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
* fast/mediastream/resize-trim.html:

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

2 months agoMake sure a preflight fails if response headers are invalid
youenn@apple.com [Wed, 18 Mar 2020 14:49:37 +0000 (14:49 +0000)]
Make sure a preflight fails if response headers are invalid
https://bugs.webkit.org/show_bug.cgi?id=208924

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.js: Added.
(corsPreflightResponseValidation):
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker.html: Added.

Source/WebCore:

Implement https://fetch.spec.whatwg.org/#cors-preflight-fetch-0 step 7.3.
In case header parsing is wrong, fail the preflight with a meaningful message.
Update parsing of headers to return an Optional so that parsing error is handled as a nullopt.
Minor refactoring to return Expected/Optional for error handlng instead of passing an out parameter.
Also, adding preflight cache entry if it is valid, no matter whether preflight succeeds or not.

Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.html
       imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker.html

* loader/CrossOriginAccessControl.cpp:
(WebCore::validatePreflightResponse):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::create):
(WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
* loader/CrossOriginPreflightResultCache.h:
(WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
* platform/network/HTTPParsers.h:
(WebCore::parseAccessControlAllowList):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::filter):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

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

2 months agoUnreviewed. Remove the build warning below since r258458
jh718.park@samsung.com [Wed, 18 Mar 2020 14:28:46 +0000 (14:28 +0000)]
Unreviewed. Remove the build warning below since r258458
warning: unused variable ‘frame’ [-Wunused-variable]

No new tests, no new behaviors.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse):

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

2 months agoREGRESSION (r257472): Can't start old Safari with new WebKit (dyld: Symbol not found...
youenn@apple.com [Wed, 18 Mar 2020 14:24:19 +0000 (14:24 +0000)]
REGRESSION (r257472): Can't start old Safari with new WebKit (dyld: Symbol not found: _WKContextConfigurationSetShouldCaptureAudioInUIProcess)
https://bugs.webkit.org/show_bug.cgi?id=209155

Reviewed by Eric Carlson.

Add a no-op WKContextConfigurationSetShouldCaptureAudioInUIProcess to allow latest WebKit being run on older Safari.

* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationSetShouldCaptureAudioInUIProcess):
* UIProcess/API/C/WKContextConfigurationRef.h:

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

2 months agoSource/WebCore:
youenn@apple.com [Wed, 18 Mar 2020 13:59:23 +0000 (13:59 +0000)]
Source/WebCore:
FrameLoader should own its FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=208918

Reviewed by Geoff Garen.

Update Frame/FrameLoader constructors to get a UniqueRef<FrameLoaderClient>.
This makes the lifetime management much clearer and allows some WebKit1/WebKit2 clean-up.

Covered by existing tests.

* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::initForSynthesizedDocument):
(WebCore::FrameLoader::didExplicitOpen):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::finishedParsing):
(WebCore::FrameLoader::loadArchive):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::provisionalLoadStarted):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::setupForReplace):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::willLoadMediaElementURL):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::setDocumentLoader):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
(WebCore::FrameLoader::clientRedirectCancelledOrFinished):
(WebCore::FrameLoader::clientRedirected):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::willChangeTitle):
(WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::didReachLayoutMilestone):
(WebCore::FrameLoader::didReachVisuallyNonEmptyState):
(WebCore::FrameLoader::frameLoadCompleted):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::userAgent const):
(WebCore::FrameLoader::dispatchOnloadEvents):
(WebCore::FrameLoader::detachViewsAndDocumentLoader):
(WebCore::FrameLoader::receivedMainResourceError):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::FrameLoader::cancelledError const):
(WebCore::FrameLoader::blockedByContentBlockerError const):
(WebCore::FrameLoader::blockedError const):
(WebCore::FrameLoader::blockedByContentFilterError const):
(WebCore::FrameLoader::connectionProperties):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
(WebCore::FrameLoader::didChangeTitle):
(WebCore::FrameLoader::dispatchDidCommitLoad):
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
(WebCore::FrameLoader::completePageTransitionIfNeeded):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::create):
* page/Frame.h:
* page/Page.cpp:
(WebCore::Page::Page):
* page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* page/PageConfiguration.h:
* workers/service/context/SWContextManager.cpp:
* workers/service/context/SWContextManager.h:

Source/WebKit:
FrameLoader should own its FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=208918

Reviewed by Geoff Garen.

Pass a UniqueRef to the PageConfiguration.
Update WebFrameLoaderClient according updated FrameLoaderClient interface.

WebFrame no longer needs to ref/unref itself to keep the loader client alive.
Update WebFrame construction to not need a static_cast at initialization of the main frame.

The ownership is now that a WebCore::FrameLoader owns a FrameLoaderClient who owns a WebFrame.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::tryLoadingSynchronouslyUsingURLSchemeHandler):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::~WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::webPageProxyID const):
(WebKit::WebFrameLoaderClient::pageID const):
(WebKit::WebFrameLoaderClient::frameID const):
(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
(WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::dispatchShow):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::applyToDocumentLoader):
(WebKit::WebFrameLoaderClient::allowsContentJavaScriptFromMostRecentNavigation const):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
(WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
(WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
(WebKit::WebFrameLoaderClient::cancelledError const):
(WebKit::WebFrameLoaderClient::blockedError const):
(WebKit::WebFrameLoaderClient::blockedByContentBlockerError const):
(WebKit::WebFrameLoaderClient::cannotShowURLError const):
(WebKit::WebFrameLoaderClient::interruptedForPolicyChangeError const):
(WebKit::WebFrameLoaderClient::blockedByContentFilterError const):
(WebKit::WebFrameLoaderClient::cannotShowMIMETypeError const):
(WebKit::WebFrameLoaderClient::fileDoesNotExistError const):
(WebKit::WebFrameLoaderClient::pluginWillHandleLoadError const):
(WebKit::WebFrameLoaderClient::shouldFallBack const):
(WebKit::WebFrameLoaderClient::restoreViewState):
(WebKit::WebFrameLoaderClient::didFinishLoad):
(WebKit::WebFrameLoaderClient::userAgent const):
(WebKit::WebFrameLoaderClient::createPlugin):
(WebKit::WebFrameLoaderClient::webGLPolicyForURL const):
(WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL const):
(WebKit::WebFrameLoaderClient::objectContentType):
(WebKit::WebFrameLoaderClient::overrideMediaType const):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
(WebKit::WebFrameLoaderClient::willInjectUserScript):
(WebKit::WebFrameLoaderClient::willCacheResponse const):
(WebKit::WebFrameLoaderClient::createNetworkingContext):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::initWithCoreMainFrame):
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::WebFrame):
(WebKit::WebFrame::frameLoaderClient const):
(WebKit::WebFrame::fromCoreFrame):
(WebKit::WebFrame::didReceivePolicyDecision):
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::create):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_processDisplayName):

Source/WebKitLegacy/mac:
FrameLoader should own its FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=208918

Reviewed by Geoff Garen.

Update according new Frame/FrameLoader constructors and FrameLoaderClient interface.

* WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient::setWebFrame):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::~WebFrameLoaderClient):
(WebFrameLoaderClient::cancelledError const):
(WebFrameLoaderClient::blockedError const):
(WebFrameLoaderClient::blockedByContentBlockerError const):
(WebFrameLoaderClient::cannotShowURLError const):
(WebFrameLoaderClient::interruptedForPolicyChangeError const):
(WebFrameLoaderClient::blockedByContentFilterError const):
(WebFrameLoaderClient::cannotShowMIMETypeError const):
(WebFrameLoaderClient::fileDoesNotExistError const):
(WebFrameLoaderClient::pluginWillHandleLoadError const):
(WebFrameLoaderClient::shouldFallBack const):
(WebFrameLoaderClient::userAgent const):
* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
(+[WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:style:]):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:
Make sure a preflight fails if response headers are invalid
https://bugs.webkit.org/show_bug.cgi?id=208924

Reviewed by Geoff Garen.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::cancelledError const):
(WebFrameLoaderClient::blockedError const):
(WebFrameLoaderClient::blockedByContentBlockerError const):
(WebFrameLoaderClient::cannotShowURLError const):
(WebFrameLoaderClient::interruptedForPolicyChangeError const):
(WebFrameLoaderClient::cannotShowMIMETypeError const):
(WebFrameLoaderClient::fileDoesNotExistError const):
(WebFrameLoaderClient::pluginWillHandleLoadError const):
(WebFrameLoaderClient::shouldFallBack const):
(WebFrameLoaderClient::userAgent const):
(WebFrameLoaderClient::frameLoaderDestroyed): Deleted.
(WebFrameLoaderClient::cancelledError): Deleted.
(WebFrameLoaderClient::blockedError): Deleted.
(WebFrameLoaderClient::blockedByContentBlockerError): Deleted.
(WebFrameLoaderClient::cannotShowURLError): Deleted.
(WebFrameLoaderClient::interruptedForPolicyChangeError): Deleted.
(WebFrameLoaderClient::cannotShowMIMETypeError): Deleted.
(WebFrameLoaderClient::fileDoesNotExistError): Deleted.
(WebFrameLoaderClient::pluginWillHandleLoadError): Deleted.
(WebFrameLoaderClient::shouldFallBack): Deleted.
(WebFrameLoaderClient::userAgent): Deleted.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebFrame.cpp:
(WebFrame::createSubframeWithOwnerElement):

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

2 months ago[ macOS iOS ] animations/play-state-paused.html is flaky failing
commit-queue@webkit.org [Wed, 18 Mar 2020 13:34:29 +0000 (13:34 +0000)]
[ macOS iOS ] animations/play-state-paused.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206682
<rdar://problem/58840950>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-18
Reviewed by Antti Koivisto.

To make this test robust we animate a non-accelerated property and we use the Web Animations API to set the time
at which we want to pause the animation (1s).

* animations/play-state-paused-expected.txt:
* animations/play-state-paused.html:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

2 months ago[GTK][WPE] Migrate to Flatpak-based dev SDK
philn@webkit.org [Wed, 18 Mar 2020 09:54:55 +0000 (09:54 +0000)]
[GTK][WPE] Migrate to Flatpak-based dev SDK
https://bugs.webkit.org/show_bug.cgi?id=205658

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::scanTestDictionariesDirectoryIfNecessary): Check for flatpak-installed dictionaries.

Tools:

JHBuild will now be used only if the WEBKIT_JHBUILD environment
variable is set to 1, which is the case for the time being on the
GTK and WPE EWS/build bots.

By default the build dependencies are now locally installed from a
Flatpak repository hosted at https://software.igalia.com. The
repository can be regenerated with the scripts from the
webkit-flatpak-sdk Github project
(https://github.com/Igalia/webkit-flatpak-sdk). This is done
transparently with the update-webkit{gtk,wpe}-libs scripts. As
there is no need to rebuild the dependencies from scratch, the
developer user-experience should now be much more friendly and
overall build times reduced.

As an additional commodity, the new environment supports the
GStreamer gst-build-based workflow. Just set the GST_BUILD_PATH
environment variable to your gst-build path. This feature was
contributed by Thibault Saunier.

The JHBuild infrastructure will be removed once all the bots have
been switched over to Flatpak.

* BuildSlaveSupport/ews-build/steps.py:
(InstallGtkDependencies):
(InstallWpeDependencies):
(CompileWebKit.start):
* BuildSlaveSupport/gtk/buildbot/run:
* Scripts/build-webkit:
* Scripts/run-bindings-tests:
* Scripts/run-builtins-generator-tests:
* Scripts/run-gtk-tests:
* Scripts/run-javascriptcore-tests:
* Scripts/run-minibrowser:
* Scripts/run-qt-wpe-minibrowser:
* Scripts/run-webdriver-tests:
* Scripts/run-wpe-tests:
* Scripts/test-webkitperl:
* Scripts/test-webkitpy:
* Scripts/test262-runner:
* Scripts/update-webkit-flatpak: Renamed from Tools/Scripts/update-webkitgtk-flatpak.
* Scripts/update-webkitgtk-libs:
* Scripts/update-webkitwpe-flatpak: Removed.
* Scripts/update-webkitwpe-libs:
* Scripts/webkitdirs.pm:
(getUserFlatpakPath):
(inFlatpakSandbox):
(runInFlatpakIfAvailable):
(wrapperPrefixIfNeeded):
(shouldUseJhbuild):
(shouldUseFlatpak):
(shouldRemoveCMakeCache):
* Scripts/webkitpy/common/system/executive.py:
(Executive.kill_all):
* Scripts/webkitpy/port/base.py:
(Port._path_to_apache):
(Port._should_run_as_pixel_test):
(Port._in_flatpak_sandbox):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
(GtkPort._get_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator):
(GDBCrashLogGenerator.__init__):
(GDBCrashLogGenerator.generate_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log_unittest.py:
(GDBCrashLogGeneratorTest.test_generate_crash_log):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
(WPEPort._get_crash_log):
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._setup_environ_for_test):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getFontsPath):
* WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp:
(WTR::getFontsPath):
* flatpak/files/default.xkm: Removed.
* flatpak/files/httpd-autogen.sh: Removed.
* flatpak/flatpakutils.py:
(check_flatpak):
(FlatpakRepos.update):
(FlatpakPackage.__repr__):
(FlatpakPackage.__str__):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.setup_builddir):
(WebkitFlatpak):
(WebkitFlatpak.setup_gstbuild):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run):
(WebkitFlatpak.has_environment):
(WebkitFlatpak.save_config):
(WebkitFlatpak.setup_dev_env):
(WebkitFlatpak.install_all):
(WebkitFlatpak.run_gdb):
* flatpak/org.webkit.CommonModules.yaml: Removed.
* flatpak/org.webkit.GTK.yaml: Removed.
* flatpak/org.webkit.WPE.yaml: Removed.
* flatpak/org.webkit.WPEModules.yaml: Removed.
* flatpak/org.webkit.WPEQT.yaml: Removed.
* flatpak/org.webkit.WebKit.yaml: Removed.
* flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
* flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
* flatpak/patches/xvfb-0001-HACK-Avoid-compiling-a-kbm-file.patch: Removed.

LayoutTests:

* http/conf/flatpak-httpd.conf: Adjust paths.

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

2 months agoCrash in CSSPrimitiveValue::cleanup
commit-queue@webkit.org [Wed, 18 Mar 2020 05:47:14 +0000 (05:47 +0000)]
Crash in CSSPrimitiveValue::cleanup
https://bugs.webkit.org/show_bug.cgi?id=208316

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-03-17
Reviewed by Ryosuke Niwa.

Source/WebCore:

Added a NULL check before calling deref() for CSSUnitType :: CSS_CALC.

During initialization of CSSCalcValue, createCSS returns nullptr when processing min() operator
and there is a category mismatch between length and percent for min() operator
as seen in this newly added test case.

Test: editing/execCommand/primitive-value-cleanup-minimal.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cleanup):

LayoutTests:

Added modified version of testcase attached in 208316. Minimized version provided by Ryosuke Niwa.

* editing/execCommand/primitive-value-cleanup-minimal-expected.txt: Added.
* editing/execCommand/primitive-value-cleanup-minimal.html: Added.

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

2 months ago[CMake] libopus 1.1 its enough for building WebKitGTK with ENABLE_WEB_RTC
clopez@igalia.com [Wed, 18 Mar 2020 04:45:56 +0000 (04:45 +0000)]
[CMake] libopus 1.1 its enough for building WebKitGTK with ENABLE_WEB_RTC
https://bugs.webkit.org/show_bug.cgi?id=209209

Reviewed by Konstantin Tokarev.

Ubuntu 18.04 ships libopus 1.1.2 which its enough for building with -DENABLE_WEB_RTC=ON

* CMakeLists.txt:

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

2 months agoWeb Inspector: the width of `WI.TabBarItem` can change if the detached window is...
drousso@apple.com [Wed, 18 Mar 2020 04:30:22 +0000 (04:30 +0000)]
Web Inspector: the width of `WI.TabBarItem` can change if the detached window is resized
https://bugs.webkit.org/show_bug.cgi?id=209200

Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
(WI.TabBar.prototype.layout.measureWidth): Renamed from `measureItemWidth`.
When undocked, `WI.TabBarItem` grow to fill any available space. As a result, if a
`WI.TabBarItem` is added or removed, the width of all `WI.TabBarItem` will change.
Wait to measure widths until all `WI.TabBarItem` are un-hidden for the reason above.

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

2 months agoWeb Inspector: Network: we should prefer showing "Preserve Log" over "Group Media...
drousso@apple.com [Wed, 18 Mar 2020 04:14:52 +0000 (04:14 +0000)]
Web Inspector: Network: we should prefer showing "Preserve Log" over "Group Media Requests"
https://bugs.webkit.org/show_bug.cgi?id=209199

Reviewed by Timothy Hatcher.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
Change the `WI.NavigationItem.VisibilityPriority` of the various `WI.NavigationItem`:
  High:
   - URL filter
   - resource type filter
   - live/HAR view switcher
   - disable resource caching toggle
  Normal:
   - Preserve Log checkbox
   - clear button
  Low:
   - Group Media Requests checkbox
   - HAR import/export buttons
This way, items that have alternate ways of being triggered (e.g. keyboard shortcuts) are
hidden first, and vica versa.

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

2 months agoWeb Inspector: Sources: hovering the title of an object preview popup for a DOM node...
drousso@apple.com [Wed, 18 Mar 2020 03:59:13 +0000 (03:59 +0000)]
Web Inspector: Sources: hovering the title of an object preview popup for a DOM node doesn't highlight it
https://bugs.webkit.org/show_bug.cgi?id=209159

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverForObject):

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

2 months agoSharedMemory::Handle::m_size should be more consistent
ddkilzer@apple.com [Wed, 18 Mar 2020 03:32:31 +0000 (03:32 +0000)]
SharedMemory::Handle::m_size should be more consistent
<https://webkit.org/b/209007>
<rdar://problem/60340890>

Reviewed by Darin Adler.

* Platform/cocoa/SharedMemoryCocoa.cpp:
(WebKit::SharedMemory::Handle::decode):
- Return early if an invalid `size` is decoded.
(WebKit::SharedMemory::map):
- Drive-by fix to change '0' to 'nullptr'.
- Since all known methods of creating a SharedMemory::Handle()
  set SharedMemory::Handle::m_size to a value of round_page(),
  this means we can also change `round_page(handle.m_size)` to
  `handle.m_size` in the call to mach_vm_map() since we know
  they're equal.

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

2 months ago[WPE] Gardening
lmoura@igalia.com [Wed, 18 Mar 2020 03:18:11 +0000 (03:18 +0000)]
[WPE] Gardening

Unreviewed test gardening.

* platform/wpe/TestExpectations:

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

2 months ago[WPE] Rebaseline after r258492.
lmoura@igalia.com [Wed, 18 Mar 2020 03:15:19 +0000 (03:15 +0000)]
[WPE] Rebaseline after r258492.

Unreviewed test gardening.

* platform/wpe/imported/w3c/web-platform-tests/svg/import/text-path-01-b-manual-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/import/text-path-02-b-manual-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/painting/marker-008-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/painting/reftests/paint-order-001-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/text/reftests/textpath-shape-001-expected.txt:
* platform/wpe/svg/W3C-SVG-1.1/text-path-01-b-expected.txt:
* platform/wpe/svg/text/text-path-01-b-expected.txt:

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

2 months agoUnreviewed, reverting r258496.
commit-queue@webkit.org [Wed, 18 Mar 2020 03:12:50 +0000 (03:12 +0000)]
Unreviewed, reverting r258496.
https://bugs.webkit.org/show_bug.cgi?id=209217

Introduced sandbox regression (Requested by perarne on
#webkit).

Reverted changeset:

"[iOS] Add telemetry for message filtering"
https://bugs.webkit.org/show_bug.cgi?id=208925
https://trac.webkit.org/changeset/258496

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

2 months agoExpand In-App-Browser-Privacy testing
katherine_cheney@apple.com [Wed, 18 Mar 2020 00:45:40 +0000 (00:45 +0000)]
Expand In-App-Browser-Privacy testing
https://bugs.webkit.org/show_bug.cgi?id=209142
<rdar://problem/60496618>

Reviewed by Darin Adler.

Source/WebKit:

Adds a testing API to check whether a navigation was classified as
app-bound.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isNavigatingToAppBoundDomain:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isNavigatingToAppBoundDomainTesting):
* UIProcess/WebPageProxy.h:

Tools:

Expanded test coverage by adding new tests and creating a custom url
scheme handler to get around the fact that local file loads are
always classified as app-bound.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(-[InAppBrowserSchemeHandler webView:startURLSchemeTask:]):
If the path indicates testing user scripts on load, notify the script message
handler that the navigation has finished. If the path indicates
testing user-agent scripts, set the window.wkUserScriptInjected
variable to true. A user agent script will attempt to read this
variable and should fail.

(-[InAppBrowserSchemeHandler webView:stopURLSchemeTask:]):
(initializeInAppBrowserPrivacyTestSettings):
Basic test setup. Initialize the main run loop and make sure we are
starting with a clean state.

(TEST):
Add tests for all protocols checked in shouldBeTreatedAsAppBound,
except for blob files which must be generated within the web content.

* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html: Added.
Basic html document to test local file loads are classified as
app-bound.

* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-test-user-agent-script.html: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-test-user-script.html: Removed.
These files are no longer needed as their content is directly copied
into the URL scheme handler.

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

2 months agoSerializedScriptValue::decode should check bufferIsLargeEnoughToContain before alloca...
Hironori.Fujii@sony.com [Wed, 18 Mar 2020 00:29:42 +0000 (00:29 +0000)]
SerializedScriptValue::decode should check bufferIsLargeEnoughToContain before allocating a buffer
https://bugs.webkit.org/show_bug.cgi?id=209132

Reviewed by Darin Adler.

* bindings/js/SerializedScriptValue.h:
(WebCore::SerializedScriptValue::decode): Added bufferIsLargeEnoughToContain check.
Added a null check for Gigacage::tryMalloc.

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

2 months agoREGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID...
cdumez@apple.com [Wed, 18 Mar 2020 00:12:47 +0000 (00:12 +0000)]
REGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID) imported/w3c/web-platform-tests/notifications/constructor-basic.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=207307
<rdar://problem/59206964>

Reviewed by Alex Christensen.

Source/WebKitLegacy/mac:

* WebView/WebNotification.h:
* WebView/WebNotification.mm:
(-[WebNotification finalize]):

Tools:

When [MockWebNotificationProvider reset] was called at the end of the test, it would remove all
notifications from the map but not tell WebCore that the notification were discarded. As a result,
WebCore would later tell the MockWebNotificationProvider to cancel the notification but this
notification would no longer be in the map, causing us to hit an assertion in debug.

To address the issue, we now call Notification::finalize() in [MockWebNotificationProvider reset]
to let WebCore know the notification was discarded. This is similar to what is already done for
WebKit2 in WebNotificationManager::clearNotifications().

* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider reset]):

LayoutTests:

Add test coverage.

* http/wpt/notifications/constructor-basic-bfcache-expected.txt: Added.
* http/wpt/notifications/constructor-basic-bfcache.html: Added.
* platform/mac/TestExpectations:

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

2 months ago[WinCairo][FTW] Update path to requirements download
don.olmstead@sony.com [Wed, 18 Mar 2020 00:06:14 +0000 (00:06 +0000)]
[WinCairo][FTW] Update path to requirements download
https://bugs.webkit.org/show_bug.cgi?id=209202

Reviewed by Ross Kirsling.

Repository was renamed from WinCairoRequirements to WebKitRequirements in the
WebKitForWindows org on GitHub. Additionally the .zip file was renamed to
WebKitRequirementsWin64.zip.

* Scripts/update-webkit-wincairo-libs.py:

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

2 months ago[ews] Resubmit patches to commit-queue which were cq- by commit-queue and later cq+
aakash_jain@apple.com [Wed, 18 Mar 2020 00:01:42 +0000 (00:01 +0000)]
[ews] Resubmit patches to commit-queue which were cq- by commit-queue and later cq+
https://bugs.webkit.org/show_bug.cgi?id=208920

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/common/buildbot.py:
(Buildbot.update_builder_name_to_id_mapping): Method to generate builder name to id mapping.
(Buildbot.fetch_pending_and_inprogress_builds): Method to fetch pendign and in-progress builds from buildbot.
(Buildbot.get_patches_in_queue): Method to fetch list of patches which are pending or are in-progress on buildbot.
* BuildSlaveSupport/ews-app/ews/common/bugzilla.py:
(Bugzilla.get_cq_plus_timestamp): Get UTC timestamp when cq+ flag was set.
* BuildSlaveSupport/ews-app/ews/fetcher.py:
(FetchLoop.run): Update builder name to id mapping. We just need to update it one-time, since we need the id only
for commit-queue which isn't expected to change.
(BugzillaPatchFetcher.fetch_commit_queue_patches):
(BugzillaPatchFetcher.send_patches_to_buildbot): Allow sending the patch again to commit-queue.
(BugzillaPatchFetcher.patches_to_send_to_commit_queue): Find patches which needs to be sent to commit-queue. Filter
out patches which are already waiting or in-progress on commit-queue, or whose recent build was completed after
setting cq+ flag on bugzilla.

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

2 months agoFix API tests after r258574
achristensen@apple.com [Tue, 17 Mar 2020 23:32:57 +0000 (23:32 +0000)]
Fix API tests after r258574
https://bugs.webkit.org/show_bug.cgi?id=209192

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFrame):
I forgot to call the CompletionHandler from the IPC call.

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

2 months agoAX: WebKit crashes with VO and keyboard support fails on encapsulated radio button...
cfleizach@apple.com [Tue, 17 Mar 2020 23:02:36 +0000 (23:02 +0000)]
AX: WebKit crashes with VO and keyboard support fails on encapsulated radio button components.
https://bugs.webkit.org/show_bug.cgi?id=208844
<rdar://problem/60252659>

Reviewed by Darin Adler.

Source/WebCore:

Test: accessibility/mac/crash-bounds-for-range.html

Don't access renderer if nil in getInlineBoxAndOffset.

* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset const):

LayoutTests:

* accessibility/mac/crash-bounds-for-range-expected.txt: Added.
* accessibility/mac/crash-bounds-for-range.html: Added.

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

2 months ago[ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/embedded-content/media...
jacob_uphoff@apple.com [Tue, 17 Mar 2020 22:56:11 +0000 (22:56 +0000)]
[ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-text.html  is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=209201

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 months agoTextTrackBase should validate language before setting m_validBCP47Language
eric.carlson@apple.com [Tue, 17 Mar 2020 22:45:17 +0000 (22:45 +0000)]
TextTrackBase should validate language before setting m_validBCP47Language
https://bugs.webkit.org/show_bug.cgi?id=209094
<rdar://problem/60439603>

Unreviewed, address post-commit review comments.

* html/track/TrackBase.cpp:
(WebCore::TrackBase::setLanguage): Use makeString instead of StringBuilder.

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

2 months ago[JSC] DeleteIC patchpoint in FTL should require tag and mask registers
ysuzuki@apple.com [Tue, 17 Mar 2020 22:29:03 +0000 (22:29 +0000)]
[JSC] DeleteIC patchpoint in FTL should require tag and mask registers
https://bugs.webkit.org/show_bug.cgi?id=209197
<rdar://problem/60531308>

Reviewed by Tadeu Zagallo and Saam Barati.

DeleteIC patchpoint is emitting `branchIfNotCell` machine code. This requires a mask register
while we are not reserving them when creating a patchpoint.

In general, our IC code is assuming usual CCallHelpers environment which provides macro-assembler
scratch, tag, and mask registers. We should offer them even if IC is emitted from FTL. In this
patch, we offer tag and mask registers for Delete IC even if this IC is not currently using tag
register.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):

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

2 months agoWebKit::LocalAuthenticator::deleteDuplicateCredential() should check buffer size...
jiewen_tan@apple.com [Tue, 17 Mar 2020 22:04:48 +0000 (22:04 +0000)]
WebKit::LocalAuthenticator::deleteDuplicateCredential() should check buffer size before memcmp
https://bugs.webkit.org/show_bug.cgi?id=209156
<rdar://problem/60444655>

Reviewed by Alex Christensen.

Covered by existing tests.

* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::deleteDuplicateCredential const):

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

2 months ago Add internal debugging when initializing an app-bound session
katherine_cheney@apple.com [Tue, 17 Mar 2020 21:36:41 +0000 (21:36 +0000)]
   Add internal debugging when initializing an app-bound session
       https://bugs.webkit.org/show_bug.cgi?id=209190
       <rdar://problem/60371620>

Reviewed by Brent Fulgham.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::SessionWrapper::initialize):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::initializeEphemeralStatelessSession):
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
(WebKit::NetworkSessionCocoa::appBoundSession):
(WebKit::NetworkSessionCocoa::isolatedSession):

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

2 months agoAdd quirk for cookie blocking latch mode ymail.com redirecting to yahoo.com under...
wilander@apple.com [Tue, 17 Mar 2020 21:35:28 +0000 (21:35 +0000)]
Add quirk for cookie blocking latch mode ymail.com redirecting to yahoo.com under yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=209193
<rdar://problem/60089022>

Reviewed by Brent Fulgham.

No new tests. Site-specific quirk tested manually on the site in question.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::unblockCookies):
(WebKit::NetworkDataTaskCocoa::needsFirstPartyCookieBlockingLatchModeQuirk const):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

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

2 months ago[WKTR] testRunner API that takes in a completion handler should use async IPC
cdumez@apple.com [Tue, 17 Mar 2020 21:25:06 +0000 (21:25 +0000)]
[WKTR] testRunner API that takes in a completion handler should use async IPC
https://bugs.webkit.org/show_bug.cgi?id=209187

Reviewed by John Wilander.

testRunner API that takes in a completion handler should use async IPC. This hangs
the WebProcess for no reason and can cause deadlocks if the UIProcess then tries
to IPC the WebProcess as a result of this testRunner call.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsHasHadUserInteraction):
(WTR::TestRunner::statisticsUpdateCookieBlocking):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestRunner::setStatisticsShouldDowngradeReferrer):
(WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode):
(WTR::TestRunner::statisticsResetToConsistentState):
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::removeAllSessionCredentials):
(WTR::TestRunner::getApplicationManifestThen):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

2 months agoREGRESSION(r256882): WebDriver commands that run before initial navigation do not...
bburg@apple.com [Tue, 17 Mar 2020 21:04:20 +0000 (21:04 +0000)]
REGRESSION(r256882): WebDriver commands that run before initial navigation do not complete
https://bugs.webkit.org/show_bug.cgi?id=209185
<rdar://problem/60010248>

Reviewed by Brian Weinstein.

No new tests, covered by w3c/webdriver/tests/back/back.py.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::createBrowsingContext):
Force eager creation of WebProcess when a browsing context is created. This allows
all subsequent commands that use WebProcess IPC to proceed instead of hanging.

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

2 months agoTextTrackBase should validate language before setting m_validBCP47Language
eric.carlson@apple.com [Tue, 17 Mar 2020 20:52:00 +0000 (20:52 +0000)]
TextTrackBase should validate language before setting m_validBCP47Language
https://bugs.webkit.org/show_bug.cgi?id=209094
<rdar://problem/60439603>

Reviewed by Jer Noble.
Source/WebCore:

Test: media/track/track-bcp-language.html

* html/track/TextTrack.idl:
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase): Don't set m_validBCP47Language unless the language is valid.
(WebCore::TrackBase::setLanguage): Clear m_validBCP47Language if the language is invalid.
Restructure the code to use early returns.
(WebCore::TrackBase::validBCP47Language const): Deleted.
* html/track/TrackBase.h:
(WebCore::TrackBase::validBCP47Language const):
* testing/Internals.cpp:
(WebCore::Internals::textTrackBCP47Language):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* media/track/track-bcp-language-expected.txt: Added.
* media/track/track-bcp-language.html: Added.

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

2 months ago[ews-app] Timestamp shown in status-bubble hover-over message is in future
aakash_jain@apple.com [Tue, 17 Mar 2020 20:47:44 +0000 (20:47 +0000)]
[ews-app] Timestamp shown in status-bubble hover-over message is in future
https://bugs.webkit.org/show_bug.cgi?id=196628

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/events.py:
(JSONProducer.json_serialize_datetime): Keep the timestamp in UTC, instead of converting it to local time zone.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble.get_all_builds_for_queue): Sort the queues based on build number instead of start time, since the
timestamps for new builds might be less than timestamps for old builds which completed immediately prior to this change.

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

2 months ago[ macOS wk2 ] imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizatio...
jacob_uphoff@apple.com [Tue, 17 Mar 2020 20:46:25 +0000 (20:46 +0000)]
[ macOS wk2 ] imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=209194

Unreviewed test gardening

* platform/mac-wk2/TestExpectations:

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

2 months agoREGRESSION (257844): fast/scrolling/scroll-container-horizontally.html is timing out
simon.fraser@apple.com [Tue, 17 Mar 2020 19:52:20 +0000 (19:52 +0000)]
REGRESSION (257844): fast/scrolling/scroll-container-horizontally.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=209083

Unreviewed test gardening.

mac/scroll-container-horizontally.html is a wheel event test, so move it to the mac directory.

* fast/scrolling/mac/scroll-container-horizontally-expected.txt: Renamed from LayoutTests/fast/scrolling/scroll-container-horizontally-expected.txt.
* fast/scrolling/mac/scroll-container-horizontally.html: Renamed from LayoutTests/fast/scrolling/scroll-container-horizontally.html.
* platform/gtk/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:

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

2 months agoFix GTK build.
achristensen@apple.com [Tue, 17 Mar 2020 19:49:52 +0000 (19:49 +0000)]
Fix GTK build.
https://bugs.webkit.org/show_bug.cgi?id=209192

* UIProcess/API/glib/WebKitUIClient.cpp:
I committed r258574 too fast.

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

2 months agoAdd WKUIDelegatePrivate SPI _webView:printFrame:completionHandler:
achristensen@apple.com [Tue, 17 Mar 2020 19:46:46 +0000 (19:46 +0000)]
Add WKUIDelegatePrivate SPI _webView:printFrame:completionHandler:
https://bugs.webkit.org/show_bug.cgi?id=209192
<rdar://problem/51313336>

Reviewed by Geoff Garen.

Source/WebKit:

This is just like the existing _webView:printFrame: but you tell it when you're done instead of just returning.
Covered by API tests.

* UIProcess/API/APIUIClient.h:
(API::UIClient::printFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::printFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFrame):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[PrintDelegateWithCompletionHandler _webView:printFrame:completionHandler:]):
(-[PrintDelegateWithCompletionHandler waitForPrintFrameCall]):
(TEST):

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

2 months agoAccessCase::canReplace should allow a Getter to replace an IntrinsicGetter
tzagallo@apple.com [Tue, 17 Mar 2020 19:45:05 +0000 (19:45 +0000)]
AccessCase::canReplace should allow a Getter to replace an IntrinsicGetter
https://bugs.webkit.org/show_bug.cgi?id=209158
<rdar://problem/59222012>

Reviewed by Saam Barati.

When we override an intrinsic getter with a user defined getter, we might end up with the
same offset and attributes. In which case, an inline cache that contained an entry for the
intrisic getter will believe that it is still valid, and add a new getter access case,
leading to duplicate entries for the same structure.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::canReplace const):

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

2 months agohttp/wpt/css/css-animations/start-animation-001.html is flaky failing
graouts@webkit.org [Tue, 17 Mar 2020 19:39:47 +0000 (19:39 +0000)]
http/wpt/css/css-animations/start-animation-001.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207337
<rdar://problem/59226371>

Reviewed by Dean Jackson.

This test was written in a flaky way for two reasons:

1. it was using a timer to assume state in the animation engine
2. it was using an accelerated animation that wasn't absolutely required to as an indicator of what a non-steps based version
   of the tested animation would look like, but accelerated animations are notoriously hard to test for rendering purposes

We update the test to use the secondary animation as a timer so that we can test the state of animations at 200ms precisely,
and we get rid of the accelerated animation such that only the tested animation's rendering is tested.

* http/wpt/css/css-animations/start-animation-001.html:
* platform/mac/TestExpectations:

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

2 months agoREGRESSION (r258411): imported/w3c/web-platform-tests/dom/events/Event-dispatch-redis...
graouts@webkit.org [Tue, 17 Mar 2020 19:32:08 +0000 (19:32 +0000)]
REGRESSION (r258411): imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html is failing consistently
https://bugs.webkit.org/show_bug.cgi?id=209175
<rdar://problem/60513114>

Unreviewed test gardening.

Actually, this test is not a pass on OpenSource iOS bots, reverting.

* platform/ios-wk2/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:

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

2 months ago[ Mac wk2 ] http/tests/IndexedDB/storage-limit.https.html is flaky failing.
lawrence.j@apple.com [Tue, 17 Mar 2020 18:40:24 +0000 (18:40 +0000)]
[ Mac wk2 ] http/tests/IndexedDB/storage-limit.https.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209189

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months agoUse less sync IPC for ITP testRunner methods
cdumez@apple.com [Tue, 17 Mar 2020 18:33:58 +0000 (18:33 +0000)]
Use less sync IPC for ITP testRunner methods
https://bugs.webkit.org/show_bug.cgi?id=209184

Reviewed by Alex Christensen.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsDebugMode):
(WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode):
(WTR::TestRunner::setStatisticsLastSeen):
(WTR::TestRunner::setStatisticsMergeStatistic):
(WTR::TestRunner::setStatisticsPrevalentResource):
(WTR::TestRunner::setStatisticsVeryPrevalentResource):
(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

2 months agoREGRESSION (r258334): WebPasteboardProxy::setPasteboardBufferForType should allow...
ddkilzer@apple.com [Tue, 17 Mar 2020 18:33:58 +0000 (18:33 +0000)]
REGRESSION (r258334): WebPasteboardProxy::setPasteboardBufferForType should allow zero-size buffers
<https://webkit.org/b/209167>
<rdar://problem/60516302>

Reviewed by Geoffrey Garen.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
- Remove check for zero-size buffer to match
  WebPageProxy::dataSelectionForPasteboard().

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

2 months agoREGRESSION(r254856) Add exception for window.openDatabase to not masquerade as undefi...
achristensen@apple.com [Tue, 17 Mar 2020 18:31:22 +0000 (18:31 +0000)]
REGRESSION(r254856) Add exception for window.openDatabase to not masquerade as undefined in currently shipping Jesus Calling Devotional app
https://bugs.webkit.org/show_bug.cgi?id=209160
<rdar://problem/60297073>

Reviewed by Geoff Garen.

Source/WebCore:

Manually verified this fixes the app, which compares typeof openDatabase with 'undefined'
Going forward, we intend to completely remove WebSQL, so this is a temporary exception to our removal strategy.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::openDatabase const):
* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isJesusCalling):

Source/WTF:

* wtf/spi/darwin/dyldSPI.h:

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

2 months ago[ macOS wk1 ] platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html is flaky...
lawrence.j@apple.com [Tue, 17 Mar 2020 18:18:47 +0000 (18:18 +0000)]
[ macOS wk1 ] platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207150

Unreviewed test gardening.

Adjusted the test expectations to further reflect the issue.

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

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

2 months ago[WKTR] Crash when trying to open a new window in an ephemeral session test
cdumez@apple.com [Tue, 17 Mar 2020 18:17:01 +0000 (18:17 +0000)]
[WKTR] Crash when trying to open a new window in an ephemeral session test
https://bugs.webkit.org/show_bug.cgi?id=209181

Reviewed by Geoffrey Garen.

Tools:

Make sure that the new WKWebView is using the same data store as its related WKWebView.

* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateOtherPage):

LayoutTests:

Add layout test coverage.

* fast/dom/window-open-ephemeral-expected.txt: Added.
* fast/dom/window-open-ephemeral.html: Added.

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

2 months agoClean up some latching tests
simon.fraser@apple.com [Tue, 17 Mar 2020 18:07:55 +0000 (18:07 +0000)]
Clean up some latching tests
https://bugs.webkit.org/show_bug.cgi?id=209170

Reviewed by Antti Koivisto.

These tests were weird in various ways:
    - <table>s to take up space when a simple <div> would do
    - Mixture of js-test-pre/post and waitUntilDone/notifyDone
    - JS in script tag at the start of the body

Fix these things.

* tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
* tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
* tiled-drawing/scrolling/fast-scroll-mainframe-zoom-expected.txt:
* tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
* tiled-drawing/scrolling/scrolling-no-iframe-latching.html:

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

2 months agoAXIsolatedTree removal should set all nodes to be removed on AX secondary thread.
andresg_22@apple.com [Tue, 17 Mar 2020 18:07:10 +0000 (18:07 +0000)]
AXIsolatedTree removal should set all nodes to be removed on AX secondary thread.
https://bugs.webkit.org/show_bug.cgi?id=209169

Reviewed by Chris Fleizach.

- AXIsolatedTree::removeTreeForPageID is called on the main thread but
it should not remove the nodes in the main thread, but instead add them
to the pending changes to be removed on the secondary thread. This was
causing the problem of empty new trees when the old tree would go away
but the client was holding a reference to an object that has been
disconnected and thus had no children.
- In addition, this change fixes an isolated tree mode crash in AccessibilityMenuList.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::~AXObjectCache):
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::isCollapsed const):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::removeTreeForPageID):

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

2 months agoTerminate the WebContent process when receiving invalid IPC from a WebInspector session
bfulgham@apple.com [Tue, 17 Mar 2020 17:28:55 +0000 (17:28 +0000)]
Terminate the WebContent process when receiving invalid IPC from a WebInspector session
https://bugs.webkit.org/show_bug.cgi?id=209157
<rdar://problem/58961055>

Reviewed by Chris Dumez.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::backForwardGoToItemShared): Add a message check that we are not receiving
the request from a WebInspector page.
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): Switch to a release assert.

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

2 months agoUnreviewed, reverting r257844.
jacob_uphoff@apple.com [Tue, 17 Mar 2020 17:14:43 +0000 (17:14 +0000)]
Unreviewed, reverting r257844.

this revision caused a test to start timing out

Reverted changeset:

"(r256513) [ Mac ] fast/scrolling/programmatic-scroll-to-zero-
zero.html is a flaky failure"
https://bugs.webkit.org/show_bug.cgi?id=207948
https://trac.webkit.org/changeset/257844

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

2 months ago[Cocoa] Disable CF prefs direct mode
pvollan@apple.com [Tue, 17 Mar 2020 16:59:32 +0000 (16:59 +0000)]
[Cocoa] Disable CF prefs direct mode
https://bugs.webkit.org/show_bug.cgi?id=209166
<rdar://problem/60517387>

Reviewed by Brent Fulgham.

Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
since it caused performance regressions.

Source/WebKit:

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
* UIProcess/Cocoa/PreferenceObserver.mm:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::grantAccessToPreferenceService):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.h:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Source/WTF:

* wtf/PlatformEnable.h:

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

2 months ago[ Mac wk2 ] webrtc/concurrentVideoPlayback.html is flaky timing out.
lawrence.j@apple.com [Tue, 17 Mar 2020 16:50:50 +0000 (16:50 +0000)]
[ Mac wk2 ] webrtc/concurrentVideoPlayback.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209183

unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months agoUnreviewed, reverting r258554.
lawrence.j@apple.com [Tue, 17 Mar 2020 16:47:54 +0000 (16:47 +0000)]
Unreviewed, reverting r258554.

Incorrect expectations set.

Reverted changeset:

"[ Mac wk2 ] webrtc/concurrentVideoPlayback.html is flaky
timing out."
https://bugs.webkit.org/show_bug.cgi?id=209183
https://trac.webkit.org/changeset/258554

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

2 months ago[ Mac wk2 ] webrtc/concurrentVideoPlayback.html is flaky timing out.
lawrence.j@apple.com [Tue, 17 Mar 2020 16:43:13 +0000 (16:43 +0000)]
[ Mac wk2 ] webrtc/concurrentVideoPlayback.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209183

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months agoUpdate wpt tests imported/w3c/web-platform-tests/html/rendering/non-replaced-elements...
commit-queue@webkit.org [Tue, 17 Mar 2020 16:20:55 +0000 (16:20 +0000)]
Update wpt tests imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page
https://bugs.webkit.org/show_bug.cgi?id=209178

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-17
Reviewed by Rob Buis.

LayoutTests/imported/w3c:

* resources/resource-files.json:
* web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-expected.html: Added.
* web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values-expected.html: Added.
* web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values.html: Added.
* web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute.html: Added.
* web-platform-tests/html/rendering/non-replaced-elements/the-page/support/big-page.html: Added.
* web-platform-tests/html/rendering/non-replaced-elements/the-page/support/w3c-import.log:
* web-platform-tests/html/rendering/non-replaced-elements/the-page/w3c-import.log:

LayoutTests:

This imports a new test for bug 208570.

* TestExpectations: These tests fails for now.

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

2 months ago[ Mac wk1 Debug] inspector/debugger/setShouldBlackboxURL.html is flaky failing.
lawrence.j@apple.com [Tue, 17 Mar 2020 16:18:02 +0000 (16:18 +0000)]
[ Mac wk1 Debug] inspector/debugger/setShouldBlackboxURL.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209182

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 months ago[ Mac wk1 ] inspector/script-profiler/event-type-Other.html is flaky failing.
lawrence.j@apple.com [Tue, 17 Mar 2020 15:48:11 +0000 (15:48 +0000)]
[ Mac wk1 ] inspector/script-profiler/event-type-Other.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209180

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 months agoREGRESSION(r257759): Web Inspector: Settings icon sometimes placed below the tab bar
drousso@apple.com [Tue, 17 Mar 2020 15:39:58 +0000 (15:39 +0000)]
REGRESSION(r257759): Web Inspector: Settings icon sometimes placed below the tab bar
https://bugs.webkit.org/show_bug.cgi?id=208603
<rdar://problem/60108967>

Reviewed by Brian Burg.

* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
Don't take into account the width of the flexible space before or after the normal tab bar
items since they will shrink to fit (the container is using `display: flex;`). Instead, use
determine the available space by subtracting the width of every `WI.PinnedTabBarItem` from
the `realOffsetWidth` of the container, comparing against the sum of the `realOffsetWidth`
of all `WI.GeneralTabBarItem`. If the sum is greater than the available space, successively
mark items from the end (right in LTR, left in RTL) as hidden until the remaining will fit.

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

2 months agoUnreviewed, reverting r258339.
commit-queue@webkit.org [Tue, 17 Mar 2020 15:36:37 +0000 (15:36 +0000)]
Unreviewed, reverting r258339.
https://bugs.webkit.org/show_bug.cgi?id=209179

"Is it sometimes breaking rendering" (Requested by youenn on
#webkit).

Reverted changeset:

"FrameLoader should own its FrameLoaderClient"
https://bugs.webkit.org/show_bug.cgi?id=208918
https://trac.webkit.org/changeset/258339

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

2 months agopointerevents/ios/touch-action-none-link-traversal.html times out
commit-queue@webkit.org [Tue, 17 Mar 2020 15:19:07 +0000 (15:19 +0000)]
pointerevents/ios/touch-action-none-link-traversal.html times out
https://bugs.webkit.org/show_bug.cgi?id=209177
<rdar://problem/60393055>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-17
Reviewed by Antti Koivisto.

* pointerevents/ios/resources/touch-action-none-link-traversal-resource.html: Added.
* pointerevents/ios/touch-action-none-link-traversal.html:

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

2 months agoRELEASE_LOG should not be Cocoa specific
philn@webkit.org [Tue, 17 Mar 2020 14:56:07 +0000 (14:56 +0000)]
RELEASE_LOG should not be Cocoa specific
https://bugs.webkit.org/show_bug.cgi?id=195182

Reviewed by Konstantin Tokarev.

.:

Add a Systemd Journald Logger implementation, enabled by default
in the GTK and WPE ports. When this is enabled, release logs will
be sent to the Systemd Journal. To retrieve media logs for
instance, this command can be used:

$ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media

* Source/cmake/FindSystemd.cmake: Added.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

WPE/GTK build fixes related with Release logging support.

* bridge/npruntime_internal.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::throttlingReasonToString):
* page/PerformanceLogging.cpp:
(WebCore::toString):
* page/PerformanceMonitor.cpp:
(WebCore::stringForCPUSamplingActivityState):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::logChannel const):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier):
(WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger):
* platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
(WebCore::CDMProxyClearKey::cencDecryptSubsampled):
(WebCore::CDMProxyClearKey::initializeGcrypt):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
* platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::addSourceBuffer):
(WebCore::MediaSourceGStreamer::logChannel const):
* platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::logChannel const):
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
* platform/mediastream/AudioMediaStreamTrackRenderer.cpp:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::computeLogLevel):
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::getRawCookies const):

Source/WTF:

Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard.

* wtf/Assertions.cpp:
* wtf/Assertions.h:
* wtf/Logger.h:
(WTF::Logger::log):
* wtf/MemoryPressureHandler.cpp:
(WTF::toString):
* wtf/PlatformGTK.cmake:
* wtf/PlatformWPE.cmake:
* wtf/RefCountedLeakCounter.cpp:

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

2 months agoREGRESSION (r258411): imported/w3c/web-platform-tests/dom/events/Event-dispatch-redis...
graouts@webkit.org [Tue, 17 Mar 2020 11:45:50 +0000 (11:45 +0000)]
REGRESSION (r258411): imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html is failing consistently
https://bugs.webkit.org/show_bug.cgi?id=209175
<rdar://problem/60513114>

Unreviewed test gardening.

Following r258411 this test is a PASS on iOS. Adjusting the expectation.

* platform/ios-wk2/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:

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

2 months agoSafari doesn't insert mDNS candidates to SDP
youenn@apple.com [Tue, 17 Mar 2020 10:50:32 +0000 (10:50 +0000)]
Safari doesn't insert mDNS candidates to SDP
https://bugs.webkit.org/show_bug.cgi?id=209050
<rdar://problem/60419936>

Reviewed by Eric Carlson.

Source/WebCore:

Instead of removing host candidate lines in SDP, replace the host IP address by the corresponding mDNS name.
Covered by updated test.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::extractIPAddress):
(WebCore::PeerConnectionBackend::filterSDP const):
(WebCore::PeerConnectionBackend::finishedRegisteringMDNSName):
* Modules/mediastream/PeerConnectionBackend.h:

LayoutTests:

* webrtc/datachannel/mdns-ice-candidates.html:

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

2 months agoSync web-platform-tests/css/css-cascade from upstream
shvaikalesh@gmail.com [Tue, 17 Mar 2020 10:42:05 +0000 (10:42 +0000)]
Sync web-platform-tests/css/css-cascade from upstream
https://bugs.webkit.org/show_bug.cgi?id=209150

Unreviewed test gardening.

* platform/ios/imported/w3c/web-platform-tests/css/css-cascade: Added.
* platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: Added.

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

2 months agoSync web-platform-tests/css/css-cascade from upstream
shvaikalesh@gmail.com [Tue, 17 Mar 2020 10:14:02 +0000 (10:14 +0000)]
Sync web-platform-tests/css/css-cascade from upstream
https://bugs.webkit.org/show_bug.cgi?id=209150

Reviewed by Youenn Fablet.

Sync web-platform-tests/css/css-cascade from upstream ec2bf5a86c00.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/css/css-cascade/*: Added.

LayoutTests:

* TestExpectations:

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

2 months ago[GStreamer][MSE] Playback rate update support
philn@webkit.org [Tue, 17 Mar 2020 09:36:31 +0000 (09:36 +0000)]
[GStreamer][MSE] Playback rate update support
https://bugs.webkit.org/show_bug.cgi?id=208454

Reviewed by Xabier Rodriguez-Calvar.

Implement playback rate update support for the MSE player. Also
includes drive-by logging cleanups.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::pipeline const):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::seek):
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
(WebCore::MediaPlayerPrivateGStreamerMSE::updatePlaybackRate): Deleted.
(WebCore::MediaPlayerPrivateGStreamerMSE::setRate): Deleted.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

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

2 months agoRemove the zero-delay ScrollingCoordinatorMac commit timer
simon.fraser@apple.com [Tue, 17 Mar 2020 05:27:00 +0000 (05:27 +0000)]
Remove the zero-delay ScrollingCoordinatorMac commit timer
https://bugs.webkit.org/show_bug.cgi?id=209164

Reviewed by Zalan Bujtas.

Source/WebCore:

The scrolling tree on macOS should just commit at rendering update time. There's no need
for a separate zero-delay timer.

Tested by existing tests.

* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::pageDestroyed):
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorMac::commitTreeState): Deleted.

LayoutTests:

Dumping layers just made this test flakey. It's enough to test for scroll events on the overflow.

* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:

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

2 months ago[JSC] JSMapIterator and JSSetIterator are CellType
ysuzuki@apple.com [Tue, 17 Mar 2020 05:22:41 +0000 (05:22 +0000)]
[JSC] JSMapIterator and JSSetIterator are CellType
https://bugs.webkit.org/show_bug.cgi?id=209168
<rdar://problem/59705631>

Reviewed by Saam Barati.

They are JSCell, not JSObject since they are not used as a user-observable set/map iterators in JSC.
However, their JSType is ObjectType. They should use CellType instead.

* runtime/JSMapIterator.h:
* runtime/JSSetIterator.h:

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

2 months agoAdd a bit more UIHitTesting logging, and make it possible to dump EventRegions from...
simon.fraser@apple.com [Tue, 17 Mar 2020 05:09:56 +0000 (05:09 +0000)]
Add a bit more UIHitTesting logging, and make it possible to dump EventRegions from WebKit
https://bugs.webkit.org/show_bug.cgi?id=209058

Reviewed by Antti Koivisto.

Source/WebCore:

Export operator<<(TextStream&, const EventRegion&) so it can be used from Webkit.

* rendering/EventRegion.h:

Source/WebKit:

Add a UIHitTesting log.

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

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

2 months agoRemove a 'using namespace WebCore' in MediaSessionManagerCocoa
timothy_horton@apple.com [Tue, 17 Mar 2020 04:44:51 +0000 (04:44 +0000)]
Remove a 'using namespace WebCore' in MediaSessionManagerCocoa
https://bugs.webkit.org/show_bug.cgi?id=209162

Reviewed by Simon Fraser.

* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
Unified source cleanliness. Not currently causing any trouble, but
it did when I changed something locally!

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

2 months agoWPE and GTK gardening.
lmoura@igalia.com [Tue, 17 Mar 2020 01:32:19 +0000 (01:32 +0000)]
WPE and GTK gardening.

Unreviewed test gardening.

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

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

2 months agoREGRESSION(r257380): Web Inspector: deleting node causes TreeOutline to lose focus
nvasilyev@apple.com [Tue, 17 Mar 2020 01:01:16 +0000 (01:01 +0000)]
REGRESSION(r257380): Web Inspector: deleting node causes TreeOutline to lose focus
https://bugs.webkit.org/show_bug.cgi?id=208364
<rdar://problem/59871772>

Reviewed by Devin Rousso.

Maintain keyboard focus within TreeOutline when selection changes.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.select):

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

2 months agoBuild fix.
achristensen@apple.com [Tue, 17 Mar 2020 00:30:39 +0000 (00:30 +0000)]
Build fix.
       ​https://bugs.webkit.org/show_bug.cgi?id=208951

* pal/spi/cocoa/AVFoundationSPI.h:
r258314 was missing a nullability annotation.

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

2 months agoA change event gets dispatched when textarea gets changed without focus
rniwa@webkit.org [Tue, 17 Mar 2020 00:14:34 +0000 (00:14 +0000)]
A change event gets dispatched when textarea gets changed without focus
https://bugs.webkit.org/show_bug.cgi?id=202144

Patch by ChangSeok Oh <changseok@webkit.org> on 2020-03-16
Reviewed by Ryosuke Niwa.

Source/WebCore:

A crash happens in WebCore::ValidationMessage::buildBubbleTree. An immediate reason
is that DOM tree is modified in buildBubbleTree triggered by a timer.
The function calls document.updateLayout() that causes a change event
for textarea to fire when something changed in the textarea.
This bug is not reproduced on Mac because buildBubbleTree is not called.
See ValidationMessage::setMessage.
On the other hand, the root cause of this issue is triggering the change event
for textarea even if it is not focused when a change is made. This behavior
is different to what Gecko and Chromium do. When loading the test, they do not
trigger the change event although the textarea is filled by the script
since the textarea is not focused. Only when we manually make a change (meaning
the textarea is focused by user input), the event gets dispatched. To fix it,
setChangedSinceLastFormControlChangeEvent(true) is moved below the focus check
in HTMLTextAreaElement::subtreeHasChanged();

Test: fast/forms/textfield-onchange-without-focus.html

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::subtreeHasChanged):

LayoutTests:

The test should be identical to the extected result without crash.

* fast/forms/textfield-onchange-without-focus-expected.html: Added.
* fast/forms/textfield-onchange-without-focus.html: Added.

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

2 months agoJavaScript identifier grammar supports unescaped astral symbols, but JSC doesn’t
keith_miller@apple.com [Tue, 17 Mar 2020 00:12:17 +0000 (00:12 +0000)]
JavaScript identifier grammar supports unescaped astral symbols, but JSC doesn’t
https://bugs.webkit.org/show_bug.cgi?id=208998

Reviewed by Michael Saboff.

JSTests:

* stress/unicode-identifiers-with-surrogate-pairs.js: Added.
(let.c.of.chars.eval.foo):
(throwsSyntaxError):
(let.c.of.continueChars.throwsSyntaxError.foo):

Source/JavaScriptCore:

This patch fixes a bug in the parser that allows for surrogate pairs when parsing identifiers.
It also makes a few other changes to the parser:

1) When looking for keywords we just need to check that subsequent
character cannot be a identifier part or an escape start.

2) The only time we call parseIdentifierSlowCase is when we hit an
escape start or a surrogate pair so we can optimize that to just
copy everything up slow character into our buffer.

3) We shouldn't allow for asking if a UChar is an identifier start/part.

* KeywordLookupGenerator.py:
(Trie.printSubTreeAsC):
(Trie.printAsC):
* parser/Lexer.cpp:
(JSC::isNonLatin1IdentStart):
(JSC::isIdentStart):
(JSC::isSingleCharacterIdentStart):
(JSC::cannotBeIdentStart):
(JSC::isIdentPart):
(JSC::isSingleCharacterIdentPart):
(JSC::cannotBeIdentPartOrEscapeStart):
(JSC::Lexer<LChar>::currentCodePoint const):
(JSC::Lexer<UChar>::currentCodePoint const):
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
(JSC::Lexer<T>::scanRegExp):
(JSC::isIdentPartIncludingEscapeTemplate): Deleted.
(JSC::isIdentPartIncludingEscape): Deleted.
* parser/Lexer.h:
(JSC::Lexer::setOffsetFromSourcePtr): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::printUnexpectedTokenText):
* parser/ParserTokens.h:

Source/WTF:

* wtf/text/WTFString.cpp:
(WTF::String::fromCodePoint):
* wtf/text/WTFString.h:

LayoutTests:

Fix broken test that asserted a non-ID_START codepoint was a start codepoint and
an ID_START codepoint was not a valid codepoint...

* js/script-tests/unicode-escape-sequences.js:
* js/unicode-escape-sequences-expected.txt:

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

2 months agoCrash under WebCookieCache::clearForHost()
cdumez@apple.com [Tue, 17 Mar 2020 00:03:57 +0000 (00:03 +0000)]
Crash under WebCookieCache::clearForHost()
https://bugs.webkit.org/show_bug.cgi?id=209149
<rdar://problem/60453086>

Reviewed by Darin Adler.

Alternative fix for Bug 209149 based on comments from Darin.

* WebProcess/WebPage/WebCookieCache.cpp:
(WebKit::WebCookieCache::clearForHost):
(WebKit::WebCookieCache::pruneCacheIfNecessary):

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

2 months agoFix the macCatalyst build after r258525
timothy_horton@apple.com [Mon, 16 Mar 2020 23:56:49 +0000 (23:56 +0000)]
Fix the macCatalyst build after r258525

* WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:
(WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions):

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

2 months agoUpdate touch event regions once per frame
simon.fraser@apple.com [Mon, 16 Mar 2020 23:34:37 +0000 (23:34 +0000)]
Update touch event regions once per frame
https://bugs.webkit.org/show_bug.cgi?id=209153

Reviewed by Zalan Bujtas.

Call document->updateTouchEventRegions() once at the end of Page::updateRendering() instead
of relying on a timer.

Also rename the functions called from Internal to make it clear they are testing-only.

Page::scrollingStateTreeAsText() needs to eagerly update event regions because they are input
to the scrolling tree.

* dom/Document.cpp:
(WebCore::Document::Document):
* page/Page.cpp:
(WebCore::Page::scrollingStateTreeAsText):
(WebCore::Page::touchEventRectsForEventForTesting):
(WebCore::Page::passiveTouchEventListenerRectsForTesting):
(WebCore::Page::doAfterUpdateRendering):
(WebCore::Page::touchEventRectsForEvent): Deleted.
(WebCore::Page::passiveTouchEventListenerRects): Deleted.
* page/Page.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
* testing/Internals.cpp:
(WebCore::Internals::touchEventRectsForEvent):
(WebCore::Internals::passiveTouchEventListenerRects):

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

2 months agoAdd personal email to Tools/Scripts/webkitpy/common/config/contributors.json
justin_michaud@apple.com [Mon, 16 Mar 2020 23:16:55 +0000 (23:16 +0000)]
Add personal email to Tools/Scripts/webkitpy/common/config/contributors.json
https://bugs.webkit.org/show_bug.cgi?id=209151

Reviewed by Yusuke Suzuki.

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

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

2 months ago[ Mac wk1 ] http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across...
lawrence.j@apple.com [Mon, 16 Mar 2020 23:12:15 +0000 (23:12 +0000)]
[ Mac wk1 ] http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209154

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 months agoMove most of TextIterator off of live ranges
darin@apple.com [Mon, 16 Mar 2020 23:02:10 +0000 (23:02 +0000)]
Move most of TextIterator off of live ranges
https://bugs.webkit.org/show_bug.cgi?id=209129

Reviewed by Antti Koivisto.

Source/WebCore:

- Change almost all arguments and return values of functions in TextIterator.h
  to use SimpleRange instead of live ranges. Exceptions are an overload of plainText
  TextIterator::rangeLength, TextIterator::rangeFromLocationAndLength,
  TextIterator::getLocationAndLengthFromRange, and TextIterator::subrange. Those
  five are a little trickier to convert, so I will do them each in separate patches.

- Go with the flow in adding an include of Node.h to BoundaryPoint.h. I had avoided
  this in the initial version, but now it seems practical to just leave it that way.
  This led to removing BoundaryPoint.cpp and moving all functions to the header.

- Converted many member functions of the Position class from using int to unsigned
  for offsets. The DOM specifies unsigned for offsets, but for some reason we used
  int for them a lot historically, even though negative numbers don't make sense.
  New classes like StaticRange, SimpleRange, and BoundaryPoint are already using
  unsigned exclusively and we'll eventually convert everything.

- Remove includes of SimpleRange.h from files that also include TextIterator.h,
  now that TextIterator.h pulls it in.

* Sources.txt: Removed BoundaryPoint.cpp.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::traverseToOffsetInRange): Updated to pass a reference
to a range rather than a pointer, after null-checking it.
(WebCore::AXObjectCache::lengthForRange): Ditto.
(WebCore::AXObjectCache::nextBoundary): Ditto.
(WebCore::AXObjectCache::previousBoundary): Ditto.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::stringForRange const): Ditto.
(WebCore::AccessibilityObject::stringForVisiblePositionRange): Ditto.
(WebCore::AccessibilityObject::lengthForVisiblePositionRange const): Ditto.

* accessibility/AccessibilityObjectInterface.h: Removed an extra include.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
Updated to pass a reference to a range rather than a pointer, after null-checking it.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]): Ditto.

* dom/BoundaryPoint.cpp: Removed.

* dom/BoundaryPoint.h: Removed redundant includes and forward declarations
since we're now committing to including "Node.h" here. Moved functions
all out of the .cpp file and made them inlines.

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::collectTextRanges): Pass a reference to
a range instead of a pointer.

* dom/Position.cpp:
(WebCore::Position::Position): Take unsigned.
(WebCore::Position::moveToPosition): Ditto.
(WebCore::Position::moveToOffset): Ditto.
(WebCore::Position::parentAnchoredEquivalent const): Cast to unsigned.
(WebCore::Position::anchorTypeForLegacyEditingPosition): Take unsigned.
(WebCore::Position::previous const): Use unsigned.
(WebCore::Position::next const): Ditto.
(WebCore::Position::uncheckedPreviousOffset): Take unsigned.
(WebCore::Position::uncheckedPreviousOffsetForBackwardDeletion): Ditto.
(WebCore::Position::uncheckedNextOffset): Ditto.
(WebCore::Position::atLastEditingPositionForNode const): Cast to unsigned.
(WebCore::Position::atEndOfTree const): Ditto.
(WebCore::Position::rendersInDifferentPosition const): Added casts to
unsigned and also removed unneeded redundant checks. In a place where
we had already checked that both nodes were the same and both offsets
were different, we were checking the types of both nodes (but they are
the same so only need to check one) and we were checking that both
offsets were different (but we already knew they were different).
(WebCore::searchAheadForBetterMatch): Use unsigned.
(WebCore::Position::getInlineBoxAndOffset const): Ditto.
(WebCore::Position::equals const): Removed a cast to int.
(WebCore::makeBoundaryPoint): Moved this function here so now it can be
used in more places.

* dom/Position.h: Changed many argument types to unsigned. Moved declarations
of all the functions up above all the inline implementations of the functions
to separate interface from implementation a bit better. Wrote a FIXME about
the name createLegacyEditingPosition. Moved makeBoundaryPoint here and exported
it from WebCore so we can use it from more places.

* dom/Range.cpp:
(WebCore::createLiveRange): Moved these functions here from SimpleRange.cpp
because a live range is more advanced concept, so makes more sense for live
range to know about simple range rather than vice versa.

* dom/Range.h: Removed some unneeded includes and forward declarations.
Added a FIXME about renaming to LiveRange. Moved the createLiveRange
functions here. Moved declarations of functions above inline function bodies.

* dom/SimpleRange.cpp:
(WebCore::createLiveRange): Moved to Range.cpp.

* dom/SimpleRange.h: Exported the constructor. Removed unneeded overload
that takes a Range*.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
Refactored code a bit and use unsigned.
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical): Use unsigned.

* editing/Editing.cpp:
(WebCore::visibleImageElementsInRangeWithNonLoadedImages): Use a reference
to a range rather than a pointer.

* editing/Editing.h: Added a forward declaration of Range that now seems to
be needed to compile.

* editing/Editor.cpp:
(WebCore::Editor::selectedText const): Call makeBoundaryPoint twice here to
convert two Position objects into a SimpleRange.

* editing/HTMLInterchange.cpp: Removed some extra includes.
(WebCore::convertHTMLTextToInterchangeFormat): Use variadic
StringBuilder::append.

* editing/TextIterator.cpp:
(WebCore::firstNode): Added. We use this instead of Range::firstNode.
If we find we need it outside TextIterator we can find a header for it.
Not sure it would be great to add it to in BoundaryPoint.h, nor is it
obviously better as a BoundaryPoint member function.
(WebCore::TextIterator::TextIterator): Cut down on the extra constructors
and have the single remaining one take a SimpleRange.
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
Ditto. Also change some int to unsigned.
(WebCore::CharacterIterator::CharacterIterator): Ditto.
(WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator): Ditto.
(WebCore::WordAwareIterator::WordAwareIterator): Ditto.
(WebCore::TextIterator::rangeLength): Since this is one of the functions
that still takes a live range pointer, updated it to check for null and
pass a reference rather than a pointer.
(WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
(WebCore::hasAnyPlainText): Removed now-unneeded call to createLiveRange.
(WebCore::plainText): Updated the main implementation to take a SimpleRange,
eliminating the version that takes two Position objects, but keeping the
one that takes a live range pointer for now.
(WebCore::plainTextReplacingNoBreakSpace): Removed all but the one, and
have that one take a SimpleRange.

* editing/TextIterator.h: Removed the include of SimpleRange.h. Also
Updated for the changes above, eliminating five different constructors
that take a live range and also overloads that take two Position objects.

* editing/TextManipulationController.cpp:
(WebCore::ParagraphContentIterator::ParagraphContentIterator):
Call makeBoundaryPoint twice here to convert two Position objects into
a SimpleRange.

* editing/VisibleSelection.cpp: Removed an include.

* editing/VisibleUnits.cpp:
(WebCore::suffixLengthForRange): Pass a reference to a range known to
not be null.
(WebCore::previousBoundary): Ditto.
(WebCore::nextBoundary): Ditto.

* editing/cocoa/DataDetection.mm:
(WebCore::buildQuery): Take a SimpleRange.
(WebCore::DataDetection::detectContentInRange): Added a null check on
a live range and pass a reference to it.
* editing/cocoa/DictionaryLookup.mm:
(WebCOre::DictionaryLookup::rangeAtHitTestResult): Ditto.

* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange): Pass a reference to a range
known to not be null.
* page/TextIndicator.cpp:
(WebCore::estimatedTextColorsForRange): Ditto.
(WebCore::containsOnlyWhiteSpaceText): Ditto.
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot const): Ditto.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::selectedText const): Added a null check on
a live range and pass a reference to it.

Source/WebKit:

* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
(-[WKDOMTextIterator initWithRange:]): Leave _textIterator as a nullptr
if the passed-in range is nil since we no longer offer a way to create
an empty TextIterator; other clients don't seem to need one.
(-[WKDOMTextIterator advance]): Add a null check.
(-[WKDOMTextIterator atEnd]): Ditto.
(-[WKDOMTextIterator currentRange]): Ditto.
(-[WKDOMTextIterator currentTextPointer]): Ditto.
(-[WKDOMTextIterator currentTextLength]): Ditto.

* WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: Removed include.

* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales): Pass
a reference to a range known not to be null.

* WebProcess/WebPage/WebPage.cpp: Removed an include.

* WebProcess/WebPage/ios/WebPageIOS.mm: Removed a "using naemsapce WebCore".
Added two local functions
(WebKit::plainTextForContext): Added. Helper for just this file where calling
plainTextReplacingNoBreakSpace on a possibly null Range is common.
(WebKit::plainTextForDisplay): Ditto. This one passes true for isDisplayString.
Not entirely clear how carefully we chose which of the two to call, or if there
is sufficient test coverage.
(WebKit::WebPage::platformEditorState const): Use plainTextForContext
and plainTextForDisplay.
(WebKit::WebPage::getSelectionContext): Ditto.
(WebKit::WebPage::getRectsAtSelectionOffsetWithText): Use plainTextForDisplay.
(WebKit::WebPage::requestDictationContext): Use plainTextForContext.
(WebKit::WebPage::replaceSelectedText): Ditto.
(WebKit::WebPage::replaceDictatedText): Ditto.
(WebKit::WebPage::requestAutocorrectionData): Ditto.
(WebKit::WebPage::applyAutocorrectionInternal): Ditto.
(WebKit::WebPage::autocorrectionContext): Ditto.
(WebKit::dataDetectorLinkPositionInformation): Use plainTextForDisplay.
(WebKit::WebPage::requestDocumentEditingContext): Use RetainPtr instead of
autorelease. Use makeBoundaryPoint to convert Position objects to SimpleRange.

Source/WebKitLegacy/mac:

* WebView/WebFrame.mm: Removed an include.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]):
Add casts to unsigned.

* WebView/WebTextIterator.mm:
(-[WebTextIterator initWithRange:]): Leave _private->_textIterator
as a nullptr if the passed-in range is nil since we no longer offer
a way to create an empty TextIterator; other clients don't seem to
need one.
(-[WebTextIterator advance]): Check _private->_textIterator for null.
(-[WebTextIterator atEnd]): Ditto.
(-[WebTextIterator currentRange]): Ditto.
(-[WebTextIterator currentTextPointer]): Ditto.
(-[WebTextIterator currentTextLength]): Ditto.
(-[WebTextIterator currentNode]): Ditto.
(-[WebTextIterator currentText]): Ditto.

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

2 months agoCrash in CSSValue::isPrimitiveValue
commit-queue@webkit.org [Mon, 16 Mar 2020 22:10:33 +0000 (22:10 +0000)]
Crash in CSSValue::isPrimitiveValue
https://bugs.webkit.org/show_bug.cgi?id=208309

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-03-16
Reviewed by Ryosuke Niwa.

Source/WebCore:

Added a NULL check before dereferencing value in ApplyStyleCommand::computedFontSize

Test: editing/execCommand/primitive-value.html

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::computedFontSize):

LayoutTests:

Added a testcase attached to bugzilla issue 208309, with little modification.

* editing/execCommand/primitive-value-expected.txt: Added.
* editing/execCommand/primitive-value.html: Added.

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

2 months agoCrash under WebCookieCache::clearForHost()
cdumez@apple.com [Mon, 16 Mar 2020 22:04:02 +0000 (22:04 +0000)]
Crash under WebCookieCache::clearForHost()
https://bugs.webkit.org/show_bug.cgi?id=209149
<rdar://problem/60453086>

Reviewed by Alex Christensen.

Source/WebKit:

Make sure WebCookieCache::pruneCacheIfNecessary() keeps alive the host String it is passing
to WebCookieCache::clearForHost(). Previously, it was merely deferencing a HashSet iterator
and passing that to clearForHost(). However, clearForHost() would then drop the String from
the HashSet and the host would no longer be valid.

Change covered by new API test.

* WebProcess/WebPage/WebCookieCache.cpp:
(WebKit::WebCookieCache::pruneCacheIfNecessary):

Tools:

Add API test coverage.

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

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

2 months agoRemove support for WebKitSystemInterface
krollin@apple.com [Mon, 16 Mar 2020 21:50:22 +0000 (21:50 +0000)]
Remove support for WebKitSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=208894
<rdar://problem/60297590>

Reviewed by Brent Fulgham.

This project provided support for facilities that are now handled
elsewhere and is no longer needed.

.:

* .gitignore:
* Source/PlatformWin.cmake:
* Source/cmake/OptionsAppleWin.cmake:

Tools:

* Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

* Makefile:
* WebKitSystemInterface.h: Removed.
* win/include/WebKitSystemInterface/WebKitSystemInterface.h: Removed.
* win/lib32/WebKitSystemInterface.lib: Removed.

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

2 months agoAlways include System.framework in WebKitLegacy's CPLUSPLUSFLAGS
timothy_horton@apple.com [Mon, 16 Mar 2020 21:41:31 +0000 (21:41 +0000)]
Always include System.framework in WebKitLegacy's CPLUSPLUSFLAGS
https://bugs.webkit.org/show_bug.cgi?id=209147

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:
* Configurations/WebKitLegacy.xcconfig:
Bring WebKitLegacy's xcconfigs in line with all the other projects,
adding System.framework globally, and in Base.xcconfig.

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

2 months ago[macOS] Accessibility sandbox regressions
pvollan@apple.com [Mon, 16 Mar 2020 21:11:00 +0000 (21:11 +0000)]
[macOS] Accessibility sandbox regressions
https://bugs.webkit.org/show_bug.cgi?id=209065
Source/WebCore/PAL:

Reviewed by Brent Fulgham.

Add Accessibility notification name.

* pal/spi/cocoa/NSAccessibilitySPI.h:

Source/WebKit:

<rdar://problem/60202450>

Reviewed by Brent Fulgham.

When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility
is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent
sandbox needs to explicitly allow reading of the various plist files.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
* WebProcess/com.apple.WebProcess.sb.in:

Tools:

Reviewed by Brent Fulgham.

* TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:
(TEST):
* TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:
(TEST):

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

2 months ago[ Mac wk2 ] imported/w3c/web-platform-tests/mediacapture-streams/MediaStream tests...
lawrence.j@apple.com [Mon, 16 Mar 2020 20:54:58 +0000 (20:54 +0000)]
[ Mac wk2 ] imported/w3c/web-platform-tests/mediacapture-streams/MediaStream tests are flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209148

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months agoColor Picker crashes on touch
megan_gardner@apple.com [Mon, 16 Mar 2020 20:21:03 +0000 (20:21 +0000)]
Color Picker crashes on touch
https://bugs.webkit.org/show_bug.cgi?id=209086

Reviewed by Darin Adler.

Source/WebCore:

Vector sizing lost in refactor. Not perfomance sensitive code, so just expanding vector as needed.

Test: fast/forms/color/color-input-activate-crash.html

* html/ColorInputType.cpp:
(WebCore::ColorInputType::suggestedColors const):

LayoutTests:

* fast/forms/color/color-input-activate-crash-expected.txt: Added.
* fast/forms/color/color-input-activate-crash.html: Added.

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

2 months ago[Cocoa] Crash under -[WKPreferenceObserver init]
pvollan@apple.com [Mon, 16 Mar 2020 20:11:01 +0000 (20:11 +0000)]
[Cocoa] Crash under -[WKPreferenceObserver init]
https://bugs.webkit.org/show_bug.cgi?id=209145

Reviewed by Darin Adler.

Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.

No new tests, since I have not been able to reproduce.

* UIProcess/Cocoa/PreferenceObserver.mm:
(-[WKPreferenceObserver init]):

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

2 months agoIndexedDB hits assertion with crypto/workers/subtle/aes-indexeddb.html
sihui_liu@apple.com [Mon, 16 Mar 2020 19:57:45 +0000 (19:57 +0000)]
IndexedDB hits assertion with crypto/workers/subtle/aes-indexeddb.html
https://bugs.webkit.org/show_bug.cgi?id=202648
<rdar://problem/56059602>

Unreviewed test gardening.

* TestExpectations:
* platform/ios-simulator/TestExpectations:

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

2 months agoRemove unused IPC messages from DrawingAreaProxy
bfulgham@apple.com [Mon, 16 Mar 2020 19:56:36 +0000 (19:56 +0000)]
Remove unused IPC messages from DrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=209090
<rdar://problem/60333300>

Reviewed by Wenson Hsieh.

Do not compile the following three unused messages in DrawingAreaProxy when
building for a Cocoa platform target.

DrawingAreaProxy::Update
DrawingAreaProxy::DidUpdateBackingStoreState
DrawingAreaProxy::ExitAcceleratedCompositingMode

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxy::update):
(WebKit::DrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode): Deleted.

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

2 months ago[Cocoa] Only set CF prefs direct mode for the WebContent process
pvollan@apple.com [Mon, 16 Mar 2020 19:50:59 +0000 (19:50 +0000)]
[Cocoa] Only set CF prefs direct mode for the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209091
<rdar://problem/60337842>

Reviewed by Brent Fulgham.

Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should only be enabled
for the WebContent process.

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):

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

2 months agoRemove FrameView::scheduleRenderingUpdate()
simon.fraser@apple.com [Mon, 16 Mar 2020 18:49:48 +0000 (18:49 +0000)]
Remove FrameView::scheduleRenderingUpdate()
https://bugs.webkit.org/show_bug.cgi?id=209109

Reviewed by Antti Koivisto.

FrameView::scheduleRenderingUpdate() called through to compositor(), but that just
turned around to call scheduleRenderingUpdate() via Page. So Remove it and change
callers to call Page::scheduleRenderingUpdate() directly.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::setViewExposedRect):
(WebCore::FrameView::scheduleRenderingUpdate): Deleted.
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::scheduleRenderingUpdate):
* page/Page.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scheduleRenderingUpdate):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:

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