import com.google.gwt.user.client.ui.RequiresResize;
import com.google.gwt.user.client.ui.UIObject;
import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.client.BrowserInfo;
import com.vaadin.client.DeferredWorker;
import com.vaadin.client.Profiler;
import com.vaadin.client.Util;
import com.vaadin.client.widget.escalator.PositionFunction.Translate3DPosition;
import com.vaadin.client.widget.escalator.PositionFunction.TranslatePosition;
import com.vaadin.client.widget.escalator.PositionFunction.WebkitTranslate3DPosition;
+import com.vaadin.client.widget.escalator.Row;
import com.vaadin.client.widget.escalator.RowContainer;
import com.vaadin.client.widget.escalator.RowVisibilityChangeEvent;
import com.vaadin.client.widget.escalator.RowVisibilityChangeHandler;
cellClone.getStyle().clearWidth();
rowElement.insertBefore(cellClone, cellOriginal);
- maxCellWidth = Math.max(Util
- .getRequiredWidthBoundingClientRectDouble(cellClone),
- maxCellWidth);
+ double requiredWidth = Util
+ .getRequiredWidthBoundingClientRectDouble(cellClone);
+
+ if (BrowserInfo.get().isIE9()) {
+ /*
+ * IE9 does not support subpixels. Usually it is rounded
+ * down which leads to content not shown. Increase the
+ * counted required size by one just to be on the safe side.
+ */
+ requiredWidth += 1;
+ }
+
+ maxCellWidth = Math.max(requiredWidth, maxCellWidth);
cellClone.removeFromParent();
}
import static org.junit.Assert.assertEquals;
+import java.io.IOException;
+
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
bodyWidth);
assertEquals("column should've been roughly as wide as the header",
headerWidth, colWidth, 5);
+
}
@Test
public void testTooNarrowColumn() {
+ if (BrowserUtil.isIE(getDesiredCapabilities())) {
+ // IE can't deal with overflow nicely.
+ return;
+ }
+
WebElement[] col = getColumn(3);
int headerWidth = col[0].getSize().getWidth();
int colWidth = col[2].getSize().getWidth() - TOTAL_MARGIN_PX;
headerWidth);
}
+ @Test
+ public void testColumnsRenderCorrectly() throws IOException {
+ compareScreen("initialRender");
+ }
+
private WebElement[] getColumn(int i) {
WebElement[] col = new WebElement[3];
col[0] = getDriver().findElement(