WebKit-https.git
14 months agojQuery UI image assets are missing on webkit.org website.
aakash_jain@apple.com [Thu, 14 Jun 2018 18:02:43 +0000 (18:02 +0000)]
jQuery UI image assets are missing on webkit.org website.
https://bugs.webkit.org/show_bug.cgi?id=185949

Patch by Roy Reapor <rreapor@apple.com> on 2018-06-14
Reviewed by Aakash Jain.

* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_glass_75_dadada_1x400.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-icons_222222_256x240.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-icons_2e83ff_256x240.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-icons_454545_256x240.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-icons_888888_256x240.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/images/ui-icons_cd0a0a_256x240.png: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery-ui.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.accordion.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.all.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.autocomplete.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.base.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.button.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.core.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.datepicker.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.dialog.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.progressbar.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.resizable.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.selectable.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.slider.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.tabs.min.css: Added.
* ajax/libs/jqueryui/1.8.15/themes/base/jquery.ui.theme.min.css: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery-ui.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.blind.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.bounce.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.clip.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.core.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.drop.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.explode.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.fade.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.fold.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.highlight.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.pulsate.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.scale.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.shake.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.slide.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.effects.transfer.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.accordion.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.autocomplete.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.button.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.core.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.datepicker.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.dialog.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.draggable.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.droppable.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.mouse.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.position.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.progressbar.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.resizable.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.selectable.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.slider.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.sortable.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.tabs.min.js: Added.
* ajax/libs/jqueryui/1.8.15/ui/jquery.ui.widget.min.js: Added.

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

14 months ago[GTK] Enable tests on the GTK EWS queue
clopez@igalia.com [Thu, 14 Jun 2018 17:57:20 +0000 (17:57 +0000)]
[GTK] Enable tests on the GTK EWS queue
https://bugs.webkit.org/show_bug.cgi?id=186559

Reviewed by Michael Catanzaro.

Enable testing for the gtk-wk2 EWS queue.

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

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

14 months ago[Win] Fix build break after r232815 (SupportedPluginIdentifier)
Basuke.Suzuki@sony.com [Thu, 14 Jun 2018 17:57:14 +0000 (17:57 +0000)]
[Win] Fix build break after r232815 (SupportedPluginIdentifier)
https://bugs.webkit.org/show_bug.cgi?id=186623

Reviewed by Youenn Fablet.

* WebCoreSupport/WebPluginInfoProvider.cpp:
(WebPluginInfoProvider::pluginInfo):
(WebPluginInfoProvider::webVisiblePluginInfo):
* WebCoreSupport/WebPluginInfoProvider.h:

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

14 months ago[iOS] WebAVPlayerController isPlayingOnSecondScreen should be declared read-write
eric.carlson@apple.com [Thu, 14 Jun 2018 17:49:44 +0000 (17:49 +0000)]
[iOS] WebAVPlayerController isPlayingOnSecondScreen should be declared read-write
https://bugs.webkit.org/show_bug.cgi?id=186621
<rdar://problem/40243303>

Reviewed by Jer Noble.

* platform/ios/WebAVPlayerController.h:

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

14 months ago[test262-runner] Test output should summarize tests that are
commit-queue@webkit.org [Thu, 14 Jun 2018 17:49:01 +0000 (17:49 +0000)]
[test262-runner] Test output should summarize tests that are
unexpectedly passing/failing.
https://bugs.webkit.org/show_bug.cgi?id=186527

Patch by Valerie R Young <valerie@bocoup.com> on 2018-06-14
Reviewed by Michael Saboff.

* Scripts/test262/Runner.pm:
(main):
  In verbose mode, a summary of all new failing tests
  and all new passing tests are printed at the end of
  the script output.

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

14 months agoUnreviewed GTK+ gardening after r232834.
magomez@igalia.com [Thu, 14 Jun 2018 14:31:28 +0000 (14:31 +0000)]
Unreviewed GTK+ gardening after r232834.

* platform/gtk/TestExpectations:

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

14 months ago[LFC] Miscellaneous fixes to be able to layout <div> with fixed width/height
zalan@apple.com [Thu, 14 Jun 2018 14:27:28 +0000 (14:27 +0000)]
[LFC] Miscellaneous fixes to be able to layout <div> with fixed width/height
https://bugs.webkit.org/show_bug.cgi?id=186616

Reviewed by Antti Koivisto.

1. Move box horizontally/vertically when relevant margin is computed.
2. Fix isStretchedToViewport() logic and make sure that the width/height is adjusted with the margin when the box is stretchy.
3. Fix isPaddingApplicable() and add "GenericElement" for elements that don't need special handling.

With this patch LFC produces the correct geometry for the following content:
<html><body><div style="width: 100px; height: 100px;"></div></body></html>

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeFloatingHeightAndMargin const):
(WebCore::Layout::FormattingContext::computeFloatingWidthAndMargin const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::computeInFlowHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::computeInFlowWidthAndMargin const):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::isStretchedToViewport):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::moveHorizontally):
(WebCore::Display::Box::moveVertically):
(WebCore::Display::Box::Rect::setWidth):
(WebCore::Display::Box::Rect::setHeight):
(WebCore::Display::Box::Rect::moveHorizontally):
(WebCore::Display::Box::Rect::moveVertically):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isPaddingApplicable const):
* layout/layouttree/LayoutBox.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createSubTree):

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

14 months ago[GTK][WPE] MiniBrowsers should be able to ignore TLS errors
zandobersek@gmail.com [Thu, 14 Jun 2018 08:57:03 +0000 (08:57 +0000)]
[GTK][WPE] MiniBrowsers should be able to ignore TLS errors
https://bugs.webkit.org/show_bug.cgi?id=186557

Reviewed by Carlos Garcia Campos.

Add the --ignore-tls-errors flags to the GTK and WPE MiniBrowsers.
Enabling the flag enforces ignoring of TLS errors that occur during
load. This is primarily useful for loading test cases from the wpt or
run-webkit-httpd servers where testing-purpose certificates are used.

* MiniBrowser/gtk/main.c:
(main):
* MiniBrowser/wpe/main.cpp:
(main):

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

14 months ago[GTK][WPE] WebDriver: handle acceptInsecureCertificates capability
carlosgc@webkit.org [Thu, 14 Jun 2018 07:23:40 +0000 (07:23 +0000)]
[GTK][WPE] WebDriver: handle acceptInsecureCertificates capability
https://bugs.webkit.org/show_bug.cgi?id=186560

Reviewed by Brian Burg.

Source/JavaScriptCore:

Add SessionCapabilities struct to Client class and unify requestAutomationSession() methods into a single one
that always receives the session capabilities.

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspectorConstants.h:
* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::receivedAutomationSessionRequestMessage): Move the parsing of mac capabilities from
WebKit here and fill the SessionCapabilities instead.
* inspector/remote/glib/RemoteInspectorGlib.cpp:
(Inspector::RemoteInspector::requestAutomationSession): Pass SessionCapabilities to the client.
* inspector/remote/glib/RemoteInspectorServer.cpp:
(Inspector::RemoteInspectorServer::startAutomationSession): Process SessionCapabilities.
* inspector/remote/glib/RemoteInspectorServer.h:

Source/WebDriver:

Send session capabilities as part of the StartAutomationSession message. For now only acceptInsecureCerts
capability is sent.

* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::startAutomationSession):
* gtk/WebDriverServiceGtk.cpp:
(WebDriver::WebDriverService::platformCapabilities): Remove default value of acceptInsecureCerts, since that's
now handled by the browser.
* wpe/WebDriverServiceWPE.cpp:
(WebDriver::WebDriverService::platformCapabilities): Ditto.

Source/WebKit:

* UIProcess/API/glib/WebKitAutomationSession.cpp:
(webkitAutomationSessionCreate): Check the acceptInsecureCertificates capability and set the TLS error policy in
the WebContext accordingly if needed.
* UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
* UIProcess/API/glib/WebKitWebContext.cpp:
* UIProcess/Cocoa/AutomationClient.h:
* UIProcess/Cocoa/AutomationClient.mm:
(WebKit::AutomationClient::requestAutomationSession): Use SessionCapabilities to fill the session configuration.
(WebKit::AutomationClient::requestAutomationSessionWithCapabilities): Deleted.

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

14 months ago[WPE] Trying to access the remote inspector hits an assertion in the UIProcess
aperez@igalia.com [Thu, 14 Jun 2018 06:39:15 +0000 (06:39 +0000)]
[WPE] Trying to access the remote inspector hits an assertion in the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=186588

Reviewed by Carlos Garcia Campos.

Make both the WPE and GTK+ ports use /org/webkit/inspector as base prefix
for resource paths, which avoids needing a switcheroo depending on the port.

Source/JavaScriptCore:

* inspector/remote/glib/RemoteInspectorUtils.cpp:

Source/WebKit:

* UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/wpe/WebInspectorProxyWPE.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
(WebKit::WebInspectorUI::localizedStringsURL):
(WebKit::RemoteWebInspectorUI::localizedStringsURL):

Tools:

* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::inspectorTestStubURL):
* glib/generate-inspector-gresource-manifest.py:

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

14 months agoEliminate static initializers in libwebrtc.dylib
youenn@apple.com [Thu, 14 Jun 2018 04:14:50 +0000 (04:14 +0000)]
Eliminate static initializers in libwebrtc.dylib
https://bugs.webkit.org/show_bug.cgi?id=186570

Reviewed by Darin Adler.

* Source/webrtc/rtc_base/flags.h: Changed macro to create the static into a function.
* Source/webrtc/rtc_base/logging.cc: Ditto.
Made sure that the scope is created on instantiation of the first Log instance that might use it.
* Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm:
* Source/webrtc/system_wrappers/source/runtime_enabled_features_default.cc:

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

14 months agoCrash under SWServer::unregisterConnection(Connection&)
cdumez@apple.com [Thu, 14 Jun 2018 02:31:29 +0000 (02:31 +0000)]
Crash under SWServer::unregisterConnection(Connection&)
https://bugs.webkit.org/show_bug.cgi?id=186584
<rdar://problem/40931680>

Reviewed by Youenn Fablet.

Source/WebCore:

The crash was due to SWServer::Connection objects outliving their SWServer, even
though SWServer::Connection::m_server is a C++ reference. This was possible because
SWServer does not own the connections, StorageToWebProcessConnection does. This
started crashing recently, after r232423, because SWServer can get destroyed now.
The SWServer might get destroyed before the StorageToWebProcessConnection, in which
case the SWServer::Connection objects will get destroyed later. We were crashing
because the SWServer::Connection destructor tries to unregister the connection from
the SWServer (which is dead).

To address the issue, the SWServer now owns the connections. StorageToWebProcessConnection
merely has weak pointers to the connections.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::Connection::Connection):
(WebCore::SWServer::addConnection):
(WebCore::SWServer::removeConnection):
(WebCore::SWServer::resolveRegistrationReadyRequests):
* workers/service/server/SWServer.h:
(WebCore::SWServer::Connection::~Connection):
(WebCore::SWServer::Connection::server):
(WebCore::SWServer::connection):
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::forEachConnection):
(WebCore::SWServerRegistration::notifyClientsOfControllerChange):
(WebCore::SWServerRegistration::controlClient):

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
(WebKit::StorageToWebProcessConnection::didReceiveMessage):
(WebKit::StorageToWebProcessConnection::didReceiveSyncMessage):
(WebKit::StorageToWebProcessConnection::didClose):
(WebKit::StorageToWebProcessConnection::unregisterSWConnections):
(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
* StorageProcess/StorageToWebProcessConnection.h:

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

14 months ago[Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units
zalan@apple.com [Thu, 14 Jun 2018 01:36:24 +0000 (01:36 +0000)]
[Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units
https://bugs.webkit.org/show_bug.cgi?id=186585
<rdar://problem/30685325>

Reviewed by Tim Horton.

Source/WebCore:

Use the existing "override viewport size for viewport units" mechanism to compute the preferred
viewport unit values for the Mail Viewer html content.

Test: fast/dynamic/mail-autosize-viewport-unit.html

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::clearViewportSizeOverrideForCSSViewportUnits):
(WebCore::FrameView::setViewportSizeForCSSViewportUnits):
(WebCore::FrameView::overrideViewportSizeForCSSViewportUnits):
(WebCore::FrameView::viewportSizeForCSSViewportUnits const):
* page/FrameView.h:

LayoutTests:

* fast/dynamic/mail-autosize-viewport-unit-expected.txt: Added.
* fast/dynamic/mail-autosize-viewport-unit.html: Added.

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

14 months ago[GTK] Add a script to upload the data generated with run-benchmark to a browserperfda...
clopez@igalia.com [Thu, 14 Jun 2018 01:04:46 +0000 (01:04 +0000)]
[GTK] Add a script to upload the data generated with run-benchmark to a browserperfdash server and use it on the gtk perf bot
https://bugs.webkit.org/show_bug.cgi?id=166885

Reviewed by Michael Catanzaro.

This patch adds a new script that will execute run-benchmark and upload the results it generates to a browserperfdash web app.

It also modifies the buildbot config file so the GTK performance bot runs this script on the perf-test step.

* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunBenchmarkTests):
* Scripts/browserperfdash-benchmark: Added.
* Scripts/webkitpy/browserperfdash/README: Added.
* Scripts/webkitpy/browserperfdash/__init__.py: Added.
* Scripts/webkitpy/browserperfdash/browserperfdash_runner.py: Added.
(parse_args):
(BrowserPerfDashRunner):
(BrowserPerfDashRunner.__init__):
(BrowserPerfDashRunner._parse_config_file):
(BrowserPerfDashRunner._get_test_version_string):
(BrowserPerfDashRunner._get_test_data_json_string):
(BrowserPerfDashRunner._upload_result):
(BrowserPerfDashRunner.run):
(format_logger):
(main):
* Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py: Added.
(FakeBenchmarkRunner):
(FakeBenchmarkRunner.__init__):
(FakeBenchmarkRunner.execute):
(BrowserPerfDashRunnerTest):
(BrowserPerfDashRunnerTest.test_list_plans_at_least_five):
(BrowserPerfDashRunnerTest.test_benchmark_runner_subclasses_at_least_two):
(BrowserPerfDashRunnerTest.test_can_construct_runner_object_minimum_parameters):
* Scripts/webkitpy/browserperfdash/config-file-example.txt: Added.

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

14 months agoDisable AR support in WKWebView clients
dino@apple.com [Wed, 13 Jun 2018 23:20:49 +0000 (23:20 +0000)]
Disable AR support in WKWebView clients
https://bugs.webkit.org/show_bug.cgi?id=186611
<rdar://problem/39544684>

Reviewed by Jon Lee.

Since it hasn't been adequately tested, System Preview (AR) should
be disabled by default for WKWebViews.

Source/WebCore:

Add a new RuntimeEnabledFeature to control this, and guard for
this case everywhere we use system previews.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isSystemPreviewLink const):
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::isSystemPreviewImage const):
* html/HTMLPictureElement.cpp:
(WebCore::HTMLPictureElement::isSystemPreviewImage const):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setSystemPreviewEnabled):
(WebCore::RuntimeEnabledFeatures::systemPreviewEnabled const):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):

Source/WebKit:

Add a new WebPreference, and SPI into WKWebViewConfiguration. Also
don't register the WebViewContentProvider if the feature is
disabled.

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration encodeWithCoder:]):
(-[WKWebViewConfiguration initWithCoder:]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _contentProviderRegistry]):
(-[WKWebViewConfiguration _systemPreviewEnabled]):
(-[WKWebViewConfiguration _setSystemPreviewEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry initWithConfiguration:]):
(-[WKWebViewContentProviderRegistry init]): Deleted.

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

14 months ago[LLInt] use loadp consistently for get_from_scope/put_to_scope
caitp@igalia.com [Wed, 13 Jun 2018 22:51:29 +0000 (22:51 +0000)]
[LLInt] use loadp consistently for get_from_scope/put_to_scope
https://bugs.webkit.org/show_bug.cgi?id=132333

Reviewed by Mark Lam.

Using `loadis` for register indexes and `loadp` for constant scopes /
symboltables makes sense, but is problematic for big-endian
architectures.

Consistently treating the operand as a pointer simplifies determining
how to access the operand, and helps avoid bad accesses and crashes on
big-endian ports.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/Instruction.h:
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

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

14 months agoSupported plugin check should be based on plugin identifier
youenn@apple.com [Wed, 13 Jun 2018 22:22:07 +0000 (22:22 +0000)]
Supported plugin check should be based on plugin identifier
https://bugs.webkit.org/show_bug.cgi?id=186578
<rdar://problem/40523828>

Reviewed by Darin Adler.

Source/WebCore:

Rename SupportedPluginName in SupportedPluginIdentifier.
Add cross-platform support for plug-in identifier.

Update built-in PDF plug-in to check its identifier instead of its name.
This is stronger as the name may change according localization.

* loader/EmptyClients.cpp:
* plugins/PluginData.cpp:
(WebCore::isBuiltInPDFPlugIn):
(WebCore::PluginData::initPlugins):
* plugins/PluginData.h:
(WebCore::operator==):
(WebCore::isSupportedPlugin):
(WebCore::SupportedPluginIdentifier::decode):
(WebCore::SupportedPluginIdentifier::encode const):
(WebCore::SupportedPluginName::decode): Deleted.
(WebCore::SupportedPluginName::encode const): Deleted.
* plugins/PluginInfoProvider.h:

Source/WebKit:

Refactoring to move from Plugin name to Plugin identifier.
Set built-in pdf plugin identifier.
This allows making sure that the PDF plug-in check might not change according localization.

* Scripts/webkit/messages.py:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PluginInfo>::encode):
(IPC::ArgumentCoder<PluginInfo>::decode):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::supportedPluginIdentifiers):
(WebKit::PluginInfoStore::addSupportedPlugin):
(WebKit::PluginInfoStore::supportedPluginNames): Deleted.
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPlugins):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pluginInfo):
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::pluginInfo):
(WebKit::WebPluginInfoProvider::webVisiblePluginInfo):
(WebKit::WebPluginInfoProvider::populatePluginCache):
* WebProcess/Plugins/WebPluginInfoProvider.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPluginInfoProvider.h:
* WebCoreSupport/WebPluginInfoProvider.mm:
(WebPluginInfoProvider::pluginInfo):
(WebPluginInfoProvider::webVisiblePluginInfo):

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

14 months agoPSON: http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame...
cdumez@apple.com [Wed, 13 Jun 2018 22:16:10 +0000 (22:16 +0000)]
PSON: http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html ASSERTS with process swap enabled
https://bugs.webkit.org/show_bug.cgi?id=186545

Reviewed by Brady Eidson.

Source/WebCore:

Move frame navigation logging for ITP purposes from the WebProcess to the UIProcess.
This information was previously logged in DocumentLoader::willSendRequest() and was getting
sync'd to the UIProcess at regular intervals or when the layout tests call testRunner's
statisticsNotifyObserver(). We now do the logging directly in the UIProcess, in
WebPageProxy::decidePolicyForNavigationAction (which was getting called via IPC from
DocumentLoader::willSendRequest()).

This is more efficient and will also be needed soon due to the way process swap on navigation
deals with cross-origin redirects. On cross-origin redirect of the main frame, PSON cancels
the load and started a new load to the redirected to URL in the new WebProcess. As a result,
the new WebProcess is not aware that the load is a redirect, which is information that ITP
requires. By moving the ITP logging to the UIProcess, we still have access to this
information.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
Stop logging the navigation now that it is logged in the UIProcess.

* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
* loader/FrameLoaderClient.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
* loader/PolicyChecker.h:
We now pass the full redirect request to the decidePolicyForNavigationAction
delegate instead of a simple isRedirect boolean, so that we have the redirect
response URL in the UIProcess for ITP logging.

* loader/ResourceLoadObserver.cpp:
(WebCore::areDomainsAssociated):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::areDomainsAssociated):
(WebCore::ResourceLoadStatistics::reduceTimeResolution):
* loader/ResourceLoadStatistics.h:
- Remove ResourceLoadObserver::logFrameNavigation() now that it is on the WebResourceLoadStatisticsStore.
- Move some code from ResourceLoadObserver to ResourceLoadStatistics so that it can
  be called from the UIProcess and to avoid code duplication.

Source/WebKit:

Move frame navigation logging for ITP purposes from the WebProcess to the UIProcess.
This information was previously logged in DocumentLoader::willSendRequest() and was getting
sync'd to the UIProcess at regular intervals or when the layout tests call testRunner's
statisticsNotifyObserver(). We now do the logging directly in the UIProcess, in
WebPageProxy::decidePolicyForNavigationAction (which was getting called via IPC from
DocumentLoader::willSendRequest()).

This is more efficient and will also be needed soon due to the way process swap on navigation
deals with cross-origin redirects. On cross-origin redirect of the main frame, PSON cancels
the load and started a new load to the redirected to URL in the new WebProcess. As a result,
the new WebProcess is not aware that the load is a redirect, which is information that ITP
requires. By moving the ITP logging to the UIProcess, we still have access to this
information.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
- We now pass the full redirect response the the delegate method instead of a simple
isRedirect boolean.
- Log the navigation in the WebResourceLoadStatisticsStore for ITP purposes.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::areDomainsAssociated):
Equivalent of ResourceLoadObserver's areDomainsAssociated(). Most of the logic was moved
to ResourceLoadStatistics::areDomainsAssociated() to avoid code duplication.

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
This is called whenever a WebProcess sends new resource load statistics to the UIProcess.
Whenever this happens, we call processStatisticsAndDataRecords() right away, which is
sometimes the tests currently rely on. As a result, we can cancels any pending statistics
processing request that was scheduled by logFrameNavigation().

(WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsProcessingRequestIfNecessary):
(WebKit::WebResourceLoadStatisticsStore::cancelPendingStatisticsProcessingRequest):
Whenever a navigation is logged and statistics have been updated, we need to make sure we
schedule a "timer" to process the new data. We do this at most every 5 seconds for performance
reasons. This 5 second interval matches what the ResourceLoadObserver is using in the WebProcess
to notify the UIProcess of new data.

(WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
This code was moved from ResourceLoadObserver to WebResourceLoadStatisticsStore now that we
do this logging in the UIProcess instead of the WebProcess. One difference with WebCore is
that we use WebPageProxy::pageLoadState().url() as mainFrameURL instead of
WebPageProxy::mainFrame().url(). The reason for that is that WebPageProxy::mainFrame().url()
becomes empty in case of process swap but ITP still needs the actual main frame URL when the
navigation was triggered. WebPageProxy::pageLoadState().url() gives us this information.

* UIProcess/WebResourceLoadStatisticsStore.h:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
We now pass the full redirect response the the delegate method instead of a simple
isRedirect boolean.

Source/WebKitLegacy/mac:

Update client delegate now that parameter type has changed.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Source/WebKitLegacy/win:

Update client delegate now that parameter type has changed.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebCoreSupport/WebFrameLoaderClient.h:

LayoutTests:

Attempt to mark the test as non-flaky now that it no longer relies on sync'ing from the WebProcess
to the UIProcess.

* platform/wk2/TestExpectations:

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

14 months agoUnreviewed, add myself as a WebKit committer.
david_fenton@apple.com [Wed, 13 Jun 2018 21:54:44 +0000 (21:54 +0000)]
Unreviewed, add myself as a WebKit committer.

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

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

14 months ago[macOS Debug WK1] LayoutTest fast/parser/xml-error-adopted.xml is a flaky timeout.
ryanhaddad@apple.com [Wed, 13 Jun 2018 21:48:57 +0000 (21:48 +0000)]
[macOS Debug WK1] LayoutTest fast/parser/xml-error-adopted.xml is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=186581

Unreviewed test gardening.

Patch by David Fenton <david_fenton@apple.com> on 2018-06-13

* platform/mac-wk1/TestExpectations:

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

14 months agoWeb Inspector: open source Dark Mode
nvasilyev@apple.com [Wed, 13 Jun 2018 21:26:34 +0000 (21:26 +0000)]
Web Inspector: open source Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=186606

Reviewed by Timothy Hatcher.

The dark mode is currently only available on macOS Mojave via prefers-dark-interface CSS media query.

* UserInterface/Main.html:
* UserInterface/Views/DarkMode.css: Added.
(@media (prefers-dark-interface)):
(:root):
(body.window-inactive):
(body.window-inactive *):
(#main):
(.tree-outline.dom li.selected .selection-area):
(.tab-bar > .item > .icon):
(.go-to-arrow):
(.resource-link,):
(.expand-list-button):
(:matches(img, canvas).show-grid):
(.formatted-object,):
(.formatted-null,):
(.editing):
(.editing, .editing *):
(.text-editor > .CodeMirror .execution-line):
(.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext),):
(.details-section > .header):
(.details-section > .header > label):
(.details-section .details-section,):
(.details-section .details-section:not(.collapsed) > .header):
(.details-section > .content > .group > .row.simple > .label):
(.details-section > .content > .group:nth-child(even)):
(.details-section > .content > .group > .row:matches(.empty, .text)):
(.data-grid th):
(.data-grid td .subtitle):
(.data-grid:matches(:focus, .force-focus) tr.selected td .subtitle):
(body:not(.window-inactive, .window-docked-inactive) .data-grid:matches(:focus, .force-focus) tr.editable.selected .cell-content > input):
(.data-grid tr.editable .cell-content > input):
(.data-grid td.spanning):
(.object-tree,):
(.object-preview .name):
(.object-preview > .size):
(.tab-bar):
(.tab-bar > .item):
(.tab-bar > .item > .title):
(.tab-bar > .item:not(.disabled).selected):
(.tab-bar:not(.animating) > .item:not(.selected):hover):
(.tab-bar > .item > .close):
(body.window-inactive .tab-bar):
(body.window-inactive .tab-bar > .item):
(body.window-inactive .tab-bar > .item.selected):
(body.window-inactive .tab-bar > .item > .title):
(body .toolbar):
(body.window-inactive .toolbar):
(body.latest-mac .toolbar .item.button,):
(body.latest-mac .toolbar .search-bar > input[type="search"]):
(body.latest-mac .toolbar .search-bar > input[type="search"]:focus):
(body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder):
(body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
(body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
(body.latest-mac .toolbar .dashboard-container):
(body.latest-mac .toolbar .item.button:active):
(body.latest-mac.window-inactive .toolbar .item.button,):
(.navigation-bar .item.divider):
(.toolbar .item.button):
(.toolbar .item.button:not(.disabled):active):
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)):
(.toolbar .dashboard.default > .item > div):
(.toolbar .dashboard.default > .item.enabled > div):
(.toolbar .dashboard.default > .item.enabled:hover):
(.toolbar .dashboard.default > .item.enabled:hover > div):
(.toolbar .dashboard.default > .resourcesCount > img,):
(body.latest-mac .toolbar .dashboard .item.button):
(.dashboard-container .advance-arrow):
(.toolbar .dashboard.debugger):
(.dashboard.debugger .navigation-bar .item.button > .glyph):
(.dashboard.debugger > .location .function-name):
(.dashboard.debugger > .location .go-to-link):
(.dashboard.debugger > .divider):
(.popover .edit-breakpoint-popover-content > label.toggle):
(.popover .edit-breakpoint-popover-content > table > tr > th):
(.breakpoint-action-block-body):
(.breakpoint-action-block-body > .description):
(.breakpoint-action-append-button,):
(.popover .xhr-breakpoint-content > .editor-wrapper > .editor):
(.navigation-bar .item.button):
(.spreadsheet-style-declaration-editor .property:not(.disabled) .value):
(.spreadsheet-css-declaration):
(.spreadsheet-css-declaration .selector:focus,):
(.spreadsheet-css-declaration.locked .origin::after):
(.spreadsheet-css-declaration .origin .go-to-link,):
(.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
(.spreadsheet-style-declaration-editor .property.has-warning):
(.spreadsheet-style-declaration-editor .property.has-warning .warning):
(.spreadsheet-css-declaration .media-label):
(.quick-console):
(.syntax-highlighted,):
(.cm-s-default,):
(.CodeMirror .jump-to-symbol-highlight,):
(.console-prompt):
(.completion-suggestions):
(.completion-suggestions-container > .item):
(.CodeMirror-cursor):
(.CodeMirror .CodeMirror-gutters):
(.cm-s-default .cm-link):
(.cm-s-default .cm-m-xml.cm-attribute,):
(.cm-s-default .cm-meta):
(.cm-s-default .cm-variable-3):
(.cm-s-default .cm-builtin):
(.tree-outline .item .subtitle):
(.object-tree-property .getter,):
(.item.object-tree-property.prototype-property):
(.object-tree-property.prototype-property:hover,):
(.object-tree-property .value.error):
(.tree-outline.dom):
(.tree-outline.dom li.selected + ol.children.expanded):
(.tree-outline.dom .shadow):
(.tree-outline.dom li.parent.shadow + ol.children.expanded,):
(.showing-find-banner .tree-outline.dom .search-highlight):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:hover):
(.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label):
(.spreadsheet-css-declaration.locked):
(.spreadsheet-css-declaration .selector.style-attribute):
(.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
(.inline-swatch):
(.spreadsheet-style-panel .section-header):
(.spreadsheet-style-panel .section-header .node-link:hover):
(.computed-style-properties.details-section):
(.details-section.style-box-model:not(.collapsed) > :matches(.header, .content)):
(.table,):
(.table > .header > .sortable:active):
(.table > .header > :matches(.sort-ascending, .sort-descending)):
(.table > .header > :matches(.sort-ascending, .sort-descending)::after):
(.scope-bar > li):
(.timeline-overview > .navigation-bar.timelines):
(.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)):
(.timeline-overview.edit-instruments > .tree-outline.timelines .item:not(:first-child),):
(.time-icon .icon):
(.data-grid th:matches(.sort-ascending, .sort-descending)):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows):
(.content-view.settings .navigation-bar):
(.content-view.settings .navigation-bar .item.radio.button.text-only.selected):
(.new-tab.tab.content-view):
(.filter-bar > input[type="search"]):
(.filter-bar > input[type="search"]::placeholder):
(.filter-bar > input[type="search"]:focus):
(.content-view.resource.image):
(.console-messages):
(.console-item):
(.console-messages:focus .console-item.selected):
(.console-messages:focus .console-item.selected + .console-item):
(.console-session:first-of-type .console-session-header):
(.console-session:not(:first-of-type) .console-session-header):
(.console-messages a):
(.console-messages a:hover):
(.console-messages:focus .console-item.selected::after):
(.console-error-level):
(.console-error-level:not(.filtered-out, .filtered-out-by-search), .console-error-level:not(.filtered-out, .filtered-out-by-search) + .console-item):
(.console-warning-level):
(.console-warning-level:not(.filtered-out, .filtered-out-by-search), .console-warning-level:not(.filtered-out, .filtered-out-by-search) + .console-item):
(.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted):
(.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
(.source-code.text-editor > .CodeMirror .error):
(.source-code.text-editor > .CodeMirror .warning):
(.source-code.text-editor > .CodeMirror .issue-widget):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.warning > .arrow):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.error > .arrow):
(.console-message .syntax-highlighted):
(.console-warning-level .console-message-text):
(.console-error-level .console-message-text):
(.console-user-command > .console-message-text):
(.console-message .repeat-count):
(.call-frame .subtitle,):
(.call-frame:hover .subtitle .source-link,):
(.call-frame .separator):
(.quick-console.showing-log):
(.find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)):
(.network-resource-detail):
(.network-resource-detail .item.close > .glyph):
(.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected):
(.resource-headers .value):
(.network-table .cell.domain > .lock):
(.resource-sizes > .content .label):
(.popover.waterfall-popover):
(.resource-timing-breakdown > table > tr.header:not(.total-row) > td):
(.resource-timing-breakdown > table > tr > td.label,):
(.resource-timing-breakdown > table hr):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
(.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
(.web-socket.content-view .data-grid table.data tr.revealed):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr.outgoing):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr.non-text-frame):
(.item.action:not(.initial-state)::before):
(.tree-outline .item.action.visual:not(.selected, .invalid)):
(.item.action:not(.initial-state) > .icon):
(.tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon):
(.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon,):
(.content-view.canvas > .preview > img,):
(.content-view.canvas-overview):
(.content-view.canvas-overview .content-view.canvas):
(.content-view.canvas-overview .content-view.canvas.is-recording):
(.content-view.canvas-overview .content-view.canvas.is-recording > header):
(.content-view.canvas-overview .content-view.canvas > header > .titles > .title):
(.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,):
(.content-view.canvas-overview .content-view.canvas > footer > .recordings::before):
(.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle):
(.content-view.canvas:not(.tab)):
(.content-view:not(.tab).recording):
(.content-view:not(.tab).recording > header > .slider-container):
(.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
(.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified):
(.progress-view > .titles > .title):
(.progress-view > .titles > .subtitle):
(.indeterminate-progress-spinner):
(.content-view.shader-program > .text-editor.shader):
(.content-view.shader-program > .text-editor.shader > .type-title):
(.item.shader-program .status > img):
(.open-resource-dialog):
(.open-resource-dialog > .field > input):
(.open-resource-dialog > .field > input::placeholder):
(.open-resource-dialog > .tree-outline .item.selected):
(.open-resource-dialog > .field::before):

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

14 months agoGardening: Layout Test js/error-should-not-strong-reference-global-object.html is...
mark.lam@apple.com [Wed, 13 Jun 2018 21:21:21 +0000 (21:21 +0000)]
Gardening: Layout Test js/error-should-not-strong-reference-global-object.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=186372

Not reviewed.

Speculative fix to green the bots plus improved the error message logging to get
more info if this fails again.

* js/error-should-not-strong-reference-global-object.html:

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

14 months agoFloatingPointEnvironment is only needed for ARM CPUs.
mark.lam@apple.com [Wed, 13 Jun 2018 20:57:49 +0000 (20:57 +0000)]
FloatingPointEnvironment is only needed for ARM CPUs.
https://bugs.webkit.org/show_bug.cgi?id=186567
<rdar://problem/40929441>

Reviewed by Michael Saboff.

No new tests.  This behavior is already covered by existing tests.

* platform/ios/wak/FloatingPointEnvironment.cpp:
* platform/ios/wak/FloatingPointEnvironment.h:
(WebCore::FloatingPointEnvironment::enableDenormalSupport):
(WebCore::FloatingPointEnvironment::saveMainThreadEnvironment):
(WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment):
(WebCore::FloatingPointEnvironment::singleton):

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

14 months agoCrash during interrupted process termination
bfulgham@apple.com [Wed, 13 Jun 2018 20:47:17 +0000 (20:47 +0000)]
Crash during interrupted process termination
https://bugs.webkit.org/show_bug.cgi?id=185373
<rdar://problem/40019480>

Reviewed by Alex Christensen.

It's possible to encounter a crash if a user agent feature (such as Safari's responsiveness timer) decides
to kill a Web Process around the same time that a user decides to trigger a new page load. One of the two
termination operations may attempt to call methods on a nulled process pointer.

We can avoid this by holding our own reference to the terminating process until the termination steps have
been completed.

* UIProcess/API/C/WKPage.cpp:
(WKPageTerminate): Ref<> the active process while the termination call is performed.
* UIProcess/API/Cocoa/WKWebView.mm:
([WKWebView _killWebContentProcessAndResetState]): Ditto.

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

14 months ago[Cocoa] Web Automation: wrong modifiers sent for 'Help' virtual key
bburg@apple.com [Wed, 13 Jun 2018 20:29:08 +0000 (20:29 +0000)]
[Cocoa] Web Automation: wrong modifiers sent for 'Help' virtual key
https://bugs.webkit.org/show_bug.cgi?id=186600
<rdar://problem/41088912>

Reviewed by Timothy Hatcher.

This fixes a hang when running W3C test:

    special_keys.py::test_webdriver_special_key_sends_keydown[HELP-expected2]

* UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::eventModifierFlagsForVirtualKey):
The help modifier doesn't seem to be used when pressing the Help key.
I verified this using the Help key on the Keyboard Viewer, since no
keyboards from the past decade actually have this physical button.

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

14 months agoInput form controls have a white background in dark mode, when they should not.
timothy@apple.com [Wed, 13 Jun 2018 20:26:32 +0000 (20:26 +0000)]
Input form controls have a white background in dark mode, when they should not.

https://bugs.webkit.org/show_bug.cgi?id=186577
rdar://problem/39258325

Reviewed by Tim Horton.

Source/WebCore:

* DerivedSources.make: Allow WTF_PLATFORM_MAC ifdefs to preprocess in html.css.
* css/CSSValueKeywords.in: Added -apple-system-control-background.
* css/MediaQueryExpression.cpp:
(WebCore::featureWithValidIdent): Allow dark mode media query in user agent stylesheets.
(WebCore::isFeatureValidWithoutValue): Ditto.
* css/MediaQueryParserContext.cpp:
(WebCore::MediaQueryParserContext::MediaQueryParserContext): Transfer the CSSParserMode from CSSParserContext.
* css/MediaQueryParserContext.h:
* css/html.css: Set color and background-color to semantic colors for input, textarea, and select.
Make input background-color transparent in dark mode to match AppKit.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const): Added -apple-system-control-background.
(WebCore::RenderThemeMac::paintTextField): Adjust the drawing rect to match new artwork in macOS 10.14.

LayoutTests:

* fast/css/apple-system-control-colors-expected.txt: Updated.
* fast/css/apple-system-control-colors.html: Added -apple-system-control-background.
* platform/gtk/fast/css/apple-system-control-colors-expected.txt: Updated.

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

14 months agoAdd console logging to test case to help investigate flaky timeouts
wilander@apple.com [Wed, 13 Jun 2018 20:24:27 +0000 (20:24 +0000)]
Add console logging to test case to help investigate flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=186603
<rdar://problem/41096614>

Unreviewed test gardening.

* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
    Now has step-by-step console logging so that (hopefully) the flaky timeouts don't produce empty output.

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

14 months agoVersioning.
kocsen_chung@apple.com [Wed, 13 Jun 2018 20:01:11 +0000 (20:01 +0000)]
Versioning.

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

14 months agoTileFirstPaint strategy for async image decoding should be disabled for non root...
commit-queue@webkit.org [Wed, 13 Jun 2018 19:10:16 +0000 (19:10 +0000)]
TileFirstPaint strategy for async image decoding should be disabled for non root RenderLayers
https://bugs.webkit.org/show_bug.cgi?id=186336
<rdar://problem/40808099>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-06-13
Reviewed by Simon Fraser.

Source/WebCore:

When showing a composited RenderLayer for the first time, the images in
this layer have to be decoded synchronously to avoid unwanted flashing.

To create a layout test for this patch, FrameDecodingDurationForTesting
needs to be generalized for large and animated images. The decoding thread
now forces the decoding time to be at least equal to
FrameDecodingDurationForTesting.

Test: fast/images/async-image-composited-show.html

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImages const):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::startAsyncDecodingQueue):
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::setFrameDecodingDurationForTesting):
(WebCore::ImageSource::frameDecodingDurationForTesting const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

LayoutTests:

* fast/images/async-image-composited-show-expected.html: Added.
* fast/images/async-image-composited-show.html: Added.

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

14 months agoAutomaticThread should have a way to provide a thread name
keith_miller@apple.com [Wed, 13 Jun 2018 19:07:22 +0000 (19:07 +0000)]
AutomaticThread should have a way to provide a thread name
https://bugs.webkit.org/show_bug.cgi?id=186604

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Add names for JSC's automatic threads.

* dfg/DFGWorklist.cpp:
* heap/Heap.cpp:
* jit/JITWorklist.cpp:
* runtime/VMTraps.cpp:
* wasm/WasmWorklist.cpp:

Source/WTF:

AutomaticThread now has a virtual method to get a name, which can be
overridden to provide a custom name to the thread.

* wtf/AutomaticThread.cpp:
(WTF::AutomaticThread::start):
* wtf/AutomaticThread.h:
* wtf/WorkerPool.cpp:

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

14 months agoCFGSimplificationPhase should de-dupe jettisonedBlocks
sbarati@apple.com [Wed, 13 Jun 2018 19:04:10 +0000 (19:04 +0000)]
CFGSimplificationPhase should de-dupe jettisonedBlocks
https://bugs.webkit.org/show_bug.cgi?id=186583

Reviewed by Filip Pizlo.

When making the predecessors list unique in r232741, it revealed a bug inside
of CFG simplification, where we try to remove the same predecessor more than
once from a blocks predecessors list. We built the list of blocks to remove
from the list of successors, which is not unique, causing us to try to remove
the same predecessor more than once. The solution here is to just add to this
list of blocks to remove only if the block is not already in the list.

* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):

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

14 months agoCSS "background-color" style no longer affects natively rendered text fields
wenson_hsieh@apple.com [Wed, 13 Jun 2018 18:51:17 +0000 (18:51 +0000)]
CSS "background-color" style no longer affects natively rendered text fields
https://bugs.webkit.org/show_bug.cgi?id=186597
<rdar://problem/41050528>

Reviewed by Tim Horton.

AppKit currently does not support rendering background color to the edges of a text field cell. This means that
in WebCore, when natively rendering text inputs with background color, we need to only draw the bezels of a text
field, such that the background color we paint behind the text field will be shown. Currently, the way we
accomplish this is by intercepting an internal NSTextField method that computes drawing options for CoreUI, and
inserting a `"borders only" => true` entry.

However, in a recent build of macOS Mojave, AppKit tweaked -_coreUIDrawOptionsWithFrame:inView:includeFocus: to
add an extra argument (such that it's now -_coreUIDrawOptionsWithFrame:inView:includeFocus:maskOnly:), which
negates the above workaround. To fix this in the short term, augment the workaround to apply to the latest macOS
Mojave as well. A longer-term fix is already tracked in <rdar://problem/11385461>, which would allow WebKit to
simply specify a background color on the text field cell, and have AppKit render it properly to the edges of the
bezels.

Covered by a test that is currently failing on Mojave: fast/forms/hidpi-textfield-background-bleeding.html

* rendering/RenderThemeMac.mm:
(-[WebCoreTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]):
(-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
(-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:maskOnly:]):

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

14 months ago[JSC] Always use Nuke & Set procedure for x86
utatane.tea@gmail.com [Wed, 13 Jun 2018 18:32:56 +0000 (18:32 +0000)]
[JSC] Always use Nuke & Set procedure for x86
https://bugs.webkit.org/show_bug.cgi?id=186592

Reviewed by Keith Miller.

We always use nukeStructureAndStoreButterfly for Contiguous -> ArrayStorage conversion if the architecture is x86.
By doing so, we can concurrently load structure and butterfly at least in x86 environment even in non-collector
threads.

* runtime/JSObject.cpp:
(JSC::JSObject::convertContiguousToArrayStorage):

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

14 months ago[GTK] Mark some flaky tests and expected failures.
clopez@igalia.com [Wed, 13 Jun 2018 18:29:16 +0000 (18:29 +0000)]
[GTK] Mark some flaky tests and expected failures.

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

14 months ago[WPE] Build getUserMedia support
commit-queue@webkit.org [Wed, 13 Jun 2018 18:22:40 +0000 (18:22 +0000)]
[WPE] Build getUserMedia support
https://bugs.webkit.org/show_bug.cgi?id=186547

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-06-13
Reviewed by Alejandro G. Castro.

.:

* Source/cmake/OptionsWPE.cmake: Build MediaStream support

Source/WebCore:

Enable mediastream tests.

* PlatformWPE.cmake: Build MediaStream support.
* SourcesGTK.txt: Moved GStreamer related files to GStreamer.cmake.
* SourcesWPE.txt: Removed `platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp`
which is now in GStreamer.cmake.
* platform/GStreamer.cmake: Build more MediaStream/webrtc related files.
* platform/graphics/ImageBuffer.cpp: Handle the fact that toBGRAData is
now built directly into the Cairo backend and not GTK anymore.
* platform/graphics/cairo/ImageBufferCairo.cpp: Implement `toBGRAData`
* platform/graphics/gtk/ImageBufferGtk.cpp: Removed `toBGRAData` as it is
now implemented in the Cairo backend itself.
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: Switch an
ASSERT to RELEASE_ASSERT when adding the GhostPad to itself. This was making
test fail when built in RELEASE mode.
(WebCore::webkitMediaStreamSrcChain): Minor variable name change to make it
more accurate.
(WebCore::webkitMediaStreamSrcAddPad): Now add the ghost pad to the element
before setting its chain function, making things clearer.
(WebCore::webkitMediaStreamSrcSetupSrc): Remove extra new line.

Source/WebKit:

* SourcesWPE.txt: Compile files necessary for MediaStream/webrtc.

LayoutTests:

* platform/gtk/TestExpectations: Mark some tests as potentially passing (they fail only
when built in debug mode).
* platform/wpe/TestExpectations: Enable MediaStream tests.

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

14 months ago[GStreamer] fast/canvas/webgl crashes
philn@webkit.org [Wed, 13 Jun 2018 17:58:05 +0000 (17:58 +0000)]
[GStreamer] fast/canvas/webgl crashes
https://bugs.webkit.org/show_bug.cgi?id=186590

Reviewed by Carlos Alberto Lopez Perez.

After r232747 the sample managed by the player can be empty,
without buffer. So we need to check for this before mapping video
frames. Also use the GstVideoFrameHolder in more places to reduce
copy-paste churn.

* platform/graphics/gstreamer/ImageGStreamer.h:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
(ImageGStreamer::ImageGStreamer):
(ImageGStreamer::~ImageGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):

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

14 months ago[iOS] Synchronize PDF resizing with device rotation
aestes@apple.com [Wed, 13 Jun 2018 17:06:30 +0000 (17:06 +0000)]
[iOS] Synchronize PDF resizing with device rotation
https://bugs.webkit.org/show_bug.cgi?id=186587
<rdar://problem/40922462>

Reviewed by Darin Adler.

Both -beginPDFViewRotation and -endPDFViewRotation need to be called as part of
the transition coordinator's -animateAlongsideTransition: block to be synchronized
with rotation. Additionally, updateBlock needs to be invoked between the two calls
so that PDFKit can capture the frame geometry before and after the update.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_beginAnimatedResizeWithUpdates:]):
(-[WKPDFView web_beginAnimatedResize]): Renamed to web_beginAnimatedResizeWithUpdates:.
(-[WKPDFView web_endAnimatedResize]): Deleted.

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

14 months agoUpdate expectations for WebCryptoAPI generateKey tests
clopez@igalia.com [Wed, 13 Jun 2018 16:35:07 +0000 (16:35 +0000)]
Update expectations for WebCryptoAPI generateKey tests
https://bugs.webkit.org/show_bug.cgi?id=186591

Unreviewed test gardening.

These tests were split and moved around several times, and expectation
files for old names stuck around.

LayoutTests/imported/w3c:

This also removes the placeholder failures.worker.html and
successes.worker.html files, because the tests were removed.

Patch by Ms2ger <Ms2ger@igalia.com> on 2018-06-13

* web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker.html: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker.html: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-cbc-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-OAEP-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-KW-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_HMAC-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-OAEP-expected.txt: Removed.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5-expected.txt: Removed.

LayoutTests:

Patch by Ms2ger <Ms2ger@igalia.com> on 2018-06-13

* TestExpectations: Remove reference to long-removed test.
* platform/gtk/TestExpectations: Remove reference to long-removed test.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.any-expected.txt: Copied from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.worker-expected.txt.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.any-expected.txt: Copied from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.worker-expected.txt.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any-expected.txt: Copied from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.worker-expected.txt.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker-expected.txt.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.https-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.https-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS.https-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.https-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.https-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.https.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.any-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.worker-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.worker-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.any-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.worker-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.worker-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.worker-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.worker-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.worker-expected.txt.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.https.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.https.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.https.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.https.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.https.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS.https-expected.txt: Removed.

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

14 months agoA few layout tests are failing on Windows.
pvollan@apple.com [Wed, 13 Jun 2018 16:16:35 +0000 (16:16 +0000)]
A few layout tests are failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=186562

Unreviewed test gardening.

* platform/win/TestExpectations:

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

14 months agoUnreviewed GTK build fix for --cmakeargs=-DUSE_GSTREAMER_GL=OFF
philn@webkit.org [Wed, 13 Jun 2018 15:46:27 +0000 (15:46 +0000)]
Unreviewed GTK build fix for --cmakeargs=-DUSE_GSTREAMER_GL=OFF

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):

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

14 months ago[GStreamer] Video freezes when GStreamerGL is not installed
philn@webkit.org [Wed, 13 Jun 2018 13:39:13 +0000 (13:39 +0000)]
[GStreamer] Video freezes when GStreamerGL is not installed
https://bugs.webkit.org/show_bug.cgi?id=184925

Reviewed by Žan Doberšek.

At runtime when the GStreamer opengl plugin isn't available the
player will fallback to the internal WebKit video sink. The
VideoFrameHolder was refactored to handle both cases (opengl,
non-opengl).

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::~GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::frame const):
(WebCore::GstVideoFrameHolder::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::GstVideoFrameHolder::isValid const): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

14 months ago[JSCOnly] Add a MIPS32el JSCOnly EWS (follow-up fix)
clopez@igalia.com [Wed, 13 Jun 2018 10:50:29 +0000 (10:50 +0000)]
[JSCOnly] Add a MIPS32el JSCOnly EWS (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=186523

Unreviewed follow-up fix after r232748

* Scripts/webkitpy/common/config/ports.py:
(JscOnlyPort.build_jsc_command): It is needed to pass a --jsc-only argument to the build-jsc script.
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_jsconly_port):

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

14 months agoRemove JSVirtualMachine shrinkFootprint when clients move to shrinkFootprintWhenIdle
sbarati@apple.com [Wed, 13 Jun 2018 06:24:58 +0000 (06:24 +0000)]
Remove JSVirtualMachine shrinkFootprint when clients move to shrinkFootprintWhenIdle
https://bugs.webkit.org/show_bug.cgi?id=186071

Reviewed by Mark Lam.

* API/JSVirtualMachine.mm:
(-[JSVirtualMachine shrinkFootprint]): Deleted.
* API/JSVirtualMachinePrivate.h:

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

14 months agoComplex text handling should opt out of bounded text layout.
zalan@apple.com [Wed, 13 Jun 2018 02:59:19 +0000 (02:59 +0000)]
Complex text handling should opt out of bounded text layout.
https://bugs.webkit.org/show_bug.cgi?id=186571
<rdar://problem/41060908>

Reviewed by Tim Horton.

Source/WebCore:

Test: fast/text/complex-long-text-crash.html

* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

LayoutTests:

* fast/text/complex-long-text-crash-expected.txt: Added.
* fast/text/complex-long-text-crash.html: Added.

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

14 months agowebkitpy: Implement coredumpctl support on linux
commit-queue@webkit.org [Wed, 13 Jun 2018 01:55:20 +0000 (01:55 +0000)]
webkitpy: Implement coredumpctl support on linux
https://bugs.webkit.org/show_bug.cgi?id=184039

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-06-12
Reviewed by Daniel Bates.

And start using an Executive to run subprocesses
in GDBCrashLogGenerator.

Unit tests adapted to the new API and still passing.

* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator):
(GDBCrashLogGenerator._get_trace_from_systemd):
(GDBCrashLogGenerator.generate_crash_log):

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

14 months agoUnreviewed, rolling out r232774.
ryanhaddad@apple.com [Wed, 13 Jun 2018 00:37:48 +0000 (00:37 +0000)]
Unreviewed, rolling out r232774.

Breaks internal builds.

Reverted changeset:

"Complex text handling should opt out of bounded text layout."
https://bugs.webkit.org/show_bug.cgi?id=186571
https://trac.webkit.org/changeset/232774

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

14 months agoImport the 2.0.0 version of Khronos WebGL conformance suite
achristensen@apple.com [Wed, 13 Jun 2018 00:27:15 +0000 (00:27 +0000)]
Import the 2.0.0 version of Khronos WebGL conformance suite
https://bugs.webkit.org/show_bug.cgi?id=181293
<rdar://problem/40654103>

Patch by Justin Fan <justin_fan@apple.com> on 2018-06-07
Reviewed by Dean Jackson.

Original description and patch by Zan Dobersek <zdobersek@igalia.com>.
Retrying patch with up-to-date revision of conformance suite:

"Import the 2.0.0 version of the WebGL conformance suite that's
maintained under the Khronos organization on GitHub:
https://github.com/KhronosGroup/WebGL.git

The following revision of this repository has been used for importing:
8ea92581353d18f50d25159489897ae634eb23b1

For importing purposes, the generate-webgl-tests.py script is modified
to import tests at version 2.0.0 or below. 2.0 is now used as the
default version for importing purposes. Additionally, the
GreaterThanOrEqualToVersion function is fixed to correctly compare 2.x
versions against 1.x.

The following generate-webgl-tests.py invocation was used:
$ python generate-webgl-tests.py -e -w ~/WebGL/conformance-suites/2.0.0

The 2.0.0 version of the conformance suite is composed of three parts:
- tests under conformance/ cover WebGL1 functionality,
- tests under conformance2/ cover WebGL2 functionality,
- tests under deqp/ are a port of the dEQP suite.
webkit-webgl-test-harness.js file is added under webgl/2.0.0/resources/
to properly integrate the imported tests with the WebKit testing
facilities.

The complete suite is for now skipped on all platforms. WebGL1 tests
should be passing in majority, with failures in that part of the suite
mirroring the ones experienced in the current 1.0.2 and 1.0.3 suites.
The WebGL2 support is still incomplete, and the conformance2/ pass rate
will reflect that. dEQP in majority utilizes WebGL2, so the pass rate
is similarly poor.

List of imported conformance suite files is omitted for brevity."

* TestExpectations: Skip the WebGL 1 (conformance) and WebGL 2 (conformance2) tests
* webgl/2.0.0/conformance: Added.
* webgl/2.0.0/conformance2: Added.
* webgl/2.0.0/deqp: Added.
* webgl/2.0.0/resources: Added.
* webgl/2.0.0/resources/webkit-webgl-test-harness.js:
(window.layoutTestController.window.console.log):
(window.layoutTestController.window.console.error):
(log):
(window.webglTestHarness.reportResults):
(window.webglTestHarness.notifyFinished):
* webgl/generate-webgl-tests.py:
(GreaterThanOrEqualToVersion):
* webgl/resources/js-test-pre.js:
(window.console.log):
(window.console.error):
(initNonKhronosFramework):
(this.initTestingHarness):
(nonKhronosFrameworkNotifyDone):
(reportTestResultsToHarness):
(notifyFinishedToHarness):
(_logToConsole):
(enableJSTestPreVerboseLogging):
(description):
(_addSpan):
(debug):
(escapeHTML):
(testPassed):
(testFailed):
(areArraysEqual):
(isMinusZero):
(isResultCorrect):
(stringify):
(evalAndLog):
(shouldBe):
(shouldNotBe):
(shouldBeTrue):
(shouldBeFalse):
(shouldBeNaN):
(shouldBeNull):
(shouldBeEqualToString):
(shouldEvaluateTo):
(shouldBeNonZero):
(shouldBeNonNull):
(shouldBeUndefined):
(shouldBeDefined):
(shouldBeGreaterThanOrEqual):
(expectTrue):
(shouldThrow):
(assertMsg):
(gc.gcRec):
(gc):
(finishTest):
* webgl/resources/webgl-test-harness.js:
(log):
(try.request.onreadystatechange):
(loadTextFileAsynchronous):
(getMajorVersion):
(getURLWithOptions):
(greaterThanOrEqualToVersion):
(copyObject):
(toCamelCase):
(getFileListImpl):
(getFileList):
(FilterURL):
(TestFile):
(Test):
(TestHarness):
(TestHarness.prototype.addFiles_):
(TestHarness.prototype.runTests):
(TestHarness.prototype.setTimeout):
(TestHarness.prototype.clearTimeout):
(TestHarness.prototype.startNextTest):
(TestHarness.prototype.startTest):
(TestHarness.prototype.getTest):
(TestHarness.prototype.reportResults):
(TestHarness.prototype.dequeTest):
(TestHarness.prototype.notifyFinished):
(TestHarness.prototype.timeout):
(TestHarness.prototype.setTimeoutDelay):
(WebGLTestHarnessModule):

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

14 months agoUnreviewed, rebaseline RSA-PSS tests for High Sierra.
ryanhaddad@apple.com [Tue, 12 Jun 2018 23:30:54 +0000 (23:30 +0000)]
Unreviewed, rebaseline RSA-PSS tests for High Sierra.

* platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any-expected.txt: Add missing whitespace.
* platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.worker-expected.txt: Ditto.

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

14 months agoUnreviewed followup for r232736
said@apple.com [Tue, 12 Jun 2018 22:28:25 +0000 (22:28 +0000)]
Unreviewed followup for r232736
https://bugs.webkit.org/show_bug.cgi?id=185698

Consider the case when the SVG animation starts before requestAnimationFrame()
is called. Store the value of animItem and compare it later with the value
of animItem after detaching it from the animated animList.

* svg/dom/animated-tearoff-list-remove-target.html:

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

14 months agoiOS WK1: Occasional crash in FrameView::setScrollPosition
rniwa@webkit.org [Tue, 12 Jun 2018 21:50:14 +0000 (21:50 +0000)]
iOS WK1: Occasional crash in FrameView::setScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=186575

Reviewed by David Kilzer.

The bug was caused by ScrollView::platformSetScrollPosition releasing the web thread lock
and DumpRenderTree requesting a new page load thereby destroying FrameView.

Fixed the crash by keeping FrameView alive while scrollToFocusedElementTimerFired is getting called.

No new tests since the bug is caught by existing layout tests under guard malloc.

* page/FrameView.cpp:
(WebCore::FrameView::scrollToFocusedElementTimerFired):

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

14 months agoMark inspector/console/webcore-logging.html as flaky on mac-wk2 debug.
ryanhaddad@apple.com [Tue, 12 Jun 2018 21:45:53 +0000 (21:45 +0000)]
Mark inspector/console/webcore-logging.html as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=186425

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

14 months agoMark media/video-buffering-allowed.html as flaky.
ryanhaddad@apple.com [Tue, 12 Jun 2018 21:37:37 +0000 (21:37 +0000)]
Mark media/video-buffering-allowed.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=186574

Unreviewed test gardening.

* TestExpectations:

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

14 months agotest262/Runner.pm: fix one test (can't find jsc)
commit-queue@webkit.org [Tue, 12 Jun 2018 21:37:08 +0000 (21:37 +0000)]
test262/Runner.pm: fix one test (can't find jsc)
https://bugs.webkit.org/show_bug.cgi?id=186573

Patch by Valerie R Young <valerie@bocoup.com> on 2018-06-12
Reviewed by Michael Saboff.

* Scripts/webkitperl/test262_unittest/test262-runner-tests.pl:
fix subtest to use mock JSC

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

14 months agoComplex text handling should opt out of bounded text layout.
zalan@apple.com [Tue, 12 Jun 2018 21:14:04 +0000 (21:14 +0000)]
Complex text handling should opt out of bounded text layout.
https://bugs.webkit.org/show_bug.cgi?id=186571
<rdar://problem/40801429>

Reviewed by Tim Horton.

Source/WebCore:

Test: fast/text/complex-long-text-crash.html

* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

LayoutTests:

* fast/text/complex-long-text-crash-expected.txt: Added.
* fast/text/complex-long-text-crash.html: Added.

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

14 months agoUnreviewed, fix the Windows build after r232757
wenson_hsieh@apple.com [Tue, 12 Jun 2018 21:09:02 +0000 (21:09 +0000)]
Unreviewed, fix the Windows build after r232757

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):

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

14 months agoRebaseline WebCrypto API tests for High Sierra after r232641.
commit-queue@webkit.org [Tue, 12 Jun 2018 20:50:55 +0000 (20:50 +0000)]
Rebaseline WebCrypto API tests for High Sierra after r232641.
https://bugs.webkit.org/show_bug.cgi?id=186565

Unreviewed test gardening.

Patch by David Fenton <david_fenton@apple.com> on 2018-06-12

* platform/mac-sierra/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any-expected.txt: Added.
* platform/mac-sierra/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.worker-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.worker-expected.txt: Added.

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

14 months agoTurn CSS Spring Animations and Link Preload off by default for production builds.
bfulgham@apple.com [Tue, 12 Jun 2018 20:15:30 +0000 (20:15 +0000)]
Turn CSS Spring Animations and Link Preload off by default for production builds.
https://bugs.webkit.org/show_bug.cgi?id=186548
<rdar://problem/41023774>

Reviewed by Eric Carlson.

* Shared/WebPreferences.yaml: Switch these features from 'on' to
DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.

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

14 months ago[WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 2)
wenson_hsieh@apple.com [Tue, 12 Jun 2018 20:07:23 +0000 (20:07 +0000)]
[WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=186442
<rdar://problem/40879364>

Reviewed by Tim Horton.

Source/WebKit:

Upstream most of the work around form controls on watchOS. Also, rename WKFormControlListViewController.* to
its intended name, WKQuickboardListViewController.*.

* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/ios/forms/WKDatePickerViewController.h:
* UIProcess/ios/forms/WKDatePickerViewController.mm:
(datePickerSetButtonHeight):
(datePickerVerticalMargin):
(-[WKDatePickerWheelLabel initWithFrame:]):
(-[WKDatePickerWheelLabel lastSelectedDate]):
(-[WKDatePickerWheelLabel setLastSelectedDate:]):
(-[WKDatePickerWheelLabel needsUpdateForIndex:selectedDate:]):
(-[WKDatePickerWheel initWithStyle:]):
(-[WKDatePickerWheel initWithController:style:]):
(-[WKDatePickerWheel gestureRecognized:]):
(-[WKDatePickerWheel setDrawsFocusOutline:]):
(-[WKDatePickerWheel drawsFocusOutline]):
(-[WKDatePickerWheel gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKDatePickerViewController initWithDelegate:]):
(-[WKDatePickerViewController viewDidLoad]):
(-[WKDatePickerViewController prefersStatusBarHidden]):
(-[WKDatePickerViewController viewWillAppear:]):
(-[WKDatePickerViewController viewDidAppear:]):
(-[WKDatePickerViewController viewDidDisappear:]):
(-[WKDatePickerViewController _handleStatusBarNavigation]):
(-[WKDatePickerViewController viewWillLayoutSubviews]):
(-[WKDatePickerViewController becomeFirstResponder]):
(-[WKDatePickerViewController defaultMinimumDate]):
(-[WKDatePickerViewController defaultMaximumDate]):
(-[WKDatePickerViewController _valueForInput]):
(-[WKDatePickerViewController _dateFromInitialText]):
(-[WKDatePickerViewController _setButtonPressed]):
(-[WKDatePickerViewController _updateSelectedPickerViewIndices]):
(-[WKDatePickerViewController _configurePickerView:]):
(-[WKDatePickerViewController setMinimumDate:]):
(-[WKDatePickerViewController minimumDate]):
(-[WKDatePickerViewController setMaximumDate:]):
(-[WKDatePickerViewController maximumDate]):
(-[WKDatePickerViewController setDate:]):
(-[WKDatePickerViewController setDateFromComponents:]):
(-[WKDatePickerViewController setDay:month:year:era:]):
(-[WKDatePickerViewController date]):
(-[WKDatePickerViewController _dateComponentForDay:month:year:era:]):
(-[WKDatePickerViewController _adjustDateToValidDateIfNecessary]):
(-[WKDatePickerViewController _createAndConfigureGranularityLabelWithText:]):
(-[WKDatePickerViewController _canonicalizeAndUpdateSelectedDate]):
(-[WKDatePickerViewController numberOfItemsInPickerView:]):
(-[WKDatePickerViewController pickerView:viewForItemAtIndex:]):
(-[WKDatePickerViewController didBeginInteractingWithDatePicker:]):
(-[WKDatePickerViewController pickerView:didSelectItemAtIndex:]):
(-[WKDatePickerViewController pickerViewWillBeginSelection:]):
(-[WKDatePickerViewController pickerViewDidEndSelection:]):
(-[WKDatePickerViewController _dayFromIndex:]):
(-[WKDatePickerViewController _eraAndYearFromIndex:]):
(-[WKDatePickerViewController _monthFromIndex:]):
(-[WKDatePickerViewController _indexFromDay:]):
(-[WKDatePickerViewController _indexFromYear:era:]):
(-[WKDatePickerViewController _indexFromMonth:]):
* UIProcess/ios/forms/WKFormControlListViewController.h: Removed.
* UIProcess/ios/forms/WKFormControlListViewController.mm: Removed.
* UIProcess/ios/forms/WKNumberPadViewController.h:
* UIProcess/ios/forms/WKNumberPadViewController.mm:
(inputLabelFontSize):
(-[WKNumberPadViewController initWithDelegate:initialText:inputMode:]):
(-[WKNumberPadViewController dealloc]):
(-[WKNumberPadViewController viewDidLoad]):
(-[WKNumberPadViewController viewWillDisappear:]):
(-[WKNumberPadViewController viewWillLayoutSubviews]):
(-[WKNumberPadViewController _reloadHeaderViewFromInputText]):
(-[WKNumberPadViewController didSelectKey:]):
(-[WKNumberPadViewController _handleKeyPress:]):
(-[WKNumberPadViewController _cancelInput]):
(-[WKNumberPadViewController _deleteLastInputCharacter]):
(-[WKNumberPadViewController _deleteButtonPressed]):
(-[WKNumberPadViewController _cancelDeletionTimers]):
(-[WKNumberPadViewController _startDeletionTimer]):
(-[WKNumberPadViewController _deletionTimerFired]):
(-[WKNumberPadViewController addContentViewAnimations:]):
* UIProcess/ios/forms/WKQuickboardListViewController.h: Added.
* UIProcess/ios/forms/WKQuickboardListViewController.mm: Added.
(-[WKQuickboardListItemCell topToLabelBaselineSpecValue]):
(-[WKQuickboardListItemCell baselineToBottomSpecValue]):
(-[WKQuickboardListViewController initWithDelegate:]):
(-[WKQuickboardListViewController updateContextViewIfNeeded]):
(-[WKQuickboardListViewController prefersStatusBarHidden]):
(-[WKQuickboardListViewController viewDidLoad]):
(-[WKQuickboardListViewController viewWillAppear:]):
(-[WKQuickboardListViewController viewDidDisappear:]):
(-[WKQuickboardListViewController _handleStatusBarNavigation]):
(-[WKQuickboardListViewController reloadContextView]):
(-[WKQuickboardListViewController actionController]):
(-[WKQuickboardListViewController languageControllerDidChangePrimaryLanguage:]):
(-[WKQuickboardListViewController headerContentViewHeight]):
(-[WKQuickboardListViewController headerContentView]):
(configureStatusBarForController):
* UIProcess/ios/forms/WKSelectMenuListViewController.h:
* UIProcess/ios/forms/WKSelectMenuListViewController.mm:
(-[WKSelectMenuItemCell initWithStyle:reuseIdentifier:]):
(-[WKSelectMenuItemCell imageView]):
(-[WKSelectMenuListViewController initWithDelegate:]):
(-[WKSelectMenuListViewController viewDidLoad]):
(-[WKSelectMenuListViewController acceptButtonTappedWithCompletion:]):
(-[WKSelectMenuListViewController shouldShowTrayView]):
(-[WKSelectMenuListViewController didSelectListItem:]):
(-[WKSelectMenuListViewController numberOfListItems]):
(-[WKSelectMenuListViewController heightForListItem:width:]):
(-[WKSelectMenuListViewController cellForListItem:]):
(-[WKSelectMenuListViewController selectItemAtIndex:]):
* UIProcess/ios/forms/WKTimePickerViewController.h:
* UIProcess/ios/forms/WKTimePickerViewController.mm:
(-[WKTimePickerViewController initWithDelegate:]):
(-[WKTimePickerViewController dateFormatter]):
(-[WKTimePickerViewController timeValueForFormControls]):
(-[WKTimePickerViewController dateComponentsFromInitialValue]):
(-[WKTimePickerViewController viewDidAppear:]):
(-[WKTimePickerViewController viewDidLoad]):
(-[WKTimePickerViewController becomeFirstResponder]):
(-[WKTimePickerViewController setHour:minute:]):
(-[WKTimePickerViewController leftButtonWOTAction]):
(-[WKTimePickerViewController rightButtonWOTAction]):
* WebKit.xcodeproj/project.pbxproj:

LayoutTests:

Upstream a couple of internal test expectations on watchOS.

* fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt: Added.
* fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt: Added.

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

14 months agoMake Modern EME An Experimental Feature Again
jer.noble@apple.com [Tue, 12 Jun 2018 19:28:30 +0000 (19:28 +0000)]
Make Modern EME An Experimental Feature Again
https://bugs.webkit.org/show_bug.cgi?id=186569
<rdar://problem/41054402>

Reviewed by Eric Carlson.

* Shared/WebPreferences.yaml:

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

14 months ago[watchOS] Enable NetworkActivityTracker
aestes@apple.com [Tue, 12 Jun 2018 18:54:36 +0000 (18:54 +0000)]
[watchOS] Enable NetworkActivityTracker
https://bugs.webkit.org/show_bug.cgi?id=186568
<rdar://problem/41050624>

Reviewed by Tim Horton.

* NetworkProcess/NetworkActivityTracker.h:

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

14 months agoAdd a API test for r232601
timothy_horton@apple.com [Tue, 12 Jun 2018 18:53:30 +0000 (18:53 +0000)]
Add a API test for r232601
https://bugs.webkit.org/show_bug.cgi?id=186417

Reviewed by Wenson Hsieh.

* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(immediateSubviewOfClass):
(TEST):
Ensure that we put the view hierarchy back together (move WKContentView
out of the animated resize view) and unhide WKContentView after a
resize-with-hidden-content.

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

14 months agoAdd performance logging for slow cache retrieves
antti@apple.com [Tue, 12 Jun 2018 17:53:02 +0000 (17:53 +0000)]
Add performance logging for slow cache retrieves
https://bugs.webkit.org/show_bug.cgi?id=186520
<rdar://problem/41002070>

Reviewed by Chris Dumez.

We sometimes see slow cache retrieves in logs. Add some more logging to better analyze these cases.

This patch adds timings to all cache storage retrieve operations and passes them up to the client.
We then log the timings on NetworkResourceLoader levels if needed. Items logged include

- total retrieve time
- dispatch delay and number of resources dispatched before this one
- record I/O time
- blob I/O time
- whether cache shrink was in progress
- whether cache synchronization was in progress
- cancellation

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::logSlowCacheRetrieveIfNeeded):

Log if the retrieve took more than 1s.

* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::readRecord):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::completeRetrieve):
(WebKit::NetworkCache::Cache::retrieveData):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):

SpeculativeLoadManager does not records specific timings yet but at least we do log when they occur.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::ReadOperation::cancel):
(WebKit::NetworkCache::Storage::ReadOperation::finish):

Record timing info in ReadOperations.

(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::retrieveFromMemory):
(WebKit::NetworkCache::Storage::retrieve):
* NetworkProcess/cache/NetworkCacheStorage.h:

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

14 months agoREGRESSION(r228724): Occasional crash when executing ReplaceSelectionCommand at the...
wenson_hsieh@apple.com [Tue, 12 Jun 2018 17:25:33 +0000 (17:25 +0000)]
REGRESSION(r228724): Occasional crash when executing ReplaceSelectionCommand at the end of the document
https://bugs.webkit.org/show_bug.cgi?id=186555
<rdar://problem/39703004>

Reviewed by Ryosuke Niwa.

Source/WebCore:

r228724 removed a null check for m_lastNodeInserted in InsertedNodes::pastLastLeaf(). This null check was
guarding against the case where m_firstNodeInserted might exist, but m_lastNodeInserted is null, which may
happen when inserting content at the end of the document, since InsertedNodes::willRemoveNodePreservingChildren
may cause m_lastNodeInserted to be null. This is because the removed node may be at the very end of the document
_and also_ not have any children, which means that both `node->lastChild()` as well as
`NodeTraversal::nextSkippingChildren(*node)` will be null.

After getting into this state, we subsequently crash when attempting to compute InsertedNodes::pastLastLeaf().
To fix this, avoid accidentally clearing out m_lastNodeInserted; if the last inserted node has neither a child
nor a next node, seek backwards to the previous node in the DOM instead, and clamp to the first inserted node,
such that the last inserted node's document position is at or after the first inserted node's position.

Test: editing/execCommand/insert-apple-style-span-at-document-end.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):

LayoutTests:

Add a new layout test demonstrating the crash. The test passes if the right text is inserted into the DOM, and
we don't hit a crash.

* editing/execCommand/insert-apple-style-span-at-document-end-expected.txt: Added.
* editing/execCommand/insert-apple-style-span-at-document-end.html: Added.

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

14 months agotest262/Runner.pm: add unit tests
commit-queue@webkit.org [Tue, 12 Jun 2018 17:22:39 +0000 (17:22 +0000)]
test262/Runner.pm: add unit tests
https://bugs.webkit.org/show_bug.cgi?id=185783

Patch by Valerie R Young <valerie@bocoup.com> on 2018-06-12
Reviewed by Michael Saboff.

* Scripts/webkitperl/test262_unittest/README: Added.
* Scripts/webkitperl/test262_unittest/fixtures/expectations-compare.yaml: Added.
* Scripts/webkitperl/test262_unittest/fixtures/expectations.yaml: Added.
* Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-fail-new-error.pl: Added.
* Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-fail.pl: Added.
* Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-pass.pl: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing-with-new-error.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-passing.js: Added.
(f):
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-pass-now-failing.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/fail.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/pass.js: Added.
(f):
* Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: Added.

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

14 months agotest262/Runner.pm: minor updates
commit-queue@webkit.org [Tue, 12 Jun 2018 17:16:50 +0000 (17:16 +0000)]
test262/Runner.pm: minor updates
https://bugs.webkit.org/show_bug.cgi?id=186399

- If harness files cannot be found in a CLI supplied
test262 path, then default to webkit's test262 harness files.
- Lazily create the test262-results directory (only right before
writing to it)
       - If an expectation file is supplied via the CLI, save to the
supplied location instead of the default webkit location
(JSTest/test262/expectation.yaml).

Patch by Valerie R Young <valerie@bocoup.com> on 2018-06-12
Reviewed by Michael Saboff.

* Scripts/test262/Runner.pm:
(processCLI):
(main):
(compileTest):
(processResult):
(getHarness):
(summarizeResults):

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

14 months agoHash deviceId and groupId of MediaTrackCapabilities.
commit-queue@webkit.org [Tue, 12 Jun 2018 15:28:14 +0000 (15:28 +0000)]
Hash deviceId and groupId of MediaTrackCapabilities.
https://bugs.webkit.org/show_bug.cgi?id=186471

Patch by Jianjun Zhu <jianjun.zhu@intel.com> on 2018-06-12
Reviewed by Eric Carlson.

This change makes the identifier for the source of the MediaStreamTrack
has the same value returned by enumerateDevices(). It also prevents real
device ID being leaked.

Source/WebCore:

(WebCore::MediaStreamTrack::getCapabilities const):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:

LayoutTests:

* fast/mediastream/MediaStreamTrack-getCapabilities.html:

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

14 months agoUnreviewed WPE build fix after r232749.
philn@webkit.org [Tue, 12 Jun 2018 15:20:10 +0000 (15:20 +0000)]
Unreviewed WPE build fix after r232749.

* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:

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

14 months ago[LFC] Add vertical margin computation for inflow non-replaced box and for the (10...
zalan@apple.com [Tue, 12 Jun 2018 14:42:01 +0000 (14:42 +0000)]
[LFC] Add vertical margin computation for inflow non-replaced box and for the (10.6.6) complicated cases.
https://bugs.webkit.org/show_bug.cgi?id=186469

Reviewed by Antti Koivisto.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

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

14 months agoA few layout tests are failing on Windows.
pvollan@apple.com [Tue, 12 Jun 2018 14:23:11 +0000 (14:23 +0000)]
A few layout tests are failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=186562

Unreviewed test gardening.

* platform/win/TestExpectations:

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

14 months agoUpdate test262 for Array#sort
utatane.tea@gmail.com [Tue, 12 Jun 2018 12:09:55 +0000 (12:09 +0000)]
Update test262 for Array#sort
https://bugs.webkit.org/show_bug.cgi?id=186458

* test262/expectations.yaml:

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

14 months ago[GStreamer] Bump required version to 1.8.3
philn@webkit.org [Tue, 12 Jun 2018 12:07:16 +0000 (12:07 +0000)]
[GStreamer] Bump required version to 1.8.3
https://bugs.webkit.org/show_bug.cgi?id=186558

Reviewed by Xabier Rodriguez-Calvar.

.:

* Source/cmake/GStreamerChecks.cmake: Bump to 1.8.3 which is the
version shipped in the current Ubuntu LTS we support (16.04).

Source/WebCore:

* platform/GStreamer.cmake: Remove useless file.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcChangeState): Remove useless version check.
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp:
Removed. createDecryptor() is dead code since the decryptors moved
to the MSE playback pipeline.
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
(WebCore::GStreamerEMEUtilities::keySystemToUuid):

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

14 months ago[JSCOnly] Add a MIPS32el JSCOnly EWS
clopez@igalia.com [Tue, 12 Jun 2018 11:40:17 +0000 (11:40 +0000)]
[JSCOnly] Add a MIPS32el JSCOnly EWS
https://bugs.webkit.org/show_bug.cgi?id=186523

Reviewed by Michael Catanzaro.

Add a new jsc-mips-ews queue that will execute build-jsc for the jsc-only (Linux) port.
The worker(s) on this queue should be pre-configured to cross-build JSC for MIPS32el.

* QueueStatusServer/config/queues.py:
* QueueStatusServer/model/queues.py:
(Queue.display_name):
* Scripts/webkitpy/common/config/ews.json:
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(WpePort.run_webkit_tests_command):
(JscOnlyPort):
(JscOnlyPort.build_jsc_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_wincairo_port):
(DeprecatedPortTest):
(DeprecatedPortTest.test_jsconly_port):
* Scripts/webkitpy/port/factory.py:
(PortFactory):
* Scripts/webkitpy/port/jsc_only.py: Added. Add a basic port definition. Required by the EWS tooling.
(JscOnlyPort):
(JscOnlyPort.__init__):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(test_ews_name):

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

14 months ago[GStreamer] flush video sample upon DRAIN query
philn@webkit.org [Tue, 12 Jun 2018 09:43:04 +0000 (09:43 +0000)]
[GStreamer] flush video sample upon DRAIN query
https://bugs.webkit.org/show_bug.cgi?id=186481

Patch by Philippe Normand <philn@igalia.com> on 2018-06-11
Reviewed by Xabier Rodriguez-Calvar.

Use the appsink sink pad pad probe for both event and drain query
management. This patch is partially based on
https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/d3a336523d123119fe1dd53da5d9006c92cf078c
by Enrique Ocaña González <eocanha@igalia.com>.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):

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

14 months agoAdd run-web-platform-tests script
zandobersek@gmail.com [Tue, 12 Jun 2018 07:55:42 +0000 (07:55 +0000)]
Add run-web-platform-tests script
https://bugs.webkit.org/show_bug.cgi?id=183356

Reviewed by Carlos Alberto Lopez Perez.

.:

Store port-specific test expectations and test manifest files for the
web-platform-tests test runs under the top-level WebPlatformTests
directory.

TestExpectations.json file lists all the failing or disabled tests
or subtests that are to be expected in the test run. This information is
parsed in the run-web-platform-tests script and used to build
test-specific metadata files (ending with .ini) inside a temporary
directory that is then used during the test run. JSON format is used to
follow the WebDriver test suite in how it manages expectations, and to
avoid having to manually manage .ini files for every deviant test case.

TestManifest.ini file is used to fine-tune which tests are to be enabled
by default. For the GTK+ port, we currently disable all tests by default
but then specifically enable tests under the 2dcontext and WebCryptoAPI
directories. This will allow for gradual enabling of further tests.

* WebPlatformTests/gtk/TestExpectations.json: Added.
* WebPlatformTests/gtk/TestManifest.ini: Added.

Tools:

Add the run-web-platform-tests script that allows running WebKit builds
against the external web-platform-tests project.

The script sets up all the port-specific information, including the
display driver. If no web-platform-tests repository location is
specified, the TestDownloader utility is used to clone the repository,
and path to that clone is leveraged instead.

Port-specific TestManifest.ini and TestExpectations.json file paths are
then constructed, bailing if any of the files is missing. The JSON file
is then used to construct the metadata file tree, creating an .ini file
for each test that is disabled, has a certain expectation, or has
subtests that themselves have certain expectations. This metadata tree
is built under the build directory, and is purged and reconstructed for
each separate run.

Lastly, the WPT python module is imported from the web-platform-tests
source location, and wpt.main() is invoked along with all the necessary
arguments that set up a web-platform-tests suite run using the WebKit
product.

* Scripts/run-web-platform-tests: Added.
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort.run_bindings_tests_command):
(MockPort):
(MockPort.wpt_metadata_directory):
(MockPort.wpt_manifest_file):
* Scripts/webkitpy/port/base.py:
(Port.wpt_metadata_directory):
(Port):
(Port.wpt_manifest_file):
* Scripts/webkitpy/w3c/common.py:
(is_file_exportable):
(WPTPaths):
(WPTPaths.checkout_directory):
(WPTPaths.wpt_checkout_path):
* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader.clone_tests):
(TestDownloader):
(TestDownloader.download_tests):
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.__init__):
* Scripts/webkitpy/w3c/wpt_runner.py: Added.
(main):
(parse_args):
(create_webdriver):
(spawn_wpt):
(WPTRunner):
(WPTRunner.__init__):
(WPTRunner._prepare_wpt_checkout):
(WPTRunner._generate_metadata_directory):
(WPTRunner.run):
* Scripts/webkitpy/w3c/wpt_runner_unittest.py: Added.
(WPTRunnerTest):
(WPTRunnerTest.MockTestDownloader):
(WPTRunnerTest.MockTestDownloader.default_options):
(WPTRunnerTest.MockTestDownloader.__init__):
(WPTRunnerTest.MockTestDownloader.clone_tests):
(WPTRunnerTest.MockWebDriver):
(WPTRunnerTest.MockWebDriver.create):
(WPTRunnerTest.MockWebDriver.binary_path):
(WPTRunnerTest.MockWebDriver.browser_path):
(WPTRunnerTest.MockWebDriver.browser_args):
(WPTRunnerTest.MockSpawnWPT):
(WPTRunnerTest.MockSpawnWPT.__init__):
(WPTRunnerTest.MockSpawnWPT.__call__):
(WPTRunnerTest.TestInstance):
(WPTRunnerTest.TestInstance.__init__):
(WPTRunnerTest.TestInstance.prepare_mock_files_for_run):
(WPTRunnerTest.test_prepare_wpt_checkout):
(WPTRunnerTest.test_prepare_wpt_checkout_specified_path):
(WPTRunnerTest.test_generate_metadata_directory):
(WPTRunnerTest.test_run):
(WPTRunnerTest.test_run_with_specified_options):
(WPTRunnerTest.test_run_with_args):

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

14 months agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.21.4 release.
carlosgc@webkit.org [Tue, 12 Jun 2018 06:58:58 +0000 (06:58 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.4 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

* gtk/NEWS: Add release notes for 2.21.4.

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

14 months ago[LFC] Replace HorizontalGeometry::width and margin with WidthAndMargin (Vertical...
zalan@apple.com [Tue, 12 Jun 2018 05:40:51 +0000 (05:40 +0000)]
[LFC] Replace HorizontalGeometry::width and margin with WidthAndMargin (Vertical too)
https://bugs.webkit.org/show_bug.cgi?id=186556

Reviewed by Sam Weinig.

HorizontalGeometry::width and margin -> WidthAndMargin
VerticalGeometry::height and margin -> HeightAndMargin

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):

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

14 months agoReduce graph size by replacing terminal nodes in blocks that have a ForceOSRExit...
sbarati@apple.com [Tue, 12 Jun 2018 05:05:49 +0000 (05:05 +0000)]
Reduce graph size by replacing terminal nodes in blocks that have a ForceOSRExit with Unreachable
https://bugs.webkit.org/show_bug.cgi?id=181409
<rdar://problem/36383749>

Reviewed by Keith Miller.

This patch is me redoing r226655. This is a patch I wrote when
profiling Speedometer. Fil rolled this change out in r230928. He
showed this slowed down a sunspider tests by ~2x. This sunspider
regression revealed a real performance bug in the original change:
we would kill blocks that reached OSR entry targets, sometimes leading
us to not do OSR entry into the DFG, since we could end up deleting
entire loops from the CFG. The reason for this is that code that has run
~once and that reaches loops often has ForceOSRExits inside of it. The
solution to this is to not perform this optimization on blocks that can
reach OSR entry targets.

The reason I'm redoing this patch is that it turns out Fil rolling
out the change was a Speedometer 2 regression.

This is a modified version of the original ChangeLog I wrote in r226655:

When I was looking at profiler data for Speedometer, I noticed that one of
the hottest functions in Speedometer is around 1100 bytecode operations long.
Only about 100 of those bytecode ops ever execute. However, we ended up
spending a lot of time compiling basic blocks that never executed. We often
plant ForceOSRExit nodes when we parse bytecodes that have a null value profile.
This is the case when such a node never executes.

This patch makes it so that anytime a block has a ForceOSRExit, and that block
can not reach an OSR entry target, we replace its terminal node with an Unreachable
node, and remove all nodes after the ForceOSRExit. This cuts down the graph
size since it removes control flow edges from the CFG. This allows us to get
rid of huge chunks of the CFG in certain programs. When doing this transformation,
we also insert Flushes/PhantomLocals to ensure we can recover values that are bytecode
live-in to the ForceOSRExit.

Using ForceOSRExit as the signal for this is a bit of a hack. It definitely
does not get rid of all the CFG that it could. If we decide it's worth
it, we could use additional inputs into this mechanism. For example, we could
profile if a basic block ever executes inside the LLInt/Baseline, and
remove parts of the CFG based on that.

When running Speedometer with the concurrent JIT turned off, this patch
improves DFG/FTL compile times by around 5%.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::blocksInPostOrder):

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

14 months agoThe NaturalLoops algorithm only works when the list of blocks in a loop is de-duplicated
sbarati@apple.com [Tue, 12 Jun 2018 05:05:09 +0000 (05:05 +0000)]
The NaturalLoops algorithm only works when the list of blocks in a loop is de-duplicated
https://bugs.webkit.org/show_bug.cgi?id=184829

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch codifies that a BasicBlock's list of predecessors is de-duplicated.
In B3/Air, this just meant writing a validation rule. In DFG, this meant
ensuring this property when building up the predecessors list, and also adding
a validation rule. The NaturalLoops algorithm relies on this property.

* b3/B3Validate.cpp:
* b3/air/AirValidate.cpp:
* b3/testb3.cpp:
(JSC::B3::testLoopWithMultipleHeaderEdges):
(JSC::B3::run):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::handleSuccessor):
* dfg/DFGValidate.cpp:

Source/WTF:

This patch switches NaturalLoops to walking over a block's predecessors
instead of successors when building the initial list of loops and their
headers. The algorithm broke down when we had a footer block with multiple
control flow edges pointing to the same header. This made the loop data
structure contain multiple entries for the same basic block. The algorithm
breaks down when we end up in this state, since it means our way of detecting
what loop is more inner is broken, since that check uses a loop's size.

* wtf/NaturalLoops.h:
(WTF::NaturalLoop::addBlock):
(WTF::NaturalLoops::NaturalLoops):

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

14 months agoExtend test group rule to support 'userInitiated' field.
dewei_zhu@apple.com [Tue, 12 Jun 2018 03:27:45 +0000 (03:27 +0000)]
Extend test group rule to support 'userInitiated' field.
https://bugs.webkit.org/show_bug.cgi?id=186544

Reviewed by Ryosuke Niwa.

Added support for rule specifying whether or not test group is user initiated.

* tools/js/analysis-results-notifier.js: Rule now support 'userInitiated' field.
(AnalysisResultsNotifier.prototype.async.sendNotificationsForTestGroups):
(AnalysisResultsNotifier.prototype._applyRules):
(AnalysisResultsNotifier._matchesRule):
* unit-tests/analysis-results-notifier-tests.js: Added unit tests for this change.

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

14 months agoImprove error messages in case FetchEvent.respondWith has a rejected promise
youenn@apple.com [Tue, 12 Jun 2018 02:37:17 +0000 (02:37 +0000)]
Improve error messages in case FetchEvent.respondWith has a rejected promise
https://bugs.webkit.org/show_bug.cgi?id=186368

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/fetch-event-network-error.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-argument.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-frame-resource.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-inscope.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-outscope.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-css-images.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt:
* web-platform-tests/service-workers/service-worker/invalid-header.https-expected.txt:
* web-platform-tests/service-workers/service-worker/update-recovery.https-expected.txt:

Source/WebCore:

Covered by rebased tests.

Introduce a new error domain for service worker ResourceError.
Used this domain to log in the console any such error.

Update FetchEvent implementation to get meaningful error messages for respondWith error cases.
In particular, convert the rejected promise JS value as a string to populate the error message.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFail):
* platform/network/ResourceErrorBase.cpp:
* platform/network/ResourceErrorBase.h:
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::waitForFetchEventToFinish):
* workers/service/FetchEvent.cpp:
(WebCore::FetchEvent::~FetchEvent):
(WebCore::FetchEvent::createResponseError):
(WebCore::FetchEvent::onResponse):
(WebCore::FetchEvent::respondWithError):
(WebCore::FetchEvent::processResponse):
(WebCore::FetchEvent::promiseIsSettled):
* workers/service/FetchEvent.h:
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::processResponse):
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):

Source/WebKit:

Log in JS console in case of failures.
Rely on ThreadableLoader to log which client actually failed.

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didFail):

LayoutTests:

* TestExpectations:
* http/tests/workers/service/basic-fetch.https-expected.txt:

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

14 months agoLoading cnn.com in MiniBrowser hits Structure::dump() under DFG::AdaptiveInferredProp...
keith_miller@apple.com [Tue, 12 Jun 2018 01:46:29 +0000 (01:46 +0000)]
Loading cnn.com in MiniBrowser hits Structure::dump() under DFG::AdaptiveInferredPropertyValueWatchpoint::handleFire  which churns 65KB of memory
https://bugs.webkit.org/show_bug.cgi?id=186467

Reviewed by Simon Fraser.

This patch adds a LazyFireDetail that wraps ScopedLambda so that
we don't actually malloc any strings for firing unless those
Strings are actually going to be printed.

* bytecode/Watchpoint.h:
(JSC::LazyFireDetail::LazyFireDetail):
* dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::handleFire):
* dfg/DFGAdaptiveStructureWatchpoint.cpp:
(JSC::DFG::AdaptiveStructureWatchpoint::fireInternal):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):

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

14 months agohttp/tests/security/xss-DENIED-script-inject-into-inactive-window2.html times out...
cdumez@apple.com [Tue, 12 Jun 2018 01:27:59 +0000 (01:27 +0000)]
http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html times out with PSON enabled
https://bugs.webkit.org/show_bug.cgi?id=186546

Reviewed by Brady Eidson.

Source/WebCore:

Add a hasOpenedFrames flag to NavigationAction, which we'll use in the UIProcess when deciding
to process swap on navigation or not.

Test: http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
* loader/NavigationAction.h:
(WebCore::NavigationAction::hasOpenedFrames const):
(WebCore::NavigationAction::setHasOpenedFrames):

Source/WebKit:

Disable process swap on navigation in frames that have opened other frames via
window.open(). These new windows may have a WindowProxy to their opener, and it
would therefore be unsafe to process swap at this point.

* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
* UIProcess/API/APINavigation.h:
(API::Navigation::setHasOpenedFrames):
(API::Navigation::hasOpenedFrames const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

LayoutTests:

Add layout test coverage.

* http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson-expected.txt: Added.
* http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html: Added.

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

14 months agoLayout Test svg/dom/animated-tearoff-list-remove-target.html is a flaky timeout
commit-queue@webkit.org [Tue, 12 Jun 2018 00:11:02 +0000 (00:11 +0000)]
Layout Test svg/dom/animated-tearoff-list-remove-target.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=185698
<rdar://problem/40341200>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-06-11
Reviewed by Daniel Bates.

The test is flaky because we get the animVal.getItem(0) of the 'x' attribute
from the target element without initializing this attribute with a base value.

The test assumes the animator would set the animVal of the 'x' attribute
from the 'from' attribute of the <animate> element before animVal.getItem(0)
is executed. But this may not always happen. Therefore the test will get
the 'IndexSizeError' exception and it will time out.

The fix is:
-- Initialize the attribute of the target element by a base value.
-- Use requestAnimationFrame() instead of using setTimeout() to make the
   test deterministic.
-- Allow the animation to advance one more step after kicking off the GC
   to ensure the variable 'animItem' is detached from animVal.getItem(0).

* svg/dom/animated-tearoff-list-remove-target.html:

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

14 months agoUnreviewed gardening; add a late endTest(), in case none of the other events fire...
jer.noble@apple.com [Mon, 11 Jun 2018 23:14:12 +0000 (23:14 +0000)]
Unreviewed gardening; add a late endTest(), in case none of the other events fire in time.

* media/track/track-delete-during-setup.html:

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

14 months agoAdd logging around internalError(const URL&)
krollin@apple.com [Mon, 11 Jun 2018 22:52:24 +0000 (22:52 +0000)]
Add logging around internalError(const URL&)
https://bugs.webkit.org/show_bug.cgi?id=186369
<rdar://problem/40872046>

Reviewed by Brent Fulgham.

There are times when we receive bug reports where the user says that
they are simply shown a page saying an internal error occurred. To
help understand the circumstances of that error, add some logging to
internalError() in WebErrors.cpp. This logging logs at the Error level
that internalError() was called and then logs a backtrace.

Source/WebKit:

* Shared/WebErrors.cpp:
(WebKit::internalError):

Source/WTF:

* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

14 months agoAdd support for webkit-test-runner jscOptions in DumpRenderTree and WebKitTestRunner.
mark.lam@apple.com [Mon, 11 Jun 2018 22:15:05 +0000 (22:15 +0000)]
Add support for webkit-test-runner jscOptions in DumpRenderTree and WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=186451
<rdar://problem/40875792>

Reviewed by Tim Horton.

Source/JavaScriptCore:

Enhance setOptions() to be able to take a comma separated options string in
addition to white space separated options strings.

* runtime/Options.cpp:
(JSC::isSeparator):
(JSC::Options::setOptions):

Tools:

This jscOptions option can be used by a layout test to specify some JSC runtime
options needed by the test e.g. by adding something like this to the top of the
html file after the DOCTYPE tag:
    <!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true ] -->

If more than one option is needed, the options can be specified as a comma
separated string e.g.
    <!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true,--useZombieMode=true ] -->

This only works with JSC options that can be changed at runtime.  Not all JSC
options can be changed this way as some options are only checked and set once at
VM / process initialization time: changing this type of options may have no
effect.  It's the test writer's responsibility to determine which options are
appropriate for with this webkit-test-runner jscOptions option.

This implementation is a workaround until we can change the run-webkit-tests
scripts to parse the option and apply it to a new launch of DRT or WKTR:
https://bugs.webkit.org/show_bug.cgi?id=186452

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
(TestOptions::webViewIsCompatibleWithOptions const):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setJSCOptions):
(resetWebViewToConsistentStateBeforeTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

* js/intl-numberformat-format-to-parts.html:
* js/intl-pluralrules.html:
* js/script-tests/intl-numberformat-format-to-parts.js:

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

14 months agoAdd a command line default to force WebKitTestRunner to turn on process swap on navig...
beidson@apple.com [Mon, 11 Jun 2018 21:29:44 +0000 (21:29 +0000)]
Add a command line default to force WebKitTestRunner to turn on process swap on navigation.
https://bugs.webkit.org/show_bug.cgi?id=186534

Reviewed by Chris Dumez.

Right now Process Swap On Navigation is enabled on a per-test basis.
The future is to enable it by default.

Adding a 'defaults write' helps us get to that future.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::testOptionsForTest const):
(WTR::TestController::platformAddTestOptions const):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformAddTestOptions const):

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

14 months agoLink drag image is inconsistently unreadable in dark mode
timothy_horton@apple.com [Mon, 11 Jun 2018 21:06:52 +0000 (21:06 +0000)]
Link drag image is inconsistently unreadable in dark mode
https://bugs.webkit.org/show_bug.cgi?id=186472

Reviewed by Timothy Hatcher.

Source/WebCore:

* platform/mac/DragImageMac.mm:
(WebCore::createDragImageForLink):
Use LocalDefaultSystemAppearance so that NSColors used inside
createDragImageForLink are interpreted correctly. This function
always follows the system appearance regardless of what the preference
is set to, because it's generating UI that isn't part of the page.

Use controlBackgroundColor to get a consistently contrasting background
for the link drag image.

Source/WebKit:

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::useDefaultAppearance):
Make defaultAppearance accurate even if useSystemAppearance is false.
Some parts of WebKit (like the link drag image, but also context menus)
want to be able to follow the system appearance regardless of whether
the view or content has opted in.

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _defaultAppearance]):
Make defaultAppearance accurate even if useSystemAppearance is false.
Some parts of WebKit (like the link drag image, but also context menus)
want to be able to follow the system appearance regardless of whether
the view or content has opted in.

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

14 months agohttp/tests/security/cors-post-redirect-307.html fails with PSON enabled
cdumez@apple.com [Mon, 11 Jun 2018 20:52:31 +0000 (20:52 +0000)]
http/tests/security/cors-post-redirect-307.html fails with PSON enabled
https://bugs.webkit.org/show_bug.cgi?id=186441

Reviewed by Brady Eidson.

Source/WebCore:

When we are continuing a load in a new process, we currently bypass the navigation policy
check. We now also bypass the adding of headers such as the Origin one since the request
was already processed in the previous process. This is important because in the case of
a cross-origin redirect, the previous process has removed the Origin header from the
request and we do not want the new process to add it again.

Test: http/tests/security/cors-post-redirect-307-pson.html

* WebCore.xcodeproj/project.pbxproj:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::goBackOrForward):
(WebCore::BackForwardController::goBack):
(WebCore::BackForwardController::goForward):
* loader/FrameLoadRequest.h:
(WebCore::FrameLoadRequest::setShouldTreatAsContinuingLoad):
(WebCore::FrameLoadRequest::shouldTreatAsContinuingLoad const):
(WebCore::FrameLoadRequest::setShouldCheckNavigationPolicy): Deleted.
(WebCore::FrameLoadRequest::shouldCheckNavigationPolicy const): Deleted.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::addHTTPOriginIfNeeded):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::FrameLoader::loadItem):
(WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
* loader/FrameLoader.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::setDefersLoading):
(WebCore::HistoryController::recursiveGoToItem):
* loader/HistoryController.h:
* loader/ShouldTreatAsContinuingLoad.h: Renamed from Source/WebCore/loader/NavigationPolicyCheck.h.
* page/Page.cpp:
(WebCore::Page::goToItem):
* page/Page.h:

Source/WebKit:

Rename existing flag to something a bit more generic, now that it is used for
more things than bypassing the navigation policy check.

* Shared/LoadParameters.cpp:
(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):
* Shared/LoadParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigation):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::goToBackForwardItem):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Source/WebKitLegacy/mac:

Rename existing flag to something a bit more generic, now that it is used for
more things than bypassing the navigation policy check.

* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView goToBackForwardItem:]):

Source/WebKitLegacy/win:

Rename existing flag to something a bit more generic, now that it is used for
more things than bypassing the navigation policy check.

* WebView.cpp:
(WebView::goToBackForwardItem):
(WebView::loadBackForwardListFromOtherView):

LayoutTests:

Add layout test coverage.

* http/tests/security/cors-post-redirect-307-pson-expected.txt: Added.
* http/tests/security/cors-post-redirect-307-pson.html: Added.

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

14 months agoAllow enabling PSON in layout tests without window.open support
cdumez@apple.com [Mon, 11 Jun 2018 20:28:32 +0000 (20:28 +0000)]
Allow enabling PSON in layout tests without window.open support
https://bugs.webkit.org/show_bug.cgi?id=186537

Reviewed by Geoffrey Garen.

Tools:

Allow enabling PSON in layout tests without window.open support since window.open support
is far from being ready and we plan to enable PSON in layout tests soon.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Update layout test which requires window.open support in addition to PSON.

* http/tests/navigation/process-swap-window-open.html:

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

14 months agoAccept request header values should be more tightly checked after r232572 in case...
youenn@apple.com [Mon, 11 Jun 2018 20:18:07 +0000 (20:18 +0000)]
Accept request header values should be more tightly checked after r232572 in case of CORS load
https://bugs.webkit.org/show_bug.cgi?id=186533
<rdar://problem/40933880>

Reviewed by Darin Adler.

Source/WebCore:

Covered by updated test.

* platform/network/HTTPParsers.cpp:
(WebCore::isValidAcceptHeaderValue): Checking that Accept header value conforms with RFC7370.
If not, this will trigger preflighting for CORS cross origin loads.
Current checks for Accept-Language and Content-Language are sufficient to ensure values conform with RFC7370.

LayoutTests:

Added test to check Accept header value preflight.
Updated test to check that a preflight really happens if expected.

* http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight-expected.txt:
* http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html:
* http/tests/xmlhttprequest/resources/cors-preflight-safelisted-headers-responder.php:

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

14 months agoFollowup to [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
beidson@apple.com [Mon, 11 Jun 2018 19:55:42 +0000 (19:55 +0000)]
Followup to [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
https://bugs.webkit.org/show_bug.cgi?id=186436

Patch by Darin Adler
Reviewed by Brady Eidson.

* TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm:
(TestWebKitAPI::TEST):

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

14 months agoFix spelling.
antti@apple.com [Mon, 11 Jun 2018 19:35:04 +0000 (19:35 +0000)]
Fix spelling.

* http/tests/cache/disk-cache/disk-cache-media-small.html:

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

14 months agoGardening: skip BigInt tests on iOS until the feature is stable.
mark.lam@apple.com [Mon, 11 Jun 2018 19:23:56 +0000 (19:23 +0000)]
Gardening: skip BigInt tests on iOS until the feature is stable.
<rdar://problem/40331121>

Not reviewed.

* Scripts/run-jsc-stress-tests:

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

14 months agohttp/tests/navigation/https-in-page-cache.html fails with process swapping on.
beidson@apple.com [Mon, 11 Jun 2018 19:07:02 +0000 (19:07 +0000)]
http/tests/navigation/https-in-page-cache.html fails with process swapping on.
https://bugs.webkit.org/show_bug.cgi?id=186532

Reviewed by Geoffrey Garen.

* http/tests/navigation/resources/https-in-page-cache-1.php:
* http/tests/navigation/resources/https-in-page-cache-2.php:
* http/tests/navigation/resources/https-in-page-cache-3.html:

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

14 months ago[Win][MiniBrowser] Add WebKitBrowserWindow class for modern WebKit API
Hironori.Fujii@sony.com [Mon, 11 Jun 2018 18:59:21 +0000 (18:59 +0000)]
[Win][MiniBrowser] Add WebKitBrowserWindow class for modern WebKit API
https://bugs.webkit.org/show_bug.cgi?id=186478

Reviewed by Alex Christensen.

Added "New WebKit Window" and "New WebKitLegacy Window" menu
items. Disabled the menu item "New WebKit Window" if
!ENABLE(WEBKIT).

* MiniBrowser/win/CMakeLists.txt: Added WebKitBrowserWindow.cpp
source file and ENABLE_WEBKIT macro if ENABLE_WEBKIT.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::MainWindow):
(MainWindow::create):
(MainWindow::init):
(MainWindow::WndProc):
* MiniBrowser/win/MainWindow.h:
* MiniBrowser/win/MiniBrowserLib.rc:
* MiniBrowser/win/MiniBrowserLibResource.h:
* MiniBrowser/win/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest):
* MiniBrowser/win/WebKitBrowserWindow.cpp: Added.
(createString):
(toUtf8):
(createWKString):
(createWKURL):
(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::init):
(WebKitBrowserWindow::hwnd):
(WebKitBrowserWindow::loadURL):
(WebKitBrowserWindow::loadHTMLString):
(WebKitBrowserWindow::navigateForwardOrBackward):
(WebKitBrowserWindow::navigateToHistory):
(WebKitBrowserWindow::setPreference):
(WebKitBrowserWindow::print):
(WebKitBrowserWindow::launchInspector):
(WebKitBrowserWindow::setUserAgent):
(WebKitBrowserWindow::userAgent):
(WebKitBrowserWindow::showLayerTree):
(WebKitBrowserWindow::updateStatistics):
(WebKitBrowserWindow::resetZoom):
(WebKitBrowserWindow::zoomIn):
(WebKitBrowserWindow::zoomOut):
(toWebKitBrowserWindow):
(WebKitBrowserWindow::didReceiveTitleForFrame):
(WebKitBrowserWindow::didCommitLoadForFrame):
* MiniBrowser/win/WebKitBrowserWindow.h:
* MiniBrowser/win/WinMain.cpp:
(wWinMain):

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

14 months agoAX: [iOS] accessibility sometimes doesn't know process suspension is canceled
n_wang@apple.com [Mon, 11 Jun 2018 18:11:23 +0000 (18:11 +0000)]
AX: [iOS] accessibility sometimes doesn't know process suspension is canceled
https://bugs.webkit.org/show_bug.cgi?id=186450

Reviewed by Chris Fleizach.

There's some early return condition in WebProcess::cancelPrepareToSuspend() which
could lead to accessibility failing to post process status notificaiton. Fixed it
by moving the accessibility notification before the early return condition.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::cancelPrepareToSuspend):

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

14 months agoAdd missing whitespace to run-jsc command
keith_miller@apple.com [Mon, 11 Jun 2018 17:24:58 +0000 (17:24 +0000)]
Add missing whitespace to run-jsc command
https://bugs.webkit.org/show_bug.cgi?id=186528

Reviewed by Mark Lam.

* Scripts/run-jsc:

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

14 months agoCrash under com.apple.WebKit.Networking at WebCore: WebCore::NetworkStorageSession...
cdumez@apple.com [Mon, 11 Jun 2018 16:58:18 +0000 (16:58 +0000)]
Crash under com.apple.WebKit.Networking at WebCore: WebCore::NetworkStorageSession::hasStorageAccess const
https://bugs.webkit.org/show_bug.cgi?id=186433
<rdar://problem/40750907>

Reviewed by Geoffrey Garen.

Do some hardening in NetworkStorageSession::hasStorageAccess() to make sure
we do not try and do a HashMap lookup with a null firstPartyDomain, as this
would crash.

* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::hasStorageAccess const):

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

14 months agoJavaScriptCore: Disable 32-bit JIT on Windows
msaboff@apple.com [Mon, 11 Jun 2018 16:39:49 +0000 (16:39 +0000)]
JavaScriptCore: Disable 32-bit JIT on Windows
https://bugs.webkit.org/show_bug.cgi?id=185989

Reviewed by Mark Lam.

.:

* Source/cmake/OptionsWin.cmake:

Source/JavaScriptCore:

Fixed the CLOOP so it can work when COMPUTED_GOTOs are not supported.

* llint/LLIntData.h:
(JSC::LLInt::getCodePtr): Used a reinterpret_cast since Opcode could be an int.
* llint/LowLevelInterpreter.cpp: Changed the definition of OFFLINE_ASM_GLOBAL_LABEL to not
have a case label because these aren't opcodes.
* runtime/Options.cpp: Made assembler related Windows conditional code also conditional
on the JIT being enabled.
(JSC::recomputeDependentOptions):

Source/WTF:

Fixed the CLOOP so it can work when COMPUTED_GOTOs are not supported.

* wtf/Platform.h:

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