Closed Bug 1565665 Opened 5 years ago Closed 5 years ago

enabling column-span pref shifts the baseline (?) of an inline-block multicolumn

Categories

(Core :: Layout: Columns, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: dbaron, Assigned: TYLin)

References

Details

Crash Data

Attachments

(1 file)

I haven't looked into this a whole lot -- but it appears that a reftest I'm adding for bug 1564649 fails when the column-span pref is enabled. (I'd note that I checked the test passes in Chrome.) The failure is not for the failure that I'm fixing in that bug, but rather than the multicol ends up at a different vertical position than without the column-span pref enabled; in other words, a multicol with display: inline-block seems to be being vertically aligned in a different way than a non-multicol, which isn't the case in Chrome and isn't the case without the column-span pref enabled.

I'll be adding this test (layout/reftests/columns/zero-height-nondirty-reflow.html) to run both without the column-span pref (marked passing) and with the pref (marked failing), so I think there should already be a test in the tree (once that bug lands) that should cover this issue.

Because ColumnSet's display style is inherit from ColumnSetWrapper in ua.css, a multicol with display: inline-block is going to add ColumnSet in an inline line under ColumnSetWrapperFrame due to this check in nsBlockFrame::AddFrames. The sample frame subtree of zero-height-nondirty-reflow.html is like the following. Note that line 7f2916d33160 is inline.

ColumnSetWrapper(div)(1)@7f2916d32ff8 parent=7f2916d32df8 next=7f2916d33340 {0,0,12000,60} vis-overflow=0,0,12000,1140 scr-overflow=0,0,12000,1140 [state=008006c000c00220] [content=7f291922db80] [cs=7f29183c7108]<
  line 7f2916d33160: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x180] {0,0,1200,1140} vis-overflow=0,0,12000,1140 scr-overflow=0,0,12000,1140 <
    ColumnSet(div)(1)@7f2916d330c0 parent=7f2916d32ff8 {0,900,1200,0} vis-overflow=0,0,12000,60 scr-overflow=0,0,12000,60 [state=0080108000000020] [content=7f291922db80] [cs=7f29183c7888:-moz-column-set]<
      Block(div)(1)@7f2916d32f38 parent=7f2916d330c0 next=7f2916d33700 next-in-flow=7f2916d33700 {0,0,1200,0} vis-overflow=0,0,1200,60 scr-overflow=0,0,1200,60 [state=0200108000d00000] [content=7f291922db80] [cs=7f29183c7978:-moz-column-content]<
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

We expect ColumnSet and -moz-column-content to be block outside.

If ColumnSets' display style is inherit from ColumnSetWrapper, then a
multicol with "display: inline-block" is going to wrap ColumnSet in a
inline nsLineBox when ColumnSet is added to ColumnSetWrapper, which is
not what we want.

This change fixed [.multicol 4] and [.multicol 6] in
multicol-gap-percentage-001.html with column-span disable, but it can
also fix [.multicol 5] in multicol-gap-percentage-001.html when
column-span is enabled (bug 1489298), so I go ahead and enable the pref
in that test.

The patch in this bug can fix an assertion added in https://phabricator.services.mozilla.com/D39060 (bug 1548100), so make this block bug 1548100.

Blocks: 1548100

The priority flag is not set for this bug.
:dbaron, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dbaron)
Flags: needinfo?(dbaron)
Priority: -- → P3
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/85d1864dbcec Make ColumnSet and -moz-column-content frames always "display: block". r=dbaron
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Crash Signature: [@ libc.so + 0x8c66a]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: