Open Bug 1611129 Opened 4 years ago Updated 2 years ago

Incorrect layout for inline elements

Categories

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

71 Branch
defect

Tracking

()

Tracking Status
firefox-esr68 --- wontfix
firefox72 --- wontfix
firefox73 --- affected
firefox74 --- affected

People

(Reporter: rv.maksim, Unassigned)

Details

Attachments

(2 files)

Attached image image1579783654740.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

STR:

  • Create an HTML file with content
<div style="float: left;">
  <span style="margin-left: 16px">
    <span>A</span>
    <span></span>
    <span></span>
  </span>
  <div>B</div>
</div>
  • Open in Firefox

Actual results:

Text "B" on third line. Firefox add extra blank line if "span"s empty. If you add text in each empty span all would work as expected

Expected results:

Text "B" should be on the second line

Component: Untriaged → Layout: Block and Inline
Product: Firefox → Core

I did confirm the issue also happens on Firefox 57.

Here is a frame dump, actually there is a line frame between the 'A' and the 'B'. CCing some folks who might know something.

            FloatList 0x7f7fd29cabf0 <
              Block(div)(0)@7f7fd29cac50 parent=7f7fd29cab40 (0,0,1653,3420) [state=0000060000d00300] [content=7f7fd29d5c10] [cs=7f7fd29ccd48]<
                line 7f7fd29cb4e0: count=1 state=inline,clean,prevmarginclean,not-impacted,wrapped,before:nobr,after:nobr[0x120] (0,0,1653,1140) <
                  Inline(span)(1)@7f7fd29cad90 parent=7f7fd29cac50 next=7f7fd29cb5e0 next-in-flow=7f7fd29cb5e0 (960,0,693,1140) [state=0200000000000200] [content=7f7fd29d5dc0] [cs=7f7fd29cce38]<
                    Text(0)"\n    "@7f7fd29cae30 parent=7f7fd29cad90 next=7f7fd29caed0 (0,900,0,0) [state=4000000020200000] [content=7f7fd4b81d00] [cs=7f7fd29cd3d8:-moz-text] [run=7f7fcdb8f500][0,5,T] 
                    Inline(span)(1)@7f7fd29caed0 parent=7f7fd29cad90 next=7f7fd29cb010 (0,0,693,1140) [state=0200000000000200] [content=7f7fd29d5e50] [cs=7f7fd29cd018]<
                      Text(0)"A"@7f7fd29caf70 parent=7f7fd29caed0 (0,0,693,1140) [state=02000040a0200000] [content=7f7fd4b8ba00] [cs=7f7fd29cd4c8:-moz-text] [run=7f7fcdb8f500][0,1,T] 
                    >
                    Text(2)"\n    "@7f7fd29cb010 parent=7f7fd29cad90 next=7f7fd29cb0b0 (693,0,0,1140) [state=40000000a0400000] [content=7f7fd4ba0380] [cs=7f7fd29cd3d8:-moz-text] [run=7f7fcdb8f500][0,5,T] 
                    Inline(span)(3)@7f7fd29cb0b0 parent=7f7fd29cad90 next=7f7fd29cb150 (693,0,0,1140) [state=0000000000000200] [content=7f7fd29d5f70] [cs=7f7fd29cd018]<>
                    Text(4)"\n    "@7f7fd29cb150 parent=7f7fd29cad90 (693,900,0,0) [state=4000000020400000] [content=7f7fd4ba0400] [cs=7f7fd29cd3d8:-moz-text] [run=7f7fcdb8f500][0,5,T] 
                  >
                >
                line 7f7fd29cb680: count=1 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,before:nobr,after:nobr[0x100] (0,1140,0,1140) vis-overflow=(0,1140,0,0) scr-overflow=(0,2040,0,0) <
                  Inline(span)(1)@7f7fd29cb5e0 parent=7f7fd29cac50 next=7f7fd29cb330 prev-in-flow=7f7fd29cad90 (0,1140,0,1140) vis-overflow=(0,0,0,0) scr-overflow=(0,900,0,0) [state=0000000000000204] [content=7f7fd29d5dc0] [cs=7f7fd29cce38]<
                    Inline(span)(5)@7f7fd29cb1f0 parent=7f7fd29cb5e0 next=7f7fd29cb290 (0,0,0,1140) [state=0000000000000200] [content=7f7fd4bf8310] [cs=7f7fd29cd018]<>
                    Text(6)"\n  "@7f7fd29cb290 parent=7f7fd29cb5e0 (0,900,0,0) [state=4000000020600000] [content=7f7fd4ba0480] [cs=7f7fd29cd3d8:-moz-text] [run=7f7fcdb8f500][0,3,T] 
                  >
                >
                line 7f7fd29cb530: count=1 state=block,clean,prevmarginclean,not-impacted,not-wrapped,before:nobr,after:nobr[0x8] (0,2280,1653,1140) <
                  Block(div)(3)@7f7fd29cb330 parent=7f7fd29cac50 (0,2280,1653,1140) [state=0200020000100200] [content=7f7fd4bf83a0] [cs=7f7fd29ccf28]<
                    line 7f7fd29cb490: count=1 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,before:nobr,after:nobr[0x100] (0,0,705,1140) <
                      Text(0)"B"@7f7fd29cb3f0 parent=7f7fd29cb330 (0,0,705,1140) [state=02000040b0600000] [content=7f7fd4ba0e80] [cs=7f7fd29cd5b8:-moz-text] [run=7f7fcdb8f680][0,1,T] 
                    >
                  >
                >
              >
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: