зеркало из https://github.com/mozilla/gecko-dev.git
Bug 339548. Part 7: Create nsLayoutUtils::IsAncestorFrameCrossDoc. r=dbaron
This commit is contained in:
Родитель
f18d65c6a2
Коммит
2148628fd6
|
@ -317,6 +317,16 @@ nsLayoutUtils::IsProperAncestorFrameCrossDoc(nsIFrame* aAncestorFrame, nsIFrame*
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
// static
|
||||
PRBool
|
||||
nsLayoutUtils::IsAncestorFrameCrossDoc(nsIFrame* aAncestorFrame, nsIFrame* aFrame,
|
||||
nsIFrame* aCommonAncestor)
|
||||
{
|
||||
if (aFrame == aAncestorFrame)
|
||||
return PR_TRUE;
|
||||
return IsProperAncestorFrameCrossDoc(aAncestorFrame, aFrame, aCommonAncestor);
|
||||
}
|
||||
|
||||
// static
|
||||
PRBool
|
||||
nsLayoutUtils::IsProperAncestorFrame(nsIFrame* aAncestorFrame, nsIFrame* aFrame,
|
||||
|
|
|
@ -251,10 +251,26 @@ public:
|
|||
|
||||
/**
|
||||
* Like IsProperAncestorFrame, but looks across document boundaries.
|
||||
*
|
||||
* Just like IsAncestorFrameCrossDoc, except that it returns false when
|
||||
* aFrame == aAncestorFrame.
|
||||
*/
|
||||
static PRBool IsProperAncestorFrameCrossDoc(nsIFrame* aAncestorFrame, nsIFrame* aFrame,
|
||||
nsIFrame* aCommonAncestor = nsnull);
|
||||
|
||||
/**
|
||||
* IsAncestorFrameCrossDoc checks whether aAncestorFrame is an ancestor
|
||||
* of aFrame or equal to aFrame, looking across document boundaries.
|
||||
* @param aCommonAncestor nsnull, or a common ancestor of aFrame and
|
||||
* aAncestorFrame. If non-null, this can bound the search and speed up
|
||||
* the function.
|
||||
*
|
||||
* Just like IsProperAncestorFrameCrossDoc, except that it returns true when
|
||||
* aFrame == aAncestorFrame.
|
||||
*/
|
||||
static PRBool IsAncestorFrameCrossDoc(nsIFrame* aAncestorFrame, nsIFrame* aFrame,
|
||||
nsIFrame* aCommonAncestor = nsnull);
|
||||
|
||||
/**
|
||||
* GetFrameFor returns the root frame for a view
|
||||
* @param aView is the view to return the root frame for
|
||||
|
|
Загрузка…
Ссылка в новой задаче