Closed Bug 138681 Opened 23 years ago Closed 22 years ago

Inconsistent <pre dir="rtl" width=[n]>

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jacobs, Assigned: mkaply)

References

(Blocks 1 open bug)

Details

(Keywords: rtl)

Attachments

(4 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc1) Gecko/20020417 BuildID: 2002041711 Preformatted text elements that have text direction set right-to-left and that make use of the deprecated attribute width can be torn apart when their display window is wide enough. Reproducible: Always Steps to Reproduce: 1. View the attached html using Mozilla. 2. Make the display full screen. 3. Observe the third block of preformatted text, the one with width=20. Actual Results: The first line of the third preformatted text block is split in two. The second half of this first line and the last word appear far to the left of where they should be. Expected Results: All three of the preformatted text blocks should be aligned right. The last one might have three lines positioned one above the other. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML lang="he" dir="rtl"> <HEAD> <TITLE>PRE Width</TITLE> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> </HEAD> <BODY lang="he" dir="rtl"> <PRE lang="he" dir="rtl"> &#x05D1;&#x05BC;&#x05B0;&#x05E8;&#x05B5;&#x05D0;&#x05E9;&#x05C1;&#x05B4;&#x05D9;&#x05EA; &#x05D1;&#x05BC;&#x05B8;&#x05E8;&#x05B8;&#x05D0; &#x05D0;&#x05B1;&#x05DC;&#x05B9;&#x05D4;&#x05B4;&#x05D9;&#x05DD; &#x05D0;&#x05B5;&#x05EA; &#x05D4;&#x05B7;&#x05E9;&#x05C1;&#x05B8;&#x05DE;&#x05B7;&#x05D9;&#x05B4;&#x05DD; &#x05D5;&#x05B0;&#x05D0;&#x05B5;&#x05EA; &#x05D4;&#x05B8;&#x05D0;&#x05B8;&#x05E8;&#x05B6;&#x05E5;&#x05C3; </PRE> <PRE lang="he" dir="rtl" width="40"> &#x05D1;&#x05BC;&#x05B0;&#x05E8;&#x05B5;&#x05D0;&#x05E9;&#x05C1;&#x05B4;&#x05D9;&#x05EA; &#x05D1;&#x05BC;&#x05B8;&#x05E8;&#x05B8;&#x05D0; &#x05D0;&#x05B1;&#x05DC;&#x05B9;&#x05D4;&#x05B4;&#x05D9;&#x05DD; &#x05D0;&#x05B5;&#x05EA; &#x05D4;&#x05B7;&#x05E9;&#x05C1;&#x05B8;&#x05DE;&#x05B7;&#x05D9;&#x05B4;&#x05DD; &#x05D5;&#x05B0;&#x05D0;&#x05B5;&#x05EA; &#x05D4;&#x05B8;&#x05D0;&#x05B8;&#x05E8;&#x05B6;&#x05E5;&#x05C3; </PRE> <PRE lang="he" dir="rtl" width="20"> &#x05D1;&#x05BC;&#x05B0;&#x05E8;&#x05B5;&#x05D0;&#x05E9;&#x05C1;&#x05B4;&#x05D9;&#x05EA; &#x05D1;&#x05BC;&#x05B8;&#x05E8;&#x05B8;&#x05D0; &#x05D0;&#x05B1;&#x05DC;&#x05B9;&#x05D4;&#x05B4;&#x05D9;&#x05DD; &#x05D0;&#x05B5;&#x05EA; &#x05D4;&#x05B7;&#x05E9;&#x05C1;&#x05B8;&#x05DE;&#x05B7;&#x05D9;&#x05B4;&#x05DD; &#x05D5;&#x05B0;&#x05D0;&#x05B5;&#x05EA; &#x05D4;&#x05B8;&#x05D0;&#x05B8;&#x05E8;&#x05B6;&#x05E5;&#x05C3; </PRE> </BODY> </HTML>
Attached file The testcase
I cannot reproduce this with linux trunk build 2002-04-20-08 (maybe because I don't have a nice scalable hebrew font here....)
OK, retested on a linux system where I _do_ have decent fonts. This still worksforme. Allan, are you seeing the problem you described with the testcase I attached?
Your new attachment looks fine in my Windows Mozilla build. However, the new attachment differs from the test case I was working with. Newlines appear in the new attachment where my original test case has blanks. What should the behavior of a preformatted text block be when the value of the width attribute is smaller than the length of the longest line in that block? Try doing this with an English example and dir=ltr. The behavior is very different from that of a Hebrew example and dir=rtl.
Allan, my attachment is different because I just copy/pasted the code you put in this bug. Obviously, the submission form introduced some linebreaks. Could you please attach the original form of your testcase? (using http://bugzilla.mozilla.org/attachment.cgi?bugid=138681&action=enter)
Blocks: 137995
The font sucks, but the rendering seems OK overall....
Ok, that one's broken over here. :)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
This is fixed by David Baron's fix to bug 131023.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: