Bug 37821

Summary: [Qt] loads APP directory when calling "window.open"
Product: WebKit Reporter: Yi Shen <max.hong.shen>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: CLOSED FIXED    
Severity: Normal CC: commit-queue, hausmann
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 35784    
Attachments:
Description Flags
proposed patch none

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