Page MenuHomePhabricator

[analyzer] Adjust JS code of analyzer's HTML report for IE support.
ClosedPublic

Authored by ASDenysPetrov on Aug 3 2021, 9:10 AM.

Details

Summary

Change and replace some functions which IE does not support. This patch is made as a continuation of D92928 revision. Also improve hot keys behavior.

Diff Detail

Event Timeline

ASDenysPetrov created this revision.Aug 3 2021, 9:10 AM
ASDenysPetrov requested review of this revision.Aug 3 2021, 9:10 AM
ASDenysPetrov edited the summary of this revision. (Show Details)Aug 3 2021, 9:15 AM
NoQ added inline comments.Aug 3 2021, 1:07 PM
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
1352–1357

This probably also solves keyboard layout problems, nice!

1373

Shouldn't it be i < upper?

ASDenysPetrov added inline comments.Aug 4 2021, 3:40 AM
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
1352–1357

Exactly=)

1373

[lower, upper). Sure! Thanks!

Fixed the range in range function.

Can you please also attach an HTML file just to verify that it works?

clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
1293

nit: space please

1396–1398

nit: space please

Corrected nits. Thanks to "the sharp eye" @vsavchenko =).

Replaced a closure in highlightArrowsForSelectedEvent with function object.

This is a sample file which now should work both on IE and Chromium-based browsers.

NoQ accepted this revision.Aug 4 2021, 11:39 AM

Works in Firefox on macOS as well!

This revision is now accepted and ready to land.Aug 4 2021, 11:39 AM

Works in Firefox on macOS as well!

Great!
@vsavchenko , any suggestions?

vsavchenko accepted this revision.Aug 4 2021, 1:59 PM

Works in Firefox on macOS as well!

Great!
@vsavchenko , any suggestions?

LGTM! Thanks fo taking care of this!

vsavchenko requested changes to this revision.Aug 5 2021, 2:09 AM

Oh, wait! I found a bug!

This revision now requires changes to proceed.Aug 5 2021, 2:09 AM

Now it captures (and makes bold) one extra arrow from the previous note.
Correct example attached!

clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
1373

And this bug is probably because of this!

Now it captures (and makes bold) one extra arrow from the previous note.
Correct example attached!

Damn. I've already fixed it. It returned back after some branch manipulations I didn't notice. Thank you!

Final fixes.

- Final sample file.

Is it ready to load now?

vsavchenko accepted this revision.Aug 17 2021, 1:40 AM

Now it looks good! Thanks again!

This revision is now accepted and ready to land.Aug 17 2021, 1:40 AM