<inherits name="com.google.gwt.json.JSON" />
+ <inherits
+ name="com.vaadin.terminal.gwt.DefaultWidgetSetBrowserSpecificOverrides" />
+
<source path="client" />
<!-- Use own Scheduler implementation to be able to track if commands are
<when-type-is class="com.google.gwt.core.client.impl.SchedulerImpl" />
</replace-with>
+
+ <!-- Generators for serializators for classes used in communication between
+ server and client -->
<generate-with
class="com.vaadin.terminal.gwt.widgetsetutils.SerializerMapGenerator">
<when-type-is
class="com.vaadin.terminal.gwt.client.communication.RpcManager" />
</generate-with>
- <!-- Fall through to this rule for everything but IE -->
- <replace-with
- class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategy">
- <when-type-is
- class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategy" />
- </replace-with>
-
- <replace-with
- class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategyIE">
- <when-type-is
- class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategy" />
- <any>
- <when-property-is name="user.agent" value="ie6" />
- <when-property-is name="user.agent" value="ie8" />
- </any>
- </replace-with>
-
- <!-- Fall through to this rule for everything but IE -->
- <replace-with class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper">
- <when-type-is class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper" />
- </replace-with>
-
- <replace-with class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapperIE">
- <when-type-is class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper" />
- <any>
- <when-property-is name="user.agent" value="ie8" />
- </any>
- </replace-with>
-
- <!-- Workaround for #6682. Remove when fixed in GWT. -->
- <replace-with class="com.google.gwt.dom.client.VaadinDOMImplSafari">
- <when-type-is class="com.google.gwt.dom.client.DOMImpl" />
- <when-property-is name="user.agent" value="safari" />
- </replace-with>
-
<entry-point class="com.vaadin.terminal.gwt.client.ApplicationConfiguration" />
<!-- Use the new cross site linker to get a nocache.js without document.write -->
--- /dev/null
+<module>
+ <!-- This GWT module defines the browser specific overrides used by Vaadin -->
+
+ <!-- Hint for WidgetSetBuilder not to automatically update the file -->
+ <!-- WS Compiler: manually edited -->
+
+ <!-- Fall through to this rule for everything but IE -->
+ <replace-with
+ class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategy">
+ <when-type-is
+ class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategy" />
+ </replace-with>
+
+ <replace-with
+ class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategyIE">
+ <when-type-is
+ class="com.vaadin.terminal.gwt.client.ui.UploadIFrameOnloadStrategy" />
+ <any>
+ <when-property-is name="user.agent" value="ie8" />
+ </any>
+ </replace-with>
+
+ <!-- Fall through to this rule for everything but IE -->
+ <replace-with class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper">
+ <when-type-is class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper" />
+ </replace-with>
+
+ <replace-with class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapperIE">
+ <when-type-is class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper" />
+ <any>
+ <when-property-is name="user.agent" value="ie8" />
+ </any>
+ </replace-with>
+
+ <!-- Fall through to this rule for everything but IE -->
+ <replace-with class="com.vaadin.terminal.gwt.client.LayoutManager">
+ <when-type-is class="com.vaadin.terminal.gwt.client.LayoutManager" />
+ </replace-with>
+
+ <replace-with class="com.vaadin.terminal.gwt.client.LayoutManagerIE8">
+ <when-type-is class="com.vaadin.terminal.gwt.client.LayoutManager" />
+ <any>
+ <when-property-is name="user.agent" value="ie8" />
+ </any>
+ </replace-with>
+
+ <!-- Workaround for #6682. Remove when fixed in GWT. -->
+ <replace-with class="com.google.gwt.dom.client.VaadinDOMImplSafari">
+ <when-type-is class="com.google.gwt.dom.client.DOMImpl" />
+ <when-property-is name="user.agent" value="safari" />
+ </replace-with>
+
+</module>
private Set<ComponentConnector> zeroHeightComponents = null;
- private final LayoutManager layoutManager = new LayoutManager(this);
+ private final LayoutManager layoutManager;
- private final RpcManager rpcManager = GWT.create(RpcManager.class);
+ private final RpcManager rpcManager;
public ApplicationConnection() {
view = GWT.create(RootConnector.class);
+ rpcManager = GWT.create(RpcManager.class);
+ layoutManager = GWT.create(LayoutManager.class);
+ layoutManager.setConnection(this);
}
public void init(WidgetSet widgetSet, ApplicationConfiguration cnf) {
* The identifier for the event
* @return true if at least one listener has been registered on server side
* for the event identified by eventIdentifier.
- * @deprecated Use {@link ComponentState#hasEventListener(String)}
- * instead
+ * @deprecated Use {@link ComponentState#hasEventListener(String)} instead
*/
@Deprecated
public boolean hasEventListeners(ComponentConnector paintable,
public class LayoutManager {
private static final String LOOP_ABORT_MESSAGE = "Aborting layout after 100 passes. This would probably be an infinite loop.";
- private final ApplicationConnection connection;
+ private ApplicationConnection connection;
private final Set<Element> nonPaintableElements = new HashSet<Element>();
private final MeasuredSize nullSize = new MeasuredSize();
private boolean layoutRunning = false;
- public LayoutManager(ApplicationConnection connection) {
+ public void setConnection(ApplicationConnection connection) {
+ if (this.connection != null) {
+ throw new RuntimeException(
+ "LayoutManager connection can never be changed");
+ }
this.connection = connection;
}
}
}
- private static native void setMeasuredSize(Element element,
+ protected native void setMeasuredSize(Element element,
MeasuredSize measuredSize)
/*-{
if (measuredSize) {
return element.vMeasuredSize || defaultSize;
}-*/;
- private static final MeasuredSize getMeasuredSize(
- ComponentConnector paintable) {
+ private final MeasuredSize getMeasuredSize(ComponentConnector paintable) {
Element element = paintable.getWidget().getElement();
MeasuredSize measuredSize = getMeasuredSize(element, null);
if (measuredSize == null) {
--- /dev/null
+package com.vaadin.terminal.gwt.client;
+
+import com.google.gwt.dom.client.Element;
+
+public class LayoutManagerIE8 extends LayoutManager {
+
+ @Override
+ protected native void setMeasuredSize(Element element,
+ MeasuredSize measuredSize)
+ // IE8 cannot do delete element.vMeasuredSize, at least in the case when
+ // element is not attached to the document (e.g. when a caption is removed)
+ /*-{
+ if (measuredSize) {
+ element.vMeasuredSize = measuredSize;
+ } else {
+ element.vMeasuredSize = undefined;
+ }
+ }-*/;
+
+}