Closed Bug 1441048 Opened 7 years ago Closed 2 years ago

Right floated element disappears when using column-count property in ol element.

Categories

(Core :: Layout: Floats, defect)

58 Branch
defect

Tracking

()

RESOLVED FIXED
105 Branch
Webcompat Priority revisit
Tracking Status
firefox105 --- fixed

People

(Reporter: jackson, Assigned: TYLin)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36 Steps to reproduce: Ordered list, with right aligned span in list-item. jsfiddle: https://jsfiddle.net/Jacksoncds/v4yLzt6k/ Actual results: The span element disappears for some of the list items. https://i.stack.imgur.com/OPAlN.png Expected results: All span elements should have been displayed.
Summary: Right floated element disappears when using column-count property in ol elemnet. → Right floated element disappears when using column-count property in ol element.
[Triage 2018/03/23 - P3]
Priority: -- → P3

https://webcompat.com/issues/52751 might be another instance of this.
Though that would require a test case.
And chrome and firefox behaves differently here.

Webcompat Priority: --- → ?
Webcompat Priority: ? → revisit
Severity: normal → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: P3 → --
See Also: → 1405406

The naming of isMeasuringFeasibleContentBSize and associated log are
misleading. We can change last column's available block-size to be unconstrained
at the end of column balancing [1].

This patch shouldn't change the behavior.

[1] https://searchfox.org/mozilla-central/rev/5c04fc7016eb7f52cf835d482f1125c8f139c959/layout/generic/nsColumnSetFrame.cpp#1144-1154

We can move a float frame into its block parent's PushedFloatsList during column
balancing when it cannot fit in the available block-size.

Later, when the column balancing algorithm reflows the last column in an
unconstrained block-size (in the very last reflow if needed [1]), we have to
reflow the line which contains the float's placeholder. The old code uses
GetPrevInFlow() || GetNextInFlow() to detect this scenario, which is
insufficient because the float's block parent might not have any continuation.
This patch uses NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR bit to detect this instead.

[1] https://searchfox.org/mozilla-central/rev/5c04fc7016eb7f52cf835d482f1125c8f139c959/layout/generic/nsColumnSetFrame.cpp#1144-1154

Depends on D154859

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Attachment #9290235 - Attachment description: Bug 1441048 Part 2 - Use NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR to detect paginated context when marking a line dirty. → Bug 1441048 Part 2 - Use NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR to detect block-fragmented context when marking a line dirty.
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c41e441c6050 Part 1 - Clarify variable naming and log when we reflow last column with unconstrained available bsize. r=emilio https://hg.mozilla.org/integration/autoland/rev/30e4adcd2dbd Part 2 - Use NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR to detect block-fragmented context when marking a line dirty. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35500 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: