WebKit-https.git
2 years agoMake it clear that regenerating ICs are holding the CodeBlock's lock by passing the...
sbarati@apple.com [Wed, 21 Jun 2017 18:42:44 +0000 (18:42 +0000)]
Make it clear that regenerating ICs are holding the CodeBlock's lock by passing the locker as a parameter
https://bugs.webkit.org/show_bug.cgi?id=173609

Reviewed by Keith Miller.

This patch makes many of the IC generating functions require a locker as
a parameter. We do this in other places in JSC to indicate that
a particular API is only valid while a particular lock is held.
This is the case when generating ICs. This patch just makes it
explicit in the IC generating interface.

* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::addCases):
(JSC::PolymorphicAccess::addCase):
(JSC::PolymorphicAccess::commit):
(JSC::PolymorphicAccess::regenerate):
* bytecode/PolymorphicAccess.h:
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::initStub): Deleted.
* bytecode/StructureStubInfo.h:
* jit/Repatch.cpp:
(JSC::tryCacheGetByID):
(JSC::repatchGetByID):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryRepatchIn):
(JSC::repatchIn):

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

2 years agoAdd logging to identify when the Page suspends scripted animations
commit-queue@webkit.org [Wed, 21 Jun 2017 18:37:02 +0000 (18:37 +0000)]
Add logging to identify when the Page suspends scripted animations
https://bugs.webkit.org/show_bug.cgi?id=173626

Patch by Antoine Quint <graouts@apple.com> on 2017-06-21
Reviewed by Tim Horton.

Source/WebCore:

We have a longstanding issue that some media/modern-media-controls tests time out due to
requestAnimationFrame callbacks not being serviced, which is tracked by webkit.org/b/173628.
We added some logging to identify when ScriptedAnimationController would get suspended in
webkit.org/b/173326. This logging points to the fact that the reason rAF callbacks aren't
serviced is because Document::requestAnimationFrame() suspends rAF when the page reports
that scripted animations ought to be suspended, which is true when m_scriptedAnimationsSuspended
is true. This patch adds logging that tracks when this flag is set, provided a new setting
shouldLogScriptedAnimationControllerSuspensionChange is true.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::logSuspendCount):
* page/Page.cpp:
(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
* page/Settings.in:

Source/WebKit/mac:

Add a new preference to control the new shouldLogScriptedAnimationControllerSuspensionChange settings
through WebKit. This is specific to WK1 since the issue we're trying to pinpoint only occurs on WK1 bots.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences shouldLogScriptedAnimationControllerSuspensionChange]):
(-[WebPreferences setShouldLogScriptedAnimationControllerSuspensionChange:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

Turn the new logging on for WK1/DRT since the issue we're trying to pinpoint only occurs on WK1 bots.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):

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

2 years agoImport W3C tests regarding navigation inside sandboxed iframes
commit-queue@webkit.org [Wed, 21 Jun 2017 17:08:02 +0000 (17:08 +0000)]
Import W3C tests regarding navigation inside sandboxed iframes
https://bugs.webkit.org/show_bug.cgi?id=173649

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-21
Reviewed by Youenn Fablet.

This import new tests added in https://github.com/w3c/web-platform-tests/pull/6221 to verify
sandboxing of iframes and will help to test the changes in bug 173162.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:

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

2 years ago[MSVC] Fix compilation in CP932 (Shift_JIS) environment
commit-queue@webkit.org [Wed, 21 Jun 2017 17:05:28 +0000 (17:05 +0000)]
[MSVC] Fix compilation in CP932 (Shift_JIS) environment
https://bugs.webkit.org/show_bug.cgi?id=173638

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-06-21
Reviewed by Alex Christensen.

Give "/utf-8 /validate-charset" options to the MSVC compiler
to specify the source code encoding.

* Source/cmake/OptionsMSVC.cmake:

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

2 years ago[Curl] Extract CurlDownloadManager as shared background task handler
achristensen@apple.com [Wed, 21 Jun 2017 16:48:43 +0000 (16:48 +0000)]
[Curl] Extract CurlDownloadManager as shared background task handler
https://bugs.webkit.org/show_bug.cgi?id=173557

Curl resource handling should be shared by other part of Curl
network stack. CurlDownloadManager is extracted as stand alone
CurlManager singleton class to be ready for others
(i.e. ResourceHandle).

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-06-21
Reviewed by Alex Christensen.

* PlatformWinCairo.cmake:
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::init):
(WebCore::CurlDownload::start):
(WebCore::CurlDownload::cancel):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::handleCurlMsg):
(WebCore::CurlDownloadManager::CurlDownloadManager): Deleted.
(WebCore::CurlDownloadManager::~CurlDownloadManager): Deleted.
(WebCore::CurlDownloadManager::add): Deleted.
(WebCore::CurlDownloadManager::remove): Deleted.
(WebCore::CurlDownloadManager::getActiveDownloadCount): Deleted.
(WebCore::CurlDownloadManager::getPendingDownloadCount): Deleted.
(WebCore::CurlDownloadManager::startThreadIfNeeded): Deleted.
(WebCore::CurlDownloadManager::stopThread): Deleted.
(WebCore::CurlDownloadManager::stopThreadIfIdle): Deleted.
(WebCore::CurlDownloadManager::updateHandleList): Deleted.
(WebCore::CurlDownloadManager::addToCurl): Deleted.
(WebCore::CurlDownloadManager::removeFromCurl): Deleted.
(WebCore::CurlDownloadManager::downloadThread): Deleted.
* platform/network/curl/CurlDownload.h:
(WebCore::CurlDownloadManager::getMultiHandle): Deleted.
(WebCore::CurlDownloadManager::runThread): Deleted.
(WebCore::CurlDownloadManager::setRunThread): Deleted.
* platform/network/curl/CurlManager.cpp: Added.
(WebCore::CurlManager::CurlManager):
(WebCore::CurlManager::~CurlManager):
(WebCore::CurlManager::add):
(WebCore::CurlManager::remove):
(WebCore::CurlManager::getActiveCount):
(WebCore::CurlManager::getPendingCount):
(WebCore::CurlManager::startThreadIfNeeded):
(WebCore::CurlManager::stopThread):
(WebCore::CurlManager::stopThreadIfIdle):
(WebCore::CurlManager::updateHandleList):
(WebCore::CurlManager::addToCurl):
(WebCore::CurlManager::removeFromCurl):
(WebCore::CurlManager::workerThread):
(WebCore::CurlUtils::getEffectiveURL):
(WebCore::CurlSharedResources::mutexFor):
(WebCore::CurlSharedResources::lock):
(WebCore::CurlSharedResources::unlock):
* platform/network/curl/CurlManager.h: Added.
(WebCore::CurlManager::singleton):
(WebCore::CurlManager::getCurlShareHandle):
(WebCore::CurlManager::getMultiHandle):
(WebCore::CurlManager::runThread):
(WebCore::CurlManager::setRunThread):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::ResourceHandleManager):
(WebCore::ResourceHandleManager::~ResourceHandleManager):
(WebCore::handleLocalReceiveResponse):
(WebCore::getProtectionSpace):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::getCurlEffectiveURL): Deleted.
(WebCore::sharedResourceMutex): Deleted.
(WebCore::curl_lock_callback): Deleted.
(WebCore::curl_unlock_callback): Deleted.
(WebCore::ResourceHandleManager::getCurlShareHandle): Deleted.
* platform/network/curl/ResourceHandleManager.h:

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

2 years ago[WPE] Unreviewed gardening
csaavedra@igalia.com [Wed, 21 Jun 2017 16:25:16 +0000 (16:25 +0000)]
[WPE] Unreviewed gardening

Update expectations to known flaky http/appcache tests and also a
couple of flaky crashing tests.
* platform/wpe/TestExpectations:

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

2 years agoLayoutTests/imported/w3c/resources/import-expectations.json is broken after http...
commit-queue@webkit.org [Wed, 21 Jun 2017 16:19:10 +0000 (16:19 +0000)]
LayoutTests/imported/w3c/resources/import-expectations.json is broken after trac.webkit.org/changeset/218181
https://bugs.webkit.org/show_bug.cgi?id=173651

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Chris Dumez.

* resources/import-expectations.json: Fix the merge.

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

2 years agoInclude audio/vnd.wave as a valid mime-type for wav files.
commit-queue@webkit.org [Wed, 21 Jun 2017 16:04:51 +0000 (16:04 +0000)]
Include audio/vnd.wave as a valid mime-type for wav files.
https://bugs.webkit.org/show_bug.cgi?id=173635
rdar://problem/32656568

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-21
Reviewed by Eric Carlson.

audio/vnd.wave is a valid mime-type for wav files per https://tools.ietf.org/html/rfc2361

Updated test and test results:
LayoutTests/media/media-can-play-wav-audio.html

* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
(WebCore::mimeTypeAssociationMap):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeSet):

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

2 years agoAX: Cannot call setValue() on contenteditable or ARIA text controls
cfleizach@apple.com [Wed, 21 Jun 2017 15:58:53 +0000 (15:58 +0000)]
AX: Cannot call setValue() on contenteditable or ARIA text controls
https://bugs.webkit.org/show_bug.cgi?id=173520

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add support for changing the value of a contenteditable and any other aria text control in setValue().

Test: accessibility/set-value-editable-types.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setValue):

Tools:

Add setValue() method to WKTR (already existed in DRT).

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::setValue):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setValue):

LayoutTests:

* accessibility/set-value-editable-types-expected.txt: Added.
* accessibility/set-value-editable-types.html: Added.

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

2 years agoDon't clear audio mute when muting capture.
commit-queue@webkit.org [Wed, 21 Jun 2017 15:56:06 +0000 (15:56 +0000)]
Don't clear audio mute when muting capture.
https://bugs.webkit.org/show_bug.cgi?id=173639
rdar://problem/32749737

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-21
Reviewed by Eric Carlson.

Setting capture mute was clearing audio mute.
Added setMediaStreamCaptureMuted to set just the capture mute bit.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _muteMediaCapture]):
* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::muteCaptureMediaStreamsExceptIn):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMediaStreamCaptureMuted):
* UIProcess/WebPageProxy.h:

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

2 years ago[GTK] Fix the condition to enable/disable GSTREAMER_GL
magomez@igalia.com [Wed, 21 Jun 2017 15:50:48 +0000 (15:50 +0000)]
[GTK] Fix the condition to enable/disable GSTREAMER_GL
https://bugs.webkit.org/show_bug.cgi?id=173650

Reviewed by Carlos Garcia Campos.

If GSTREAMER_GL is enabled, check for the GStreamer version. If the version is < 1.10, disable
GSTREAMER_GL and continue. If the version is >= 1.10 but there's no gstreamer-gl package available
then fail.

* Source/cmake/FindGStreamer.cmake:
* Source/cmake/OptionsGTK.cmake:

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

2 years ago[GTK] Enable GStreamer GL by default on production builds
magomez@igalia.com [Wed, 21 Jun 2017 12:33:17 +0000 (12:33 +0000)]
[GTK] Enable GStreamer GL by default on production builds
https://bugs.webkit.org/show_bug.cgi?id=173406

Reviewed by Carlos Garcia Campos.

Enable GStreamer GL by default when the GStreamer version >= 1.10.

* Source/cmake/OptionsGTK.cmake:

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

2 years ago[GTK][WAYLAND] Create WaylandCompositorDisplay unconditionally when initializing...
magomez@igalia.com [Wed, 21 Jun 2017 12:29:03 +0000 (12:29 +0000)]
[GTK][WAYLAND] Create WaylandCompositorDisplay unconditionally when initializing the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=173598

Reviewed by Carlos Garcia Campos.

Move WaylandCompositorDisplay code to its own files so it can be used from other classes. Then, instead of
storing the waylandCompositorDisplayName in the WebProcess, keep a WaylandCompositorDisplay instance that
is created during the initialization. This way the appropriate sharedDisplayForCompositing will be set
since the creation of the WebProcess.

* PlatformGTK.cmake:
* WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
(WebKit::AcceleratedSurfaceWayland::create):
(WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::waylandCompositorDisplay):
* WebProcess/gtk/WaylandCompositorDisplay.cpp: Added.
(WebKit::WaylandCompositorDisplay::create):
(WebKit::WaylandCompositorDisplay::bindSurfaceToPage):
(WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay):
(WebKit::WaylandCompositorDisplay::registryGlobal):
* WebProcess/gtk/WaylandCompositorDisplay.h: Added.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):

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

2 years ago[GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
carlosgc@webkit.org [Wed, 21 Jun 2017 07:49:21 +0000 (07:49 +0000)]
[GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
https://bugs.webkit.org/show_bug.cgi?id=173606

Reviewed by Žan Doberšek.

.:

Update public symbols that were renamed.

* Source/cmake/gtksymbols.filter:

Source/WebKit2:

And rename them to use WebKit prefix instead of WebGtk.

* PlatformGTK.cmake:
* WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp.
(WebKit::WebKitExtensionManager::singleton):
(WebKit::WebKitExtensionManager::WebKitExtensionManager):
(WebKit::WebKitExtensionManager::scanModules):
(WebKit::WebKitExtensionManager::initializeWebExtension):
(WebKit::WebKitExtensionManager::initialize):
* WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h.
* WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp.
(WKBundleInitialize):

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

2 years agoList libtasn1 packages in GTK+ and WPE install-dependencies scripts
zandobersek@gmail.com [Wed, 21 Jun 2017 07:09:53 +0000 (07:09 +0000)]
List libtasn1 packages in GTK+ and WPE install-dependencies scripts
as one of the dependencies required to build the product.

Rubber-stamped by Carlos Garcia Campos.

* gtk/install-dependencies:
* wpe/install-dependencies:

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

2 years ago[GCrypt] Implement CryptoKeyEC SPKI imports
zandobersek@gmail.com [Wed, 21 Jun 2017 06:52:29 +0000 (06:52 +0000)]
[GCrypt] Implement CryptoKeyEC SPKI imports
https://bugs.webkit.org/show_bug.cgi?id=172927

Reviewed by Jiewen Tan, Michael Catanzaro and Carlos Garcia Campos.

.:

* Source/cmake/FindLibtasn1.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Require libtasn1 when SUBTLE_CRYPTO is enabled.
* Source/cmake/OptionsWPE.cmake: Ditto.

Source/WebCore:

No new tests -- affected tests are now passing and are unskipped.

Implement libgcrypt-based support for SPKI imports of EC keys.

Using libtasn1 through the utility functions and wrappers, the given key data
is decoded against the SubjectPublicKeyInfo ASN.1 definition. The algorithm
member is then properly validated, making sure that the key algorithm idenfitier
is supported and that the algorithm parameters specify the correct EC curve.

The public key bit string is then retrieved and validated, ensuring it represents
an uncompressed EC point that is of valid size for the specified EC curve. The
point is then tested through an EC context to make sure it's positioned on the
specified EC curve.

Finally, the curve name and uncompressed point data are embedded into a
`public-key` s-expression that will be used through the libgcrypt API. This is
then used, along with other information, to create a valid CryptoKeyEC object.

* PlatformGTK.cmake: Use LIBTASN1_INCLUDE_DIRECTORIES and LIBTASN1_LIBRARIES.
* PlatformWPE.cmake: Ditto.
* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::supportedAlgorithmIdentifier):
(WebCore::curveForIdentifier):
(WebCore::CryptoKeyEC::platformImportSpki):

Source/WebCore/PAL:

Add a file that provides utility functions for operating with libtasn1 APIs.

The precomputed ASN.1 declarations, generated from the WebCrypto.asn file with
the asn1Parser tool, are used to enable construction of ASN.1 structures that
are then used to decode the SPKI or PKCS#8 data through the decodeStructure()
function. Raw data of each element in that structure can be retrieved throug the
elementData() function.

The Structure class is added as a wrapper for asn1_node objects that are used
as decoding targets, simplifying lifetime management of these objects.

* pal/PlatformGTK.cmake:
* pal/PlatformWPE.cmake:
* pal/crypto/tasn1/Utilities.cpp: Added.
(PAL::TASN1::asn1Definitions):
(PAL::TASN1::decodeStructure):
(PAL::TASN1::elementData):
* pal/crypto/tasn1/Utilities.h: Added.
(PAL::TASN1::Structure::~Structure):
(PAL::TASN1::Structure::operator&):
(PAL::TASN1::Structure::operator asn1_node):
* pal/crypto/tasn1/WebCrypto.asn: Added.

LayoutTests:

* platform/gtk/TestExpectations:
Unskip or enable the EC-based SPKI import tests that are now passing.

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

2 years agoPass the argument of DrawingArea::shouldUseTiledBackingForFrameView by reference
fred.wang@free.fr [Wed, 21 Jun 2017 06:24:50 +0000 (06:24 +0000)]
Pass the argument of DrawingArea::shouldUseTiledBackingForFrameView by reference
https://bugs.webkit.org/show_bug.cgi?id=173605

DrawingArea::shouldUseTiledBackingForFrameView is only called from
WebChromeClient::shouldUseTiledBackingForFrameView where the frame view is already available
as a reference. This patch makes the argument of
DrawingArea::shouldUseTiledBackingForFrameView a reference, so it does not need to be
converted to a pointer or to perform nullchecks.

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-20
Reviewed by Simon Fraser.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldUseTiledBackingForFrameView): Just pass the reference.
* WebProcess/WebPage/DrawingArea.h: Make the parameter a reference.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Ditto.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Ditto.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::shouldUseTiledBackingForFrameView): Use the reference
to frame view and remove the nullcheck.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrameView): Ditto.

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

2 years agoWebGPU contexts should have a back reference to the canvas element
drousso@apple.com [Wed, 21 Jun 2017 04:17:46 +0000 (04:17 +0000)]
WebGPU contexts should have a back reference to the canvas element
https://bugs.webkit.org/show_bug.cgi?id=173633

Reviewed by Jon Lee.

No tests added, as this is already implemented within other canvas types.

* html/canvas/WebGPURenderingContext.idl:

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

2 years agoWeb Inspector: change the selected ScopeBarItem on mousedown instead of click
drousso@apple.com [Wed, 21 Jun 2017 03:13:18 +0000 (03:13 +0000)]
Web Inspector: change the selected ScopeBarItem on mousedown instead of click
https://bugs.webkit.org/show_bug.cgi?id=173586

Reviewed by Matt Baker.

Both the Tab bar and Sidebar navigation bar switch the active item on "mousedown" instead of
on "click". ScopeBarItem should follow this pattern, as it is faster and keeps consistency.

* UserInterface/Views/MultipleScopeBarItem.js:
(WebInspector.MultipleScopeBarItem):
(WebInspector.MultipleScopeBarItem.prototype._handleMouseDown):
(WebInspector.MultipleScopeBarItem.prototype._clicked): Deleted.
* UserInterface/Views/ScopeBarItem.js:
(WebInspector.ScopeBarItem):
(WebInspector.ScopeBarItem.prototype._handleMouseDown):
(WebInspector.ScopeBarItem.prototype._clicked): Deleted.

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

2 years agoWebAudioSourceProvider should be thread safe ref counted
commit-queue@webkit.org [Wed, 21 Jun 2017 03:05:39 +0000 (03:05 +0000)]
WebAudioSourceProvider should be thread safe ref counted
https://bugs.webkit.org/show_bug.cgi?id=173623

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-20
Reviewed by Eric Carlson.

No observable change of behavior.

* platform/mediastream/WebAudioSourceProvider.h:

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

2 years ago[preload] Turn on preload's feature flag by default.
yoav@yoav.ws [Wed, 21 Jun 2017 01:04:25 +0000 (01:04 +0000)]
[preload] Turn on preload's feature flag by default.
https://bugs.webkit.org/show_bug.cgi?id=173139

Reviewed by Youenn Fablet.

Turn on the runtime enabled feature flag for link preload by default.

No new tests as this just turns on a feature that was already on-by-default for tests.

* page/RuntimeEnabledFeatures.h:

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

2 years agoDisable font variations on macOS Sierra and iOS 10
mmaxfield@apple.com [Wed, 21 Jun 2017 00:54:43 +0000 (00:54 +0000)]
Disable font variations on macOS Sierra and iOS 10
https://bugs.webkit.org/show_bug.cgi?id=173618
<rdar://problem/32879164>

Reviewed by Jon Lee.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

On macOS Sierra and iOS 10, there are some platform problems involved with font variations. They
were previously enabled on those OSes just as a preview development tool. These platform bugs have
been fixed in macOS High Sierra and iOS 11, so we should align our feature flags with the eventual
configurations.

* Configurations/FeatureDefines.xcconfig:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::defaultVariationValues):
(WebCore::preparePlatformFont):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Update expected test results. The old test results are now High Sierra- and iOS 11-expected.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/text/font-selection-font-face-parse-expected.txt:
* fast/text/font-selection-font-loading-api-parse-expected.txt:
* fast/text/font-stretch-parse-expected.txt:
* fast/text/font-style-parse-expected.txt:
* fast/text/font-weight-parse-expected.txt:
* platform/ios/TestExpectations:
* platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
* platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt: Removed.
* platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt: Removed.
* platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt: Removed.
* platform/mac-elcapitan/fast/text/font-style-parse-expected.txt: Removed.
* platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt: Removed.
* platform/mac-elcapitan/svg/css/getComputedStyle-basic-expected.txt: Removed
* platform/mac/TestExpectations:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt: Removed

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

2 years agoFix leak of ModuleInformations in BBQPlan constructors.
keith_miller@apple.com [Wed, 21 Jun 2017 00:32:25 +0000 (00:32 +0000)]
Fix leak of ModuleInformations in BBQPlan constructors.
https://bugs.webkit.org/show_bug.cgi?id=173577

Reviewed by Saam Barati.

This patch fixes a leak in the BBQPlan constructiors. Previously,
the plans were calling makeRef on the newly constructed objects.
This patch fixes the issue and uses adoptRef instead. Additionally,
an old, incorrect, attempt to fix the leak is removed.

* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection):
* jit/JITWorklist.cpp:
(JSC::JITWorklist::Thread::Thread):
* runtime/PromiseDeferredTimer.cpp:
(JSC::PromiseDeferredTimer::addPendingPromise):
* runtime/VM.cpp:
(JSC::VM::VM):
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::BBQPlan):
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::Plan):

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

2 years agoWeb Inspector: Send context attributes for tracked canvases
drousso@apple.com [Wed, 21 Jun 2017 00:07:41 +0000 (00:07 +0000)]
Web Inspector: Send context attributes for tracked canvases
https://bugs.webkit.org/show_bug.cgi?id=173327

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/Canvas.json:
Add ContextAttributes object type that is optionally used for WebGL canvases.

Source/WebCore:

Test: inspector/canvas/context-attributes.html

* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::buildObjectForCanvas):

Source/WebInspectorUI:

* UserInterface/Models/Canvas.js:
(WebInspector.Canvas.fromPayload):
(WebInspector.Canvas.prototype.get contextAttributes):
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.sizeDidChange):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):

* UserInterface/Views/DataGridNode.js:
(WebInspector.DataGridNode.prototype.createCellContent):
Instead of checking if the value of the cell is falsy, check that the key exists in the data.
This allows values like `false` to be displayed.

LayoutTests:

* inspector/canvas/context-attributes-expected.txt: Added.
* inspector/canvas/context-attributes.html: Added.

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

2 years agoMarked webrtc/video-replace-muted-track.html as flaky.
jlewis3@apple.com [Wed, 21 Jun 2017 00:02:14 +0000 (00:02 +0000)]
Marked webrtc/video-replace-muted-track.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173486

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 years ago[Cocoa] The system Japanese font cannot be italicized
mmaxfield@apple.com [Tue, 20 Jun 2017 23:52:22 +0000 (23:52 +0000)]
[Cocoa] The system Japanese font cannot be italicized
https://bugs.webkit.org/show_bug.cgi?id=173300
<rdar://problem/31805407>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Items in the system font cascade list may lie about whether or not they support italics.
In order to get the truth, we need to use the physical font underlying the font in question,
because this one won't lie. Then, we can interrogate this physical font about its traits
in order to synthesize italics correctly.

Test: fast/text/system-font-japanese-synthetic-italic.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::lookupFallbackFont):
* platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
(WebCore::FontFamilySpecificationCoreText::fontRanges):

LayoutTests:

* fast/text/system-font-japanese-synthetic-italic-expected-mismatch.html: Added.
* fast/text/system-font-japanese-synthetic-italic.html: Added.
* platform/mac/TestExpectations: This codepath doesn't work in El Capitan.

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

2 years agoUse WTF::Function instead of std::function in more places in WebCore/
cdumez@apple.com [Tue, 20 Jun 2017 23:42:18 +0000 (23:42 +0000)]
Use WTF::Function instead of std::function in more places in WebCore/
https://bugs.webkit.org/show_bug.cgi?id=173583

Reviewed by Darin Adler.

Use WTF::Function instead of std::function in more places in WebCore/ to
reduce copying.

* page/Page.cpp:
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
* platform/Logging.cpp:
(WebCore::registerNotifyCallback):
* platform/Logging.h:
* platform/MainThreadSharedTimer.cpp:
(WebCore::MainThreadSharedTimer::setFiredFunction):
* platform/MainThreadSharedTimer.h:
* platform/PlatformPasteboard.h:
* platform/ScopeGuard.h:
(WebCore::ScopeGuard::ScopeGuard):
(WebCore::ScopeGuard::enable):
* platform/ScrollAnimationSmooth.cpp:
(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
* platform/ScrollAnimationSmooth.h:
* platform/SharedTimer.h:
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::currentSessionsMatching):
* platform/audio/PlatformMediaSessionManager.h:
* platform/cf/MainThreadSharedTimerCF.cpp:
(WebCore::setupPowerObserver):
* platform/cf/RunLoopObserver.h:
(WebCore::RunLoopObserver::RunLoopObserver):
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::traverse):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::addMediaEngine):
* platform/graphics/MediaPlayer.h:
* platform/graphics/Path.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::runWithoutAnimations):
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::convertToFormat):
* platform/graphics/gstreamer/MainThreadNotifier.h:
* platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h:
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::drawWithoutShadow):
(WebCore::GraphicsContext::drawWithShadow):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::ClipboardSetData::ClipboardSetData):
(WebCore::PasteboardHelper::writeClipboardContents):
* platform/gtk/PasteboardHelper.h:
* platform/gtk/PlatformPasteboardGtk.cpp:
(WebCore::PlatformPasteboard::writeToClipboard):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
* platform/mac/PowerObserverMac.cpp:
(WebCore::PowerObserver::PowerObserver):
* platform/mac/PowerObserverMac.h:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isSecondLevelDomainNameAllowedByTLDRules):
* platform/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::addCaptureDeviceChangedObserver):
* platform/mediastream/CaptureDeviceManager.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::scheduleDeferredTask):
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
(-[WebAVAudioSessionAvailableInputsListener initWithCallback:]):
* platform/mediastream/mac/CoreAudioCaptureSource.h:
* platform/mock/ScrollAnimatorMock.cpp:
(WebCore::ScrollAnimatorMock::ScrollAnimatorMock):
* platform/mock/ScrollAnimatorMock.h:
* platform/network/CookieStorage.h:
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
* platform/network/NetworkStateNotifier.h:
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::forEach):
* platform/network/NetworkStorageSession.h:
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::cookieChangeCallbackMap):
(WebCore::startObservingCookieChanges):
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::callOnMainThreadAndWait):
* platform/network/mac/CookieStorageMac.mm:
(-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]):
(WebCore::startObservingCookieChanges):
* platform/network/soup/CookieStorageSoup.cpp:
(WebCore::startObservingCookieChanges):
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::checkTLSErrors):
* platform/network/soup/SoupNetworkSession.h:
* platform/sql/SQLiteDatabase.cpp:
(WebCore::destroyCollationFunction):
(WebCore::callCollationFunction):
(WebCore::SQLiteDatabase::setCollationFunction):
* platform/sql/SQLiteDatabase.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::traverseVisibleNonCompositedDescendantLayers):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItem):
* rendering/RenderListBox.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::InlineIteratorHistory::push):
(WebCore::BreakingContext::InlineIteratorHistory::update):
* workers/Worker.cpp:
(WebCore::Worker::Worker):
* workers/WorkerRunLoop.cpp:

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

2 years agoUnreviewed, rolling out r218524.
ryanhaddad@apple.com [Tue, 20 Jun 2017 23:22:16 +0000 (23:22 +0000)]
Unreviewed, rolling out r218524.

This change broke internal builds.

Reverted changeset:

"[Cocoa] The system Japanese font cannot be italicized"
https://bugs.webkit.org/show_bug.cgi?id=173300
http://trac.webkit.org/changeset/218524

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

2 years ago<rdar://problem/32862652> [REGRESSION] r218374: fast/events/ios/rotation/layout-viewp...
simon.fraser@apple.com [Tue, 20 Jun 2017 22:57:50 +0000 (22:57 +0000)]
<rdar://problem/32862652> [REGRESSION] r218374: fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html

Rebaseline.

* fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt:

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

2 years agoRebaseline fast/events/touch/document-create-touch-list tests.
ryanhaddad@apple.com [Tue, 20 Jun 2017 22:54:58 +0000 (22:54 +0000)]
Rebaseline fast/events/touch/document-create-touch-list tests.

Unreviewed test gardening.

* fast/events/touch/document-create-touch-list-crash-expected.txt:
* fast/events/touch/document-create-touch-list-ios-expected.txt:

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

2 years agoHave FrameLoadRequest takes a Frame& instead of a Frame*
dbates@webkit.org [Tue, 20 Jun 2017 22:45:18 +0000 (22:45 +0000)]
Have FrameLoadRequest takes a Frame& instead of a Frame*
https://bugs.webkit.org/show_bug.cgi?id=173614
<rdar://problem/32884890>

Reviewed by Brent Fulgham.

Source/WebCore:

* loader/ContentFilter.cpp:
(WebCore::ContentFilter::handleProvisionalLoadFailure):
* loader/FrameLoadRequest.cpp:
(WebCore::FrameLoadRequest::FrameLoadRequest):
* loader/FrameLoadRequest.h:
* page/DragController.cpp:
(WebCore::DragController::performDragOperation):

Source/WebKit/mac:

* Plugins/WebPluginController.mm:
(-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
* WebView/WebFrame.mm:
(-[WebFrame loadRequest:]):
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

Source/WebKit/win:

* Plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
* WebFrame.cpp:
(WebFrame::loadRequest):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performFrameLoadURLRequest):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadURLInFrame):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):

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

2 years agoLayoutTest inspector/canvas/create-canvas-contexts.html is a flaky timeout
mattbaker@apple.com [Tue, 20 Jun 2017 22:44:11 +0000 (22:44 +0000)]
LayoutTest inspector/canvas/create-canvas-contexts.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=173603

Reviewed by Joseph Pecoraro.

Removed test case `CheckCanvasesCleared`, which involved a page reload
and would intermittently timeout.

* inspector/canvas/create-canvas-contexts-expected.txt:
* inspector/canvas/create-canvas-contexts.html:

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

2 years agoSkip Content Security Policy check for a media request using standard schemes initiat...
dbates@webkit.org [Tue, 20 Jun 2017 22:04:31 +0000 (22:04 +0000)]
Skip Content Security Policy check for a media request using standard schemes initiated from
an element in user agent shadow tree
https://bugs.webkit.org/show_bug.cgi?id=155505
<rdar://problem/25169452>

Reviewed by Brent Fulgham.

This change makes the following tests pass on iOS 11:
    http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
    http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):

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

2 years agoUpdate test262 test expectations after r218581.
ryanhaddad@apple.com [Tue, 20 Jun 2017 20:45:36 +0000 (20:45 +0000)]
Update test262 test expectations after r218581.

Unreviewed test gardening.

* test262.yaml:

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

2 years agoREGRESSION: media/remote-control-command-seek.html is timing out
graouts@webkit.org [Tue, 20 Jun 2017 20:37:59 +0000 (20:37 +0000)]
REGRESSION: media/remote-control-command-seek.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=173615
<rdar://problem/32626498>

Reviewed by Eric Carlson.

This test assumes that we load metadata and video data that can be seeked through
at the same time, but this is incorrect. Using the "canplaythrough" event guarantees
that the video is seekable, so we switch to this event to make the test more robust.

* media/remote-control-command-seek-expected.txt:
* media/remote-control-command-seek.html:

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

2 years agoOccasional deadlocks under ensurePositionInformationIsUpToDate (incoming sync message...
timothy_horton@apple.com [Tue, 20 Jun 2017 19:46:14 +0000 (19:46 +0000)]
Occasional deadlocks under ensurePositionInformationIsUpToDate (incoming sync message with waitForAndDispatchImmediately)
https://bugs.webkit.org/show_bug.cgi?id=173570
<rdar://problem/32720928>

Reviewed by Wenson Hsieh.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::getPositionInformation): Deleted.
Get rid of getPositionInformation; it only has one caller, and it's easier
to reason about the code if it's all in one place. Also, we shouldn't
add more callers...

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView ensurePositionInformationIsUpToDate:]):
Add a return value to ensurePositionInformationIsUpToDate that indicates
whether we succeeded in that effort.

Add the flag to our waitForAndDispatchImmediately that causes the wait
to be interrupted if a sync message arrives.

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
If anything happens to interrupt our position information update, fail
in the most graceful possible way at each callsite (generally by bailing
from doing whatever action required position information).

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView positionInformationForActionSheetAssistant:]):
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant synchronouslyRetrievePositionInformation]):
(-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
(-[WKActionSheetAssistant presentationRectForIndicatedElement]):
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
Instead of constantly re-querying the position information, save it aside
when presenting an action sheet, and use it to respond to all of the
subsequent questions. Also, bail from presenting the action sheet if we fail
to retrieve correct position information.

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

2 years agoAdded additional test expectations for media/video-buffered.html.
jlewis3@apple.com [Tue, 20 Jun 2017 18:57:22 +0000 (18:57 +0000)]
Added additional test expectations for media/video-buffered.html.
https://bugs.webkit.org/show_bug.cgi?id=173611

Uneviewed test gardening.

* platform/ios/TestExpectations:

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

2 years agoRemove no-op calls to purge SQLite caches on memory pressure.
akling@apple.com [Tue, 20 Jun 2017 18:48:00 +0000 (18:48 +0000)]
Remove no-op calls to purge SQLite caches on memory pressure.
<https://webkit.org/b/173604>

Reviewed by Chris Dumez.

The implementation of _sqlite3_purgeEligiblePagerCacheMemory() is empty
since a few releases ago, so there's no point in calling it.

* page/MemoryRelease.cpp:
(WebCore::registerMemoryReleaseNotifyCallbacks):
(WebCore::registerSQLiteMemoryPressureHandler): Deleted.
* page/MemoryRelease.h:
* page/cocoa/MemoryReleaseCocoa.mm:
(WebCore::platformReleaseMemory):
(WebCore::registerSQLiteMemoryPressureHandler): Deleted.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::initializeSQLiteIfNecessary):

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

2 years agoWeb Inspector: add console messages for WebGL shader compile and program link errors...
drousso@apple.com [Tue, 20 Jun 2017 18:35:31 +0000 (18:35 +0000)]
Web Inspector: add console messages for WebGL shader compile and program link errors/warnings
https://bugs.webkit.org/show_bug.cgi?id=143236
<rdar://problem/20352149>

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/canvas/webgl/shader-compile-logging.html

* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::recycleContext):
(WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
(WebCore::WebGLRenderingContextBase::printToConsole):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::synthesizeGLError):
(WebCore::WebGLRenderingContextBase::printGLErrorToConsole): Deleted.
(WebCore::WebGLRenderingContextBase::printWarningToConsole): Deleted.
(WebCore::WebGLRenderingContextBase::printGLWarningToConsole): Deleted.
Unify console logging helper functions to all follow the same path. Additionally, errors
now generate stack traces. Shader compilation errors are now logged as well.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
* page/PageConsoleClient.h:
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
* workers/WorkerGlobalScope.h:
Add new path for logging to the console that accepts a ConsoleMessage.

LayoutTests:

* fast/canvas/webgl/fragment-shader-assertion.html:
* fast/canvas/webgl/shader-compile-logging-expected.txt: Added.
* fast/canvas/webgl/shader-compile-logging.html: Added.

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

2 years agoUnreviewed. Try to fix the build after r218594.
sbarati@apple.com [Tue, 20 Jun 2017 18:27:31 +0000 (18:27 +0000)]
Unreviewed. Try to fix the build after r218594.

* dom/Document.h:

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

2 years agoUnreviewed, rolling out r218530.
jlewis3@apple.com [Tue, 20 Jun 2017 17:53:17 +0000 (17:53 +0000)]
Unreviewed, rolling out r218530.

This revision caused multiple media stream test crashes on
Debug builds.

Reverted changeset:

"Merge MediaDevicesRequest and MediaDevicesEnumerationRequest
to tighten up code and object lifetime"
https://bugs.webkit.org/show_bug.cgi?id=173527
http://trac.webkit.org/changeset/218530

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

2 years agoMedia document experience with long-loading files is poor
graouts@webkit.org [Tue, 20 Jun 2017 17:38:35 +0000 (17:38 +0000)]
Media document experience with long-loading files is poor
https://bugs.webkit.org/show_bug.cgi?id=173575
<rdar://problem/32178119>

Reviewed by Dean Jackson.

Source/WebCore:

In order to avoid showing media controls at a different size than that of the video when we've
received enough information to determine whether it's audio or video and what the video frame size
is, we do not show any UI until we have enough information to show the controls in their correct
initial state. This works well with local files and fast-loading files, but does not work well with
invalid files, which never load and fail to ever show any UI, and files that load slowly where there
is no visible feedback that content will be visible.

Instead, we now default to showing audio controls in their loading state, which provides a seamless
transition if we will be loading an audio file since the controls are initially in the correct state,
and at least provide feedback that data is loading even if we eventually transition to a video layout.

Additionally, we remove the invalid placard background in case the media is invalid, showing only the
crossed-out play icon in the center of the page in that state.

Tests: media/modern-media-controls/media-documents/media-document-invalid.html
       media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html

* Modules/modern-media-controls/controls/media-document.css:
(:host(.media-document)): Remove "visibility: hidden" since we want the media controls to be visible
at all times.
(:host(.media-document.audio)): Add a little padding on the x-axis to ensure audio controls never snap
directly to the edges of the window.
(:host(.media-document.audio.iphone)): Remove the iPhone-specific styling since we moved it to the
general case.
(:host(.media-document.video.invalid) .placard): Remove the background from the invalid placard when
showing invalid media.
(:host(.media-document.ready)): Deleted.
* Modules/modern-media-controls/media/audio-support.js:
(AudioSupport.prototype.syncControl): Make sure we invalidate the media document layout when a media
document's media type changes.
* Modules/modern-media-controls/media/media-controller.js:
(MediaController): Instantiate the controls prior to creating the MediaDocumentController since the
MediaDocumentController will need to access the controls.
* Modules/modern-media-controls/media/media-document-controller.js:
(MediaDocumentController): Set the default layout for media controls for a media document to be audio
and in the waiting state.
(MediaDocumentController.prototype.layout): Toggle the "invalid", "audio" and "video" CSS classes for
the next possible commit to the DOM, provided we have established the media document's media type.
(MediaDocumentController.prototype.handleEvent): Deal with the "play" and "error" events to trigger
a layout.
(MediaDocumentController.prototype._mediaDocumentHasMetadata): Deleted.
(MediaDocumentController.prototype._mediaDocumentHasSize): Deleted.

LayoutTests:

Fix a test that started failing with this patch and add two new tests that check we are adding
the expected CSS classes when loading video and invalid media documents.

* media/modern-media-controls/media-documents/media-document-invalid-expected.txt: Added.
* media/modern-media-controls/media-documents/media-document-invalid.html: Added.
* media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout-expected.txt: Added.
* media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html: Added.
* media/modern-media-controls/volume-up-support/volume-up-support-expected.txt:
* media/modern-media-controls/volume-up-support/volume-up-support.html:

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

2 years agoNavigationAction has too many constructors
dbates@webkit.org [Tue, 20 Jun 2017 17:21:47 +0000 (17:21 +0000)]
NavigationAction has too many constructors
https://bugs.webkit.org/show_bug.cgi?id=173484

Reviewed by Brady Eidson.

A NavigationAction object is an immutable object that represents the details of a
navigation, including the type of a navigation (e.g. link click), what triggered
the navigation, and the external URL policy to use for the navigation. Over time
the number of NavigationAction constructor overloads (not including copy/move
constructors) has grown to 12 to support different combinations of details.
We can use default values to reduce the number of constructors to 2 (not including
copy/move constructors).

No behavior changed. So, no new tests.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Pass NavigationType::Other when
instantiating NavigationAction.
(WebCore::FrameLoader::loadDifferentDocumentItem): Fix order of arguments now that
the constructor overload that takes a NavigationType takes the Event* as the fourth argument,
not the third. Also, use C++11 brace initialization syntax when instantiating a NavigationAction.
(WebCore::createWindow):
* loader/NavigationAction.cpp: Remove unnecessary #include of header ScriptController.h.
Include header Event.h.
(WebCore::NavigationAction::NavigationAction):
* loader/NavigationAction.h: Forward declare class Event and remove #include of header Event.h.
Make copy constructor, copy assignment operator, move constructor, and move assignment operator
out-of-line to avoid the need to include header Event.h. Export the copy constructor so that it
can be used from WebKit on the Apple Windows port. Move ShouldOpenExternalURLsPolicy to be after
NavigationType to reduce the size of the class by 8 bytes.
(WebCore::NavigationAction::NavigationAction):
* loader/PolicyChecker.cpp: Include header Event.h.
* page/Performance.cpp: Ditto.
* replay/ReplayController.cpp: Ditto.

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

2 years agoRename OrientationNotifer.h to OrientationNotifier.h
annulen@yandex.ru [Tue, 20 Jun 2017 16:46:35 +0000 (16:46 +0000)]
Rename OrientationNotifer.h to OrientationNotifier.h
https://bugs.webkit.org/show_bug.cgi?id=173600

Reviewed by Youenn Fablet.

No new tests needed.

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.h:
* platform/OrientationNotifier.h: Renamed from Source/WebCore/platform/OrientationNotifer.h.
* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
* testing/Internals.h:

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

2 years agoRemove excessive include directives from WTF
annulen@yandex.ru [Tue, 20 Jun 2017 16:32:41 +0000 (16:32 +0000)]
Remove excessive include directives from WTF
https://bugs.webkit.org/show_bug.cgi?id=173553

Reviewed by Saam Barati.

Source/JavaScriptCore:

* profiler/ProfilerDatabase.cpp: Added missing include directive.
* runtime/SamplingProfiler.cpp: Ditto.

Source/WebCore:

No new tests needed.

* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h:
Added missing include directive.

Source/WTF:

* wtf/AutomaticThread.h:
* wtf/BagToHashMap.h:
* wtf/CrossThreadCopier.h:
* wtf/CrossThreadQueue.h:
* wtf/DateMath.h:
* wtf/Expected.h:
* wtf/HashMap.h:
* wtf/Indenter.h:
* wtf/MessageQueue.h:
* wtf/MetaAllocator.h:
* wtf/MetaAllocatorHandle.h:
* wtf/RandomNumberSeed.h:
* wtf/Ref.h:
* wtf/RefPtr.h:
* wtf/RunLoop.h:
* wtf/SchedulePair.h:
* wtf/StackStats.h:
* wtf/SynchronizedFixedQueue.h:
* wtf/ThreadMessage.h:
* wtf/Threading.cpp:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/WTFThreadData.h:
* wtf/WorkQueue.h:
* wtf/glib/GRefPtr.h:
* wtf/text/AtomicStringTable.h:
* wtf/text/LineBreakIteratorPoolICU.h:

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

2 years agoRemove excessive include directives from WebCore/dom
annulen@yandex.ru [Tue, 20 Jun 2017 16:31:53 +0000 (16:31 +0000)]
Remove excessive include directives from WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=173591

Reviewed by Darin Adler.

No new tests needed.

* bindings/js/JSCustomElementRegistryCustom.cpp:
* dom/Attr.h:
* dom/ChildListMutationScope.h:
* dom/ContainerNodeAlgorithms.cpp:
* dom/ContainerNodeAlgorithms.h:
* dom/CustomElementRegistry.h:
* dom/DOMRect.h:
* dom/DocumentMarkerController.h:
* dom/ElementIteratorAssertions.h:
* dom/ElementRareData.h:
* dom/EventContext.h:
* dom/EventDispatcher.h:
* dom/ExtensionStyleSheets.h:
* dom/GenericEventQueue.h:
* dom/LiveNodeList.h:
* dom/LoadableClassicScript.h:
* dom/LoadableScript.h:
* dom/MutationCallback.h:
* dom/NativeNodeFilter.h:
* dom/NodeRareData.h:
* dom/PromiseRejectionEvent.h:
* dom/PseudoElement.h:
* dom/Range.h:
* dom/RegisteredEventListener.h:
* dom/RejectedPromiseTracker.cpp:
* dom/ScopedEventQueue.h:
* dom/ScriptElement.h:
* dom/ScriptExecutionContext.h:
* dom/ScriptedAnimationController.cpp:
* dom/ScriptedAnimationController.h:
* dom/SelectorQuery.h:
* dom/StaticNodeList.h:
* dom/StaticRange.h:
* dom/default/PlatformMessagePortChannel.h:
* testing/Internals.cpp:
* workers/WorkerGlobalScope.h:

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

2 years ago[WPE] Enable appcache tests
csaavedra@igalia.com [Tue, 20 Jun 2017 15:26:10 +0000 (15:26 +0000)]
[WPE] Enable appcache tests

Unreviewed gardening.

Most of these tests are passing, so enable them. For known GTK+
failures, copy the expectations. Mark as failing deferred events
tests that have slight differences that need to be investigated.
* platform/wpe/TestExpectations:

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

2 years ago[WPE] Skip geolocation tests
csaavedra@igalia.com [Tue, 20 Jun 2017 13:07:34 +0000 (13:07 +0000)]
[WPE] Skip geolocation tests

Geolocation was disabled since r218553 and thus far tests were
only using the mock provider. Skip until we add geoclue
support.
* platform/wpe/TestExpectations:

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

2 years agoRemove excessive include directives from WebCore/css
annulen@yandex.ru [Tue, 20 Jun 2017 11:38:49 +0000 (11:38 +0000)]
Remove excessive include directives from WebCore/css
https://bugs.webkit.org/show_bug.cgi?id=173554

Reviewed by Alex Christensen.

No new tests needed.

* css/CSSComputedStyleDeclaration.h:
* css/CSSContentDistributionValue.h:
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontFace.h:
* css/CSSFontFeatureValue.h:
* css/CSSFontStyleRangeValue.h:
* css/CSSFontVariationValue.h:
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.h:
* css/CSSInheritedValue.h:
* css/CSSInitialValue.h:
* css/CSSKeyframeRule.cpp:
* css/CSSKeyframeRule.h:
* css/CSSLineBoxContainValue.h:
* css/CSSPrimitiveValue.h:
* css/CSSPrimitiveValueMappings.h:
* css/CSSPropertySourceData.h:
* css/CSSReflectValue.h:
* css/CSSRevertValue.h:
* css/CSSSelector.h:
* css/CSSStyleSheet.h:
* css/CSSToLengthConversionData.h:
* css/CSSUnsetValue.h:
* css/CSSValue.h:
* css/CSSValuePool.h:
* css/CSSVariableData.h:
* css/DeprecatedCSSOMCounter.h:
* css/DeprecatedCSSOMRGBColor.h:
* css/DeprecatedCSSOMRect.h:
* css/DeprecatedCSSOMValue.h:
* css/RuleSet.h:
* css/SelectorChecker.h:
* css/StyleBuilderConverter.h:
* css/StyleBuilderCustom.h:
* css/StyleProperties.h:
* css/StyleResolver.cpp:
* css/StyleResolver.h:
* css/StyleSheet.h:
* css/StyleSheetContents.h:
* css/ViewportStyleResolver.h:
* css/parser/CSSDeferredParser.h:
* css/parser/CSSParserIdioms.h:
* css/parser/CSSParserImpl.cpp:
* css/parser/CSSParserImpl.h:
* css/parser/CSSParserObserver.h:
* css/parser/CSSParserSelector.h:
* css/parser/CSSPropertyParserHelpers.h:
* css/parser/MediaQueryParser.cpp:
* css/parser/MediaQueryParser.h:
* css/parser/SizesAttributeParser.cpp:
* css/parser/SizesAttributeParser.h:
* html/BaseCheckableInputType.cpp:
* html/MediaController.cpp:
* html/track/TextTrack.cpp:
* html/track/TextTrackCue.cpp:
* html/track/VideoTrack.cpp:
* loader/TextTrackLoader.cpp:

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

2 years agoRevert changes in bug#160417 about extending `null` not being a derived class https...
gskachkov@gmail.com [Tue, 20 Jun 2017 10:27:41 +0000 (10:27 +0000)]
Revert changes in bug#160417 about extending `null` not being a derived class https://bugs.webkit.org/show_bug.cgi?id=169293

Reviewed by Saam Barati.

Source/JavaScriptCore:

Reverted changes in bug#160417 about extending `null` not being a derived class
according to changes in spec:
https://github.com/tc39/ecma262/commit/c57ef95c45a371f9c9485bb1c3881dbdc04524a2

* builtins/BuiltinNames.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitReturn):
* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode):

JSTests:

* stress/class-derived-from-null.js:

LayoutTests:

* js/class-syntax-extends-expected.txt:
* js/class-syntax-super-expected.txt:
* js/script-tests/class-syntax-extends.js:
* js/script-tests/class-syntax-super.js:

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

2 years ago[WTF] Enable WTF::Signals only when HAVE(MACHINE_CONTEXT) is true
utatane.tea@gmail.com [Tue, 20 Jun 2017 10:10:51 +0000 (10:10 +0000)]
[WTF] Enable WTF::Signals only when HAVE(MACHINE_CONTEXT) is true
https://bugs.webkit.org/show_bug.cgi?id=173590

Reviewed by Carlos Garcia Campos.

WTF::Signals require a feature rewriting a value of a machine context.
This is only available under HAVE(MACHINE_CONTEXT).
This patch disables WTF::Signals on !HAVE(MACHINE_CONTEXT) environments.

* wtf/threads/Signals.cpp:
* wtf/threads/Signals.h:

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

2 years ago[iOS DnD] [WK2] Remove custom logic for disambiguating long press action sheet gestur...
wenson_hsieh@apple.com [Tue, 20 Jun 2017 10:09:04 +0000 (10:09 +0000)]
[iOS DnD] [WK2] Remove custom logic for disambiguating long press action sheet gestures and drag lift
https://bugs.webkit.org/show_bug.cgi?id=173578
<rdar://problem/32825028>

Reviewed by Tim Horton.

Source/WebKit2:

Custom logic to cancel the long press action gesture recognizer in WebKit2 was added months ago to achieve
spec'ed behavior when initiating a drag on an element with an action sheet to show on long press. Now that UIKit
defers firing long-press gesture recognizers while a drag lift is recognizing, no extra work in WebKit is needed
to achieve expected behavior.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _simulateLongPressActionAtLocation:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add testing SPI for showing an action sheet popover at a given location in content view coordinates.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startDataInteractionWithImage:withIndicatorData:atClientPosition:anchorPoint:action:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView _api_dragInteraction:session:didEndWithOperation:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(longPressActionDelayAfterLift): Deleted.
(-[WKContentView performDeferredActionAtDragOrigin]): Deleted.
(-[WKContentView cancelDeferredActionAtDragOrigin]): Deleted.

Tools:

Slight tweak to ensure that DataInteractionTests.CustomActionSheetPopover still passes and verifies that showing
a custom popover does not cause dragging to fail when the popover is presented.

* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator _advanceProgress]):

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

2 years agoUnreviewed WPE gardening.
zandobersek@gmail.com [Tue, 20 Jun 2017 07:56:31 +0000 (07:56 +0000)]
Unreviewed WPE gardening.

Unskipping AES-CTR and RSA-PSS layout tests that already pass.

Adding layout test baselines for two imported W3C tests that cover AES-CBC.
The subtests there pass, but the generic baseline expects failures, so we
work around that by adding baselines that expect passing tests.

* platform/wpe/TestExpectations:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.https-expected.txt: Added.

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

2 years ago[GTK] Layout Test fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html makes...
magomez@igalia.com [Tue, 20 Jun 2017 07:45:40 +0000 (07:45 +0000)]
[GTK] Layout Test fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html makes the subsequent test case flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=173459

Reviewed by Carlos Garcia Campos.

Source/WebCore:

When destructing the VideoTextureCopierGStreamer, ensure that there's a previous gl context before trying
to make it current again. There are situations where no previous context may exist, which can trigger a crash.
Also, add DefaultImageOrientation to the switch that handles the video frame possible orientations, as it's the
value used when no rotation needs to be performed, and it's currently triggering an assertion.

Covered by existent tests.

* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):

LayoutTests:

Unskip fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html.

* platform/gtk/TestExpectations:

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

2 years ago[WTF] Rebaseline std::optional
utatane.tea@gmail.com [Tue, 20 Jun 2017 07:39:20 +0000 (07:39 +0000)]
[WTF] Rebaseline std::optional
https://bugs.webkit.org/show_bug.cgi?id=173582

Reviewed by JF Bastien.

Update the copy of our std::optional to the latest version.
It adds std::optional::has_value() and std::optional::reset().

* wtf/Optional.h:

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

2 years ago[WPE] Add initial implementation of glib API
carlosgc@webkit.org [Tue, 20 Jun 2017 07:20:16 +0000 (07:20 +0000)]
[WPE] Add initial implementation of glib API
https://bugs.webkit.org/show_bug.cgi?id=173546

Reviewed by Žan Doberšek.

.:

Add some definitions required to build WPE glib API.

* Source/cmake/OptionsWPE.cmake:

Source/WebCore/platform/gtk/po:

Add WebKitWebViewGtk.cpp to the list of files with translatable strings.

* POTFILES.in:

Source/WebKit2:

Make current API files under glib directories build in WPE, and add the minimum implementation to make it
work. For now it doesn't have web extensions API, and there are a few FIXMEs that will be fixed in follow up
commits. It doesn't include install rules yet, since it's still not ready to be installed.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* Shared/API/glib/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetActionTag):
(webkitContextMenuActionGetForContextMenuItem):
(webkitContextMenuActionGetLabel):
* Shared/API/glib/WebKitContextMenuItem.cpp:
* UIProcess/API/glib/WebKitEditorState.cpp:
(webkitEditorStateChanged):
* UIProcess/API/glib/WebKitError.cpp:
* UIProcess/API/glib/WebKitFileChooserRequest.cpp:
(webkitFileChooserRequestGetProperty):
(webkit_file_chooser_request_class_init):
* UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
(createGstInstallPluginsContext):
(webkitInstallMissingMediaPluginsPermissionRequestAllow):
* UIProcess/API/glib/WebKitNavigationAction.cpp:
* UIProcess/API/glib/WebKitNavigationActionPrivate.h:
(_WebKitNavigationAction::_WebKitNavigationAction):
* UIProcess/API/glib/WebKitNotificationPrivate.h:
* UIProcess/API/glib/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::show):
* UIProcess/API/glib/WebKitPrivate.cpp:
(toPlatformModifiers):
(toWebKitError):
(toWebCoreError):
* UIProcess/API/glib/WebKitPrivate.h:
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_set_user_agent):
(webkit_settings_set_user_agent_with_application_details):
* UIProcess/API/glib/WebKitUIClient.cpp:
* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_get_web_view):
* UIProcess/API/glib/WebKitUserContentManager.cpp:
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextConstructed):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewCreate):
(webkit_web_view_class_init):
(webkitWebViewCreatePage):
(webkitWebViewRunAsModal):
(webkitWebViewMouseTargetChanged):
(webkitWebViewEnterFullScreen):
(webkitWebViewExitFullScreen):
(webkitWebViewPopulateContextMenu):
* UIProcess/API/glib/WebKitWebViewPrivate.h:
* UIProcess/API/glib/WebKitWindowProperties.cpp:
(webkitWindowPropertiesGetProperty):
(webkitWindowPropertiesSetProperty):
(webkit_window_properties_class_init):
(webkitWindowPropertiesUpdateFromWebWindowFeatures):
* UIProcess/API/glib/WebKitWindowPropertiesPrivate.h:
* UIProcess/API/gtk/WebKitWebViewGtk.cpp: Added.
(webkitWebViewAuthenticate):
(webkitWebViewCreateJavaScriptDialog):
(webkitWebViewScriptDialog):
(fileChooserDialogResponseCallback):
(webkitWebViewRunFileChooser):
(webkit_web_view_new):
(webkit_web_view_new_with_context):
(webkit_web_view_new_with_related_view):
(webkit_web_view_new_with_settings):
(webkit_web_view_new_with_user_content_manager):
* UIProcess/API/wpe/WPEView.h:
* UIProcess/API/wpe/WebKitAuthenticationRequest.h: Added.
* UIProcess/API/wpe/WebKitAutomationSession.h: Added.
* UIProcess/API/wpe/WebKitBackForwardList.h: Added.
* UIProcess/API/wpe/WebKitBackForwardListItem.h: Added.
* UIProcess/API/wpe/WebKitContextMenu.h: Added.
* UIProcess/API/wpe/WebKitContextMenuActions.h: Added.
* UIProcess/API/wpe/WebKitContextMenuItem.h: Added.
* UIProcess/API/wpe/WebKitCookieManager.h: Added.
* UIProcess/API/wpe/WebKitCredential.h: Added.
* UIProcess/API/wpe/WebKitDefines.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitPrivate.h.
* UIProcess/API/wpe/WebKitDownload.h: Added.
* UIProcess/API/wpe/WebKitEditingCommands.h: Added.
* UIProcess/API/wpe/WebKitEditorState.h: Added.
* UIProcess/API/wpe/WebKitEnumTypes.cpp.template: Added.
* UIProcess/API/wpe/WebKitEnumTypes.h.template: Copied from Source/WebKit2/UIProcess/API/glib/WebKitNotificationPrivate.h.
* UIProcess/API/wpe/WebKitError.h: Added.
* UIProcess/API/wpe/WebKitFaviconDatabase.h: Added.
* UIProcess/API/wpe/WebKitFileChooserRequest.h: Added.
* UIProcess/API/wpe/WebKitFindController.h: Added.
* UIProcess/API/wpe/WebKitFormSubmissionRequest.h: Added.
* UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitHitTestResult.h: Added.
* UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitJavascriptResult.h: Added.
* UIProcess/API/wpe/WebKitMimeInfo.h: Added.
* UIProcess/API/wpe/WebKitNavigationAction.h: Added.
* UIProcess/API/wpe/WebKitNavigationPolicyDecision.h: Added.
* UIProcess/API/wpe/WebKitNetworkProxySettings.h: Added.
* UIProcess/API/wpe/WebKitNotification.h: Added.
* UIProcess/API/wpe/WebKitNotificationPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitPlugin.h: Added.
* UIProcess/API/wpe/WebKitPolicyDecision.h: Added.
* UIProcess/API/wpe/WebKitResponsePolicyDecision.h: Added.
* UIProcess/API/wpe/WebKitScriptDialog.h: Added.
* UIProcess/API/wpe/WebKitSecurityManager.h: Added.
* UIProcess/API/wpe/WebKitSecurityOrigin.h: Added.
* UIProcess/API/wpe/WebKitSettings.h: Added.
* UIProcess/API/wpe/WebKitURIRequest.h: Added.
* UIProcess/API/wpe/WebKitURIResponse.h: Added.
* UIProcess/API/wpe/WebKitURISchemeRequest.h: Added.
* UIProcess/API/wpe/WebKitUserContent.h: Added.
* UIProcess/API/wpe/WebKitUserContentManager.h: Added.
* UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitWebContext.h: Added.
* UIProcess/API/wpe/WebKitWebResource.h: Added.
* UIProcess/API/wpe/WebKitWebView.h: Added.
* UIProcess/API/wpe/WebKitWebViewSessionState.h: Added.
* UIProcess/API/wpe/WebKitWebViewWPE.cpp: Added.
(webkitWebViewAuthenticate):
(webkitWebViewScriptDialog):
(webkitWebViewRunFileChooser):
(webkit_web_view_new):
(webkit_web_view_new_with_context):
(webkit_web_view_new_with_related_view):
(webkit_web_view_new_with_settings):
(webkit_web_view_new_with_user_content_manager):
* UIProcess/API/wpe/WebKitWebsiteData.h: Added.
* UIProcess/API/wpe/WebKitWebsiteDataManager.h: Added.
* UIProcess/API/wpe/WebKitWindowProperties.h: Added.
* UIProcess/API/wpe/webkit.h: Added.

Tools:

Disable geolocation because WPE doesn't implement any provider and update the style checker exceptions to
include WPE glib API files.

* Scripts/webkitperl/FeatureList.pm:
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):

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

2 years agorepatchIn needs to lock the CodeBlock's lock
sbarati@apple.com [Tue, 20 Jun 2017 07:15:19 +0000 (07:15 +0000)]
repatchIn needs to lock the CodeBlock's lock
https://bugs.webkit.org/show_bug.cgi?id=173573

Reviewed by Yusuke Suzuki.

CodeBlock::propagateTransitions and CodeBlock::visitWeakly grab the CodeBlock's
lock before modifying the StructureStubInfo/PolymorphicAccess. When regenerating
an IC, we must hold the CodeBlock's to prevent the executing thread from racing
with the marking thread. repatchIn was not grabbing the lock. I haven't been
able to get it to crash, but this is needed for the same reasons that get and put IC
regeneration grab the lock.

* jit/Repatch.cpp:
(JSC::repatchIn):

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

2 years ago[GTK] Upgrade to ICU to version 57.1
carlosgc@webkit.org [Tue, 20 Jun 2017 07:11:10 +0000 (07:11 +0000)]
[GTK] Upgrade to ICU to version 57.1
https://bugs.webkit.org/show_bug.cgi?id=173538

Reviewed by Žan Doberšek.

* gtk/jhbuild.modules:

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

2 years ago[GTK] Remove unneeded modules from the jhbuild
carlosgc@webkit.org [Tue, 20 Jun 2017 07:10:02 +0000 (07:10 +0000)]
[GTK] Remove unneeded modules from the jhbuild
https://bugs.webkit.org/show_bug.cgi?id=170540

Reviewed by Michael Catanzaro.

We are building libxslt and libffi that we don't really need to build from sources.

* gtk/jhbuild.modules:

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

2 years agoWeb Inspector: create canvas content view and details sidebar panel
drousso@apple.com [Tue, 20 Jun 2017 06:48:10 +0000 (06:48 +0000)]
Web Inspector: create canvas content view and details sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=138941
<rdar://problem/19051672>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/Canvas.json:
 - Add an optional `nodeId` attribute to the `Canvas` type.
 - Add `requestNode` command for getting the node id of the backing canvas element.
 - Add `requestContent` command for getting the current image content of the canvas.

Source/WebCore:

Tests: inspector/canvas/requestContent.html
       inspector/canvas/requestNode.html

* inspector/InspectorCanvasAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::requestNode):
Gets the node id of the backing canvas element.

(WebCore::InspectorCanvasAgent::requestContent):
Gets the current image content of the canvas.

(WebCore::InspectorCanvasAgent::frameNavigated):
(WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
Minor fixes from r218376 <https://webkit.org/b/172623>.

(WebCore::InspectorCanvasAgent::buildObjectForCanvas):
Optionally send the `nodeId` of the backing canvas element if it is available.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):

Source/WebInspectorUI:

* UserInterface/Models/Canvas.js:
(WebInspector.Canvas):
(WebInspector.Canvas.fromPayload):
(WebInspector.Canvas.prototype.get displayName):
(WebInspector.Canvas.requestNode): Added.
(WebInspector.Canvas.prototype.requestContent): Added.
(WebInspector.Canvas.prototype.saveIdentityToCookie):

* UserInterface/Controllers/CanvasManager.js:
(WebInspector.CanvasManager.prototype.canvasAdded):
(WebInspector.CanvasManager.prototype.canvasRemoved):
* UserInterface/Models/Collection.js:
* UserInterface/Models/Frame.js:
(WebInspector.Frame):
(WebInspector.Frame.prototype.get canvasCollection):
(WebInspector.Frame.prototype.commitProvisionalLoad):
Create a Collection for Canvas in each Frame, and modify it when canvas events are fired.

* UserInterface/Views/CanvasContentView.css: Added.
(.content-view.canvas > .preview):
(.content-view.canvas > .preview > img):
* UserInterface/Views/CanvasContentView.js: Added.
(WebInspector.CanvasContentView):
(WebInspector.CanvasContentView.prototype.get navigationItems):
(WebInspector.CanvasContentView.prototype.shown):
(WebInspector.CanvasContentView.prototype.hidden):
(WebInspector.CanvasContentView.prototype._showPreview):
(WebInspector.CanvasContentView.prototype._updateImageGrid):
(WebInspector.CanvasContentView.prototype._showGridButtonClicked):
* UserInterface/Views/CanvasDetailsSidebarPanel.js: Added.
(WebInspector.CanvasDetailsSidebarPanel):
(WebInspector.CanvasDetailsSidebarPanel.prototype.inspect):
(WebInspector.CanvasDetailsSidebarPanel.prototype.get canvas):
(WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas):
(WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
* UserInterface/Views/CanvasTreeElement.js: Added.
(WebInspector.CanvasTreeElement):

* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onattach):
(WebInspector.FrameTreeElement.prototype.ondetach):
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype._canvasWasAdded):
(WebInspector.FrameTreeElement.prototype._canvasWasRemoved):
(WebInspector.FrameTreeElement):
* UserInterface/Base/Main.js:
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
* UserInterface/Views/ResourcesTabContentView.js:
(WebInspector.ResourcesTabContentView):
(WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
Show Canvas objects and tie them to the correct ContentView and TreeElement subclasses.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Images/Canvas.svg: Added.
* UserInterface/Views/ResourceIcons.css:
(.canvas .icon):
Added new files/rules/strings related to Canvas UI.

* UserInterface/Views/SettingsTabContentView.css:
(.content-view.settings .navigation-bar):

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView):
(WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):
Add an experimental settings toggle in the Debug view for showing canvas contexts.

* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
Drive-by fix: ensure that sorting also includes numbers, so that 1 < 2 < 10.

* UserInterface/Views/ImageResourceContentView.js:
(WebInspector.ImageResourceContentView.prototype.shown):
(WebInspector.ImageResourceContentView.prototype.hidden):
(WebInspector.ImageResourceContentView.prototype._updateImageGrid):
(WebInspector.ImageResourceContentView.prototype._showGridButtonClicked):
(WebInspector.ImageResourceContentView):
Drive-by fix: change the activated state of the Show Grid navigation item if it changes
in another view.

LayoutTests:

* inspector/canvas/requestContent-expected.txt: Added.
* inspector/canvas/requestContent.html: Added.
* inspector/canvas/requestNode-expected.txt: Added.
* inspector/canvas/requestNode.html: Added.

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

2 years ago[iOS] Always include frames in the scrolling tree when async frame scrolling is enabled
fred.wang@free.fr [Tue, 20 Jun 2017 06:06:16 +0000 (06:06 +0000)]
[iOS] Always include frames in the scrolling tree when async frame scrolling is enabled
https://bugs.webkit.org/show_bug.cgi?id=173405

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

Source/WebCore:

Currently "async frame scrolling" is ignored on iOS. This commit changes that behavior to
align on macOS and is a preliminary step to implement iframe scrolling on iOS (bug 149264).

Test: compositing/iframes/compositing-for-scrollable-iframe.html
      fast/scrolling/scrolling-tree-includes-frame.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): Do not require
compositing when "async frame scrolling" is enabled on iOS.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.h: Set the ScrollableNonMainFrameTrigger bit by
default on iOS too. RenderLayerCompositor::requiresCompositingForScrollableFrame will ignore
this change when async frame scrolling is disabled.

LayoutTests:

Add some new expectations for iOS/WK2 now that the "async frame scrolling" setting is taken
into account for the layer and scrolling trees.

* platform/ios-wk2/compositing/iframes/compositing-for-scrollable-iframe-expected.txt: Added.
A specific layer is created for the iframe.
* platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt: Added.
The frame appears in the scrolling tree.
* platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/scrolling/scrolling-tree-includes-frame-expected.txt.
Use this as a generic expectation for iOS.

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

2 years ago[Mac] Add an experimental feature setting for async frame scrolling
fred.wang@free.fr [Tue, 20 Jun 2017 06:04:55 +0000 (06:04 +0000)]
[Mac] Add an experimental feature setting for async frame scrolling
https://bugs.webkit.org/show_bug.cgi?id=173359

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

The necessary work to use compositing for frames and include them in the scrolling tree on
macOS was performed in r217726 and r217730. ScrollingTreeIncludesFrames was used to
determine when this behavior should be enabled. However, this does not work well on iOS where
ScrollingTreeIncludesFrames defaults to true and really means "include the frames in the
scrolling tree when necessary". Hence we instead introduce a new "async frame scrolling"
switch to enable the behavior on macOS, which will also be used in a follow-up commit on iOS.
This new setting is also made an "experimental feature", so that it will be more convenient
for developer to try it.

Test: compositing/iframes/compositing-for-scrollable-iframe.html
      fast/scrolling/scrolling-tree-includes-frame.html

* page/Settings.in: Declare new setting for async frame scrolling.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Also include frames in
scrolling tree when async frame scrolling is enabled.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): Rely on async frame
scrolling to decide when compositing is needed.

Source/WebKit/mac:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

* WebView/WebPreferenceKeysPrivate.h: Declare key for async frame scrolling preference.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Initialize async frame scrolling preference to false.
(-[WebPreferences asyncFrameScrollingEnabled]): Define getter for async frame scrolling.
(-[WebPreferences setAsyncFrameScrollingEnabled:]): Define setter for async frame scrolling.
* WebView/WebPreferencesPrivate.h: Declare setter and getter.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Take into account preference update for async frame
scrolling.

Source/WebKit2:

Reviewed by Simon Fraser.

* Shared/WebPreferencesDefinitions.h: Add experimental feature "async frame scrolling".
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetAsyncFrameScrollingEnabled): Add setter for async frame scrolling.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Declare setter.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setAsyncFrameScrollingEnabled): Add setter for async frame scrolling.
* WebProcess/InjectedBundle/InjectedBundle.h: Declare setter.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Take into account preference update for async frame
scrolling.

Tools:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures): Do not enable async frame scrolling for now.
(resetWebPreferencesToConsistentValues): Disable async frame scrolling by default.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting): Initalize to async frame scrolling to false.

LayoutTests:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

* compositing/iframes/compositing-for-scrollable-iframe.html: Use "async frame scrolling" for
this test.
* fast/scrolling/scrolling-tree-includes-frame.html: Ditto.

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

2 years ago[WebCrypto] Add test for ECDH SPKI imports using the ecDH algorithm identifier
zandobersek@gmail.com [Tue, 20 Jun 2017 06:00:01 +0000 (06:00 +0000)]
[WebCrypto] Add test for ECDH SPKI imports using the ecDH algorithm identifier
https://bugs.webkit.org/show_bug.cgi?id=173543

Reviewed by Jiewen Tan.

Add the ecdh-import-spki-key-ecdh-identifier.html layout test which
tests for successful import of EC keys through the SPKI format when
using the ecDH algorithm identifier (OID 1.3.132.1.12) and following
the ECDH algorithm import steps.

No implementation supports this yet, so the test is skipped on all ports.

* TestExpectations:
* crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.
* crypto/subtle/ecdh-import-spki-key-ecdh-identifier.html: Added.

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

2 years agoAX: Remove redundant AXObjectCache::textChanged(RenderObject*).
zalan@apple.com [Tue, 20 Jun 2017 05:19:44 +0000 (05:19 +0000)]
AX: Remove redundant AXObjectCache::textChanged(RenderObject*).
https://bugs.webkit.org/show_bug.cgi?id=173579
<rdar://problem/32865367>

Reviewed by Antti Koivisto.

All calls go through textChanged(Node*) method.

* accessibility/AXObjectCache.cpp:
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::getOrCreate):

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

2 years agofixed change log
darin@apple.com [Tue, 20 Jun 2017 04:20:52 +0000 (04:20 +0000)]
fixed change log

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

2 years agoMerge MediaDevicesRequest and MediaDevicesEnumerationRequest to tighten up code and...
darin@apple.com [Tue, 20 Jun 2017 04:18:47 +0000 (04:18 +0000)]
Merge MediaDevicesRequest and MediaDevicesEnumerationRequest to tighten up code and object lifetime
https://bugs.webkit.org/show_bug.cgi?id=173527

Reviewed by Sam Weinig.

Source/WebCore:

* CMakeLists.txt: Removed MediaDevicesRequest.cpp.

* Modules/mediastream/MediaDeviceInfo.cpp:
(WebCore::MediaDeviceInfo::MediaDeviceInfo): Removed unneeded ScriptExecutionContext.
(WebCore::MediaDeviceInfo::create): Ditto.
* Modules/mediastream/MediaDeviceInfo.h: Removed unnecessary derivation from
ContextDestructionObserver and ScriptExecutionContext arguments. Also removed
unused MediaDeviceInfoVector typedef.
* Modules/mediastream/MediaDeviceInfo.idl: Added ImplementationLacksVTable.

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::enumerateDevices): Call MediaDevicesEnumerationRequest
directly here instead of going through MediaDevicesRequest.

* Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Moved code from
MediaDevicesRequest in here. Put the typical counts at the top of the file.
(WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
Marked inline and changed to take a DOM promise directly rather than having
a separate class do the mapping to DOM promises.
(WebCore::MediaDevicesEnumerationRequest::start): Replaced the create function
with this. The caller doesn't actually keep a reference to the object.
Added a FIXME about the behavior, not new, where we neither resolve nor reject
the promise if there is no page object present. Updated to use the new version
of UserMediaController::from.
(WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
Added a FIXME about the issue that we don't resolve or reject the promise if
the client drops the last reference to the request without calling setDeviceInfo.
(WebCore::MediaDevicesEnumerationRequest::document): Added. Private helper.
Returns nullptr if the request is no longer active.
(WebCore::MediaDevicesEnumerationRequest::frame): Added. For use by a caller
that was getting to the frame. Uses the document function so it will return
nullptr if the request is no longer active.
(WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin): Changed
to do the work using the document function.
(WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin): Ditto.
(WebCore::MediaDevicesEnumerationRequest::contextDestroyed): Simplified. We
now can simply set a boolean when the context is destroyed, so there are no
side effects and the code is simpler.
(WebCore::removeAtypicalDevices): Renamed and tightened up the code a bit.
(WebCore::MediaDevicesEnumerationRequest::setDeviceInfo): Moved the code
here from MediaDevicesEnumerationRequest to pass the devices along.

* Modules/mediastream/MediaDevicesEnumerationRequest.h: Made the
ContextDestructionObserver use private inheritance. Cut down the includes
and removed various unneeded functions.

* Modules/mediastream/MediaDevicesRequest.cpp: Removed.
* Modules/mediastream/MediaDevicesRequest.h: Removed.

* Modules/mediastream/UserMediaController.cpp:
(WebCore::UserMediaController::UserMediaController): Use reference rather
than pointer for the client.
(WebCore::UserMediaController::~UserMediaController): Ditto.
(WebCore::provideUserMediaTo): Ditto.

* Modules/mediastream/UserMediaController.h:
Changed constructor to take a refeference, removed client function, and
changed data member to be a reference rather than a pointer.
(WebCore::UserMediaController::from): Take and return a reference rather
than taking a pointer that is checked for null.
(WebCore::UserMediaController::requestUserMediaAccess): Use reference.
(WebCore::UserMediaController::cancelUserMediaAccessRequest): Ditto.
(WebCore::UserMediaController::enumerateMediaDevices): Ditto.
(WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): Ditto.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start): Updated to use the new version
of UserMediaController::from.

* WebCore.xcodeproj/project.pbxproj: Updated for file removals.

* testing/Internals.cpp: Removed unneeded include of UserMediaController.h.

Source/WebKit2:

* UIProcess/API/C/WKUserMediaPermissionCheck.h: Fixed incorrect file name in comment.

* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Use the new frame
function from MediaDevicesEnumerationRequest rather than finding the frame with our
own code.

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

2 years ago[WebIDL] Move Touch related bindings in Document to their own IDL file
weinig@apple.com [Tue, 20 Jun 2017 03:25:45 +0000 (03:25 +0000)]
[WebIDL] Move Touch related bindings in Document to their own IDL file
https://bugs.webkit.org/show_bug.cgi?id=173521

Reviewed by Alex Christensen.

Rather than #including in the middle of an IDL file, this moves the touch related
bindings in Document.idl to a new partial interface for Document in DocumentTouch.idl.
While here, remove the custom binding for createTouchList.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::createTouchList): Deleted.
Remove createTouchList. It can be generated now.

* dom/Document.cpp:
(WebCore::Document::createTouch): Deleted.
* dom/Document.h:
Move touch related bindings code to DocumentTouch.h/cpp.
Remove DocumentIOSForward as it is no longer needed.

* dom/Document.idl:
Move touch related bindings to DocumentTouch.idl

* dom/DocumentTouch.h: Added.
* dom/DocumentTouch.cpp: Added.
(WebCore::DocumentTouch::createTouch):
Moved from Document.

(WebCore::DocumentTouch::createTouchList):
Added to aid generated binding.

* dom/DocumentTouch.idl: Added.
Moved operations from Document.h

* dom/TouchList.h:
(WebCore::TouchList::create):
(WebCore::TouchList::TouchList):
Added create that works with the bindings.

* dom/ios/TouchEvents.cpp:
Add DocumentTouchIOS.h and sort.

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

2 years agoRegression(r217570): com.apple.WebKit.Networking crash at com.apple.WebKit: WebKit...
cdumez@apple.com [Tue, 20 Jun 2017 03:17:05 +0000 (03:17 +0000)]
Regression(r217570): com.apple.WebKit.Networking crash at com.apple.WebKit: WebKit::ChildProcess::didReceiveInvalidMessage (Breaks 32-bit apps)
https://bugs.webkit.org/show_bug.cgi?id=173576
<rdar://problem/32416291>

Reviewed by Tim Horton.

The IPC encoding / decoding code cannot be architecture-specific because a 32bit UIProcess
talks to a 64bit NetworkProcess. The WEB_RTC build time flag is enabled on 64bit only.
Therefore, we should not use #if ENABLE(WEB_RTC) in IPC encoding / decoding code.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:

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

2 years agoUnreviewed, build fix for ARM
utatane.tea@gmail.com [Tue, 20 Jun 2017 03:14:30 +0000 (03:14 +0000)]
Unreviewed, build fix for ARM

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::internalCompare32):

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

2 years ago[WTF] Include execinfo.h and dlfcn.h based on platform defines
utatane.tea@gmail.com [Tue, 20 Jun 2017 02:59:31 +0000 (02:59 +0000)]
[WTF] Include execinfo.h and dlfcn.h based on platform defines
https://bugs.webkit.org/show_bug.cgi?id=173531

Reviewed by Alex Christensen.

execinfo.h and dlfcn.h can be missing in some libc libraries.
When including it, we should honor platform defines like HAVE(DLADDR).

* wtf/StackTrace.cpp:

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

2 years ago[DFG] More ArrayIndexOf fixups for various types
utatane.tea@gmail.com [Tue, 20 Jun 2017 02:46:08 +0000 (02:46 +0000)]
[DFG] More ArrayIndexOf fixups for various types
https://bugs.webkit.org/show_bug.cgi?id=173176

Reviewed by Saam Barati.

JSTests:

* stress/array-indexof-arraystorage.js: Added.
(shouldBe):
(indexOfInt32Other):
(indexOfInt32Cell):
(indexOfInt32Boolean):
(indexOfDoubleOther):
(indexOfDoubleCell):
(indexOfDoubleBoolean):
(indexOfInt32):
(indexOfDouble):
* stress/array-indexof-constant-folding.js: Added.
(shouldBe):
(indexOfInt32Other):
(indexOfInt32Cell):
(indexOfInt32Boolean):
(indexOfDoubleOther):
(indexOfDoubleCell):
(indexOfDoubleBoolean):
* stress/array-indexof-hole-and-other.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof-other.js: Added.
(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):
* stress/array-indexof-symbol.js: Added.
(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):

Source/JavaScriptCore:

This patch further expands coverage of ArrayIndexOf optimization in DFG and FTL.

1. We attempt to fold ArrayIndexOf to constant (-1) if we know that its array
never contains the given search value.

2. We support Symbol and Other specialization additionally. Especially, Other is
useful because null/undefined can be used as a sentinel value.

One interesting thing is that Array.prototype.indexOf does not consider holes as
undefineds. Thus,

    var array = [,,,,,,,];
    array.indexOf(undefined); // => -1

This can be trivially achieved in JSC because Empty and Undefined are different values.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupArrayIndexOf):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):
(JSC::DFG::SpeculativeJIT::speculateOther):
* dfg/DFGSpeculativeJIT.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):

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

2 years ago[Cocoa] The system Japanese font cannot be italicized
mmaxfield@apple.com [Tue, 20 Jun 2017 02:28:18 +0000 (02:28 +0000)]
[Cocoa] The system Japanese font cannot be italicized
https://bugs.webkit.org/show_bug.cgi?id=173300
<rdar://problem/31805407>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Items in the system font cascade list may lie about whether or not they support italics.
In order to get the truth, we need to use the physical font underlying the font in question,
because this one won't lie. Then, we can interrogate this physical font about its traits
in order to synthesize italics correctly.

Test: fast/text/system-font-japanese-synthetic-italic.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::lookupFallbackFont):
* platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
(WebCore::FontFamilySpecificationCoreText::fontRanges):

LayoutTests:

* fast/text/system-font-japanese-synthetic-italic-expected-mismatch.html: Added.
* fast/text/system-font-japanese-synthetic-italic.html: Added.
* platform/mac/TestExpectations: This codepath doesn't work in El Capitan.

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

2 years ago[cURL] Move file scope static variables into function scopes
commit-queue@webkit.org [Tue, 20 Jun 2017 01:47:00 +0000 (01:47 +0000)]
[cURL] Move file scope static variables into function scopes
https://bugs.webkit.org/show_bug.cgi?id=173567

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-19
Reviewed by Alex Christensen.

* platform/network/curl/SSLHandle.cpp:
(WebCore::allowedHosts):
(WebCore::allowedClientHosts):
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::addAllowedClientCertificate):
(WebCore::setSSLClientCertificate):
(WebCore::sslIgnoreHTTPSCertificate):
(WebCore::certVerifyCallback):

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

2 years agoUnreviewed, partial rollout of r218501 to address crashes on iOS.
cdumez@apple.com [Tue, 20 Jun 2017 01:23:34 +0000 (01:23 +0000)]
Unreviewed, partial rollout of r218501 to address crashes on iOS.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink):

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

2 years agoWeb Inspector: Unify contextmenu items for all node links/previews
drousso@apple.com [Tue, 20 Jun 2017 01:17:02 +0000 (01:17 +0000)]
Web Inspector: Unify contextmenu items for all node links/previews
https://bugs.webkit.org/show_bug.cgi?id=173187

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ContextMenuUtilities.js:
(WebInspector.appendContextMenuItemsForDOMNode.didGetFunctionDetails): Added.
(WebInspector.appendContextMenuItemsForDOMNode.didGetProperty): Added.
(WebInspector.appendContextMenuItemsForDOMNode.didResolveNode): Added.
(WebInspector.appendContextMenuItemsForDOMNode): Added.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
(WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Deleted.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.revealElement): Deleted.
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement): Deleted.
(WebInspector.DOMTreeOutline.prototype._populateContextMenu): Deleted.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
Unify common DOM node context menu actions into a single helper function.

* UserInterface/Base/DOMUtilities.js:
(WebInspector.linkifyNodeReference):
(WebInspector.linkifyNodeReferenceElement):
Rework parameters to use options dictionary.

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

2 years agoUnreviewed, adding myself to contributors.json
guijemont@igalia.com [Tue, 20 Jun 2017 01:04:15 +0000 (01:04 +0000)]
Unreviewed, adding myself to contributors.json

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

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

2 years ago[ARMv6][DFG] ARM MacroAssembler is always emitting cmn when immediate is 0
ticaiolima@gmail.com [Tue, 20 Jun 2017 00:50:23 +0000 (00:50 +0000)]
[ARMv6][DFG] ARM MacroAssembler is always emitting cmn when immediate is 0
https://bugs.webkit.org/show_bug.cgi?id=172972

Reviewed by Mark Lam.

We are changing internalCompare32 implementation in ARM
MacroAssembler to emit "cmp" when the "right.value" is 0.
It is generating wrong comparison cases, since the
semantics of cmn is opposite of cmp[1]. One case that it's breaking is
"branch32(MacroAssembler::Above, gpr, TrustedImm32(0))", where ends
resulting in following assembly code:

```
cmn $r0, #0
bhi <address>
```

However, as cmn is similar to "adds", it will never take the branch
when $r0 > 0. In that case, the correct opcode is "cmp". With this
patch we will fix current broken tests that uses
"branch32(MacroAssembler::Above, gpr, TrustedImm32(0))",
such as ForwardVarargs, Spread and GetRestLength.

[1] - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Cihiddid.html

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::internalCompare32):

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

2 years agoImprove debugging ability of some webrtc tests
commit-queue@webkit.org [Mon, 19 Jun 2017 23:53:00 +0000 (23:53 +0000)]
Improve debugging ability of some webrtc tests
https://bugs.webkit.org/show_bug.cgi?id=173549

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-19
Reviewed by Eric Carlson.

Improve debugging ability for first two tests.
Improve reliability for the next three tests.

* webrtc/audio-replace-track-expected.txt:
* webrtc/audio-replace-track.html: Checking connected state.
* webrtc/video-mute-expected.txt:
* webrtc/video-mute.html: Ditto.
* webrtc/video-replace-track-to-null.html: Improving reliability of test.
* webrtc/video-rotation.html: Adding some delay before testing black frames and increasing delay between the tests..
* webrtc/video-unmute.html: Using counter based testing of black frames.

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

2 years ago[Cocoa] implement URLSession:task:needNewBodyStream: delegate method
darin@apple.com [Mon, 19 Jun 2017 23:51:00 +0000 (23:51 +0000)]
[Cocoa] implement URLSession:task:needNewBodyStream: delegate method
https://bugs.webkit.org/show_bug.cgi?id=173551
rdar://problem/32250512

Source/WebCore:

Reviewed by Alex Christensen.

Covered by http/tests/misc/form-blob-challenge.html

* WebCore.xcodeproj/project.pbxproj: Removed NSURLRequestSPI.h.

* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::createHTTPBodyCFReadStream): Factored this out from setHTTPBody.
(WebCore::setHTTPBody): Factored out the function above.
* platform/network/cf/FormDataStreamCFNet.h: Added createHTTPBodyCFReadStream.

* platform/network/cocoa/ResourceRequestCocoa.mm: Use CFNetworkSPI.h.
* platform/network/ios/ResourceRequestIOS.mm: Ditto.

* platform/network/mac/FormDataStreamMac.h: Added createHTTPBodyNSInputStream.
* platform/network/mac/FormDataStreamMac.mm:
(WebCore::createHTTPBodyNSInputStream): Added/

* platform/network/mac/ResourceHandleMac.mm: Use CFNetworkSPI.h.
* platform/network/mac/ResourceRequestMac.mm: Ditto.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Ditto.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: Ditto.

* platform/network/mac/WebCoreURLResponse.h: Moved SPI declarations from
here into CFNetworkSPI.h.

* platform/spi/cf/CFNetworkSPI.h: Use #pragma once, consolidated SPI that was
defined in scattered locations.

* platform/spi/cocoa/NSURLRequestSPI.h: Removed. Superceded by CFNetworkSPI.h.

Source/WebKit2:

Reviewed by Alex Christensen.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate existingTask:]): Added helper method.
(-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
Updated to use existingTask: method.
(-[WKNetworkSessionDelegate URLSession:task:needNewBodyStream:]): Added.
(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
Updated to use existingTask: method.
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Ditto.
(WebKit::globalAllowsCellularAccess): Deleted. Just use a normal global.
(WebKit::globalLegacyCustomProtocolManager): Deleted. Just use a normal global.
(WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager): Updated for normal global.
(WebKit::NetworkSessionCocoa::setAllowsCellularAccess): Ditto.
(WebKit::NetworkSessionCocoa::defaultSession): Ditto.
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Ditto.

LayoutTests:

Reviewed by Alex Christensen.

* http/tests/misc/form-blob-challenge-expected.txt: Added.
* http/tests/misc/form-blob-challenge.html: Added.
* http/tests/misc/resources/basic-echo-post.php: Added.

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

2 years agoVarious IndexedDB crashes as an after effect of previous test.
beidson@apple.com [Mon, 19 Jun 2017 23:19:11 +0000 (23:19 +0000)]
Various IndexedDB crashes as an after effect of previous test.
<rdar://problem/31418761> and https://bugs.webkit.org/show_bug.cgi?id=170436

Reviewed by Chris Dumez.

No new test (No consistent test possible, in practice covered by all existing IDB tests)

This is timing related, where a UniqueIDBDatabase can be destroyed on the main thread while
it still has one task left to try to execute on the IDBServer thread.

The background thread tasks don't Ref<> the UniqueIDBDatabase, so even though task execution
took a Ref<> protector, there was still a small window for a race.

Should be closed up by making the background thread tasks themselves protect this.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

2 years agoAdjusted test ecpectaions for webrtc/libwebrtc/descriptionGetters.html.
jlewis3@apple.com [Mon, 19 Jun 2017 22:47:43 +0000 (22:47 +0000)]
Adjusted test ecpectaions for webrtc/libwebrtc/descriptionGetters.html.
https://bugs.webkit.org/show_bug.cgi?id=171703

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years agotest262: Completion values for control flow do not match the spec
commit-queue@webkit.org [Mon, 19 Jun 2017 22:04:20 +0000 (22:04 +0000)]
test262: Completion values for control flow do not match the spec
https://bugs.webkit.org/show_bug.cgi?id=171265

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-06-19
Reviewed by Saam Barati.

JSTests:

* stress/completion-value.js:
Condensed test for completion values in top level statements.

* stress/super-get-by-id.js:
ClassDeclaration when evaled no longer produce values. Convert
these to ClassExpressions so they produce the class value.

* ChakraCore/test/GlobalFunctions/evalreturns3.baseline-jsc:
This is a progression for currect spec behavior.

* mozilla/mozilla-tests.yaml:
This test is now outdated, so mark it as failing for that reason.

* test262.yaml:
Passing all "cptn" completion value tests.

Source/JavaScriptCore:

* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::shouldBeConcernedWithCompletionValue):
When we care about having proper completion values (global code
in programs, modules, and eval) insert undefined results for
control flow statements.

* bytecompiler/NodesCodegen.cpp:
(JSC::SourceElements::emitBytecode):
Reduce writing a default `undefined` value to the completion result to
only once before the last statement we know will produce a value.

(JSC::IfElseNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
Insert an undefined to handle cases where code may break out of an
if/else or with statement (break/continue).

(JSC::TryNode::emitBytecode):
Same handling for break cases. Also, finally block statement completion
values are always ignored for the try statement result.

(JSC::ClassDeclNode::emitBytecode):
Class declarations, like function declarations, produce an empty result.

* parser/Nodes.cpp:
(JSC::SourceElements::lastStatement):
(JSC::SourceElements::hasCompletionValue):
(JSC::SourceElements::hasEarlyBreakOrContinue):
(JSC::BlockNode::lastStatement):
(JSC::BlockNode::singleStatement):
(JSC::BlockNode::hasCompletionValue):
(JSC::BlockNode::hasEarlyBreakOrContinue):
(JSC::ScopeNode::singleStatement):
(JSC::ScopeNode::hasCompletionValue):
(JSC::ScopeNode::hasEarlyBreakOrContinue):
The only non-trivial cases need to loop through their list of statements
to determine if this has a completion value or not. Likewise for
determining if there is an early break / continue, meaning a break or
continue statement with no preceding statement that has a completion value.

* parser/Nodes.h:
(JSC::StatementNode::next):
(JSC::StatementNode::hasCompletionValue):
Helper to check if a statement nodes produces a completion value or not.

Tools:

* Scripts/run-jsc-stress-tests:
Include a :failDueToOutdatedOrBadTest to mark failures with justification.

LayoutTests:

* js/eval-throw-return-expected.txt:
* js/kde/completion-expected.txt:
* js/kde/script-tests/completion.js:
* js/script-tests/eval-throw-return.js:
* sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A9-expected.txt:
* sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A9.1-expected.txt:
Rebaseline expectations. These are all outdated. In fact the sputnik
tests were imported into test262 and modified for ES2015.

* js/script-tests/function-toString-vs-name.js:
ClassDeclarations on their own don't produce a value. So output
the class value so the test behaves as expected.

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

2 years ago[WebIDL] Add support for serializers that have members that are themselves serializer...
commit-queue@webkit.org [Mon, 19 Jun 2017 21:55:00 +0000 (21:55 +0000)]
[WebIDL] Add support for serializers that have members that are themselves serializers (or inherit being a serializer from a parent)
https://bugs.webkit.org/show_bug.cgi?id=173395

Patch by Sam Weinig <sam@webkit.org> on 2017-06-19
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/DOMQuad-serialization.html

* bindings/scripts/CodeGenerator.pm:
(InheritsSerializable):
Helper to determine if an interface inherits from any interfaces
that are serializable. This is necessary because an attribute is
serializable even if its interface is not marked as serializable.

(IsSerializableAttribute):
Check ancestor interfaces as well to determine serializability.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateSerializerDefinition):
Specialize attributes that are serializable interfaces to call its interfaces
serialize function, thus allowing nested objects to be serialized.

* dom/DOMQuad.idl:
Add serializer.

* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: Added.
* bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h: Added.
* bindings/scripts/test/TestSerialization.idl:
* bindings/scripts/test/TestSerializationIndirectInheritance.idl: Added.
Add and update tests.

LayoutTests:

* fast/css/DOMQuad-serialization-expected.txt: Added.
* fast/css/DOMQuad-serialization.html: Added.
Add test for DOMQuad serialization, now that it is supported.

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

2 years agoUnreviewed, rolling out r218505.
commit-queue@webkit.org [Mon, 19 Jun 2017 21:27:05 +0000 (21:27 +0000)]
Unreviewed, rolling out r218505.
https://bugs.webkit.org/show_bug.cgi?id=173563

"It would break internal builds" (Requested by youenn on
#webkit).

Reverted changeset:

"[WebRTC] Prevent capturing at unconventional resolutions when
using the SW encoder on Mac"
https://bugs.webkit.org/show_bug.cgi?id=172602
http://trac.webkit.org/changeset/218505

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

2 years agoOpening certain mails brings up a mail that grows indefinitely.
zalan@apple.com [Mon, 19 Jun 2017 21:22:56 +0000 (21:22 +0000)]
Opening certain mails brings up a mail that grows indefinitely.
https://bugs.webkit.org/show_bug.cgi?id=173562
<rdar://problem/32766579>

Reviewed by Tim Horton.

Source/WebCore:

This reverts the logic where m_autoSizeContentSize always reflects the final layout's.
When the ICB's height is 100%, it causes infinite recursion.
See also webkit.org/b/173561.

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

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:
(TEST):

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

2 years ago[iOS DnD] Support .zip archives for file uploads via drag and drop
wenson_hsieh@apple.com [Mon, 19 Jun 2017 21:12:28 +0000 (21:12 +0000)]
[iOS DnD] Support .zip archives for file uploads via drag and drop
https://bugs.webkit.org/show_bug.cgi?id=173511
<rdar://problem/32521025>

Reviewed by Tim Horton.

Source/WebCore:

Allows dropped .zip archives to be uploaded as files by accepting types conforming to either
"public.zip-archive" or "public.content" as potential file types. Initially, I opted to accept the more general
"public.data" type; however, this includes UTIs such as "public.url" that should not be represented as files, so
this is a more targeted fix that allows us to very easily add additional content types in the future by adding
more types to supportedFileUploadPasteboardTypes.

Tests:
DataInteractionTests.ExternalSourceZIPArchiveToUploadArea
DataInteractionTests.ExternalSourceZIPArchiveAndURLToSingleFileInput

* page/mac/DragControllerMac.mm:
(WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod):
* platform/Pasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::supportedWebContentPasteboardTypes):
(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Rename supportedPasteboardTypes to supportedWebContentPasteboardTypes, and also introduce
supportedFileUploadPasteboardTypes which returns an list of types, such that if a type conforms to any type in
this array, that type may be represented as a file. So far, this list contains "public.content" and
"public.zip-archive".

(WebCore::Pasteboard::types):
(WebCore::Pasteboard::supportedPasteboardTypes): Deleted.
* platform/ios/WebItemProviderPasteboard.mm:
(typeConformsToTypes):

Remove -typeIsAppropriateForSupportedTypes: and replace it with typeConformsToTypes. Use this both when
determining the number of files on the pasteboard, and when determining preferred UTIs to load when dropping.

(-[WebItemProviderPasteboard numberOfFiles]):
(-[WebItemProviderPasteboard typeIdentifierToLoadForRegisteredTypeIdentfiers:]):
(-[WebItemProviderPasteboard typeIsAppropriateForSupportedTypes:]): Deleted.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::containsFiles):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Tools:

Adds tests for dropping .zip archives into a JavaScript-based file upload area, as well as into a file input.
Also verifies that URLs are not handled as file drops. See WebCore ChangeLog for more details.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/compressed-files.zip: Added.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(testZIPArchive):
(TestWebKitAPI::TEST):

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

2 years ago[WebIDL] Remove custom binding for Document.getCSSCanvasContext()
commit-queue@webkit.org [Mon, 19 Jun 2017 21:01:19 +0000 (21:01 +0000)]
[WebIDL] Remove custom binding for Document.getCSSCanvasContext()
https://bugs.webkit.org/show_bug.cgi?id=173516

Patch by Sam Weinig <sam@webkit.org> on 2017-06-19
Reviewed by Chris Dumez.

* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::visitAdditionalChildren):
(WebCore::JSDocument::getCSSCanvasContext): Deleted.
* dom/Document.cpp:
(WebCore::Document::getCSSCanvasContext):
* dom/Document.h:
* dom/Document.idl:
Use a Variant to pass the context and type to the bindings.

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

2 years agoUnreviewed, rolling out r218503.
ryanhaddad@apple.com [Mon, 19 Jun 2017 20:54:14 +0000 (20:54 +0000)]
Unreviewed, rolling out r218503.

This change broke the macOS Sierra build.

Reverted changeset:

"Removed unused lambda captures from WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=173555
http://trac.webkit.org/changeset/218503

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

2 years ago[WebRTC] Prevent capturing at unconventional resolutions when using the SW encoder...
commit-queue@webkit.org [Mon, 19 Jun 2017 20:42:04 +0000 (20:42 +0000)]
[WebRTC] Prevent capturing at unconventional resolutions when using the SW encoder on Mac
https://bugs.webkit.org/show_bug.cgi?id=172602
<rdar://problem/32407693>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-19
Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Adding a parameter to disable hardware encoder.

* Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h:
* Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm:
(webrtc::H264VideoToolboxEncoder::CreateCompressionSession):

Source/WebCore:

Test: platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html

Add internal API to switch on/off hardware H264 encoder.
Add checks for standard size. If using a software encoder and frame size is not standard,
the session is destroyed and no frame is sent at all.

Added tests based on captureStream.
Fixed the case of capturing a canvas which size is changing.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):
* platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.h:
* platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm:
(WebCore::H264VideoToolboxEncoder::setHardwareEncoderForWebRTCAllowed):
(WebCore::H264VideoToolboxEncoder::hardwareEncoderForWebRTCAllowed):
(WebCore::isUsingSoftwareEncoder):
(WebCore::H264VideoToolboxEncoder::CreateCompressionSession):
(isStandardFrameSize): Added.
(isUsingSoftwareEncoder): Added.
* testing/Internals.cpp:
(WebCore::Internals::setH264HardwareEncoderAllowed):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* platform/mac-wk1/TestExpectations: Mark captureCanvas as flaky due to AVDCreateGPUAccelerator: Error loading GPU renderer" appearing on some bots.
* platform/mac/webrtc/captureCanvas-webrtc-software-encoder-expected.txt: Copied from LayoutTests/webrtc/captureCanvas-webrtc-expected.txt.
* platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html: Added.
* webrtc/captureCanvas-webrtc-expected.txt:
* webrtc/captureCanvas-webrtc.html:

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

2 years ago[iOS DnD] [WK2] Add an internal hook to change the drag lift delay
wenson_hsieh@apple.com [Mon, 19 Jun 2017 20:25:50 +0000 (20:25 +0000)]
[iOS DnD] [WK2] Add an internal hook to change the drag lift delay
https://bugs.webkit.org/show_bug.cgi?id=173523
<rdar://problem/32224510>

Reviewed by Tim Horton.

Add a new private property on WKWebViewConfiguration, _dragLiftDelay, for changing the UIDragInteraction's lift
delay to one of three values: short, medium or long. The short setting simply uses UIKit's default drag lift
delay (at the time of writing, this is 325ms); medium and long are 500ms and 650ms, respectively.

In combination with an internal switch to toggle between lift delays, the purpose of this change is to make it
easier to choose a drag lift delay for web content that doesn't easily cause unintended dragging while panning.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(toDragLiftDelay):

Converts an integer (e.g. retrieved from user defaults) to a drag lift delay type.

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration encodeWithCoder:]):
(-[WKWebViewConfiguration initWithCoder:]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _dragLiftDelay]):

Add boilerplate plumbing for the _dragLiftDelay setting.

(-[WKWebViewConfiguration _setDragLiftDelay:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Add _dragLiftDelay to as a private property of WKWebViewConiguration.

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

Convert the web view configuration's _WKDragLiftDelay to an actual time interval.

(-[WKContentView setupDataInteractionDelegates]):

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

2 years agoRemoved unused lambda captures from WebKit2
annulen@yandex.ru [Mon, 19 Jun 2017 20:14:54 +0000 (20:14 +0000)]
Removed unused lambda captures from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=173555

Reviewed by Alex Christensen.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):

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

2 years agoCleanup IconLoader stuff when a DocumentLoader detaches from its frame.
beidson@apple.com [Mon, 19 Jun 2017 20:12:41 +0000 (20:12 +0000)]
Cleanup IconLoader stuff when a DocumentLoader detaches from its frame.
<rdar://problem/31418761> and https://bugs.webkit.org/show_bug.cgi?id=173473

Reviewed by Alex Christensen.

No new tests (No known change in behavior)

I discovered the need to make these changes here due to a transient bug
introduced in r218015 but already explicitly fixed in r218409.

This change adds an assert to guard against a detached DocumentLoader having active IconLoaders.

It also clears out all pending IconLoader and icon load decisions when stopLoading() is called,
as even attempting to start an icon load after detachment is a waste of cycles.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoading): Also explicitly clear all IconLoaders and icons pending
  load decision.
(WebCore::DocumentLoader::finishedLoadingIcon): Assert that this DocumentLoader is not detached.

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

2 years agoUse WTF::Function instead of std::function in more places in WebCore/
cdumez@apple.com [Mon, 19 Jun 2017 19:53:16 +0000 (19:53 +0000)]
Use WTF::Function instead of std::function in more places in WebCore/
https://bugs.webkit.org/show_bug.cgi?id=173535

Reviewed by Antti Koivisto.

Use WTF::Function instead of std::function in more places in WebCore/ to avoid copying.

Source/WebCore:

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::matchedParent):
* accessibility/AccessibilityObject.h:
* animation/DocumentAnimation.cpp:
(WebCore::DocumentAnimation::getAnimations):
* animation/DocumentAnimation.h:
(WebCore::DocumentAnimation::getAnimations):
* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
* contentextensions/CombinedURLFilters.h:
* contentextensions/DFACombiner.cpp:
(WebCore::ContentExtensions::DFACombiner::combineDFAs):
* contentextensions/DFACombiner.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::traverseSubresources):
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::traverseSubresources):
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::traverseSubresources):
* css/CSSFontFaceSrcValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::traverseSubresources):
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::traverseSubresources):
* css/CSSImageValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::traverseSubresources):
* css/CSSValue.h:
* css/CSSValueList.cpp:
(WebCore::CSSValueList::traverseSubresources):
* css/CSSValueList.h:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::traverseSubresources):
* css/StyleProperties.h:
* css/StyleSheetContents.cpp:
(WebCore::traverseSubresourcesInRules):
(WebCore::StyleSheetContents::traverseSubresources):
* css/StyleSheetContents.h:
* dom/Element.cpp:
(WebCore::Element::getAnimations):
* editing/TextIterator.cpp:
(WebCore::findPlainTextMatches):
(WebCore::findClosestPlainText):
(WebCore::findPlainText):
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::animationControllerForPopup):
* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::perform):
(WebCore::AsyncFileStream::getSize):
(WebCore::AsyncFileStream::openForRead):
(WebCore::AsyncFileStream::read):
* fileapi/AsyncFileStream.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):
* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
* loader/FrameLoaderClient.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/archive/cf/LegacyWebArchive.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::forEachResource):
(WebCore::MemoryCache::forEachSessionResource):
* loader/cache/MemoryCache.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::showModalDialog):
* page/DOMWindow.h:
* page/FrameView.cpp:
(WebCore::FrameView::applyRecursivelyWithVisibleRect):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::forEachPage):
(WebCore::Page::decrementNestedRunLoopCount):
(WebCore::Page::whenUnnested):
* page/Page.h:
* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
(WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer):
(WebCore::WheelEventTestTrigger::triggerTestTimerFired):
* page/WheelEventTestTrigger.h:
* page/WindowFeatures.cpp:
(WebCore::processFeaturesString):
* page/WindowFeatures.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::RingBuffer::forEach):
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
(WebCore::WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
(WebCore::WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen):
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
(WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setVideoFullscreenLayer):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayer::setVideoFullscreenLayer):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setVideoFullscreenLayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h:
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::setUpPolicyListener):
(-[WebFramePolicyListener initWithFrame:policyFunction:]):
(-[WebFramePolicyListener initWithFrame:policyFunction:appLinkURL:]):

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::setUpPolicyListener):
(WebFrameLoaderClient::receivedPolicyDecision):
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::setUpPolicyListener):
(WebKit::WebFrame::invalidatePolicyListener):
* WebProcess/WebPage/WebFrame.h:

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

2 years agoRebaseline js/dom/global-constructors-attributes.html.
ryanhaddad@apple.com [Mon, 19 Jun 2017 18:41:42 +0000 (18:41 +0000)]
Rebaseline js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:

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

2 years ago[WK2] Add WKProcessPool SPI to efficiently reset all plugin load client policies
cdumez@apple.com [Mon, 19 Jun 2017 18:21:58 +0000 (18:21 +0000)]
[WK2] Add WKProcessPool SPI to efficiently reset all plugin load client policies
https://bugs.webkit.org/show_bug.cgi?id=173472
<rdar://problem/28858817>

Reviewed by Antti Koivisto.

Follow-up to r218419 to avoid copying the HashMap unnecessarily.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resetPluginLoadClientPolicies):
* UIProcess/WebProcessPool.h:

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

2 years agoUse WTF::Function instead of std::function in WebCore/Modules
cdumez@apple.com [Mon, 19 Jun 2017 17:44:20 +0000 (17:44 +0000)]
Use WTF::Function instead of std::function in WebCore/Modules
https://bugs.webkit.org/show_bug.cgi?id=173534

Reviewed by Alex Christensen.

Use WTF::Function instead of std::function in WebCore/Modules to avoid
copying.

* Modules/applepay/PaymentCoordinatorClient.h:
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/legacy/LegacyCDM.cpp:
(WebCore::CDMFactory::CDMFactory):
(WebCore::CDM::registerCDMFactory):
* Modules/encryptedmedia/legacy/LegacyCDM.h:
* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::changeActiveMediaElements):
(WebCore::MediaSession::safelyIterateActiveMediaElements):
* Modules/mediasession/MediaSession.h:
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::matchTransceiver):
* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::forEach):
* Modules/mediastream/MediaStreamRegistry.h:

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

2 years agoA cloned MediaStreamTrack should mute independently other tracks using the same source
commit-queue@webkit.org [Mon, 19 Jun 2017 17:12:57 +0000 (17:12 +0000)]
A cloned MediaStreamTrack should mute independently other tracks using the same source
https://bugs.webkit.org/show_bug.cgi?id=172831
<rdar://problem/32518527>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-19
Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/clone-audio-track.html

Move enabled handling in MediaStreamTrackPrivate instead of RealtimeMediaSource.
Move WebRTC and WebAudio customers of RealtimeMediaSource to MediaStreamTrackPrivate.
Move creation of WebAudio provider to MediaStreamTrackPrivate.

This allows changing some parameters of tracks having the same source independently.
Using this for enabled track attribute.

We no longer stop generating frames in case track is disabled.
This should be added back as an optimization in a follow-up.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::addTrack):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::replaceTrack):
* Modules/webaudio/MediaStreamAudioSource.cpp:
* Modules/webaudio/MediaStreamAudioSource.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::create):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::setEnabled):
(WebCore::MediaStreamTrackPrivate::audioSourceProvider):
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
* platform/mediastream/MediaStreamTrackPrivate.h:
(WebCore::MediaStreamTrackPrivate::Observer::audioSamplesAvailable):
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::removeObserver):
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVMediaCaptureSource.h:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):
* platform/mediastream/mac/CoreAudioCaptureSource.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
(WebCore::MockRealtimeAudioSourceMac::render):
* platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
(WebCore::RealtimeIncomingAudioSource::~RealtimeIncomingAudioSource):
(WebCore::RealtimeIncomingAudioSource::OnData):
* platform/mediastream/mac/RealtimeIncomingAudioSource.h:
* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
(WebCore::RealtimeIncomingVideoSource::pixelBufferFromVideoFrame):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::setSource):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::initializeFromSource):
* platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::create):
(WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::generateFrame):
* platform/spi/cocoa/PassKitSPI.h:

Source/WebKit2:

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::Source::setStorage):

LayoutTests:

* webrtc/clone-audio-track.html: Added.
* webrtc/video-disabled-black.html:
* webrtc/video-unmute-expected.txt:
* webrtc/video-unmute.html:

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

2 years agoFix Ref to deref before assignment, add tests for this to RefPtr, Ref, Function
darin@apple.com [Mon, 19 Jun 2017 17:01:14 +0000 (17:01 +0000)]
Fix Ref to deref before assignment, add tests for this to RefPtr, Ref, Function
https://bugs.webkit.org/show_bug.cgi?id=173526

Reviewed by Sam Weinig.

Source/WTF:

* wtf/Ref.h: Changed operator= to not be defined inside the class definition.
Added swap functions. Changed operator= implementations to use swap in the
conventional manner, the same way that RefPtr does.

Tools:

* TestWebKitAPI/CMakeLists.txt: Added Function.cpp.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.

* TestWebKitAPI/Tests/WTF/Function.cpp: Added. Contains basic tests and some
tests for assignment before destruction ones.

* TestWebKitAPI/Tests/WTF/MoveOnly.h: Added a () operator so this can be used
as a function, so it can be used in WTF::Function tests.

* TestWebKitAPI/Tests/WTF/Ref.cpp: Use EXPECT macros insead of ASSERT.
Added tests for swap and for assignment before deref.

* TestWebKitAPI/Tests/WTF/RefLogger.cpp: Stopped using inlining; no good reason
to inline everything. Also removed the unnecessary clearing of the log every time
the DerivedRefLogger constructor is called.
* TestWebKitAPI/Tests/WTF/RefLogger.h: Ditto.

* TestWebKitAPI/Tests/WTF/RefPtr.cpp: Use EXPECT macros instead of ASSERT.
Added tests for assignment before deref and similar for releaseNonNull.

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

2 years ago[WebIDL] Properly model buffer source / typed arrays as their own IDL types
commit-queue@webkit.org [Mon, 19 Jun 2017 16:47:06 +0000 (16:47 +0000)]
[WebIDL] Properly model buffer source / typed arrays as their own IDL types
https://bugs.webkit.org/show_bug.cgi?id=173513

Patch by Sam Weinig <sam@webkit.org> on 2017-06-19
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.https-expected.txt:
Update results for changed exception language.

Source/WebCore:

- Adds IDL type hierarchy for buffer source types.
- Includes a special type, IDLArrayBufferView, which WebIDL defines as the union
  of DataView and all the typed array types, but we model as shared base class.
  This should not be observable, and allows us to avoid using a Variant for ArrayBufferView
  and instead use the existing base class.
- Add builtin typedefs for BufferSource and DOMTimeStamp as defined in WebIDL. As noted
  above, rather than define a typedef of ArrayBufferView that maps to a union, we treat
  it as a special type.

* bindings/IDLTypes.h:
Add type hierarchy for buffer source types.
- IDLBufferSource is the root
- IDLArrayBuffer, IDLArrayBufferView, IDLDataView, IDLTypedArray derive from it.
- And then the specific typed array types derive from IDLTypedArray, and are defined
  in JSDOMConvertBufferSource so we don't have to include a ton of typed array includes
  in this file, as they cannot be forward declared.

* bindings/js/JSDOMConvertBufferSource.h:
(WebCore::Detail::BufferSourceConverter::convert):
(WebCore::Converter<IDLArrayBuffer>::convert):
(WebCore::JSConverter<IDLArrayBuffer>::convert):
(WebCore::Converter<IDLDataView>::convert):
(WebCore::JSConverter<IDLDataView>::convert):
(WebCore::Converter<IDLInt8Array>::convert):
(WebCore::JSConverter<IDLInt8Array>::convert):
(WebCore::Converter<IDLInt16Array>::convert):
(WebCore::JSConverter<IDLInt16Array>::convert):
(WebCore::Converter<IDLInt32Array>::convert):
(WebCore::JSConverter<IDLInt32Array>::convert):
(WebCore::Converter<IDLUint8Array>::convert):
(WebCore::JSConverter<IDLUint8Array>::convert):
(WebCore::Converter<IDLUint16Array>::convert):
(WebCore::JSConverter<IDLUint16Array>::convert):
(WebCore::Converter<IDLUint32Array>::convert):
(WebCore::JSConverter<IDLUint32Array>::convert):
(WebCore::Converter<IDLUint8ClampedArray>::convert):
(WebCore::JSConverter<IDLUint8ClampedArray>::convert):
(WebCore::Converter<IDLFloat32Array>::convert):
(WebCore::JSConverter<IDLFloat32Array>::convert):
(WebCore::Converter<IDLFloat64Array>::convert):
(WebCore::JSConverter<IDLFloat64Array>::convert):
(WebCore::Converter<IDLArrayBufferView>::convert):
(WebCore::JSConverter<IDLArrayBufferView>::convert):
Add native and javascript conversion for all the new types.

* bindings/js/JSDOMConvertUnion.h:
Add support for steps 7, 8, and 9 of the union conversion algorithm now that
buffer source types are properly modeled.

* bindings/js/JSSubtleCryptoCustom.cpp:
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
Replace use of now repurposed IDLBufferSource, with its definition, IDLUnion<IDLArrayBufferView, IDLArrayBuffer>.

* bindings/scripts/CodeGenerator.pm:
(IsBufferSourceType):
Renamed from IsTypedArrayType.

(IsNonPointerType): Deleted.
Was only used by DumpRenderTree and WebKitTestRunner generators. They have
been switched to the equivalent IsPrimitiveType.

(IsTypedArrayType): Deleted.
Renamed to IsBufferSourceType.

(IsRefPtrType): Deleted. Unused.

* bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
(AddClassForwardIfNeeded):
(GetArgumentExceptionFunction):
(GetAttributeExceptionFunction):
(PassArgumentExpression):
(GenerateDefaultValue):
(GenerateOverloadDispatcher):
(ShouldPassArgumentByReference):
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Update for rename of IsTypedArrayType -> IsBufferSourceType and remove specialized BufferSource
condition.

(GetBaseIDLType):
Add mappings for new buffer source types.

* bindings/scripts/IDLParser.pm:
(Parse):
Insert builtin typedefs to the typedef map before parsing.

(addBuiltinTypedefs):
Generate typedefs for BufferSource and DOMTimeStamp as specified by WebIDL.

(applyTypedefs):
Add support for applying typedefs to iterable and maplike, necessary now because BufferSource
is used as the key to iterable in MediaKeyStatusMap.idl

* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestVoidCallbackFunction.h:
Update test results.

* bindings/scripts/test/TestTypedefs.idl:
Add tests for builtin typedefs.

* Modules/geolocation/Geoposition.idl:
* dom/Event.idl:
* fileapi/Blob.idl:
* fileapi/File.idl:
* page/FrameView.h:
* xml/XMLHttpRequest.idl:
Remove typedef for DOMTimeStamp and BufferSource which are now automatically included.

Tools:

* DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
Replace IsNonPointerType subroutine with IsPrimitiveType so we can remove IsNonPointerType.

LayoutTests:

* crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt:
* crypto/subtle/hkdf-derive-bits-malformed-parametrs-expected.txt:
* crypto/subtle/pbkdf2-derive-bits-malformed-parametrs-expected.txt:
Update results for changed exception language.

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

2 years ago[Win] fast/dom/assign-to-window-status.html is flaky.
pvollan@apple.com [Mon, 19 Jun 2017 16:34:44 +0000 (16:34 +0000)]
[Win] fast/dom/assign-to-window-status.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=173512

Reviewed by Alex Christensen.

We should not dump status callbacks when test is done.

* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::setStatusText):

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