Revision: 8339
Author: [email protected]
Date: Wed Jun 30 06:04:21 2010
Log: Second attempted fix for issue 4532. This time, we revert the IE7 layout
implementation back all the way to IE6. IE7's just too quirky to rely
directly on its implementation of top/left/right/bottom/width/height CSS
layout.

Review at http://gwt-code-reviews.appspot.com/628802

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=8339

Modified:
 /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
 /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java

=======================================
--- /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE6.java Wed Mar 3 05:43:42 2010 +++ /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE6.java Wed Jun 30 06:04:21 2010
@@ -59,10 +59,6 @@
     });
   }

-  private static native boolean isIE6() /*-{
-    return @com.google.gwt.dom.client.DOMImplIE6::isIE6()();
-  }-*/;
-
   @SuppressWarnings("unused") // called from JSNI
   private static native void measureDecoration(Element elem) /*-{
     var ruler = elem.__styleRuler;
@@ -119,10 +115,6 @@

   @Override
public Element attachChild(Element parent, Element child, Element before) {
-    if (!isIE6()) {
-      return super.attachChild(parent, child, before);
-    }
-
     DivElement container = Document.get().createDivElement();
     container.appendChild(child);

@@ -145,21 +137,11 @@

   @Override
   public void fillParent(Element elem) {
-    if (!isIE6()) {
-      super.fillParent(elem);
-      return;
-    }
-
     fillParentImpl(elem);
   }

   @Override
   public void finalizeLayout(Element parent) {
-    if (!isIE6()) {
-      super.finalizeLayout(parent);
-      return;
-    }
-
     resizeRelativeToParent(parent);
     resizeHandler(parent, true);
   }
@@ -167,40 +149,28 @@
   @Override
   public void initParent(Element parent) {
     super.initParent(parent);
-
-    if (isIE6()) {
-      setPropertyElement(parent, "__styleRuler", createStyleRuler(parent));
-    }
+    setPropertyElement(parent, "__styleRuler", createStyleRuler(parent));
   }

   @Override
   public void layout(Layer layer) {
-    if (!isIE6()) {
-      super.layout(layer);
-      return;
-    }
-
     Element elem = layer.getContainerElement();
     setLayer(elem, layer);
   }

   @Override
   public void onAttach(Element parent) {
-    if (isIE6()) {
-      // No need to re-connect layer refs. This will be taken care of
-      // automatically in layout().
-      initResizeHandler(parent);
-      initUnitChangeHandler(parent, relativeRuler);
-    }
+    // No need to re-connect layer refs. This will be taken care of
+    // automatically in layout().
+    initResizeHandler(parent);
+    initUnitChangeHandler(parent, relativeRuler);
   }

   @Override
   public void onDetach(Element parent) {
-    if (isIE6()) {
-      removeLayerRefs(parent);
-      removeResizeHandler(parent);
-      removeUnitChangeHandler(relativeRuler);
-    }
+    removeLayerRefs(parent);
+    removeResizeHandler(parent);
+    removeUnitChangeHandler(relativeRuler);
   }

   private native void fillParentImpl(Element elem) /*-{
=======================================
--- /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java Tue Nov 10 10:16:43 2009 +++ /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java Wed Jun 30 06:04:21 2010
@@ -28,6 +28,7 @@
  */
 public class LayoutImplIE8 extends LayoutImpl {

+  @Override
   public void layout(Layer layer) {
     Style style = layer.container.getStyle();

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to