Bug 481359 - Mouse shouldn't show spinner while pages are transferring, ui-r=beltzner r+sr=bzbarsky

This commit is contained in:
Markus Stange 2009-03-05 16:07:55 +01:00
parent 1330d5fa26
commit ac0fae4854
2 changed files with 0 additions and 26 deletions

View File

@ -3455,22 +3455,6 @@ nsEventStateManager::UpdateCursor(nsPresContext* aPresContext,
hotspotY = framecursor.mHotspotY;
}
// Check whether or not to show the busy cursor
nsCOMPtr<nsISupports> pcContainer = aPresContext->GetContainer();
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(pcContainer));
if (!docShell) return;
PRUint32 busyFlags = nsIDocShell::BUSY_FLAGS_NONE;
docShell->GetBusyFlags(&busyFlags);
// Show busy cursor everywhere before page loads
// and just replace the arrow cursor after page starts loading
if (busyFlags & nsIDocShell::BUSY_FLAGS_BUSY &&
(cursor == NS_STYLE_CURSOR_AUTO || cursor == NS_STYLE_CURSOR_DEFAULT))
{
cursor = NS_STYLE_CURSOR_SPINNING;
container = nsnull;
}
if (aTargetFrame) {
SetCursor(cursor, container, haveHotspot, hotspotX, hotspotY,
aTargetFrame->GetWindow(), PR_FALSE);

View File

@ -5111,11 +5111,6 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
}
// Page has begun to load
mBusyFlags = BUSY_FLAGS_BUSY | BUSY_FLAGS_BEFORE_PAGE_LOAD;
nsCOMPtr<nsIWidget> mainWidget;
GetMainWidget(getter_AddRefs(mainWidget));
if (mainWidget) {
mainWidget->SetCursor(eCursor_spinning);
}
}
else if ((~aStateFlags & (STATE_TRANSFERRING | STATE_IS_DOCUMENT)) == 0) {
// Page is loading
@ -5124,11 +5119,6 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
else if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_NETWORK)) {
// Page has finished loading
mBusyFlags = BUSY_FLAGS_NONE;
nsCOMPtr<nsIWidget> mainWidget;
GetMainWidget(getter_AddRefs(mainWidget));
if (mainWidget) {
mainWidget->SetCursor(eCursor_standard);
}
}
if ((~aStateFlags & (STATE_IS_DOCUMENT | STATE_STOP)) == 0) {
nsCOMPtr<nsIWebProgress> webProgress =