[code coverage] Add tooltips for line, function and region

Some users have feedback that they don't really understand what each of
line, function and region means, and ideally, they'd like to have
simpler UI that only one of them shows up by default.

It requires further evaluations whether we want to remove function and
regions, but adding tooltips for them can definitely help.

Change-Id: Id6eb71af3f66d840d193c95ef159c49b09aeb8b5
Reviewed-on: https://chromium-review.googlesource.com/c/infra/infra/+/1662610
Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#23729}
diff --git a/appengine/findit/templates/coverage/project_view.html b/appengine/findit/templates/coverage/project_view.html
index 9be4e96..0c3288e 100644
--- a/appengine/findit/templates/coverage/project_view.html
+++ b/appengine/findit/templates/coverage/project_view.html
@@ -62,13 +62,13 @@
             {% endif %}
           </tr>
           <tr>
-            <th>Commit Position</th>
-            <th>Commit Time (PST)</th>
-            <th>Report</th>
-            <th>Line</th>
-            <th>Function</th>
-            <th>Region</th>
-            <th>Data Source</th>
+            <th title="Commit position used to build targets and generate code coverage report.">Commit Position</th>
+            <th title="Time when the revision was commited into the source tree.">Commit Time (PST)</th>
+            <th title="Link to code coverage report for the particular commit position.">Report</th>
+            <th title="Line coverage is the percentage of code lines which have been executed at least once. Only executable lines within function bodies are considered to be code lines.">Line</th>
+            <th title="Function coverage is the percentage of functions which have been executed at least once. A function is considered to be executed if any of its instantiations are executed.">Function</th>
+            <th title="Region coverage is the percentage of code regions which have been executed at least once. A code region may span multiple lines (e.g in a large function body with no control flow). However, it's also possible for a single line to contain multiple code regions (e.g in 'return x || y &amp;&amp; z').">Region</th>
+            <th title="Link to the build that generated this report.">Data Source</th>
             {% if user_info and user_info.is_admin %}
               <th>Is Visible</th>
             {% endif %}
@@ -80,7 +80,7 @@
           {% if user_info and user_info.is_admin or datum.visible %}
             <tr>
               <td>
-                {{datum.commit_position}}
+                <a href="https://crrev.com/{{datum.commit_position}}">{{datum.commit_position}}</a>
               </td>
               <td>
                 {{datum.commit_timestamp}}
diff --git a/appengine/findit/templates/coverage/summary_view.html b/appengine/findit/templates/coverage/summary_view.html
index b18516e..205d683 100644
--- a/appengine/findit/templates/coverage/summary_view.html
+++ b/appengine/findit/templates/coverage/summary_view.html
@@ -169,9 +169,9 @@
             {% else %}
             <th>Path</th>
             {% endif %}
-            <th>Line</th>
-            <th>Function</th>
-            <th>Region</th>
+            <th title="Line coverage is the percentage of code lines which have been executed at least once. Only executable lines within function bodies are considered to be code lines.">Line</th>
+            <th title="Function coverage is the percentage of functions which have been executed at least once. A function is considered to be executed if any of its instantiations are executed.">Function</th>
+            <th title="Region coverage is the percentage of code regions which have been executed at least once. A code region may span multiple lines (e.g in a large function body with no control flow). However, it's also possible for a single line to contain multiple code regions (e.g in 'return x || y &amp;&amp; z').">Region</th>
           </tr>
         </thead>