Author: j...@google.com Date: Tue May 19 08:35:33 2009 New Revision: 5421 Modified: trunk/dev/core/src/com/google/gwt/dev/CompileTaskRunner.java trunk/dev/core/src/com/google/gwt/dev/Compiler.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JDeclaredType.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java trunk/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java trunk/distro-source/core/src/COPYING trunk/distro-source/core/src/COPYING.html trunk/distro-source/core/src/about.html trunk/distro-source/core/src/about.txt trunk/distro-source/core/src/index.html trunk/distro-source/core/src/release_notes.html trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java trunk/user/src/com/google/gwt/dom/client/Element.java trunk/user/src/com/google/gwt/dom/client/Node.java trunk/user/src/com/google/gwt/dom/client/Style.java trunk/user/src/com/google/gwt/junit/tools/junit-hosted.cmdsrc trunk/user/src/com/google/gwt/junit/tools/junit-hostedsrc trunk/user/src/com/google/gwt/junit/tools/junit-web.cmdsrc trunk/user/src/com/google/gwt/junit/tools/junit-websrc trunk/user/src/com/google/gwt/user/tools/web.xmlsrc trunk/user/test/com/google/gwt/dom/client/ElementTest.java trunk/user/test/com/google/gwt/dom/client/NodeTest.java
Log: Merging /releases/1.6/@r5065:5406 into trunk. Modified: trunk/dev/core/src/com/google/gwt/dev/CompileTaskRunner.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/dev/CompileTaskRunner.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/CompileTaskRunner.java Tue May 19 08:35:33 2009 @@ -73,6 +73,10 @@ return success[0]; } else { + // Compile tasks without -treeLogger should run headless. + if (System.getProperty("java.awt.headless") == null) { + System.setProperty("java.awt.headless", "true"); + } PrintWriterTreeLogger logger = new PrintWriterTreeLogger(); logger.setMaxDetail(options.getLogLevel()); return doRun(logger, task); Modified: trunk/dev/core/src/com/google/gwt/dev/Compiler.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/dev/Compiler.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/Compiler.java Tue May 19 08:35:33 2009 @@ -185,10 +185,10 @@ } } else { long compileStart = System.currentTimeMillis(); - logger = logger.branch(TreeLogger.INFO, "Compiling module " - + moduleName); + TreeLogger branch = logger.branch(TreeLogger.INFO, + "Compiling module " + moduleName); - Precompilation precompilation = Precompile.precompile(logger, + Precompilation precompilation = Precompile.precompile(branch, options, module, options.getGenDir(), compilerWorkDir, options.getDumpSignatureFile()); @@ -199,7 +199,7 @@ Permutation[] allPerms = precompilation.getPermutations(); List<FileBackedObject<PermutationResult>> resultFiles = CompilePerms.makeResultFiles( options.getCompilerWorkDir(moduleName), allPerms); - CompilePerms.compile(logger, precompilation, allPerms, + CompilePerms.compile(branch, precompilation, allPerms, options.getLocalWorkers(), resultFiles); ArtifactSet generatedArtifacts = precompilation.getGeneratedArtifacts(); @@ -214,7 +214,7 @@ long compileDone = System.currentTimeMillis(); long delta = compileDone - compileStart; - logger.log(TreeLogger.INFO, "Compilation succeeded -- " + branch.log(TreeLogger.INFO, "Compilation succeeded -- " + String.format("%.3f", delta / 1000d) + "s"); } } Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JDeclaredType.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JDeclaredType.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JDeclaredType.java Tue May 19 08:35:33 2009 @@ -18,6 +18,9 @@ import com.google.gwt.dev.jjs.SourceInfo; import com.google.gwt.dev.util.collect.Lists; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.Arrays; import java.util.Comparator; import java.util.List; @@ -28,14 +31,14 @@ public abstract class JDeclaredType extends JReferenceType { /** - * This type's fields. + * This type's fields. Special serialization treatment. */ - protected List<JField> fields = Lists.create(); + protected transient List<JField> fields = Lists.create(); /** - * This type's methods. + * This type's methods. Special serialization treatment. */ - protected List<JMethod> methods = Lists.create(); + protected transient List<JMethod> methods = Lists.create(); /** * Tracks whether this class has a dynamic clinit. Defaults to true until @@ -219,6 +222,30 @@ } /** + * See {...@link #writeMembers(ObjectOutputStream)}. + * + * @see #writeMembers(ObjectOutputStream) + */ + @SuppressWarnings("unchecked") + void readMembers(ObjectInputStream stream) throws IOException, + ClassNotFoundException { + fields = (List<JField>) stream.readObject(); + methods = (List<JMethod>) stream.readObject(); + } + + /** + * See {...@link #writeMethodBodies(ObjectOutputStream). + * + * @see #writeMethodBodies(ObjectOutputStream) + */ + void readMethodBodies(ObjectInputStream stream) throws IOException, + ClassNotFoundException { + for (JMethod method : methods) { + method.readBody(stream); + } + } + + /** * Called when this class's clinit is empty or can be run at the top level. */ void removeClinit() { @@ -226,5 +253,29 @@ JMethod clinitMethod = methods.get(0); assert JProgram.isClinit(clinitMethod); hasClinit = false; + } + + /** + * After all types are written to the stream without transient members, this + * method actually writes fields and methods to the stream, which establishes + * type identity for them. + * + * @see JProgram#writeObject(ObjectOutputStream) + */ + void writeMembers(ObjectOutputStream stream) throws IOException { + stream.writeObject(fields); + stream.writeObject(methods); + } + + /** + * After all types, fields, and methods are written to the stream, this method + * writes method bodies to the stream. + * + * @see JProgram#writeObject(ObjectOutputStream) + */ + void writeMethodBodies(ObjectOutputStream stream) throws IOException { + for (JMethod method : methods) { + method.writeBody(stream); + } } } Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java Tue May 19 08:35:33 2009 @@ -19,6 +19,9 @@ import com.google.gwt.dev.jjs.SourceInfo; import com.google.gwt.dev.util.collect.Lists; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -39,7 +42,12 @@ System.out.println(code); } - private JAbstractMethodBody body = null; + + /** + * Special serialization treatment. + */ + private transient JAbstractMethodBody body = null; + private final JDeclaredType enclosingType; private final boolean isAbstract; private boolean isFinal; @@ -250,5 +258,25 @@ trace(title, after); } } + } + + /** + * See {...@link #writeBody(ObjectOutputStream)}. + * + * @see #writeBody(ObjectOutputStream) + */ + void readBody(ObjectInputStream stream) throws IOException, + ClassNotFoundException { + body = (JAbstractMethodBody) stream.readObject(); + } + + /** + * After all types, fields, and methods are written to the stream, this method + * writes method bodies to the stream. + * + * @see JProgram#writeObject(ObjectOutputStream) + */ + void writeBody(ObjectOutputStream stream) throws IOException { + stream.writeObject(body); } } Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java Tue May 19 08:35:33 2009 @@ -25,6 +25,9 @@ import com.google.gwt.dev.jjs.ast.js.JsniMethodBody; import com.google.gwt.dev.jjs.ast.js.JsonObject; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; @@ -175,7 +178,10 @@ private final Set<JArrayType> allArrayTypes = new TreeSet<JArrayType>( ARRAYTYPE_COMPARATOR); - private final List<JDeclaredType> allTypes = new ArrayList<JDeclaredType>(); + /** + * Special serialization treatment. + */ + private transient List<JDeclaredType> allTypes = new ArrayList<JDeclaredType>(); private final Map<JType, JClassLiteral> classLiterals = new IdentityHashMap<JType, JClassLiteral>(); @@ -1103,5 +1109,55 @@ SourceInfo child = createLiteralSourceInfo(description); child.addCorrelation(correlator.by(literal)); return child; + } + + /** + * See notes in {...@link #writeObject(ObjectOutputStream)}. + * + * @see #writeObject(ObjectOutputStream) + */ + @SuppressWarnings("unchecked") + private void readObject(ObjectInputStream stream) throws IOException, + ClassNotFoundException { + allTypes = (List<JDeclaredType>) stream.readObject(); + for (JDeclaredType type : allTypes) { + type.readMembers(stream); + } + for (JDeclaredType type : allTypes) { + type.readMethodBodies(stream); + } + stream.defaultReadObject(); + } + + /** + * Serializing the Java AST is a multi-step process to avoid blowing out the + * stack. + * + * <ol> + * <li>Write all declared types in a lightweight manner to establish object + * identity for types</li> + * <li>Write all fields; write all methods in a lightweight manner to + * establish object identity for methods</li> + * <li>Write all method bodies</li> + * <li>Write everything else, which will mostly refer to already-serialized + * objects.</li> + * <li>Write the bodies of the entry methods (unlike all other methods, these + * are not contained by any type.</li> + * </ol> + * + * The goal of this process to to avoid "running away" with the stack. Without + * special logic here, lots of things would reference types, method body code + * would reference both types and other methods, and really, really long + * recursion chains would result. + */ + private void writeObject(ObjectOutputStream stream) throws IOException { + stream.writeObject(allTypes); + for (JDeclaredType type : allTypes) { + type.writeMembers(stream); + } + for (JDeclaredType type : allTypes) { + type.writeMethodBodies(stream); + } + stream.defaultWriteObject(); } } Modified: trunk/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java Tue May 19 08:35:33 2009 @@ -265,14 +265,31 @@ */ private class WebAppClassLoaderExtension extends WebAppClassLoader { + private static final String META_INF_SERVICES = "META-INF/services/"; + public WebAppClassLoaderExtension() throws IOException { super(bootStrapOnlyClassLoader, WebAppContextWithReload.this); } @Override public URL findResource(String name) { + // Specifically for META-INF/services/javax.xml.parsers.SAXParserFactory + String checkName = name; + if (checkName.startsWith(META_INF_SERVICES)) { + checkName = checkName.substring(META_INF_SERVICES.length()); + } + + // For a system path, load from the outside world. + URL found; + if (isSystemPath(checkName)) { + found = systemClassLoader.getResource(name); + if (found != null) { + return found; + } + } + // Always check this ClassLoader first. - URL found = super.findResource(name); + found = super.findResource(name); if (found != null) { return found; } @@ -283,17 +300,6 @@ return null; } - // Specifically for META-INF/services/javax.xml.parsers.SAXParserFactory - String checkName = name; - if (checkName.startsWith("META-INF/services/")) { - checkName = checkName.substring("META-INF/services/".length()); - } - - // For system/server path, just return it quietly. - if (isServerPath(checkName) || isSystemPath(checkName)) { - return found; - } - // Warn, add containing URL to our own ClassLoader, and retry the call. String warnMessage = "Server resource '" + name @@ -319,14 +325,21 @@ @Override protected Class<?> findClass(String name) throws ClassNotFoundException { + // For system path, always prefer the outside world. + if (isSystemPath(name)) { + try { + return systemClassLoader.loadClass(name); + } catch (ClassNotFoundException e) { + } + } + try { return super.findClass(name); } catch (ClassNotFoundException e) { - } - - // For system/server path, just try the outside world quietly. - if (isServerPath(name) || isSystemPath(name)) { - return systemClassLoader.loadClass(name); + // Don't allow server classes to be loaded from the outside. + if (isServerPath(name)) { + throw e; + } } // See if the outside world has a URL for it. @@ -434,6 +447,15 @@ // Suppress spammy Jetty log initialization. System.setProperty("org.mortbay.log.class", JettyNullLogger.class.getName()); Log.getLog(); + + /* + * Make JDT the default Ant compiler so that JSP compilation just works + * out-of-the-box. If we don't set this, it's very, very difficult to make + * JSP compilation work. + */ + String antJavaC = System.getProperty("build.compiler", + "org.eclipse.jdt.core.JDTCompilerAdapter"); + System.setProperty("build.compiler", antJavaC); } @Override Modified: trunk/distro-source/core/src/COPYING ============================================================================== --- trunk/distro-source/core/src/COPYING (original) +++ trunk/distro-source/core/src/COPYING Tue May 19 08:35:33 2009 @@ -191,8 +191,17 @@ * Apache Tomcat License: Apache License v. 2.0 (above) Source code availability: http://tomcat.apache.org - modifications are at org/apache/tomcat within gwt-dev.jar + modifications are at org/apache/tomcat/ within gwt-dev.jar +* Apache Tapestry + License: Apache License v. 2.0 (above) + Source code availability: http://tapestry.apache.org + +* ASM 3.1 + License: (custom) + http://asm.objectweb.org/license.html + Source code availability: com/google/gwt/dev/asm/ within gwt-dev.jar + * Browser Detect v2.1.6 License: Creative Commons Attribution 1.0 http://creativecommons.org/licenses/by/1.0/ @@ -213,7 +222,12 @@ Linux: http://download.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/download.php?dropFile=swt-3.2.1-gtk-linux-x86.zip Windows: http://download.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/download.php?dropFile=swt-3.2.1-win32-win32-x86.zip Mac: http://download.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/download.php?dropFile=swt-3.2.1-carbon-macosx.zip - modifications are at org/eclipse/swt within gwt-dev.jar + modifications are at org/eclipse/swt/ within gwt-dev.jar + +* Jetty + License: Apache License v. 2.0 (above) + Source code availability: + http://mortbay.org/jetty/ * JFreeChart License: GNU Lesser General Public License v. 2.1 @@ -231,10 +245,4 @@ http://www.mozilla.org/MPL/MPL-1.1.txt Source code availability: http://developer.mozilla.org/en/docs/Download_Mozilla_Source_Code - -* WebKit 418.9 (Mac only) - License: GNU Lesser General Public License v. 2.1 - http://www.gnu.org/licenses/lgpl.html - Source code availability: - http://webkit.org/building/checkout.html Modified: trunk/distro-source/core/src/COPYING.html ============================================================================== --- trunk/distro-source/core/src/COPYING.html (original) +++ trunk/distro-source/core/src/COPYING.html Tue May 19 08:35:33 2009 @@ -281,28 +281,43 @@ <tr> <td class="package">Apache Tomcat</td> <td class="license">Apache License v. 2.0 (above)</td> - <td class="location"><a href="http://tomcat.apache.org/">tomcat.apache.org</a>; modifications are at org/apache/tomcat within gwt-dev.jar</td> + <td class="location"><a href="http://tomcat.apache.org/">tomcat.apache.org</a>; modifications are at org/apache/tomcat/ within gwt-dev.jar</td> + </tr> + <tr class="even"> + <td class="package">Apache Tapestry</td> + <td class="license">Apache License v. 2.0 (above)</td> + <td class="location"><a href="http://tapestry.apache.org/">tapestry.apache.org</a></td> </tr> <tr> + <td class="package">ASM 3.1</td> + <td class="license">(<a href="http://asm.objectweb.org/license.html">custom</a>)</td> + <td class="location">com/google/gwt/dev/asm/ within gwt-dev.jar</td> + </tr> + <tr class="even"> <td class="package">Browser Detect v2.1.6</td> <td class="license"><a href="http://creativecommons.org/licenses/by/1.0/">Creative Commons Attribution 1.0</a></td> <td class="location"><a href="http://google-web-toolkit.googlecode.com/svn/trunk/tools/benchmark-viewer/src/com/google/gwt/benchmarks/viewer/client/BrowserInfo.java">google-web-toolkit.googlecode.com</a>; transliterated into Java source</td> </tr> - <tr class="even"> + <tr> <td class="package">Eclipse Java Development Tools (JDT)</td> <td class="license"><a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License v. 1.0</a></td> <td class="location"><a href="http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.1-200709211145/download.php?dropFile=eclipse-JDT-SDK-3.3.1.zip">eclipse.org</a></td> </tr> - <tr> + <tr class="even"> <td class="package">Eclipse Standard Widget Toolkit (SWT)</td> <td class="license"><a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License v. 1.0</a></td> <td class="location"> <a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/download.php?dropFile=swt-3.2.1-gtk-linux-x86.zip">Linux</a>, <a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/download.php?dropFile=swt-3.2.1-win32-win32-x86.zip">Windows</a>, and <a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/download.php?dropFile=swt-3.2.1-carbon-macosx.zip">Mac</a>; - modifications are at org/eclipse/swt within gwt-dev.jar + modifications are at org/eclipse/swt/ within gwt-dev.jar </td> </tr> + <tr> + <td class="package">Jetty 6.1.11</td> + <td class="license">Apache License v. 2.0 (above)</td> + <td class="location"><a href="http://mortbay.org/jetty/">mortbay.org/jetty</a></td> + </tr> <tr class="even"> <td class="package">JFreeChart</td> <td class="license"><a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License v. 2.1</a></td> @@ -317,11 +332,6 @@ <td class="package">Mozilla 1.7.12 (Linux only)</td> <td class="license"><a href="http://www.mozilla.org/MPL/MPL-1.1.txt">Mozilla Public License v. 1.1</a></td> <td class="location"><a href="http://developer.mozilla.org/en/docs/Download_Mozilla_Source_Code">mozilla.org</a></td> - </tr> - <tr> - <td class="package">WebKit 418.9 (Mac only)</td> - <td class="license"><a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License v. 2.1</a></td> - <td class="location"><a href="http://webkit.org/building/checkout.html">webkit.org</a></td> </tr> </tbody></table> Modified: trunk/distro-source/core/src/about.html ============================================================================== --- trunk/distro-source/core/src/about.html (original) +++ trunk/distro-source/core/src/about.html Tue May 19 08:35:33 2009 @@ -73,6 +73,11 @@ </ul </li> <li>The <a href="http://www.jfree.org/jfreechart/">JFreeChart Project</a></li> + <li>The <a href="http://www.mortbay.com/">Mort Bay Consulting</a> + <ul> + <li><a href="http://mortbay.org/jetty/">Jetty 6.1.11</a> </li> + </ul> + </li> <li> The <a href="http://www.mozilla.org/">Mozilla Foundation</a> <ul> @@ -80,12 +85,16 @@ <li><a href="http://www.mozilla.org/rhino/">Rhino</a> (with modifications)</li> </ul </li> + <li>The <a href="http://www.objectweb.org/">ObjectWeb</a> + <ul> + <li><a href="http://asm.objectweb.org/">ASM</a> (with modifications)</li> + </ul> + </li> <li>The <a href="http://openqa.org/">OpenQA Project</a> <ul> <li><a href="http://selenium-rc.openqa.org/">Selenium-RC</a> </li> </ul> </li> - <li>The <a href="http://www.webkit.org/">WebKit Open Source Project</a></li> </ul> For source availability and license information see COPYING.html. Modified: trunk/distro-source/core/src/about.txt ============================================================================== --- trunk/distro-source/core/src/about.txt (original) +++ trunk/distro-source/core/src/about.txt Tue May 19 08:35:33 2009 @@ -11,11 +11,14 @@ - Java Development Tools (http://www.eclipse.org/jdt/) - Standard Widget Toolkit (http://www.eclipse.org/swt/) with modifications - The JFreeChart project (http://www.jfree.org/jfreechart/) + - Mort Bay Consulting (http://www.mortbay.com/) + - Jetty 6.1.11 (http://mortbay.org/jetty/) - The Mozilla Foundation (http://www.mozilla.org/). - Mozilla 1.7.12 (http://www.mozilla.org/releases/mozilla1.7.12/) - Rhino (http://www.mozilla.org/rhino/) with modifications + - ObjectWeb (http://www.objectweb.org/) + - ASM (http://asm.objectweb.org/) with modifications - The OpenQA Project (http://openqa.org/) - Selenium-RC (http://selenium-rc.openqa.org/) - - The WebKit Open Source Project (http://www.webkit.org) For source availability and license information see COPYING. Modified: trunk/distro-source/core/src/index.html ============================================================================== --- trunk/distro-source/core/src/index.html (original) +++ trunk/distro-source/core/src/index.html Tue May 19 08:35:33 2009 @@ -40,9 +40,9 @@ <p>Ajax is hard. But you're not alone!</p> <ul> <li> - <a href="http://code.google.com/docreader/?p(google-web-toolkit-doc-1-6)s(google-web-toolkit-doc-1-6)t(ReleaseNotes_1_6)">What's new in GWT 1.6?</a> (online) + <a href="http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html">What's new in GWT 1.6?</a> (online) <div> - <a href="release_notes.html">Point releases notes</a> are also available locally. + <a href="release_notes.html">Point releases notes</a> are also included in the distribution. </div> </li> <li> @@ -67,7 +67,7 @@ </div> </li> <li> - <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=FAQ">Frequently Asked Questions</a> (online) + <a href="http://code.google.com/webtoolkit/doc/1.6/FAQ.html">Frequently Asked Questions</a> (online) <div> Answers to the initial questions developers have about using GWT, including licensing, upgrades, and so on. </div> @@ -82,20 +82,20 @@ </div> </li> <li> - <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideDeveloperGuide">Developer Guide</a> (online) + <a href="http://code.google.com/webtoolkit/doc/1.6/DevGuide.html">Developer Guide</a> (online) <div> The Developer Guide explains the key concepts in GWT. </div> </li> <li> - <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideWidgetGallery"> + <a href="http://code.google.com/webtoolkit/doc/1.6/RefWidgetGallery.html"> Widget Gallery</a> (online) <div> Browse some of the built-in GWT widgets and panels. </div> </li> <li> - <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideCommandLineTools">Command-line + <a href="http://code.google.com/webtoolkit/doc/1.6/RefCommandLineTools.html">Command-line Tools</a> (online) <div> Scripts to help you get started with GWT projects. Modified: trunk/distro-source/core/src/release_notes.html ============================================================================== --- trunk/distro-source/core/src/release_notes.html (original) +++ trunk/distro-source/core/src/release_notes.html Tue May 19 08:35:33 2009 @@ -28,21 +28,23 @@ <body> <h1>Google Web Toolkit Release Notes</h1> <ul> - <li><a href="#Release_Notes_Current">@GWT_VERSION@</a></li> - <li><a href="#Release_Notes_1_5_3">1.5.3</a></li> - <li><a href="#Release_Notes_1_5_2">1.5.2</a></li> - <li><a href="#Release_Notes_1_5_1">1.5.1 (RC2)</a></li> - <li><a href="#Release_Notes_1_5_0">1.5.0 (RC)</a></li> - <li><a href="#Release_Notes_1_4_60">1.4.60</a></li> - <li><a href="#Release_Notes_1_4_59">1.4.59 (RC2)</a></li> - <li><a href="#Release_Notes_1_4_10">1.4.10 (RC)</a></li> - <li><a href="#Release_Notes_1_3_3">1.3.3</a></li> - <li><a href="#Release_Notes_1_3_1">1.3.1 (RC)</a></li> - <li><a href="#Release_Notes_1_2_22">1.2.22</a></li> - <li><a href="#Release_Notes_1_2_11">1.2.21 (RC)</a></li> - <li><a href="#Release_Notes_1_1_10">1.1.10</a></li> - <li><a href="#Release_Notes_1_1_0">1.1.0 (RC)</a></li> - <li><a href="#Release_Notes_1_0_21">1.0.21</a></li> + <li><a href="#Release_Notes_Current">@GWT_VERSION@</a></li> + <li><a href="#Release_Notes_1_6_3">1.6.3</a></li> + <li><a href="#Release_Notes_1_6_2">1.6.2</a></li> + <li><a href="#Release_Notes_1_5_3">1.5.3</a></li> + <li><a href="#Release_Notes_1_5_2">1.5.2</a></li> + <li><a href="#Release_Notes_1_5_1">1.5.1 (RC2)</a></li> + <li><a href="#Release_Notes_1_5_0">1.5.0 (RC)</a></li> + <li><a href="#Release_Notes_1_4_60">1.4.60</a></li> + <li><a href="#Release_Notes_1_4_59">1.4.59 (RC2)</a></li> + <li><a href="#Release_Notes_1_4_10">1.4.10 (RC)</a></li> + <li><a href="#Release_Notes_1_3_3">1.3.3</a></li> + <li><a href="#Release_Notes_1_3_1">1.3.1 (RC)</a></li> + <li><a href="#Release_Notes_1_2_22">1.2.22</a></li> + <li><a href="#Release_Notes_1_2_11">1.2.21 (RC)</a></li> + <li><a href="#Release_Notes_1_1_10">1.1.10</a></li> + <li><a href="#Release_Notes_1_1_0">1.1.0 (RC)</a></li> + <li><a href="#Release_Notes_1_0_21">1.0.21</a></li> </ul> <hr/> @@ -50,14 +52,26 @@ <h2>Release Notes for @GWT_VERSION@</h2> <h3>Fixed Issues</h3> <ul> - <li><code>ConstantMap</code> is really immutable now (it always should - have been); it also no longer generates serialization warnings when - attempting to serialize <code>Map<String,String></code></li> - <li><code>TreeMap</code> and <code>TreeSet</code> are now - serializable</li> + <li>The classpath in the scripts created by junitCreator was updated to refer to <code>/war/WEB-INF/classes</code> rather than <code>/bin</code>.</li> </ul> + <hr/> + <a name="Release_Notes_1_6_3"></a> + <h2>Release Notes for 1.6.3 (RC2)</h2> + <h3>Fixed Issues</h3> + <ul> + <li>Various <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=3496">servlet classpath issues</a> introduced in 1.6.2 are resolved.</li> + <li>JSP compilation should work out of the box in hosted mode.</li> + </ul> + <hr/> + <a name="Release_Notes_1_6_2"></a> + <h2>Release Notes for 1.6.2 (RC)</h2> + <p> + Please see <a href="http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html">What's new in GWT 1.6?</a> (online) + </p> + + <hr/> <a name="Release_Notes_1_5_3"></a> <h2>Release Notes for 1.5.3</h2> <h3>Fixed Issues</h3> Modified: trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java ============================================================================== --- trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java (original) +++ trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java Tue May 19 08:35:33 2009 @@ -88,8 +88,9 @@ return 1; } else { // TODO(FINDBUGS): is integer division correct? - return doc.getBody().getParentElement().getOffsetWidth() / - doc.getBody().getOffsetWidth(); + int bodyOffset = doc.getBody().getOffsetWidth(); + return bodyOffset == 0 ? 1 + : doc.getBody().getParentElement().getOffsetWidth() / bodyOffset; } } } Modified: trunk/user/src/com/google/gwt/dom/client/Element.java ============================================================================== --- trunk/user/src/com/google/gwt/dom/client/Element.java (original) +++ trunk/user/src/com/google/gwt/dom/client/Element.java Tue May 19 08:35:33 2009 @@ -42,7 +42,8 @@ /** * Determines whether the given {...@link JavaScriptObject} can be cast to an - * {...@link Element}. + * {...@link Element}. A <code>null</code> object will cause this method to + * return <code>false</code>. */ public static boolean is(JavaScriptObject o) { if (Node.is(o)) { @@ -53,9 +54,11 @@ /** * Determine whether the given {...@link Node} can be cast to an {...@link Element}. + * A <code>null</code> node will cause this method to return + * <code>false</code>. */ public static boolean is(Node node) { - return node.getNodeType() == Node.ELEMENT_NODE; + return (node != null) && (node.getNodeType() == Node.ELEMENT_NODE); } protected Element() { Modified: trunk/user/src/com/google/gwt/dom/client/Node.java ============================================================================== --- trunk/user/src/com/google/gwt/dom/client/Node.java (original) +++ trunk/user/src/com/google/gwt/dom/client/Node.java Tue May 19 08:35:33 2009 @@ -50,10 +50,12 @@ } /** - * Determines whether the given {...@link JavaScriptObject} is a DOM node. + * Determines whether the given {...@link JavaScriptObject} is a DOM node. A + * <code>null</code> object will cause this method to return + * <code>false</code>. */ public static native boolean is(JavaScriptObject o) /*-{ - return !!o.nodeType; + return (!!o) && (!!o.nodeType); }-*/; protected Node() { Modified: trunk/user/src/com/google/gwt/dom/client/Style.java ============================================================================== --- trunk/user/src/com/google/gwt/dom/client/Style.java (original) +++ trunk/user/src/com/google/gwt/dom/client/Style.java Tue May 19 08:35:33 2009 @@ -1146,6 +1146,13 @@ } /** + * Sets the color CSS property. + */ + public final void setColor(String value) { + setProperty(STYLE_COLOR, value); + } + + /** * Sets the cursor CSS property. */ public final void setCursor(Cursor value) { Modified: trunk/user/src/com/google/gwt/junit/tools/junit-hosted.cmdsrc ============================================================================== --- trunk/user/src/com/google/gwt/junit/tools/junit-hosted.cmdsrc (original) +++ trunk/user/src/com/google/gwt/junit/tools/junit-hosted.cmdsrc Tue May 19 08:35:33 2009 @@ -1 +1 @@ -...@java -Dgwt.args="-out www-test" -Xmx256M -cp "%~dp0\src;%~dp0\test;%~dp0\bin;@junitPath;@gwtUserPath;@gwtdevp...@extraclasspathssemicolon" junit.textui.TestRunner @clientpacka...@classname %* \ No newline at end of file +...@java -Dgwt.args="-out www-test" -Xmx256M -cp "%~dp0\src;%~dp0\test;%~dp0\war\WEB-INF\classes;@junitPath;@gwtUserPath;@gwtdevp...@extraclasspathssemicolon" junit.textui.TestRunner @clientpacka...@classname %* \ No newline at end of file Modified: trunk/user/src/com/google/gwt/junit/tools/junit-hostedsrc ============================================================================== --- trunk/user/src/com/google/gwt/junit/tools/junit-hostedsrc (original) +++ trunk/user/src/com/google/gwt/junit/tools/junit-hostedsrc Tue May 19 08:35:33 2009 @@ -1,3 +1,3 @@ #!/bin/sh APPDIR=`dirname $0`; -java @vmargs -Dgwt.args="-out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/bin:@junitPath:@gwtUserPath:@gwtdevp...@extraclasspathscolon" junit.textui.TestRunner @clientpacka...@classname "$@"; +java @vmargs -Dgwt.args="-out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/war/WEB-INF/classes:@junitPath:@gwtUserPath:@gwtdevp...@extraclasspathscolon" junit.textui.TestRunner @clientpacka...@classname "$@"; Modified: trunk/user/src/com/google/gwt/junit/tools/junit-web.cmdsrc ============================================================================== --- trunk/user/src/com/google/gwt/junit/tools/junit-web.cmdsrc (original) +++ trunk/user/src/com/google/gwt/junit/tools/junit-web.cmdsrc Tue May 19 08:35:33 2009 @@ -1 +1 @@ -...@java -Dgwt.args="-web -out www-test" -Xmx256M -cp "%~dp0\src;%~dp0\test;%~dp0\bin;@junitPath;@gwtUserPath;@gwtdevp...@extraclasspathssemicolon" junit.textui.TestRunner @clientpacka...@classname %* \ No newline at end of file +...@java -Dgwt.args="-web -out www-test" -Xmx256M -cp "%~dp0\src;%~dp0\test;%~dp0\war\WEB-INF\classes;@junitPath;@gwtUserPath;@gwtdevp...@extraclasspathssemicolon" junit.textui.TestRunner @clientpacka...@classname %* \ No newline at end of file Modified: trunk/user/src/com/google/gwt/junit/tools/junit-websrc ============================================================================== --- trunk/user/src/com/google/gwt/junit/tools/junit-websrc (original) +++ trunk/user/src/com/google/gwt/junit/tools/junit-websrc Tue May 19 08:35:33 2009 @@ -1,3 +1,3 @@ #!/bin/sh APPDIR=`dirname $0`; -java @vmargs -Dgwt.args="-web -out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/bin:@junitPath:@gwtUserPath:@gwtdevp...@extraclasspathscolon" junit.textui.TestRunner @clientpacka...@classname "$@"; +java @vmargs -Dgwt.args="-web -out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/war/WEB-INF/classes:@junitPath:@gwtUserPath:@gwtdevp...@extraclasspathscolon" junit.textui.TestRunner @clientpacka...@classname "$@"; Modified: trunk/user/src/com/google/gwt/user/tools/web.xmlsrc ============================================================================== --- trunk/user/src/com/google/gwt/user/tools/web.xmlsrc (original) +++ trunk/user/src/com/google/gwt/user/tools/web.xmlsrc Tue May 19 08:35:33 2009 @@ -4,11 +4,6 @@ "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> - - <!-- Default page to serve --> - <welcome-file-list> - <welcome-file>@startupUrl</welcome-file> - </welcome-file-list> <!-- Servlets --> <servlet> @@ -20,5 +15,10 @@ <servlet-name>greetServlet</servlet-name> <url-pattern>/@renameTo/greet</url-pattern> </servlet-mapping> + + <!-- Default page to serve --> + <welcome-file-list> + <welcome-file>@startupUrl</welcome-file> + </welcome-file-list> </web-app> Modified: trunk/user/test/com/google/gwt/dom/client/ElementTest.java ============================================================================== --- trunk/user/test/com/google/gwt/dom/client/ElementTest.java (original) +++ trunk/user/test/com/google/gwt/dom/client/ElementTest.java Tue May 19 08:35:33 2009 @@ -535,4 +535,18 @@ var ua = navigator.userAgent.toLowerCase(); return ua.indexOf("msie") != -1; }-*/; + + /** + * Tests Element.is() and Element.as(). + */ + public void testIsAndAs() { + assertFalse(Element.is(Document.get())); + + Node div = Document.get().createDivElement(); + assertTrue(Element.is(div)); + assertEquals("div", Element.as(div).getTagName().toLowerCase()); + + // Element.is(null) is allowed and should return false. + assertFalse(Element.is(null)); + } } Modified: trunk/user/test/com/google/gwt/dom/client/NodeTest.java ============================================================================== --- trunk/user/test/com/google/gwt/dom/client/NodeTest.java (original) +++ trunk/user/test/com/google/gwt/dom/client/NodeTest.java Tue May 19 08:35:33 2009 @@ -15,6 +15,7 @@ */ package com.google.gwt.dom.client; +import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.junit.client.GWTTestCase; /** @@ -290,5 +291,18 @@ assertEquals(btn0, txt1.getPreviousSibling()); assertEquals(null, txt0.getPreviousSibling()); assertEquals(null, txt1.getNextSibling()); + } + + /** + * Tests Element.is() and Element.as(). + */ + public void testIsAndAs() { + assertTrue(Node.is(Document.get())); + + JavaScriptObject text = Document.get().createTextNode("foo"); + assertTrue(Node.is(text)); + + // Node.is(null) is allowed and should return false. + assertFalse(Node.is(null)); } } --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---