Bug 23762
Summary: | [Regression] Slippy Map div set as percentage is unprintable | ||
---|---|---|---|
Product: | WebKit | Reporter: | Shaun McDonald <shaun> |
Component: | Printing | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Major | CC: | bfulgham, jisong |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 | ||
URL: | http://matt.sandbox.cloudmade.com/ |
Shaun McDonald
Go to http://matt.sandbox.cloudmade.com/ for example, try to print. Using the latest Webkit Version 3.2.1 (5525.27.1) you will just get a blank page with no map, whilst the current stable version of Safari will work fine.
The problem appears to be the following line:
<div style="width:100%; height:100%" id="map"/>
setting the width and height to a px value makes the map printable again.
Other examples include:
http://johnmckerrell.com/map/
http://shaunmcdonald.me.uk/osm/minute-wml.html
The slippy maps libraries used are OpenLayers, MultiMaps, and CloudMade's WebMapsLite.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Shaun McDonald
There is some resize hackery done, such that http://matt.sandbox.cloudmade.com/ now works. Is this javascript resizing really required?
Jiuqing Song
I also hit this bug. My repro is here:
<div style="border: solid 2px black; width: 100%; height: 100%"></div>
When I print this page on other browsers (IE8, Firefox, Chrome), the border of DIV can fit the paper, but in safari and webkit (4.0.3 5531.9 r49434), it can only fit horizentally, and the vertical size depends on the size of window on screen.