Title: [108002] trunk/Websites/webkit.org
- Revision
- 108002
- Author
- [email protected]
- Date
- 2012-02-16 16:57:14 -0800 (Thu, 16 Feb 2012)
Log Message
Improve usability of coding-style.html
https://bugs.webkit.org/show_bug.cgi?id=78470
Reviewed by Eric Seidel.
* coding/coding-style.html:
- Do not add a title attribute to each of LI elements
- Do not add a click handler to each of them
- Add a SPAN element in order to show [id-name] and provide smaller clickable area.
Modified Paths
Diff
Modified: trunk/Websites/webkit.org/ChangeLog (108001 => 108002)
--- trunk/Websites/webkit.org/ChangeLog 2012-02-17 00:54:37 UTC (rev 108001)
+++ trunk/Websites/webkit.org/ChangeLog 2012-02-17 00:57:14 UTC (rev 108002)
@@ -1,3 +1,15 @@
+2012-02-16 Kent Tamura <[email protected]>
+
+ Improve usability of coding-style.html
+ https://bugs.webkit.org/show_bug.cgi?id=78470
+
+ Reviewed by Eric Seidel.
+
+ * coding/coding-style.html:
+ - Do not add a title attribute to each of LI elements
+ - Do not add a click handler to each of them
+ - Add a SPAN element in order to show [id-name] and provide smaller clickable area.
+
2012-01-23 Seo Sanghyeon <[email protected]>
website: Reword WEBKITOUTPUTDIR documentation on Building WebKit page
Modified: trunk/Websites/webkit.org/coding/coding-style.html (108001 => 108002)
--- trunk/Websites/webkit.org/coding/coding-style.html 2012-02-17 00:54:37 UTC (rev 108001)
+++ trunk/Websites/webkit.org/coding/coding-style.html 2012-02-17 00:57:14 UTC (rev 108002)
@@ -14,6 +14,12 @@
.wrong {
color: #f00 !important;
}
+
+.idbutton {
+ color: #888;
+ font-size: smaller;
+ cursor: pointer;
+}
</style>
@@ -1104,11 +1110,14 @@
var item = listItems[i];
if (!item.id)
continue;
- item.setAttribute('title', '#' + listItems[i].id);
- item.style.cursor = 'pointer';
- item.addEventListener('click', function(event) {
- window.location.hash = event.currentTarget.title;
+ var button = document.createElement('span');
+ button.className = 'idbutton';
+ button.setAttribute('data-target-id', listItems[i].id);
+ button.appendChild(document.createTextNode(' [' + listItems[i].id + ']'));
+ button.addEventListener('click', function(event) {
+ window.location.hash = '#' + event.currentTarget.getAttribute('data-target-id');
});
+ listItems[i].appendChild(button);
if (idsUsed[item.id])
alert('The id ' + item.id + ' is used more than once in this document.');
idsUsed[item.id] = 1;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes