Closed
Bug 230100
Opened 22 years ago
Closed 22 years ago
Lines only break on spaces, even if not there...
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: u81239, Unassigned)
References
()
Details
Attachments
(1 file)
|
356 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208
The URL given points to a small test case of a problem recently encountered on
the page www.msx.org (MRC, MSX Resource Center). A so-called one-liner program
was posted on the frontpage... In such a program, a functional MSX-Basic program
is written on one single (max. 255 characters long) line. Because every
character counts, spaces are usually omitted in such one-liners. The problem is
that it totally messed up the MRC's layout in aswell my somewhat older Mozilla
Firebird build (0.7) as in the latest stable Mozilla build (1.6b). Internet
Explorer renders this much better. You can try for yourself on the given test
case URL.
The basic idea is that if a line exceeds the containing box's width, a line
break is inserted at the last whitespace. The problem arises however when there
are no whitespaces. In Internet Explorer, the browser then resorts to breaking
on characters like :, (, -, etc. Mozilla doesn't break at all, and as said,
causes a horizontal scrollbar to appear and messes up the page's layout bigtime.
So, I think a similar mechanism would be desireable in Mozilla aswell. Currently
there is no proper way to properly display for example a one-liner program in
Mozilla without adding whitespaces (or, to give another example, a Brainfuck
program), which could case a program to break when it's copy/pasted or entered
in that exact form. In the given example, only one space could be added without
breaking it...
Regards,
~Grauw
Reproducible: Always
Steps to Reproduce:
1. Make a very long line without spaces
Actual Results:
A horizontal scrollbar appears, and any page layout (i.e. right-side menu's)
will be messed up.
Expected Results:
It should break the line on 'secondary' break characters when there are no
whitespaces.
Testcase:
<h1>MSX.ORG Snowfall Challenge - Sjoerd's oneliner entry</h1>
<p>1 ' Sneeuw door Sjoerd<br />
2
COLOR,4,4:DEFINTA-Z:SCREEN5:VDP(9)=VDP(9)OR2:DIMS(15):FORI=0TO15:READS(I):NEXT:COPY(0,0)-(255,44)TO(0,212):FORI=0TO0STEP0:VDP(24)=Y:VPOKEY*128+RND(1)*128,15:VDP(19)=S(S):S=(S-(YMOD4=0))AND15:Y=(Y-1)AND255:NEXT:DATA0,2,4,6,7,6,4,2,0,14,12,10,9,10,12,14:</p>
Test case:
<h1>MSX.ORG Snowfall Challenge - Sjoerd's oneliner entry</h1>
<p>1 ' Sneeuw door Sjoerd<br />
2
COLOR,4,4:DEFINTA-Z:SCREEN5:VDP(9)=VDP(9)OR2:DIMS(15):FORI=0TO15:READS(I):NEXT:COPY(0,0)-(255,44)TO(0,212):FORI=0TO0STEP0:VDP(24)=Y:VPOKEY*128+RND(1)*128,15:VDP(19)=S(S):S=(S-(YMOD4=0))AND15:Y=(Y-1)AND255:NEXT:DATA0,2,4,6,7,6,4,2,0,14,12,10,9,10,12,14:</p>
Correction: in IE, there is no if/then case for the line breaking... Next to
whitespaces, it always breaks on (, :, - and similar markings. Ofcourse it
breaks before (, and after :, -, etc. Maybe it's even better behaviour. A little
less complex, and the oneliner looks better :).
~Grauw
Comment 4•22 years ago
|
||
*** This bug has been marked as a duplicate of 95067 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
This bug is really more general than just hyphens, but there's also a bug
somewhere on implementing UAX #14 linebreaking, I think.
You need to log in
before you can comment on or make changes to this bug.
Description
•