diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index be6fee2397..aa8358070e 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -379,17 +379,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { onImageLoad: function() { var img = this.imgDiv; OpenLayers.Event.stopObservingElement(img); - - OpenLayers.Animation.requestFrame(OpenLayers.Function.bind(function() { - // make sure we are not destroyed and not being reused for a - // different image - if (this.imgDiv === img) { - img.style.visibility = 'inherit'; - img.style.opacity = this.layer.opacity; - this.events.triggerEvent("loadend"); - } - }, this)); - + img.style.visibility = 'inherit'; + img.style.opacity = this.layer.opacity; + this.events.triggerEvent("loadend"); this.isLoading = false; this.canvasContext = null; diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 49a6075e8d..26c4edccfa 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -770,9 +770,6 @@ } function test_setOpacity(t) { - var origRequestFrame = OpenLayers.Animation.requestFrame; - OpenLayers.Animation.requestFrame = function(fn) { fn(); }; - t.plan(5); var map = new OpenLayers.Map('map'); @@ -801,8 +798,6 @@ t.eq(parseFloat(tile.imgDiv.style.opacity), 0.2, "tile opacity is correc"); map.destroy(); - - OpenLayers.Animation.requestFrame = origRequestFrame } function test_getServerResolution(t) { @@ -1313,9 +1308,6 @@ } function test_delayed_back_buffer_removal(t) { - var origRequestFrame = OpenLayers.Animation.requestFrame; - OpenLayers.Animation.requestFrame = function(fn) { fn(); }; - // // Test that the delaying of the back buffer removal behaves // as expected. @@ -1359,8 +1351,6 @@ // tear down map.destroy(); - - OpenLayers.Animation.requestFrame = origRequestFrame; } function test_getGridData(t) { diff --git a/tests/Tile/Image.html b/tests/Tile/Image.html index 30ff1f1d18..6cd2aacb87 100644 --- a/tests/Tile/Image.html +++ b/tests/Tile/Image.html @@ -4,8 +4,6 @@