Better handling of incremental reflow

This commit is contained in:
troy%netscape.com 1999-04-05 23:32:11 +00:00
Родитель b5656d17ed
Коммит e5c0092265
2 изменённых файлов: 46 добавлений и 4 удалений

Просмотреть файл

@ -3585,8 +3585,29 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext,
// Notify the parent frame passing it the list of new frames
if (NS_SUCCEEDED(result)) {
nsIFrame* firstChild;
adjustedParentFrame->FirstChild(nsnull, &firstChild);
nsFrameList frames(firstChild);
// See if the parent has a :after pseudo-element
nsIFrame* lastChild = frames.LastChild();
PRBool lastIsGenerated = PR_FALSE;
if (lastChild) {
nsFrameState state;
lastChild->GetFrameState(&state);
if (state & NS_FRAME_GENERATED_CONTENT) {
lastIsGenerated = PR_TRUE;
}
}
if (lastIsGenerated) {
result = adjustedParentFrame->InsertFrames(*aPresContext, *shell,
nsnull, lastChild, firstAppendedFrame);
} else {
result = adjustedParentFrame->AppendFrames(*aPresContext, *shell,
nsnull, firstAppendedFrame);
}
// If there are new absolutely positioned child frames, then notify
// the parent

Просмотреть файл

@ -3585,8 +3585,29 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext,
// Notify the parent frame passing it the list of new frames
if (NS_SUCCEEDED(result)) {
nsIFrame* firstChild;
adjustedParentFrame->FirstChild(nsnull, &firstChild);
nsFrameList frames(firstChild);
// See if the parent has a :after pseudo-element
nsIFrame* lastChild = frames.LastChild();
PRBool lastIsGenerated = PR_FALSE;
if (lastChild) {
nsFrameState state;
lastChild->GetFrameState(&state);
if (state & NS_FRAME_GENERATED_CONTENT) {
lastIsGenerated = PR_TRUE;
}
}
if (lastIsGenerated) {
result = adjustedParentFrame->InsertFrames(*aPresContext, *shell,
nsnull, lastChild, firstAppendedFrame);
} else {
result = adjustedParentFrame->AppendFrames(*aPresContext, *shell,
nsnull, firstAppendedFrame);
}
// If there are new absolutely positioned child frames, then notify
// the parent