зеркало из https://github.com/mozilla/pjs.git
Leave the placeholder's pointer to the out-of-flow intact because the float cache depends on it later on. b=348688 r=bzbarsky sr=roc
This commit is contained in:
Родитель
81f9cc6766
Коммит
da4a20a23d
|
@ -9772,7 +9772,8 @@ DoDeletingFrameSubtree(nsFrameManager* aFrameManager,
|
|||
|
||||
// Remove the mapping from the out-of-flow frame to its placeholder.
|
||||
aFrameManager->UnregisterPlaceholderFrame((nsPlaceholderFrame*)childFrame);
|
||||
((nsPlaceholderFrame*)childFrame)->SetOutOfFlowFrame(nsnull);
|
||||
// Don't SetOutOfFlowFrame(nsnull) here because the float cache depends
|
||||
// on it when the float is removed later on, see bug 348688 comment 6.
|
||||
|
||||
// Queue the out-of-flow frame to be destroyed only if aRemovedFrame is _not_
|
||||
// one of its ancestor frames or if it is a popup frame.
|
||||
|
|
|
@ -5879,12 +5879,6 @@ found_frame:;
|
|||
printf(" prevSibling=%p deletedNextContinuation=%p\n", prevSibling, deletedNextContinuation);
|
||||
#endif
|
||||
|
||||
if (!aDeletedFrame->IsFloatContainingBlock()) {
|
||||
// Clear the float cache from placeholders that are descendants
|
||||
// of aDeletedFrame (bug 337883).
|
||||
line->RemovePlaceholderDescendantsOf(aDeletedFrame);
|
||||
}
|
||||
|
||||
if (aDestroyFrames) {
|
||||
aDeletedFrame->Destroy();
|
||||
} else {
|
||||
|
|
|
@ -523,34 +523,6 @@ nsLineBox::RemoveFloat(nsIFrame* aFrame)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
nsLineBox::RemovePlaceholderDescendantsOf(nsIFrame* aFrame)
|
||||
{
|
||||
if (IsInline() && mInlineData) {
|
||||
nsFloatCache* fc = mInlineData->mFloats.Head();
|
||||
while (fc) {
|
||||
nsIFrame* frame = fc->mPlaceholder;
|
||||
while (frame && frame != aFrame) {
|
||||
if (frame->IsFloatContainingBlock()) {
|
||||
frame = nsnull;
|
||||
break;
|
||||
}
|
||||
frame = frame->GetParent();
|
||||
}
|
||||
if (NS_UNLIKELY(frame != nsnull)) {
|
||||
nsFloatCache* next = fc->Next();
|
||||
mInlineData->mFloats.Remove(fc);
|
||||
delete fc;
|
||||
MaybeFreeData();
|
||||
fc = next;
|
||||
}
|
||||
else {
|
||||
fc = fc->Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsLineBox::SetCombinedArea(const nsRect& aCombinedArea)
|
||||
{
|
||||
|
|
|
@ -402,7 +402,6 @@ public:
|
|||
void FreeFloats(nsFloatCacheFreeList& aFreeList);
|
||||
void AppendFloats(nsFloatCacheFreeList& aFreeList);
|
||||
PRBool RemoveFloat(nsIFrame* aFrame);
|
||||
void RemovePlaceholderDescendantsOf(nsIFrame* aFrame);
|
||||
|
||||
// Combined area is the area of the line that should influence the
|
||||
// overflow area of its parent block. The combined area should be
|
||||
|
|
Загрузка…
Ссылка в новой задаче