1.59 KB, text/html
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:126.96.36.199) Gecko/20060426 Firefox/188.8.131.52 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:184.108.40.206) Gecko/20060426 Firefox/220.127.116.11 With shrink-wrapped (i.e. display: table for non ie browsers; width: 0 for ie) pre-formatted text containing tags at the end of one line and the beginning of the next, Firefox dishonours the newline in-between! The newline appears in the DOM tree (as an anonymous text node inbetween the two tags in question), it is just not rendered. Reproducible: Always Steps to Reproduce: 1. Create block with pre-formatted text. i.e. <pre> element, style="whitespace: pre" 2. Set style of pre-formatted block to include "display: table" 3. Add tag to end of one line and begining of next (whitespace doesn't appear to affect this issue) Actual Results: Line with a tag at the end -><- A tag at the beginning of line Expected Results: Line with a tag at the end -> <- A tag at the beginning of line
Created attachment 220890 [details] Description of problem and implementation of steps to re-produce Please see the attached file for demonstration of problem
I was stepping through firefox-18.104.22.168-debug, specifically in and around nsCSSFrameConstructor.cpp in an attempt to locate the offending code, and one of the times the browser actually exhibited the expected behaviour; I have been unable to reproduce this result so-far or to locate the code involved.
Confirmed on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060517 Minefield/3.0a1 ID:2006051706 [cairo] -> Trunk
The display:table is key. We skip over whitespace-only Text nodes when constructing the kids of a display:table frame so that for example: <table> <tr><td>Text</td></tr> </table> Won't create three rows (two to hold the whitespace). It's not clear what the correct behavior here is, in general; please bring this up on email@example.com.