Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated submodule to latest version

  • Loading branch information...
commit db947a5a8d18937679ddb347863abd5703c1a62d 1 parent e608fa2
@darobin darobin authored
Showing with 21 additions and 13 deletions.
  1. +1 −1  resources
  2. +20 −12 tools/coverage/get-analysis-for.phjs
2  resources
@@ -1 +1 @@
-Subproject commit 9dd2b76bc83d3b1e2e10d262f63ff6b75321b41f
+Subproject commit dad4f54440599e0c7a86822b07920a9b1c8cccbf
View
32 tools/coverage/get-analysis-for.phjs
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.