summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2011-12-22 16:00:52 +0200
committerHenri Sara <hesara@vaadin.com>2011-12-22 16:00:52 +0200
commitc6cc203ec360f9efbfb116029ca855a28c7bfa63 (patch)
tree8448edb2b703462edda6120ce888531cdba6710c
parent227941bc6248fd4fb70bba3255d3920c3737a1f8 (diff)
parent02daee926e0bb40bcd8a321a2a27570da5c9c928 (diff)
downloadvaadin-framework-c6cc203ec360f9efbfb116029ca855a28c7bfa63.tar.gz
vaadin-framework-c6cc203ec360f9efbfb116029ca855a28c7bfa63.zip
Merge remote branch 'origin/6.8'
Conflicts: tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java
-rw-r--r--WebContent/VAADIN/themes/chameleon/components/button/button.css4
-rw-r--r--WebContent/release-notes.html12
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java18
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VWindow.java18
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java8
-rw-r--r--src/com/vaadin/terminal/gwt/server/WebBrowser.java8
-rw-r--r--src/com/vaadin/ui/Window.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java31
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java65
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/TableHeaderZoom.java32
10 files changed, 176 insertions, 24 deletions
diff --git a/WebContent/VAADIN/themes/chameleon/components/button/button.css b/WebContent/VAADIN/themes/chameleon/components/button/button.css
index 6629cfeb1e..1dffddb4c2 100644
--- a/WebContent/VAADIN/themes/chameleon/components/button/button.css
+++ b/WebContent/VAADIN/themes/chameleon/components/button/button.css
@@ -163,7 +163,7 @@ body.v-ie .v-pressed.v-button-borderless {
font-weight: normal;
text-shadow: none;
border: none;
- padding: 1px;
+ margin: 1px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
@@ -254,4 +254,4 @@ body.v-ie .v-pressed.v-button-borderless .v-button-wrap {
.v-button-icon-only .v-icon {
margin-right: -.5em;
- } \ No newline at end of file
+ }
diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html
index 6c26efd791..2fe8083556 100644
--- a/WebContent/release-notes.html
+++ b/WebContent/release-notes.html
@@ -469,6 +469,8 @@
<li>Liferay Portal 5.2-6.0</li>
<li>GateIn Portal 3.1</li>
<li>eXo Platform 3</li>
+ <li>Oracle WebLogic&reg; Portal 10gR3</li>
+ <li>WebSphere Portal 6.1-7.0</li>
</ul>
<p>
Vaadin also supports <b>Google App Engine</b>.
@@ -485,6 +487,16 @@
<li>Google Chrome 13-15</li>
</ul>
+ <p>
+ Vaadin supports the built-in browsers in the following <b>mobile operating
+ systems</b>:
+ </p>
+
+ <ul>
+ <li>iOS 4-5</li>
+ <li>Android 2-3</li>
+ </ul>
+
<h2 id="vaadinontheweb">Vaadin on the Web</h2>
<p>
<ul>
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index 58d0fd12aa..c830744edd 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -4045,7 +4045,20 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (reactLastRow >= totalRows) {
reactLastRow = totalRows - 1;
}
- if (lastRendered < reactLastRow) {
+ if (lastRendered < reactFirstRow || firstRendered > reactLastRow) {
+ /*
+ * #8040 - scroll position is completely changed since the
+ * latest request, so request a new set of rows.
+ *
+ * TODO: We should probably check whether the fetched rows match
+ * the current scroll position right when they arrive, so as to
+ * not waste time rendering a set of rows that will never be
+ * visible...
+ */
+ rowRequestHandler.setReqFirstRow(reactFirstRow);
+ rowRequestHandler.setReqRows(reactLastRow - reactFirstRow + 1);
+ rowRequestHandler.deferRowFetch(1);
+ } else if (lastRendered < reactLastRow) {
// get some cache rows below visible area
rowRequestHandler.setReqFirstRow(lastRendered + 1);
rowRequestHandler.setReqRows(reactLastRow - lastRendered);
@@ -6642,8 +6655,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (BrowserInfo.get().isIE()) {
// IE sometimes moves focus to a clicked table cell...
Element focusedElement = Util.getIEFocusedElement();
- if (getElement().isOrHasChild(focusedElement)) {
+ if (Util.getPaintableForElement(client, getParent(), focusedElement) == this) {
// ..in that case, steal the focus back to the focus handler
+ // but not if focus is in a child component instead (#7965)
focus();
return;
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
index 6ac594bc96..e6f3312976 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
@@ -1015,9 +1015,9 @@ public class VWindow extends VOverlay implements Container,
* the browser to compute it based on the window contents.
*/
public void setHeight(String height) {
- if (!isAttached() || (height == null
- ? this.height == null
- : height.equals(this.height))) {
+ if (!isAttached()
+ || (height == null ? this.height == null : height
+ .equals(this.height))) {
return;
}
if (height == null || "".equals(height)) {
@@ -1029,17 +1029,17 @@ public class VWindow extends VOverlay implements Container,
renderSpace.setHeight(MIN_CONTENT_AREA_HEIGHT);
} else {
getElement().getStyle().setProperty("height", height);
- int contentHeight =
- getElement().getOffsetHeight() - getExtraHeight();
+ int contentHeight = getElement().getOffsetHeight()
+ - getExtraHeight();
if (contentHeight < MIN_CONTENT_AREA_HEIGHT) {
contentHeight = MIN_CONTENT_AREA_HEIGHT;
int rootHeight = contentHeight + getExtraHeight();
- getElement().getStyle().setProperty(
- "height", rootHeight + "px");
+ getElement().getStyle()
+ .setProperty("height", rootHeight + "px");
}
renderSpace.setHeight(contentHeight);
- contentPanel.getElement().getStyle().setProperty(
- "height", contentHeight + "px");
+ contentPanel.getElement().getStyle()
+ .setProperty("height", contentHeight + "px");
}
this.height = height;
updateShadowSizeAndPosition();
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
index 83a6a807e3..70d7436e1d 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
@@ -797,7 +797,13 @@ public abstract class AbstractCommunicationManager implements
Component p = (Component) it.next();
if (p.getApplication() == null) {
unregisterPaintable(p);
- idPaintableMap.remove(paintableIdMap.get(p));
+ // Take into account that some other component may have
+ // reused p's ID by now (this can happen when manually
+ // assigning IDs with setDebugId().) See #8090.
+ String pid = paintableIdMap.get(p);
+ if (idPaintableMap.get(pid) == p) {
+ idPaintableMap.remove(pid);
+ }
it.remove();
dirtyPaintables.remove(p);
}
diff --git a/src/com/vaadin/terminal/gwt/server/WebBrowser.java b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
index 3d9540adad..358f6f38fb 100644
--- a/src/com/vaadin/terminal/gwt/server/WebBrowser.java
+++ b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
@@ -66,7 +66,10 @@ public class WebBrowser implements Terminal {
}
/**
- * Gets the height of the client (browser window)
+ * Gets the height of the client (browser window).
+ * <p>
+ * Note that the client size is only updated on a full repaint, not when the
+ * browser window size changes
*
* @return The height of the client or 0 if unknown.
*/
@@ -76,6 +79,9 @@ public class WebBrowser implements Terminal {
/**
* Gets the width of the client (browser window)
+ * <p>
+ * Note that the client size is only updated on a full repaint, not when the
+ * browser window size changes
*
* @return The width of the client or 0 if unknown.
*/
diff --git a/src/com/vaadin/ui/Window.java b/src/com/vaadin/ui/Window.java
index 46e16eb986..a860d371b0 100644
--- a/src/com/vaadin/ui/Window.java
+++ b/src/com/vaadin/ui/Window.java
@@ -460,7 +460,9 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier {
*
* For a browser level window the CloseListener is fired when the browser
* level window is closed. Note that closing a browser level window does not
- * mean it will be destroyed.
+ * mean it will be destroyed. Also note that Opera does not send events like
+ * all other browsers and therefore the close listener might not be called
+ * if Opera is used.
*
* <p>
* Since Vaadin 6.5, removing windows using {@link #removeWindow(Window)}
diff --git a/tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java b/tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java
index bf98c83585..b9a2307aff 100644
--- a/tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java
+++ b/tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java
@@ -5,6 +5,7 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.themes.BaseTheme;
public class ButtonsInHorizontalLayout extends AbstractTestCase {
@@ -12,16 +13,30 @@ public class ButtonsInHorizontalLayout extends AbstractTestCase {
public void init() {
VerticalLayout content = new VerticalLayout();
content.setMargin(true);
+ content.setSpacing(true);
+
+ content.addComponent(createButtonLayout(null));
+ content.addComponent(createButtonLayout(BaseTheme.BUTTON_LINK));
+
+ setMainWindow(new LegacyWindow("", content));
+ }
+
+ private HorizontalLayout createButtonLayout(String style) {
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
- layout.addComponent(new Button(
- "Look at me in IE7 or IE8 in compatibility mode"));
- layout.addComponent(new Button(
- "Look at me in IE7 or IE8 in compatibility mode"));
- layout.addComponent(new Button(
- "Look at me in IE7 or IE8 in compatibility mode"));
- content.addComponent(layout);
- setMainWindow(new LegacyWindow("", content));
+ layout.addComponent(createButton(style));
+ layout.addComponent(createButton(style));
+ layout.addComponent(createButton(style));
+ return layout;
+ }
+
+ private Button createButton(String style) {
+ Button button = new Button(
+ "Look at me in IE7 or IE8 in compatibility mode");
+ if (style != null && style.length() != 0) {
+ button.setStyleName(style);
+ }
+ return button;
}
@Override
diff --git a/tests/testbench/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java b/tests/testbench/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java
new file mode 100644
index 0000000000..85b5d3b7f7
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java
@@ -0,0 +1,65 @@
+package com.vaadin.tests.components.table;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.vaadin.data.util.BeanItemContainer;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.Person;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Root.LegacyWindow;
+import com.vaadin.ui.Table;
+
+public class ScrollCausesRequestLoop extends TestBase {
+
+ @Override
+ protected void setup() {
+ setMainWindow(new LegacyWindow("", new TestView()));
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Scrolling a table causes an infinite loop of UIDL requests in some cases";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 8040;
+ }
+
+ private static class TestView extends HorizontalLayout {
+
+ TestView() {
+ Table table = new Table();
+ List<Person> data = createData();
+ BeanItemContainer<Person> container = new BeanItemContainer<Person>(
+ Person.class, data) {
+
+ @Override
+ public Person getIdByIndex(int index) {
+ try {
+ // Simulate some loading delay with some exaggeration
+ // to make easier to reproduce
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new RuntimeException(e);
+ }
+ return super.getIdByIndex(index);
+ }
+ };
+ table.setContainerDataSource(container);
+ addComponent(table);
+ }
+ }
+
+ private static List<Person> createData() {
+ int count = 500;
+ List<Person> data = new ArrayList<Person>(count);
+ for (int i = 0; i < count; i++) {
+ data.add(new Person("Person", "" + i, "Email", "Phone", "Street",
+ 12345, "City"));
+ }
+ return data;
+ }
+}
diff --git a/tests/testbench/com/vaadin/tests/components/table/TableHeaderZoom.java b/tests/testbench/com/vaadin/tests/components/table/TableHeaderZoom.java
new file mode 100644
index 0000000000..8540e39c8c
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/table/TableHeaderZoom.java
@@ -0,0 +1,32 @@
+package com.vaadin.tests.components.table;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Root.LegacyWindow;
+import com.vaadin.ui.Table;
+
+public class TableHeaderZoom extends TestBase {
+
+ @Override
+ protected void setup() {
+ Table table = new Table();
+ table.setHeight("100px");
+ table.setWidth("200px");
+ table.setEnabled(false);
+ table.addContainerProperty("Column 1", String.class, "");
+
+ LegacyWindow main = getMainWindow();
+ main.setContent(new CssLayout());
+ main.addComponent(table);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Table header text/icon disappears when zooming out";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 6870;
+ }
+}