[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 20 07:19:37 PDT 2021


ASDenysPetrov added a comment.

I've made some debugging with IE. Let's keep the diagnostics IE friendly. We might not know how many users work with IE in real.



================
Comment at: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:1275-1283
 var scrollTo = function(el) {
     querySelectorAllArray(".selected").forEach(function(s) {
         s.classList.remove("selected");
     });
     el.classList.add("selected");
     window.scrollBy(0, el.getBoundingClientRect().top -
         (window.innerHeight / 2));
----------------
IE doesn't support `classList` for elements.


================
Comment at: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:1318-1320
   if (event.key == "j") {
     navigateTo(/*up=*/false);
   } else if (event.key == "k") {
----------------
Let's make this more sofisticated, as it only works for English keyboard layout with Caps //off//.


================
Comment at: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:1335-1338
+function range(lower, upper) {
+  const size = upper - lower;
+  return Array.from(new Array(size), (x, i) => i + lower);
+}
----------------
IE doesn't support `Array.from/fill` functions.


================
Comment at: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:1357
+    var arrow = document.querySelector("#arrow" + index);
+    arrow.classList.add("selected");
+  });
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92928



More information about the cfe-commits mailing list