Padding and Margins Fail when one of them is set by Percentage

This document contains the following stylesheet:

  DIV { border: 10px solid red; }

  .a  {  margin: 10px 10px 10px 10px; }
  .b  {  margin: 10px 10px 10px 10%; }
  .c  { padding: 10px 10px 10px 10px; }
  .d  { padding: 10px 10px 10px 10%; }

a

The following is rendered correctly by NGLayout. All four margins are 10px. Note how both boxes' borders are seperated by 10px. This is correct. The top, right and bottom margins should be 10px apart in test b as well.

This is the text in a DIV in a DIV!

b

The only difference that should be visible between this test and the previous one is that the left margins should be 10% of the browser width, and thus the boxes should be shorter. The top, right and bottom borders should be exactly the same distance apart as in test a.

This is the text in a DIV in a DIV!

c

The following is rendered correctly by NGLayout. All four paddings are 10px. Note how both boxes' borders are seperated by 10px. This is correct. The top, right and bottom margins should be 10px apart in test d as well.

This is the text in a DIV in a DIV!

d

The only difference that should be visible between this test and the previous one is that the left paddings should be 10% of the browser width, and thus the inner box should be shorter. The top, right and bottom borders should be exactly the same distance apart as in test c.

This is the text in a DIV in a DIV!

Bugzilla: Bug 1992 (fixed itself)