From 8eae5a4313ea8ddba38bd42c93043a9a6fa9ce03 Mon Sep 17 00:00:00 2001 From: Automerge Date: Wed, 6 Jun 2012 13:07:21 +0000 Subject: [merge from 6.7] #7606 Run a Webkit overflow fix as deferred to keep table scroll position accurate svn changeset:23896/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 9bfd013603..8d0414a235 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -6247,7 +6247,14 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, // Webkit may sometimes get an odd rendering bug (white space // between header and body), see bug #3875. Running // overflow hack here to shake body element a bit. - Util.runWebkitOverflowAutoFix(scrollBodyPanel.getElement()); + // We must run the fix as a deferred command to prevent it from + // overwriting the scroll position with an outdated value, see + // #7606. + Scheduler.get().scheduleDeferred(new Command() { + public void execute() { + Util.runWebkitOverflowAutoFix(scrollBodyPanel.getElement()); + } + }); } /* -- cgit v1.2.3 From b18d9f7bb2419c947c8e0401fc7ee1b4f29e92cb Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Thu, 7 Jun 2012 10:58:10 +0000 Subject: Refactor ?debug detection (#8923) This fixes #8923 by not looking at the uri fragment at all. Also prevents e.g. ?nodebugwindow or ?mode=debug from opening the debug window. svn changeset:23898/svn branch:6.8 --- .../gwt/client/ApplicationConfiguration.java | 23 ++++--- .../com/vaadin/tests/debug/DebugWindowPresent.html | 72 +++++++++++++++++++++- 2 files changed, 84 insertions(+), 11 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index 21ecfe2776..c6d6bae80a 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -16,6 +16,7 @@ import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.JsArrayString; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Timer; +import com.google.gwt.user.client.Window; import com.vaadin.terminal.gwt.client.ui.VUnknownComponent; public class ApplicationConfiguration implements EntryPoint { @@ -496,12 +497,15 @@ public class ApplicationConfiguration implements EntryPoint { * * @return true if client side is currently been debugged */ - public native static boolean isDebugMode() + public static boolean isDebugMode() { + return isDebugAvailable() + && Window.Location.getParameter("debug") != null; + } + + private native static boolean isDebugAvailable() /*-{ if($wnd.vaadin.debug) { - var parameters = $wnd.location.search; - var re = /debug[^\/]*$/; - return re.test(parameters); + return true; } else { return false; } @@ -512,11 +516,10 @@ public class ApplicationConfiguration implements EntryPoint { * * @return true if debug logging should be quiet */ - public native static boolean isQuietDebugMode() - /*-{ - var uri = $wnd.location; - var re = /debug=q[^\/]*$/; - return re.test(uri); - }-*/; + public static boolean isQuietDebugMode() { + String debugParameter = Window.Location.getParameter("debug"); + return isDebugAvailable() && debugParameter != null + && debugParameter.startsWith("q"); + } } diff --git a/tests/testbench/com/vaadin/tests/debug/DebugWindowPresent.html b/tests/testbench/com/vaadin/tests/debug/DebugWindowPresent.html index d396c1778e..11640ef6c3 100644 --- a/tests/testbench/com/vaadin/tests/debug/DebugWindowPresent.html +++ b/tests/testbench/com/vaadin/tests/debug/DebugWindowPresent.html @@ -13,7 +13,17 @@ open - /run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug + /run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug&otherparam + + + + assertElementPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?debug&restartApplication @@ -31,6 +41,66 @@ vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&mode=debug + + + + assertElementNotPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?nodebug&restartApplication + + + + assertElementNotPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&nodebug + + + + assertElementNotPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug=quiet + + + + assertElementNotPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?debug=quiet&restartApplication + + + + assertElementNotPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + + + open + /run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug=quiet#/asdf + + + + assertElementNotPresent + vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0] + + -- cgit v1.2.3 From 0a7f33f1ff4611b738c5f96b0ec21b5c444e70ca Mon Sep 17 00:00:00 2001 From: Automerge Date: Thu, 7 Jun 2012 11:42:25 +0000 Subject: [merge from 6.7] #7607 updated test svn changeset:23902/svn branch:6.8 --- .../components/table/TestCurrentPageFirstItem.html | 37 +++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/testbench/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html b/tests/testbench/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html index ac06706aa5..451e9b9c8d 100644 --- a/tests/testbench/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html +++ b/tests/testbench/com/vaadin/tests/components/table/TestCurrentPageFirstItem.html @@ -3,7 +3,7 @@ - + TestCurrentPageFirstItem @@ -36,6 +36,41 @@ + + click + vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0] + + + + click + vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0] + + + + click + vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0] + + + + click + vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0] + + + + click + vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0] + + + + click + vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0] + + + + screenCapture + + + -- cgit v1.2.3