From e76d62fd1797b6366daa1e514427eba6ac65252c Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Thu, 20 Jun 2002 20:44:27 +0000 Subject: [PATCH] Fix accesskey regression for text inputs and textareas. b=148249 r=aaronl sr=jst git-svn-id: svn://10.0.0.236/trunk@123714 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsFormControlFrame.cpp | 7 ++++--- mozilla/layout/html/forms/src/nsFormControlFrame.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index b2d317d6c50..41f233e1203 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -129,6 +129,8 @@ nsFormControlFrame::~nsFormControlFrame() NS_IMETHODIMP nsFormControlFrame::Destroy(nsIPresContext *aPresContext) { + // XXXldb Do we really need to do this? Shouldn't only those frames + // that use it do it? nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE); return nsLeafFrame::Destroy(aPresContext); } @@ -581,10 +583,9 @@ nsFormControlFrame::RegUnRegAccessKey(nsIPresContext* aPresContext, nsIFrame * a nsCOMPtr content; if (NS_SUCCEEDED(aFrame->GetContent(getter_AddRefs(content)))) { #if 1 - PRInt32 nameSpaceID; - content->GetNameSpaceID(nameSpaceID); nsAutoString resultValue; - rv = content->GetAttr(nameSpaceID, nsHTMLAtoms::accesskey, accessKey); + rv = content->GetAttr(kNameSpaceID_None, + nsHTMLAtoms::accesskey, accessKey); #else nsCOMPtr inputElement(do_QueryInterface(content)); if (inputElement) { diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index b2d317d6c50..41f233e1203 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -129,6 +129,8 @@ nsFormControlFrame::~nsFormControlFrame() NS_IMETHODIMP nsFormControlFrame::Destroy(nsIPresContext *aPresContext) { + // XXXldb Do we really need to do this? Shouldn't only those frames + // that use it do it? nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_FALSE); return nsLeafFrame::Destroy(aPresContext); } @@ -581,10 +583,9 @@ nsFormControlFrame::RegUnRegAccessKey(nsIPresContext* aPresContext, nsIFrame * a nsCOMPtr content; if (NS_SUCCEEDED(aFrame->GetContent(getter_AddRefs(content)))) { #if 1 - PRInt32 nameSpaceID; - content->GetNameSpaceID(nameSpaceID); nsAutoString resultValue; - rv = content->GetAttr(nameSpaceID, nsHTMLAtoms::accesskey, accessKey); + rv = content->GetAttr(kNameSpaceID_None, + nsHTMLAtoms::accesskey, accessKey); #else nsCOMPtr inputElement(do_QueryInterface(content)); if (inputElement) {