From 6568eb4d8a899a4385063b797c0c9c74b7b56b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 2 Nov 2009 09:55:18 +0000 Subject: [PATCH] do not change the src of broken images, as this prevents from being able to right-click on the image and see the server error, p=rdewit, r=me (closes #2318) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9771 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Util.js | 1 - tests/Util.html | 7 ++----- tests/manual/clip-features-svg.html | 3 +-- tests/manual/google-panning.html | 3 +-- theme/default/style.css | 7 +++---- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 7b03fa81f2..99a8596634 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -380,7 +380,6 @@ OpenLayers.Util.onImageLoadError = function() { this.src = this.src; } } else { - this.src = OpenLayers.Util.getImagesLocation() + "blank.gif"; OpenLayers.Element.addClass(this, "olImageLoadError"); } this.style.display = ""; diff --git a/tests/Util.html b/tests/Util.html index c4d6436e68..06685977fc 100644 --- a/tests/Util.html +++ b/tests/Util.html @@ -177,15 +177,12 @@ } function test_Util_imageLoadError(t) { - t.plan(2); + t.plan(1); - var blank_image_url = OpenLayers.Util.getImagesLocation() + "blank.gif"; - var img = OpenLayers.Util.createImage(null, null, null, null, null, null, - null, false); + var img = OpenLayers.Util.createImage(null, null, null, null, null, null, null, false); img._attempts = OpenLayers.IMAGE_RELOAD_ATTEMPTS + 1; OpenLayers.Util.onImageLoadError.call(img); - t.ok(OpenLayers.Util.isEquivalentUrl(blank_image_url, img.src), 'broken image correctly has url for blank image as src'); t.ok(OpenLayers.Element.hasClass(img, 'olImageLoadError'), 'broken image has class olImageLoadError'); } diff --git a/tests/manual/clip-features-svg.html b/tests/manual/clip-features-svg.html index 0f300c2cd6..f4137eae7a 100644 --- a/tests/manual/clip-features-svg.html +++ b/tests/manual/clip-features-svg.html @@ -13,8 +13,7 @@ rel="stylesheet" type="text/css"> /* avoid pink tiles */ .olImageLoadError { - border: none !important; - background: none !important; + background-color: transparent !important; } .olControlAttribution { bottom: 0px!important } diff --git a/tests/manual/google-panning.html b/tests/manual/google-panning.html index cbc13e3305..0ccdaf26ed 100644 --- a/tests/manual/google-panning.html +++ b/tests/manual/google-panning.html @@ -26,8 +26,7 @@ /* avoid pink tiles */ .olImageLoadError { - border: none !important; - background: none !important; + background-color: transparent !important; } diff --git a/theme/default/style.css b/theme/default/style.css index 8507105a69..266c89451a 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -323,10 +323,9 @@ div.olControlSaveFeaturesItemInactive { } .olImageLoadError { - border: ridge 2px gray; - background: pink url("img/broken.png"); - background-repeat: no-repeat; - background-position: 5px 5px; + background-color: pink; + opacity: 0.5; + filter: alpha(opacity=50); /* IE */ } /**