Bug 23762 - [Regression] Slippy Map div set as percentage is unprintable
Summary: [Regression] Slippy Map div set as percentage is unprintable
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Major
Assignee: Nobody
URL: http://matt.sandbox.cloudmade.com/
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 09:15 PST by Shaun McDonald
Modified: 2022-07-12 12:27 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun McDonald 2009-02-05 09:15:23 PST
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.
Comment 1 Shaun McDonald 2009-02-05 10:23:14 PST
There is some resize hackery done, such that http://matt.sandbox.cloudmade.com/ now works. Is this javascript resizing really required?
Comment 2 Jiuqing Song 2009-10-12 20:25:35 PDT
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.