Bug 37821 - [Qt] loads APP directory when calling "window.open"
Summary: [Qt] loads APP directory when calling "window.open"
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-04-19 14:04 PDT by Yi Shen
Modified: 2010-04-26 03:43 PDT (History)
2 users (show)

See Also:


Attachments
proposed patch (1.24 KB, patch)
2010-04-19 14:08 PDT, Yi Shen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Shen 2010-04-19 14:04:15 PDT
When creating a new window by calling "window.open('http://www.cnn.com')", it loads the "file://$${applicationpath}" because the ChromeClientQt::createWindow() never check the request whether is empty or not, and it loads the app directory when the request is empty.

When calling window.open('http://www.cnn.com'), the WebCore::createWindow() first 1) call client to create a new window 2) load cnn.com by calling changeLocation(); While in step 1), qt's chrome client always tries to load an empty request.

I think we should check the request because 1)it helps the performance 
                                            2)I found the gtk's createWindow checks the request every time. e.g. In ChromeClientGtk.cpp:129

Page* ChromeClient::createWindow(...) {
  ...
  if (!frameLoadRequest.isEmpty())
      webkit_web_view_open(....);
}
Comment 1 Yi Shen 2010-04-19 14:08:18 PDT
Created attachment 53718 [details]
proposed patch
Comment 2 Simon Hausmann 2010-04-19 16:07:40 PDT
Comment on attachment 53718 [details]
proposed patch

Good catch!
Comment 3 WebKit Commit Bot 2010-04-21 08:08:46 PDT
Comment on attachment 53718 [details]
proposed patch

Clearing flags on attachment: 53718

Committed r57982: <http://trac.webkit.org/changeset/57982>
Comment 4 WebKit Commit Bot 2010-04-21 08:08:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Simon Hausmann 2010-04-26 03:43:37 PDT
Revision r57982 cherry-picked into qtwebkit-2.0 with commit 624d8662f88895a1a25212ee088d6443c0e8e736