added vcard_name html attribute. Added GetVcardName in nsFormFrame.

This commit is contained in:
karnaze%netscape.com 1999-05-08 19:30:57 +00:00
Родитель 8bfb1b69f2
Коммит 73330eac5e
7 изменённых файлов: 53 добавлений и 13 удалений

Просмотреть файл

@ -263,6 +263,7 @@ nsIAtom* nsHTMLAtoms::valign;
nsIAtom* nsHTMLAtoms::value;
nsIAtom* nsHTMLAtoms::valuetype;
nsIAtom* nsHTMLAtoms::variable;
nsIAtom* nsHTMLAtoms::vcard_name;
nsIAtom* nsHTMLAtoms::version;
nsIAtom* nsHTMLAtoms::verticalFramesetBorderPseudo;
nsIAtom* nsHTMLAtoms::visibility;
@ -525,6 +526,7 @@ void nsHTMLAtoms::AddrefAtoms()
value = NS_NewAtom("value");
valuetype = NS_NewAtom("valuetype");
variable = NS_NewAtom("variable");
vcard_name = NS_NewAtom("vcard_name");
version = NS_NewAtom("version");
verticalFramesetBorderPseudo = NS_NewAtom(":vframeset-border");
visibility = NS_NewAtom("visibility");
@ -773,6 +775,7 @@ void nsHTMLAtoms::ReleaseAtoms()
NS_RELEASE(value);
NS_RELEASE(valuetype);
NS_RELEASE(variable);
NS_RELEASE(vcard_name);
NS_RELEASE(version);
NS_RELEASE(verticalFramesetBorderPseudo);
NS_RELEASE(visibility);

Просмотреть файл

@ -300,6 +300,7 @@ public:
static nsIAtom* value;
static nsIAtom* valuetype;
static nsIAtom* variable;
static nsIAtom* vcard_name;
static nsIAtom* version;
static nsIAtom* verticalFramesetBorderPseudo;
static nsIAtom* visibility;

Просмотреть файл

@ -300,6 +300,7 @@ public:
static nsIAtom* value;
static nsIAtom* valuetype;
static nsIAtom* variable;
static nsIAtom* vcard_name;
static nsIAtom* version;
static nsIAtom* verticalFramesetBorderPseudo;
static nsIAtom* visibility;

Просмотреть файл

@ -263,6 +263,7 @@ nsIAtom* nsHTMLAtoms::valign;
nsIAtom* nsHTMLAtoms::value;
nsIAtom* nsHTMLAtoms::valuetype;
nsIAtom* nsHTMLAtoms::variable;
nsIAtom* nsHTMLAtoms::vcard_name;
nsIAtom* nsHTMLAtoms::version;
nsIAtom* nsHTMLAtoms::verticalFramesetBorderPseudo;
nsIAtom* nsHTMLAtoms::visibility;
@ -525,6 +526,7 @@ void nsHTMLAtoms::AddrefAtoms()
value = NS_NewAtom("value");
valuetype = NS_NewAtom("valuetype");
variable = NS_NewAtom("variable");
vcard_name = NS_NewAtom("vcard_name");
version = NS_NewAtom("version");
verticalFramesetBorderPseudo = NS_NewAtom(":vframeset-border");
visibility = NS_NewAtom("visibility");
@ -773,6 +775,7 @@ void nsHTMLAtoms::ReleaseAtoms()
NS_RELEASE(value);
NS_RELEASE(valuetype);
NS_RELEASE(variable);
NS_RELEASE(vcard_name);
NS_RELEASE(version);
NS_RELEASE(verticalFramesetBorderPseudo);
NS_RELEASE(visibility);

Просмотреть файл

@ -263,6 +263,7 @@ nsIAtom* nsHTMLAtoms::valign;
nsIAtom* nsHTMLAtoms::value;
nsIAtom* nsHTMLAtoms::valuetype;
nsIAtom* nsHTMLAtoms::variable;
nsIAtom* nsHTMLAtoms::vcard_name;
nsIAtom* nsHTMLAtoms::version;
nsIAtom* nsHTMLAtoms::verticalFramesetBorderPseudo;
nsIAtom* nsHTMLAtoms::visibility;
@ -525,6 +526,7 @@ void nsHTMLAtoms::AddrefAtoms()
value = NS_NewAtom("value");
valuetype = NS_NewAtom("valuetype");
variable = NS_NewAtom("variable");
vcard_name = NS_NewAtom("vcard_name");
version = NS_NewAtom("version");
verticalFramesetBorderPseudo = NS_NewAtom(":vframeset-border");
visibility = NS_NewAtom("visibility");
@ -773,6 +775,7 @@ void nsHTMLAtoms::ReleaseAtoms()
NS_RELEASE(value);
NS_RELEASE(valuetype);
NS_RELEASE(variable);
NS_RELEASE(vcard_name);
NS_RELEASE(version);
NS_RELEASE(verticalFramesetBorderPseudo);
NS_RELEASE(visibility);

Просмотреть файл

@ -300,6 +300,7 @@ public:
static nsIAtom* value;
static nsIAtom* valuetype;
static nsIAtom* variable;
static nsIAtom* vcard_name;
static nsIAtom* version;
static nsIAtom* verticalFramesetBorderPseudo;
static nsIAtom* visibility;

Просмотреть файл

@ -726,6 +726,35 @@ NS_IMETHODIMP nsFormFrame::GetEncoder(nsIUnicodeEncoder** encoder)
}
return NS_OK;
}
#ifdef ClientWallet
void
GetVcardName(nsIFormControlFrame& aFormControlFrame, nsString& aVCardName)
{
aVCardName = "";
nsIFrame* frame = nsnull;
nsresult rv = aFormControlFrame.QueryInterface(kIFrameIID, (void**)&frame);
if (NS_SUCCEEDED(rv) && frame) {
nsIContent* content = nsnull;
rv = frame->GetContent(&content);
if (NS_SUCCEEDED(rv) && content) {
nsIHTMLContent* htmlContent = nsnull;
rv = content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
if (NS_SUCCEEDED(rv) && htmlContent) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::vcard_name, value)) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(aVCardName);
}
}
NS_RELEASE(htmlContent);
}
NS_RELEASE(content);
}
}
}
#endif
#define CRLF "\015\012"
void nsFormFrame::ProcessAsURLEncoded(PRBool isPost, nsString& aData, nsIFormControlFrame* aFrame)
{
@ -813,8 +842,7 @@ void nsFormFrame::ProcessAsURLEncoded(PRBool isPost, nsString& aData, nsIFormCon
#ifdef ClientWallet
if (OKToCapture && (NS_FORM_INPUT_TEXT == type)) {
nsString vcard("");
/* following line is awaiting karneze to implement GetAttrib */
// child->GetAttrib(NS_NewAtom("VCARD_NAME"), &vcard);
GetVcardName(*child, vcard);
nsIWalletService *service;
nsresult res = nsServiceManager::GetService(kWalletServiceCID,
kIWalletServiceIID,