EVALUATION
When instantiating the ActiveX control corresponding to the applet
tag, the IE browser makes one or more calls to the COM method
SetObjectRects, which sets the bounds of the control, with bogus
values. The old Java Plug-In's code to handle this case was extremely
difficult to comprehend and was also incorrect for situations such as
running applets on a hi-DPI monitor, where IE automatically increases
the width and height of images and applets on the web page.
In the new plug-in, we have attempted to heuristically detect these
invalid calls to SetObjectRects and filter them out, so that we can
provide a correct initial width and height when starting the applet.
These heuristics have caused some problems in the past, such as
6627606 (Microsoft LiveMeeting applet does not work), in which an
applet which deliberately had a zero width and height failed to start.
The speed-trap.com dashboard applet defeats even the most recent
version of our heuristics. The end result is that at the point
SetObjectRects is called, it is not possible to conclusively determine
whether we should start the applet or not. It is bad to start some
applets with an incorrect initial width and height, because these
applets do not handle resizes well. It is worse to fail to launch
applets at all because it appeared that the only calls to
SetObjectRects were with invalid arguments, when in fact they were
supposed to be treated as valid.
The heuristics have been changed so that a call to SetObjectRects with
a seemingly invalid width and height will not prevent launching of the
applet, but only delay it for at most a certain period of time, here
defined as 500 ms. This appears to be sufficient to subsume the
previous heuristic as well as launch the speed-trap.com applet in a
reasonable timeframe.
Tested with the speed-trap.com dashboard, as well as the AcuteScroller
applet from http://javaboutique.internet.com/AcuteScroller, the VRX
studios hotel applets (http://vrxstudios.com/hotel_program), the games
at iWon.com (http://games.iwon.com/), the Pogo games, and the
regression test for 6627606. Ran each test several times (the Pogo
games 30+ times) to ensure that there are no apparent race conditions
introduced with this change.
|