rollback r7439 due to missing files
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7440 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/resources/css/CssGenerationVisitor.java b/user/src/com/google/gwt/resources/css/CssGenerationVisitor.java
index 39e4d89..cb92453 100644
--- a/user/src/com/google/gwt/resources/css/CssGenerationVisitor.java
+++ b/user/src/com/google/gwt/resources/css/CssGenerationVisitor.java
@@ -29,7 +29,6 @@
import com.google.gwt.resources.css.ast.CssRule;
import com.google.gwt.resources.css.ast.CssSelector;
import com.google.gwt.resources.css.ast.CssSprite;
-import com.google.gwt.resources.css.ast.CssUnknownAtRule;
import com.google.gwt.resources.css.ast.CssUrl;
import com.google.gwt.resources.css.ast.CssVisitor;
@@ -110,12 +109,6 @@
}
}
- @Override
- public void endVisit(CssUnknownAtRule x, Context ctx) {
- out.printOpt("/* Unknown at-rule */\n");
- out.print(x.getRule());
- }
-
public SortedMap<Integer, List<CssNode>> getSubstitutionPositions() {
return substitutionPositions;
}
diff --git a/user/src/com/google/gwt/resources/css/GenerateCssAst.java b/user/src/com/google/gwt/resources/css/GenerateCssAst.java
index bec0fb7..e76e8c6 100644
--- a/user/src/com/google/gwt/resources/css/GenerateCssAst.java
+++ b/user/src/com/google/gwt/resources/css/GenerateCssAst.java
@@ -30,7 +30,6 @@
import com.google.gwt.resources.css.ast.CssSelector;
import com.google.gwt.resources.css.ast.CssSprite;
import com.google.gwt.resources.css.ast.CssStylesheet;
-import com.google.gwt.resources.css.ast.CssUnknownAtRule;
import com.google.gwt.resources.css.ast.CssUrl;
import com.google.gwt.resources.css.ast.HasNodes;
import com.google.gwt.resources.css.ast.HasProperties;
@@ -237,22 +236,15 @@
* Reflectively invoke a method named parseRule on this instance.
*/
public void ignorableAtRule(String atRule) throws CSSException {
- int idx = atRule.indexOf(" ");
- if (idx == -1) {
- // Empty rule like @foo;
- addNode(new CssUnknownAtRule(atRule));
- return;
- }
- String ruleName = atRule.substring(1, idx);
+ String ruleName = atRule.substring(1, atRule.indexOf(" "));
String methodName = "parse" + (Character.toUpperCase(ruleName.charAt(0)))
- + ruleName.substring(1).toLowerCase();
+ + ruleName.substring(1);
try {
Method parseMethod = getClass().getDeclaredMethod(methodName,
String.class);
parseMethod.invoke(this, atRule);
} catch (NoSuchMethodException e) {
- // A rule like @-webkit-keyframe {...} that we can't process
- addNode(new CssUnknownAtRule(atRule));
+ errors.log(TreeLogger.WARN, "Ignoring @" + ruleName);
} catch (IllegalAccessException e) {
errors.log(TreeLogger.ERROR, "Unable to invoke parse method ", e);
} catch (InvocationTargetException e) {
diff --git a/user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java b/user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java
index 9995015..da94bb0 100644
--- a/user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java
+++ b/user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java
@@ -246,13 +246,6 @@
addToNodes(newUrl);
return true;
}
-
- @Override
- public boolean visit(CssUnknownAtRule x, Context ctx) {
- CssUnknownAtRule newRule = new CssUnknownAtRule(x.getRule());
- addToNodes(newRule);
- return true;
- }
/**
* Add a cloned node instance to the output.
diff --git a/user/src/com/google/gwt/resources/css/ast/CssVisitor.java b/user/src/com/google/gwt/resources/css/ast/CssVisitor.java
index a8520fc..15012a6 100644
--- a/user/src/com/google/gwt/resources/css/ast/CssVisitor.java
+++ b/user/src/com/google/gwt/resources/css/ast/CssVisitor.java
@@ -157,13 +157,6 @@
/**
* @param x the node being visited
* @param ctx the context for the visit
- */
- public void endVisit(CssUnknownAtRule x, Context ctx) {
- }
-
- /**
- * @param x the node being visited
- * @param ctx the context for the visit
* @return
*/
public boolean visit(CssDef x, Context ctx) {
@@ -278,15 +271,6 @@
return true;
}
- /**
- * @param x the node being visited
- * @param ctx the context for the visit
- * @return
- */
- public boolean visit(CssUnknownAtRule x, Context ctx) {
- return true;
- }
-
protected void doAccept(List<? extends CssNode> list) {
for (CssNode node : list) {
doTraverse(node, UNMODIFIABLE_CONTEXT);
diff --git a/user/test/com/google/gwt/resources/ResourcesSuite.java b/user/test/com/google/gwt/resources/ResourcesSuite.java
index 7ab12b6..5617781 100644
--- a/user/test/com/google/gwt/resources/ResourcesSuite.java
+++ b/user/test/com/google/gwt/resources/ResourcesSuite.java
@@ -25,7 +25,6 @@
import com.google.gwt.resources.css.CssReorderTest;
import com.google.gwt.resources.css.CssRtlTest;
import com.google.gwt.resources.css.ExtractClassNamesVisitorTest;
-import com.google.gwt.resources.css.UnknownAtRuleTest;
import com.google.gwt.resources.ext.ResourceGeneratorUtilTest;
import junit.framework.Test;
@@ -47,7 +46,6 @@
suite.addTestSuite(NestedBundleTest.class);
suite.addTestSuite(ResourceGeneratorUtilTest.class);
suite.addTestSuite(TextResourceTest.class);
- suite.addTestSuite(UnknownAtRuleTest.class);
return suite;
}
}
diff --git a/user/test/com/google/gwt/resources/client/test.css b/user/test/com/google/gwt/resources/client/test.css
index 148adb8..0d3efdb 100644
--- a/user/test/com/google/gwt/resources/client/test.css
+++ b/user/test/com/google/gwt/resources/client/test.css
@@ -221,8 +221,3 @@
/* The @external parser attempts to be flexible */
@external externalA, .externalB externalC;
.externalA .replacement, .externalB, .externalC {border: GREEN;}
-
-/* Check unknown at-rules */
-@dontIgnoreThis;
-@dontIgnoreThis { /* the space between the name and the { is important */ }
-@dontIgnoreThisToo{ some { random : content } }