Rubber stamped by Maciej.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2006 06:08:04 +0000 (06:08 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2006 06:08:04 +0000 (06:08 +0000)
        Adding back resultsWithXpathQuery, removed by Darin's earlier change.
        This function is called from ObjC, but not used from JavaScript.

        * WebInspector/webInspector/inspector.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebInspector/webInspector/inspector.js

index 3b796e87a49503e6391b1f000ba8a620b35c4501..1f484cc6c04ee7df81f439d6f222e1462241c9b0 100644 (file)
@@ -1,3 +1,12 @@
+2006-08-02  Timothy Hatcher  <timothy@apple.com>
+
+        Rubber stamped by Maciej.
+
+        Adding back resultsWithXpathQuery, removed by Darin's earlier change.
+        This function is called from ObjC, but not used from JavaScript.
+
+        * WebInspector/webInspector/inspector.js:
+
 2006-08-02  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Darin.
index f841f3594452aee755abee79dc0f0429ef027e1a..dbb7006f17507a3bc757caff40a9ed603441662d 100644 (file)
@@ -298,6 +298,18 @@ function performSearch(query)
     Inspector.searchPerformed(query);
 }
 
+function resultsWithXpathQuery(query)
+{
+    var nodeList = null;
+    try {
+        var focusedNode = Inspector.focusedDOMNode();
+        nodeList = focusedNode.document.evaluate(query, focusedNode.document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE);
+    } catch(err) {
+        // ignore any exceptions. the query might be malformed, but we allow that 
+    }
+    return nodeList;
+}
+
 var tabNames = ["node","metrics","style","properties"];
 var currentPane = "node";
 var paneUpdateState = [];