зеркало из https://github.com/mozilla/pjs.git
Changed the setting of PrimaryFrame for elements wrapped in a GfxScrollFrame,
except for the DocElement which still has the primary frame set to the scrolledframe. Fixed compiler warning around NS_NewFiedlSetFrame(...). r=evaughan b=23803
This commit is contained in:
Родитель
1b2a788ce7
Коммит
899d8d2a27
|
@ -2299,8 +2299,9 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
|
||||||
aParentFrame,
|
aParentFrame,
|
||||||
contentFrame,
|
contentFrame,
|
||||||
styleContext);
|
styleContext);
|
||||||
|
// primary is set above (to the contentFrame)
|
||||||
|
|
||||||
aNewFrame = scrollFrame;
|
aNewFrame = scrollFrame;
|
||||||
} else {
|
} else {
|
||||||
// if not scrollable the new frame is the content frame.
|
// if not scrollable the new frame is the content frame.
|
||||||
aNewFrame = contentFrame;
|
aNewFrame = contentFrame;
|
||||||
|
@ -2605,6 +2606,9 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
|
||||||
parentFrame,
|
parentFrame,
|
||||||
rootFrame,
|
rootFrame,
|
||||||
rootPseudoStyle);
|
rootPseudoStyle);
|
||||||
|
|
||||||
|
// set the primary frame to the root frame
|
||||||
|
state.mFrameManager->SetPrimaryFrameFor(aDocElement, rootFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPaginated) {
|
if (isPaginated) {
|
||||||
|
@ -3307,7 +3311,9 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsIPresShell* aPresShell,
|
||||||
nsIFrame * newFrame;
|
nsIFrame * newFrame;
|
||||||
PRUint32 flags = aIsAbsolutelyPositioned ? NS_BLOCK_SPACE_MGR : 0;
|
PRUint32 flags = aIsAbsolutelyPositioned ? NS_BLOCK_SPACE_MGR : 0;
|
||||||
nsresult rv = NS_NewFieldSetFrame(aPresShell, &newFrame, flags);
|
nsresult rv = NS_NewFieldSetFrame(aPresShell, &newFrame, flags);
|
||||||
|
if (!NS_SUCCEEDED(rv) {
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIPresShell> shell;
|
nsCOMPtr<nsIPresShell> shell;
|
||||||
aPresContext->GetShell(getter_AddRefs(shell));
|
aPresContext->GetShell(getter_AddRefs(shell));
|
||||||
|
@ -4500,9 +4506,6 @@ nsCSSFrameConstructor::FinishBuildingScrollFrame(nsIPresContext* aPresConte
|
||||||
// the the scroll frames child list
|
// the the scroll frames child list
|
||||||
aScrollFrame->SetInitialChildList(aPresContext, nsnull, aScrolledFrame);
|
aScrollFrame->SetInitialChildList(aPresContext, nsnull, aScrolledFrame);
|
||||||
|
|
||||||
if (aContent != nsnull)
|
|
||||||
aState.mFrameManager->SetPrimaryFrameFor(aContent, aScrolledFrame);
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4599,6 +4602,9 @@ nsCSSFrameConstructor::BuildScrollFrame (nsIPresShell* aPresShell,
|
||||||
|
|
||||||
aScrolledContentStyle = scrolledContentStyle;
|
aScrolledContentStyle = scrolledContentStyle;
|
||||||
|
|
||||||
|
// now set the primary frame to the ScrollFrame
|
||||||
|
aState.mFrameManager->SetPrimaryFrameFor( aContent, aNewFrame );
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2299,8 +2299,9 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
|
||||||
aParentFrame,
|
aParentFrame,
|
||||||
contentFrame,
|
contentFrame,
|
||||||
styleContext);
|
styleContext);
|
||||||
|
// primary is set above (to the contentFrame)
|
||||||
|
|
||||||
aNewFrame = scrollFrame;
|
aNewFrame = scrollFrame;
|
||||||
} else {
|
} else {
|
||||||
// if not scrollable the new frame is the content frame.
|
// if not scrollable the new frame is the content frame.
|
||||||
aNewFrame = contentFrame;
|
aNewFrame = contentFrame;
|
||||||
|
@ -2605,6 +2606,9 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
|
||||||
parentFrame,
|
parentFrame,
|
||||||
rootFrame,
|
rootFrame,
|
||||||
rootPseudoStyle);
|
rootPseudoStyle);
|
||||||
|
|
||||||
|
// set the primary frame to the root frame
|
||||||
|
state.mFrameManager->SetPrimaryFrameFor(aDocElement, rootFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPaginated) {
|
if (isPaginated) {
|
||||||
|
@ -3307,7 +3311,9 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsIPresShell* aPresShell,
|
||||||
nsIFrame * newFrame;
|
nsIFrame * newFrame;
|
||||||
PRUint32 flags = aIsAbsolutelyPositioned ? NS_BLOCK_SPACE_MGR : 0;
|
PRUint32 flags = aIsAbsolutelyPositioned ? NS_BLOCK_SPACE_MGR : 0;
|
||||||
nsresult rv = NS_NewFieldSetFrame(aPresShell, &newFrame, flags);
|
nsresult rv = NS_NewFieldSetFrame(aPresShell, &newFrame, flags);
|
||||||
|
if (!NS_SUCCEEDED(rv) {
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIPresShell> shell;
|
nsCOMPtr<nsIPresShell> shell;
|
||||||
aPresContext->GetShell(getter_AddRefs(shell));
|
aPresContext->GetShell(getter_AddRefs(shell));
|
||||||
|
@ -4500,9 +4506,6 @@ nsCSSFrameConstructor::FinishBuildingScrollFrame(nsIPresContext* aPresConte
|
||||||
// the the scroll frames child list
|
// the the scroll frames child list
|
||||||
aScrollFrame->SetInitialChildList(aPresContext, nsnull, aScrolledFrame);
|
aScrollFrame->SetInitialChildList(aPresContext, nsnull, aScrolledFrame);
|
||||||
|
|
||||||
if (aContent != nsnull)
|
|
||||||
aState.mFrameManager->SetPrimaryFrameFor(aContent, aScrolledFrame);
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4599,6 +4602,9 @@ nsCSSFrameConstructor::BuildScrollFrame (nsIPresShell* aPresShell,
|
||||||
|
|
||||||
aScrolledContentStyle = scrolledContentStyle;
|
aScrolledContentStyle = scrolledContentStyle;
|
||||||
|
|
||||||
|
// now set the primary frame to the ScrollFrame
|
||||||
|
aState.mFrameManager->SetPrimaryFrameFor( aContent, aNewFrame );
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче