Issues in Layout that do not fit into any other Layout component or which span multiple Layout components.

Bugs related to the top level presentation objects (pres shell, pres context, and document viewer), the frame constructor, and the base frame classes, as well as general issues with alignment and sizing, all belong here.

You should ignore positioning (absolute and relative) on :before and :after
pseudo-elements. The above test case describes the correct behavior. The
problems are in the :after of the second test and the :before of the third test.

I have a fix for this in my tree, and I'll check it in when the tree opens.
BTW, there's a missing ';' in your test which is why "The end." isn't displayed:
P.two:after {
position: absolute; /* ignored */
top: 0;
left: 0;
content: " The end."
border-left: inherit;
}

Yes, exactly right. The generated code code is doing the correct thing and
ignoring positioning and float, i.e. it's nit moving the frame out of the flow
The problem is that the nsHTMLReflowState code (used during reflow) is seeing
the 'position' property set and computing the constraints as if the element
were relatively positioned.
My fix is to reset the style information so 'position' is set to 'normal' which
fixes the problem