Revision: 9569
Author: [email protected]
Date: Wed Jan 19 06:51:52 2011
Log: Rolling back IE bugfix for IFrames due to failed ImageTest
*** Original change description ***
Fix bug on IE where onload events don't fire for IFrames.
This is a bugfix for
http://code.google.com/p/google-web-toolkit/issues/detail?id=1720
Review at http://gwt-code-reviews.appspot.com/1294801
http://code.google.com/p/google-web-toolkit/source/detail?r=9569
Deleted:
/trunk/user/test/com/google/gwt/dom/public-test/iframetest.html
Modified:
/trunk/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java
/trunk/user/test/com/google/gwt/dom/client/FrameTests.java
=======================================
--- /trunk/user/test/com/google/gwt/dom/public-test/iframetest.html Wed Jan
19 05:47:41 2011
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
-IFRAME TEST
-</body>
-</html>
=======================================
--- /trunk/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java Wed
Jan 19 05:47:41 2011
+++ /trunk/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java Wed
Jan 19 06:51:52 2011
@@ -30,9 +30,6 @@
@SuppressWarnings("unused")
private static JavaScriptObject callDispatchDblClickEvent;
- @SuppressWarnings("unused")
- private static JavaScriptObject callDispatchOnLoadEvent;
-
@SuppressWarnings("unused")
private static JavaScriptObject callDispatchUnhandledEvent;
@@ -171,14 +168,11 @@
$wnd['__gwt_dispatchEvent_' + moduleName] = dispatchEvent;
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchEvent =
new Function('w',
'return function() { w.__gwt_dispatchEvent_' + moduleName
+ '.call(this) }')($wnd);
-
-
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchOnLoadEvent =
new Function('w',
- 'return function() { w.__gwt_dispatchEvent_' + moduleName
+ '.call(w.event.srcElement) }')($wnd);
-
+
$wnd['__gwt_dispatchDblClickEvent_' + moduleName] =
dispatchDblClickEvent;
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchDblClickEvent
= new Function('w',
'return function() { w.__gwt_dispatchDblClickEvent_' + moduleName
+ '.call(this)}')($wnd);
-
+
$wnd['__gwt_dispatchUnhandledEvent_' + moduleName] =
dispatchUnhandledEvent;
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchUnhandledEvent
= new Function('w',
'return function() { w.__gwt_dispatchUnhandledEvent_' + moduleName
+ '.call(this)}')($wnd);
@@ -274,13 +268,8 @@
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchEvent : null;
if (chMask & 0x04000) elem.onscroll = (bits & 0x04000) ?
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchEvent : null;
- if (chMask & 0x08000) {
- if (bits & 0x08000) {
- elem.attachEvent('onload',
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchOnLoadEvent);
- } else {
- elem.detachEvent('onload',
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchOnLoadEvent);
- }
- }
+ if (chMask & 0x08000) elem.onload = (bits & 0x08000) ?
+
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchUnhandledEvent :
null;
if (chMask & 0x10000) elem.onerror = (bits & 0x10000) ?
@com.google.gwt.user.client.impl.DOMImplTrident::callDispatchEvent : null;
if (chMask & 0x20000) elem.onmousewheel = (bits & 0x20000) ?
=======================================
--- /trunk/user/test/com/google/gwt/dom/client/FrameTests.java Wed Jan 19
05:47:41 2011
+++ /trunk/user/test/com/google/gwt/dom/client/FrameTests.java Wed Jan 19
06:51:52 2011
@@ -16,14 +16,12 @@
package com.google.gwt.dom.client;
import com.google.gwt.junit.client.GWTTestCase;
-import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.ui.Frame;
-import com.google.gwt.user.client.ui.RootPanel;
/**
* Tests for the FrameElement and IFrameElement classes.
*/
public class FrameTests extends GWTTestCase {
+
@Override
public String getModuleName() {
return "com.google.gwt.dom.DOMTest";
@@ -36,23 +34,4 @@
doc.getBody().appendChild(iframe);
assertNotNull(iframe.getContentDocument());
}
-
- public void testOnloadEventFires() {
- int delayMillis = 3000;
- delayTestFinish(delayMillis);
-
- Frame frame = new Frame() {
- @Override
- public void onBrowserEvent(Event event) {
- if (event.getTypeInt() == Event.ONLOAD) {
- super.onBrowserEvent(event);
- finishTest();
- }
- }
- };
-
- frame.sinkEvents(Event.ONLOAD);
- frame.setUrl("iframetest.html");
- RootPanel.get().add(frame);
- }
-}
+}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors