|
|
|
Lines 5106-5139
nsDocShell::OnStateChange(nsIWebProgress
|
Link Here
|
|---|
|
| 5106 |
// We'll never get an Embed() for this load, so just go ahead |
5106 |
// We'll never get an Embed() for this load, so just go ahead |
| 5107 |
// and SetHistoryEntry now. |
5107 |
// and SetHistoryEntry now. |
| 5108 |
SetHistoryEntry(&mOSHE, mLSHE); |
5108 |
SetHistoryEntry(&mOSHE, mLSHE); |
| 5109 |
} |
5109 |
} |
| 5110 |
|
5110 |
|
| 5111 |
} |
5111 |
} |
| 5112 |
// Page has begun to load |
5112 |
// Page has begun to load |
| 5113 |
mBusyFlags = BUSY_FLAGS_BUSY | BUSY_FLAGS_BEFORE_PAGE_LOAD; |
5113 |
mBusyFlags = BUSY_FLAGS_BUSY | BUSY_FLAGS_BEFORE_PAGE_LOAD; |
| 5114 |
nsCOMPtr<nsIWidget> mainWidget; |
|
|
| 5115 |
GetMainWidget(getter_AddRefs(mainWidget)); |
| 5116 |
if (mainWidget) { |
| 5117 |
mainWidget->SetCursor(eCursor_spinning); |
| 5118 |
} |
| 5119 |
} |
5114 |
} |
| 5120 |
else if ((~aStateFlags & (STATE_TRANSFERRING | STATE_IS_DOCUMENT)) == 0) { |
5115 |
else if ((~aStateFlags & (STATE_TRANSFERRING | STATE_IS_DOCUMENT)) == 0) { |
| 5121 |
// Page is loading |
5116 |
// Page is loading |
| 5122 |
mBusyFlags = BUSY_FLAGS_BUSY | BUSY_FLAGS_PAGE_LOADING; |
5117 |
mBusyFlags = BUSY_FLAGS_BUSY | BUSY_FLAGS_PAGE_LOADING; |
| 5123 |
} |
5118 |
} |
| 5124 |
else if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_NETWORK)) { |
5119 |
else if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_NETWORK)) { |
| 5125 |
// Page has finished loading |
5120 |
// Page has finished loading |
| 5126 |
mBusyFlags = BUSY_FLAGS_NONE; |
5121 |
mBusyFlags = BUSY_FLAGS_NONE; |
| 5127 |
nsCOMPtr<nsIWidget> mainWidget; |
|
|
| 5128 |
GetMainWidget(getter_AddRefs(mainWidget)); |
| 5129 |
if (mainWidget) { |
| 5130 |
mainWidget->SetCursor(eCursor_standard); |
| 5131 |
} |
| 5132 |
} |
5122 |
} |
| 5133 |
if ((~aStateFlags & (STATE_IS_DOCUMENT | STATE_STOP)) == 0) { |
5123 |
if ((~aStateFlags & (STATE_IS_DOCUMENT | STATE_STOP)) == 0) { |
| 5134 |
nsCOMPtr<nsIWebProgress> webProgress = |
5124 |
nsCOMPtr<nsIWebProgress> webProgress = |
| 5135 |
do_QueryInterface(GetAsSupports(this)); |
5125 |
do_QueryInterface(GetAsSupports(this)); |
| 5136 |
// Is the document stop notification for this document? |
5126 |
// Is the document stop notification for this document? |
| 5137 |
if (aProgress == webProgress.get()) { |
5127 |
if (aProgress == webProgress.get()) { |
| 5138 |
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest)); |
5128 |
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest)); |
| 5139 |
EndPageLoad(aProgress, channel, aStatus); |
5129 |
EndPageLoad(aProgress, channel, aStatus); |