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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
|
301 bytes,
text/html
|
Details | |
|
7.68 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•16 years ago
|
||
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)
| Assignee | ||
Comment 2•16 years ago
|
||
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+
| Assignee | ||
Comment 4•16 years ago
|
||
> Would probably benefit by being pulled out into a helper function.
Good call. Done.
| Assignee | ||
Comment 5•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
| Assignee | ||
Comment 6•16 years ago
|
||
> Good call. Done.
Except I did it wrong... Fixed in http://hg.mozilla.org/mozilla-central/rev/242da4494b79
You need to log in
before you can comment on or make changes to this bug.
Description
•