]> git.saurik.com Git - wxWidgets.git/commitdiff
Implement SelectAll for OSX WebKit.
authorSteve Lamerton <steve.lamerton@gmail.com>
Sat, 6 Aug 2011 12:58:26 +0000 (12:58 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sat, 6 Aug 2011 12:58:26 +0000 (12:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/webview_webkit.h
src/osx/webview_webkit.mm

index b15c2511cd97e59a0a9498d4b12d51bd34b0be98..a455f18222ae703d2ecacff96d6bf050a5651a8d 100644 (file)
@@ -106,7 +106,7 @@ public:
     //Selection
     virtual void DeleteSelection();
     virtual bool HasSelection();
-    virtual void SelectAll() {};
+    virtual void SelectAll();
     virtual wxString GetSelectedText();
     virtual wxString GetSelectedSource() { return ""; }
     virtual void ClearSelection();
index 9b4955a17f2e798af2034e2327392981b24b4e60..e1ebe148f5d8155190ea22d062a44eaa88d54d55 100644 (file)
@@ -920,6 +920,11 @@ void wxWebViewWebKit::ClearSelection()
     RunScript("window.getSelection().removeAllRanges();");
 }
 
+void wxWebViewWebKit::SelectAll()
+{
+    RunScript("window.getSelection().selectAllChildren(document.body);");
+}
+
 wxString wxWebViewWebKit::GetPageText()
 {
     id result = [[m_webView windowScriptObject]