diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-06-12 17:15:41 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2012-06-12 17:15:41 +0300 |
commit | 71885e3e12ded7c37771bf9a3bda7edd337f64f7 (patch) | |
tree | 2863be19f5fac75317384f34321552409e96dbd3 | |
parent | e50fe89ae72caf70e73c42a570a2b6892fb1a893 (diff) | |
parent | 0a7f33f1ff4611b738c5f96b0ec21b5c444e70ca (diff) | |
download | vaadin-framework-71885e3e12ded7c37771bf9a3bda7edd337f64f7.tar.gz vaadin-framework-71885e3e12ded7c37771bf9a3bda7edd337f64f7.zip |
Merge commit '0a7f33'
Conflicts:
src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
4 files changed, 131 insertions, 13 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index 244f310c1a..aee2b13e0e 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -18,6 +18,7 @@ import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; 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.UnknownComponentConnector; public class ApplicationConfiguration implements EntryPoint { @@ -346,6 +347,7 @@ public class ApplicationConfiguration implements EntryPoint { */ public static void startApplication(final String applicationId) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { + @Override public void execute() { ApplicationConfiguration appConf = getConfigFromDOM(applicationId); ApplicationConnection a = GWT @@ -551,6 +553,7 @@ public class ApplicationConfiguration implements EntryPoint { private static DeferredWidgetLoader deferredWidgetLoader; + @Override public void onModuleLoad() { // Prepare VConsole for debugging @@ -568,6 +571,7 @@ public class ApplicationConfiguration implements EntryPoint { * GWT hosted mode. */ GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + @Override public void onUncaughtException(Throwable e) { /* * Note in case of null console (without ?debug) we eat @@ -602,12 +606,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; } @@ -618,12 +625,11 @@ public class ApplicationConfiguration implements EntryPoint { * * @return <code>true</code> 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"); + } /** * Checks whether information from the web browser (e.g. uri fragment and diff --git a/src/com/vaadin/terminal/gwt/client/ui/table/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/table/VScrollTable.java index 2d046347ed..299bb7e815 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/table/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/table/VScrollTable.java @@ -5957,7 +5957,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // 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()); + } + }); } /* 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 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://selenium-ide.openqa.org/profiles/test-case"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link rel="selenium.base" href="" /> +<link rel="selenium.base" href="http://localhost:8067/" /> <title>TestCurrentPageFirstItem</title> </head> <body> @@ -36,6 +36,41 @@ <td></td> <td></td> </tr> +<tr> + <td>click</td> + <td>vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runTestCurrentPageFirstItem::/VHorizontalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td></td> +</tr> </tbody></table> </body> 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 @@ </thead><tbody> <tr> <td>open</td> - <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug&otherparam</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?debug&restartApplication</td> <td></td> </tr> <tr> @@ -31,6 +41,66 @@ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> <td></td> </tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&mode=debug</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?nodebug&restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&nodebug</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug=quiet</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?debug=quiet&restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug=quiet#/asdf</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td> + <td></td> +</tr> </tbody></table> </body> </html> |