зеркало из https://github.com/mozilla/pjs.git
Better handling of incremental reflow
This commit is contained in:
Родитель
b5656d17ed
Коммит
e5c0092265
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче