Fix line-endings in nsDocument.cpp.

--HG--
extra : rebase_source : 714c3e43ce3d3e776d9f2b3ca910e3835d8b693e
This commit is contained in:
Peter Van der Beken 2011-10-03 11:31:00 +02:00
parent a7d1f467b5
commit d3cd5d5d00

View File

@ -8604,36 +8604,36 @@ nsDocument::GetMozFullScreen(bool *aFullScreen)
return NS_OK;
}
NS_IMETHODIMP
nsDocument::GetMozFullScreenEnabled(bool *aFullScreen)
{
NS_ENSURE_ARG_POINTER(aFullScreen);
*aFullScreen = false;
NS_IMETHODIMP
nsDocument::GetMozFullScreenEnabled(bool *aFullScreen)
{
NS_ENSURE_ARG_POINTER(aFullScreen);
*aFullScreen = false;
if (!nsContentUtils::IsFullScreenApiEnabled()) {
return NS_OK;
}
// todo: Bug 684618 - Deny requests for DOM full-screen when windowed
// plugins are present.
// Ensure that all ancestor <iframe> elements have the mozallowfullscreen
// boolean attribute set.
nsINode* node = static_cast<nsINode*>(this);
do {
nsIContent* content = static_cast<nsIContent*>(node);
if (content->IsHTML(nsGkAtoms::iframe) &&
!content->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)) {
// The node requesting fullscreen, or one of its crossdoc ancestors,
// is an iframe which doesn't have the "mozalllowfullscreen" attribute.
// This request is not authorized by the parent document.
return NS_OK;
}
node = nsContentUtils::GetCrossDocParentNode(node);
} while (node);
*aFullScreen = true;
return NS_OK;
}
// todo: Bug 684618 - Deny requests for DOM full-screen when windowed
// plugins are present.
// Ensure that all ancestor <iframe> elements have the mozallowfullscreen
// boolean attribute set.
nsINode* node = static_cast<nsINode*>(this);
do {
nsIContent* content = static_cast<nsIContent*>(node);
if (content->IsHTML(nsGkAtoms::iframe) &&
!content->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)) {
// The node requesting fullscreen, or one of its crossdoc ancestors,
// is an iframe which doesn't have the "mozalllowfullscreen" attribute.
// This request is not authorized by the parent document.
return NS_OK;
}
node = nsContentUtils::GetCrossDocParentNode(node);
} while (node);
*aFullScreen = true;
return NS_OK;
}
PRInt64