← Back to team overview

ubuntu-webapps-bugs team mailing list archive

[Bug 1300884] Re: Shouldn't start resource loads before a new view is created

 

** Changed in: oxide
       Status: Triaged => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to Oxide.
https://bugs.launchpad.net/bugs/1300884

Title:
  Shouldn't start resource loads before a new view is created

Status in Oxide:
  Invalid

Bug description:
  In the standard window.open() case, Chromium creates a WebContents for
  us, and then we dispatch WebVIew.newViewRequested and initialize the
  created view with the WebContents that Chromium gave us. An
  unfortunate side effect of this is that as soon as the WebContents is
  initialized and has a RenderViewHost, it unblocks pending resource
  loads from the already created RenderView in the renderer process.
  This means that if the application decides not to create a new
  WebView, Chromium has already started resource loads by the time we
  delete the new WebContents.

  Reproducer:

  In QML:

  import QtQuick 2.0
  import com.canonical.Oxide 1.0

  WebView {
    url: "http://localhost/~chr1s/test.html";

    onNewViewRequested: {
      console.log("onNewViewRequested url: " + request.url + ", disposition: " + request.disposition + ", gesture: " + request.userGesture);
    }

    focus: true
    width: 200
    height: 200
  }

  test.html:

  <html>
  <body>
    <button onclick="window.open(&quot;test2.html&quot;);">Click me!</button>
  </body>
  </html>

  Run the QML app whilst monitoring Apache's access.log, and then click
  on the button. You see this:

  127.0.0.1 - - [01/Apr/2014:16:38:51 +0000] "GET /~chr1s/test.html HTTP/1.1" 200 440 "-" "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1908.4 Safari/537.36"
  127.0.0.1 - - [01/Apr/2014:16:38:55 +0000] "GET /~chr1s/test2.html HTTP/1.1" 404 504 "http://localhost/~chr1s/test.html"; "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1908.4 Safari/537.36"

  The second request shouldn't happen

To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1300884/+subscriptions