[PATCH] D80444: [analyzer] Add support for IE of keyboard and mouse navigation in HTML report

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 23:23:05 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6bbaa62d26b6: [analyzer] Add support for IE of keyboard and mouse navigation in HTML report (authored by ASDenysPetrov).
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80444/new/

https://reviews.llvm.org/D80444

Files:
  clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp


Index: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
+++ clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
@@ -1070,8 +1070,13 @@
 <script type='text/javascript'>
 var digitMatcher = new RegExp("[0-9]+");
 
+var querySelectorAllArray = function(selector) {
+  return Array.prototype.slice.call(
+    document.querySelectorAll(selector));
+}
+
 document.addEventListener("DOMContentLoaded", function() {
-    document.querySelectorAll(".PathNav > a").forEach(
+    querySelectorAllArray(".PathNav > a").forEach(
         function(currentValue, currentIndex) {
             var hrefValue = currentValue.getAttribute("href");
             currentValue.onclick = function() {
@@ -1091,7 +1096,7 @@
 };
 
 var scrollTo = function(el) {
-    document.querySelectorAll(".selected").forEach(function(s) {
+    querySelectorAllArray(".selected").forEach(function(s) {
         s.classList.remove("selected");
     });
     el.classList.add("selected");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80444.266432.patch
Type: text/x-patch
Size: 1070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200527/b811cd4e/attachment-0001.bin>


More information about the cfe-commits mailing list