summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index 7396aa35c9..1409ae9b8f 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -286,6 +286,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler {
if (isAttached()) {
sizeInit();
}
+
+ restoreRowVisibility();
}
if (selectMode == Table.SELECT_MODE_NONE) {
@@ -300,6 +302,18 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler {
headerChangedDuringUpdate = false;
}
+ private void restoreRowVisibility() {
+ // Restore row visibility which is set to "none" when the row is
+ // rendered.
+ TableSectionElement tableBodyElement = scrollBody.tBodyElement;
+ final int rows = tableBodyElement.getChildCount();
+ for (int row = 0; row < rows; row++) {
+ final Element cell = tableBodyElement.getChild(row).cast();
+ cell.getStyle().setProperty("visibility", "");
+ }
+
+ }
+
private void setCacheRate(double d) {
if (cache_rate != d) {
cache_rate = d;
@@ -413,6 +427,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler {
}
scrollBody.fixSpacers();
+ restoreRowVisibility();
}
/**
@@ -2211,6 +2226,12 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler {
public VScrollTableRow(UIDL uidl, char[] aligns) {
this(uidl.getIntAttribute("key"));
+ /*
+ * Rendering the rows as hidden improves Firefox and Safari
+ * performance drastically.
+ */
+ getElement().getStyle().setProperty("visibility", "hidden");
+
String rowStyle = uidl.getStringAttribute("rowstyle");
if (rowStyle != null) {
addStyleName(CLASSNAME + "-row-" + rowStyle);