Reviewers: rdayal,
Please review this at http://gwt-code-reviews.appspot.com/1614806/
Affected files:
M user/src/com/google/gwt/dom/client/StyleInjector.java
Index: user/src/com/google/gwt/dom/client/StyleInjector.java
diff --git a/user/src/com/google/gwt/dom/client/StyleInjector.java
b/user/src/com/google/gwt/dom/client/StyleInjector.java
index
1e09481c56f4fb3c08ac9e388218c419162de30b..ef8957a8741d8f4e85cdc42da7e2a58c403ed7d6
100644
--- a/user/src/com/google/gwt/dom/client/StyleInjector.java
+++ b/user/src/com/google/gwt/dom/client/StyleInjector.java
@@ -213,6 +213,17 @@ public class StyleInjector {
private static boolean needsInjection = false;
/**
+ * Flushes any pending stylesheets to the document.
+ *
+ * This can be useful if you used CssResource.ensureInjected but
+ * now in the same event loop want to measure widths based on the
+ * new styles.
+ */
+ public static void flush() {
+ inject(true);
+ }
+
+ /**
* Add a stylesheet to the document.
*
* @param css the CSS contents of the stylesheet
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors