Open Bug 356509 Opened 19 years ago Updated 3 years ago

Lines should not break on IMG in LI with display: inline

Categories

(Core :: Layout: Block and Inline, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: alexey, Unassigned)

Details

(Keywords: testcase)

Attachments

(3 files)

User-Agent: Opera/9.02 (X11; Linux i686; U; en) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-1) Lines are broken on IMG within a LI element, even though the LI has display: inline. They shouldn't. Reproducible: Always Steps to Reproduce: 1. Open the TC. Actual Results: The text wraps inside the box. Expected Results: The text does not wrap and extends beyond the box. IE 6 has the same bug. Opera 9 hasn't.
Attached file TC
Testcase attached.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
Styling LI with 'white-space:nowrap' only prevents line breaking within the LI, not between the LIs, so the layout is correct. Try adding style 'white-space:nowrap' on the UL. -> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Keywords: testcase
Resolution: --- → INVALID
Lines aren't broken on arbitrary boundaries of elements. There should be whitespace for that. <span>some</span><span>text</span> -- this won't be broken between the SPAN elements, right?
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(In reply to comment #3) You're right, my mistake. The problem seems to be that we line break X<img>Y in "Quirks mode" (no doubt to be compatible with IE). If you add the following at the beginning of your example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Then you'll get "Standards compliance mode" which does not line break. (View->Page Info tells you which layout mode is used)
Severity: normal → minor
Component: Layout → Layout: Block and Inline
OS: Linux → All
QA Contact: layout → layout.block-and-inline
Hardware: PC → All
Version: 1.8 Branch → Trunk
Yes, it's only about Quirks mode.
The difference in Quirks/Standards mode is probably not a quirk per se, but a result of how alternate content for images is handled in the two modes. Quirks mode results in an "broken image", Standards mode results in an empty inline box. If you compare Textcase #2a/b there is no difference in line breaking.
There are intentional differences in breaking around images between standards mode and quirks mode.
Do you mean this bug is invalid? Or is there something to be fixed in Gecko?
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: