Changeset 65270 in webkit
- Timestamp:
- Aug 12, 2010 3:03:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 14 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r65210 r65270 1 2010-08-12 Jon Honeycutt <jhoneycutt@apple.com> 2 3 WebKitTestRunner needs to run tests without using native controls 4 https://bugs.webkit.org/show_bug.cgi?id=43772 5 6 Reviewed by Sam Weinig. 7 8 * Shared/CoreIPCSupport/WebProcessMessageKinds.h: 9 (WebProcessMessage::): 10 Add a new message. 11 12 * UIProcess/API/C/win/WKContextPrivateWin.h: Added. 13 Declare WKContextSetShouldPaintNativeControls(). 14 15 * UIProcess/API/C/win/WKContextWin.cpp: Added. 16 (WKContextSetShouldPaintNativeControls): 17 Call the WebContext's setShouldPaintNativeControls(). 18 19 * UIProcess/WebContext.cpp: 20 (WebKit::WebContext::WebContext): 21 Initialize m_shouldPaintNativeControls. 22 (WebKit::WebContext::ensureWebProcess): 23 If we created a web process, call platformSetUpWebProcess(). 24 25 * UIProcess/WebContext.h: 26 Declare new functions and a member to store whether we should paint 27 native controls. 28 29 * UIProcess/mac/WebContextMac.mm: 30 (WebKit::WebContext::platformSetUpWebProcess): 31 Stubbed. 32 33 * UIProcess/win/WebContextWin.cpp: 34 (WebKit::WebContext::setShouldPaintNativeControls): 35 Set m_shouldPaintNativeControls. If we have a valid web process, send a 36 SetShouldPaintNativeControls message. 37 (WebKit::WebContext::platformSetUpWebProcess): 38 Send a SetShouldPaintNativeControls message. 39 40 * WebProcess/WebProcess.cpp: 41 (WebKit::WebProcess::didReceiveMessage): 42 If this is a SetShouldPaintNativeControls message, decode the argument, 43 and call Settings::setShouldPaintNativeControls(). 44 45 * win/WebKit2.vcproj: 46 Add WKContextPrivateWin.h and WKContextWin.cpp to project. 47 48 * win/WebKit2Generated.make: 49 Copy WKContextPrivateWin.h. 50 1 51 2010-08-11 Sam Weinig <sam@webkit.org> 2 52 -
trunk/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
r64797 r65270 44 44 RegisterURLSchemeAsEmptyDocument, 45 45 #if PLATFORM(MAC) 46 SetupAcceleratedCompositingPort 46 SetupAcceleratedCompositingPort, 47 #endif 48 #if PLATFORM(WIN) 49 SetShouldPaintNativeControls, 47 50 #endif 48 51 }; -
trunk/WebKit2/UIProcess/API/C/win/WKContextPrivateWin.h
r65269 r65270 24 24 */ 25 25 26 #include "WebContext.h" 26 #ifndef WKContextPrivateWin_h 27 #define WKContextPrivateWin_h 27 28 28 #include <WebCore/FileSystem.h> 29 #include <WebKit2/WKBase.h> 30 #include <WebKit2/WKContext.h> 29 31 30 using namespace WebCore; 32 #ifndef __cplusplus 33 #include <stdbool.h> 34 #endif 31 35 32 namespace WebKit { 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 33 39 34 String WebContext::applicationCacheDirectory() 35 { 36 return localUserSpecificStorageDirectory(); 40 // Defaults to true. 41 WK_EXPORT void WKContextSetShouldPaintNativeControls(WKContextRef, bool); 42 43 #ifdef __cplusplus 37 44 } 45 #endif 38 46 39 } // namespace WebKit 40 47 #endif /* WKContextPrivateWin_h */ -
trunk/WebKit2/UIProcess/API/C/win/WKContextWin.cpp
r65269 r65270 24 24 */ 25 25 26 #include "WKContext.h" 27 #include "WKContextPrivateWin.h" 28 29 #include "WKAPICast.h" 26 30 #include "WebContext.h" 27 31 28 #include <WebCore/FileSystem.h> 32 using namespace WebKit; 29 33 30 using namespace WebCore; 31 32 namespace WebKit { 33 34 String WebContext::applicationCacheDirectory() 34 void WKContextSetShouldPaintNativeControls(WKContextRef contextRef, bool b) 35 35 { 36 return localUserSpecificStorageDirectory();36 toWK(contextRef)->setShouldPaintNativeControls(b); 37 37 } 38 39 } // namespace WebKit40 -
trunk/WebKit2/UIProcess/WebContext.cpp
r65021 r65270 197 197 , m_injectedBundlePath(injectedBundlePath) 198 198 , m_visitedLinkProvider(this) 199 #if PLATFORM(WIN) 200 , m_shouldPaintNativeControls(true) 201 #endif 199 202 { 200 203 RunLoop::initializeMainRunLoop(); … … 244 247 for (HashSet<String>::iterator it = m_schemesToRegisterAsEmptyDocument.begin(), end = m_schemesToRegisterAsEmptyDocument.end(); it != end; ++it) 245 248 m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(*it)); 249 250 platformSetUpWebProcess(); 246 251 } 247 252 -
trunk/WebKit2/UIProcess/WebContext.h
r65142 r65270 107 107 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 108 108 109 #if PLATFORM(WIN) 110 void setShouldPaintNativeControls(bool); 111 #endif 112 109 113 private: 110 114 WebContext(ProcessModel, const WTF::String& injectedBundlePath); … … 114 118 void ensureWebProcess(); 115 119 bool hasValidProcess() const { return m_process && m_process->isValid(); } 120 void platformSetUpWebProcess(); 116 121 117 122 ProcessModel m_processModel; … … 132 137 133 138 HashSet<WTF::String> m_schemesToRegisterAsEmptyDocument; 139 140 #if PLATFORM(WIN) 141 bool m_shouldPaintNativeControls; 142 #endif 134 143 }; 135 144 -
trunk/WebKit2/UIProcess/mac/WebContextMac.mm
r63664 r65270 60 60 } 61 61 62 void WebContext::platformSetUpWebProcess() 63 { 64 } 65 62 66 } // namespace WebKit 63 67 -
trunk/WebKit2/UIProcess/win/WebContextWin.cpp
r63664 r65270 26 26 #include "WebContext.h" 27 27 28 #include "WebProcessMessageKinds.h" 28 29 #include <WebCore/FileSystem.h> 29 30 … … 37 38 } 38 39 40 void WebContext::setShouldPaintNativeControls(bool b) 41 { 42 m_shouldPaintNativeControls = b; 43 44 if (!hasValidProcess()) 45 return; 46 47 m_process->send(WebProcessMessage::SetShouldPaintNativeControls, 0, CoreIPC::In(m_shouldPaintNativeControls)); 48 } 49 50 void WebContext::platformSetUpWebProcess() 51 { 52 m_process->send(WebProcessMessage::SetShouldPaintNativeControls, 0, CoreIPC::In(m_shouldPaintNativeControls)); 53 } 54 39 55 } // namespace WebKit 40 56 -
trunk/WebKit2/WebProcess/WebProcess.cpp
r65021 r65270 40 40 #include <WebCore/PageGroup.h> 41 41 #include <WebCore/SchemeRegistry.h> 42 #include <WebCore/Settings.h> 42 43 #include <wtf/PassRefPtr.h> 43 44 … … 289 290 } 290 291 #endif 292 #if PLATFORM(WIN) 293 case WebProcessMessage::SetShouldPaintNativeControls: { 294 bool b; 295 if (!arguments->decode(b)) 296 return; 297 #if USE(SAFARI_THEME) 298 Settings::setShouldPaintNativeControls(b); 299 #endif 300 return; 301 } 302 #endif 291 303 } 292 304 } -
trunk/WebKit2/win/WebKit2.vcproj
r64888 r65270 1200 1200 </File> 1201 1201 <File 1202 RelativePath="..\UIProcess\API\C\win\WKContextPrivateWin.h" 1203 > 1204 </File> 1205 <File 1206 RelativePath="..\UIProcess\API\C\win\WKContextWin.cpp" 1207 > 1208 </File> 1209 <File 1202 1210 RelativePath="..\UIProcess\API\C\WKData.cpp" 1203 1211 > -
trunk/WebKit2/win/WebKit2Generated.make
r64888 r65270 23 23 xcopy /y /d "..\UIProcess\API\C\cf\WKStringCF.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 24 24 xcopy /y /d "..\UIProcess\API\C\cf\WKURLCF.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 25 xcopy /y /d "..\UIProcess\API\C\win\WKContextPrivateWin.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 25 26 xcopy /y /d "..\UIProcess\API\cpp\WKRetainPtr.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 26 27 xcopy /y /d "..\UIProcess\API\win\WKBaseWin.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" -
trunk/WebKitTools/ChangeLog
r65267 r65270 1 2010-08-12 Jon Honeycutt <jhoneycutt@apple.com> 2 3 WebKitTestRunner needs to run tests without using native controls 4 https://bugs.webkit.org/show_bug.cgi?id=43772 5 6 Reviewed by Sam Weinig. 7 8 * WebKitTestRunner/TestController.cpp: 9 (WTR::TestController::initialize): 10 Call platformInitializeContext(). 11 12 * WebKitTestRunner/TestController.h: 13 Declare platformInitializeContext(). 14 15 * WebKitTestRunner/mac/TestControllerMac.mm: 16 (WTR::TestController::platformInitializeContext): 17 Stubbed. 18 19 * WebKitTestRunner/win/TestControllerWin.cpp: 20 (WTR::TestController::platformInitializeContext): 21 Call WKContextSetShouldPaintNativeControls() to disable native control 22 drawing. 23 1 24 2010-08-12 Sam Weinig <sam@webkit.org> 2 25 -
trunk/WebKitTools/WebKitTestRunner/TestController.cpp
r65267 r65270 124 124 125 125 m_context.adopt(WKContextCreateWithInjectedBundlePath(injectedBundlePath())); 126 platformInitializeContext(); 126 127 127 128 WKContextInjectedBundleClient injectedBundleClient = { … … 133 134 134 135 _WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory()); 135 136 136 137 m_pageNamespace.adopt(WKPageNamespaceCreate(m_context.get())); 137 138 m_mainWebView = adoptPtr(new PlatformWebView(m_pageNamespace.get())); -
trunk/WebKitTools/WebKitTestRunner/TestController.h
r65267 r65270 65 65 66 66 void platformInitialize(); 67 void platformInitializeContext(); 67 68 void initializeInjectedBundlePath(); 68 69 void initializeTestPluginDirectory(); -
trunk/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
r65267 r65270 52 52 } 53 53 54 void TestController::platformInitializeContext() 55 { 56 } 57 54 58 } // namespace WTR -
trunk/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
r65267 r65270 30 30 #include <shlwapi.h> 31 31 #include <string> 32 #include <WebKit2/WKContextPrivateWin.h> 32 33 #include <WebKit2/WKStringCF.h> 33 34 #include <wtf/RetainPtr.h> … … 126 127 } 127 128 129 void TestController::platformInitializeContext() 130 { 131 // FIXME: Make DRT pass with Windows native controls. <http://webkit.org/b/25592> 132 WKContextSetShouldPaintNativeControls(m_context.get(), false); 133 } 134 128 135 } // namespace WTR
Note: See TracChangeset
for help on using the changeset viewer.