Closed Bug 213834 Opened 22 years ago Closed 17 years ago

TAB stop column not correct for <PRE> when image on the line

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: alexander.g, Unassigned)

References

()

Details

(Keywords: qawanted, testcase)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030724 Mozilla Firebird/0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030724 Mozilla Firebird/0.6 @ http://www.neo-geo.com/mvs/mvs.html the prices listed should be a straight list aligned after the first row. Now half of the prices are a bit off, henco not displayingt proper lines. Reproducible: Always Steps to Reproduce: 1. 2. 3.
This is not a Firebird specific bug. Mozilla 2003072104 PC/WinXP has the same rendering. ->Layout
Assignee: blakeross → other
Component: General → Layout
Product: Firebird → Browser
QA Contact: asa → ian
Version: unspecified → Trunk
This needs a minimal testcase
Keywords: qawanted
Actually, it just looks like the images are interfering with the wacky handling of tabs in <pre> that we and IE do.... All the columns with an image are offset to the right by a bit.
Attached file Testcase
Keywords: testcase
OS: Windows 2000 → All
Summary: the list with numbers is not straight, but skipping to right and left → TAB stop column not correct for <PRE> when image on the line
In IE the columns are aligned ("like you would expect"), in Mozilla they are not.
So in Mozilla, tabs in a <pre> are effectively converted to spaces; the number of spaces depends on the "number of chars seen so far" (mod 8). Images don't really count as chars, of course. A better question is what tabs should do, exactly, in this case. Just advance to the next "tab stop" from where they start? But where are tab stops actually placed?
I know this is somewhat unconventional, but we _could_ try doing what the spec says we should do? Just an idea... :-) # All tabs (U+0009) are rendered as a horizontal shift that lines up the start # edge of the next glyph with the next tab stop. Tab stops occur at points that # are mutiples of 8 times the width of a space (U+0020) rendered in the block's # font from the block's starting content edge. -- http://www.w3.org/TR/CSS21/text.html#q8
We could try, but I'm not sure we have a computed position from the block's content edge when we hit this code...
Of further note, even if we do know where we are in the block, the fact that we can't just convert tabs to spaces means some interesting refactoring of the mess that is text frame reflow is needed.
If it turns out to be too hard to implement that, then let me know what you would like instead -- it's possible nobody yet implements the above and therefore it would be "at risk" in terms of CSS2.1 exiting CR.
Well.... it _shouldn't_ be hard to implement, except it needs to be implemented in code that's not very well written or documented....
Looks like the issue has been fixed since the last comment, the textcase works fine across browsers and the problematic website uses a table now.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
This got fixed by the new textframe landing. We should add a regression test for this.
Depends on: 367177
Flags: in-testsuite?
Resolution: WORKSFORME → FIXED
Attached file reftest - reference
Attached file reftest - test
The test file includes a data url for a 1x1 white png, stretched to 10x4 for easier viewing of differences by a human. Verified that they look the same (at least to my eye) in a current trunk build and definitely different in a pre-newtexframe build.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: