Closed Bug 531148 Opened 16 years ago Closed 16 years ago

Append to an ib-split inline with an inline parent doesn't work right anymore

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached file Testcase
I broke this in bug 501847. We used to always reframe when putting blocks inside the inline; we need to keep doing it unless we can really make AppendFrames handle it right.
Attached patch Fix (obsolete) — Splinter Review
This makes sure to create ib siblings for ancestors of the frame we're appending to as well, as needed, and to reframe in cases when this wouldn't work right (i.e. when we're not effectively appending to the parent). Applies on top of bug 526596.
Attachment #414675 - Flags: review?(roc)
Attached patch The actual fixSplinter Review
Attachment #414675 - Attachment is obsolete: true
Attachment #414678 - Flags: review?(roc)
Attachment #414675 - Flags: review?(roc)
Comment on attachment 414678 [details] [diff] [review] The actual fix + nsIFrame* curNextSibling = nextSibling; + nsIFrame* parent = aFrame; + PRBool isSafeToAppend = PR_TRUE; + do { + if (curNextSibling || parent->GetNextContinuation() || + GetSpecialSibling(parent)) { + isSafeToAppend = PR_FALSE; + break; + } + curNextSibling = parent->GetNextSibling(); + parent = parent->GetParent(); + } while (IsInlineFrame(parent)); + + if (isSafeToAppend) { + return PR_FALSE; Would probably benefit by being pulled out into a helper function.
Attachment #414678 - Flags: review?(roc) → review+
> Would probably benefit by being pulled out into a helper function. Good call. Done.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
> Good call. Done. Except I did it wrong... Fixed in http://hg.mozilla.org/mozilla-central/rev/242da4494b79
Depends on: 535911
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: