Ticket #2910 (closed bug: fixed)
Fix sizing of the Box handler's box
| Reported by: | ahocevar | Owned by: | sbrunner |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.11 Release |
| Component: | Handler.Box | Version: | 2.10 |
| Keywords: | Cc: | ||
| State: |
Description
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.

