Bug 1296625 - Replace query to ui.use_activity_cursor pref with a cached bool value. r=smaug

MozReview-Commit-ID: GeTr29JG4qy
This commit is contained in:
Xidorn Quan
2016-08-20 00:43:01 +10:00
parent 9f4e5989af
commit 08d2f6f5b6
4 changed files with 16 additions and 3 deletions

View File

@@ -7369,7 +7369,7 @@ nsDocShell::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
if ((aStateFlags & STATE_RESTORING) == 0) {
// Show the progress cursor if the pref is set
if (Preferences::GetBool("ui.use_activity_cursor", false)) {
if (nsContentUtils::UseActivityCursor()) {
nsCOMPtr<nsIWidget> mainWidget;
GetMainWidget(getter_AddRefs(mainWidget));
if (mainWidget) {
@@ -7385,7 +7385,7 @@ nsDocShell::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
mBusyFlags = BUSY_FLAGS_NONE;
// Hide the progress cursor if the pref is set
if (Preferences::GetBool("ui.use_activity_cursor", false)) {
if (nsContentUtils::UseActivityCursor()) {
nsCOMPtr<nsIWidget> mainWidget;
GetMainWidget(getter_AddRefs(mainWidget));
if (mainWidget) {