This change reimplements the snippet copy-to-clipboard feature using a single 
`<button>` element instead of a `<a href="#">` with an attached `::before` 
pseudo-element.

While the implementation is more straightforward than before both appearance 
and functionality should be unchanged. The only (intentional) change is that 
the new button has a bit more clickable area (i.e. padding) than the old link, 
but this is offset by the button's positioning so the location of the image and 
text does not change.

A sample page rendered with the new code containing a few snippets is available 
here:
http://cr.openjdk.java.net/~hannesw/8276768/api.00/Test.html

-------------

Commit messages:
 - JDK-8276768: Snippet copy feature should use button instead of link

Changes: https://git.openjdk.java.net/jdk/pull/6284/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6284&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8276768
  Stats: 86 lines in 5 files changed: 16 ins; 16 del; 54 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6284.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6284/head:pull/6284

PR: https://git.openjdk.java.net/jdk/pull/6284

Reply via email to