The code Musuem now inherits StandardResources instead of Standard, so we do not include the GWT default style sheet automatically.  As a result, we do not need to remove the default style sheet, so all that code has been removed.

Patch by: jlabanca
Review by: ecc (desk review)



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@3014 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml b/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml
index eb1cb56..3814d6a 100644
--- a/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml
+++ b/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml
@@ -2,7 +2,7 @@
     
     <!-- Inherit the core Web Toolkit stuff.                  -->
     <inherits name='com.google.gwt.user.User'/>
-    <inherits name="com.google.gwt.user.theme.standard.Standard"/>
+    <inherits name="com.google.gwt.user.theme.standard.StandardResources"/>
    
     <source path="client/common"/>
     <source path="client/viewer"/>
diff --git a/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml b/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
index a986ac3..758fd87 100644
--- a/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
+++ b/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
@@ -2,7 +2,7 @@
     
     <!-- Inherit the core Web Toolkit stuff.                  -->
     <inherits name='com.google.gwt.user.User'/>
-    <inherits name="com.google.gwt.user.theme.standard.Standard"/>
+    <inherits name="com.google.gwt.user.theme.standard.StandardResources"/>
     
     <!-- Specify the app entry point class.                   -->
     <entry-point class='com.google.gwt.museum.client.defaultmuseum.Issue1488'/>
diff --git a/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java b/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java
index 7cbe913..ef76e19 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java
@@ -117,7 +117,6 @@
   }
 
   public void onModuleLoad() {
-    Utility.removeGwtStyleSheet();
     Utility.getHeadElement().appendChild(createCSS());
     Window.setTitle(getHeadline());
     RootPanel.get().add(new HTML(getInstructions()));
diff --git a/reference/code-museum/src/com/google/gwt/museum/client/common/Utility.java b/reference/code-museum/src/com/google/gwt/museum/client/common/Utility.java
index 1331a8a..c4d4093 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/common/Utility.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/common/Utility.java
@@ -16,10 +16,7 @@
 

 package com.google.gwt.museum.client.common;

 

-import com.google.gwt.dom.client.Element;

 import com.google.gwt.dom.client.HeadElement;

-import com.google.gwt.dom.client.Node;

-import com.google.gwt.dom.client.NodeList;

 

 /**

  * Utility helper methods.

@@ -33,27 +30,4 @@
   public static native HeadElement getHeadElement() /*-{

     return $doc.getElementsByTagName("head")[0];

   }-*/;

-

-  /**

-   * Remove the GWT style sheet from the head element so it does not conflict

-   * with this styles used by the issue. The CSS file used by the issue can

-   * still import the GWT style sheet if needed.

-   */

-  public static void removeGwtStyleSheet() {

-    // Remove the GWT style sheet

-    HeadElement headElem = getHeadElement();

-    NodeList<Node> children = headElem.getChildNodes();

-    for (int i = 0; i < children.getLength(); i++) {

-      Node node = children.getItem(i);

-      if (node.getNodeType() == Node.ELEMENT_NODE) {

-        Element elem = Element.as(node);

-        if (elem.getTagName().equalsIgnoreCase("link")

-            && elem.getPropertyString("rel").equalsIgnoreCase("stylesheet")

-            && elem.getPropertyString("href").contains("standard.css")) {

-          headElem.removeChild(elem);

-          return;

-        }

-      }

-    }

-  }

 }

diff --git a/reference/code-museum/src/com/google/gwt/museum/client/viewer/Museum.java b/reference/code-museum/src/com/google/gwt/museum/client/viewer/Museum.java
index f633add..b8e07e6 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/viewer/Museum.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/viewer/Museum.java
@@ -136,8 +136,6 @@
   }
 
   public void onModuleLoad() {
-    Utility.removeGwtStyleSheet();
-
     // Add the options and issue containers to the page
     RootPanel.get().add(createOptionsPanel());
     RootPanel.get().add(issueDescription);