Bug 731293. Add nsLayoutUtils::GetParentOrPlaceholderForCrossDoc. r=mats

This commit is contained in:
Robert O'Callahan 2012-06-09 00:22:51 +12:00
Родитель 7b4d308d3c
Коммит 558dc15ba4
2 изменённых файлов: 17 добавлений и 1 удалений

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

@ -2109,11 +2109,21 @@ nsLayoutUtils::GetParentOrPlaceholderFor(nsIFrame* aFrame)
{
if ((aFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)
&& !aFrame->GetPrevInFlow()) {
return aFrame->PresContext()->PresShell()->FrameManager()->GetPlaceholderFrameFor(aFrame);
return aFrame->PresContext()->PresShell()->FrameManager()->
GetPlaceholderFrameFor(aFrame);
}
return aFrame->GetParent();
}
nsIFrame*
nsLayoutUtils::GetParentOrPlaceholderForCrossDoc(nsIFrame* aFrame)
{
nsIFrame* f = GetParentOrPlaceholderFor(aFrame);
if (f)
return f;
return GetCrossDocParentFrame(aFrame);
}
nsIFrame*
nsLayoutUtils::GetNextContinuationOrSpecialSibling(nsIFrame *aFrame)
{

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

@ -811,6 +811,12 @@ public:
*/
static nsIFrame* GetParentOrPlaceholderFor(nsIFrame* aFrame);
/**
* If aFrame is an out of flow frame, return its placeholder, otherwise
* return its (possibly cross-doc) parent.
*/
static nsIFrame* GetParentOrPlaceholderForCrossDoc(nsIFrame* aFrame);
/**
* Get a frame's next-in-flow, or, if it doesn't have one, its special sibling.
*/