WebKit.git
2 years agoAttempt to fix the build following <https://trac.webkit.org/changeset/219407>
dbates@webkit.org [Wed, 12 Jul 2017 18:01:19 +0000 (18:01 +0000)]
Attempt to fix the build following <https://trac.webkit.org/changeset/219407>
(https://bugs.webkit.org/show_bug.cgi?id=174386)

Fix bad merge after <https://trac.webkit.org/changeset/219404>.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:

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

2 years agoAX: [iOS] Implement a way to retrieve a text marker range with desired text that...
n_wang@apple.com [Wed, 12 Jul 2017 17:58:25 +0000 (17:58 +0000)]
AX: [iOS] Implement a way to retrieve a text marker range with desired text that is closest to a position
https://bugs.webkit.org/show_bug.cgi?id=174393
<rdar://problem/33248006>

Reviewed by Chris Fleizach.

Source/WebCore:

Used the existing findClosestPlainText function to search the range on iOS.
Also exposed a function on the iOS wrapper to return the selection rects of
the result range from the searching.

Test: accessibility/ios-simulator/text-marker-range-matches-text.html

* accessibility/AXObjectCache.cpp:
(WebCore::visiblePositionForPositionWithOffset):
(WebCore::AXObjectCache::rangeMatchesTextNearRange):
* accessibility/AXObjectCache.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper rangeFromMarkers:withText:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromMarkers:withText:]):
(-[WebAccessibilityObjectWrapper textRectsFromMarkers:withText:]):
(-[WebAccessibilityObjectWrapper rectsForSelectionRects:]):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(textMarkerRangeMatchesTextNearMarkersCallback):
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):

LayoutTests:

* accessibility/ios-simulator/text-marker-range-matches-text-expected.txt: Added.
* accessibility/ios-simulator/text-marker-range-matches-text.html: Added.

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

2 years agoSkip WebRTC tests on Windows.
pvollan@apple.com [Wed, 12 Jul 2017 17:50:27 +0000 (17:50 +0000)]
Skip WebRTC tests on Windows.

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoNavigationAction should track whether the navigation was initiated by the main frame
dbates@webkit.org [Wed, 12 Jul 2017 17:25:37 +0000 (17:25 +0000)]
NavigationAction should track whether the navigation was initiated by the main frame
https://bugs.webkit.org/show_bug.cgi?id=174386
<rdar://problem/33245267>

Reviewed by Brady Eidson.

Source/WebCore:

Although we added state to NavigationAction to track whether the navigation was
initiated by the main frame in r219170 it is not possible to initialize this state
when instantiating a NavigationAction. Having NavigationAction track this state
will be useful to ensure that we can always compute the source frame information
when asking the embedding client whether to allow a navigation. We will make use
of it in the fix for <https://bugs.webkit.org/show_bug.cgi?id=174385>.

No behavior changed. So, no new tests.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL): Pass whether the load was initiated by the main frame
when instantiating the NavigationAction.
(WebCore::FrameLoader::load): For now, pass InitiatedByMainFrame::Unknown when instantiating
the NavigationAction as we do not know if the load was initiated by the main frame.
(WebCore::FrameLoader::loadWithDocumentLoader): Ditto.
(WebCore::FrameLoader::reload): Ditto
(WebCore::FrameLoader::loadDifferentDocumentItem): Ditto.
(WebCore::createWindow): Pass whether the load was initiated by the main frame when
instantiating the NavigationAction.
* loader/NavigationAction.cpp:
(WebCore::NavigationAction::NavigationAction): Modified to take argument of type InitiatedByMainFrame
that indicates whether the navigation was initiated by the main frame.
* loader/NavigationAction.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy): For now, pass InitiatedByMainFrame::Unknown
when instantiating the NavigationAction as we do not know if the load was initiated by the
main frame.
* page/ContextMenuController.cpp:
(WebCore::openNewWindow): Pass whether the load was initiated by the main frame when
instantiating the NavigationAction.

Source/WebKit2:

* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openInNewTab): Pass whether the load was initiated by the main frame
when instantiating the NavigationAction.

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

2 years agoMake prepare-ChangeLog -g <commit> generate a more standard ChangeLog entry.
commit-queue@webkit.org [Wed, 12 Jul 2017 17:16:48 +0000 (17:16 +0000)]
Make prepare-ChangeLog -g <commit> generate a more standard ChangeLog entry.
https://bugs.webkit.org/show_bug.cgi?id=174197

Patch by Emilio Cobos Ãlvarez <ecobos@igalia.com> on 2017-07-12
Reviewed by Darin Adler.

This bit me the first time I tried to submit a patch to WebKit, and still I have
to manually edit the ChangeLog every time I use the script.

This generates a more convenient and standard ChangeLog entry.

* Scripts/prepare-ChangeLog:
(generateNewChangeLogs):

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

2 years agoRebaseline of test fast/dom/Window/property-access-on-cached-window-after-frame-remov...
jlewis3@apple.com [Wed, 12 Jul 2017 17:14:40 +0000 (17:14 +0000)]
Rebaseline of test fast/dom/Window/property-access-on-cached-window-after-frame-removed.html.
https://bugs.webkit.org/show_bug.cgi?id=174400

Unreviewed test gardening.

* fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt:

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

2 years agoRename NavigationInitiatedByMainFrame to InitiatedByMainFrame
dbates@webkit.org [Wed, 12 Jul 2017 17:12:07 +0000 (17:12 +0000)]
Rename NavigationInitiatedByMainFrame to InitiatedByMainFrame
https://bugs.webkit.org/show_bug.cgi?id=174427

Rubber-stamped by Brady Eidson.

Source/WebCore:

* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
* loader/FrameLoadRequest.cpp:
(WebCore::FrameLoadRequest::FrameLoadRequest):
* loader/FrameLoadRequest.h:
(WebCore::FrameLoadRequest::FrameLoadRequest):
(WebCore::FrameLoadRequest::initiatedByMainFrame):
(WebCore::FrameLoadRequest::navigationInitiatedByMainFrame): Deleted.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::shouldOpenExternalURLsPolicyToApply):
(WebCore::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h:
* loader/NavigationAction.h:
(WebCore::NavigationAction::initiatedByMainFrame):
(WebCore::NavigationAction::navigationInitiatedByMainFrame): Deleted.
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledNavigation::ScheduledNavigation):
(WebCore::ScheduledNavigation::initiatedByMainFrame):
(WebCore::NavigationScheduler::scheduleLocationChange):
(WebCore::ScheduledNavigation::navigationInitiatedByMainFrame): Deleted.
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):

Source/WebKit/ios:

* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKit/mac:

* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Source/WebKit/win:

* Plugins/PluginView.cpp:
(WebCore::PluginView::start):
(WebCore::PluginView::getURLNotify):
(WebCore::PluginView::getURL):
(WebCore::PluginView::handlePost):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openInNewTab):

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

2 years agoUnreviewed, rolling out r219401.
jlewis3@apple.com [Wed, 12 Jul 2017 17:06:43 +0000 (17:06 +0000)]
Unreviewed, rolling out r219401.

This revision rolled out the previous patch, but after talking
with reviewer, a rebaseline is what was needed.Rolling back in
before rebaseline.

Reverted changeset:

"Unreviewed, rolling out r219379."
https://bugs.webkit.org/show_bug.cgi?id=174400
http://trac.webkit.org/changeset/219401

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

2 years agoUpdate description of Secure Contexts experimental flag
dbates@webkit.org [Wed, 12 Jul 2017 16:57:16 +0000 (16:57 +0000)]
Update description of Secure Contexts experimental flag
https://bugs.webkit.org/show_bug.cgi?id=174401

Reviewed by Simon Fraser.

Change the description of the Secure Contexts experimental flag from "isSecureContext attribute"
to "Secure Contexts API".

* Shared/WebPreferencesDefinitions.h:

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

2 years agoUnreviewed, rolling out r219379.
jlewis3@apple.com [Wed, 12 Jul 2017 16:44:12 +0000 (16:44 +0000)]
Unreviewed, rolling out r219379.

This revision caused a consistent failure in the test
fast/dom/Window/property-access-on-cached-window-after-frame-
removed.html.

Reverted changeset:

"Remove NAVIGATOR_HWCONCURRENCY"
https://bugs.webkit.org/show_bug.cgi?id=174400
http://trac.webkit.org/changeset/219379

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

2 years ago[GTK] Media test gardening after r219253
commit-queue@webkit.org [Wed, 12 Jul 2017 16:14:31 +0000 (16:14 +0000)]
[GTK] Media test gardening after r219253
https://bugs.webkit.org/show_bug.cgi?id=174254

Unreviewed test gardening.

video-cookie was fixed by r219252.
media/video-restricted-no-preload-metadata.html been passing consistently.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-12

* platform/gtk/TestExpectations:

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

2 years agoWrong radix used in Unicode Escape in invalid character error message
commit-queue@webkit.org [Wed, 12 Jul 2017 15:57:14 +0000 (15:57 +0000)]
Wrong radix used in Unicode Escape in invalid character error message
https://bugs.webkit.org/show_bug.cgi?id=174419

Patch by Tooru Fujisawa [:arai] <arai.unmht@gmail.com> on 2017-07-12
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/html/syntax/parsing-html-fragments/the-input-byte-stream-003-expected.txt:
* web-platform-tests/html/syntax/parsing-html-fragments/the-input-byte-stream-004-expected.txt:

Source/JavaScriptCore:

* parser/Lexer.cpp:
(JSC::Lexer<T>::invalidCharacterMessage):

LayoutTests:

* fast/loader/cache-encoding-expected.txt:
* http/tests/preload/preload-encoding-expected.txt:
* js/basic-strict-mode-expected.txt:
* js/kde/parse-expected.txt:
* loader/reload-subresource-when-type-changes-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/html/syntax/parsing-html-fragments/the-input-byte-stream-003-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/html/syntax/parsing-html-fragments/the-input-byte-stream-004-expected.txt:

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

2 years agoImport test verifying combination of allow-top-navigation and allow-top-navigation...
fred.wang@free.fr [Wed, 12 Jul 2017 15:47:33 +0000 (15:47 +0000)]
Import test verifying combination of allow-top-navigation and allow-top-navigation-by-user-activation
https://bugs.webkit.org/show_bug.cgi?id=174351

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

This imports a test to verify that the combination of the allow-top-navigation and
allow-top-navigation-by-user-activation flags is just treated as allow-top-navigation.
For now the expectation contains a parsing error message which will be removed when bug
171327 is fixed.

* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
Add the new test.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html: Added.
This is imported from the W3C repository.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt: Added.
The test passes, even if for now the 'allow-top-navigation-by-user-activation' triggers a
parsing error message in the console.

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

2 years agoPaginated mode: Infinite recursion in RenderTable::layout
zalan@apple.com [Wed, 12 Jul 2017 15:37:52 +0000 (15:37 +0000)]
Paginated mode: Infinite recursion in RenderTable::layout
https://bugs.webkit.org/show_bug.cgi?id=174413

Reviewed by Simon Fraser.

This patch is a workaround for avoiding infinite recursion when the table layout does not stabilize.
Apparently we leak some context (computed padding in this case) from the current to the subsequent layout.
The subsequent layouts always end up producing different line heights for some of the cells in the <thead>.
In paginated mode, when the section moves (<thead>, <tbody> etc) we call layout again recursively.
This could lead to infinite recursion for unstable table layout.

Unable to come up with a reduction yet.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTable.h:

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

2 years agoWebRTC: Incorrect sdpMLineIndex for video breaks Firefox interop
commit-queue@webkit.org [Wed, 12 Jul 2017 14:27:31 +0000 (14:27 +0000)]
WebRTC: Incorrect sdpMLineIndex for video breaks Firefox interop
https://bugs.webkit.org/show_bug.cgi?id=173530

Patch by Youenn Fablet <youenn@apple.com> on 2017-07-12
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/ice-candidate-sdpMLineIndex.html

Reading missing parameter from libwebrtc backend and setting it when firing the RTCIceCandidate event.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::disableICECandidateFiltering):
(WebCore::PeerConnectionBackend::newICECandidate):
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::OnIceCandidate):

LayoutTests:

* webrtc/ice-candidate-sdpMLineIndex-expected.txt: Added.
* webrtc/ice-candidate-sdpMLineIndex.html: Added.

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

2 years ago[GCrypt] Implement CryptoKeyEC PKCS#8 exports
zandobersek@gmail.com [Wed, 12 Jul 2017 13:59:37 +0000 (13:59 +0000)]
[GCrypt] Implement CryptoKeyEC PKCS#8 exports
https://bugs.webkit.org/show_bug.cgi?id=173648

Reviewed by Jiewen Tan.

Source/WebCore:

Implement the PKCS#8 export operation for EC keys for platforms that use
libgcrypt.

First, the `ECParameters` and the `ECPrivateKey` ASN.1 structures are created
and filled out accordingly. For the former, the appropriate object identifier
is written under the `namedCurve` element of the structure. For the latter, we
write out '1' under `version`, and eliminate the optional `parameters` element.
An libgcrypt EC context is then used to retrieve the private and public key
MPIs that are then written out under the `privateKey` and `publicKey` elements,
respectively.

After that, we can proceed to create and fill out the `PrivateKeyInfo` structure.
0 is written out under the `version` element, and the id-ecPublicKey object
identifier is written out under the `privateKeyAlgorithm.algorithm` element. This
doesn't strictly follow the specification, since the id-ecDH identifier should be
used for ECDH keys, but no test in WebKit or the web-platform-tests suite covers
this, so this specific detail should be revisited later.

Data of the previously-constructed `ECParameters` structure is retrieved and
written out under the `privateKeyAlgorithm.parameters` element. Similarly is done
for the `ECPrivateKey` structure, writing out its data under the `privateKey`
element. Finally, the optional `attributes` element of the `PrivateKeyInfo`
structure is eliminated, and the encoded data of this structure is retrieved and
returned.

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

* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::CryptoKeyEC::platformExportPkcs8):

LayoutTests:

* platform/gtk/TestExpectations: Unskip the EC PKCS#8 export tests
that are now passing.

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

2 years ago[WPE] Use libepoxy
zandobersek@gmail.com [Wed, 12 Jul 2017 13:58:46 +0000 (13:58 +0000)]
[WPE] Use libepoxy
https://bugs.webkit.org/show_bug.cgi?id=172104

Reviewed by Michael Catanzaro.

.:

* Source/cmake/FindLibEpoxy.cmake: Added.
* Source/cmake/OptionsWPE.cmake: Find libepoxy, don't search for
EGL or OpenGL ES anymore, and enable USE_LIBEPOXY by default.

Source/WebCore:

No new tests -- no changes in behavior.

Implement the proper libepoxy header inclusion for ports that enable it.

The library acts as a loading facility working on top of the system-provided
OpenGL and EGL libraries, with the headers providing a complete collection of
specification-defined OpenGL and EGL types, constants and entrypoints.

Support is added through the USE(LIBEPOXY) build guard. Note that this guard
isn't exclusive with USE(OPENGL), USE(OPENGL_ES_2) or USE(EGL), so the
USE(LIBEPOXY) condition is tested before those.

In case of OpenGL headers, the <epoxy/gl.h> header is included, and in
case of EGL headers, the <epoxy/egl.h> header. <epoxy/egl.h> includes
<epoxy/gl.h> on its own, so in some cases the inclusion of the latter is
omitted.

EpoxyShims.h header is added, doing a job similar to OpenGLESShims.h. The
EXT-suffixed GL entrypoints are redefined to the non-suffixed versions.
No suffixed constants are defined because those are defined by the libepoxy
headers to the well-known values.

* CMakeLists.txt:
* PlatformWPE.cmake:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/EpoxyShims.h: Added.
* platform/graphics/GLContext.cpp:
(WebCore::initializeOpenGLShimsIfNeeded):
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/PlatformDisplay.cpp:
* platform/graphics/cairo/CairoUtilities.cpp:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::create):
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGLWPE.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
* platform/graphics/wpe/PlatformDisplayWPE.cpp:

Source/WebKit2:

* PlatformWPE.cmake: Drop the EGL_INCLUDE_DIRS compilation flags.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
Include <epoxy/gl.h> when compiling with libepoxy usage enabled.

Tools:

* WebKitTestRunner/wpe/HeadlessViewBackend.h:
Include the <epoxy/egl.h> header, dropping the EGL and GLES2 inclusions.

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

2 years ago[GTK][WPE] Align Jhbuild patches for GStreamer packages
zandobersek@gmail.com [Wed, 12 Jul 2017 11:26:11 +0000 (11:26 +0000)]
[GTK][WPE] Align Jhbuild patches for GStreamer packages
https://bugs.webkit.org/show_bug.cgi?id=174363

Reviewed by Michael Catanzaro.

Align the patches we apply over Jhbuild-managed GStreamer dependency packages
between the GTK+ and WPE port. There's no reason for the two ports to apply
different patches over same versions of GStreamer releases.

This aligns the two ports on this specific issue. Next we'll look into
creating a single GStreamer-specific Jhbuild moduleset that will allow us
to keep these patches in a single place, avoiding duplicate files.

* gtk/jhbuild.modules:
* gtk/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch: Added.
* gtk/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch: Renamed from Tools/gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch.
* gtk/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch: Added.
* wpe/patches/gstreamer-typefind-Only-push-a-CAPS-event-downstream-if-the-.patch: Removed.

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

2 years agoImageDecoder: Gifs with infinite animation only play once very often
carlosgc@webkit.org [Wed, 12 Jul 2017 10:58:31 +0000 (10:58 +0000)]
ImageDecoder: Gifs with infinite animation only play once very often
https://bugs.webkit.org/show_bug.cgi?id=173403

Reviewed by Michael Catanzaro.

It doesn't always happen, it's easier to reproduce when loading big files from the network, but it also depends
on every file. The problem is that ImageFrameCache is caching the repetition count value always when the size is
already available. In the case of gif files, the loop count value can be at any point of the image stream, so
having the size available doesn't mean we also have the loop count. So, if the value is queried before it's
available, the default value is cached (repeat once) and then always used. We should clear the cached value when
new data is added to the decoder, like we do with other cached values that can change when more data is decoded.

* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::clearMetadata): Clear m_repetitionCount.

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

2 years agoWeb Automation: upstream safaridriver's JavaScript atom implementations
carlosgc@webkit.org [Wed, 12 Jul 2017 10:56:22 +0000 (10:56 +0000)]
Web Automation: upstream safaridriver's JavaScript atom implementations
https://bugs.webkit.org/show_bug.cgi?id=172060
<rdar://problem/32168187>

Reviewed by Brian Burg.

* UIProcess/Automation/atoms/ElementAttribute.js: Added.
* UIProcess/Automation/atoms/ElementDisplayed.js: Added.
* UIProcess/Automation/atoms/FindNodes.js: Added.
* UIProcess/Automation/atoms/FormElementClear.js: Added.
* UIProcess/Automation/atoms/FormSubmit.js: Added.

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

2 years ago[SOUP] Do not use C linkage for functions using C++ features
aperez@igalia.com [Wed, 12 Jul 2017 10:12:39 +0000 (10:12 +0000)]
[SOUP] Do not use C linkage for functions using C++ features
https://bugs.webkit.org/show_bug.cgi?id=174392

Reviewed by Michael Catanzaro.

No new tests because there is no behavior change.

* platform/network/soup/WebKitSoupRequestGeneric.h: Move G_END_DECLS
to leave functions which use C++ features outside of the block it
delimits.

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

2 years agoUnreviewed, attempt to fix Windows build
utatane.tea@gmail.com [Wed, 12 Jul 2017 10:11:22 +0000 (10:11 +0000)]
Unreviewed, attempt to fix Windows build
https://bugs.webkit.org/show_bug.cgi?id=174366

* wtf/FastMalloc.h:
(WTF::operator==):
(WTF::operator!=):
(WTF::FastAllocator::operator==): Deleted.
(WTF::FastAllocator::operator!=): Deleted.

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

2 years ago[GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of...
carlosgc@webkit.org [Wed, 12 Jul 2017 07:02:25 +0000 (07:02 +0000)]
[GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of drag is unavailable
https://bugs.webkit.org/show_bug.cgi?id=174161

Reviewed by Michael Catanzaro.

It seems selection data could contain an empty string, in which case gtk_selection_data_get_data() returns a
valid pointer, but gtk_selection_data_get_length() returns 0. When this happens we end up trying to split an
empty string resulting in an empty vector, but we unconditionally access the first element of the vector.

* platform/gtk/PasteboardHelper.cpp:
(WebCore::selectionDataToUTF8String): Return a null string in case selection data length is 0.
(WebCore::PasteboardHelper::fillSelectionData): Return early if selection data length is 0, instead of checking
the selection data pointer.

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

2 years ago[GTK][WPE] Enable FILE_LOCK and implement lockFile and unlockFile
carlosgc@webkit.org [Wed, 12 Jul 2017 06:59:15 +0000 (06:59 +0000)]
[GTK][WPE] Enable FILE_LOCK and implement lockFile and unlockFile
https://bugs.webkit.org/show_bug.cgi?id=174357

Reviewed by Michael Catanzaro.

.:

* Source/cmake/OptionsGTK.cmake: Use gio-unix unconditionally.

Source/WebCore:

Implement lockFile and unlockFile using flock().

* PlatformWPE.cmake:
* platform/glib/FileSystemGlib.cpp:
(WebCore::lockFile):
(WebCore::unlockFile):

Source/WTF:

* wtf/Platform.h: Enable FILE_LOCK in GTK and WPE ports.

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

2 years agoUse FastAllocator in STL containers
utatane.tea@gmail.com [Wed, 12 Jul 2017 05:42:33 +0000 (05:42 +0000)]
Use FastAllocator in STL containers
https://bugs.webkit.org/show_bug.cgi?id=174366

Rubber stamped by Sam Weinig.

This patch uses FastAllocator for STL containers including std::set and std::map.
STL can take a template parameter to be used as allocator for containers.
We prepare FastAllocator, which uses fastMalloc for allocation.
This allows us to use bmalloc (if supported) for STL containers which offers
functionalities that is not supported in WTF containers.

* Modules/indexeddb/IDBKeyData.h:
* Modules/indexeddb/server/IndexValueEntry.cpp:
(WebCore::IDBServer::IndexValueEntry::IndexValueEntry):
(WebCore::IDBServer::IndexValueEntry::Iterator::Iterator):
(WebCore::IDBServer::IndexValueEntry::reverseFind):
* Modules/indexeddb/server/IndexValueEntry.h:
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::lowestIteratorInRange):
(WebCore::IDBServer::IndexValueStore::highestReverseIteratorInRange):
(WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
* Modules/indexeddb/server/IndexValueStore.h:
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
(WebCore::IDBServer::MemoryObjectStore::addRecord):
(WebCore::IDBServer::MemoryObjectStore::updateCursorsForPutRecord):
* Modules/indexeddb/server/MemoryObjectStore.h:
(WebCore::IDBServer::MemoryObjectStore::orderedKeys):
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
(WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::setForwardIteratorFromRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
* Modules/indexeddb/server/MemoryObjectStoreCursor.h:
* Modules/mediasource/SampleMap.h:
* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::deferTestsForReason):
(WebCore::dumpState):
* page/WheelEventTestTrigger.h:
* platform/graphics/cv/VideoTextureCopierCV.cpp:
(WebCore::enumToStringMap):
* rendering/OrderIterator.h:

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

2 years ago[Win] Build error when building WebKit.dll from WebKit.proj project file.
pvollan@apple.com [Wed, 12 Jul 2017 04:14:42 +0000 (04:14 +0000)]
[Win] Build error when building WebKit.dll from WebKit.proj project file.
https://bugs.webkit.org/show_bug.cgi?id=174410

Reviewed by Brent Fulgham.

Copy required header files to forwarding headers folder.

Source/WebCore:

* PlatformWin.cmake:

Source/WebCore/PAL:

* pal/PlatformWin.cmake:

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

2 years agoAnother build fix.
rniwa@webkit.org [Wed, 12 Jul 2017 03:00:04 +0000 (03:00 +0000)]
Another build fix.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype._updateCommitLogViewer):

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

2 years agoBuild fix. It looks like the code here is racy.
rniwa@webkit.org [Wed, 12 Jul 2017 02:38:03 +0000 (02:38 +0000)]
Build fix. It looks like the code here is racy.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure):
(ChartPaneBase.prototype.setOpenRepository):

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

2 years agoRemove NAVIGATOR_HWCONCURRENCY
dino@apple.com [Wed, 12 Jul 2017 02:18:48 +0000 (02:18 +0000)]
Remove NAVIGATOR_HWCONCURRENCY
https://bugs.webkit.org/show_bug.cgi?id=174400

.:

Reviewed by Sam Weinig.

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::hardwareConcurrency): Deleted.
* page/NavigatorBase.h:
* page/NavigatorConcurrentHardware.idl: Removed.

Source/WebCore/PAL:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Reviewed by Sam Weinig.

* wtf/FeatureDefines.h:

Tools:

Reviewed by Sam Weinig.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agoWKWindowFeatures needs to expose scrollbar, fullscreen, and dialog configuration...
commit-queue@webkit.org [Wed, 12 Jul 2017 00:25:41 +0000 (00:25 +0000)]
WKWindowFeatures needs to expose scrollbar, fullscreen, and dialog configuration properties
https://bugs.webkit.org/show_bug.cgi?id=174239

Patch by Ansh Shukla <ansh_shukla@apple.com> on 2017-07-11
Reviewed by Brady Eidson.

Source/WebKit2:

Add a new private header to expose getters for window feature properties already available
in the TFB APIWindowFeatures class. These properties are necessary for Safari to adopt more
modern API.

* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures _locationBarVisibility]):
(-[WKWindowFeatures _scrollbarsVisibility]):
(-[WKWindowFeatures _fullscreenDisplay]):
(-[WKWindowFeatures _dialogDisplay]):
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Expose some window features as read-only
properties.
* UIProcess/API/Cocoa/WKWindowFeaturesPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:

Tools:

Create windows with specific features set and make sure those are properly reflected in the
WKWindowFeatures object.

* TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:
(resetToConsistentState):
(-[CheckWindowFeaturesUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

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

2 years agoRealtimeOutgoingAudioSource should not push more audio data if the WebRTC thread...
commit-queue@webkit.org [Wed, 12 Jul 2017 00:25:38 +0000 (00:25 +0000)]
RealtimeOutgoingAudioSource should not push more audio data if the WebRTC thread is not able to process it
https://bugs.webkit.org/show_bug.cgi?id=174383

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

This patch adds support to check for pending-processing audio data.
If the amount of audio data is bigger than a high water mark of 0.5 seconds,
we stop pushing new audio data until buffered audio data is lower than a low water mark of 0.1 seconds.
Patch is tested by adding breakpoints to trigger the high water mark, verifying that low water mark is triggered
and receiving audio is fine on the other connection endpoint.

* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::isReachingBufferedAudioDataHighLimit):
(WebCore::RealtimeOutgoingAudioSource::isReachingBufferedAudioDataLowLimit):
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

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

2 years agoDo not duplicate files when deleting directories with svn 1.9
jbedard@apple.com [Wed, 12 Jul 2017 00:24:44 +0000 (00:24 +0000)]
Do not duplicate files when deleting directories with svn 1.9
https://bugs.webkit.org/show_bug.cgi?id=174339
<rdar://problem/33226781>

Reviewed by David Kilzer.

* Scripts/svn-create-patch:
(diffOptionsForFile): No longer pass -N option, since this does not work in SVN 1.9.4.
(generateFileList): Determine which files are deleted because they are part of a
directory being deleted.

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

2 years agoWeb Inspector: Correct a typo in the .eslintrc
commit-queue@webkit.org [Wed, 12 Jul 2017 00:23:25 +0000 (00:23 +0000)]
Web Inspector: Correct a typo in the .eslintrc
https://bugs.webkit.org/show_bug.cgi?id=174389

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-07-11
Reviewed by Matt Baker.

* .eslintrc:

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

2 years agoAvoid duplicating default parameter values in [WKWebsiteDataStore _resourceLoadStatis...
cdumez@apple.com [Wed, 12 Jul 2017 00:23:16 +0000 (00:23 +0000)]
Avoid duplicating default parameter values in [WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]
https://bugs.webkit.org/show_bug.cgi?id=174402

Reviewed by Brent Fulgham.

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]):
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::performDailyTasks):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsStore::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsStore::shouldRemoveDataRecords):
(WebKit::WebResourceLoadStatisticsStore::shouldPartitionCookies):
(WebKit::WebResourceLoadStatisticsStore::hasStatisticsExpired):
(WebKit::WebResourceLoadStatisticsStore::setMaxStatisticsEntries):
(WebKit::WebResourceLoadStatisticsStore::setPruneEntriesDownTo):
(WebKit::WebResourceLoadStatisticsStore::pruneStatisticsIfNeeded):
(WebKit::WebResourceLoadStatisticsStore::resetParametersToDefaultValues):
* UIProcess/WebResourceLoadStatisticsStore.h:

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

2 years agoRolling out r219372.
dino@apple.com [Tue, 11 Jul 2017 23:58:58 +0000 (23:58 +0000)]
Rolling out r219372.

.:

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::hardwareConcurrency):
* page/NavigatorBase.h:
* page/NavigatorConcurrentHardware.idl: Added.

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agoRemove NAVIGATOR_HWCONCURRENCY
dino@apple.com [Tue, 11 Jul 2017 23:19:14 +0000 (23:19 +0000)]
Remove NAVIGATOR_HWCONCURRENCY
https://bugs.webkit.org/show_bug.cgi?id=174400

.:

Reviewed by Sam Weinig.

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::hardwareConcurrency): Deleted.
* page/NavigatorBase.h:
* page/NavigatorConcurrentHardware.idl: Removed.

Source/WebCore/PAL:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Reviewed by Sam Weinig.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Reviewed by Sam Weinig.

* wtf/FeatureDefines.h:

Tools:

Reviewed by Sam Weinig.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years ago[WebCrypto] CryptoKeyECMac::Custom OpenSSL tag is actually tagged type [1]
jiewen_tan@apple.com [Tue, 11 Jul 2017 23:11:41 +0000 (23:11 +0000)]
[WebCrypto] CryptoKeyECMac::Custom OpenSSL tag is actually tagged type [1]
https://bugs.webkit.org/show_bug.cgi?id=174382
<rdar://problem/33244871>

Reviewed by Brent Fulgham.

No change of behaviour.

* crypto/mac/CryptoKeyECMac.cpp:
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportPkcs8):
Replace CustomECParameters with TaggedType1 according to X.690(08/2015) section 8.14:
https://www.itu.int/rec/T-REC-X.690-201508-I/en
and RFC 5915 Appendix A:
http://www.ietf.org/rfc/rfc5915.txt.

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

2 years agoShow the roots built by perf try bots on results page
rniwa@webkit.org [Tue, 11 Jul 2017 22:54:55 +0000 (22:54 +0000)]
Show the roots built by perf try bots on results page
https://bugs.webkit.org/show_bug.cgi?id=174305

Reviewed by Joseph Pecoraro.

Show build products created by a perf try bots so that we can download them for local testing.

* public/v3/components/test-group-revision-table.js:
(TestGroupRevisionTable.prototype._renderTable): Find the set of repositories for which a patch is applied.
Show build products for all commit sets for such a repository since when WebKit is built with a patch in
one configuration, the other configuration also needs to be built for consistency.
(TestGroupRevisionTable.prototype._buildCommitCell): Added the hyperlink for build products.
(TestGroupRevisionTable.prototype._buildFileInfo): Takes a string to override the file's label. Since all
build products made by bots tend to have the same filename, we show the label of "Build product" instead.
(TestGroupRevisionTable.prototype._mergeCellsWithSameCommitsAcrossRows): Fixed a bug that any entry with
a patch wasn't getting merged since it was comparing against the result commit set, which does not contain
the patch (only requested commit set contains a patch).

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

2 years agoViewport fit experimental feature should be always on by default
dino@apple.com [Tue, 11 Jul 2017 22:48:40 +0000 (22:48 +0000)]
Viewport fit experimental feature should be always on by default
https://bugs.webkit.org/show_bug.cgi?id=174398
<rdar://problem/33248920>

Reviewed by Simon Fraser.

Even though this is experimental, it should be enabled by default, and
not follow the value of DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.

* Shared/WebPreferencesDefinitions.h:

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

2 years agoREGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests.
clopez@igalia.com [Tue, 11 Jul 2017 22:33:10 +0000 (22:33 +0000)]
REGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests.
https://bugs.webkit.org/show_bug.cgi?id=174395

Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Mark the new failures. Further investigation pending.

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

2 years agoremove the empty JavaScriptCore/wasm/js/WebAssemblyFunctionCell.* files
sbarati@apple.com [Tue, 11 Jul 2017 22:28:57 +0000 (22:28 +0000)]
remove the empty JavaScriptCore/wasm/js/WebAssemblyFunctionCell.* files
https://bugs.webkit.org/show_bug.cgi?id=174397

Rubber stamped by David Kilzer.

* wasm/js/WebAssemblyFunctionCell.cpp: Removed.
* wasm/js/WebAssemblyFunctionCell.h: Removed.

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

2 years agoFix typo: ContentRuleListStore::nonLegacyDdefaultStore()
aperez@igalia.com [Tue, 11 Jul 2017 22:27:47 +0000 (22:27 +0000)]
Fix typo: ContentRuleListStore::nonLegacyDdefaultStore()
https://bugs.webkit.org/show_bug.cgi?id=174387

Reviewed by Michael Catanzaro.

Rename nonLegacyDdefaultStore() to nonLegacyDefaultStore().

* UIProcess/API/APIContentRuleListStore.cpp:
(API::ContentRuleListStore::nonLegacyDefaultStore):
(API::ContentRuleListStore::defaultStore):
* UIProcess/API/APIContentRuleListStore.h:

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

2 years agoSimplify primary domain lambda captures in WebResourceLoadStatisticsStore
cdumez@apple.com [Tue, 11 Jul 2017 21:46:22 +0000 (21:46 +0000)]
Simplify primary domain lambda captures in WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=174381

Reviewed by Brent Fulgham.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::isolatedPrimaryDomain):
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setLastSeen):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
(WebKit::primaryDomain): Deleted.

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

2 years agoREGRESSION(r219045): The <body> element does not get repainted when its background...
commit-queue@webkit.org [Tue, 11 Jul 2017 21:33:19 +0000 (21:33 +0000)]
REGRESSION(r219045): The <body> element does not get repainted when its background image finishes decoding
https://bugs.webkit.org/show_bug.cgi?id=174376

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-11
Reviewed by Simon Fraser.

Source/WebCore:

When adding a CachedImageClient to CachedImage::m_pendingImageDrawingClients
and the CachedImageClient is not one of the CachedImage::m_clients, we
should cancel the repaint optimization in CachedImage::imageFrameAvailable().
This can be done by adding all the CachedImage::m_clients to CachedImage::
m_pendingImageDrawingClients.

Test: fast/images/async-image-body-background-image.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addPendingImageDrawingClient):

LayoutTests:

* fast/images/async-image-body-background-image-expected.html: Added.
* fast/images/async-image-body-background-image.html: Added.

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

2 years agoUnreviewed, fix Windows build after r219355.
cdumez@apple.com [Tue, 11 Jul 2017 21:09:31 +0000 (21:09 +0000)]
Unreviewed, fix Windows build after r219355.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::addCrossOriginWindowPropertyNames):
(WebCore::addCrossOriginWindowOwnPropertyNames):
(WebCore::JSDOMWindow::getOwnPropertyNames):
(WebCore::addCrossOriginPropertyNames): Deleted.
(WebCore::addCrossOriginOwnPropertyNames): Deleted.
* bindings/js/JSLocationCustom.cpp:
(WebCore::addCrossOriginLocationPropertyNames):
(WebCore::addCrossOriginLocationOwnPropertyNames):
(WebCore::JSLocation::getOwnPropertyNames):
(WebCore::addCrossOriginPropertyNames): Deleted.
(WebCore::addCrossOriginOwnPropertyNames): Deleted.

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

2 years agoWe should do ICE candidate filtering at the Document level
commit-queue@webkit.org [Tue, 11 Jul 2017 21:07:49 +0000 (21:07 +0000)]
We should do ICE candidate filtering at the Document level
https://bugs.webkit.org/show_bug.cgi?id=173861
<rdar://problem/33122058>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-07-11

* resources/testharnessreport.js: Not calling setICECandidateFiltering if not defined.

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

2 years ago[WebIDL] Convert MutationCallback to be a normal generate callback
weinig@apple.com [Tue, 11 Jul 2017 21:07:08 +0000 (21:07 +0000)]
[WebIDL] Convert MutationCallback to be a normal generate callback
https://bugs.webkit.org/show_bug.cgi?id=174140

Reviewed by Chris Dumez.

Source/WebCore:

To make this work more nicely, I:
- Added the ability to for non-nullable interfaces in sequences to be passed
  via a Ref<> rather than a RefPtr<> as a parameter to a callback function.
  (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the
  signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather
  than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
- Added a new extended attribute for callback functions called [CallbackNeedsCanInvoke]
  that adds a virtual function called canInvoke() to the generated callback.
  All it does is forward to ActiveDOMCallback's canInvokeCallback, but it
  allows the implementation to get to it. We may one day want to move the
  inheritance of ActiveDOMCallback from the generated source to the base class.
- Added a new extended attribute for callback functions called [CallbackThisObject=Type]
  which allows you to specify that the callback needs a this object in addition
  to its arguments. When specified, the first argument of the C++ implementation
  function will now correspond to the this object, with the remaining arguments
  shifted over one.

* DerivedSources.make:
Add MutationCallback.

* WebCore.xcodeproj/project.pbxproj:
Remove non-generated JSMutationCallback.cpp, and add generated JSMutationCallback.cpp.

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::filterDeviceList):
(WebCore::MediaDevicesRequest::start):
* Modules/mediastream/MediaDevicesRequest.h:
Switch to using Ref.

* bindings/IDLTypes.h:
Add InnerParameterType and NullableInnerParameterType type hooks
and specialize wrappers to use Ref for InnerParameterType, and RefPtr
for NullableInnerParameterType.

* bindings/js/JSCallbackData.cpp:
* bindings/js/JSCallbackData.h:
Add support for passing a this object.

* bindings/js/JSMutationCallback.cpp: Removed.
* bindings/js/JSMutationCallback.h: Removed.
Remove custom callback code.

* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::constructJSMutationObserver): Deleted.
Remove no longer needed custom constructor.

* bindings/scripts/CodeGenerator.pm:
(ParseType):
Add helper to parse a type and cache the result.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeaderContent):
(GenerateCallbackImplementationContent):
Add support for [CallbackNeedsCanInvoke] and [CallbackThisObject]. When [CallbackThisObject]
is not specified, use jsUndefined() as the this object as specified by WebIDL.

* bindings/scripts/IDLAttributes.json:
Add [CallbackNeedsCanInvoke] and [CallbackThisObject].

* bindings/scripts/IDLParser.pm:
(ParseType):
Add entry point to parse a single type.

* css/FontFaceSet.h:
Switch to using Ref.

* dom/MutationCallback.h:
Update signatures.

* dom/MutationCallback.idl: Added.

* dom/MutationObserver.cpp:
(WebCore::MutationObserver::canDeliver):
(WebCore::MutationObserver::deliver):
Switch to new signatures.

* dom/MutationObserver.idl:
Remove CustomConstructor.

* page/IntersectionObserverCallback.h:
Switch to using Ref.

* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
* bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
* bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.h:
* bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
Add / update bindings tests.

LayoutTests:

* fast/dom/MutationObserver/mutation-observer-constructor-expected.txt:
Update results for standard error messages.

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

2 years agoRenderImage should not add itself as a RelevantRepaintedObject if its image frame...
commit-queue@webkit.org [Tue, 11 Jul 2017 20:56:26 +0000 (20:56 +0000)]
RenderImage should not add itself as a RelevantRepaintedObject if its image frame is being decoded
https://bugs.webkit.org/show_bug.cgi?id=174336

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-11
Reviewed by Simon Fraser.

Since nothing will be drawn till the image frame finishes decoding we should
treat returning ImageDrawResult::DidRequestDecoding from BitmapImage::draw
the same as we do when the image is still loading.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderImage.h:

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

2 years ago[WebRTC] Hanging under LibWebRTCMediaEndpoint::getStats
commit-queue@webkit.org [Tue, 11 Jul 2017 20:46:24 +0000 (20:46 +0000)]
[WebRTC] Hanging under LibWebRTCMediaEndpoint::getStats
https://bugs.webkit.org/show_bug.cgi?id=174377

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

No change of behavior.
Moving calls to libwebrtc getStats in the signalling thread since doing it in the main thread
would block the main thread until the signalling thread is ready to handle getStats.
Reducing stat logging since this may be too much for some devices.

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

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

2 years agoTeach build workers to fetch archives from S3.
lforschler@apple.com [Tue, 11 Jul 2017 20:42:11 +0000 (20:42 +0000)]
Teach build workers to fetch archives from S3.
https://bugs.webkit.org/show_bug.cgi?id=174384

Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(DownloadBuiltProduct):

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

2 years agoFix a build failure in WebDragClient when !PLATFORM(COCOA) && !PLATFORM(GTK).
timothy@hatcher.name [Tue, 11 Jul 2017 20:38:11 +0000 (20:38 +0000)]
Fix a build failure in WebDragClient when !PLATFORM(COCOA) && !PLATFORM(GTK).
https://bugs.webkit.org/show_bug.cgi?id=174372

Reviewed by Beth Dakin.

* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::didConcludeEditDrag): Added empty method.

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

2 years agoRemove unused OpenGL files
mcatanzaro@igalia.com [Tue, 11 Jul 2017 20:21:49 +0000 (20:21 +0000)]
Remove unused OpenGL files
https://bugs.webkit.org/show_bug.cgi?id=174371

Reviewed by Timothy Hatcher.

* platform/graphics/opengl/GLPlatformContext.cpp: Removed.
* platform/graphics/opengl/GLPlatformContext.h: Removed.
* platform/graphics/opengl/GLPlatformSurface.h: Removed.

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

2 years agoWindow's [[OwnPropertyKeys]] is wrong for cross origin windows
cdumez@apple.com [Tue, 11 Jul 2017 20:11:57 +0000 (20:11 +0000)]
Window's [[OwnPropertyKeys]] is wrong for cross origin windows
https://bugs.webkit.org/show_bug.cgi?id=174364
<rdar://problem/33238056>

Reviewed by Brent Fulgham.

Source/WebCore:

Window's [[OwnPropertyKeys]] should not list descendant frame names
when the window is cross-origin:
- https://github.com/whatwg/html/pull/2777

This aligns our behavior with Firefox and Chrome.

No new tests, updated existing test.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::addCrossOriginPropertyNames):
(WebCore::addCrossOriginOwnPropertyNames):
(WebCore::JSDOMWindow::getOwnPropertyNames):

LayoutTests:

Update test to reflect behavior change. I verified that the test is passing in Firefox.
The test fails in Chrome because its does not expose frames indexes on the Window, and
it is incorrectly listing "assign" on Location.

* http/tests/security/cross-frame-access-enumeration.html:

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

2 years ago[GTK] editing/input new passes since r211277
commit-queue@webkit.org [Tue, 11 Jul 2017 19:25:53 +0000 (19:25 +0000)]
[GTK] editing/input new passes since r211277
https://bugs.webkit.org/show_bug.cgi?id=160119

Unreviewed test gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-11

* platform/gtk/TestExpectations:

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

2 years agoReset cookie partitioning state after network process crashes
bfulgham@apple.com [Tue, 11 Jul 2017 18:57:20 +0000 (18:57 +0000)]
Reset cookie partitioning state after network process crashes
https://bugs.webkit.org/show_bug.cgi?id=174306
<rdar://problem/33171605>

Reviewed by Chris Dumez.

Source/WebKit2:

* UIProcess/Storage/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler): Move cookie
partioning state code to helper function.
(WebKit::ResourceLoadStatisticsStore::resetPartitionCookiesState): Added.
* UIProcess/Storage/ResourceLoadStatisticsStore.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess): Inform the statistics store that
the network process crashed.
(WebKit::WebProcessPool::terminateNetworkProcess): Mark network process as crashed.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::networkProcessDidCrash): Reset the cookie
partitioning state after a crash.
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::notifyResourceLoadStatisticsNetworkProcessDidCrash): Relay
information to the statistics store.
* UIProcess/WebsiteData/WebsiteDataStore.h:

LayoutTests:

* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-network-process-crash-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-network-process-crash.html: Added.
* http/tests/loading/resourceLoadStatistics/resources/get-cookies.php:
* http/tests/loading/resourceLoadStatistics/resources/set-cookie.php:

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

2 years agoConfigure buildbot to transfer all archives to S3.
lforschler@apple.com [Tue, 11 Jul 2017 18:48:08 +0000 (18:48 +0000)]
Configure buildbot to transfer all archives to S3.
Previously this was Mac only, but it's time to expand!
https://bugs.webkit.org/show_bug.cgi?id=174378

Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(BuildFactory.__init__):

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

2 years agoVersioning.
jmarcell@apple.com [Tue, 11 Jul 2017 18:37:47 +0000 (18:37 +0000)]
Versioning.

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

2 years agoREGRESSION(r219298): [GTK] imported/w3c/IndexedDB-private-browsing/idbfactory_open...
commit-queue@webkit.org [Tue, 11 Jul 2017 18:30:06 +0000 (18:30 +0000)]
REGRESSION(r219298): [GTK] imported/w3c/IndexedDB-private-browsing/idbfactory_open.html is crashing occassionaly
https://bugs.webkit.org/show_bug.cgi?id=174354

Unreviewed test gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-11

* platform/gtk/TestExpectations:

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

2 years ago[WTF] Drop unnecessary AtomicString constructor since we have constexpr hash function
utatane.tea@gmail.com [Tue, 11 Jul 2017 18:20:57 +0000 (18:20 +0000)]
[WTF] Drop unnecessary AtomicString constructor since we have constexpr hash function
https://bugs.webkit.org/show_bug.cgi?id=174347

Reviewed by Alex Christensen.

Previously, we calculate hash value in perl script and generate source code with that value.
This AtomicString constructor takes this pre-calculated hash value to efficiently construct
itself. But now, we have constexpr hash function, then we do not need to specify hash value
directly in this way. Thus we drop this functionality.

* wtf/text/AtomicString.h:
* wtf/text/AtomicStringImpl.cpp:
(WTF::HashAndCharactersTranslator::hash): Deleted.
(WTF::HashAndCharactersTranslator::equal): Deleted.
(WTF::HashAndCharactersTranslator::translate): Deleted.
* wtf/text/AtomicStringImpl.h:
(WTF::AtomicStringImpl::add):

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

2 years agoFix broken build when !ENABLE(INDEXED_DATABASE)
timothy@hatcher.name [Tue, 11 Jul 2017 18:13:44 +0000 (18:13 +0000)]
Fix broken build when !ENABLE(INDEXED_DATABASE)
https://bugs.webkit.org/show_bug.cgi?id=174370

Reviewed by Alex Christensen.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::pageAddedToProcess):

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

2 years ago[GTK][WPE] Some resource load statistics tests added in r212183 also fail.
commit-queue@webkit.org [Tue, 11 Jul 2017 18:10:14 +0000 (18:10 +0000)]
[GTK][WPE] Some resource load statistics tests added in r212183 also fail.
https://bugs.webkit.org/show_bug.cgi?id=168171

Unreviewed test gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-11

* platform/gtk/TestExpectations:

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

2 years agoChanging the web page muted state for playing audio should not disable other tabs...
clopez@igalia.com [Tue, 11 Jul 2017 18:08:28 +0000 (18:08 +0000)]
Changing the web page muted state for playing audio should not disable other tabs capture
https://bugs.webkit.org/show_bug.cgi?id=174349

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-07-11

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activateMediaStreamCaptureInPage): Fixes non MEDIA_STREAM builds.

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

2 years agoFix broken build when ENABLE_VIDEO is disabled.
timothy@hatcher.name [Tue, 11 Jul 2017 18:07:24 +0000 (18:07 +0000)]
Fix broken build when ENABLE_VIDEO is disabled.
https://bugs.webkit.org/show_bug.cgi?id=174368

Reviewed by Alex Christensen.

* dom/Document.cpp:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.idl:
* testing/Internals.cpp:
(WebCore::Internals::mediaResponseSources):
(WebCore::Internals::mediaResponseContentRanges):
* testing/Internals.h:
* testing/Internals.idl:

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

2 years agoelementFromPoint() should consider x and y to be in client (layout viewport) coordinates
commit-queue@webkit.org [Tue, 11 Jul 2017 18:01:15 +0000 (18:01 +0000)]
elementFromPoint() should consider x and y to be in client (layout viewport) coordinates
https://bugs.webkit.org/show_bug.cgi?id=172019

Patch by Ali Juma <ajuma@chromium.org> on 2017-07-11
Reviewed by Simon Fraser.

Source/WebCore:

When visual viewports are enabled, this makes TreeScope::nodeFromPoint consider its
input to be in client coordinates, and clips this input to the layout viewport. This change
affects the behavior of document.elementFromPoint() and document.caretRangeFromPoint.

No new tests. Modified an existing test, and made a previously-failing test pass on ios.

* dom/TreeScope.cpp:
(WebCore::TreeScope::nodeFromPoint):
* page/FrameView.cpp:
(WebCore::FrameView::layoutViewportToAbsoluteRect):
(WebCore::FrameView::layoutViewportToAbsolutePoint):
(WebCore::FrameView::clientToLayoutViewportPoint):
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):

LayoutTests:

* fast/dom/elementFromPoint-scaled-scrolled-expected.txt: Updated.
* fast/dom/elementFromPoint-scaled-scrolled.html: Updated.
* platform/ios/TestExpectations:

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

2 years agoBroken build when !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
timothy@hatcher.name [Tue, 11 Jul 2017 17:58:22 +0000 (17:58 +0000)]
Broken build when !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
https://bugs.webkit.org/show_bug.cgi?id=174369

Reviewed by Alex Christensen.

* dom/ScriptedAnimationController.h: Include PlatformScreen.h.

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

2 years agoAddress post-review feedback after http://trac.webkit.org/r219310
wenson_hsieh@apple.com [Tue, 11 Jul 2017 17:55:21 +0000 (17:55 +0000)]
Address post-review feedback after trac.webkit.org/r219310
https://bugs.webkit.org/show_bug.cgi?id=174300
<rdar://problem/33030639>

Reviewed by Simon Fraser.

Source/WebCore:

Removes pan-gesture-related plumbing introduced in r219310 that is no longer necessary.

* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::scrollingTreeNodeWillStartPanGesture):
(WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted.

Source/WebKit2:

Removes plumbing introduced in r219310 for telling WKContentView when the user has finished panning or zooming.
This was previously used to reset allowing asynchronous touch event after preventing the web touch events
gesture recognizer from firing.

However, a far simpler (and much less fragile) solution is to just set _canSendTouchEventsAsynchronously to NO
at the beginning of the gesture, before the first `touchstart` event is dispatched. This way, we always ensure
that _canSendTouchEventsAsynchronously is NO when beginning to process a touch event. This approach is correct
because the only place where we query _canSendTouchEventsAsynchronously is in -_webTouchEventsRecognized:, where
(when we are beginning a new gesture) we are guaranteed that -gestureRecognizer:shouldIgnoreWebTouchWithEvent:
has already been called and _canSendTouchEventsAsynchronously is NO.

Confirmed that the LayoutTests added in r219310 still pass.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewDidEndPanGesture): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::overflowScrollViewDidEndPanGesture): Deleted.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndPanGesture): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:shouldIgnoreWebTouchWithEvent:]):
(-[WKContentView scrollViewDidEndPanOrPinchGesture]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::overflowScrollViewDidEndPanGesture): Deleted.

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

2 years ago[GTK] compositing/video/poster.html passing since r218320
commit-queue@webkit.org [Tue, 11 Jul 2017 17:45:40 +0000 (17:45 +0000)]
[GTK] compositing/video/poster.html passing since r218320
https://bugs.webkit.org/show_bug.cgi?id=169918

Unreviewed test gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-11

* platform/gtk/TestExpectations:

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

2 years agoReduce URL size
commit-queue@webkit.org [Tue, 11 Jul 2017 17:02:14 +0000 (17:02 +0000)]
Reduce URL size
https://bugs.webkit.org/show_bug.cgi?id=174319

Patch by Alex Christensen <achristensen@webkit.org> on 2017-07-11
Reviewed by Andreas Kling.

m_fragmentEnd is redundant information. If a URL is valid, then it is always m_string.length().
If a URL is not valid, then it is always 0. Rather than storing additional information,
deduce the fragment end from the validity of the URL and the String's length.

No change in behavior.  This reduces sizeof(URL) from 56 to 48 and reduces operations when parsing.

* platform/URL.cpp:
(WebCore::URL::invalidate):
(WebCore::URL::fragmentIdentifier):
(WebCore::URL::hasFragmentIdentifier):
(WebCore::URL::removeFragmentIdentifier):
* platform/URL.h:
(WebCore::URL::encode):
(WebCore::URL::decode):
(WebCore::URL::hasFragment):
* platform/URLParser.cpp:
(WebCore::URLParser::urlLengthUntilPart):
(WebCore::URLParser::copyURLPartsUntil):
(WebCore::URLParser::parse):
(WebCore::URLParser::allValuesEqual):
(WebCore::URLParser::internalValuesConsistent):

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

2 years agoUnreviewed clean-up after r219323
bfulgham@apple.com [Tue, 11 Jul 2017 16:51:27 +0000 (16:51 +0000)]
Unreviewed clean-up after r219323

Simplify algorithm slightly based on a suggestion Chris Dumez made in the review.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::pruneResources): Don't create a second variable to track the pruning operation.

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

2 years agoSharedBuffer::size should return a size_t
commit-queue@webkit.org [Tue, 11 Jul 2017 16:48:02 +0000 (16:48 +0000)]
SharedBuffer::size should return a size_t
https://bugs.webkit.org/show_bug.cgi?id=174328

Patch by Alex Christensen <achristensen@webkit.org> on 2017-07-11
Reviewed by Andreas Kling.

Source/WebCore:

No change in behaviour.

* html/FTPDirectoryDocument.cpp:
(WebCore::createTemplateDocumentData):
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::handleProvisionalLoadFailure):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
* loader/ResourceLoader.h:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::tryCreateArrayBuffer):
* platform/SharedBuffer.h:

Source/WebKit2:

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):

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

2 years ago[Win] Build error when building WebCore from WebCore.proj project file.
pvollan@apple.com [Tue, 11 Jul 2017 16:43:04 +0000 (16:43 +0000)]
[Win] Build error when building WebCore from WebCore.proj project file.
https://bugs.webkit.org/show_bug.cgi?id=174330

Reviewed by Brent Fulgham.

Source/WebCore:

The CMake variable PAL_DIR should be set in the project file.

* WebCore.vcxproj/WebCore.proj:

Source/WebCore/PAL:

CMAKE_BINARY_DIR is needed in the include list in order to find 'cmakeconfig.h'.

* pal/CMakeLists.txt:

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

2 years ago[SVG] Leak in SVGAnimatedListPropertyTearOff
svillar@igalia.com [Tue, 11 Jul 2017 16:30:43 +0000 (16:30 +0000)]
[SVG] Leak in SVGAnimatedListPropertyTearOff
https://bugs.webkit.org/show_bug.cgi?id=172545

Source/WebCore:

Reviewed by Said Abou-Hallawa.

SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
reference to SVGAnimatedProperty.

When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
is going to be added to. This effectively creates a reference cycle between the
SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.

We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.

* svg/properties/SVGAnimatedListPropertyTearOff.h:

LayoutTests:

Reviewed by Darin Adler.

* svg/animations/animation-leak-list-property-instances-expected.txt: Added.
* svg/animations/animation-leak-list-property-instances.html: Added.

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

2 years agoWeb Inspector: Node Sidebar - Improve wording for Potential Custom Element lacking...
commit-queue@webkit.org [Tue, 11 Jul 2017 16:15:11 +0000 (16:15 +0000)]
Web Inspector: Node Sidebar - Improve wording for Potential Custom Element lacking a Custom definition
https://bugs.webkit.org/show_bug.cgi?id=174346

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-07-11
Reviewed by Matt Baker.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState):
The text "Waiting to be upgraded" is poor. Any non-standard element with dashes
in the name is considered custom, but does not need to be upgraded. Lets use
different wording to indicate that it is detected as custom, and lacks a
specific Custom Element definition.

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

2 years ago[GTK] Spin buttons on input type number appear over the value itself for small widths
clopez@igalia.com [Tue, 11 Jul 2017 15:34:41 +0000 (15:34 +0000)]
[GTK] Spin buttons on input type number appear over the value itself for small widths
https://bugs.webkit.org/show_bug.cgi?id=173572

Reviewed by Carlos Garcia Campos.

Source/WebCore:

When drawing the spin buttons, override the width of the input
element to increment it with the width of the spin button.
This ensures that we don't end up covering the input values with
the spin buttons.

Do this also for user controlled styles, because most web authors
won't test how their site renders on WebKitGTK+, and they will
assume spin buttons in the order of 13 pixels wide (that is what
most browsers use), but the GTK+ spin button is much wider (66 pixels).

Test: platform/gtk/fast/forms/number/number-size-spinbutton-nocover.html

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::adjustTextFieldStyle): Call the theme's adjustTextFieldStyle() also for user controlled styles.
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):

LayoutTests:

* fast/forms/number/number-size-expected.txt:
* fast/forms/number/number-size.html: Obtain the size of the spinbutton by inspecting the shadow dom (is more reliable)
  and make the test for user controlled style special for the case of GTK+.
* platform/gtk/fast/forms/number/number-size-spinbutton-nocover-expected.png: Added.
* platform/gtk/fast/forms/number/number-size-spinbutton-nocover-expected.txt: Added.
* platform/gtk/fast/forms/number/number-size-spinbutton-nocover.html: Added.

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

2 years agoWe should do ICE candidate filtering at the Document level
commit-queue@webkit.org [Tue, 11 Jul 2017 15:32:38 +0000 (15:32 +0000)]
We should do ICE candidate filtering at the Document level
https://bugs.webkit.org/show_bug.cgi?id=173861
<rdar://problem/33122058>

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

Source/WebCore:

Tests: http/tests/webrtc/filtering-ice-candidate-cross-origin-frame.html
       http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html
       http/tests/webrtc/filtering-ice-candidate-same-origin-frame2.html
       webrtc/filtering-ice-candidate-after-reload.html

Making UserMediaRequest disable the ICE candidate filtering for the page RTCController.
All RTCPeerConnection of the page that are created on a document that are same-origin as the top document
are now registered to the RTCController.
This allows disabling filtering to only these RTCPeerConnection.

The page keeps the default ICE candidate filtering policy.
This policy allows disabling ICE candidate filtering for all RTCPeerConnection.

When the top document is changing, the RTCController filtering policy is reset
and its list of RTCPeerConnection is emptied.

Internals no longer disables ICE candidate filtering by default.
This allows finer grained testing.
ICE candidate filtering is disabled for tests including testharnessreport.js
to enable web-platform-tests to run without modifications.

* Modules/mediastream/RTCController.cpp:
(WebCore::RTCController::reset):
* Modules/mediastream/RTCController.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::allow):
* page/Frame.cpp:
(WebCore::Frame::setDocument):
* page/Page.cpp:
(WebCore::Page::disableICECandidateFiltering):
* page/Page.h:
(WebCore::Page::shouldEnableICECandidateFilteringByDefault):
(WebCore::Page::disableICECandidateFiltering): Deleted.
(WebCore::Page::enableICECandidateFiltering): Deleted.
(WebCore::Page::isICECandidateFilteringEnabled): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::setICECandidateFiltering):
(WebCore::Internals::setEnumeratingAllNetworkInterfacesEnabled):
(WebCore::Internals::isICECandidateFilteringEnabled): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

Removing ICE candidate filtering handling at UIProcess level.
ICE candidate filtering is now disabled at UserMediaRequest level.
WebPage forwards the ICE candidate filtering option to the page so as to set
the default option correctly for every document of the page.

* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::endedCaptureSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::disableICECandidateFiltering):
(WebKit::WebPage::enableICECandidateFiltering):

LayoutTests:

* http/tests/webrtc/filtering-ice-candidate-cross-origin-frame-expected.txt: Added.
* http/tests/webrtc/filtering-ice-candidate-cross-origin-frame.html: Added.
* http/tests/webrtc/filtering-ice-candidate-same-origin-frame-expected.txt: Added.
* http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html: Added.
* http/tests/webrtc/filtering-ice-candidate-same-origin-frame2-expected.txt: Added.
* http/tests/webrtc/filtering-ice-candidate-same-origin-frame2.html: Added.
* http/tests/webrtc/resources/check-ice-candidate-filtering.html: Added.
* http/tests/webrtc/resources/do-get-user-media.html: Added.
* platform/mac-wk1/TestExpectations: Disable http/tests/webrtc tests.
* resources/testharnessreport.js: Disabled ICE candidate filtering by default.
* webrtc/filtering-ice-candidate-after-reload-expected.txt: Added.
* webrtc/filtering-ice-candidate-after-reload.html: Added.

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

2 years agoChanging the web page muted state for playing audio should not disable other tabs...
commit-queue@webkit.org [Tue, 11 Jul 2017 15:14:36 +0000 (15:14 +0000)]
Changing the web page muted state for playing audio should not disable other tabs capture
https://bugs.webkit.org/show_bug.cgi?id=174349
rdar://problem/33223988

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

Make sure to mute capturing streams of any other tab if the current tab will start capturing or will unmute existing capturing streams.
Manually tested by having a tab doing capture and another tab playing a video.
Muting or unmuting the tab playing video should not change the capture tab.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activateMediaStreamCaptureInPage):
(WebKit::WebPageProxy::setMuted):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::activateMediaStreamCaptureInPage):

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

2 years ago[WPE] Bump GStreamer packages in jhbuild.modules to 1.10.5
zandobersek@gmail.com [Tue, 11 Jul 2017 14:59:25 +0000 (14:59 +0000)]
[WPE] Bump GStreamer packages in jhbuild.modules to 1.10.5
https://bugs.webkit.org/show_bug.cgi?id=174350

Reviewed by Xabier Rodriguez-Calvar.

Bump the various GStreamer dependencies listed in WPE's Jhbuild modules file
to the 1.10.5 version. One gstreamer patch is added. The two gst-plugins-bad
patches are removed. The patches for gst-plugins-good are updated, removing
the stale ones and adding the additional changes to qtdemux, souphttpsrc and
rtpbin elements that will help with the EMEv3 development.

* wpe/jhbuild.modules:
* wpe/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Removed.
* wpe/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Removed.
* wpe/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch: Added.
* wpe/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch: Added.
* wpe/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch: Added.
* wpe/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch: Added.
* wpe/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
* wpe/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
* wpe/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Added.

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

2 years agoNetworkProcess should close listening WebRTC sockets when being suspended
commit-queue@webkit.org [Tue, 11 Jul 2017 14:53:18 +0000 (14:53 +0000)]
NetworkProcess should close listening WebRTC sockets when being suspended
https://bugs.webkit.org/show_bug.cgi?id=174270
rdar://problem/33139844

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

To prevent potential spinning of the NetworkProcess, NetworkProcess will now close listening sockets when being notified that it will be suspended.
When the network process is being suspended, it will stop creating listening sockets, until it resumes.
Future additional efforts might be to improve select/cancel so that we can stop listening sockets at resume time,
or to reimplement part of the stack using CFStream.

Tested through manual testing by going to a website doing WebRTC, homing out so that the network process is suspended and reopening Safari.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cleanupForSuspension):
Proxying call to clean for suspension to rtc provider so that it will
close listening sockets.
(WebKit::NetworkConnectionToWebProcess::resumeFromSuspension): Authorizing back listening sockets.
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::cleanupForSuspension):
Clean-up is done asynchronously as it can happen in background threads.
Hence why passing a callback as parameter.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::notifyProcessReadyToSuspend): Helper routine
to notify UI process that network process clean up is done.
(WebKit::TaskCounter::TaskCounter): Helper class to call notifyProcessReadyToSuspend when sded.
(WebKit::TaskCounter::~TaskCounter):
(WebKit::NetworkProcess::actualPrepareToSuspend): Doing the clean-up for each connection that needs it.
Making sure to notify UI process of clean-up being completed once all connections are cleaned.
(WebKit::NetworkProcess::processWillSuspendImminently):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::processDidResume): Reenable listening sockets.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
(WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
* NetworkProcess/webrtc/LibWebRTCSocketClient.h: Adding type getter and making close public.
Used by NetworkRTCProvider to identifiy listening sockets and close them.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::closeListeningSockets): We close the webrtc socket
and we also notify the Web Process that the socket is closed so that it can take actions to recreate some if needed.
(WebKit::NetworkRTCProvider::finishClosingListeningSockets):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
(WebKit::NetworkRTCProvider::authorizeListeningSockets): Authorize creation of listening sockets.

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

2 years agoUnreviewed, rolling out r219325.
svillar@igalia.com [Tue, 11 Jul 2017 13:29:40 +0000 (13:29 +0000)]
Unreviewed, rolling out r219325.

The test is still flaky

Reverted changeset:

"[SVG] Leak in SVGAnimatedListPropertyTearOff"
https://bugs.webkit.org/show_bug.cgi?id=172545
http://trac.webkit.org/changeset/219325

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

2 years ago[GTK] media/video-restricted-invisible-autoplay-not-allowed.html is flaky
commit-queue@webkit.org [Tue, 11 Jul 2017 13:15:33 +0000 (13:15 +0000)]
[GTK] media/video-restricted-invisible-autoplay-not-allowed.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=174353

Unreviewed test gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-11

* platform/gtk/TestExpectations:

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

2 years ago[SVG] Leak in SVGAnimatedListPropertyTearOff
svillar@igalia.com [Tue, 11 Jul 2017 10:44:18 +0000 (10:44 +0000)]
[SVG] Leak in SVGAnimatedListPropertyTearOff
https://bugs.webkit.org/show_bug.cgi?id=172545

Reviewed by Said Abou-Hallawa.

SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
reference to SVGAnimatedProperty.

When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
is going to be added to. This effectively creates a reference cycle between the
SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.

We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.

* svg/properties/SVGAnimatedListPropertyTearOff.h:

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

2 years agoUnreviewed WPE gardening.
zandobersek@gmail.com [Tue, 11 Jul 2017 07:49:54 +0000 (07:49 +0000)]
Unreviewed WPE gardening.

* platform/wpe/TestExpectations:
Enable EMEv3 tests under media/encrypted-media/, all of them passing.

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

2 years agoResource Load Statistics: Prune statistics in orders of importance
bfulgham@apple.com [Tue, 11 Jul 2017 04:08:20 +0000 (04:08 +0000)]
Resource Load Statistics: Prune statistics in orders of importance
https://bugs.webkit.org/show_bug.cgi?id=174215
<rdar://problem/33164403>

Unreviewed test correction.

Source/WebKit2:

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::pruneResources): The revised algorithm did not update the remaining
count to be pruned, causing a test failure.

LayoutTests:

Drive-by fix after recent refactoring to correct the new function names in TestRunner.

* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
* http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:

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

2 years agoAddress Antti's review comment.
rniwa@webkit.org [Tue, 11 Jul 2017 03:46:16 +0000 (03:46 +0000)]
Address Antti's review comment.

* public/v3/models/analysis-results.js:
(AnalysisResults.prototype.containsTest):

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

2 years agoA/B testing results page show results for the top-level tests instead of the one...
rniwa@webkit.org [Tue, 11 Jul 2017 03:45:00 +0000 (03:45 +0000)]
A/B testing results page show results for the top-level tests instead of the one being analyzed
https://bugs.webkit.org/show_bug.cgi?id=174304

Reviewed by Antti Koivisto.

When a specific subtest is analyzed (e.g. Images subtest of MotionMark), then TestGroupResultsViewer
should expand and highlight that specific subtest instead of simply showing the top-level test's score.
This is especially misleading since AnalysisResultsViewer (stacking bars for each test group) uses
the score of the specific subtest being analyzed.

Fixed the bug by passing in the metric associated with the analysis task from AnalysisTaskPage to
TestGroupResultsViewer via AnalysisTaskTestGroupPane. Also made TestGroupResultsViewer.setAnalysisResults
auto-expand the tests that are ancestors of the specified metric. Without that, the test won't be shown
to the user until the ancestor tests are expanded by the user.

Also fixed the bug that we were always listing sub-tests regardless of whether they have results or not.
Since tests tend to change over time, we shouldn't show a test if it doesn't have any results associated.

* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.setAnalysisResults): Expand the ancestor tests of the metric.
(TestGroupResultsViewer.prototype._buildRowsForTest): Exit early if this test doesn't have any results.
* public/v3/models/analysis-results.js:
(AnalysisResults.prototype.containsTest): Added.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskTestGroupPane.prototype.setAnalysisResults): Takes a metric to pass it to the results viewer.
(AnalysisTaskPage.prototype._assignTestResultsIfPossible):

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

2 years ago[WK2 iOS] REGRESSION (r216803) During momentum scroll, getBoundingClientRect returns...
simon.fraser@apple.com [Tue, 11 Jul 2017 03:40:59 +0000 (03:40 +0000)]
[WK2 iOS] REGRESSION (r216803) During momentum scroll, getBoundingClientRect returns wrong coordinates (missing images on pinterest, elle.com and many other sites)
https://bugs.webkit.org/show_bug.cgi?id=174286
rdar://problem/32864180

Reviewed by Dean Jackson.

Source/WebCore:

r216803 made getBoundingClientRects relative to the layout viewport, but when scrolling we
only update that on stable viewport updates (at the end of the scroll). This meant that during
unstable updates, getBoundingClientRects() used a "frozen" viewport origin so things on-screen
would appear to be off-screen, causing sites to fail to dynamically load images etc. when
scrolling.

Fix by pushing an optional "unstable" layout viewport rect onto FrameView, which gets used by
FrameView::documentToClientOffset(). This is cleared when we do a stable update.

This is a short-term solution. Longer term, I would prefer to always call setLayoutViewportOverrideRect(),
but fix the scrolling tree logic to work correctly in this case.

Add a bit more scrolling logging.

Test: fast/visual-viewport/ios/get-bounding-client-rect-unstable.html

* page/FrameView.cpp:
(WebCore::FrameView::setUnstableLayoutViewportRect):
(WebCore::FrameView::documentToClientOffset):
* page/FrameView.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::updateConstraints):
(WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):

LayoutTests:

* fast/visual-viewport/ios/get-bounding-client-rect-unstable-expected.txt: Added.
* fast/visual-viewport/ios/get-bounding-client-rect-unstable.html: Added.

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

2 years agoResource Load Statistics: Prune statistics in orders of importance
bfulgham@apple.com [Tue, 11 Jul 2017 02:52:07 +0000 (02:52 +0000)]
Resource Load Statistics: Prune statistics in orders of importance
https://bugs.webkit.org/show_bug.cgi?id=174215
<rdar://problem/33164403>

Patch by John Wilander <wilander@apple.com> on 2017-07-10
Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/prune-statistics.html

* loader/ResourceLoadObserver.cpp:
(WebCore::reduceTimeResolution):
(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
    Now all set the new statistics field lastSeen.
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::encode):
(WebCore::ResourceLoadStatistics::decode):
(WebCore::ResourceLoadStatistics::toString):
(WebCore::ResourceLoadStatistics::merge):
    Handling of the new statistics field lastSeen.
* loader/ResourceLoadStatistics.h:

Source/WebKit2:

New functionality. Prunes statistics in this order:
1. Non-prevalent resources without user interaction.
2. Prevalent resources without user interaction.
3. Non-prevalent resources with user interaction.
4. Prevalent resources with user interaction.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
    Added timestamp field lastSeen.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _resourceLoadStatisticsSetLastSeen:forHost:]):
(-[WKWebsiteDataStore _resourceLoadStatisticsSetMaxStatisticsEntries:]):
(-[WKWebsiteDataStore _resourceLoadStatisticsSetPruneEntriesDownTo:]):
(-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]):
    Test infrastructure.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/Storage/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::setMaxStatisticsEntries):
    Test infrastructure.
(WebKit::ResourceLoadStatisticsStore::setPruneEntriesDownTo):
    Test infrastructure.
(WebKit::sortAndPrune):
    Convenience function.
(WebKit::ResourceLoadStatisticsStore::pruneStatisticsIfNeeded):
    The new pruning function.
* UIProcess/Storage/ResourceLoadStatisticsStore.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
    Now calls ResourceLoadStatisticsStore::pruneStatisticsIfNeeded().
(WebKit::WebResourceLoadStatisticsStore::setLastSeen):
    Test infrastructure.
(WebKit::WebResourceLoadStatisticsStore::setMaxStatisticsEntries):
    Test infrastructure.
(WebKit::WebResourceLoadStatisticsStore::setPruneEntriesDownTo):
    Test infrastructure.
* UIProcess/WebResourceLoadStatisticsStore.h:

Tools:

Nest infrastructure. Adds these functions:
1. testRunner.setStatisticsLastSeen()
2. setStatisticsMaxStatisticsEntries()
3. setStatisticsPruneEntriesDownTo()

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsLastSeen):
(WTR::TestRunner::setStatisticsMaxStatisticsEntries):
(WTR::TestRunner::setStatisticsPruneEntriesDownTo):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsLastSeen):
(WTR::TestController::setMaxStatisticsEntries):
(WTR::TestController::setPruneEntriesDownTo):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::setStatisticsLastSeen):
(WTR::TestController::setStatisticsMaxStatisticsEntries):
(WTR::TestController::setStatisticsPruneEntriesDownTo):

LayoutTests:

* http/tests/loading/resourceLoadStatistics/prune-statistics-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/prune-statistics.html: Added.
* platform/wk2/TestExpectations:
    Added http/tests/loading/resourceLoadStatistics/prune-statistics.html as
    [ Pass ] since Resource Load Statistics is WK2-only.

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

2 years agoconst() experimental feature should always be on by default
dino@apple.com [Tue, 11 Jul 2017 02:39:16 +0000 (02:39 +0000)]
const() experimental feature should always be on by default
https://bugs.webkit.org/show_bug.cgi?id=174341
<rdar://problem/33228603>

Reviewed by Simon Fraser.

Even though this is experimental, it should be enabled by default, and
not follow the value of DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.

* Shared/WebPreferencesDefinitions.h:

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

2 years agoAllocation sinking phase should consider a CheckStructure that would fail as an escape
sbarati@apple.com [Tue, 11 Jul 2017 00:29:36 +0000 (00:29 +0000)]
Allocation sinking phase should consider a CheckStructure that would fail as an escape
https://bugs.webkit.org/show_bug.cgi?id=174321
<rdar://problem/32604963>

Reviewed by Filip Pizlo.

When the allocation sinking phase was generating stores to materialize
objects in a cycle with each other, it would assume that each materialized
object had a valid, non empty, set of structures. This is an OK assumption for
the phase to make because how do you materialize an object with no structure?

The abstract interpretation part of the phase will model what's in the heap.
However, it would sometimes model that a CheckStructure would fail. The phase
did nothing special for this; it just stored the empty set of structures for
its representation of a particular allocation. However, what the phase proved
in such a scenario is that, had the CheckStructure executed, it would have exited.

This patch treats such CheckStructures and MultiGetByOffsets as escape points.
This will cause the allocation in question to be materialized just before
the CheckStructure, and then at execution time, the CheckStructure will exit.

I wasn't able to write a test case for this. However, I was able to reproduce
this crash by manually editing the IR. I've opened a separate bug to help us
create a testing framework for writing tests for hard to reproduce bugs like this:
https://bugs.webkit.org/show_bug.cgi?id=174322

* dfg/DFGObjectAllocationSinkingPhase.cpp:

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

2 years agoWeb Inspector: Highlight matching CSS canvas clients when hovering contexts in the...
drousso@apple.com [Tue, 11 Jul 2017 00:01:55 +0000 (00:01 +0000)]
Web Inspector: Highlight matching CSS canvas clients when hovering contexts in the Resources tab
https://bugs.webkit.org/show_bug.cgi?id=174279

Reviewed by Matt Baker.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:
Add `highlightNodeList` command that will highlight each node in the given list.

Source/WebCore:

Test: inspector/dom/highlightNodeList.html

* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightNodeList):

Source/WebInspectorUI:

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.highlightDOMNodeList):
(WebInspector.DOMTreeManager.prototype.highlightSelector):
* UserInterface/Views/CanvasTreeElement.js:
(WebInspector.CanvasTreeElement.prototype._handleMouseOver):

LayoutTests:

* inspector/dom/highlightNodeList-expected.html: Added.
* inspector/dom/highlightNodeList.html: Added.

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

2 years ago[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must...
jfernandez@igalia.com [Mon, 10 Jul 2017 23:56:21 +0000 (23:56 +0000)]
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved
https://bugs.webkit.org/show_bug.cgi?id=172707

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

This change makes all the cases of the test below to pass now, hence updated expectations accordingly.

* web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt:

Source/WebCore:

The CSS Box Alignment specification has been changed recently so that
now all the propeties have the specificed value as computed value. The
rationale of this change are at the associated W3C github issue [1].

This change implies that we don't need to execute the StyleAdjuter
logic we implemented specifically for supporting 'auto' values
resolution for computed style. We can live now with resolution at
layout time only.

[1] https://github.com/w3c/csswg-drafts/issues/440

No new tests, just updating the already defined tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Removed
* css/StyleResolver.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::columnFlexItemHasStretchAlignment):
(WebCore::RenderBox::hasStretchedLogicalWidth):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::styleDidChange): Added
(WebCore::RenderFlexibleBox::alignmentForChild):
* rendering/RenderFlexibleBox.h:

LayoutTests:

Updated layout tests so that resolved value is as specified, even for 'auto' values.

* TestExpectations:
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt:
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
* css3/parse-alignment-of-root-elements.html:
* css3/parse-place-items.html:
* css3/parse-place-self.html:
* fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt:
* fast/css/parse-justify-self.html:

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

2 years ago[iOS] _didCommitLayerTree should avoid calling [scrollView setZoomScale] unnecessarily
cdumez@apple.com [Mon, 10 Jul 2017 23:28:27 +0000 (23:28 +0000)]
[iOS] _didCommitLayerTree should avoid calling [scrollView setZoomScale] unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=174326
<rdar://problem/33150490>

Reviewed by Simon Fraser.

Only call [scrollView setZoomScale] if the new zoom scale is actually different to
avoid doing unnecessary work in UIKit.

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

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

2 years agofast/text/trak-optimizeLegibility.html is failing on macOS High Sierra
mmaxfield@apple.com [Mon, 10 Jul 2017 23:25:19 +0000 (23:25 +0000)]
fast/text/trak-optimizeLegibility.html is failing on macOS High Sierra
https://bugs.webkit.org/show_bug.cgi?id=174325
<rdar://problem/33190322>

Reviewed by Zalan Bujtas.

The name of the font changed.

* fast/text/trak-optimizeLegibility.html:

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

2 years agoMerge ResourceLoadStatisticsStore into WebResourceLoadStatisticsStore
cdumez@apple.com [Mon, 10 Jul 2017 23:00:42 +0000 (23:00 +0000)]
Merge ResourceLoadStatisticsStore into WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=174203

Reviewed by Brent Fulgham.

Merge ResourceLoadStatisticsStore into WebResourceLoadStatisticsStore. The 2 classes
have a similar purpose and there is no clean separation between the 2. It makes more
sense to have a single store class for resource load statistics.

If we want to simplify the WebResourceLoadStatisticsStore class, I think it'd make
more sense to split the file system I/O code out. This code adds quite a bit of
complexity.

* CMakeLists.txt:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
(-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]):
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):
(-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]):
* UIProcess/Storage/ResourceLoadStatisticsStore.cpp: Removed.
* UIProcess/Storage/ResourceLoadStatisticsStore.h: Removed.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebKit::WebResourceLoadStatisticsStore::refreshFromDisk):
(WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk):
(WebKit::WebResourceLoadStatisticsStore::startMonitoringStatisticsStorage):
(WebKit::WebResourceLoadStatisticsStore::performDailyTasks):
(WebKit::WebResourceLoadStatisticsStore::submitTelemetry):
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
(WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemory):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsStore::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsStore::ensureResourceStatisticsForPrimaryDomain):
(WebKit::WebResourceLoadStatisticsStore::createEncoderFromData):
(WebKit::WebResourceLoadStatisticsStore::populateFromDecoder):
(WebKit::WebResourceLoadStatisticsStore::clearInMemory):
(WebKit::WebResourceLoadStatisticsStore::mergeStatistics):
(WebKit::WebResourceLoadStatisticsStore::shouldPartitionCookies):
(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
(WebKit::WebResourceLoadStatisticsStore::processStatistics):
(WebKit::WebResourceLoadStatisticsStore::hasHadUnexpiredRecentUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
(WebKit::WebResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary):
(WebKit::WebResourceLoadStatisticsStore::hasStatisticsExpired):
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::sortedPrevalentResourceTelemetry):
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
* UIProcess/WebResourceLoadStatisticsTelemetry.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
* WebKit2.xcodeproj/project.pbxproj:

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

2 years agoUpdate webrtc expectations
commit-queue@webkit.org [Mon, 10 Jul 2017 23:00:02 +0000 (23:00 +0000)]
Update webrtc expectations
https://bugs.webkit.org/show_bug.cgi?id=174318

Unreviewed.

Updated expectation according flakiness dashboard information.

Patch by Youenn Fablet <youenn@apple.com> on 2017-07-10

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

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

2 years ago[WK2] Ignore touch events that interrupt platform-driven momentum scrolling
wenson_hsieh@apple.com [Mon, 10 Jul 2017 22:08:38 +0000 (22:08 +0000)]
[WK2] Ignore touch events that interrupt platform-driven momentum scrolling
https://bugs.webkit.org/show_bug.cgi?id=174300
<rdar://problem/33030639>

Reviewed by Simon Fraser.

Source/WebCore:

See Source/WebKit2/ChangeLog for more detail.

Tests: fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html
       fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-overflow.html
       fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html

* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture):

Source/WebKit2:

Adds support for immediately failing WKContentView's UIWebTouchEventsGestureRecognizer if any touch interrupts
scroll view deceleration. Covered by 3 new LayoutTests (see Source/WebCore/ChangeLog).

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndPanGesture):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewDidEndPanGesture):

Adds plumbing in the UI process to alert the WKContentView when scroll view dragging has ended in an overflow
momentum scrolling region (tracked by an overflow scrolling tree node). This parallels UI process plumbing for
ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewWillStartPanGesture.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::overflowScrollViewDidEndPanGesture):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndPanGesture):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView scrollViewDidEndPanOrPinchGesture]):

When the dragging phase of a scroll gesture ends, ensure that _canSendTouchEventsAsynchronously is reset to NO.
When touches are not being prevented, this flag is set to YES in -scrollViewWillStartPanOrPinchGesture: and
normally reset to NO in -_webTouchEventsRecognized: after all touch points have been released. However, in the
case where we've prematurely failed the web touch events gesture recognizer after -touchesBegan:,
-_webTouchEventsRecognized: will not be called again in a state where all touches have been released. Thus, we
also need to bookend the place where we begin allowing async touch event dispatch in
-scrollViewWillStartPanOrPinchGesture by disallowing async touch event dispatch in
-scrollViewDidEndPanOrPinchGesture.

This has no impact in the normal case where the user scrolls without momentum, since
-scrollViewDidEndPanOrPinchGesture will fire after async touch events have already been disallowed in
-_webTouchEventsRecognized:, and in the case where the page prevents default on touches, scrolling doesn't
happen anyways, so neither scrollViewWillStartPanOrPinchGesture nor scrollViewDidEndPanOrPinchGesture will be
invoked.

(-[WKContentView gestureRecognizer:shouldIgnoreWebTouchWithEvent:]):

Implements a new SPI hook in UIKit. This serves an identical purpose as -shouldIgnoreWebTouch, but additionally
passes the triggering UIEvent, as well as the gesture recognizer itself (following standard convention for
Objective C delegate methods). Here, we return YES in the case where one or more of the touches recognized by
the gesture is currently interrupting scroll deceleration.

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

LayoutTests:

Adds 3 new LayoutTests covering cases of touch event handling during scroll deceleration in mainframe and
overflow scrolling containers. See Source/WebKit2/ChangeLog for more detail.

* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt: Added.
* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html: Added.
* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-overflow-expected.txt: Added.
* fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-overflow.html: Added.
* fast/events/ios/touch-events-during-scroll-deceleration-in-overflow-expected.txt: Added.
* fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html: Added.

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

2 years agoMarked animations/resume-after-page-cache.html as flaky.
jlewis3@apple.com [Mon, 10 Jul 2017 21:31:50 +0000 (21:31 +0000)]
Marked animations/resume-after-page-cache.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=174183

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

2 years ago[WK2][macOS] Allow access to com.apple.cfnetwork.cfnetworkagent in the Network Process
bfulgham@apple.com [Mon, 10 Jul 2017 21:16:40 +0000 (21:16 +0000)]
[WK2][macOS] Allow access to com.apple.cfnetwork.cfnetworkagent in the Network Process
https://bugs.webkit.org/show_bug.cgi?id=174320
<rdar://problem/33191856>

Reviewed by Geoffrey Garen.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

2 years agoCaptions and subtitles not showing up in picture-in-picture for MSE content
commit-queue@webkit.org [Mon, 10 Jul 2017 20:58:32 +0000 (20:58 +0000)]
Captions and subtitles not showing up in picture-in-picture for MSE content
https://bugs.webkit.org/show_bug.cgi?id=174317
rdar://problem/33188591

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

Reverts a regression created by r218403.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):

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

2 years ago[Win] Link error when building WTF from WTF.proj project file.
pvollan@apple.com [Mon, 10 Jul 2017 20:09:04 +0000 (20:09 +0000)]
[Win] Link error when building WTF from WTF.proj project file.
https://bugs.webkit.org/show_bug.cgi?id=174316
<rdar://problem/33178200>

Reviewed by Brent Fulgham.

WTF_CPU_X86 cmake variable needs to be set for link libraries directories to be correct.

Source/WebCore:

* WebCore.vcxproj/WebCore.proj:

Source/WebKit:

* WebKit.vcxproj/WebKit.proj:

Source/WTF:

* WTF.vcxproj/WTF.proj:

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