mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 481359 - Mouse shouldn't show spinner while pages are transferring, ui-r=beltzner r+sr=bzbarsky
This commit is contained in:
parent
1330d5fa26
commit
ac0fae4854
@ -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);
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user