Changeset 156729 in webkit
- Timestamp:
- Oct 1, 2013 1:20:02 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156726 r156729 1 2013-10-01 Alex Christensen <achristensen@webkit.org> 2 3 Added adoptCOM to COMPtr on Windows. 4 https://bugs.webkit.org/show_bug.cgi?id=122069 5 6 Reviewed by Brent Fulgham. 7 8 * platform/win/COMPtr.h: 9 (adoptCOM): Added. 10 1 11 2013-10-01 Jer Noble <jer.noble@apple.com> 2 12 -
trunk/Source/WebCore/platform/win/COMPtr.h
r100030 r156729 102 102 }; 103 103 104 template<typename T> inline COMPtr<T> adoptCOM(T *ptr) 105 { 106 return COMPtr<T>(AdoptCOM, ptr); 107 } 108 104 109 template<typename T> inline void COMPtr<T>::clear() 105 110 { -
trunk/Source/WebKit/win/ChangeLog
r156655 r156729 1 2013-10-01 Alex Christensen <achristensen@webkit.org> 2 3 Implemented createWebViewWithRequest in WinLauncher. 4 https://bugs.webkit.org/show_bug.cgi?id=122069 5 6 Reviewed by Brent Fulgham. 7 8 * WebCoreSupport/WebChromeClient.cpp: 9 (WebChromeClient::createWindow): 10 * WebCoreSupport/WebFrameLoaderClient.cpp: 11 (WebFrameLoaderClient::dispatchCreatePage): 12 Pass request url from the NavigationAction to createWebViewWithRequest. 13 1 14 2013-09-30 Andreas Kling <akling@apple.com> 2 15 -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
r155544 r156729 195 195 } 196 196 197 Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction& )197 Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction& navigationAction) 198 198 { 199 199 COMPtr<IWebUIDelegate> delegate = uiDelegate(); … … 201 201 return 0; 202 202 203 // Just create a blank request because createWindow() is only required to create window but not to load URL. 204 COMPtr<IWebMutableURLRequest> request(AdoptCOM, WebMutableURLRequest::createInstance()); 203 COMPtr<WebMutableURLRequest> request = adoptCOM(WebMutableURLRequest::createInstance(ResourceRequest(navigationAction.url()))); 205 204 206 205 COMPtr<IWebUIDelegatePrivate2> delegatePrivate(Query, delegate); -
trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
r156550 r156729 530 530 } 531 531 532 Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction& )532 Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction& navigationAction) 533 533 { 534 534 WebView* webView = m_webFrame->webView(); … … 539 539 540 540 COMPtr<IWebView> newWebView; 541 if (FAILED(ui->createWebViewWithRequest(webView, 0, &newWebView))) 541 COMPtr<WebMutableURLRequest> request = adoptCOM(WebMutableURLRequest::createInstance(ResourceRequest(navigationAction.url()))); 542 if (FAILED(ui->createWebViewWithRequest(webView, request.get(), &newWebView)) || !newWebView) 542 543 return 0; 543 544 -
trunk/Tools/ChangeLog
r156725 r156729 1 2013-10-01 Alex Christensen <achristensen@webkit.org> 2 3 Implemented createWebViewWithRequest in WinLauncher. 4 https://bugs.webkit.org/show_bug.cgi?id=122069 5 6 Reviewed by Brent Fulgham. 7 8 * WinLauncher/PrintWebUIDelegate.cpp: 9 (PrintWebUIDelegate::createWebViewWithRequest): Added. 10 * WinLauncher/PrintWebUIDelegate.h: 11 Removed createWebViewWithRequest stub. 12 1 13 2013-10-01 Tim Horton <timothy_horton@apple.com> 2 14 -
trunk/Tools/WinLauncher/PrintWebUIDelegate.cpp
r155929 r156729 2 2 * Copyright (C) 2009, 2013 Apple Inc. All Rights Reserved. 3 3 * Copyright (C) 2009 Brent Fulgham. All Rights Reserved. 4 * Copyright (C) 2013 Alex Christensen. All Rights Reserved. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 38 39 static const int MARGIN = 20; 39 40 41 HRESULT STDMETHODCALLTYPE PrintWebUIDelegate::createWebViewWithRequest(IWebView*, IWebURLRequest* request, IWebView**) 42 { 43 if (!request) 44 return E_POINTER; 45 46 TCHAR executablePath[MAX_PATH]; 47 DWORD length = ::GetModuleFileName(GetModuleHandle(0), executablePath, ARRAYSIZE(executablePath)); 48 if (!length) 49 return E_FAIL; 50 51 _bstr_t url; 52 HRESULT hr = request->URL(&url.GetBSTR()); 53 if (FAILED(hr)) 54 return E_FAIL; 55 56 std::wstring command = std::wstring(L"\"") + executablePath + L"\" " + (const wchar_t*)url; 57 58 PROCESS_INFORMATION processInformation; 59 STARTUPINFOW startupInfo; 60 memset(&startupInfo, 0, sizeof(startupInfo)); 61 if (!::CreateProcessW(0, (LPWSTR)command.c_str(), 0, 0, 0, 0, 0, 0, &startupInfo, &processInformation)) 62 return E_FAIL; 63 64 return S_OK; 65 } 66 40 67 HRESULT PrintWebUIDelegate::QueryInterface(REFIID riid, void** ppvObject) 41 68 { -
trunk/Tools/WinLauncher/PrintWebUIDelegate.h
r53154 r156729 39 39 virtual ULONG STDMETHODCALLTYPE Release(void); 40 40 41 virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest(IWebView*, IWebURLRequest*, IWebView**) { return E_NOTIMPL; }41 virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest(IWebView*, IWebURLRequest*, IWebView**); 42 42 virtual HRESULT STDMETHODCALLTYPE webViewShow(IWebView*) { return E_NOTIMPL; } 43 43 virtual HRESULT STDMETHODCALLTYPE webViewClose(IWebView*) { return E_NOTIMPL; }
Note: See TracChangeset
for help on using the changeset viewer.