RESOLVED FIXED79255
QWebView 64bit javascript problem
https://bugs.webkit.org/show_bug.cgi?id=79255
Summary QWebView 64bit javascript problem
Theo Rehm
Reported 2012-02-22 10:20:22 PST
Mozilla/5.0 (N; Windows NT 6.1; Win64; x64) AppleWebKit/534.34 (KHTML, like Gecko) Qt/4.8.0 Safari/534.34 I'm using Qt WebKit in Visual Studio 2010 and in a QWebView i load the following HTML-Code to show a dynamic Bing Map @//------------------------------------------HTML FILE------------------------------------------------- #define MAP_HTML "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">&lt;html&gt;&lt;head>&lt;title&gt;&lt;/title>"\ "&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/&gt;"\ "[removed][removed][removed]"\ "var map = null;"\ "function viewChanged(){MobileDataVisualAnalyticsMap.loaded()}"\ "function viewChangeStarted(){MobileDataVisualAnalyticsMap.viewChangeStart()}"\ "function mouseMoved(e){if (e.targetType == \"map\") {var point = new Microsoft.Maps.Point(e.getX(), e.getY());var loc = e.target.tryPixelToLocation(point);MobileDataVisualAnalyticsMap.mouseMoved(loc.latitude, loc.longitude);e.handled = false;}}"\ "function clicked(e){MobileDataVisualAnalyticsMap.mapClick(); e.handled = false;}"\ "function GetMapByBounds(northWestLatitude, northWestLongitude, southEastLatitude, southEastLongitude, mapType){"\ "var boundingBox = Microsoft.Maps.LocationRect.fromLocations(new Microsoft.Maps.Location(northWestLatitude,northWestLongitude), new Microsoft.Maps.Location(southEastLatitude,southEastLongitude));"\ "map = new Microsoft.Maps.Map(document.getElementById(\"mapDiv\"),{credentials: \"KeyDeleted\","\ "bounds: boundingBox, mapTypeId: mapType, enableSearchLogo: false, enableClickableLogo: false, showScalebar: false, showCopyright: false, showDashboard:false});"\ "Microsoft.Maps.Events.addHandler(map, 'viewchangeend', viewChanged); "\ "Microsoft.Maps.Events.addHandler(map, 'viewchangestart', viewChangeStarted); "\ "Microsoft.Maps.Events.addHandler(map, 'mousemove', mouseMoved); "\ "Microsoft.Maps.Events.addHandler(map, 'click',clicked);"\ "}"\ "function GetMap(latitude, longitude, zoomfactor, mapType, mapHeading){"\ "map = new Microsoft.Maps.Map(document.getElementById(\"mapDiv\"),{credentials: \"KeyDeleted\","\ "center: new Microsoft.Maps.Location(latitude,longitude),mapTypeId: mapType,zoom: zoomfactor, enableSearchLogo: false, enableClickableLogo: false, showScalebar: false, showCopyright: false, showDashboard:false, heading: mapHeading});"\ "Microsoft.Maps.Events.addHandler(map, 'viewchangeend', viewChanged); "\ "Microsoft.Maps.Events.addHandler(map, 'viewchangestart', viewChangeStarted); "\ "Microsoft.Maps.Events.addHandler(map, 'mousemove', mouseMoved); "\ "Microsoft.Maps.Events.addHandler(map, 'click',clicked);"\ "}"\ "[removed]&lt;/head&gt;"\ "&lt;body onload=\"GetMap(46.5269,6.56573, 15, Microsoft.Maps.MapTypeId.road, 0);\"&gt;"\ "<div id=\"mapDiv\" style=\"width:100%; height:100%\"></div>"\ "&lt;/body&gt;&lt;/html>" //----------------------------------------END OF HTML FILE-------------------------------------------@ In the x86 build of VS2010 zoom and pan works fine with every zoom factor. If i change to x64 build of Visual Studio, regardless of the Qt build (32 bit or 64 bit), the map is loading perfectly above zoom factor 15, which is the default-value by loading the html. I can zoom in and pan around, all works fine. If i zoom out (zoom factor < 15) the map does not render more than i see with zoom factor 15. So i have a grey border around the map, which is expanding if i zoom more out. If i pan around the map acts like a static map and shows always the same pane. Its loading data from the map server, but doesn't show the map. Changing the default value of the zoom factor didn't change anything. If i take for example zoom factor 10 the map doesn't show anything till i zoom in and reach zoom factor 15. With the x86 build of VS2010 all works fine, its just the x64 build that shows this behaviour in combination with QWebView.
Attachments
QWebView in QGraphicView with Bing map and zoom factor 14 (88.70 KB, image/jpeg)
2012-02-22 10:21 PST, Theo Rehm
no flags
QWebView in QGraphicView with Bing map and zoom factor 15 (158.02 KB, image/jpeg)
2012-02-22 10:22 PST, Theo Rehm
no flags
Theo Rehm
Comment 1 2012-02-22 10:21:46 PST
Created attachment 128240 [details] QWebView in QGraphicView with Bing map and zoom factor 14
Theo Rehm
Comment 2 2012-02-22 10:22:12 PST
Created attachment 128241 [details] QWebView in QGraphicView with Bing map and zoom factor 15
Theo Rehm
Comment 3 2012-03-02 04:19:40 PST
Small addition: Neither the aerial, nor the birdseye view shows anything. Only the road map works above zoom factor 15. :-/
Theo Rehm
Comment 4 2012-03-08 07:53:03 PST
Solved it! :-D The problem was, that QWebView didn't show GIF and/or JPEG images. Solution: 1. In the directory where your Qt application is located, create a subdirectory with imageformats name. 2. Copy the image plug-ins from the following directory: $(QTDIR)\plugins\imageformats
Note You need to log in before you can comment on or make changes to this bug.