Closed
Bug 263586
Opened 20 years ago
Closed 20 years ago
{inc}[MARGIN-C]block vertical margins broken on incremental reflow
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: roc)
Details
(Keywords: regression)
Attachments
(2 files)
|
683 bytes,
text/html
|
Details | |
|
2.87 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
There were major regressions in handling of block vertical margins on incremental reflow introduced by the changes in nsBlockFrame.h rev. 3.192 and nsBlockFrame.cpp rev 3.665. These cause, e.g., large amounts of vertical space when shift-Reloading http://www.nytimes.com/ or http://www.imdb.com/title/tt0047034/
| Assignee | ||
Comment 1•20 years ago
|
||
Looks like the deltaY computation is bogus
| Assignee | ||
Comment 2•20 years ago
|
||
The immediate problem is that during incremental reflow, deltaY was being computed after reflowing a line that had just been created by splitting an existing line. That line's old bounds was (0,0,0,0) --- not where the line really 'was' before reflow --- so the deltaY computation was bogus. That deltaY got applied to the next line which was not dirty. However, whenever we reflow a line for the first time, we should mark the next line with MarkPreviousMarginDirty, which will force the line to be reflowed, ensuring that the bogus deltaY value is not used. That wasn't happening in this case because the calculation to determine that the line was being reflowed for the first time --- 'oldY == 0 && deltaY != mBounds.y' was returning false! I don't really understand how that expression was supposed to be doing the right thing; it was old code. So I replaced it with a conservative approximation: say that a line *may* be being reflowed for the first time if its initial bounds are (0,0,0,0). This fixes the bug.
| Assignee | ||
Updated•20 years ago
|
Attachment #161603 -
Flags: superreview?(dbaron)
Attachment #161603 -
Flags: review?(dbaron)
Comment 3•20 years ago
|
||
+ line->mBounds.x == 0 && line->mBounds.y == 0 && + line->mBounds.width == 0 && line->mBounds.y == 0; Shouldn't that last one be height?
| Reporter | ||
Comment 4•20 years ago
|
||
Comment on attachment 161603 [details] [diff] [review] fix r+sr with bz's comment, although I don't really understand what's going on here. (Did this have something to do with moving the deltaY assignment out of the else?)
Attachment #161603 -
Flags: superreview?(dbaron)
Attachment #161603 -
Flags: superreview+
Attachment #161603 -
Flags: review?(dbaron)
Attachment #161603 -
Flags: review+
| Assignee | ||
Comment 5•20 years ago
|
||
Thanks bz.
> Did this have something to do with moving the deltaY assignment out of the else?
Yes, but I'm not sure how this worked before, to be honest.| Assignee | ||
Comment 6•20 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•