Permalink
Browse files

updated submodule to latest version

  • Loading branch information...
1 parent e608fa2 commit db947a5a8d18937679ddb347863abd5703c1a62d @darobin darobin committed Feb 7, 2013
Showing with 21 additions and 13 deletions.
  1. +1 −1 resources
  2. +20 −12 tools/coverage/get-analysis-for.phjs
Submodule resources updated 6 files
+3 −0 .gitignore
+3 −0 .gitmodules
+0 −5,990 WebIDLParser.js
+50 −49 idlharness.js
+4 −1 readme.md
+1 −0 webidl2
@@ -68,19 +68,27 @@ page.open(url, function (status) {
}
function getNodesForSection (section) {
- var xpath, nodes = [];
- // let me get all Kayessian on your arse!
- if (section.end_id) {
- // xpath = "id('" + section.original_id + "')/following-sibling::node()[count(.| id('" + section.end_id + "')/preceding-sibling::node())=count(id('" + section.end_id + "')/preceding-sibling::node())]";
- xpath = "id('" + section.original_id + "')/following::node()[count(.| id('" + section.end_id + "')/preceding::node())=count(id('" + section.end_id + "')/preceding::node())]";
+ var range = document.createRange()
+ , start = document.getElementById(section.original_id)
+ ;
+ if (start.parentNode.tagName.toLowerCase() === "div" && start.parentNode.classList.contains("impl")) {
+ start = start.parentNode;
}
- else {
- // xpath = "id('" + section.original_id + "')/following-sibling::node()";
- xpath = "id('" + section.original_id + "')/following::node()";
- }
- var xpr = document.evaluate(xpath, document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
- for (var j = 0, m = xpr.snapshotLength; j < m; j++) nodes.push(xpr.snapshotItem(j));
- return nodes;
+ range.setStartBefore(start);
+
+ // var xpath, nodes = [];
+ // // let me get all Kayessian on your arse!
+ // if (section.end_id) {
+ // // xpath = "id('" + section.original_id + "')/following-sibling::node()[count(.| id('" + section.end_id + "')/preceding-sibling::node())=count(id('" + section.end_id + "')/preceding-sibling::node())]";
+ // xpath = "id('" + section.original_id + "')/following::node()[count(.| id('" + section.end_id + "')/preceding::node())=count(id('" + section.end_id + "')/preceding::node())]";
+ // }
+ // else {
+ // // xpath = "id('" + section.original_id + "')/following-sibling::node()";
+ // xpath = "id('" + section.original_id + "')/following::node()";
+ // }
+ // var xpr = document.evaluate(xpath, document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+ // for (var j = 0, m = xpr.snapshotLength; j < m; j++) nodes.push(xpr.snapshotItem(j));
+ // return nodes;
}
function getClonesForSection (section) {

0 comments on commit db947a5

Please sign in to comment.