Implement ClearSelection for the OSX WebKit backend.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton 2011-08-06 12:20:37 +00:00
parent fc35191279
commit ef53bf2a7b
2 changed files with 7 additions and 1 deletions

View File

@ -109,7 +109,7 @@ public:
virtual void SelectAll() {};
virtual wxString GetSelectedText();
virtual wxString GetSelectedSource() { return ""; }
virtual void ClearSelection() {}
virtual void ClearSelection();
void RunScript(const wxString& javascript);

View File

@ -914,6 +914,12 @@ bool wxWebViewWebKit::HasSelection()
}
}
void wxWebViewWebKit::ClearSelection()
{
//We use javascript as selection isn't exposed at the moment in webkit
RunScript("window.getSelection().removeAllRanges();");
}
void wxWebViewWebKit::EnableHistory(bool enable)
{
if ( !m_webView )