]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #2607 (a client side validity check)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 23 Feb 2009 10:58:26 +0000 (10:58 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 23 Feb 2009 10:58:26 +0000 (10:58 +0000)
svn changeset:6938/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
src/com/itmill/toolkit/ui/Table.java

index e60e5fa67dfcfb26a8de8bafb6aaa85bd32d5e07..2cd5ce5d6214e29856dfdce0087b7f40bb597f41 100644 (file)
@@ -874,6 +874,11 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
                     if (lastToBeRendered >= totalRows) {
                         lastToBeRendered = totalRows - 1;
                     }
+                    // due Safari 3.1 bug (see #2607), verify reqrows, original
+                    // problem unknown, but this should catch the issue
+                    if (reqFirstRow + reqRows - 1 > lastToBeRendered) {
+                        reqRows = lastToBeRendered - reqFirstRow;
+                    }
                 }
 
                 client.updateVariable(paintableId, "firstToBeRendered",
index 6588fe1fe5b0410b95e47714abe1acaddc9b75d3..2b528780ca452b9011913078554c66eae5492899 100644 (file)
@@ -1935,14 +1935,6 @@ public class Table extends AbstractSelect implements Action.Container,
         int end = cells[0].length;
         if (reqRowsToPaint != -1) {
             end = start + reqRowsToPaint;
-            // Safari 3.1 sends invalid request sometimes. Cannot reproduce this
-            // with recent webkit. check for valid value and fallback to send
-            // rows to the end of buffer.
-            // TODO replace this with a client side workaround (this causes an
-            // empty screen). See #2607
-            if (end > cells[0].length) {
-                end = cells[0].length;
-            }
         }
         // sanity check
         if (lastToBeRenderedInClient != -1 && lastToBeRenderedInClient < end) {