GWT treats Chrome and Safari the same, so there is only a "safari" agent value that covers both. So you can't do this just using user agent configurations.
However GWT's deferred binding mechanisms do have a way for you to tailor your code to properties that are only sniffed at runtime, by creating "property providers". This is basically how you would do this in your .gwt.xml:
<define-property name="is.really.chrome" values="false,true"/>
<property-provider name="is.really.chrome"><![CDATA[
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("applewebkit") != -1) {
if (ua.indexOf("chrome") != -1) {
return true;
}
}
return false;
]]></property-provider>
<replace-with
class="some.implementation.of.interface">
<when-type-is class="some.interface.used.with.GWT.create"/>
<when-property-is name="user.agent" value="safari"/>
<when-property-is name="is.really.chrome" value="true"/>
</replace-with>
What the top part of the above does is define a new property "is.really.chrome" whose value will be determined by the Javascript code in the <property-provider>
block when your application is loaded (this code gets inlined into the GWT startup sequence.)
The second part, the <replace-with>
, shows how you would define a replacement rule that was sensitive to the value of this new property. This (and any other rules like it) will cause the GWT compiler to create an additional permutation of the code which is mostly the same as the safari version but with your chrome customizations.
This article is one of the best I've found on the subject: http://css.dzone.com/news/understanding-gwt-compiler