Reviewers: Ray Ryan, jlabanca, Description: Fixes issues 1585 and 3962 (and 3897, which is a dupe) by adding createPush/Reset/SubmitButtonElement to Document (and deprecates createButtonElement), using deferred binding to ensure the correct button type is created; and using createPushButtonElement in Button's ctor.
This patch also adds a SubmitButton widget (as requested by issue 3203) that just extends Button using the createSubmitButtonElement in the ctor. For completeness, I also added a ResetButton widget and createButton/Reset/SubmitInputElement methods to Document. Things I'm unsure about: - createButtonElement still is implementation-dependent (and "compat mode" dependent in IE8), maybe it should just be an alias for createPushButtonElement - I've only added the ResetButton widget for completeness; maybe we shouldn't have it, as it opens the door a bit wider for requests like "how to define the default value for my form field so that it correctly resets when using a ResetButton?"; though note that FormPanel.reset() has this very same "problem". - Button#wrap checks that the button's type is "button"; this breaks backwards compatibility (you would now have to use SubmitButton.wrap() or ResetButton;wrap() to wrap other types of buttons, with no added feature/behaviour) Please review this at http://gwt-code-reviews.appspot.com/61809 Affected files: reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue3962.java user/src/com/google/gwt/dom/client/DOMImpl.java user/src/com/google/gwt/dom/client/DOMImplTrident.java user/src/com/google/gwt/dom/client/Document.java user/src/com/google/gwt/user/client/ui/Button.java user/src/com/google/gwt/user/client/ui/ResetButton.java user/src/com/google/gwt/user/client/ui/SubmitButton.java user/test/com/google/gwt/dom/client/DocumentTest.java user/test/com/google/gwt/dom/client/ElementTest.java user/test/com/google/gwt/user/client/ui/ButtonTest.java --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
