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");
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");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits