зеркало из https://github.com/mozilla/pjs.git
Bug 757296 - Replace windows line endings with unix line endings in nsDocument.cpp. r=line-endings
This commit is contained in:
Родитель
2949b453e4
Коммит
e5c4486408
|
@ -8774,10 +8774,10 @@ LogFullScreenDenied(bool aLogFailure, const char* aMessage, nsIDocument* aDoc)
|
||||||
nsresult
|
nsresult
|
||||||
nsDocument::AddFullscreenApprovedObserver()
|
nsDocument::AddFullscreenApprovedObserver()
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||||
NS_ENSURE_TRUE(os, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(os, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsresult res = os->AddObserver(this, "fullscreen-approved", true);
|
nsresult res = os->AddObserver(this, "fullscreen-approved", true);
|
||||||
NS_ENSURE_SUCCESS(res, res);
|
NS_ENSURE_SUCCESS(res, res);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -8786,9 +8786,9 @@ nsDocument::AddFullscreenApprovedObserver()
|
||||||
nsresult
|
nsresult
|
||||||
nsDocument::RemoveFullscreenApprovedObserver()
|
nsDocument::RemoveFullscreenApprovedObserver()
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||||
NS_ENSURE_TRUE(os, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(os, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsresult res = os->RemoveObserver(this, "fullscreen-approved");
|
nsresult res = os->RemoveObserver(this, "fullscreen-approved");
|
||||||
NS_ENSURE_SUCCESS(res, res);
|
NS_ENSURE_SUCCESS(res, res);
|
||||||
|
|
||||||
|
@ -8810,7 +8810,7 @@ nsDocument::CleanupFullscreenState()
|
||||||
mFullScreenStack.Clear();
|
mFullScreenStack.Clear();
|
||||||
}
|
}
|
||||||
SetApprovedForFullscreen(false);
|
SetApprovedForFullscreen(false);
|
||||||
RemoveFullscreenApprovedObserver();
|
RemoveFullscreenApprovedObserver();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -9272,16 +9272,16 @@ private:
|
||||||
// reference; the nsIEventTarget to which this is dispatched holds the only
|
// reference; the nsIEventTarget to which this is dispatched holds the only
|
||||||
// owning reference to this instance. This reference is valid between
|
// owning reference to this instance. This reference is valid between
|
||||||
// an instance being created, and its Run() method being called.
|
// an instance being created, and its Run() method being called.
|
||||||
static nsAsyncPointerLockRequest* sInstance;
|
static nsAsyncPointerLockRequest* sInstance;
|
||||||
|
|
||||||
// Element and document which reqested pointer lock.
|
// Element and document which reqested pointer lock.
|
||||||
nsCOMPtr<Element> mElement;
|
nsCOMPtr<Element> mElement;
|
||||||
nsCOMPtr<nsIDocument> mDocument;
|
nsCOMPtr<nsIDocument> mDocument;
|
||||||
};
|
};
|
||||||
|
|
||||||
nsAsyncPointerLockRequest* nsAsyncPointerLockRequest::sInstance = nsnull;
|
nsAsyncPointerLockRequest* nsAsyncPointerLockRequest::sInstance = nsnull;
|
||||||
nsWeakPtr nsDocument::sPendingPointerLockDoc;
|
nsWeakPtr nsDocument::sPendingPointerLockDoc;
|
||||||
nsWeakPtr nsDocument::sPendingPointerLockElement;
|
nsWeakPtr nsDocument::sPendingPointerLockElement;
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void
|
void
|
||||||
|
@ -9289,26 +9289,26 @@ nsDocument::ClearPendingPointerLockRequest(bool aDispatchErrorEvents)
|
||||||
{
|
{
|
||||||
nsAsyncPointerLockRequest::Cancel();
|
nsAsyncPointerLockRequest::Cancel();
|
||||||
|
|
||||||
if (!sPendingPointerLockDoc) {
|
if (!sPendingPointerLockDoc) {
|
||||||
// No pending request.
|
// No pending request.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
nsCOMPtr<nsIDocument> doc(do_QueryReferent(sPendingPointerLockDoc));
|
nsCOMPtr<nsIDocument> doc(do_QueryReferent(sPendingPointerLockDoc));
|
||||||
if (aDispatchErrorEvents) {
|
if (aDispatchErrorEvents) {
|
||||||
DispatchPointerLockError(doc);
|
DispatchPointerLockError(doc);
|
||||||
}
|
}
|
||||||
nsCOMPtr<Element> element(do_QueryReferent(sPendingPointerLockElement));
|
nsCOMPtr<Element> element(do_QueryReferent(sPendingPointerLockElement));
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
nsCOMPtr<Element> pointerLockedElement =
|
nsCOMPtr<Element> pointerLockedElement =
|
||||||
do_QueryReferent(nsEventStateManager::sPointerLockedElement);
|
do_QueryReferent(nsEventStateManager::sPointerLockedElement);
|
||||||
NS_ASSERTION(pointerLockedElement != element,
|
NS_ASSERTION(pointerLockedElement != element,
|
||||||
"We shouldn't be clearing pointer locked flag on pointer locked element!");
|
"We shouldn't be clearing pointer locked flag on pointer locked element!");
|
||||||
#endif
|
#endif
|
||||||
if (element) {
|
if (element) {
|
||||||
element->ClearPointerLock();
|
element->ClearPointerLock();
|
||||||
}
|
}
|
||||||
sPendingPointerLockDoc = nsnull;
|
sPendingPointerLockDoc = nsnull;
|
||||||
sPendingPointerLockElement = nsnull;
|
sPendingPointerLockElement = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
|
@ -9318,27 +9318,27 @@ nsDocument::SetPendingPointerLockRequest(Element* aElement)
|
||||||
// If there's an existing pending pointer lock request, deny it.
|
// If there's an existing pending pointer lock request, deny it.
|
||||||
ClearPendingPointerLockRequest(true);
|
ClearPendingPointerLockRequest(true);
|
||||||
|
|
||||||
NS_ENSURE_TRUE(aElement != nsnull, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(aElement != nsnull, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
sPendingPointerLockDoc = do_GetWeakReference(aElement->OwnerDoc());
|
|
||||||
sPendingPointerLockElement = do_GetWeakReference(aElement);
|
|
||||||
|
|
||||||
// Set the pointer lock flag, so that if the element is removed from
|
|
||||||
// its document we know to cancel the pending request.
|
|
||||||
aElement->SetPointerLock();
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
sPendingPointerLockDoc = do_GetWeakReference(aElement->OwnerDoc());
|
||||||
nsDocument::SetApprovedForFullscreen(bool aIsApproved)
|
sPendingPointerLockElement = do_GetWeakReference(aElement);
|
||||||
{
|
|
||||||
mIsApprovedForFullscreen = aIsApproved;
|
// Set the pointer lock flag, so that if the element is removed from
|
||||||
}
|
// its document we know to cancel the pending request.
|
||||||
|
aElement->SetPointerLock();
|
||||||
nsresult
|
|
||||||
nsDocument::Observe(nsISupports *aSubject,
|
return NS_OK;
|
||||||
const char *aTopic,
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nsDocument::SetApprovedForFullscreen(bool aIsApproved)
|
||||||
|
{
|
||||||
|
mIsApprovedForFullscreen = aIsApproved;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
nsDocument::Observe(nsISupports *aSubject,
|
||||||
|
const char *aTopic,
|
||||||
const PRUnichar *aData)
|
const PRUnichar *aData)
|
||||||
{
|
{
|
||||||
if (strcmp("fullscreen-approved", aTopic) == 0) {
|
if (strcmp("fullscreen-approved", aTopic) == 0) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче