From 6b03c0aea7286d72be53450248824e0de3ba5899 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Wed, 21 Feb 2018 11:09:26 +0100 Subject: [PATCH] Remove tabs from webview chromium source files --- include/wx/webview_chromium.h | 4 ++-- interface/wx/webview.h | 10 +++++----- interface/wx/webview_chromium.h | 12 ++++++------ samples/webview/webview.cpp | 12 ++++++------ src/common/webview_chromium.cpp | 30 +++++++++++++++--------------- src/osx/webview_chromium.mm | 2 +- 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 502f5942a0..7d6c9b9371 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -143,8 +143,8 @@ private: friend class wxWebViewChromiumModule; static int ms_activeWebViewCount; static bool ms_cefInitialized; - - static void OnIdle(wxIdleEvent& evt); + + static void OnIdle(wxIdleEvent& evt); static bool InitCEF(); diff --git a/interface/wx/webview.h b/interface/wx/webview.h index a873754b71..83ecc75ebe 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -246,11 +246,11 @@ public: WebView class. This backend has full support for custom schemes and virtual file systems. - - @par wxWEBVIEW_CHROMIUM (MSW, OSX, GTK) - - The Chromium Embedded Framework backend has to be enabled when building wxWidgets, - see wxWebViewChromium for additional usage and build instructions. + + @par wxWEBVIEW_CHROMIUM (MSW, OSX, GTK) + + The Chromium Embedded Framework backend has to be enabled when building wxWidgets, + see wxWebViewChromium for additional usage and build instructions. @section async Asynchronous Notifications diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index 191a9a9576..42abc1ea0d 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -31,11 +31,11 @@ The wxWebViewChromium backend is built into a separate webview_chromium library which depends on the webview library. - - When building with CMake enable wxUSE_WEBVIEW_CHROMIUM and CEF will - automatically downloaded during configuration based on your platform. - - For other build systems please follow the following instructions: + + When building with CMake enable wxUSE_WEBVIEW_CHROMIUM and CEF will + automatically downloaded during configuration based on your platform. + + For other build systems please follow the following instructions: Once you have a copy of CEF3, either from compiling it yourself or using prebuilt binaries you should copy it into `wx_root/3rdparty/cef`. To run the @@ -50,7 +50,7 @@ either by passing --enable-webviewchromium for autoconf based builds or setting wxUSE_WEBVIEW_CHROMIUM equal to 1 in setup.h for Visual Studio based builds. - + __Mac OS X Platform__ diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 10aaa51bc5..1b3f85cd24 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -268,7 +268,7 @@ bool WebApp::OnInit() // Create the memory files wxImage::AddHandler(new wxPNGHandler); - wxMemoryFSHandler::AddFile("logo.png", + wxMemoryFSHandler::AddFile("logo.png", wxBitmap(wxlogo_xpm), wxBITMAP_TYPE_PNG); wxMemoryFSHandler::AddFile("page1.htm", "File System Example" @@ -375,12 +375,12 @@ WebFrame::WebFrame(const wxString& url) : #ifdef wxWEBVIEW_SAMPLE_CHROMIUM , wxDefaultPosition, #ifdef __WXOSX__ - // OSX implementation currently cannot handle the default size - wxSize(800, 600) + // OSX implementation currently cannot handle the default size + wxSize(800, 600) #else - wxDefaultSize + wxDefaultSize #endif - , wxWebViewBackendChromium + , wxWebViewBackendChromium #endif ); topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); @@ -1223,7 +1223,7 @@ void WebFrame::OnSelectAll(wxCommandEvent& WXUNUSED(evt)) * Callback invoked when a loading error occurs */ void WebFrame::OnError(wxWebViewEvent& evt) -{ +{ #define WX_ERROR_CASE(type) \ case type: \ category = #type; \ diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 4605a5ab31..a29ad67306 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -80,7 +80,7 @@ public: virtual void OnTitleChange(CefRefPtr browser, const CefString& title) wxOVERRIDE; virtual bool OnConsoleMessage(CefRefPtr browser, - cef_log_severity_t level, + cef_log_severity_t level, const CefString& message, const CefString& source, int line) wxOVERRIDE; @@ -287,8 +287,8 @@ bool wxWebViewChromium::Create(wxWindow* parent, this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); // Initalize CEF message loop handling - if (ms_activeWebViewCount == 0) - wxTheApp->Bind(wxEVT_IDLE, &wxWebViewChromium::OnIdle); + if (ms_activeWebViewCount == 0) + wxTheApp->Bind(wxEVT_IDLE, &wxWebViewChromium::OnIdle); ms_activeWebViewCount++; return true; @@ -299,7 +299,7 @@ wxWebViewChromium::~wxWebViewChromium() // Delete CEF idle handler when there is no active webview ms_activeWebViewCount--; if (ms_activeWebViewCount == 0) - wxTheApp->Unbind(wxEVT_IDLE, &wxWebViewChromium::OnIdle); + wxTheApp->Unbind(wxEVT_IDLE, &wxWebViewChromium::OnIdle); if (m_clientHandler) { @@ -365,7 +365,7 @@ void wxWebViewChromium::ShutdownCEF() void wxWebViewChromium::OnIdle(wxIdleEvent& evt) { - CefDoMessageLoopWork(); + CefDoMessageLoopWork(); } void wxWebViewChromium::OnSize(wxSizeEvent& event) @@ -405,7 +405,7 @@ void* wxWebViewChromium::GetNativeBackend() const } bool wxWebViewChromium::CanGoForward() const -{ +{ if ( m_historyEnabled ) return m_historyPosition != static_cast(m_historyList.size()) - 1; else @@ -413,7 +413,7 @@ bool wxWebViewChromium::CanGoForward() const } bool wxWebViewChromium::CanGoBack() const -{ +{ if ( m_historyEnabled ) return m_historyPosition > 0; else @@ -471,7 +471,7 @@ void wxWebViewChromium::GoForward() } void wxWebViewChromium::LoadURL(const wxString& url) -{ +{ m_clientHandler->GetBrowser()->GetMainFrame()->LoadURL(url.ToStdString()); } @@ -508,7 +508,7 @@ wxString wxWebViewChromium::GetPageSource() const return m_pageSource; } -wxString wxWebViewChromium::GetPageText() const +wxString wxWebViewChromium::GetPageText() const { return m_pageText; } @@ -592,7 +592,7 @@ bool wxWebViewChromium::IsBusy() const void wxWebViewChromium::SetEditable(bool enable) { wxString mode = enable ? "\"on\"" : "\"off\""; - RunScript("document.designMode = " + mode); + RunScript("document.designMode = " + mode); } void wxWebViewChromium::DoSetPage(const wxString& html, const wxString& baseUrl) @@ -689,7 +689,7 @@ void ClientHandler::OnTitleChange(CefRefPtr browser, const CefString } bool ClientHandler::OnConsoleMessage(CefRefPtr WXUNUSED(browser), - cef_log_severity_t level, + cef_log_severity_t level, const CefString& WXUNUSED(message), const CefString& WXUNUSED(source), int WXUNUSED(line)) { @@ -724,8 +724,8 @@ bool ClientHandler::OnBeforePopup(CefRefPtr WXUNUSED(browser), CefRefPtr WXUNUSED(frame), const CefString& target_url, const CefString& target_frame_name, - WindowOpenDisposition WXUNUSED(target_disposition), - bool WXUNUSED(user_gesture), + WindowOpenDisposition WXUNUSED(target_disposition), + bool WXUNUSED(user_gesture), const CefPopupFeatures& WXUNUSED(popupFeatures), CefWindowInfo& WXUNUSED(windowInfo), CefRefPtr& WXUNUSED(client), @@ -769,8 +769,8 @@ void ClientHandler::OnBeforeClose(CefRefPtr browser) // CefLoadHandler methods void ClientHandler::OnLoadStart(CefRefPtr WXUNUSED(browser), - CefRefPtr frame, - TransitionType WXUNUSED(transition_type)) + CefRefPtr frame, + TransitionType WXUNUSED(transition_type)) { wxString url = frame->GetURL().ToString(); wxString target = frame->GetName().ToString(); diff --git a/src/osx/webview_chromium.mm b/src/osx/webview_chromium.mm index 55bc14cac8..7710f4a2e8 100644 --- a/src/osx/webview_chromium.mm +++ b/src/osx/webview_chromium.mm @@ -59,7 +59,7 @@ void wxWebViewChromium_InitOSX() Protocol* prot = objc_getProtocol("CefAppProtocol"); if (prot) { - Class appClass = objc_getClass("wxNSApplication"); + Class appClass = objc_getClass("wxNSApplication"); class_addProtocol(appClass, prot); if (!class_addMethod(appClass, @selector(isHandlingSendEvent), &isHandlingSendEventImpl, "c@:")) wxLogError("Could not add isHandlingSendEvent impl");