[gwt-contrib] [google-web-toolkit] r6257 committed - Merge through tr...@6249
Revision: 6257 Author: rj...@google.com Date: Tue Sep 29 18:36:34 2009 Log: Merge through tr...@6249 http://code.google.com/p/google-web-toolkit/source/detail?r=6257 Modified: /branches/farewellSwt /branches/farewellSwt/branch-info.txt /branches/farewellSwt/dev/core/src/com/google/gwt/core/ext/ServletContainer.java /branches/farewellSwt/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerDisableAggressiveOptimization.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerEnableAssertions.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerOutDir.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirOptional.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirRequired.java /branches/farewellSwt/dev/core/test/com/google/gwt/dev/AboutTest.java /branches/farewellSwt/distro-source/mac/src/webAppCreator /branches/farewellSwt/eclipse/samples/Hello/Hello-gwtc.launch /branches/farewellSwt/samples/dynatable/war/DynaTable.css /branches/farewellSwt/samples/dynatable/war/DynaTable.html /branches/farewellSwt/samples/hello/war/Hello.html /branches/farewellSwt/samples/i18n/war/I18N.css /branches/farewellSwt/samples/i18n/war/I18N.html /branches/farewellSwt/samples/json/war/JSON.css /branches/farewellSwt/samples/json/war/JSON.html /branches/farewellSwt/samples/mail/war/Mail.css /branches/farewellSwt/samples/mail/war/Mail.html /branches/farewellSwt/samples/mail/war/gradient.gif /branches/farewellSwt/samples/mail/war/leftCorner.gif /branches/farewellSwt/samples/mail/war/rightCorner.gif /branches/farewellSwt/samples/showcase/war/Showcase.html /branches/farewellSwt/samples/simplerpc/war/SimpleRPC.css /branches/farewellSwt/samples/simplerpc/war/SimpleRPC.html /branches/farewellSwt/samples/simplexml/war/SimpleXML.css /branches/farewellSwt/samples/simplexml/war/SimpleXML.html /branches/farewellSwt/user/src/com/google/gwt/core/client/HttpThrowableReporter.java /branches/farewellSwt/user/src/com/google/gwt/core/client/JsonUtils.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/HandlesAllFocusEvents.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/HandlesAllKeyEvents.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/HandlesAllMouseEvents.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/KeyCodes.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/PrivateMap.java /branches/farewellSwt/user/src/com/google/gwt/event/logical/shared/HasValueChangeHandlers.java /branches/farewellSwt/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java /branches/farewellSwt/user/src/com/google/gwt/event/logical/shared/ValueChangeHandler.java /branches/farewellSwt/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java /branches/farewellSwt/user/src/com/google/gwt/event/shared/GwtEvent.java /branches/farewellSwt/user/src/com/google/gwt/event/shared/HandlerRegistration.java /branches/farewellSwt/user/src/com/google/gwt/resources /branches/farewellSwt/user/src/com/google/gwt/resources/client/ClientBundle.java /branches/farewellSwt/user/src/com/google/gwt/resources/ext/ClientBundleFields.java /branches/farewellSwt/user/src/com/google/gwt/resources/ext/ClientBundleRequirements.java /branches/farewellSwt/user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java /branches/farewellSwt/user/src/com/google/gwt/resources/rebind/context/InlineClientBundleGenerator.java /branches/farewellSwt/user/src/com/google/gwt/resources/rebind/context/StaticClientBundleGenerator.java /branches/farewellSwt/user/src/com/google/gwt/user/RemoteServiceObfuscateTypeNames.gwt.xml /branches/farewellSwt/user/src/com/google/gwt/user/client/ui/ListenerWrapper.java /branches/farewellSwt/user/src/com/google/gwt/user/rebind/StringSourceWriter.java /branches/farewellSwt/user/src/com/google/gwt/user/tools/WebAppCreator.java /branches/farewellSwt/user/test/com/google/gwt/core/client/HttpThrowableReporterTest.java /branches/farewellSwt/user/test/com/google/gwt/dev/jjs/test/jsoimpls/UnreferencedImplOfJsoInterface.java /branches/farewellSwt/user/test/com/google/gwt/dev/jjs/test/jsointfs/JsoInterfaceWithUnreferencedImpl.java /branches/farewellSwt/user/test/com/google/gwt/event/dom/client/DomEventTest.java /branches/farewellSwt/user/test/com/google/gwt/event/logical/shared/LogicalEventsTest.java /branches/farewellSwt/user/test/com/google/gwt/http/client/RequestBuilderTest.java /branches/farewellSwt/user/test/com/google/gwt/junit/NonGwtTestSuite.java /branches/farewellSwt/us
[gwt-contrib] Restore UiBinder's JRE tests
Reviewers: fabbott, Message: Freeland, could you take this? They tests bits of UiBinder's JRE code. The tests themselves have already been reviewed, what's new is how they're stitched into the GWT build. I had trouble introducing them before due to weak ant fu, I think. In fact, my ant fu is still weak. See the classpath changes to eclipse/user/.classpath? Where do I make the same changes to user/build.xml? Please review this at http://gwt-code-reviews.appspot.com/72805 Affected files: M eclipse/user/.classpath M user/src/com/google/gwt/uibinder/rebind/MortalLogger.java A user/test/com/google/gwt/uibinder/UiBinderJreSuite.java A user/test/com/google/gwt/uibinder/rebind/HandlerEvaluatorTest.java A user/test/com/google/gwt/uibinder/rebind/JClassTypeAdapter.java A user/test/com/google/gwt/uibinder/rebind/model/OwnerClassTest.java A user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java A user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldTest.java --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6256 committed - IE plugin now uses the current thread ID as a proxy for tab ID....
Revision: 6256 Author: sco...@google.com Date: Tue Sep 29 16:01:10 2009 Log: IE plugin now uses the current thread ID as a proxy for tab ID. This seems to work well for IE6 and IE7. Still need to test IE8. Review by: jat (desk) http://code.google.com/p/google-web-toolkit/source/detail?r=6256 Modified: /branches/farewellSwt/plugins/ie/oophm/oophm/plugin.cpp /branches/farewellSwt/plugins/ie/prebuilt/oophm.dll === --- /branches/farewellSwt/plugins/ie/oophm/oophm/plugin.cpp Thu Sep 3 15:22:56 2009 +++ /branches/farewellSwt/plugins/ie/oophm/oophm/plugin.cpp Tue Sep 29 16:01:10 2009 @@ -92,7 +92,12 @@ return S_OK; } - std::string tabKey = ""; // TODO(jat): add support for tab identity + // Use the current thread ID as a proxy for tab ID. + DWORD threadId = GetCurrentThreadId(); + char buf[20]; + snprintf(buf, sizeof(buf), "%lu", threadId); + std::string tabKey = buf; + std::string sessionKey = BSTRToUTF8(bsessionKey); std::string moduleName = BSTRToUTF8(bmoduleName); IOmNavigator* navigator; === --- /branches/farewellSwt/plugins/ie/prebuilt/oophm.dll Tue Sep 29 15:51:30 2009 +++ /branches/farewellSwt/plugins/ie/prebuilt/oophm.dll Tue Sep 29 16:01:10 2009 Binary file, no diff available. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6255 committed - Fix IE-plugin build on other build configs; was missing include direct...
Revision: 6255 Author: sco...@google.com Date: Tue Sep 29 16:00:43 2009 Log: Fix IE-plugin build on other build configs; was missing include directories. Review by: jat (desk) http://code.google.com/p/google-web-toolkit/source/detail?r=6255 Modified: /branches/farewellSwt/plugins/ie/oophm/oophm/oophm.vcproj === --- /branches/farewellSwt/plugins/ie/oophm/oophm/oophm.vcproj Thu Sep 17 15:13:42 2009 +++ /branches/farewellSwt/plugins/ie/oophm/oophm/oophm.vcproj Tue Sep 29 16:00:43 2009 @@ -56,7 +56,7 @@ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6254 committed - Setting svn:executable on IE plugins....
Revision: 6254 Author: sco...@google.com Date: Tue Sep 29 15:51:30 2009 Log: Setting svn:executable on IE plugins. Review by: jat (desk) http://code.google.com/p/google-web-toolkit/source/detail?r=6254 Modified: /branches/farewellSwt/plugins/ie/prebuilt/oophm.dll /branches/farewellSwt/plugins/ie/prebuilt/oophm64.dll === --- /branches/farewellSwt/plugins/ie/prebuilt/oophm.dll Fri Sep 4 15:16:50 2009 +++ /branches/farewellSwt/plugins/ie/prebuilt/oophm.dll Tue Sep 29 15:51:30 2009 Binary file, no diff available. === --- /branches/farewellSwt/plugins/ie/prebuilt/oophm64.dll Fri Sep 4 15:16:50 2009 +++ /branches/farewellSwt/plugins/ie/prebuilt/oophm64.dll Tue Sep 29 15:51:30 2009 Binary file, no diff available. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Firefox 3.5 allows cross site XHRs
On 2009/09/29 19:07:57, jlabanca wrote: > You can read through this doc for details: > https://developer.mozilla.org/En/HTTP_access_control [...] > Its a feature, not a bug. FireFox has adopted a new proposed standard where its > up to the server to determine which origins can access the content. I've been told that Safari 4 also implements CORS: http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/ And WFIW, these tests pass in Chrome 4 too: http://arunranga.com/examples/access-control/ Note that hacks.mozilla.org suggests a capability detection (xhr.withCredentials !== undefined or "withCredentials" in xhr) > At some point, we should setup a publicly visible server that always denies > cross site requests. It would be helpful to us and others. Isn't it the case by default for any server? (since allowing –for the script– a cross-origin request is signaled by a specific header) Or were you rather thinking about a server that checks the Origin request-header and replies with a 403 or similar? Oh, and BTW, see also http://tools.ietf.org/html/draft-abarth-origin (its more about CSRF mitigation, but still useful to know about it, given that it also defines an Origina request header) http://gwt-code-reviews.appspot.com/73802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6253 committed - Merge through tr...@6239
Revision: 6253 Author: rj...@google.com Date: Tue Sep 29 15:03:56 2009 Log: Merge through tr...@6239 http://code.google.com/p/google-web-toolkit/source/detail?r=6253 Modified: /branches/farewellSwt /branches/farewellSwt/branch-info.txt /branches/farewellSwt/dev/core/src/com/google/gwt/core/ext/ServletContainer.java /branches/farewellSwt/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/jjs/impl/JavaScriptObjectNormalizer.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerDisableAggressiveOptimization.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerEnableAssertions.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerOutDir.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirOptional.java /branches/farewellSwt/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirRequired.java /branches/farewellSwt/dev/core/test/com/google/gwt/dev/AboutTest.java /branches/farewellSwt/distro-source/core/src/release_notes.html /branches/farewellSwt/distro-source/mac/src/webAppCreator /branches/farewellSwt/eclipse/samples/Hello/Hello-gwtc.launch /branches/farewellSwt/samples/dynatable/war/DynaTable.css /branches/farewellSwt/samples/dynatable/war/DynaTable.html /branches/farewellSwt/samples/hello/war/Hello.html /branches/farewellSwt/samples/i18n/war/I18N.css /branches/farewellSwt/samples/i18n/war/I18N.html /branches/farewellSwt/samples/json/war/JSON.css /branches/farewellSwt/samples/json/war/JSON.html /branches/farewellSwt/samples/mail/war/Mail.css /branches/farewellSwt/samples/mail/war/Mail.html /branches/farewellSwt/samples/mail/war/gradient.gif /branches/farewellSwt/samples/mail/war/leftCorner.gif /branches/farewellSwt/samples/mail/war/rightCorner.gif /branches/farewellSwt/samples/showcase/war/Showcase.html /branches/farewellSwt/samples/simplerpc/war/SimpleRPC.css /branches/farewellSwt/samples/simplerpc/war/SimpleRPC.html /branches/farewellSwt/samples/simplexml/war/SimpleXML.css /branches/farewellSwt/samples/simplexml/war/SimpleXML.html /branches/farewellSwt/user/src/com/google/gwt/core/client/HttpThrowableReporter.java /branches/farewellSwt/user/src/com/google/gwt/core/client/JsonUtils.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/HandlesAllFocusEvents.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/HandlesAllKeyEvents.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/HandlesAllMouseEvents.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/KeyCodes.java /branches/farewellSwt/user/src/com/google/gwt/event/dom/client/PrivateMap.java /branches/farewellSwt/user/src/com/google/gwt/event/logical/shared/HasValueChangeHandlers.java /branches/farewellSwt/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java /branches/farewellSwt/user/src/com/google/gwt/event/logical/shared/ValueChangeHandler.java /branches/farewellSwt/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java /branches/farewellSwt/user/src/com/google/gwt/event/shared/GwtEvent.java /branches/farewellSwt/user/src/com/google/gwt/event/shared/HandlerRegistration.java /branches/farewellSwt/user/src/com/google/gwt/junit/JUnitMessageQueue.java /branches/farewellSwt/user/src/com/google/gwt/resources /branches/farewellSwt/user/src/com/google/gwt/resources/client/ClientBundle.java /branches/farewellSwt/user/src/com/google/gwt/resources/ext/ClientBundleFields.java /branches/farewellSwt/user/src/com/google/gwt/resources/ext/ClientBundleRequirements.java /branches/farewellSwt/user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java /branches/farewellSwt/user/src/com/google/gwt/resources/rebind/context/InlineClientBundleGenerator.java /branches/farewellSwt/user/src/com/google/gwt/resources/rebind/context/StaticClientBundleGenerator.java /branches/farewellSwt/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java /branches/farewellSwt/user/src/com/google/gwt/uibinder/rebind/GwtResourceEntityResolver.java /branches/farewellSwt/user/src/com/google/gwt/uibinder/resources/xhtml.ent /branches/farewellSwt/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.ui.xml /branches/farewellSwt/user/src/com/google/gwt/user/RemoteServiceObfuscateTypeNames.gwt.xml /branches/farewellSwt/user/src/com/google/gwt/user/client/ui/ListenerWrapper.java /branches/farewellSwt/user/src/com/google/gwt/user/rebind/StringSourceW
[gwt-contrib] [google-web-toolkit] r6252 committed - Add CssResource.ensureInjected()....
Revision: 6252 Author: b...@google.com Date: Tue Sep 29 13:58:28 2009 Log: Add CssResource.ensureInjected(). Patch by: bobv Review by: rjrjr http://code.google.com/p/google-web-toolkit/source/detail?r=6252 Added: /trunk/user/test/com/google/gwt/resources/client/empty.css Modified: /trunk/user/src/com/google/gwt/resources/Resources.gwt.xml /trunk/user/src/com/google/gwt/resources/client/CssResource.java /trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java /trunk/user/test/com/google/gwt/resources/client/CSSResourceTest.java === --- /trunk/user/src/com/google/gwt/resources/Resources.gwt.xml Wed May 27 06:48:54 2009 +++ /trunk/user/src/com/google/gwt/resources/Resources.gwt.xml Tue Sep 29 13:58:28 2009 @@ -16,6 +16,8 @@ + + === --- /trunk/user/src/com/google/gwt/resources/client/CssResource.javaThu Aug 20 05:44:21 2009 +++ /trunk/user/src/com/google/gwt/resources/client/CssResource.javaTue Sep 29 13:58:28 2009 @@ -283,6 +283,16 @@ @Target(ElementType.METHOD) public @interface Strict { } + + /** + * Calls + * {...@link com.google.gwt.dom.client.StyleInjector#injectStylesheet(String)} to + * inject the contents of the CssResource into the DOM. Repeated calls to this + * method on an instance of a CssResources will have no effect. + * + * @return true if this method mutated the DOM. + */ + boolean ensureInjected(); /** * Provides the contents of the CssResource. === --- /trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java Tue Sep 29 13:58:11 2009 +++ /trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java Tue Sep 29 13:58:28 2009 @@ -30,6 +30,7 @@ import com.google.gwt.dev.util.DefaultTextOutput; import com.google.gwt.dev.util.Util; import com.google.gwt.dom.client.Element; +import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.i18n.client.LocaleInfo; import com.google.gwt.resources.client.CssResource; import com.google.gwt.resources.client.CssResource.ClassName; @@ -404,6 +405,10 @@ throw new UnableToCompleteException(); } } + +// Methods defined by CssResource interface +writeEnsureInjected(sw); +writeGetName(method, sw); sw.println("public String getText() {"); sw.indent(); @@ -416,12 +421,6 @@ sw.outdent(); sw.println("}"); -sw.println("public String getName() {"); -sw.indent(); -sw.println("return \"" + method.getName() + "\";"); -sw.outdent(); -sw.println("}"); - /* * getOverridableMethods is used to handle CssResources extending * non-CssResource types. See the discussion in computeReplacementsForType. @@ -911,6 +910,28 @@ sw.outdent(); sw.println("}"); } + + private void writeEnsureInjected(SourceWriter sw) { +sw.println("private boolean injected;"); +sw.println("public boolean ensureInjected() {"); +sw.indent(); +sw.println("if (!injected) {"); +sw.indentln("injected = true;"); +sw.indentln(StyleInjector.class.getName() + ".injectStylesheet(getText());"); +sw.indentln("return true;"); +sw.println("}"); +sw.println("return false;"); +sw.outdent(); +sw.println("}"); + } + + private void writeGetName(JMethod method, SourceWriter sw) { +sw.println("public String getName() {"); +sw.indent(); +sw.println("return \"" + method.getName() + "\";"); +sw.outdent(); +sw.println("}"); + } /** * Write all of the user-defined methods in the CssResource subtype. @@ -927,7 +948,8 @@ for (JMethod toImplement : methods) { String name = toImplement.getName(); - if ("getName".equals(name) || "getText".equals(name)) { + if ("getName".equals(name) || "getText".equals(name) + || "ensureInjected".equals(name)) { continue; } === --- /trunk/user/test/com/google/gwt/resources/client/CSSResourceTest.java Mon Jul 6 08:09:11 2009 +++ /trunk/user/test/com/google/gwt/resources/client/CSSResourceTest.java Tue Sep 29 13:58:28 2009 @@ -135,6 +135,10 @@ @Strict HasDescendants descendants(); +// Make sure an empty, no-op CssResource works +@Strict +CssResource empty(); + @Source("16x16.png") ImageResource spriteMethod(); } @@ -291,6 +295,17 @@ assertFalse("10px".equals(defines.overrideIntClass())); assertFalse("10".equals(defines.overrideIntClass())); } + + public void testEnsureInjected() { +Resources r = GWT.create(Resources.class); +assertTrue(r.empty().ensureInjected()); + +r = GWT.create(Resources.class); +assertFalse(r.empty().ensureInjected()); + +r = GWT.create(ChildResources.class); +assertTrue(r.empty().ensureInjected()); + } public void testMul
[gwt-contrib] [google-web-toolkit] r6250 committed - Fix lack of propagating numClients back to JUnitShell when the RunStyl...
Revision: 6250 Author: j...@google.com Date: Tue Sep 29 13:48:12 2009 Log: Fix lack of propagating numClients back to JUnitShell when the RunStyles process their arguments. Patch by: jat Review by: fabbott (desk) http://code.google.com/p/google-web-toolkit/source/detail?r=6250 Modified: /branches/farewellSwt/user/src/com/google/gwt/junit/JUnitShell.java /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleManual.java /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleSelenium.java === --- /branches/farewellSwt/user/src/com/google/gwt/junit/JUnitShell.java Tue Sep 29 11:27:01 2009 +++ /branches/farewellSwt/user/src/com/google/gwt/junit/JUnitShell.java Tue Sep 29 13:48:12 2009 @@ -743,7 +743,11 @@ } long currentTimeMillis = System.currentTimeMillis(); -if (activeClients == numClients) { +if (activeClients >= numClients) { + if (activeClients > numClients) { +getTopLogger().log(TreeLogger.WARN, "Too many clients: expected " ++ numClients + ", found " + activeClients); + } firstLaunch = false; /* @@ -816,6 +820,17 @@ compileForWebMode(moduleName, userAgents); } } + + /** + * Set the expected number of clients. + * + * Should only be called by RunStyle subtypes. + * + * @param numClients + */ + void setNumClients(int numClients) { +this.numClients = numClients; + } /** * Finish processing command line arguments. === --- /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleManual.java Sun Sep 20 12:33:31 2009 +++ /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleManual.java Tue Sep 29 13:48:12 2009 @@ -40,6 +40,7 @@ e); } } +shell.setNumClients(numClients); return true; } === --- /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java Tue Sep 29 11:27:01 2009 +++ /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java Tue Sep 29 13:48:12 2009 @@ -179,6 +179,7 @@ } }); int numClients = urls.length; +shell.setNumClients(numClients); BrowserManager[] browserManagers = new BrowserManager[numClients]; for (int i = 0; i < numClients; ++i) { long callStart = System.currentTimeMillis(); === --- /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleSelenium.java Tue Sep 29 11:27:01 2009 +++ /branches/farewellSwt/user/src/com/google/gwt/junit/RunStyleSelenium.java Tue Sep 29 13:48:12 2009 @@ -108,6 +108,7 @@ } this.remotes = targets; +shell.setNumClients(targets.length); // Install a shutdown hook that will close all of our outstanding Selenium // sessions. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RR : Add CssResource.ensureInjected()
LGTM Joel, you'll want to use this in your samples. Tidy tidy tidy. http://gwt-code-reviews.appspot.com/72804/diff/1/3 File user/src/com/google/gwt/resources/client/CssResource.java (right): http://gwt-code-reviews.appspot.com/72804/diff/1/3#newcode295 Line 295: boolean ensureInjected(); The return value is a nice touch. http://gwt-code-reviews.appspot.com/72804/diff/1/4 File user/src/com/google/gwt/resources/rg/CssResourceGenerator.java (right): http://gwt-code-reviews.appspot.com/72804/diff/1/4#newcode915 Line 915: sw.println("private boolean injected;"); Isn't it nice that the arbi^H^H^H^H style guide doesn't apply to generated code? http://gwt-code-reviews.appspot.com/72804 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] RR : Add CssResource.ensureInjected()
Reviewers: Ray Ryan, Message: Review requested. Description: This patch adds a convenience method to CssResource to ensure that the contents of the CssResource have been injected into the DOM. The method behaves as a one-shot; subsequent calls will have no effect. Please review this at http://gwt-code-reviews.appspot.com/72804 Affected files: M user/src/com/google/gwt/resources/Resources.gwt.xml M user/src/com/google/gwt/resources/client/CssResource.java M user/src/com/google/gwt/resources/rg/CssResourceGenerator.java M user/test/com/google/gwt/resources/client/CSSResourceTest.java A user/test/com/google/gwt/resources/client/empty.css --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6249 committed - Fixing a failing test because FF3.5 allows cross-site XHR requests....
Revision: 6249 Author: jlaba...@google.com Date: Tue Sep 29 12:15:40 2009 Log: Fixing a failing test because FF3.5 allows cross-site XHR requests. Patch by: jlabanca Review by: rjrjr http://code.google.com/p/google-web-toolkit/source/detail?r=6249 Modified: /trunk/user/test/com/google/gwt/http/client/RequestBuilderTest.java === --- /trunk/user/test/com/google/gwt/http/client/RequestBuilderTest.java Thu Jul 30 13:47:31 2009 +++ /trunk/user/test/com/google/gwt/http/client/RequestBuilderTest.java Tue Sep 29 12:15:40 2009 @@ -45,6 +45,25 @@ return ua.indexOf("webkit") != -1; }-*/; + /** + * HACK: Part of a work around for FF 3.5's failure to throw an exception when + * an XmlHttpRequest that violates the same origin policy is made. + */ + private static native boolean isFirefox35() /*-{ +var ua = navigator.userAgent.toLowerCase(); +if (ua.indexOf("gecko") == -1) { + return false; +} +var result = /firefox\/([0-9]+\.[0-9]+)/.exec(ua.toLowerCase()); +if (result && result.length == 2) { + var version = parseFloat(result[1]); + if (version >= 3.5) { +return true; + } +} +return false; + }-*/; + @Override public String getModuleName() { return "com.google.gwt.http.RequestBuilderTest"; @@ -109,13 +128,17 @@ } }); - if (isSafari()) { + if (isSafari() || isFirefox35()) { /* * HACK: Safari 2.0.4 will not throw an exception for XHR's that violate * the same-origin policy. It appears to silently ignore them so we do * not fail this test if we are on Safari and the * RequestPermissionException is not thrown. Even though Safari 3.0.4 * does throw an exception in this case, we exclude it anyway. + * + * FF3.5 allows XHR's to violate the same-origin policy and offers no + * way to disable the feature from the client. Only the server can block + * the same origin policy. */ } else { /* --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Firefox 3.5 allows cross site XHRs
You can read through this doc for details: https://developer.mozilla.org/En/HTTP_access_control Essentially, if an XHR response includes the following header, the cross site request is allowed: Access-Control-Allow-Origin: * If the XHR response includes the following header instead, the request is denied: Access-Control-Allow-Origin: http://mysite.com http://gwt-code-reviews.appspot.com/73802/diff/1/2 File user/test/com/google/gwt/http/client/RequestBuilderTest.java (right): http://gwt-code-reviews.appspot.com/73802/diff/1/2#newcode64 Line 64: return false; Its a feature, not a bug. FireFox has adopted a new proposed standard where its up to the server to determine which origins can access the content. At some point, we should setup a publicly visible server that always denies cross site requests. It would be helpful to us and others. http://gwt-code-reviews.appspot.com/73802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Firefox 3.5 allows cross site XHRs
LGTM http://gwt-code-reviews.appspot.com/73802/diff/1/2 File user/test/com/google/gwt/http/client/RequestBuilderTest.java (right): http://gwt-code-reviews.appspot.com/73802/diff/1/2#newcode64 Line 64: return false; Should we log a bug on FireFox requesting an exception be thrown? http://gwt-code-reviews.appspot.com/73802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Firefox 3.5 allows cross site XHRs
LGTM http://gwt-code-reviews.appspot.com/73802/diff/1/2 File user/test/com/google/gwt/http/client/RequestBuilderTest.java (right): http://gwt-code-reviews.appspot.com/73802/diff/1/2#newcode64 Line 64: return false; Should we log a bug on FireFox requesting an exception be thrown? http://gwt-code-reviews.appspot.com/73802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Firefox 3.5 allows cross site XHRs
Reviewers: Ray Ryan, Description: Description: === Firefox 3.5 allows cross site XHR requests without any way to disable the option. Only the server can deny the request. Fix: Fixed RequestBuilderTest to check for FF3.5. We currently do the same for Safari 2, which fails silently. Please review this at http://gwt-code-reviews.appspot.com/73802 Affected files: user/test/com/google/gwt/http/client/RequestBuilderTest.java Index: user/test/com/google/gwt/http/client/RequestBuilderTest.java === --- user/test/com/google/gwt/http/client/RequestBuilderTest.java (revision 6245) +++ user/test/com/google/gwt/http/client/RequestBuilderTest.java (working copy) @@ -45,6 +45,25 @@ return ua.indexOf("webkit") != -1; }-*/; + /** + * HACK: Part of a work around for FF 3.5's failure to throw an exception when + * an XmlHttpRequest that violates the same origin policy is made. + */ + private static native boolean isFirefox35() /*-{ +var ua = navigator.userAgent.toLowerCase(); +if (ua.indexOf("gecko") == -1) { + return false; +} +var result = /firefox\/([0-9]+\.[0-9]+)/.exec(ua.toLowerCase()); +if (result && result.length == 2) { + var version = parseFloat(result[1]); + if (version >= 3.5) { +return true; + } +} +return false; + }-*/; + @Override public String getModuleName() { return "com.google.gwt.http.RequestBuilderTest"; @@ -109,13 +128,17 @@ } }); - if (isSafari()) { + if (isSafari() || isFirefox35()) { /* * HACK: Safari 2.0.4 will not throw an exception for XHR's that violate * the same-origin policy. It appears to silently ignore them so we do * not fail this test if we are on Safari and the * RequestPermissionException is not thrown. Even though Safari 3.0.4 * does throw an exception in this case, we exclude it anyway. + * + * FF3.5 allows XHR's to violate the same-origin policy and offers no + * way to disable the feature from the client. Only the server can block + * the same origin policy. */ } else { /* --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6247 committed - Merged up to 6240 from farewellSwt...
Revision: 6247 Author: j...@google.com Date: Tue Sep 29 11:05:28 2009 Log: Merged up to 6240 from farewellSwt svn merge --ignore-ancestry -r6226:6240 \ https://google-web-toolkit.googlecode.com/svn/branches/farewellSwt http://code.google.com/p/google-web-toolkit/source/detail?r=6247 Modified: /changes/jat/noswt-merge6200/branch-info.txt /changes/jat/noswt-merge6200/common.ant.xml /changes/jat/noswt-merge6200/dev/build.xml /changes/jat/noswt-merge6200/dev/oophm/src/com/google/gwt/dev/shell/MethodDispatch.java /changes/jat/noswt-merge6200/user/build.xml === --- /changes/jat/noswt-merge6200/branch-info.txtSun Sep 27 13:09:27 2009 +++ /changes/jat/noswt-merge6200/branch-info.txtTue Sep 29 11:05:28 2009 @@ -17,3 +17,8 @@ -r6101:6142 svn merge --ignore-ancestry -r6142:6200 \ https://google-web-toolkit.googlecode.com/svn/trunk + +Merged from farwellSwt +== +svn merge --ignore-ancestry -r6226:6240 \ +https://google-web-toolkit.googlecode.com/svn/branches/farewellSwt === --- /changes/jat/noswt-merge6200/common.ant.xml Fri Sep 25 20:56:00 2009 +++ /changes/jat/noswt-merge6200/common.ant.xml Tue Sep 29 11:05:28 2009 @@ -150,7 +150,10 @@ - + @@ -177,7 +180,6 @@ - @@ -189,12 +191,10 @@ - - + - - - @@ -231,7 +231,7 @@ - + === --- /changes/jat/noswt-merge6200/dev/build.xml Sun Sep 20 13:15:01 2009 +++ /changes/jat/noswt-merge6200/dev/build.xml Tue Sep 29 11:05:28 2009 @@ -232,6 +232,16 @@ + + + + + + + === --- /changes/jat/noswt-merge6200/dev/oophm/src/com/google/gwt/dev/shell/MethodDispatch.java Wed Dec 3 15:31:00 2008 +++ /changes/jat/noswt-merge6200/dev/oophm/src/com/google/gwt/dev/shell/MethodDispatch.java Tue Sep 29 11:05:28 2009 @@ -56,6 +56,10 @@ if (method.needsThis()) { jthis = JsValueGlue.get(jsthis, classLoader, method.getDeclaringClass(), "invoke this"); + if (jthis == null) { +throw ModuleSpace.createJavaScriptException(classLoader, +"Invoking an instance method on a null instance"); + } } for (int i = 0; i < argc; ++i) { args[i] = JsValueGlue.get(jsargs[i], classLoader, paramTypes[i], === --- /changes/jat/noswt-merge6200/user/build.xml Sun Sep 27 13:09:27 2009 +++ /changes/jat/noswt-merge6200/user/build.xml Tue Sep 29 11:05:28 2009 @@ -132,7 +132,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -185,7 +185,7 @@ - + --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6246 committed - Add sourcepath for Selenium client library....
Revision: 6246 Author: j...@google.com Date: Tue Sep 29 11:01:25 2009 Log: Add sourcepath for Selenium client library. Patch by: jat Review by: rjrjr (TBR) http://code.google.com/p/google-web-toolkit/source/detail?r=6246 Modified: /branches/farewellSwt/eclipse/user/.classpath === --- /branches/farewellSwt/eclipse/user/.classpath Sun Sep 20 12:33:31 2009 +++ /branches/farewellSwt/eclipse/user/.classpath Tue Sep 29 11:01:25 2009 @@ -17,7 +17,7 @@ - + --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: -soyc runs the dashboard, too
Cool. Does the new code LGTY? -Lex --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: -soyc runs the dashboard, too
Sounds good. I don't know if we would really break anybody if we took out the -resources option now. If it's not an issue, let's clean it up now and take it out. kathrin On Mon, Sep 28, 2009 at 4:26 PM, wrote: > Okay, I've made these code changes. New patch coming soon. > > What shall we do about -resources? Is it okay to make it a no-op > immediately, or should we continue to support it a little while longer? > > > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2022 > File > dev/core/src/com/google/gwt/core/ext/linker/CompilationAnalysis.java > (right): > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2022#newcode48 > Line 48: public abstract List getReportFiles(); > That would be a problem. For this particular class, it's not intended > that there are any other implementers, and my brief searches could not > turn any up. > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2024 > File dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java > (right): > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2024#newcode76 > Line 76: "Error while generating a Story of Your Compile", e); > Done, and everywhere else I could find a mention of "SOYC" or "Story of > Your Compile". I have not changed PerfLogger calls, class names, or > comments; those seem low priority. I have not changed the command-line > options, but we should do that once we figure out the new options. > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2036 > File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java > (right): > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2036#newcode973 > Line 973: if (sizeBreakdowns != null) { > Now that I look at the code, however, it looks possible to specify > detailed info but not the lite info. In my mind, developers would never > ask for the extra detail without also getting the lite level of detail. > > It looks like a separate issue from this patch. However, I agree it > makes sense to either have the detailed soyc argument imply the regular > one, or to complain about the command-line arguments if the regular one > isn't already specified. > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2036#newcode1071 > Line 1071: } > Done. Changed to EmittedArtifact. > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2025 > File dev/core/src/com/google/gwt/soyc/Settings.java (right): > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2025#newcode185 > Line 185: " present only for backwards compatibility; add any resources > directory to the classpath")); > How about: "present only for backwards compatibility; directory or jar > file with CSS, etc., resources" > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2027 > File dev/core/src/com/google/gwt/soyc/SoycDashboard.java (right): > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2027#newcode77 > Line 77: + "java com.google.gwt.soyc.SoycDashboard options > stories0.xml[.gz] [dependencies0.xml[.gz]] [splitpoints0.xml[.gz]])"); > Even if it's invoked with the legacy syntax, the supplied resources > directory is ignored in this patch as it stands. Can we live with that? > > This arrangement should cover any normal use case where a report is > generated from cron or as part of a continuous build, because the > argument just specifies a prebuilt gwt-soyc-vis anyway. However, > developer setups will be broken for people developing on SOYC; I was > hoping both of those people could simply deal with the break. :) Is > there anyone else being broken if we stop supporting -resources? > > I can implement support for -resources if there's a reason. Can we live > without it? > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2020 > File tools/soyc-vis/build.xml (right): > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2020#newcode18 > Line 18: dir="${gwt.root}/dev/core/src/com/google/gwt/soyc/resources"/> > On 2009/09/28 17:22:00, kathrin wrote: > >> Should this be here or rather in the dev's build file? >> > > I was thinking here, for the following reasons. First, the *output* is > going into gwt-soyc-vis.jar, even though the input comes from dev. > Second, eventually gwt-soyc-vis.jar should go away. I've been trying to > move things around so that when we're ready to do that, tools/soyc-vis > can simply be deleted. > > http://gwt-code-reviews.appspot.com/69801/diff/1001/2020#newcode18 > Line 18: dir="${gwt.root}/dev/core/src/com/google/gwt/soyc/resources"/> > I was thinking here, mainly because the *output* is used to build > gwt-dev-soyc.jar. > > Additionally, gwt-dev-soyc.jar should eventually go away. At that > point, it's a little cleaner if we can simply remove tools/soyc-vis and > don't also need to update the dev build file. > > > http://gwt-code-reviews.appspot.com/69801 > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6245 committed - Indexable Showcase now uses IndexableHyperlink.
Revision: 6245 Author: kpro...@google.com Date: Tue Sep 29 07:49:01 2009 Log: Indexable Showcase now uses IndexableHyperlink. http://code.google.com/p/google-web-toolkit/source/detail?r=6245 Modified: /branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java === --- /branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java Fri Sep 25 09:27:51 2009 +++ /branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java Tue Sep 29 07:49:01 2009 @@ -75,6 +75,7 @@ import com.google.gwt.user.client.ui.HasVerticalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Hyperlink; +import com.google.gwt.user.client.ui.IndexableHyperlink; import com.google.gwt.user.client.ui.ListBox; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TabBar; @@ -416,7 +417,7 @@ AbstractImagePrototype image) { // Create the TreeItem -Hyperlink hl = new Hyperlink(image.getHTML() + " " + content.getName(),true,getContentWidgetToken(content)); +Hyperlink hl = new IndexableHyperlink(image.getHTML() + " " + content.getName(),true,getContentWidgetToken(content)); TreeItem option = parent.addItem(hl); // Map the item to its history token and content widget --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6244 committed - Allow for indexable and non-indexable hyperlinks. The new class Index...
Revision: 6244 Author: kpro...@google.com Date: Tue Sep 29 07:48:08 2009 Log: Allow for indexable and non-indexable hyperlinks. The new class IndexableHyperlink extends Hyperlink and adds the special "indexable" token to each history token. http://code.google.com/p/google-web-toolkit/source/detail?r=6244 Added: /branches/crawlability/user/src/com/google/gwt/user/client/ui/IndexableHyperlink.java Modified: /branches/crawlability/user/src/com/google/gwt/user/client/ui/Hyperlink.java === --- /dev/null +++ /branches/crawlability/user/src/com/google/gwt/user/client/ui/IndexableHyperlink.java Tue Sep 29 07:48:08 2009 @@ -0,0 +1,40 @@ +package com.google.gwt.user.client.ui; + +import com.google.gwt.user.client.Element; +import com.google.gwt.user.client.History; + +public class IndexableHyperlink extends Hyperlink { + + public IndexableHyperlink() { +// TODO Auto-generated constructor stub + } + + public IndexableHyperlink(String text, boolean asHTML, + String targetHistoryToken) { +super(text, asHTML, targetHistoryToken); +// TODO Auto-generated constructor stub + } + + public IndexableHyperlink(String text, String targetHistoryToken) { +super(text, targetHistoryToken); +// TODO Auto-generated constructor stub + } + + public IndexableHyperlink(Element elem) { +super(elem); +// TODO Auto-generated constructor stub + } + + /** + * Sets the history token referenced by this hyperlink. This is the history + * token that will be passed to {...@link History#newItem} when this link is + * clicked. + * + * @param targetHistoryToken the new history token, which may not be null (use + *{...@link Anchor} instead if you don't need history processing) + */ + @Override + public void setTargetHistoryToken(String targetHistoryToken) { +super.setTargetHistoryToken("!" + targetHistoryToken); + } +} === --- /branches/crawlability/user/src/com/google/gwt/user/client/ui/Hyperlink.java Fri Sep 25 09:28:36 2009 +++ /branches/crawlability/user/src/com/google/gwt/user/client/ui/Hyperlink.java Tue Sep 29 07:48:08 2009 @@ -189,8 +189,8 @@ public void setTargetHistoryToken(String targetHistoryToken) { assert targetHistoryToken != null : "targetHistoryToken must not be null, consider using Anchor instead"; -this.targetHistoryToken = "!" + targetHistoryToken; -DOM.setElementProperty(anchorElem, "href", "#!" + targetHistoryToken); +this.targetHistoryToken = targetHistoryToken; +DOM.setElementProperty(anchorElem, "href", "#" + targetHistoryToken); } public void setText(String text) { --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: DockLayoutPanel and Maps
That makes sense. RequiresResize was created for precisely this kind of scenario, where a widget simply can't work properly without knowing when it has been resized. It doesn't actually cause the widget to be any *more* broken if you fail to call onResize(), but it serves as a hint to the developer that this is required, and will cause panels that implement ProvidesResize to automatically call onResize() for their children that require it. On Tue, Sep 29, 2009 at 6:49 AM, Eric Ayers wrote: > > I'll look into implementing RequiresResize, I created an issue: > > http://code.google.com/p/gwt-google-apis/issues/detail?id=308 > > The problem with the map not refreshing properly and having to call > checkResizeAndCenter() immediately after creating it has been around a > long time and there is a FAQ up for it. I hope this works. Having a > way to automatically compensate would take some pain out of creating > maps applications! > > > On Sep 29, 12:29 am, Joel Webber wrote: > > Having MapWidget implement RequiresResize would seem to be the right > > approach. I can see how the maps code would need to be informed when it > is > > resized, as it needs to create the appropriate number of tiles on each > axis. > > Does this sound reasonable to you, Eric? > > > > > > > > On Mon, Sep 28, 2009 at 9:18 PM, jd wrote: > > > > > Yeah sorry I was not sure if this was more of a development topic or > > > typical user problem. > > > > > I tried your suggestion of map.checkResizeAndCenter() and it works > > > perfectly. It also seems a better solution than my original > > > SimplePanel place holder. > > > > > It seems that the Google map object initializes its size as soon as it > > > is added to the document. Perhaps MapWidget could also implement > > > RequiresResize? > > > > > So now a working example is: > > > > >public void onModuleLoad() > > >{ > > >DockLayoutPanel p = new DockLayoutPanel(Unit.PX); > > >p.addNorth(new HTML("north"), 100); > > >p.addSouth(new HTML("south"), 100); > > >p.addEast(new HTML("east"), 100); > > >p.addWest(new HTML("west"), 100); > > > > >MapWidget map = new MapWidget(LatLng.newInstance(-41.1, > > > 174.8), 5); > > >p.add(map); > > > > >p.layout(); > > > > >RootLayoutPanel rp = RootLayoutPanel.get(); > > >rp.add(p); > > > > > rp.layout(); > > > > >map.checkResizeAndCenter(); > > >} > > > > > John > > > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: DockLayoutPanel and Maps
I'll look into implementing RequiresResize, I created an issue: http://code.google.com/p/gwt-google-apis/issues/detail?id=308 The problem with the map not refreshing properly and having to call checkResizeAndCenter() immediately after creating it has been around a long time and there is a FAQ up for it. I hope this works. Having a way to automatically compensate would take some pain out of creating maps applications! On Sep 29, 12:29 am, Joel Webber wrote: > Having MapWidget implement RequiresResize would seem to be the right > approach. I can see how the maps code would need to be informed when it is > resized, as it needs to create the appropriate number of tiles on each axis. > Does this sound reasonable to you, Eric? > > > > On Mon, Sep 28, 2009 at 9:18 PM, jd wrote: > > > Yeah sorry I was not sure if this was more of a development topic or > > typical user problem. > > > I tried your suggestion of map.checkResizeAndCenter() and it works > > perfectly. It also seems a better solution than my original > > SimplePanel place holder. > > > It seems that the Google map object initializes its size as soon as it > > is added to the document. Perhaps MapWidget could also implement > > RequiresResize? > > > So now a working example is: > > > public void onModuleLoad() > > { > > DockLayoutPanel p = new DockLayoutPanel(Unit.PX); > > p.addNorth(new HTML("north"), 100); > > p.addSouth(new HTML("south"), 100); > > p.addEast(new HTML("east"), 100); > > p.addWest(new HTML("west"), 100); > > > MapWidget map = new MapWidget(LatLng.newInstance(-41.1, > > 174.8), 5); > > p.add(map); > > > p.layout(); > > > RootLayoutPanel rp = RootLayoutPanel.get(); > > rp.add(p); > > > rp.layout(); > > > map.checkResizeAndCenter(); > > } > > > John --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: How about CssResource#ensureInjected()
> Does anyone know there's a reason Bob didn't do this in the first place? Nobody asked for it. Since StyleInjector has stabilized, it would make sense to add this convenience method. I'll send you a patch. -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---