diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 8c271db0f48..229ba97405c 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -604,7 +604,7 @@ nsFormControlFrame::RegUnRegAccessKey(nsIPresContext* aPresContext, nsIFrame * a #endif } - if (NS_CONTENT_ATTR_NOT_THERE != rv) { + if (!accessKey.IsEmpty()) { nsIEventStateManager *stateManager = aPresContext->EventStateManager(); if (aDoReg) { return stateManager->RegisterAccessKey(aFrame->GetContent(), (PRUint32)accessKey.First()); diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index 8c271db0f48..229ba97405c 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -604,7 +604,7 @@ nsFormControlFrame::RegUnRegAccessKey(nsIPresContext* aPresContext, nsIFrame * a #endif } - if (NS_CONTENT_ATTR_NOT_THERE != rv) { + if (!accessKey.IsEmpty()) { nsIEventStateManager *stateManager = aPresContext->EventStateManager(); if (aDoReg) { return stateManager->RegisterAccessKey(aFrame->GetContent(), (PRUint32)accessKey.First());