Bug 1047509 - Part 12: Remove nsCxPusher in nsTextBoxFrame::UpdateAccesskey. r=bholley

This commit is contained in:
Bob Owen 2014-08-07 19:46:36 +01:00
parent b625fa977e
commit b9a88b5b76

View File

@ -23,7 +23,6 @@
#include "nsITheme.h"
#include "nsUnicharUtils.h"
#include "nsContentUtils.h"
#include "nsCxPusher.h"
#include "nsDisplayList.h"
#include "nsCSSRendering.h"
#include "nsIReflowCallback.h"
@ -192,15 +191,8 @@ nsTextBoxFrame::UpdateAccesskey(nsWeakFrame& aWeakThis)
NS_ENSURE_TRUE(aWeakThis.IsAlive(), false);
if (labelElement) {
// Accesskey may be stored on control.
// Because this method is called by the reflow callback, current context
// may not be the right one. Pushing the context of mContent so that
// if nsIDOMXULLabelElement is implemented in XBL, we don't get a
// security exception.
nsCxPusher cx;
if (cx.Push(mContent)) {
labelElement->GetAccessKey(accesskey);
NS_ENSURE_TRUE(aWeakThis.IsAlive(), false);
}
labelElement->GetAccessKey(accesskey);
NS_ENSURE_TRUE(aWeakThis.IsAlive(), false);
}
else {
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey, accesskey);