1. 14 Jun, 2017 3 commits
  2. 13 Jun, 2017 5 commits
    • Emanuele Aina's avatar
      clutter: Fix video playback · 72270edd
      Emanuele Aina authored
      Launching GtkClutterLauncher on a page with an embedded video element
      failed to play it until clicking in the page.
      
      For instance, the video below would not be preloaded:
      
       GtkClutterLauncher http://html5demos.com/video
      
      This was because the internal WebView widget assumed that videos should
      not be loaded unless the toplevel window was actually on screen, but
      the internal widget only lives on a offscreen window when using the
      Clutter wrapper.
      
      This particularly affected YouTube, which was stuck in a loading state
      with a never-ending spinner animation:
      
       GtkClutterLauncher https://www.youtube.com/watch?v=U9t-slLl30E
      
      Triggering webkitWebViewBaseSetToplevelOnScreenWindow() even if the
      toplevel is not actually on screen when using the Clutter wrapper fixed
      the above issues.
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      Reviewed-by: André Magalhães's avatarAndré Magalhães <andre.magalhaes@collabora.co.uk>
      Differential Revision: https://phabricator.apertis.org/D7021
      72270edd
    • Emanuele Aina's avatar
      Revert "Merge r211277 - [GTK] Stop forcing accelerated compositing by default" · c0e28832
      Emanuele Aina authored
      This reverts commit 1c22f403.
      
      On-demand compositing does not seem to work well under Wayland,
      see https://bugs.webkit.org/show_bug.cgi?id=173256
      
      Switch back to the old behaviour for the moment.
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      Reviewed-by: André Magalhães's avatarAndré Magalhães <andre.magalhaes@collabora.co.uk>
      Differential Revision: https://phabricator.apertis.org/D7020
      c0e28832
    • Emanuele Aina's avatar
      Disable debug assertion · f8f91210
      Emanuele Aina authored
      Avoid the following assertions on debug builds:
      
      ASSERTION FAILED: NoEventDispatchAssertion::isEventDispatchAllowedInSubtree(*this)
      dom/Node.cpp(2144) : void WebCore::Node::dispatchSubtreeModifiedEvent()
      1   0x7f8504ab793c /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x1e) [0x7f8504ab793c]
      2   0x7f8504ab7952 /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(+0x2126952) [0x7f8504ab7952]
      3   0x7f850b360aee /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore4Node28dispatchSubtreeModifiedEventEv+0x58) [0x7f850b360aee]
      4   0x7f850b25ad95 /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13CharacterData21dispatchModifiedEventERKN3WTF6StringE+0x1eb) [0x7f850b25ad95]
      5   0x7f850b25ab5d /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13CharacterData16setDataAndUpdateERKN3WTF6StringEjjj+0x19d) [0x7f850b25ab5d]
      6   0x7f850b25a181 /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13CharacterData7setDataERKN3WTF6StringE+0x143) [0x7f850b25a181]
      7   0x7f850b4b24d6 /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore27replaceChildrenWithFragmentERNS_13ContainerNodeEON3WTF3RefINS_16DocumentFragmentEEERi+0x1ab) [0x7f850b4b24d6]
      8   0x7f850b3091f0 /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore7Element12setInnerHTMLERKN3WTF6StringERi+0xa6) [0x7f850b3091f0]
      9   0x7f850c52acab /home/user/dev/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore21setJSElementInnerHTMLEPN3JSC9ExecStateEll+0x159) [0x7f850c52acab]
      10  0x7f850482efeb /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(_ZN3JSC16callCustomSetterEPNS_9ExecStateEPFbS1_llEbNS_7JSValueES4_+0x7e) [0x7f850482efeb]
      11  0x7f850482f094 /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(_ZN3JSC16callCustomSetterEPNS_9ExecStateENS_7JSValueEbPNS_8JSObjectES2_S2_+0x8c) [0x7f850482f094]
      12  0x7f85048e956c /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(_ZN3JSC8JSObject13putInlineSlowEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE+0x258) [0x7f85048e956c]
      13  0x7f8504356e30 /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(_ZN3JSC8JSObject9putInlineEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE+0x36c) [0x7f8504356e30]
      14  0x7f85043565cb /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(_ZN3JSC7JSValue9putInlineEPNS_9ExecStateENS_12PropertyNameES0_RNS_15PutPropertySlotE+0xc7) [0x7f85043565cb]
      15  0x7f85046d0acd /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(+0x1d3facd) [0x7f85046d0acd]
      16  0x7f85046dfcbf /home/user/dev/lib/libjavascriptcoregtk-4.0.so.18(+0x1d4ecbf) [0x7f85046dfcbf]
      
      ASSERTION FAILED: NoEventDispatchAssertion::isEventDispatchAllowedInSubtree(insertionPoint)
      dom/ContainerNodeAlgorithms.cpp(91) : void WebCore::notifyChildNodeInserted(WebCore::ContainerNode&, WebCore::Node&, WebCore::NodeVector&)
      1   0x7f53c74c893c /home/em/TMP/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x1e) [0x7f53c74c893c]
      2   0x7f53c74c8952 /home/em/TMP/lib/libjavascriptcoregtk-4.0.so.18(+0x2126952) [0x7f53c74c8952]
      3   0x7f53cdca79b0 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore23notifyChildNodeInsertedERNS_13ContainerNodeERNS_4NodeERN3WTF6VectorINS4_3RefIS2_EELm11ENS4_15CrashOnOverflowELm16EEE+0x4c) [0x7f53cdca79b0]
      4   0x7f53cdc996f5 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13ContainerNode19notifyChildInsertedERNS_4NodeENS0_17ChildChangeSourceE+0x87) [0x7f53cdc996f5]
      5   0x7f53cdc9bbd3 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13ContainerNode24updateTreeAfterInsertionERNS_4NodeE+0x61) [0x7f53cdc9bbd3]
      6   0x7f53cdc9ae5d /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13ContainerNode43appendChildWithoutPreInsertionValidityCheckERNS_4NodeERi+0x1f1) [0x7f53cdc9ae5d]
      7   0x7f53cdc9ac6a /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13ContainerNode11appendChildERNS_4NodeERi+0xb4) [0x7f53cdc9ac6a]
      8   0x7f53ceaa75eb /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZNK7WebCore13SVGUseElement11cloneTargetERNS_13ContainerNodeERNS_10SVGElementE+0x10d) [0x7f53ceaa75eb]
      9   0x7f53ceaa653f /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13SVGUseElement16updateShadowTreeEv+0xfd) [0x7f53ceaa653f]
      10  0x7f53ceaa5f1a /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13SVGUseElement15willRecalcStyleENS_5Style6ChangeE+0x2a) [0x7f53ceaa5f1a]
      11  0x7f53ce976f25 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore5Style12TreeResolver19resolveComposedTreeEv+0x41d) [0x7f53ce976f25]
      12  0x7f53ce97735d /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore5Style12TreeResolver7resolveENS0_6ChangeE+0x215) [0x7f53ce97735d]
      13  0x7f53cdcc2a6c /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document11recalcStyleENS_5Style6ChangeE+0x3c0) [0x7f53cdcc2a6c]
      14  0x7f53cdcc2f89 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document19updateStyleIfNeededEv+0x11d) [0x7f53cdcc2f89]
      15  0x7f53cdcca217 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document17setFocusedElementEPNS_7ElementENS_14FocusDirectionENS0_22FocusRemovalEventsModeE+0x899) [0x7f53cdcca217]
      16  0x7f53cdcc973a /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document26removeFocusedNodeOfSubtreeEPNS_4NodeEb+0xa0) [0x7f53cdcc973a]
      17  0x7f53cdccb012 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore8Document17nodeWillBeRemovedERNS_4NodeE+0x44) [0x7f53cdccb012]
      18  0x7f53cdc9a4a2 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore13ContainerNode11removeChildERNS_4NodeERi+0x154) [0x7f53cdc9a4a2]
      19  0x7f53cdd87196 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore4Node11removeChildERS0_Ri+0x5a) [0x7f53cdd87196]
      20  0x7f53cd9f0ea9 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore6JSNode11removeChildERN3JSC9ExecStateE+0x121) [0x7f53cd9f0ea9]
      21  0x7f53cef91453 /home/em/TMP/lib/libwebkit2gtk-4.0.so.37(_ZN7WebCore34jsNodePrototypeFunctionRemoveChildEPN3JSC9ExecStateE+0x19b) [0x7f53cef91453]
      22  0x7f539fffeec8 [0x7f539fffeec8]
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      Reviewed-by: André Magalhães's avatarAndré Magalhães <andre.magalhaes@collabora.co.uk>
      Differential Revision: https://phabricator.apertis.org/D7019
      f8f91210
    • Emanuele Aina's avatar
    • Emanuele Aina's avatar
      Merge remote-tracking branch 'webkit/webkit-2.14' · ed35b7e6
      Emanuele Aina authored
      * webkit/webkit-2.14: (174 commits)
        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.7 release.
        Merge r216343 - [GTK] Cannot sign in with new Google sign-in page https://bugs.webkit.org/show_bug.cgi?id=171770
        Merge r216139 - YouTube user agent quirk breaks new YouTube https://bugs.webkit.org/show_bug.cgi?id=171603
        Merge r215613 - Do not paint the border of the box if the dirty region does not intersect with border area https://bugs.webkit.org/show_bug.cgi?id=170988
        Merge r216240 - [GStreamer] Do not report more errors after the first one https://bugs.webkit.org/show_bug.cgi?id=171722
        Merge r216239 - [GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage https://bugs.webkit.org/show_bug.cgi?id=171721
        Merge r216067 - [GStreamer] Dailymotion live stream videos don't play https://bugs.webkit.org/show_bug.cgi?id=170767
        Merge r212349 - [GStreamer] Implement MediaPlayerPrivate::hasSingleSecurityOrigin() https://bugs.webkit.org/show_bug.cgi?id=168322
        Merge r216065 - [GTK] Crash at WebCore::ResourceHandle::clearClient() when streaming live video from dailymotion https://bugs.webkit.org/show_bug.cgi?id=169725
        Merge r215102 - REGRESSION(r204512): WebSocket errors with "Failed to send WebSocket frame."  if too much data is sent https://bugs.webkit.org/show_bug.cgi?id=170463
        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.6 release.
        Merge r214283 - [GTK] Honor GTK+ font settings https://bugs.webkit.org/show_bug.cgi?id=82889
        Merge r214246 - [Soup] "Only from websites I visit" cookie policy is broken https://bugs.webkit.org/show_bug.cgi?id=168912
        Merge r214162 - [Cairo] Ensure depth and stencil renderbuffers are created on GLESv2 https://bugs.webkit.org/show_bug.cgi?id=166643
        Merge r214100 - [Cairo] Handle the blend mode in GraphicsContext::drawPattern https://bugs.webkit.org/show_bug.cgi?id=169746
        Merge r212431 - [GTK] scroll with transparent background not repainted after scrollY >= 32768 https://bugs.webkit.org/show_bug.cgi?id=154283
        Merge r213522 - ShadowBlur::calculateLayerBoundingRect doesn't need to return the enclosingIntRect of layerRect https://bugs.webkit.org/show_bug.cgi?id=168650
        Merge r213276 - [GTK] Crash in WebCore::CoordinatedGraphicsLayer::notifyFlushRequired https://bugs.webkit.org/show_bug.cgi?id=166420
        Merge r213275 - Incorrect RELEASE_ASSERT in JSGlobalObject::addStaticGlobals() https://bugs.webkit.org/show_bug.cgi?id=169034
        Merge r213224 - [GTK] fast/canvas/canvas-createPattern-video-loading.html makes its subsequent test timeout https://bugs.webkit.org/show_bug.cgi?id=169019
        ...
      ed35b7e6
  3. 27 May, 2017 2 commits
  4. 18 May, 2017 5 commits
  5. 09 May, 2017 10 commits
    • carlosgc@webkit.org's avatar
      Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.7 release. · 99f5b231
      carlosgc@webkit.org authored
      .:
      
      * Source/cmake/OptionsGTK.cmake: Bump version numbers.
      
      Source/WebKit2:
      
      * gtk/NEWS: Add release notes for 2.14.7.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99f5b231
    • carlosgc@webkit.org's avatar
      Merge r216343 - [GTK] Cannot sign in with new Google sign-in page · 026ce5f1
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=171770
      
      Reviewed by Carlos Garcia Campos.
      
      Google's new authentication page does not work with the Firefox user
      agent that's required to make various Google websites work. Special-case
      accounts.google.com so that it receives our standard user agent.
      
      * platform/UserAgentQuirks.cpp:
      (WebCore::isGoogle):
      (WebCore::urlRequiresFirefoxBrowser):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      026ce5f1
    • carlosgc@webkit.org's avatar
      Merge r216139 - YouTube user agent quirk breaks new YouTube · 3b6f3594
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=171603
      
      Reviewed by Carlos Garcia Campos.
      
      Source/WebCore:
      
      Our user agent quirk to make YouTube 360 work breaks the new YouTube UI, causing it to
      attempt to use the obsolete custom elements v0 API. WebKit only supports the v1 API. We
      have to remove this quirk.
      
      Note this does not affect Safari as Apple ports don't use our user agent quirks.
      
      * platform/UserAgentQuirks.cpp:
      (WebCore::urlRequiresChromeBrowser):
      
      Tools:
      
      Remove the YouTube quirk test.
      
      * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
      (TestWebKitAPI::TEST):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b6f3594
    • carlosgc@webkit.org's avatar
      Merge r215613 - Do not paint the border of the box if the dirty region does... · 125e7205
      carlosgc@webkit.org authored
      Merge r215613 - Do not paint the border of the box if the dirty region does not intersect with border area
      https://bugs.webkit.org/show_bug.cgi?id=170988
      
      Reviewed by Simon Fraser.
      
      No new tests, since there is no change in behavior.
      
      * platform/graphics/GeometryUtilities.cpp:
      (WebCore::ellipseContainsPoint):
      Checks if a point is within an ellipse.
      
      * platform/graphics/GeometryUtilities.h:
      Replace header-guards with #pragma once.
      
      * platform/graphics/RoundedRect.cpp:
      (WebCore::RoundedRect::contains):
      Implemented to know the dirty rectangle intersects with rounded rectangle or not.
      * platform/graphics/RoundedRect.h:
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintBorder):
      When typing in decorated text box, the dirty rect generated only for the
      inside of the text box, not for the decorations.  So we can avoid the
      calculations to draw borders if the inner border totally covers the
      target surface. It will optimize the rendering process since we don't
      have to render border decorations whenever we type somethings in side of
      the text input element.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      125e7205
    • carlosgc@webkit.org's avatar
      Merge r216240 - [GStreamer] Do not report more errors after the first one · 9b8bac82
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=171722
      
      Reviewed by Xabier Rodriguez-Calvar.
      
      We can receive several error messages for the same error from different elements. That's not expected by the
      media source selection algorithm implementation. I don't know if didn't happen with previous versions of GST,
      but since the upgrade to 1.10.4 several tests are failing because of this.
      
      Fixes: media/video-error-does-not-exist.html
             media/video-load-networkState.html
             media/video-source-error.html
             media/video-source-none-supported.html
             media/video-source-moved.html
      
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Return early also when an error already occured.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b8bac82
    • carlosgc@webkit.org's avatar
      Merge r216239 - [GStreamer] Fix handling of gst errors in... · fe3470de
      carlosgc@webkit.org authored
      Merge r216239 - [GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage
      https://bugs.webkit.org/show_bug.cgi?id=171721
      
      Reviewed by Xabier Rodriguez-Calvar.
      
      We are checking the GError only comparing the code, and ignoring the domain in some cases. Use g_error_matches()
      in those cases instead of only checking the code.
      
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe3470de
    • carlosgc@webkit.org's avatar
      Merge r216067 - [GStreamer] Dailymotion live stream videos don't play · 4e690f13
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=170767
      
      Reviewed by Sergio Villar Senin.
      
      The video shows a message saying that an error occurred and nothing is played. There are actually several
      problems with dailymotion. The main issue is that URLs are redirected by the server, and GStreamer needs to
      know the redirected URL. Once GStreamer knows the redirected URL the error message no longer appears, the video
      starts but it always stops after a few seconds. This is because the source receives an early EOS while still
      downloading the fragments. The reason of the early EOS is because dailymotion sends a wrong Content-Length header,
      something that is expected to happen and we correctly handle that case when receiving the data, by updating the
      size accordingly if the bytes received are longer than the expected content length. This particular case
      doesn't work well with GStreamer automatic EOS handling, which is the default. At some point, GStreamer detects
      that the bytes received are at least the expected ones and emits a GST_EVENT_EOS that the GstUriDownloader
      handles finishing the download early. We should always disable automatic EOS, since we know when EOS actually
      happens and we already call gst_app_src_end_of_stream(). This patch also emits a GST_EVENT_CUSTOM_DOWNSTREAM_STICKY
      event to let GStreamer know about the HTTP headers sent and received.
      
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      (webkit_web_src_init): Disable automatic EOS.
      (webKitWebSrcGetProperty): Return the redirected URL in case of redirection.
      (webKitWebSrcStart): Pass the ResourceRequest to the stream clients.
      (webKitWebSrcQueryWithParent): Set the redirected URL in the query in case of redirection.
      (webKitWebSrcSetUri): Clear also the redirected URL when setting a new URI.
      (StreamingClient::StreamingClient): Use GRefPtr for the source and initialize the request too.
      (StreamingClient::~StreamingClient): Remove explicit unref.
      (StreamingClient::createReadBuffer):
      (StreamingClient::handleResponseReceived): Initialize the redirected URL in case of redirection. Create and push
      the HTTP headers event.
      (StreamingClient::handleDataReceived):
      (StreamingClient::handleNotifyFinished):
      (CachedResourceStreamingClient::CachedResourceStreamingClient):
      (CachedResourceStreamingClient::responseReceived):
      (CachedResourceStreamingClient::accessControlCheckFailed):
      (CachedResourceStreamingClient::loadFailed):
      (ResourceHandleStreamingClient::ResourceHandleStreamingClient):
      (ResourceHandleStreamingClient::didFail):
      (ResourceHandleStreamingClient::wasBlocked):
      (ResourceHandleStreamingClient::cannotShowURL):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e690f13
    • carlosgc@webkit.org's avatar
      Merge r212349 - [GStreamer] Implement MediaPlayerPrivate::hasSingleSecurityOrigin() · fad52c84
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=168322
      
      Reviewed by Žan Doberšek.
      
      It currently returns true unconditionally. Add resolved-location property to WebKitWebSourceGStreamer to track
      the resolved url returned by the server and use that from MediaPlayerPrivate to check if there was a cross
      origin redirection.
      
      Fixes: http/tests/security/canvas-remote-read-remote-video-redirect.html
      
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::hasSingleSecurityOrigin):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      (webKitWebSrcFinalize):
      (webKitWebSrcGetProperty):
      (webKitWebSrcStart):
      (webKitWebSrcQueryWithParent):
      (webKitWebSrcGetUri):
      (webKitWebSrcSetUri):
      (StreamingClient::handleResponseReceived):
      (ResourceHandleStreamingClient::wasBlocked):
      (ResourceHandleStreamingClient::cannotShowURL):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fad52c84
    • carlosgc@webkit.org's avatar
      Merge r216065 - [GTK] Crash at WebCore::ResourceHandle::clearClient() when... · 299198ed
      carlosgc@webkit.org authored
      Merge r216065 - [GTK] Crash at WebCore::ResourceHandle::clearClient() when streaming live video from dailymotion
      https://bugs.webkit.org/show_bug.cgi?id=169725
      
      Reviewed by Michael Catanzaro.
      
      Make ResourceHandleStreamingClient refcounted and add an invalidate method to do the cleanup in the networking
      thread while keeping a reference.
      
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      (webKitWebSrcStop): Call invalidate before reseting client pointer.
      (webKitWebSrcStart): Ditto.
      (ResourceHandleStreamingClient::ResourceHandleStreamingClient): Remove all cleanup code after the run loop run call.
      (ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Just detach the thread.
      (ResourceHandleStreamingClient::invalidate): Schedule a task on the networking thread to clean up and fiish the
      run loop, protecting this.
      (ResourceHandleStreamingClient::setDefersLoading): Protect this.
      (ResourceHandleStreamingClient::didReceiveResponse): Do nothing if client was invalidated.
      (ResourceHandleStreamingClient::didReceiveBuffer): Ditto.
      (ResourceHandleStreamingClient::didFinishLoading): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      299198ed
    • carlosgc@webkit.org's avatar
      Merge r215102 - REGRESSION(r204512): WebSocket errors with "Failed to send... · fa1d4f25
      carlosgc@webkit.org authored
      Merge r215102 - REGRESSION(r204512): WebSocket errors with "Failed to send WebSocket frame."  if too much data is sent
      https://bugs.webkit.org/show_bug.cgi?id=170463
      
      Reviewed by Michael Catanzaro.
      
      This only reproduces when using WebSockets to communicate with an external server.
      When communicating with a local server, CFWriteStreamWrite succeeds too reliably, so
      CFWriteStreamCanAcceptBytes returns true, when sometimes it doesn't when communicating
      across the real internet.
      
      * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
      (WebCore::SocketStreamHandleImpl::platformSendInternal):
      * platform/network/soup/SocketStreamHandleImplSoup.cpp:
      (WebCore::SocketStreamHandleImpl::platformSendInternal):
      Returning std::nullopt means there was an error, which is not true when the socket stream
      is in a state where it cannot be written to because it is actively communicating.
      Returning 0 means 0 new bytes were sent, so we will try again later.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@216487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa1d4f25
  6. 06 Apr, 2017 15 commits
    • carlosgc@webkit.org's avatar
      Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.6 release. · f2146da0
      carlosgc@webkit.org authored
      .:
      
      * Source/cmake/OptionsGTK.cmake: Bump version numbers.
      
      Source/WebKit2:
      
      * gtk/NEWS: Add release notes for 2.14.6.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2146da0
    • carlosgc@webkit.org's avatar
      Merge r214283 - [GTK] Honor GTK+ font settings · 9ecc153d
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=82889
      
      Reviewed by Carlos Garcia Campos.
      
      After much discussion with Behdad and Martin (who is still not completely convinced I think
      :) I want to merge cairo font options into the Fontconfig pattern used for rendering using
      cairo_ft_font_options_substitute(). This is how the API was designed to be used anyway.
      Fontconfig will still have final say over whether to actually respect the desktop settings
      or not, so it can still choose to ignore the desktop's settings, but I don't think it makes
      sense to have desktop-wide font settings and not tell Fontconfig about them, especially when
      the whole point of WebKitGTK+ is desktop integration. This should also reduce complaints
      that we're not following desktop settings and that we're drawing fonts differently than
      Firefox.
      
      * PlatformGTK.cmake:
      * platform/graphics/cairo/CairoUtilities.cpp:
      (WebCore::getDefaultCairoFontOptions):
      * platform/graphics/cairo/CairoUtilities.h:
      * platform/graphics/freetype/FontCacheFreeType.cpp:
      (WebCore::createFontConfigPatternForCharacters):
      (WebCore::strongAliasesForFamily):
      (WebCore::FontCache::createFontPlatformData):
      * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
      (WebCore::getDefaultFontconfigOptions):
      (WebCore::getDefaultCairoFontOptions): Deleted.
      * platform/graphics/gtk/GdkCairoUtilities.cpp:
      (getDefaultCairoFontOptions):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ecc153d
    • carlosgc@webkit.org's avatar
      Merge r214246 - [Soup] "Only from websites I visit" cookie policy is broken · 67352e5e
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=168912
      
      Reviewed by Carlos Garcia Campos.
      
      Source/WebCore:
      
      Do not reset the first party for cookies on redirects. That's properly done for the main
      resource in DocumentLoader::willSendRequest and, in the case of subresources, is absolutely
      wrong (which is what we were doing since r143931).
      
      The most notable effect was that subresources loaded via redirects were effectively
      bypassing the "no third party" policy for cookies.
      
      Test: http/tests/security/cookies/third-party-cookie-blocking-redirect.html
      
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore::doRedirect):
      
      Source/WebKit2:
      
      Do not reset the first party for cookies on redirects. That's properly done for the main
      resource in DocumentLoader::willSendRequest and, in the case of subresources, is absolutely
      wrong (which is what we were doing since r143931).
      
      The most notable effect was that subresources loaded via redirects were effectively
      bypassing the "no third party" policy for cookies.
      
      * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
      (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
      
      LayoutTests:
      
      * http/tests/security/cookies/third-party-cookie-blocking-redirect-expected.txt: Added.
      * http/tests/security/cookies/third-party-cookie-blocking-redirect.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67352e5e
    • carlosgc@webkit.org's avatar
      Merge r214162 - [Cairo] Ensure depth and stencil renderbuffers are created on GLESv2 · 582438e7
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=166643
      
      Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2017-03-20
      Reviewed by Darin Adler.
      
      If the gfx device doesn't support GL_OES_packed_depth_stencil, the
      separate depth and stencil buffers are not generated.
      
      Copy what GraphicsContext3DEfl used to do and apply it in
      GraphicsContext3DCairo.
      
      The Intel gfx driver seem to tolerate unbound renderbuffers, but
      enabling debugging in Mesa yields an error:
      
      $ MESA_DEBUG=1 \
        MESA_EXTENSION_OVERRIDE=-GL_OES_packed_depth_stencil
        ./bin/MiniBrowser http://webglsamples.org/aquarium/aquarium.html
      Mesa: User error: GL_INVALID_OPERATION in glRenderbufferStorage(no renderbuffer bound)
      
      * platform/graphics/GraphicsContext3D.h:
      * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
      (WebCore::GraphicsContext3D::GraphicsContext3D):
      Ensure separate depth and stencil renderbuffers are created.
      (WebCore::GraphicsContext3D::~GraphicsContext3D):
      Ensure separate depth and stencil renderbuffers are released.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      582438e7
    • carlosgc@webkit.org's avatar
      Merge r214100 - [Cairo] Handle the blend mode in GraphicsContext::drawPattern · a93f22c3
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=169746
      
      Reviewed by Žan Doberšek.
      
      We are not taking into account the blend mode when passing the cairo operator to drawPatternToCairoContext().
      This is based on patch by Žan Doberšek, just adding the toCairoOperator changes to make it easier to handle
      it. Instead of checking everywhere if blend mode is Normal to decide whether to use toCairoOperator with
      CompositeOperator or BlendMode, there's no a single toCairoOperator that receives both parameters, but BlendMode
      is optional and defaults to Normal.
      
      * platform/graphics/cairo/CairoUtilities.cpp:
      (WebCore::toCairoCompositeOperator):
      (WebCore::toCairoOperator):
      * platform/graphics/cairo/CairoUtilities.h:
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::setPlatformCompositeOperation):
      (WebCore::GraphicsContext::drawPattern):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a93f22c3
    • carlosgc@webkit.org's avatar
      Merge r212431 - [GTK] scroll with transparent background not repainted after scrollY >= 32768 · c836a2a3
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=154283
      
      Reviewed by Carlos Garcia Campos.
      
      Source/WebCore:
      
      Due to a limitation of the pixman backend, which uses 16 bits to hold signed integers, cairo is
      not able to draw anything when using transformation matrices with values bigger than 32768. When
      drawing patterns into large pages, the matrices values can overflow those 16 bits, so cairo doesn't
      draw anything in, which causes the reported transparent backgrounds.
      
      The patch modifies the transformation matrices both from the current context and the pattern we
      are painting, to avoid them to hold values that cannot stored in 16 bits.
      
      There's still the possibility that this happens, but it would require using a pattern with a size
      bigger than 32768.
      
      Based on a previous patch by Gwang Yoon Hwang  <yoon@igalia.com>.
      
      Test: fast/backgrounds/background-repeat-long-scroll.html
      
      * platform/graphics/cairo/CairoUtilities.cpp:
      (WebCore::drawPatternToCairoContext):
      
      LayoutTests:
      
      Test to ensure that the background pattern of an element is properly being drawn when it's in a position
      bigger than 32768.
      
      * fast/backgrounds/background-repeat-long-scroll-expected.html: Added.
      * fast/backgrounds/background-repeat-long-scroll.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c836a2a3
    • carlosgc@webkit.org's avatar
      Merge r213522 - ShadowBlur::calculateLayerBoundingRect doesn't need to return... · 1b3f8f6b
      carlosgc@webkit.org authored
      Merge r213522 - ShadowBlur::calculateLayerBoundingRect doesn't need to return the enclosingIntRect of layerRect
      https://bugs.webkit.org/show_bug.cgi?id=168650
      
      Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-03-07
      Reviewed by Simon Fraser.
      
      No new tests, no behavior change.
      
      * platform/graphics/ShadowBlur.h: Change the type of return value
      from IntRect to IntSize.
      * platform/graphics/ShadowBlur.cpp:
      (WebCore::ShadowBlur::calculateLayerBoundingRect): Ditto.
      (WebCore::ShadowBlur::drawRectShadow): Rename a variable layerRect layerSize.
      (WebCore::ShadowBlur::drawInsetShadow): Ditto.
      (WebCore::ShadowBlur::drawRectShadowWithoutTiling): Ditto.
      (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): Ditto.
      (WebCore::ShadowBlur::beginShadowLayer): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b3f8f6b
    • carlosgc@webkit.org's avatar
      Merge r213276 - [GTK] Crash in WebCore::CoordinatedGraphicsLayer::notifyFlushRequired · 339e6a7f
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=166420
      
      Reviewed by Žan Doberšek.
      
      This is happening when closing a page that is being inspected. When CoordinatedGraphicsLayer::removeFromParent()
      is called, the coordinator has already been invalidated, so all its layers were set a nullptr coordinator. I
      think it's safe to simply handle m_coordinator being nullptr in notifyFlushRequired().
      
      * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
      (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Return early if the coordinator is nullptr.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      339e6a7f
    • carlosgc@webkit.org's avatar
      Merge r213275 - Incorrect RELEASE_ASSERT in JSGlobalObject::addStaticGlobals() · 6c44b222
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=169034
      
      Reviewed by Mark Lam.
      
      It should not assign to offset, but compare to offset.
      
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::addStaticGlobals):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c44b222
    • carlosgc@webkit.org's avatar
      Merge r213224 - [GTK] fast/canvas/canvas-createPattern-video-loading.html... · 718b7344
      carlosgc@webkit.org authored
      Merge r213224 - [GTK] fast/canvas/canvas-createPattern-video-loading.html makes its subsequent test timeout
      https://bugs.webkit.org/show_bug.cgi?id=169019
      
      Reviewed by Xabier Rodriguez-Calvar.
      
      Source/WebCore:
      
      The timeout happens normally when the media player is deleted and the pipeline state is set to NULL. The call to
      gst_element_set_state() never returns because of different deadlocks with the video sink. Sometimes the deadlock
      happens with the sample mutex used by VideoRenderRequestScheduler. VideoRenderRequestScheduler::requestRender()
      calls webkitVideoSinkRepaintRequested() with the lock held, that ends up calling
      MediaPlayerPrivateGStreamerBase::triggerRepaint(). When rendering can't be accelerated the draw timer is
      scheduled and triggerRepaint blocks until the timer is fired. If the media player is destroyed before the timer
      is fired, when setting the pipeline state to NULL, other VideoRenderRequestScheduler methods can be called, like
      stop() that tries to get the sample mutex that is still held by requestRender(). So, first we need to make
      sure that requestRender() releases the lock before calling webkitVideoSinkRepaintRequested(). But that's not
      enough, we also need to ensure that the pipeline is set to NULL state after everyting has been properly
      stopped. This is currently done in ~MediaPlayerPrivateGStreamer that happens before
      ~MediaPlayerPrivateGStreamerBase, so gst_element_set_state() is hanging before allowing the
      MediaPlayerPrivateGStreamerBase to be cleaned up. We should move the call to the end of
      ~MediaPlayerPrivateGStreamerBase and ensure the draw timer and mutex are properly cleaned up before.
      
      Fixes: fast/canvas/canvas-createPattern-video-loading.html
      
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Do not reset pipeline here.
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
      (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Stop the draw mutex and notify the
      lock to ensure we unblock. Do the pipeline reset at the end.
      * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
      (VideoRenderRequestScheduler::requestRender): Release the mutex lock before calling webkitVideoSinkRepaintRequested().
      
      LayoutTests:
      
      Unskip tests previously skipped because of this timeout.
      
      * platform/gtk/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      718b7344
    • carlosgc@webkit.org's avatar
      Merge r213219 - [Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels() · 4816c8c2
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=169031
      
      Reviewed by Carlos Garcia Campos.
      
      We should compare if height is between -1 and 0 and not mixing height
      and width together.
      
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4816c8c2
    • carlosgc@webkit.org's avatar
      Merge r212968 - [GTK] WebkitWebProcess crashes on exit on nvidia if threaded compositing is enabled · cd88e7d6
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=165522
      
      Reviewed by Carlos Garcia Campos.
      
      Before destrying a GLContextGLX we need to set the default framebufer to avoid a bug
      in some nvidia drivers. Ensure that we set the context as current before performing
      that operation, and set the appropriate current context after doing so.
      
      No new tests.
      
      * platform/graphics/glx/GLContextGLX.cpp:
      (WebCore::GLContextGLX::~GLContextGLX):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd88e7d6
    • carlosgc@webkit.org's avatar
      Merge r212891 - [GTK] Crash attempting to load Flash plugin in Wayland · 799d8402
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=163159
      
      Reviewed by Michael Catanzaro.
      
      The problem is that we check if the current diplay is X11 or Wayland also in the plugin process, but with GTK2
      plugins the display is always X11. We should early reject plugins requiring GTK2 in the UI process when the
      current display is Wayland.
      
      * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
      (WebKit::PluginInfoStore::getPluginInfo):
      * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
      (WebKit::PluginProcessProxy::scanPlugin):
      * UIProcess/gtk/WebPageProxyGtk.cpp:
      (WebKit::WebPageProxy::createPluginContainer): Add an assert to ensure this message is never received on a
      non-X11 display.
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::createPluginContainer): Never send CreatePluginContainer message to the UI process if the
      display is not X11.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      799d8402
    • carlosgc@webkit.org's avatar
      Merge r212889 - [GStreamer] Several layout tests trigger GStreamer-CRITICAL... · c552d877
      carlosgc@webkit.org authored
      Merge r212889 - [GStreamer] Several layout tests trigger GStreamer-CRITICAL **: gst_bin_get_by_name: assertion 'GST_IS_BIN (bin)' failed
      https://bugs.webkit.org/show_bug.cgi?id=167016
      
      Reviewed by Xabier Rodriguez-Calvar.
      
      This is because we create AudioSourceProviderGStreamer objects that are never loaded. In the destructor the
      AudioSourceProviderGStreamer calls gst_bin_get_by_name() on its m_audioSinkBin that is nullptr. We could simply
      check m_audioSinkBin in the destructor, but I think it's better to simply not create
      AudioSourceProviderGStreamer for nothing. MediaPlayerPrivateGStreamer should create the AudioSourceProvider on demand.
      
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Do not create the AudioSourceProvider.
      (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Call ensureAudioSourceProvider() before using m_audioSourceProvider.
      (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider): Create the AudioSourceProvider if needed.
      (WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider): Ensure and return the m_audioSourceProvider.
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c552d877
    • carlosgc@webkit.org's avatar
      Merge r213638 - Correctly process the return value of gdk_drag_context_get_selected_action() · c9c9b0a7
      carlosgc@webkit.org authored
      Reviewed by Carlos Garcia Campos.
      
      It returns the action itself and not the bitmask.
      
      * UIProcess/gtk/DragAndDropHandler.cpp:
      (WebKit::DragAndDropHandler::drop):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.14@215022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9c9b0a7