Remove empty onclick attributes on cell containers
Change #530801 (http://gwt-code-reviews.appspot.com/530801) added empty
onclick attributes on cell containers to reliably position tap
highlights for touch devices. The current change removes these empty
onclick attributes in support of Strict CSP
(https://csp.withgoogle.com/docs/strict-csp.html).
Change-Id: I8fd4b25804fadad2d6308f88bb42f84ec7c02094
Review-Link: https://gwt-review.googlesource.com/#/c/17781/
diff --git a/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java b/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
index ed537e3..5973822 100644
--- a/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
+++ b/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
@@ -442,7 +442,7 @@
@SafeHtmlTemplates.Template("<table><thead>{0}</thead></table>")
SafeHtml thead(SafeHtml rowHtml);
- @SafeHtmlTemplates.Template("<tr onclick=\"\" class=\"{0}\">{1}</tr>")
+ @SafeHtmlTemplates.Template("<tr class=\"{0}\">{1}</tr>")
SafeHtml tr(String classes, SafeHtml contents);
}
diff --git a/user/src/com/google/gwt/user/cellview/client/CellBrowser.java b/user/src/com/google/gwt/user/cellview/client/CellBrowser.java
index 9aa50e3..4da5b44 100644
--- a/user/src/com/google/gwt/user/cellview/client/CellBrowser.java
+++ b/user/src/com/google/gwt/user/cellview/client/CellBrowser.java
@@ -178,18 +178,19 @@
}
interface Template extends SafeHtmlTemplates {
- @Template("<div onclick=\"\" __idx=\"{0}\" class=\"{1}\""
+ @Template("<div __idx=\"{0}\" class=\"{1}\""
+ " style=\"{2}position:relative;outline:none;\">{3}<div>{4}</div></div>")
SafeHtml div(int idx, String classes, SafeStyles padding, SafeHtml imageHtml,
SafeHtml cellContents);
- @Template("<div onclick=\"\" __idx=\"{0}\" class=\"{1}\""
+ @Template("<div __idx=\"{0}\" class=\"{1}\""
+ " style=\"{2}position:relative;outline:none;\" tabindex=\"{3}\">{4}<div>{5}</div></div>")
SafeHtml divFocusable(int idx, String classes, SafeStyles padding, int tabIndex,
SafeHtml imageHtml, SafeHtml cellContents);
- @Template("<div onclick=\"\" __idx=\"{0}\" class=\"{1}\""
- + " style=\"{2}position:relative;outline:none;\" tabindex=\"{3}\" accessKey=\"{4}\">{5}<div>{6}</div></div>")
+ @Template("<div __idx=\"{0}\" class=\"{1}\""
+ + " style=\"{2}position:relative;outline:none;\" tabindex=\"{3}\""
+ + " accessKey=\"{4}\">{5}<div>{6}</div></div>")
SafeHtml divFocusableWithKey(int idx, String classes, SafeStyles padding, int tabIndex,
char accessKey, SafeHtml imageHtml, SafeHtml cellContents);
diff --git a/user/src/com/google/gwt/user/cellview/client/CellList.java b/user/src/com/google/gwt/user/cellview/client/CellList.java
index 2bccc4d..2caf563 100644
--- a/user/src/com/google/gwt/user/cellview/client/CellList.java
+++ b/user/src/com/google/gwt/user/cellview/client/CellList.java
@@ -129,7 +129,7 @@
}
interface Template extends SafeHtmlTemplates {
- @Template("<div onclick=\"\" __idx=\"{0}\" class=\"{1}\" style=\"outline:none;\" >{2}</div>")
+ @Template("<div __idx=\"{0}\" class=\"{1}\" style=\"outline:none;\" >{2}</div>")
SafeHtml div(int idx, String classes, SafeHtml cellContents);
}
diff --git a/user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java b/user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java
index 6e53fc6..cc55feb 100644
--- a/user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java
+++ b/user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java
@@ -74,7 +74,7 @@
class CellTreeNodeView<T> extends UIObject {
interface Template extends SafeHtmlTemplates {
- @Template("<div onclick=\"\" style=\"{0}position:relative;\""
+ @Template("<div style=\"{0}position:relative;\""
+ " class=\"{1}\">{2}<div class=\"{3}\">{4}</div></div>")
SafeHtml innerDiv(SafeStyles cssString, String classes, SafeHtml image, String itemValueStyle,
SafeHtml cellContents);