WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122069
WinLauncher should be able to open cross-domain links
https://bugs.webkit.org/show_bug.cgi?id=122069
Summary
WinLauncher should be able to open cross-domain links
Alex Christensen
Reported
2013-09-28 17:17:22 PDT
When clicking on a cross-domain link that would open another tab, WinLauncher does nothing because createWebViewWithRequest hasn't been implemented. Also, right clicking on a link and clicking "Open Link in new Window" does nothing for the same reason. WebKit isn't even giving createWebViewWithRequest the URL. Surely there's somebody that has opened a cross-domain link with WebKit on Windows.
Attachments
patch
(5.98 KB, patch)
2013-09-28 17:29 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
patch
(5.73 KB, patch)
2013-09-28 17:32 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
patch
(6.13 KB, patch)
2013-09-28 21:10 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
patch
(7.16 KB, patch)
2013-10-01 12:28 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
patch
(7.16 KB, patch)
2013-10-01 12:32 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2013-09-28 17:29:05 PDT
Created
attachment 212909
[details]
patch
Alex Christensen
Comment 2
2013-09-28 17:32:55 PDT
Created
attachment 212910
[details]
patch The previous patch had a header inclusion I'm not using any more.
Alex Christensen
Comment 3
2013-09-28 17:52:48 PDT
I'm not sure about memory management on the WebMutableURLRequest I make. Should I use some kind of smart pointer?
Alex Christensen
Comment 4
2013-09-28 21:10:39 PDT
Created
attachment 212911
[details]
patch There we go. Fixed the memory leak.
Brent Fulgham
Comment 5
2013-09-30 00:03:41 PDT
Comment on
attachment 212911
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=212911&action=review
> Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp:204 > + request.adoptRef(WebMutableURLRequest::createInstance(ResourceRequest(navigationAction.url())));
Can this not be written in our usual one-line style?
> Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp:542 > + request.adoptRef(WebMutableURLRequest::createInstance(ResourceRequest(navigationAction.url())));
Ditto:
> Tools/WinLauncher/PrintWebUIDelegate.cpp:47 > + DWORD length = GetModuleFileName(GetModuleHandle(0), buffer, ARRAYSIZE(buffer));
Please prefix WinAPI calls with '::'
> Tools/WinLauncher/PrintWebUIDelegate.cpp:51 > + BSTR url;
If you use a _bstr_t it will clean up after itself.
> Tools/WinLauncher/PrintWebUIDelegate.cpp:63 > + return E_FAIL;
This looks okay, but why do we spawn a new process to view a web page? We don't spawn a new WinLauncher to show the Web Inspector, can't we work the same way here?
Alex Christensen
Comment 6
2013-09-30 08:19:53 PDT
(In reply to
comment #5
)
> (From update of
attachment 212911
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=212911&action=review
> > > Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp:204 > > + request.adoptRef(WebMutableURLRequest::createInstance(ResourceRequest(navigationAction.url()))); > > Can this not be written in our usual one-line style?
COMPtr.h doesn't seem to have an adoptRef function. I could write one if it doesn't already exist somewhere else.
> This looks okay, but why do we spawn a new process to view a web page? We don't spawn a new WinLauncher to show the Web Inspector, can't we work the same way here?
I tried a single-process implementation based on the one in DumpRenderTree, but it was much more complicated, and I had problems where closing child windows killed the whole process. Maybe this can be worked around, but this is the simplest solution.
Alex Christensen
Comment 7
2013-09-30 08:55:22 PDT
> We don't spawn a new WinLauncher to show the Web Inspector, can't we work the same way here?
This would also involve refactoring a lot of code to remove almost all global variables in WinLauncher, create an instance manager, etc. I don't think this would be worth it right now.
Alex Christensen
Comment 8
2013-10-01 12:28:03 PDT
Created
attachment 213109
[details]
patch After this patch gets in, we can remove all uses of adoptRef from COMPtr.h in favor of my adoptCOM function. It would be less confusing to not have a function named adoptRef operating on two different types of smart pointers.
WebKit Commit Bot
Comment 9
2013-10-01 12:30:31 PDT
Attachment 213109
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/win/COMPtr.h', u'Source/WebKit/win/ChangeLog', u'Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp', u'Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp', u'Tools/ChangeLog', u'Tools/WinLauncher/PrintWebUIDelegate.cpp', u'Tools/WinLauncher/PrintWebUIDelegate.h']" exit_code: 1 Tools/WinLauncher/PrintWebUIDelegate.cpp:52: Tab found; better to use spaces [whitespace/tab] [1] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 10
2013-10-01 12:32:03 PDT
Created
attachment 213110
[details]
patch
Brent Fulgham
Comment 11
2013-10-01 12:47:55 PDT
Comment on
attachment 213110
[details]
patch r=me
Brent Fulgham
Comment 12
2013-10-01 12:50:06 PDT
(In reply to
comment #8
)
> Created an attachment (id=213109) [details] > patch > > After this patch gets in, we can remove all uses of adoptRef from COMPtr.h in favor of my adoptCOM function. It would be less confusing to not have a function named adoptRef operating on two different types of smart pointers.
Yes -- let's do this as a separate patch, and CC andersca as well please.
WebKit Commit Bot
Comment 13
2013-10-01 13:18:42 PDT
Comment on
attachment 213110
[details]
patch Clearing flags on attachment: 213110 Committed
r156729
: <
http://trac.webkit.org/changeset/156729
>
WebKit Commit Bot
Comment 14
2013-10-01 13:18:44 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug