DOM string changes. All nsString& in DOM interfaces (and interfaces needed by DOM implementations) have been changed to nsAReadableString& and nsAWritableString&. String implementation additions (sanctioned by scc) to support DOM needs. Bug 49091. r=vidur,jst,scc
git-svn-id: svn://10.0.0.236/trunk@76967 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -445,9 +445,9 @@ nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetContentType(nsString& aContentType) const
|
||||
nsHTMLDocument::GetContentType(nsAWritableString& aContentType) const
|
||||
{
|
||||
aContentType.AssignWithConversion("text/html");
|
||||
aContentType.Assign(NS_LITERAL_STRING("text/html"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -972,13 +972,13 @@ nsHTMLDocument::EndLoad()
|
||||
return nsDocument::EndLoad();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle)
|
||||
NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsAReadableString& aTitle)
|
||||
{
|
||||
if (nsnull == mDocumentTitle) {
|
||||
mDocumentTitle = new nsString(aTitle);
|
||||
}
|
||||
else {
|
||||
*mDocumentTitle = aTitle;
|
||||
mDocumentTitle->Assign(aTitle);
|
||||
}
|
||||
|
||||
// Pass on to any interested containers
|
||||
@@ -992,7 +992,7 @@ NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle)
|
||||
if (container) {
|
||||
nsCOMPtr<nsIBaseWindow> docShell(do_QueryInterface(container));
|
||||
if(docShell) {
|
||||
docShell->SetTitle(aTitle.GetUnicode());
|
||||
docShell->SetTitle(mDocumentTitle->GetUnicode());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1125,7 +1125,7 @@ nsHTMLDocument::GetBaseURL(nsIURI*& aURL) const
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument:: SetBaseURL(const nsString& aURLSpec)
|
||||
nsHTMLDocument:: SetBaseURL(const nsAReadableString& aURLSpec)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
|
||||
@@ -1139,10 +1139,10 @@ nsHTMLDocument:: SetBaseURL(const nsString& aURLSpec)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument:: GetBaseTarget(nsString& aTarget) const
|
||||
nsHTMLDocument:: GetBaseTarget(nsAWritableString& aTarget) const
|
||||
{
|
||||
if (nsnull != mBaseTarget) {
|
||||
aTarget = *mBaseTarget;
|
||||
aTarget.Assign(*mBaseTarget);
|
||||
}
|
||||
else {
|
||||
aTarget.Truncate();
|
||||
@@ -1151,14 +1151,14 @@ nsHTMLDocument:: GetBaseTarget(nsString& aTarget) const
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument:: SetBaseTarget(const nsString& aTarget)
|
||||
nsHTMLDocument:: SetBaseTarget(const nsAReadableString& aTarget)
|
||||
{
|
||||
if (0 < aTarget.Length()) {
|
||||
if (nsnull != mBaseTarget) {
|
||||
*mBaseTarget = aTarget;
|
||||
}
|
||||
else {
|
||||
mBaseTarget = aTarget.ToNewString();
|
||||
mBaseTarget = new nsString(aTarget);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1171,14 +1171,14 @@ nsHTMLDocument:: SetBaseTarget(const nsString& aTarget)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetLastModified(const nsString& aLastModified)
|
||||
nsHTMLDocument::SetLastModified(const nsAReadableString& aLastModified)
|
||||
{
|
||||
if (0 < aLastModified.Length()) {
|
||||
if (nsnull != mLastModified) {
|
||||
*mLastModified = aLastModified;
|
||||
}
|
||||
else {
|
||||
mLastModified = aLastModified.ToNewString();
|
||||
mLastModified = new nsString(aLastModified);
|
||||
}
|
||||
}
|
||||
else if (nsnull != mLastModified) {
|
||||
@@ -1190,14 +1190,14 @@ nsHTMLDocument::SetLastModified(const nsString& aLastModified)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetReferrer(const nsString& aReferrer)
|
||||
nsHTMLDocument::SetReferrer(const nsAReadableString& aReferrer)
|
||||
{
|
||||
if (0 < aReferrer.Length()) {
|
||||
if (nsnull != mReferrer) {
|
||||
*mReferrer = aReferrer;
|
||||
}
|
||||
else {
|
||||
mReferrer = aReferrer.ToNewString();
|
||||
mReferrer = new nsString(aReferrer);
|
||||
}
|
||||
}
|
||||
else if (nsnull != mReferrer) {
|
||||
@@ -1255,7 +1255,8 @@ nsHTMLDocument::SetDTDMode(nsDTDMode aMode)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetHeaderData(nsIAtom* aHeaderField, const nsString& aData)
|
||||
nsHTMLDocument::SetHeaderData(nsIAtom* aHeaderField,
|
||||
const nsAReadableString& aData)
|
||||
{
|
||||
nsresult result = nsMarkupDocument::SetHeaderData(aHeaderField, aData);
|
||||
|
||||
@@ -1273,8 +1274,9 @@ nsHTMLDocument::SetHeaderData(nsIAtom* aHeaderField, const nsString& aData)
|
||||
if (PR_FALSE == type.Equals(textHtml)) {
|
||||
sheet->GetTitle(title);
|
||||
if (0 < title.Length()) { // if sheet has title
|
||||
nsAutoString data(aData);
|
||||
PRBool disabled = ((0 == aData.Length()) ||
|
||||
(PR_FALSE == aData.EqualsIgnoreCase(title)));
|
||||
(PR_FALSE == title.EqualsIgnoreCase(data)));
|
||||
SetStyleSheetDisabledState(sheet, disabled);
|
||||
}
|
||||
}
|
||||
@@ -1381,9 +1383,9 @@ nsHTMLDocument::FlushPendingNotifications()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateElementNS(const nsString& aNamespaceURI,
|
||||
const nsString& aQualifiedName,
|
||||
nsIDOMElement** aReturn)
|
||||
nsHTMLDocument::CreateElementNS(const nsAReadableString& aNamespaceURI,
|
||||
const nsAReadableString& aQualifiedName,
|
||||
nsIDOMElement** aReturn)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
@@ -1420,7 +1422,7 @@ nsHTMLDocument::CreateElementNS(const nsString& aNamespaceURI,
|
||||
// nsIDOMDocument interface implementation
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateElement(const nsString& aTagName,
|
||||
nsHTMLDocument::CreateElement(const nsAReadableString& aTagName,
|
||||
nsIDOMElement** aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
@@ -1443,8 +1445,8 @@ nsHTMLDocument::CreateElement(const nsString& aTagName,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateProcessingInstruction(const nsString& aTarget,
|
||||
const nsString& aData,
|
||||
nsHTMLDocument::CreateProcessingInstruction(const nsAReadableString& aTarget,
|
||||
const nsAReadableString& aData,
|
||||
nsIDOMProcessingInstruction** aReturn)
|
||||
{
|
||||
// There are no PIs for HTML
|
||||
@@ -1454,7 +1456,7 @@ nsHTMLDocument::CreateProcessingInstruction(const nsString& aTarget,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateCDATASection(const nsString& aData,
|
||||
nsHTMLDocument::CreateCDATASection(const nsAReadableString& aData,
|
||||
nsIDOMCDATASection** aReturn)
|
||||
{
|
||||
// There are no CDATASections in HTML
|
||||
@@ -1464,7 +1466,7 @@ nsHTMLDocument::CreateCDATASection(const nsString& aData,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateEntityReference(const nsString& aName,
|
||||
nsHTMLDocument::CreateEntityReference(const nsAReadableString& aName,
|
||||
nsIDOMEntityReference** aReturn)
|
||||
{
|
||||
// There are no EntityReferences in HTML
|
||||
@@ -1499,25 +1501,25 @@ nsHTMLDocument::CreateDocumentFragment(nsIDOMDocumentFragment** aReturn)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateComment(const nsString& aData, nsIDOMComment** aReturn)
|
||||
nsHTMLDocument::CreateComment(const nsAReadableString& aData, nsIDOMComment** aReturn)
|
||||
{
|
||||
return nsDocument::CreateComment(aData, aReturn);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn)
|
||||
nsHTMLDocument::CreateAttribute(const nsAReadableString& aName, nsIDOMAttr** aReturn)
|
||||
{
|
||||
return nsDocument::CreateAttribute(aName, aReturn);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateTextNode(const nsString& aData, nsIDOMText** aReturn)
|
||||
nsHTMLDocument::CreateTextNode(const nsAReadableString& aData, nsIDOMText** aReturn)
|
||||
{
|
||||
return nsDocument::CreateTextNode(aData, aReturn);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn)
|
||||
nsHTMLDocument::GetElementsByTagName(const nsAReadableString& aTagname, nsIDOMNodeList** aReturn)
|
||||
{
|
||||
nsAutoString tmp(aTagname);
|
||||
tmp.ToLowerCase(); // HTML elements are lower case internally.
|
||||
@@ -1580,19 +1582,19 @@ nsHTMLDocument::HasChildNodes(PRBool* aReturn)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetNodeName(nsString& aNodeName)
|
||||
nsHTMLDocument::GetNodeName(nsAWritableString& aNodeName)
|
||||
{
|
||||
return nsDocument::GetNodeName(aNodeName);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetNodeValue(nsString& aNodeValue)
|
||||
nsHTMLDocument::GetNodeValue(nsAWritableString& aNodeValue)
|
||||
{
|
||||
return nsDocument::GetNodeValue(aNodeValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetNodeValue(const nsString& aNodeValue)
|
||||
nsHTMLDocument::SetNodeValue(const nsAReadableString& aNodeValue)
|
||||
{
|
||||
return nsDocument::SetNodeValue(aNodeValue);
|
||||
}
|
||||
@@ -1604,25 +1606,25 @@ nsHTMLDocument::GetNodeType(PRUint16* aNodeType)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetNamespaceURI(nsString& aNamespaceURI)
|
||||
nsHTMLDocument::GetNamespaceURI(nsAWritableString& aNamespaceURI)
|
||||
{
|
||||
return nsDocument::GetNamespaceURI(aNamespaceURI);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetPrefix(nsString& aPrefix)
|
||||
nsHTMLDocument::GetPrefix(nsAWritableString& aPrefix)
|
||||
{
|
||||
return nsDocument::GetPrefix(aPrefix);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetPrefix(const nsString& aPrefix)
|
||||
nsHTMLDocument::SetPrefix(const nsAReadableString& aPrefix)
|
||||
{
|
||||
return nsDocument::SetPrefix(aPrefix);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetLocalName(nsString& aLocalName)
|
||||
nsHTMLDocument::GetLocalName(nsAWritableString& aLocalName)
|
||||
{
|
||||
return nsDocument::GetLocalName(aLocalName);
|
||||
}
|
||||
@@ -1670,7 +1672,7 @@ nsHTMLDocument::Normalize()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::Supports(const nsString& aFeature, const nsString& aVersion,
|
||||
nsHTMLDocument::Supports(const nsAReadableString& aFeature, const nsAReadableString& aVersion,
|
||||
PRBool* aReturn)
|
||||
{
|
||||
return nsDocument::Supports(aFeature, aVersion, aReturn);
|
||||
@@ -1684,19 +1686,21 @@ nsHTMLDocument::Supports(const nsString& aFeature, const nsString& aVersion,
|
||||
// for full specification.
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetTitle(nsString& aTitle)
|
||||
nsHTMLDocument::GetTitle(nsAWritableString& aTitle)
|
||||
{
|
||||
if (nsnull != mDocumentTitle) {
|
||||
aTitle=*mDocumentTitle;
|
||||
aTitle.Assign(*mDocumentTitle);
|
||||
} else {
|
||||
aTitle.Truncate();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetReferrer(nsString& aReferrer)
|
||||
nsHTMLDocument::GetReferrer(nsAWritableString& aReferrer)
|
||||
{
|
||||
if (nsnull != mReferrer) {
|
||||
aReferrer = *mReferrer;
|
||||
aReferrer.Assign(*mReferrer);
|
||||
}
|
||||
else {
|
||||
aReferrer.Truncate();
|
||||
@@ -1719,7 +1723,7 @@ nsHTMLDocument::GetDomainURI(nsIURI **uri)
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetDomain(nsString& aDomain)
|
||||
nsHTMLDocument::GetDomain(nsAWritableString& aDomain)
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
if (NS_FAILED(GetDomainURI(getter_AddRefs(uri))))
|
||||
@@ -1728,14 +1732,14 @@ nsHTMLDocument::GetDomain(nsString& aDomain)
|
||||
char *hostName;
|
||||
if (NS_FAILED(uri->GetHost(&hostName)))
|
||||
return NS_ERROR_FAILURE;
|
||||
aDomain.AssignWithConversion(hostName);
|
||||
aDomain.Assign(NS_ConvertASCIItoUCS2(hostName));
|
||||
nsCRT::free(hostName);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetDomain(const nsString& aDomain)
|
||||
nsHTMLDocument::SetDomain(const nsAReadableString& aDomain)
|
||||
{
|
||||
// Check new domain
|
||||
|
||||
@@ -1749,7 +1753,8 @@ nsHTMLDocument::SetDomain(const nsString& aDomain)
|
||||
nsAutoString suffix;
|
||||
current.Right(suffix, aDomain.Length());
|
||||
PRUnichar c = current.CharAt(current.Length() - aDomain.Length() - 1);
|
||||
if (aDomain.EqualsIgnoreCase(suffix) && (c == '.' || c == '/'))
|
||||
if (suffix.EqualsIgnoreCase((const PRUnichar*)nsPromiseFlatString(aDomain)) &&
|
||||
(c == '.' || c == '/'))
|
||||
ok = PR_TRUE;
|
||||
}
|
||||
if (!ok) {
|
||||
@@ -1793,12 +1798,12 @@ nsHTMLDocument::SetDomain(const nsString& aDomain)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetURL(nsString& aURL)
|
||||
nsHTMLDocument::GetURL(nsAWritableString& aURL)
|
||||
{
|
||||
if (nsnull != mDocumentURL) {
|
||||
char* str;
|
||||
mDocumentURL->GetSpec(&str);
|
||||
aURL.AssignWithConversion(str);
|
||||
aURL.Assign(NS_ConvertASCIItoUCS2(str));
|
||||
nsCRT::free(str);
|
||||
}
|
||||
return NS_OK;
|
||||
@@ -1960,23 +1965,25 @@ nsHTMLDocument::GetAnchors(nsIDOMHTMLCollection** aAnchors)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetCookie(nsString& aCookie)
|
||||
nsHTMLDocument::GetCookie(nsAWritableString& aCookie)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsAutoString str;
|
||||
NS_WITH_SERVICE(nsICookieService, service, kCookieServiceCID, &result);
|
||||
if ((NS_OK == result) && (nsnull != service) && (nsnull != mDocumentURL)) {
|
||||
result = service->GetCookieString(mDocumentURL, aCookie);
|
||||
result = service->GetCookieString(mDocumentURL, str);
|
||||
}
|
||||
aCookie.Assign(str);
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetCookie(const nsString& aCookie)
|
||||
nsHTMLDocument::SetCookie(const nsAReadableString& aCookie)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
NS_WITH_SERVICE(nsICookieService, service, kCookieServiceCID, &result);
|
||||
if ((NS_OK == result) && (nsnull != service) && (nsnull != mDocumentURL)) {
|
||||
result = service->SetCookieString(mDocumentURL, aCookie);
|
||||
result = service->SetCookieString(mDocumentURL, nsAutoString(aCookie));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -2166,7 +2173,7 @@ nsHTMLDocument::Close()
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLDocument::WriteCommon(const nsString& aText,
|
||||
nsHTMLDocument::WriteCommon(const nsAReadableString& aText,
|
||||
PRBool aNewlineTerminate)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
@@ -2197,13 +2204,13 @@ nsHTMLDocument::WriteCommon(const nsString& aText,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::Write(const nsString& aText)
|
||||
nsHTMLDocument::Write(const nsAReadableString& aText)
|
||||
{
|
||||
return WriteCommon(aText, PR_FALSE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::Writeln(const nsString& aText)
|
||||
nsHTMLDocument::Writeln(const nsAReadableString& aText)
|
||||
{
|
||||
return WriteCommon(aText, PR_TRUE);
|
||||
}
|
||||
@@ -2304,7 +2311,7 @@ nsHTMLDocument::Writeln(JSContext *cx, jsval *argv, PRUint32 argc)
|
||||
}
|
||||
|
||||
nsIContent *
|
||||
nsHTMLDocument::MatchName(nsIContent *aContent, const nsString& aName)
|
||||
nsHTMLDocument::MatchName(nsIContent *aContent, const nsAReadableString& aName)
|
||||
{
|
||||
nsAutoString value;
|
||||
nsIContent *result = nsnull;
|
||||
@@ -2331,7 +2338,7 @@ nsHTMLDocument::MatchName(nsIContent *aContent, const nsString& aName)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetElementById(const nsString& aElementId, nsIDOMElement** aReturn)
|
||||
nsHTMLDocument::GetElementById(const nsAReadableString& aElementId, nsIDOMElement** aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
*aReturn = nsnull;
|
||||
@@ -2361,8 +2368,8 @@ nsHTMLDocument::ImportNode(nsIDOMNode* aImportedNode,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CreateAttributeNS(const nsString& aNamespaceURI,
|
||||
const nsString& aQualifiedName,
|
||||
nsHTMLDocument::CreateAttributeNS(const nsAReadableString& aNamespaceURI,
|
||||
const nsAReadableString& aQualifiedName,
|
||||
nsIDOMAttr** aReturn)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me");
|
||||
@@ -2370,8 +2377,8 @@ nsHTMLDocument::CreateAttributeNS(const nsString& aNamespaceURI,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetElementsByTagNameNS(const nsString& aNamespaceURI,
|
||||
const nsString& aLocalName,
|
||||
nsHTMLDocument::GetElementsByTagNameNS(const nsAReadableString& aNamespaceURI,
|
||||
const nsAReadableString& aLocalName,
|
||||
nsIDOMNodeList** aReturn)
|
||||
{
|
||||
nsAutoString tmp(aLocalName);
|
||||
@@ -2398,12 +2405,14 @@ nsHTMLDocument::MatchNameAttribute(nsIContent* aContent, nsString* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetElementsByName(const nsString& aElementName,
|
||||
nsHTMLDocument::GetElementsByName(const nsAReadableString& aElementName,
|
||||
nsIDOMNodeList** aReturn)
|
||||
{
|
||||
nsAutoString name(aElementName);
|
||||
|
||||
nsContentList* elements = new nsContentList(this,
|
||||
MatchNameAttribute,
|
||||
&aElementName);
|
||||
&name);
|
||||
if (nsnull == elements) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
@@ -2523,7 +2532,7 @@ nsHTMLDocument::GetHeight(PRInt32* aHeight)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetAlinkColor(nsString& aAlinkColor)
|
||||
nsHTMLDocument::GetAlinkColor(nsAWritableString& aAlinkColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2547,7 +2556,7 @@ nsHTMLDocument::GetAlinkColor(nsString& aAlinkColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetAlinkColor(const nsString& aAlinkColor)
|
||||
nsHTMLDocument::SetAlinkColor(const nsAReadableString& aAlinkColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2569,7 +2578,7 @@ nsHTMLDocument::SetAlinkColor(const nsString& aAlinkColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetLinkColor(nsString& aLinkColor)
|
||||
nsHTMLDocument::GetLinkColor(nsAWritableString& aLinkColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2593,7 +2602,7 @@ nsHTMLDocument::GetLinkColor(nsString& aLinkColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetLinkColor(const nsString& aLinkColor)
|
||||
nsHTMLDocument::SetLinkColor(const nsAReadableString& aLinkColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2614,7 +2623,7 @@ nsHTMLDocument::SetLinkColor(const nsString& aLinkColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetVlinkColor(nsString& aVlinkColor)
|
||||
nsHTMLDocument::GetVlinkColor(nsAWritableString& aVlinkColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2638,7 +2647,7 @@ nsHTMLDocument::GetVlinkColor(nsString& aVlinkColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetVlinkColor(const nsString& aVlinkColor)
|
||||
nsHTMLDocument::SetVlinkColor(const nsAReadableString& aVlinkColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2659,7 +2668,7 @@ nsHTMLDocument::SetVlinkColor(const nsString& aVlinkColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetBgColor(nsString& aBgColor)
|
||||
nsHTMLDocument::GetBgColor(nsAWritableString& aBgColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2683,7 +2692,7 @@ nsHTMLDocument::GetBgColor(nsString& aBgColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetBgColor(const nsString& aBgColor)
|
||||
nsHTMLDocument::SetBgColor(const nsAReadableString& aBgColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2704,7 +2713,7 @@ nsHTMLDocument::SetBgColor(const nsString& aBgColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetFgColor(nsString& aFgColor)
|
||||
nsHTMLDocument::GetFgColor(nsAWritableString& aFgColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2728,7 +2737,7 @@ nsHTMLDocument::GetFgColor(nsString& aFgColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetFgColor(const nsString& aFgColor)
|
||||
nsHTMLDocument::SetFgColor(const nsAReadableString& aFgColor)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
nsIDOMHTMLBodyElement* body;
|
||||
@@ -2750,13 +2759,13 @@ nsHTMLDocument::SetFgColor(const nsString& aFgColor)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetLastModified(nsString& aLastModified)
|
||||
nsHTMLDocument::GetLastModified(nsAWritableString& aLastModified)
|
||||
{
|
||||
if (nsnull != mLastModified) {
|
||||
aLastModified = *mLastModified;
|
||||
aLastModified.Assign(*mLastModified);
|
||||
}
|
||||
else {
|
||||
aLastModified.AssignWithConversion("January 1, 1970 GMT");
|
||||
aLastModified.Assign(NS_LITERAL_STRING("January 1, 1970 GMT"));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@@ -2818,7 +2827,7 @@ nsHTMLDocument::GetLayers(nsIDOMHTMLCollection** aLayers)
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetSelection(nsString& aReturn)
|
||||
nsHTMLDocument::GetSelection(nsAWritableString& aReturn)
|
||||
{
|
||||
aReturn.Truncate();
|
||||
|
||||
@@ -2845,7 +2854,7 @@ nsHTMLDocument::GetSelection(nsString& aReturn)
|
||||
(do_GetService("mozilla.consoleservice.1"));
|
||||
|
||||
if (consoleService) {
|
||||
consoleService->LogStringMessage(NS_ConvertASCIItoUCS2("Deprecated method document.getSelection() called. Please use window.getSelection() instead.").GetUnicode());
|
||||
consoleService->LogStringMessage(NS_LITERAL_STRING("Deprecated method document.getSelection() called. Please use window.getSelection() instead."));
|
||||
}
|
||||
|
||||
return domSelection->ToString(NS_ConvertASCIItoUCS2("text/plain"), nsIDocumentEncoder::OutputFormatted |nsIDocumentEncoder::OutputSelectionOnly, 0, aReturn);
|
||||
@@ -3785,7 +3794,9 @@ static nsIDOMNode * FindDOMNode(nsIDOMNode * aNode, nsIContent * aContent)
|
||||
/**
|
||||
* Finds text in content
|
||||
*/
|
||||
NS_IMETHODIMP nsHTMLDocument::FindNext(const nsString &aSearchStr, PRBool aMatchCase, PRBool aSearchDown, PRBool &aIsFound)
|
||||
NS_IMETHODIMP nsHTMLDocument::FindNext(const nsAReadableString &aSearchStr,
|
||||
PRBool aMatchCase, PRBool aSearchDown,
|
||||
PRBool &aIsFound)
|
||||
{
|
||||
#if 0
|
||||
aIsFound = PR_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user