From 8613f3aa6bfb07baa5ad50620eb77fdadc397deb Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Fri, 5 Nov 2021 09:41:39 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: VZ --- include/wx/gtk/webview_webkit.h | 2 +- include/wx/private/jsscriptwrapper.h | 3 ++- src/common/webview.cpp | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h index 63caf2dc13..b43e98f283 100644 --- a/include/wx/gtk/webview_webkit.h +++ b/include/wx/gtk/webview_webkit.h @@ -156,7 +156,7 @@ public: bool m_creating; #if wxUSE_WEBVIEW_WEBKIT2 - // This methods needs to be public to make it callable from a callback + // This method needs to be public to make it callable from a callback void ProcessJavaScriptResult(GAsyncResult *res, wxWebKitRunScriptParams* params) const; #endif diff --git a/include/wx/private/jsscriptwrapper.h b/include/wx/private/jsscriptwrapper.h index 9e6c63fb8d..a69b286b48 100644 --- a/include/wx/private/jsscriptwrapper.h +++ b/include/wx/private/jsscriptwrapper.h @@ -24,7 +24,8 @@ class wxJSScriptWrapper { public: - enum OutputType { + enum OutputType + { JS_OUTPUT_STRING, // All return types are converted to a string JS_OUTPUT_WEBKIT, // Some return types will be processed JS_OUTPUT_IE, // Most return types will be processed diff --git a/src/common/webview.cpp b/src/common/webview.cpp index 1b6945c934..26705805a7 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -228,7 +228,7 @@ wxString wxWebView::GetUserAgent() const bool wxWebView::RunScript(const wxString& javascript, wxString* output) const { m_syncScriptResult = -1; - m_syncScriptOutput.Clear(); + m_syncScriptOutput.clear(); RunScriptAsync(javascript, (void*)this); // Wait for script exection @@ -249,7 +249,7 @@ void wxWebView::RunScriptAsync(const wxString& WXUNUSED(javascript), void wxWebView::SendScriptResult(void* clientData, bool success, const wxString& output) const { - // If currently running sync RunScript() don't send an event, but use + // If currently running sync RunScript(), don't send an event, but use // the scripts result directly if (m_syncScriptResult == -1) {