Don't define unnecessary constants in public webview_ie.h
There is no need to check that calling MSWSetModernEmulationLevel() changed the registry key in the test, this is just an implementation detail of this function. This makes it unnecessary to define wxIE_EMULATION_LEVEL and wxREGISTRY_IE_PATH (which are both badly named) in the public header. Finally, improve the error message in MSWSetModernEmulationLevel() and add another one for failing to reset the emulation level too.
This commit is contained in:
@@ -36,11 +36,6 @@ class DocHostUIHandler;
|
||||
class wxFindPointers;
|
||||
class wxIInternetProtocol;
|
||||
|
||||
#define wxIE_EMULATION_LEVEL 8000
|
||||
|
||||
//Registry key where emulation level for programs are set
|
||||
#define wxREGISTRY_IE_PATH wxT("SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION")
|
||||
|
||||
class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView
|
||||
{
|
||||
public:
|
||||
@@ -149,7 +144,8 @@ public:
|
||||
void onActiveXEvent(wxActiveXEvent& evt);
|
||||
void onEraseBg(wxEraseEvent&) {}
|
||||
|
||||
//Establish EmulationLevel for RunScript IE
|
||||
// Establish sufficiently modern emulation level for the browser control to
|
||||
// allow RunScript() to return any kind of values.
|
||||
static bool MSWSetModernEmulationLevel(bool modernLevel = true);
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
Reference in New Issue
Block a user