Open Bug 367099 Opened 19 years ago Updated 3 years ago

DoReflowInlineFrames updates aState.mY improperly

Categories

(Core :: Layout, defect)

defect

Tracking

()

People

(Reporter: roc, Unassigned)

Details

Attachments

(1 file)

DoReflowInlineFrames updates aState.mY near the start of the function, to position the line below any carried-in bottom margin from the previous content. The problem is that sometimes DoReflowInlineFrames does not actually place the line, and in those cases, that side effect is bogus.
This is the cause of the incremental reflow bug in https://bugzilla.mozilla.org/attachment.cgi?id=251334 We update aState.mY and then push a line to the next-in-flow. Thus the height of the column ends up including the bottom-margin of the DIV, when that bottom-margin would normally (and correctly) be discarded.
Attached patch fix?Splinter Review
This patch helps. I don't like it as a complete solution though; the adjustment of aState.mY to skip bands and zeroing out the bottom margin just fundamentally isn't right ... I think I could come up with a test case where we skip bands and then don't end up placing the line, so we've applied the bottom margin where we shouldn't. Although it would be hard for that to lead to an observable problem. I think a proper fix would have us always reverting aState.mY if the line was not placed, and returning the band-skipping offset as an output of this function. OTOH I don't know if I should go out and rework the band-skipping logic. Any thoughts, David?
Attachment #251613 - Flags: review?(dbaron)
Comment on attachment 251613 [details] [diff] [review] fix? I think cases where we skip bands and then end up placing the line are reasonably common -- those just require a long word next to a float, and this will break those, by applying the bottom margin of the prior block after the float, won't it? Why is it that we want to ignore bottom margins when sizing columns based on their content? (I can certainly understand ignoring a portion of a bottom margin when the column or page is a fixed size.)
Attachment #251613 - Flags: review?(dbaron) → review-
Assignee: roc → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: