[OpenLayers-Trac] [OpenLayers] #2910: Fix sizing of the Box handler's box

OpenLayers trac-20090302 at openlayers.org
Tue Nov 2 04:48:43 EDT 2010

#2910: Fix sizing of the Box handler's box
 Reporter:  ahocevar     |       Owner:              
     Type:  bug          |      Status:  new         
 Priority:  minor        |   Milestone:  2.11 Release
Component:  Handler.Box  |     Version:  2.10        
 Keywords:               |       State:  Review      
 This should already have been fixed in #1593, which only fixed the issue
 visually because the 2 pixel box border and the 1 pixel offset due to the
 map border in our examples (fixed with #2247) make it appear correctly
 with both the w3c and the traditional box model.

 The patch proposed here determines the border width of all box edges
 (instead of just the left+right and top+bottom sums), calculates the
 correct width and height offsets depending on the box model, and does not
 rely on browser detection any more to determine the box model.

 Two manual tests are added (tests/manual/box-quirks.html and tests/manual
 /box-strict.html), which appear correctly in FF3.6, IE8 and Safari 5. Unit
 tests for Handler.Box were missing, so I also created some. All pass in
 the mentioned browsers.

 Thanks for any review.

Ticket URL: <http://trac.openlayers.org/ticket/2910>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer

More information about the Trac mailing list