PDA

View Full Version : new chrome 24.X version problems



baze
13 Jan 2013, 4:49 AM
Hi,

I have couple of projects where I use extgwt and gxt, since google update chrome to version 24 all the
fadein/out slidein/out , etc are not working(the are stuck in a endless loop).

The same behaver can be seen on the examples and examples-2 test cases...

Im not sure if its more a question for the chromium team or maybe for the GWT team,
there is a question on the gwt forum:

https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/UBWsvHYM4SE

but they say 2.5 should be the fix...i used this one but the problem persist.
I guess you have internal implement...

Blaze

harun
14 Jan 2013, 7:56 AM
Hi ,

try this, Workaround in comment 27 works very well.

http://code.google.com/p/chromium/issues/detail?id=158910

Colin Alworth
14 Jan 2013, 11:44 AM
If the workaround works, then updating to GWT 2.5.0 (the latest stable release, about 3 months old) should work as well as a more permanent fix. The same GXT jar that supports GWT 2.4 will also support GWT 2.5.

A quick look at the Fx types in GXT 2.2 says that those animations are backed by the GWT Animation class, so both the fix (update to 2.5.0) and the workaround (additional <replace-with> rules) should work.

harun
14 Jan 2013, 11:26 PM
Hi Colin,

you're right, but after using GWT 2.5.0 I received this warning message while compile, is it important or is there any solution for this?


[java] Computing all possible rebind results for 'com.google.gwt.user.client.ui.NamedFrame.IFrameTemplate'
[java] Rebinding com.google.gwt.user.client.ui.NamedFrame.IFrameTemplate
[java] Invoking generator com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
[java] Constructing interface com.google.gwt.user.client.ui.NamedFrame.IFrameTemplate
[java] Generating method body for get()
[java] Template with variable in URL attribute context: The template code generator will sanitize the URL. Use SafeUri to specify arguments in a URL attribute context that should not be sanitized.
[java]

baze
15 Jan 2013, 3:15 AM
Hi,

I spend some time after posting here and I saw that the extgwt and gxt implement uses the animation classes from gwt. So 2.5 fix the problem, its using now the correct animation frames.

Like I wrote before I did the update even before posting here, but probablly my update to 2.5 didnt went ok.
After rechecking the process and compile again the bug is not present, also there was no warning or what so ever messages.

what was your debug level for the compile process, and which mode did you used?!

Blaze

harun
15 Jan 2013, 3:38 AM
Log Level: Info,
Output style: Obfuscated and Pretty

baze
15 Jan 2013, 5:33 AM
I recompile with info and debug + obfuscated and pretty, but I dont get any warning.

Here are the rule matching:


Checking rule <generate-with class='com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator'/>
[java] Checking if all subconditions are true (<all>)
[java] <when-assignable class='com.google.gwt.safehtml.client.SafeHtmlTemplates'/>
[java] No, the requested type was not assignable
[java] No: One or more subconditions was false
[java] Rule did not match
[java] Found better fallback match for <generate-with class='com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator'/>
[java] Checking rule <replace-with class='com.google.gwt.animation.client.AnimationSchedulerImplWebkit'/>
[java] Checking if all subconditions are true (<all>)
[java] <when-type-is class='com.google.gwt.animation.client.AnimationScheduler'/>
[java] Not an exact match
[java] No: One or more subconditions was false
[java] Rule did not match
[java] Found better fallback match for <replace-with class='com.google.gwt.animation.client.AnimationSchedulerImplWebkit'/>
[java] Checking rule <replace-with class='com.google.gwt.animation.client.AnimationSchedulerImplMozilla'/>
[java] Checking if all subconditions are true (<all>)
[java] <when-type-is class='com.google.gwt.animation.client.AnimationScheduler'/>
[java] Not an exact match
[java] No: One or more subconditions was false
[java] Rule did not match
[java] Found better fallback match for <replace-with class='com.google.gwt.animation.client.AnimationSchedulerImplMozilla'/>
[java] Checking rule <replace-with class='com.google.gwt.animation.client.AnimationSchedulerImplTimer'/>
[java] Checking if all subconditions are true (<all>)
[java] <when-type-is class='com.google.gwt.animation.client.AnimationScheduler'/>
[java] Not an exact match
[java] No: One or more subconditions was false
[java] Rule did not match
[java] Found better fallback match for <replace-with class='com.google.gwt.animation.client.AnimationSchedulerImplTimer'/>

harun
15 Jan 2013, 5:36 AM
Hi baze,

are you using GXT 2.2.5 and GWT 2.5.0?

baze
15 Jan 2013, 5:43 AM
Hi Harun,

This one that I post the rebind its a GXT(extgwt) 2.2.5 and GWT 2.5.0,
I have other project with GXT 3.0.1 and GWT 2.5.0 and also has no problems.

Dose your compiled application work or?!

harun
15 Jan 2013, 6:15 AM
Yes, it is working like a charm,

But as I already mentioned, it is only warning, not error

I think it is not important,

baze
15 Jan 2013, 6:41 AM
Well is probably some miss config to the jar dependencies,
but if its working then its not important.

Cheers,
Baze

Colin Alworth
15 Jan 2013, 3:58 PM
The warning shown looks like it is coming from the GWT class NamedFrame, which you may be using somewhere in your application. In GWT 2.5.0 it seems to have been changed to use a SafeHtmlTemplates instance to draw the iframe more easily, and apparently the template isn't completely safe according to the built-in rules. That said, since the argument to be passed into that template is always the string "javascript:''", there is no way that this particular issue can be made unsafe.

This is never created directly from within GWT or GXT, so I suspect you'll find it created somewhere in your codebase. It is likely that you can use another GWT class, Frame instead, which should not emit this warning, but I can't be certain about this without seeing your code. It may be that this NamedFrame is being created within a UiBinder xml file, so you'll need to check them as well.

It appears thought it should be safe to ignore this warning, but you might find it easier to just change out that instance for a different frame.

harun
29 Jan 2013, 7:48 AM
Hi Colin,

thanks for your detailed explanation,

I scanned my projects from beginning to end, at last I found the cause of this warning.

I used NamedFrame when I download a file, with hidden iframe.





public static void downloadFile( String url)
{
boolean frameExists = ( RootPanel.get( "downloadiframe" ) != null );
if ( frameExists ) {
Widget widgetFrame = (Widget) RootPanel.get( "downloadiframe" );
widgetFrame.removeFromParent();
}

NamedFrame frame = new NamedFrame( "downloadiframe" );
frame.setUrl( url );
frame.setVisible( false );

RootPanel.get().add( frame );
}


Now I replaced my code like following:





public static void downloadFile( String url)
{
if ( downloadFrame != null ) downloadFrame.removeFromParent();
downloadFrame = new Frame( url );
downloadFrame.setVisible( false );
RootPanel.get().add( downloadFrame );
}


And I got rid of this compiler warning.

Thanks a lot for this hint!

Colin Alworth
29 Jan 2013, 8:58 AM
This patch to GWT will prevent that compiler warning from happening in future versions of GWT: https://gwt-review.googlesource.com/#/c/1800/

Not my doing, I just happened to see it in my inbox this morning along with your post.

harun
30 Jan 2013, 12:21 AM
Colin, they're too late aren't they?

so unlucky to me, I have already solved it...

Forget whatever...