From 476556e8647c476469fba9e07650d394691b907d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 7 Jun 2012 09:24:32 +0200 Subject: [PATCH] use -webkit-transform: translate3d(0, 0, 0) in style.mobile.css for better performance on iOS, and to prevent tile blinking effects on iOS 5 --- theme/default/style.mobile.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/theme/default/style.mobile.css b/theme/default/style.mobile.css index 6854e32fe1..2d4d39257a 100644 --- a/theme/default/style.mobile.css +++ b/theme/default/style.mobile.css @@ -49,3 +49,15 @@ div.olControlZoom a:hover { -o-transition: opacity 0.2s linear; transition: opacity 0.2s linear; } +/* Enable 3d acceleration when operating on tiles, this is + known to yield better performance on IOS Safari. + http://osgeo-org.1803224.n2.nabble.com/Harware-accelerated-CSS3-animations-for-iOS-td6255560.html + + It also prevents tile blinking effects in iOS 5. + See https://github.com/openlayers/openlayers/issues/511 +*/ +@media (-webkit-transform-3d) { +img.olTileImage { + -webkit-transform: translate3d(0, 0, 0); +} +}