Change initialization pattern for CSS enums to allow better compiler pruning.
<when-property-is name="user.agent" value="gecko"/>\r
<when-property-is name="user.agent" value="ie6"/>\r
</any>\r
-\r
</generate-with>\r
\r
<generate-with class="com.google.gwt.query.rebind.SelectorGeneratorXPath">\r
</any>\r
</generate-with>\r
\r
+ <generate-with class="com.google.gwt.query.rebind.SelectorGeneratorNative">\r
+ <when-type-assignable class="com.google.gwt.query.client.Selectors"/>\r
+ <all>\r
+ <when-property-is name="selectorCapability" value="native"/>\r
+ <when-property-is name="user.agent" value="safari"/>\r
+ </all>\r
+ </generate-with>\r
+\r
\r
<replace-with class="com.google.gwt.query.client.impl.DocumentStyleImpl">\r
<when-type-assignable class="com.google.gwt.query.client.impl.DocumentStyleImpl"/>\r
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
/**
* This property affects the vertical positioning inside a line box of the boxes
public class BackgroundAttachment
implements CssProperty<BackgroundAttachment.AttachValue> {
- public BackgroundAttachment() {
- CSS.FIXED = AttachValue.create("fixed");
- CSS.SCROLL = AttachValue.create("scroll");
- }
-
public static void init() {
CSS.BACKGROUND_ATTACHMENT = new BackgroundAttachment();
+ CSS.FIXED = AttachValue.create("fixed");
+ CSS.SCROLL = AttachValue.create("scroll");
}
public void set(Style s, AttachValue value) {
public class BackgroundColor
implements CssProperty<RGBColor> {
- public BackgroundColor() {
- }
-
public static void init() {
CSS.BACKGROUND_COLOR = new BackgroundColor();
}
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
/**
* This property specifies whether a box should float to the left, right, or not
*/
public class Cursor implements CssProperty<Cursor.CursorValue> {
- public Cursor() {
+ public static void init() {
+ CSS.CURSOR = new Cursor();
CSS.CURSOR_AUTO = CursorValue.create("auto");
CSS.CURSOR_CROSSHAIR = CursorValue.create("crosshair");
CSS.CURSOR_DEFAULT = CursorValue.create("default");
CSS.CURSOR_W_RESIZE = CursorValue.create("w-resize");
}
- public static void init() {
- CSS.CURSOR = new Cursor();
- }
-
public void set(Style s, CursorValue value) {
s.setProperty("float", value.value());
}
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
/**
* This property specifies the mechanism by which elements are rendered.
public static void init() {
CSS.DISPLAY = new Display();
- }
-
- public Display() {
CSS.BLOCK = DisplayValue.create("block");
CSS.INLINE = DisplayValue.create("inline");
CSS.INLINE_BLOCK = DisplayValue.create("inline-block");
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
/**
* This property specifies whether a box should float to the left, right, or not
*/
public class Float implements CssProperty<Float.FloatValue> {
- public Float() {
+ public static void init() {
+ CSS.FLOAT = new Float();
CSS.FLOAT_LEFT = FloatValue.create("left");
CSS.FLOAT_RIGHT = FloatValue.create("right");
CSS.FLOAT_NONE = FloatValue.create("none");
}
- public static void init() {
- CSS.FLOAT = new Float();
- }
-
public void set(Style s, FloatValue value) {
s.setProperty("float", value.value());
}
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
/**
* This property describes how inline content of a block is aligned.
*/
public class TextAlign implements CssProperty<TextAlign.TAlignValue> {
- public TextAlign() {
+ public static void init() {
+ CSS.TEXT_ALIGN = new TextAlign();
CSS.LEFT = TAlignValue.create("left");
CSS.RIGHT = TAlignValue.create("right");
CSS.CENTER = TAlignValue.create("center");
CSS.JUSTIFY = TAlignValue.create("justify");
}
- public static void init() {
- CSS.TEXT_ALIGN = new TextAlign();
- }
-
public void set(Style s, TAlignValue value) {
s.setProperty("textAlign", value.value());
}
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
-
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
import static com.google.gwt.query.client.css.VerticalAlign.VAlignValue.create;
/**
implements CssProperty<VerticalAlign.VAlignValue>, TakesPercentage,
TakesLength {
- public VerticalAlign() {
+ public static void init() {
+ CSS.VERTICAL_ALIGN = new VerticalAlign();
CSS.TOP = create("top");
CSS.BOTTOM = create("bottom");
CSS.BASELINE = create("baseline");
CSS.TEXT_BOTTOM = create("text-bottom");
}
- public static void init() {
- CSS.VERTICAL_ALIGN = new VerticalAlign();
- }
-
public void set(Style s, VAlignValue value) {
s.setProperty("verticalAlign", value.value());
}
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.dom.client.Style;
/**
* The 'visibility' property specifies whether the boxes generated by an element
*/
public class Visibility implements CssProperty<Visibility.VisibilityValue> {
- public Visibility() {
+ public static void init() {
+ CSS.VISIBILITY = new Visibility();
CSS.VISIBLE = VisibilityValue.create("visible");
CSS.HIDDEN = VisibilityValue.create("hidden");
CSS.COLLAPSE = VisibilityValue.create("collapse");
}
- public static void init() {
- CSS.VISIBILITY = new Visibility();
- }
-
public void set(Style s, VisibilityValue value) {
s.setProperty("visibility", value.value());
}
*/
public class Width implements TakesLength, TakesPercentage {
- public Width() {
- }
-
public static void init() {
CSS.WIDTH = new Width();
}
return "Native" + super.getImplSuffix();\r
}\r
\r
+ @Override\r
+ protected boolean hasGetElementsByClassName() {\r
+ return true;\r
+ }\r
+\r
protected void generateMethodBody(SourceWriter sw, JMethod method,\r
TreeLogger treeLogger, boolean hasContext)\r
throws UnableToCompleteException {\r