diff --git a/include/wx/msw/webview_ie.h b/include/wx/msw/webview_ie.h index 1c9d154bae..f1e7773f89 100644 --- a/include/wx/msw/webview_ie.h +++ b/include/wx/msw/webview_ie.h @@ -259,7 +259,7 @@ public: class ClassFactory : public IClassFactory { public: - ClassFactory(wxSharedPtr handler) : m_handler(handler) + ClassFactory(wxSharedPtr handler) : m_handler(handler) { AddRef(); } virtual ~ClassFactory() {} diff --git a/include/wx/msw/webview_missing.h b/include/wx/msw/webview_missing.h index 514ae1e56c..61a54a4e20 100644 --- a/include/wx/msw/webview_missing.h +++ b/include/wx/msw/webview_missing.h @@ -297,8 +297,8 @@ typedef enum _tagwxELEMENT_TAG_ID { wxTAGID_NULL = 0, wxTAGID_UNKNOWN = 1, wxTAGID_A = 2, wxTAGID_ACRONYM = 3, wxTAGID_ADDRESS = 4, wxTAGID_APPLET = 5, wxTAGID_AREA = 6, wxTAGID_B = 7, - wxTAGID_BASE = 8, wxTAGID_BASEFONT = 9, wxTAGID_BDO = 10, - wxTAGID_BGSOUND = 11, wxTAGID_BIG = 12, wxTAGID_BLINK = 13, + wxTAGID_BASE = 8, wxTAGID_BASEFONT = 9, wxTAGID_BDO = 10, + wxTAGID_BGSOUND = 11, wxTAGID_BIG = 12, wxTAGID_BLINK = 13, wxTAGID_BLOCKQUOTE = 14, wxTAGID_BODY = 15, wxTAGID_BR = 16, wxTAGID_BUTTON = 17, wxTAGID_CAPTION = 18, wxTAGID_CENTER = 19, wxTAGID_CITE = 20, wxTAGID_CODE = 21, wxTAGID_COL = 22, @@ -945,3 +945,24 @@ public: /* end of WinInet.h */ +/* ShObjldl_core.h */ + +typedef enum _wxNWMF +{ + wxNWMF_UNLOADING = 0x1, + wxNWMF_USERINITED = 0x2, + wxNWMF_FIRST = 0x4, + wxNWMF_OVERRIDEKEY = 0x8, + wxNWMF_SHOWHELP = 0x10, + wxNWMF_HTMLDIALOG = 0x20, + wxNWMF_FROMDIALOGCHILD = 0x40, + wxNWMF_USERREQUESTED = 0x80, + wxNWMF_USERALLOWED = 0x100, + wxNWMF_FORCEWINDOW = 0x10000, + wxNWMF_FORCETAB = 0x20000, + wxNWMF_SUGGESTWINDOW = 0x40000, + wxNWMF_SUGGESTTAB = 0x80000, + wxNWMF_INACTIVETAB = 0x100000 +} _wxNWMF; + +/* end of ShObjldl_core.h */ diff --git a/include/wx/webview.h b/include/wx/webview.h index 28c3219359..9975325392 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -149,7 +149,7 @@ public: long style = 0, const wxString& name = wxWebViewNameStr); - static void RegisterFactory(const wxString& backend, + static void RegisterFactory(const wxString& backend, wxSharedPtr factory); // General methods diff --git a/src/common/webview.cpp b/src/common/webview.cpp index 965576ae65..5121e385eb 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -17,7 +17,7 @@ #include "wx/webview.h" -#if defined(__WXOSX__) +#if defined(__WXOSX__) #include "wx/osx/webview_webkit.h" #elif defined(__WXGTK__) #include "wx/gtk/webview_webkit.h" @@ -65,8 +65,8 @@ wxWebView* wxWebView::New(const wxString& backend) // static wxWebView* wxWebView::New(wxWindow* parent, wxWindowID id, const wxString& url, - const wxPoint& pos, const wxSize& size, - const wxString& backend, long style, + const wxPoint& pos, const wxSize& size, + const wxString& backend, long style, const wxString& name) { wxStringWebViewFactoryMap::iterator iter = FindFactory(backend); @@ -79,13 +79,13 @@ wxWebView* wxWebView::New(wxWindow* parent, wxWindowID id, const wxString& url, } // static -void wxWebView::RegisterFactory(const wxString& backend, +void wxWebView::RegisterFactory(const wxString& backend, wxSharedPtr factory) { m_factoryMap[backend] = factory; } -// static +// static wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backend) { // Initialise the map, it checks internally for existing factories @@ -93,7 +93,7 @@ wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backe return m_factoryMap.find(backend); } - + // static void wxWebView::InitFactoryMap() { diff --git a/src/common/webviewarchivehandler.cpp b/src/common/webviewarchivehandler.cpp index cb8f608a29..963c7fd210 100644 --- a/src/common/webviewarchivehandler.cpp +++ b/src/common/webviewarchivehandler.cpp @@ -76,7 +76,7 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) } } - //We do not have a protocol string so we just pass the path withouth the + //We do not have a protocol string so we just pass the path withouth the if(start == wxString::npos) { size_t doubleslash = path.find("//"); @@ -84,7 +84,7 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) if(doubleslash == wxString::npos) return NULL; - wxString fspath = "file:" + + wxString fspath = "file:" + EscapeFileNameCharsInURL(path.substr(doubleslash + 2).c_str()); return m_fileSystem->OpenFile(fspath); } @@ -107,7 +107,7 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) if(doubleslash == wxString::npos) return NULL; - wxString fspath = "file:" + + wxString fspath = "file:" + EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2).c_str()) + "#" + protocol +":" + archivepath; return m_fileSystem->OpenFile(fspath); diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 8df8c4b094..73541f49f4 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -134,7 +134,7 @@ wxWebViewIE::~wxWebViewIE() for(unsigned int i = 0; i < m_factories.size(); i++) { - session->UnregisterNameSpace(m_factories[i], + session->UnregisterNameSpace(m_factories[i], (m_factories[i]->GetName()).wc_str()); m_factories[i]->Release(); } @@ -1030,7 +1030,7 @@ wxCOMPtr wxWebViewIE::GetDocument() const bool wxWebViewIE::IsElementVisible(wxCOMPtr elm) { - wxCOMPtr elm1 = elm; + wxCOMPtr elm1 = elm; bool is_visible = true; //This method is not perfect but it does discover most of the hidden elements. //so if a better solution is found, then please do improve. @@ -1046,7 +1046,7 @@ bool wxWebViewIE::IsElementVisible(wxCOMPtr elm) wxBasicString visibility_bstr; //Check if the object has the style display:none. - if((style->get_display(display_bstr.ByRef()) != S_OK) || + if((style->get_display(display_bstr.ByRef()) != S_OK) || wxString(display_bstr).IsSameAs(wxS("none"), false)) { is_visible = false; @@ -1092,7 +1092,7 @@ void wxWebViewIE::FindInternal(const wxString& text, int flags, int internal_fla wxCOMPtr ptrBegin, ptrEnd; wxBasicString attr_bstr(wxS("style=\"background-color:#ffff00\"")); wxBasicString text_bstr(text); - + pIMS->CreateMarkupPointer(&ptrBegin); pIMS->CreateMarkupPointer(&ptrEnd); @@ -1477,7 +1477,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) wxWebViewNavigationActionFlags navFlags = wxWEBVIEW_NAV_ACTION_OTHER; - if(flags & NWMF_USERINITED || flags & NWMF_USERREQUESTED) + if(flags & wxNWMF_USERINITED || flags & wxNWMF_USERREQUESTED) navFlags = wxWEBVIEW_NAV_ACTION_USER; wxWebViewEvent event(wxEVT_WEBVIEW_NEWWINDOW, @@ -1633,10 +1633,10 @@ HRESULT wxSTDCALL DocHostUIHandler::ShowContextMenu(DWORD dwID, POINT *ppt, wxUnusedVar(ppt); wxUnusedVar(pcmdtReserved); wxUnusedVar(pdispReserved); - if(m_browser->IsContextMenuEnabled()) - return E_NOTIMPL; - else - return S_OK; + if(m_browser->IsContextMenuEnabled()) + return E_NOTIMPL; + else + return S_OK; } HRESULT wxSTDCALL DocHostUIHandler::GetHostInfo(DOCHOSTUIINFO *pInfo) @@ -1706,7 +1706,7 @@ HRESULT wxSTDCALL DocHostUIHandler::TranslateAccelerator(LPMSG lpMsg, { // check control is down but that it isn't right-alt which is mapped to // alt + ctrl - if(GetKeyState(VK_CONTROL) & 0x8000 && + if(GetKeyState(VK_CONTROL) & 0x8000 && !(GetKeyState(VK_MENU) & 0x8000)) { //skip the accelerators used by the control