Problem with newline in-between tags in <pre>formatted text in display:table

NEW
Unassigned

Status

()

Core
Layout: Block and Inline
12 years ago
11 years ago

People

(Reporter: Michael Staas, Unassigned)

Tracking

({testcase})

Trunk
x86
Windows 2000
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: Need decision from CSS Working Group)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

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
(Reporter)

Comment 1

12 years ago
Created attachment 220890 [details]
Description of problem and implementation of steps to re-produce

Please see the attached file for demonstration of problem
(Reporter)

Comment 2

12 years ago
I was stepping through firefox-1.5.0.3-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.
Version: Trunk → 1.8 Branch

Comment 3

12 years ago
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
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Version: 1.8 Branch → 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 www-style@w3.org.
Summary: Problem with newline in-between tags in <pre>formatted text → Problem with newline in-between tags in <pre>formatted text in display:table
Whiteboard: Need decision from CSS Working Group
You need to log in before you can comment on or make changes to this bug.