[PATCH] D23277: [llvm-cov] Add the "Goto first zero count" feature.
Ying Yi via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 16:09:22 PDT 2016
MaggieYi added a comment.
In https://reviews.llvm.org/D23277#526594, @vsk wrote:
> Thanks for splitting things up :).
If the link is removed, the user could easily know that this source file is fully covered. From this point, it is better to remove the link.
> I also don't think we need a 'zeroline' or 'zero' id. Every line already has an anchor: <a name='L$N'>. I think a "Jump to the first uncovered line" link which uses one of the line anchors would do the job.
I use the following way to implement “Goto first zero line” feature.
To create links to jump to the first uncovered line within the page, two HTML tags need to be used.
<a href="#zero">Goto first zero count</a>
This first tag is almost the same as any other HTML tag you would use to create a link to another page. However, to create a bookmark (anchor), I must start the link with a #, which represents a name statement, used in the next tag. When the user clicks on the "Goto first zero count" link, the computer would then go to the name tag, if found on the same page of the link.
This next piece of code is where the link will go to on the page when the link is clicked. The ID attribute is added to a <tr> tag.
<a href="#zero" 'id="zeroline">Goto first zero count</a>
Both 'zeroline' and 'zero' are needed using this method. I am not sure the way you mentioned here. Could you please explain it by an example?
More information about the llvm-commits