DOM tests - rectangles

Reported rectangles:

On this page I test the rectangle methods.

Click on any element to calculate its rectangles. Make sure the page is scrolled all the way up before doing the test.

Tests

This is a paragraph with a very long <em> element that should wrap to the next line, so that we can test inline elements that sprawl over several lines. The point of rectangles is that one is formed for every inline box in the element; that is, one for every line this <em> stretches. The boundingRectangle is the sum of these rectangles.

In my browsers the <em> in the previous paragraph wraps over five lines, so browsers should report five rectangles. However, IE5.5 reports 9 and IE6/7 14.

In addition, if you click on a block-level element such as this paragraph, browsers should report one rectangle: the paragraph itself. However, if you click on the text IE5-7 incorrectly report one rectangle per paragraph line.

Test rectangle