зеркало из https://github.com/mozilla/gecko-dev.git
Use NS_LITERAL_STRING instead of NS_ConvertASCIItoUCS2 where possible
(i.e. where the string is a literal). Bug 104159, r=jag, sr=alecf
This commit is contained in:
Родитель
45443f5867
Коммит
f2ee8260a0
|
@ -64,7 +64,7 @@ FindWhileSkippingWhitespace(nsString& aStr, PRUnichar aChar, PRInt32 aOffset)
|
|||
|
||||
nsresult
|
||||
nsParserUtils::GetQuotedAttributeValue(nsString& aSource,
|
||||
const nsString& aAttribute,
|
||||
const nsAFlatString& aAttribute,
|
||||
nsString& aValue)
|
||||
{
|
||||
PRInt32 startOfAttribute = 0; // Index into aSource where the attribute name starts
|
||||
|
@ -75,7 +75,7 @@ nsParserUtils::GetQuotedAttributeValue(nsString& aSource,
|
|||
// While there are more characters to look at
|
||||
while (startOfAttribute != -1) {
|
||||
// Find the attribute starting at offset
|
||||
startOfAttribute = aSource.Find(aAttribute, PR_FALSE, startOfAttribute);
|
||||
startOfAttribute = aSource.Find(aAttribute.get(), PR_FALSE, startOfAttribute);
|
||||
// If attribute found
|
||||
if (startOfAttribute != -1) {
|
||||
// Find the '=' character while skipping whitespace
|
||||
|
|
|
@ -45,7 +45,7 @@ class nsParserUtils {
|
|||
public:
|
||||
static nsresult
|
||||
GetQuotedAttributeValue(nsString& aSource,
|
||||
const nsString& aAttribute,
|
||||
const nsAFlatString& aAttribute,
|
||||
nsString& aValue);
|
||||
|
||||
static PRBool
|
||||
|
|
|
@ -2260,7 +2260,7 @@ nsHTMLDocument::Close()
|
|||
nsAutoString emptyStr; emptyStr.AssignWithConversion("</HTML>");
|
||||
mWriteLevel++;
|
||||
result = mParser->Parse(emptyStr, NS_GENERATE_PARSER_KEY(),
|
||||
NS_ConvertASCIItoUCS2("text/html"), PR_FALSE,
|
||||
NS_LITERAL_STRING("text/html"), PR_FALSE,
|
||||
PR_TRUE);
|
||||
mWriteLevel--;
|
||||
mIsWriting = 0;
|
||||
|
|
|
@ -1327,25 +1327,25 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
|
|||
|
||||
// If it's a XSL stylesheet PI...
|
||||
nsAutoString type;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("type"), type);
|
||||
if (mState == eXMLContentSinkState_InProlog &&
|
||||
target.EqualsWithConversion(kStyleSheetPI) &&
|
||||
!type.EqualsIgnoreCase("text/css")) {
|
||||
nsAutoString href, title, media, alternate;
|
||||
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("href"), href);
|
||||
// If there was no href, we can't do anything with this PI
|
||||
if (href.IsEmpty()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("title"), title);
|
||||
title.CompressWhitespace();
|
||||
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("media"), media);
|
||||
media.ToLowerCase();
|
||||
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("alternate"), alternate);
|
||||
|
||||
result = ProcessStyleLink(node, href, alternate.Equals(NS_LITERAL_STRING("yes")),
|
||||
title, type, media);
|
||||
|
|
|
@ -919,7 +919,7 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode)
|
|||
if (text.Find(kOverlayPI) == 0) {
|
||||
// Load a XUL overlay.
|
||||
nsAutoString href;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("href"), href);
|
||||
|
||||
// If there was no href, we can't do
|
||||
// anything with this PI
|
||||
|
@ -942,7 +942,7 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode)
|
|||
// If it's a stylesheet PI...
|
||||
else if (text.Find(kStyleSheetPI) == 0) {
|
||||
nsAutoString href;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("href"), href);
|
||||
|
||||
// If there was no href, we can't do
|
||||
// anything with this PI
|
||||
|
@ -950,20 +950,20 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode)
|
|||
return NS_OK;
|
||||
|
||||
nsAutoString type;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("type"), type);
|
||||
|
||||
nsAutoString title;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("title"), title);
|
||||
|
||||
title.CompressWhitespace();
|
||||
|
||||
nsAutoString media;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("media"), media);
|
||||
|
||||
media.ToLowerCase();
|
||||
|
||||
nsAutoString alternate;
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);
|
||||
nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("alternate"), alternate);
|
||||
|
||||
nsresult rv = ProcessStyleLink(nsnull /* XXX need a node here */,
|
||||
href, alternate.EqualsWithConversion("yes"), /* XXX ignore case? */
|
||||
|
|
|
@ -2206,8 +2206,7 @@ nsDocShell::LoadURI(const PRUnichar * aURI, PRUint32 aLoadFlags)
|
|||
|
||||
nsXPIDLString messageStr;
|
||||
NS_ENSURE_SUCCESS(stringBundle->
|
||||
GetStringFromName(NS_ConvertASCIItoUCS2
|
||||
("protocolNotFound").get(),
|
||||
GetStringFromName(NS_LITERAL_STRING("protocolNotFound").get(),
|
||||
getter_Copies(messageStr)),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
|
@ -5232,7 +5231,7 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, PRUint32 aLoadType)
|
|||
|
||||
if (stringBundle && prompter) {
|
||||
nsXPIDLString messageStr;
|
||||
nsresult rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("repostConfirm").get(),
|
||||
nsresult rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("repostConfirm").get(),
|
||||
getter_Copies(messageStr));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && messageStr) {
|
||||
|
|
|
@ -923,7 +923,7 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
|||
getter_AddRefs(stringBundle));
|
||||
if (stringBundle && prompter) {
|
||||
nsXPIDLString messageStr;
|
||||
nsresult rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("fileNotFound").get(),
|
||||
nsresult rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("fileNotFound").get(),
|
||||
getter_Copies(messageStr));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && messageStr) {
|
||||
|
@ -1048,7 +1048,7 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
|||
}
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("dnsNotFound").get(),
|
||||
rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("dnsNotFound").get(),
|
||||
getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
@ -1080,7 +1080,7 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
|||
}
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("connectionFailure").get(),
|
||||
rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("connectionFailure").get(),
|
||||
getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
|||
}
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("netTimeout").get(),
|
||||
rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("netTimeout").get(),
|
||||
getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
|||
|
||||
if (stringBundle && prompter) {
|
||||
nsXPIDLString messageStr;
|
||||
nsresult rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("repost").get(),
|
||||
nsresult rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("repost").get(),
|
||||
getter_Copies(messageStr));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && messageStr) {
|
||||
|
|
|
@ -629,7 +629,7 @@ nsEditorShell::PrepareDocumentForEditing(nsIDOMWindow* aDOMWindow, nsIURI *aUrl)
|
|||
// We won't unload this, so we don't need to be returned the style sheet pointer
|
||||
|
||||
|
||||
styleSheets->ApplyOverrideStyleSheet(NS_ConvertASCIItoUCS2("chrome://editor/content/EditorOverride.css"),
|
||||
styleSheets->ApplyOverrideStyleSheet(NS_LITERAL_STRING("chrome://editor/content/EditorOverride.css"),
|
||||
getter_AddRefs(mBaseStyleSheet));
|
||||
|
||||
SetDisplayMode(mDisplayMode);
|
||||
|
@ -638,9 +638,9 @@ nsEditorShell::PrepareDocumentForEditing(nsIDOMWindow* aDOMWindow, nsIURI *aUrl)
|
|||
// Activate the debug menu only in debug builds
|
||||
// by removing the "hidden" attribute set "true" in XUL
|
||||
nsCOMPtr<nsIDOMElement> elem;
|
||||
rv = dDoc->GetElementById(NS_ConvertASCIItoUCS2("debugMenu"), getter_AddRefs(elem));
|
||||
rv = dDoc->GetElementById(NS_LITERAL_STRING("debugMenu"), getter_AddRefs(elem));
|
||||
if (elem)
|
||||
elem->RemoveAttribute(NS_ConvertASCIItoUCS2("hidden"));
|
||||
elem->RemoveAttribute(NS_LITERAL_STRING("hidden"));
|
||||
#endif
|
||||
|
||||
// Force initial focus to the content window except if in mail compose
|
||||
|
@ -921,7 +921,7 @@ nsEditorShell::SetEditorType(const PRUnichar *editorType)
|
|||
{
|
||||
// We don't store a separate type for textmail
|
||||
if (textMail)
|
||||
mEditorTypeString = NS_ConvertASCIItoUCS2("text");
|
||||
mEditorTypeString = NS_LITERAL_STRING("text");
|
||||
else
|
||||
mEditorTypeString = theType;
|
||||
return NS_OK;
|
||||
|
@ -1486,7 +1486,7 @@ nsEditorShell::SetDisplayMode(PRInt32 aDisplayMode)
|
|||
{
|
||||
|
||||
//Load the editmode style sheet
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_ConvertASCIItoUCS2("chrome://editor/content/EditorContent.css"),
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_LITERAL_STRING("chrome://editor/content/EditorContent.css"),
|
||||
getter_AddRefs(mEditModeStyleSheet));
|
||||
}
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
@ -1510,7 +1510,7 @@ nsEditorShell::SetDisplayMode(PRInt32 aDisplayMode)
|
|||
else
|
||||
{
|
||||
// else load it
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_ConvertASCIItoUCS2("chrome://editor/content/EditorAllTags.css"),
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_LITERAL_STRING("chrome://editor/content/EditorAllTags.css"),
|
||||
getter_AddRefs(mAllTagsModeStyleSheet));
|
||||
}
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
@ -1525,7 +1525,7 @@ nsEditorShell::SetDisplayMode(PRInt32 aDisplayMode)
|
|||
}
|
||||
else
|
||||
{
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_ConvertASCIItoUCS2("chrome://editor/content/EditorContent.css"),
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_LITERAL_STRING("chrome://editor/content/EditorContent.css"),
|
||||
getter_AddRefs(mEditModeStyleSheet));
|
||||
}
|
||||
}
|
||||
|
@ -1585,7 +1585,7 @@ nsEditorShell::DisplayParagraphMarks(PRBool aShowMarks)
|
|||
}
|
||||
//First time used -- load the style sheet
|
||||
nsCOMPtr<nsICSSStyleSheet> styleSheet;
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_ConvertASCIItoUCS2("chrome://editor/content/EditorParagraphMarks.css"),
|
||||
res = styleSheets->ApplyOverrideStyleSheet(NS_LITERAL_STRING("chrome://editor/content/EditorParagraphMarks.css"),
|
||||
getter_AddRefs(mParagraphMarksStyleSheet));
|
||||
}
|
||||
else if (mParagraphMarksStyleSheet)
|
||||
|
@ -3374,12 +3374,12 @@ nsEditorShell::MakeOrChangeList(const PRUnichar *listType, PRBool entireList)
|
|||
case eHTMLTextEditorType:
|
||||
if (aListType.IsEmpty())
|
||||
{
|
||||
err = mEditor->RemoveList(NS_ConvertASCIItoUCS2("ol"));
|
||||
err = mEditor->RemoveList(NS_LITERAL_STRING("ol"));
|
||||
if(NS_SUCCEEDED(err))
|
||||
{
|
||||
err = mEditor->RemoveList(NS_ConvertASCIItoUCS2("ul"));
|
||||
err = mEditor->RemoveList(NS_LITERAL_STRING("ul"));
|
||||
if(NS_SUCCEEDED(err))
|
||||
err = mEditor->RemoveList(NS_ConvertASCIItoUCS2("dl"));
|
||||
err = mEditor->RemoveList(NS_LITERAL_STRING("dl"));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -152,9 +152,6 @@ static NS_DEFINE_CID(kCTransactionManagerCID, NS_TRANSACTIONMANAGER_CID);
|
|||
#define NS_ERROR_EDITOR_NO_SELECTION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR,1)
|
||||
#define NS_ERROR_EDITOR_NO_TEXTNODE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR,2)
|
||||
|
||||
const char* nsEditor::kMOZEditorBogusNodeAttr="_moz_editor_bogus_node";
|
||||
const char* nsEditor::kMOZEditorBogusNodeValue="TRUE";
|
||||
|
||||
#ifdef NS_DEBUG_EDITOR
|
||||
static PRBool gNoisy = PR_FALSE;
|
||||
#else
|
||||
|
@ -1145,7 +1142,7 @@ nsEditor::MarkNodeDirty(nsIDOMNode* aNode)
|
|||
// mark the node dirty.
|
||||
nsCOMPtr<nsIDOMElement> element (do_QueryInterface(aNode));
|
||||
if (element)
|
||||
element->SetAttribute(NS_ConvertASCIItoUCS2("_moz_dirty"), nsAutoString());
|
||||
element->SetAttribute(NS_LITERAL_STRING("_moz_dirty"), NS_LITERAL_STRING(""));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3662,10 +3659,9 @@ nsEditor::IsMozEditorBogusNode(nsIDOMNode *aNode)
|
|||
element = do_QueryInterface(aNode);
|
||||
if (element)
|
||||
{
|
||||
nsAutoString att; att.AssignWithConversion(kMOZEditorBogusNodeAttr);
|
||||
nsAutoString val;
|
||||
(void)element->GetAttribute(att, val);
|
||||
if (val.EqualsWithConversion(kMOZEditorBogusNodeValue)) {
|
||||
(void)element->GetAttribute(kMOZEditorBogusNodeAttr, val);
|
||||
if (val.Equals(kMOZEditorBogusNodeValue)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,9 @@ class RemoveStyleSheetTxn;
|
|||
class nsIFile;
|
||||
class nsISelectionController;
|
||||
|
||||
#define kMOZEditorBogusNodeAttr NS_LITERAL_STRING("_moz_editor_bogus_node")
|
||||
#define kMOZEditorBogusNodeValue NS_LITERAL_STRING("TRUE")
|
||||
|
||||
/** implementation of an editor object. it will be the controller/focal point
|
||||
* for the main editor services. i.e. the GUIManager, publishing, transaction
|
||||
* manager, event interfaces. the idea for the event interfaces is to have them
|
||||
|
@ -122,9 +125,6 @@ public:
|
|||
kOpDeleteText = 1003
|
||||
};
|
||||
|
||||
static const char* kMOZEditorBogusNodeAttr;
|
||||
static const char* kMOZEditorBogusNodeValue;
|
||||
|
||||
/** The default constructor. This should suffice. the setting of the interfaces is done
|
||||
* after the construction of the editor class.
|
||||
*/
|
||||
|
|
|
@ -289,12 +289,12 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsAReadableString &
|
|||
nsAutoString inputString (aInputString); // hope this does copy-on-write
|
||||
|
||||
// Windows linebreaks: Map CRLF to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
inputString.ReplaceSubstring(NS_LITERAL_STRING("\r\n").get(),
|
||||
NS_LITERAL_STRING("\n").get());
|
||||
|
||||
// Mac linebreaks: Map any remaining CR to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
inputString.ReplaceSubstring(NS_LITERAL_STRING("\r").get(),
|
||||
NS_LITERAL_STRING("\n").get());
|
||||
*/
|
||||
|
||||
// force IME commit; set up rules sniffing and batching
|
||||
|
|
|
@ -2839,7 +2839,7 @@ nsHTMLEditRules::WillIndent(nsISelection *aSelection, PRBool *aCancel, PRBool *
|
|||
/* !!!!!!!!!!!!!!! TURNED OFF PER BUG 33213 !!!!!!!!!!!!!!!!!!!!
|
||||
// set style to not have unwanted vertical margins
|
||||
nsCOMPtr<nsIDOMElement> quoteElem = do_QueryInterface(curQuote);
|
||||
res = mHTMLEditor->SetAttribute(quoteElem, NS_ConvertASCIItoUCS2("style"), NS_ConvertASCIItoUCS2("margin: 0 0 0 40px;"));
|
||||
res = mHTMLEditor->SetAttribute(quoteElem, NS_LITERAL_STRING("style"), NS_LITERAL_STRING("margin: 0 0 0 40px;"));
|
||||
if (NS_FAILED(res)) return res;
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
|
||||
|
|
|
@ -1217,7 +1217,7 @@ NS_IMETHODIMP nsHTMLEditor::TabInTable(PRBool inIsShift, PRBool *outHandled)
|
|||
// Find enclosing table cell from the selection (cell may be the selected element)
|
||||
nsCOMPtr<nsIDOMElement> cellElement;
|
||||
// can't use |NS_LITERAL_STRING| here until |GetElementOrParentByTagName| is fixed to accept readables
|
||||
nsresult res = GetElementOrParentByTagName(NS_ConvertASCIItoUCS2("td"), nsnull, getter_AddRefs(cellElement));
|
||||
nsresult res = GetElementOrParentByTagName(NS_LITERAL_STRING("td"), nsnull, getter_AddRefs(cellElement));
|
||||
if (NS_FAILED(res)) return res;
|
||||
// Do nothing -- we didn't find a table cell
|
||||
if (!cellElement) return NS_OK;
|
||||
|
@ -1565,12 +1565,12 @@ nsHTMLEditor::ReplaceHeadContentsWithHTML(const nsAReadableString& aSourceToInse
|
|||
nsAutoString inputString (aSourceToInsert); // hope this does copy-on-write
|
||||
|
||||
// Windows linebreaks: Map CRLF to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
inputString.ReplaceSubstring(NS_LITERAL_STRING("\r\n").get(),
|
||||
NS_LITERAL_STRING("\n").get());
|
||||
|
||||
// Mac linebreaks: Map any remaining CR to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
inputString.ReplaceSubstring(NS_LITERAL_STRING("\r").get(),
|
||||
NS_LITERAL_STRING("\n").get());
|
||||
|
||||
nsAutoEditBatch beginBatching(this);
|
||||
|
||||
|
@ -1706,7 +1706,8 @@ nsHTMLEditor::RebuildDocumentFromSource(const nsAReadableString& aSourceString)
|
|||
// Truncate at the end of the body tag
|
||||
|
||||
// Kludge of the year: fool the parser by replacing "body" with "div" so we get a node
|
||||
bodyTag.ReplaceSubstring(NS_ConvertASCIItoUCS2("body"), NS_ConvertASCIItoUCS2("div"));
|
||||
bodyTag.ReplaceSubstring(NS_LITERAL_STRING("body").get(),
|
||||
NS_LITERAL_STRING("div").get());
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
res = selection->GetRangeAt(0, getter_AddRefs(range));
|
||||
|
@ -2004,7 +2005,7 @@ nsHTMLEditor::GetParentBlockTags(nsStringArray *aTagList, PRBool aGetLists)
|
|||
if (aGetLists)
|
||||
{
|
||||
// Get the "ol", "ul", or "dl" parent element
|
||||
res = GetElementOrParentByTagName(NS_ConvertASCIItoUCS2("list"), node, getter_AddRefs(blockParentElem));
|
||||
res = GetElementOrParentByTagName(NS_LITERAL_STRING("list"), node, getter_AddRefs(blockParentElem));
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
else
|
||||
|
@ -2060,7 +2061,7 @@ nsHTMLEditor::GetParentBlockTags(nsStringArray *aTagList, PRBool aGetLists)
|
|||
if (aGetLists)
|
||||
{
|
||||
// Get the "ol", "ul", or "dl" parent element
|
||||
res = GetElementOrParentByTagName(NS_ConvertASCIItoUCS2("list"), startParent, getter_AddRefs(blockParent));
|
||||
res = GetElementOrParentByTagName(NS_LITERAL_STRING("list"), startParent, getter_AddRefs(blockParent));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2743,7 +2744,7 @@ nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElemen
|
|||
}
|
||||
#endif
|
||||
nsCOMPtr<nsIDOMElement> parentLinkOfAnchor;
|
||||
res = GetElementOrParentByTagName(NS_ConvertASCIItoUCS2("href"), anchorNode, getter_AddRefs(parentLinkOfAnchor));
|
||||
res = GetElementOrParentByTagName(NS_LITERAL_STRING("href"), anchorNode, getter_AddRefs(parentLinkOfAnchor));
|
||||
// XXX: ERROR_HANDLING can parentLinkOfAnchor be null?
|
||||
if (NS_SUCCEEDED(res) && parentLinkOfAnchor)
|
||||
{
|
||||
|
@ -2754,7 +2755,7 @@ nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElemen
|
|||
} else if(focusNode)
|
||||
{ // Link node must be the same for both ends of selection
|
||||
nsCOMPtr<nsIDOMElement> parentLinkOfFocus;
|
||||
res = GetElementOrParentByTagName(NS_ConvertASCIItoUCS2("href"), focusNode, getter_AddRefs(parentLinkOfFocus));
|
||||
res = GetElementOrParentByTagName(NS_LITERAL_STRING("href"), focusNode, getter_AddRefs(parentLinkOfFocus));
|
||||
if (NS_SUCCEEDED(res) && parentLinkOfFocus == parentLinkOfAnchor)
|
||||
bNodeFound = PR_TRUE;
|
||||
}
|
||||
|
@ -3055,9 +3056,9 @@ nsHTMLEditor::SetBackgroundColor(const nsAReadableString& aColor)
|
|||
while(cell)
|
||||
{
|
||||
if (setColor)
|
||||
res = SetAttribute(cell, NS_ConvertASCIItoUCS2("bgcolor"), aColor);
|
||||
res = SetAttribute(cell, NS_LITERAL_STRING("bgcolor"), aColor);
|
||||
else
|
||||
res = RemoveAttribute(cell, NS_ConvertASCIItoUCS2("bgcolor"));
|
||||
res = RemoveAttribute(cell, NS_LITERAL_STRING("bgcolor"));
|
||||
if (NS_FAILED(res)) break;
|
||||
|
||||
GetNextSelectedCell(getter_AddRefs(cell), nsnull);
|
||||
|
@ -3074,9 +3075,9 @@ nsHTMLEditor::SetBackgroundColor(const nsAReadableString& aColor)
|
|||
}
|
||||
// Use the editor method that goes through the transaction system
|
||||
if (setColor)
|
||||
res = SetAttribute(element, NS_ConvertASCIItoUCS2("bgcolor"), aColor);
|
||||
res = SetAttribute(element, NS_LITERAL_STRING("bgcolor"), aColor);
|
||||
else
|
||||
res = RemoveAttribute(element, NS_ConvertASCIItoUCS2("bgcolor"));
|
||||
res = RemoveAttribute(element, NS_LITERAL_STRING("bgcolor"));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -3471,7 +3472,7 @@ nsHTMLEditor::GetHeadContentsAsHTML(nsAWritableString& aOutputString)
|
|||
res = SetSelectionAroundHeadChildren(selection, mDocWeak);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = OutputToString(aOutputString, NS_ConvertASCIItoUCS2("text/html"),
|
||||
res = OutputToString(aOutputString, NS_LITERAL_STRING("text/html"),
|
||||
nsIDocumentEncoder::OutputSelectionOnly);
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
|
|
|
@ -291,20 +291,21 @@ nsPlaintextEditor::SetDocumentCharacterSet(const nsAReadableString & characterSe
|
|||
metaElement = do_QueryInterface(metaNode);
|
||||
if (!metaElement) continue;
|
||||
|
||||
const NS_ConvertASCIItoUCS2 content("charset=");
|
||||
NS_NAMED_LITERAL_STRING(charset, "charset=");
|
||||
NS_NAMED_LITERAL_STRING(content, "content");
|
||||
nsString currentValue;
|
||||
|
||||
if (NS_FAILED(metaElement->GetAttribute(NS_LITERAL_STRING("http-equiv"), currentValue))) continue;
|
||||
|
||||
if (kNotFound != currentValue.Find("content-type", PR_TRUE)) {
|
||||
if (NS_FAILED(metaElement->GetAttribute(NS_LITERAL_STRING("content"), currentValue))) continue;
|
||||
if (NS_FAILED(metaElement->GetAttribute(content, currentValue))) continue;
|
||||
|
||||
PRInt32 offset = currentValue.Find(content.get(), PR_TRUE);
|
||||
PRInt32 offset = currentValue.Find(charset.get(), PR_TRUE);
|
||||
if (kNotFound != offset) {
|
||||
currentValue.Left(newMetaString, offset); // copy current value before "charset=" (e.g. text/html)
|
||||
newMetaString.Append(content);
|
||||
newMetaString.Append(charset);
|
||||
newMetaString.Append(characterSet);
|
||||
result = nsEditor::SetAttribute(metaElement, NS_ConvertASCIItoUCS2("content"), newMetaString);
|
||||
result = nsEditor::SetAttribute(metaElement, content, newMetaString);
|
||||
if (NS_SUCCEEDED(result))
|
||||
newMetaCharset = PR_FALSE;
|
||||
break;
|
||||
|
@ -324,7 +325,7 @@ nsPlaintextEditor::SetDocumentCharacterSet(const nsAReadableString & characterSe
|
|||
if (headNode) {
|
||||
// Create a new meta charset tag
|
||||
// can't use |NS_LITERAL_STRING| here until |CreateNode| is fixed to accept readables
|
||||
result = CreateNode(NS_ConvertASCIItoUCS2("meta"), headNode, 0, getter_AddRefs(resultNode));
|
||||
result = CreateNode(NS_LITERAL_STRING("meta"), headNode, 0, getter_AddRefs(resultNode));
|
||||
if (NS_FAILED(result))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
|
|
@ -1242,8 +1242,8 @@ nsTextEditRules::CreateBogusNodeIfNeeded(nsISelection *aSelection)
|
|||
if (!mBogusNode) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
// give it a special attribute
|
||||
brElement->SetAttribute( NS_ConvertASCIItoUCS2(nsEditor::kMOZEditorBogusNodeAttr),
|
||||
NS_ConvertASCIItoUCS2(nsEditor::kMOZEditorBogusNodeValue) );
|
||||
brElement->SetAttribute( kMOZEditorBogusNodeAttr,
|
||||
kMOZEditorBogusNodeValue );
|
||||
|
||||
// put the node in the document
|
||||
res = mEditor->InsertNode(mBogusNode,mBody,0);
|
||||
|
@ -1370,7 +1370,7 @@ nsTextEditRules::CreateMozBR(nsIDOMNode *inParent, PRInt32 inOffset, nsCOMPtr<ns
|
|||
nsCOMPtr<nsIDOMElement> brElem = do_QueryInterface(*outBRNode);
|
||||
if (brElem)
|
||||
{
|
||||
res = mEditor->SetAttribute(brElem, NS_ConvertASCIItoUCS2("type"), NS_ConvertASCIItoUCS2("_moz"));
|
||||
res = mEditor->SetAttribute(brElem, NS_LITERAL_STRING("type"), NS_LITERAL_STRING("_moz"));
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
return res;
|
||||
|
|
|
@ -374,14 +374,14 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
|
|||
if(!(nsCRT::strcmp(operation, "back")))
|
||||
{
|
||||
// Going back. XXX Get string from a resource file
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Going back to url:"));
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Going back to url:"));
|
||||
uriAStr.Append(NS_ConvertUTF8toUCS2(uriCStr));
|
||||
}
|
||||
else if (!(nsCRT::strcmp(operation, "forward")))
|
||||
{
|
||||
// Going forward. XXX Get string from a resource file
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Going forward to url:"));
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Going forward to url:"));
|
||||
uriAStr.Append(NS_ConvertUTF8toUCS2(uriCStr));
|
||||
}
|
||||
else if (!(nsCRT::strcmp(operation, "reload")))
|
||||
{
|
||||
|
@ -389,19 +389,19 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
|
|||
if (aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY &&
|
||||
aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE)
|
||||
{
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Reloading url,(bypassing proxy and cache) :"));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Reloading url,(bypassing proxy and cache) :"));
|
||||
}
|
||||
else if (aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY)
|
||||
{
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Reloading url, (bypassing proxy):"));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Reloading url, (bypassing proxy):"));
|
||||
}
|
||||
else if (aReloadFlags & nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE)
|
||||
{
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Reloading url, (bypassing cache):"));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Reloading url, (bypassing cache):"));
|
||||
}
|
||||
else
|
||||
{
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Reloading url, (normal):"));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Reloading url, (normal):"));
|
||||
}
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
|
||||
}
|
||||
|
@ -409,21 +409,21 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
|
|||
{
|
||||
// Adding new entry. XXX Get string from a resource file
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(" added to session History"));
|
||||
uriAStr.Append(NS_LITERAL_STRING(" added to session History"));
|
||||
}
|
||||
else if (!(nsCRT::strcmp(operation, "goto")))
|
||||
{
|
||||
// Goto. XXX Get string from a resource file
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2("Going to HistoryIndex:"));
|
||||
uriAStr.Append(NS_LITERAL_STRING("Going to HistoryIndex:"));
|
||||
uriAStr.AppendInt(info1);
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(" Url:"));
|
||||
uriAStr.Append(NS_LITERAL_STRING(" Url:"));
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
|
||||
}
|
||||
else if (!(nsCRT::strcmp(operation, "purge")))
|
||||
{
|
||||
// Purging old entries
|
||||
uriAStr.AppendInt(info1);
|
||||
uriAStr.Append(NS_ConvertASCIItoUCS2(" purged from Session History"));
|
||||
uriAStr.Append(NS_LITERAL_STRING(" purged from Session History"));
|
||||
}
|
||||
|
||||
WebBrowserChromeUI::UpdateStatusBarText(this, uriAStr.get());
|
||||
|
|
|
@ -272,10 +272,10 @@ nsP3PUI::MarkNoP3P()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_NO_P3P) {
|
||||
mPrivacyStatus = P3P_STATUS_NO_P3P;
|
||||
rv = mPrivacyButton->RemoveAttribute( NS_ConvertASCIItoUCS2("level") );
|
||||
rv = mPrivacyButton->RemoveAttribute( NS_LITERAL_STRING("level") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = mPrivacyButton->RemoveAttribute( NS_ConvertASCIItoUCS2("tooltiptext") );
|
||||
rv = mPrivacyButton->RemoveAttribute( NS_LITERAL_STRING("tooltiptext") );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -297,12 +297,12 @@ nsP3PUI::MarkNoPrivacy()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_NO_POLICY) {
|
||||
mPrivacyStatus = P3P_STATUS_NO_POLICY;
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("level"), NS_ConvertASCIItoUCS2("none") );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("level"), NS_LITERAL_STRING("none") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString sToolTip;
|
||||
mP3PService->GetLocaleString( "StatusNone", sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("tooltiptext"), sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("tooltiptext"), sToolTip );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -324,12 +324,12 @@ nsP3PUI::MarkPrivate()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_POLICY_MET) {
|
||||
mPrivacyStatus = P3P_STATUS_POLICY_MET;
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("level"), NS_ConvertASCIItoUCS2("yes") );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("level"), NS_LITERAL_STRING("yes") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString sToolTip;
|
||||
mP3PService->GetLocaleString( "StatusMet", sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("tooltiptext"), sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("tooltiptext"), sToolTip );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -351,12 +351,12 @@ nsP3PUI::MarkNotPrivate()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_POLICY_NOT_MET) {
|
||||
mPrivacyStatus = P3P_STATUS_POLICY_NOT_MET;
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("level"), NS_ConvertASCIItoUCS2("no") );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("level"), NS_LITERAL_STRING("no") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString sToolTip;
|
||||
mP3PService->GetLocaleString( "StatusNotMet", sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("tooltiptext"), sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("tooltiptext"), sToolTip );
|
||||
}
|
||||
|
||||
mP3PUIService->WarningNotPrivate( mDocShellTreeItem );
|
||||
|
@ -380,12 +380,12 @@ nsP3PUI::MarkPartialPrivacy()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_PARTIAL_POLICY) {
|
||||
mPrivacyStatus = P3P_STATUS_PARTIAL_POLICY;
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("level"), NS_ConvertASCIItoUCS2("partial") );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("level"), NS_LITERAL_STRING("partial") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString sToolTip;
|
||||
mP3PService->GetLocaleString( "StatusPartial", sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("tooltiptext"), sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("tooltiptext"), sToolTip );
|
||||
}
|
||||
|
||||
mP3PUIService->WarningPartialPrivacy( mDocShellTreeItem );
|
||||
|
@ -409,12 +409,12 @@ nsP3PUI::MarkPrivacyBroken()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_BAD_POLICY) {
|
||||
mPrivacyStatus = P3P_STATUS_BAD_POLICY;
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("level"), NS_ConvertASCIItoUCS2("broken") );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("level"), NS_LITERAL_STRING("broken") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString sToolTip;
|
||||
mP3PService->GetLocaleString( "StatusBroken", sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("tooltiptext"), sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("tooltiptext"), sToolTip );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -436,12 +436,12 @@ nsP3PUI::MarkInProgress()
|
|||
if ( mPrivacyButton ) {
|
||||
if (mPrivacyStatus != P3P_STATUS_IN_PROGRESS) {
|
||||
mPrivacyStatus = P3P_STATUS_IN_PROGRESS;
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("level"), NS_ConvertASCIItoUCS2("inprogress") );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("level"), NS_LITERAL_STRING("inprogress") );
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString sToolTip;
|
||||
mP3PService->GetLocaleString( "StatusInProg", sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_ConvertASCIItoUCS2("tooltiptext"), sToolTip );
|
||||
rv = mPrivacyButton->SetAttribute( NS_LITERAL_STRING("tooltiptext"), sToolTip );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1787,7 +1787,7 @@ si_WriteChar(nsOutputFileStream& strm, PRUnichar c) {
|
|||
}
|
||||
|
||||
PRIVATE void
|
||||
si_WriteLine(nsOutputFileStream& strm, const nsString& lineBuffer) {
|
||||
si_WriteLine(nsOutputFileStream& strm, const nsAFlatString& lineBuffer) {
|
||||
|
||||
for (PRUint32 i=0; i<lineBuffer.Length(); i++) {
|
||||
Wallet_UTF8Put(strm, lineBuffer.CharAt(i));
|
||||
|
@ -1846,7 +1846,7 @@ si_SaveSignonDataLocked() {
|
|||
si_WriteLine(strm, NS_ConvertASCIItoUCS2(reject->passwordRealm));
|
||||
}
|
||||
}
|
||||
si_WriteLine(strm, NS_ConvertASCIItoUCS2("."));
|
||||
si_WriteLine(strm, NS_LITERAL_STRING("."));
|
||||
|
||||
/* format for cached logins shall be:
|
||||
* url LINEBREAK {name LINEBREAK value LINEBREAK}* . LINEBREAK
|
||||
|
@ -1876,7 +1876,7 @@ si_SaveSignonDataLocked() {
|
|||
si_WriteLine(strm, nsAutoString(data->name));
|
||||
si_WriteLine(strm, nsAutoString(data->value));
|
||||
}
|
||||
si_WriteLine(strm, NS_ConvertASCIItoUCS2("."));
|
||||
si_WriteLine(strm, NS_LITERAL_STRING("."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ NS_IMETHODIMP mozLineTerm::OpenAux(const PRUnichar *command,
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Ensure that cookie attribute of document is defined
|
||||
nsAutoString cookiePrefix ( NS_ConvertASCIItoUCS2("xmlterm=") );
|
||||
NS_NAMED_LITERAL_STRING(cookiePrefix, "xmlterm=");
|
||||
nsAutoString cookieStr;
|
||||
result = domHTMLDoc->GetCookie(cookieStr);
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "nscore.h"
|
||||
|
||||
class nsString;
|
||||
class nsAString;
|
||||
|
||||
// A color is a 32 bit unsigned integer with four components: R, G, B
|
||||
// and A.
|
||||
|
@ -93,7 +94,7 @@ extern "C" NS_GFX_(PRBool) NS_LooseHexToRGB(const nsString& aBuf, nscolor* aResu
|
|||
|
||||
// Translate a color name to a color. Return true if it parses ok,
|
||||
// otherwise return false.
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const nsString& aBuf, nscolor* aResult);
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const nsAString& aBuf, nscolor* aResult);
|
||||
|
||||
// Weird color computing code stolen from winfe which was stolen
|
||||
// from the xfe which was written originally by Eric Bina. So there.
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
|
||||
struct nsStr;
|
||||
class nsCString;
|
||||
class nsACString;
|
||||
class nsAString;
|
||||
|
||||
/*
|
||||
Declare the enum list using the magic of preprocessing
|
||||
|
@ -66,8 +68,8 @@ public:
|
|||
|
||||
// Given a color name, return the color enum value
|
||||
// This only functions provided a valid ref on the table
|
||||
static nsColorName LookupName(const nsString& aName);
|
||||
static nsColorName LookupName(const nsCString& aName);
|
||||
static nsColorName LookupName(const nsAString& aName);
|
||||
static nsColorName LookupName(const nsACString& aName);
|
||||
|
||||
static const nsCString& GetStringValue(nsColorName aColorName);
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ extern "C" NS_GFX_(PRBool) NS_LooseHexToRGB(const nsString& aColorSpec, nscolor*
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const nsString& aColorName, nscolor* aResult)
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const nsAString& aColorName, nscolor* aResult)
|
||||
{
|
||||
nsColorName id = nsColorNames::LookupName(aColorName);
|
||||
if (eColorName_UNKNOWN < id) {
|
||||
|
|
|
@ -93,7 +93,7 @@ nsColorNames::ReleaseTable(void)
|
|||
}
|
||||
|
||||
nsColorName
|
||||
nsColorNames::LookupName(const nsCString& aColor)
|
||||
nsColorNames::LookupName(const nsACString& aColor)
|
||||
{
|
||||
NS_ASSERTION(gColorTable, "no lookup table, needs addref");
|
||||
if (gColorTable) {
|
||||
|
@ -103,7 +103,7 @@ nsColorNames::LookupName(const nsCString& aColor)
|
|||
}
|
||||
|
||||
nsColorName
|
||||
nsColorNames::LookupName(const nsString& aColor)
|
||||
nsColorNames::LookupName(const nsAString& aColor)
|
||||
{
|
||||
NS_ASSERTION(gColorTable, "no lookup table, needs addref");
|
||||
if (gColorTable) {
|
||||
|
|
|
@ -275,7 +275,7 @@ static HWND CreateControl(LPCTSTR aType,
|
|||
HINSTANCE aHInst,
|
||||
HWND aHdlg,
|
||||
int aId,
|
||||
const nsString& aStr,
|
||||
const nsAString& aStr,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
char* pStr = nsDeviceContextWin::GetACPString(aStr);
|
||||
|
@ -304,7 +304,7 @@ static HWND CreateControl(LPCTSTR aType,
|
|||
static HWND CreateRadioBtn(HINSTANCE aHInst,
|
||||
HWND aHdlg,
|
||||
int aId,
|
||||
const nsString& aStr,
|
||||
const nsAString& aStr,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
return CreateControl("BUTTON", BS_RADIOBUTTON, aHInst, aHdlg, aId, aStr, aRect);
|
||||
|
@ -315,7 +315,7 @@ static HWND CreateRadioBtn(HINSTANCE aHInst,
|
|||
static HWND CreateGroupBox(HINSTANCE aHInst,
|
||||
HWND aHdlg,
|
||||
int aId,
|
||||
const nsString& aStr,
|
||||
const nsAString& aStr,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
return CreateControl("BUTTON", BS_GROUPBOX, aHInst, aHdlg, aId, aStr, aRect);
|
||||
|
@ -393,12 +393,12 @@ UINT CALLBACK PrintHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
|
|||
// hide the others and bail out
|
||||
//
|
||||
rect.SetRect(rad1Rect.left, y, rbWidth,radHgt);
|
||||
HWND rad4Wnd = CreateRadioBtn(hInst, hdlg, rad4, nsAutoString(NS_ConvertASCIItoUCS2("As &laid out on the screen")), rect);
|
||||
HWND rad4Wnd = CreateRadioBtn(hInst, hdlg, rad4, NS_LITERAL_STRING("As &laid out on the screen"), rect);
|
||||
if (rad4Wnd == NULL) return 0L;
|
||||
y += radHgt + rbGap;
|
||||
|
||||
rect.SetRect(rad1Rect.left, y, rbWidth, radHgt);
|
||||
HWND rad5Wnd = CreateRadioBtn(hInst, hdlg, rad5, nsAutoString(NS_ConvertASCIItoUCS2("The selected &frame")), rect);
|
||||
HWND rad5Wnd = CreateRadioBtn(hInst, hdlg, rad5, NS_LITERAL_STRING("The selected &frame"), rect);
|
||||
if (rad5Wnd == NULL) {
|
||||
Show(rad4Wnd, FALSE); // hide
|
||||
return 0L;
|
||||
|
@ -406,7 +406,7 @@ UINT CALLBACK PrintHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
|
|||
y += radHgt + rbGap;
|
||||
|
||||
rect.SetRect(rad1Rect.left, y, rbWidth, radHgt);
|
||||
HWND rad6Wnd = CreateRadioBtn(hInst, hdlg, rad6, nsAutoString(NS_ConvertASCIItoUCS2("&Each frame separately")), rect);
|
||||
HWND rad6Wnd = CreateRadioBtn(hInst, hdlg, rad6, NS_LITERAL_STRING("&Each frame separately"), rect);
|
||||
if (rad6Wnd == NULL) {
|
||||
Show(rad4Wnd, FALSE); // hide
|
||||
Show(rad5Wnd, FALSE); // hide
|
||||
|
@ -416,7 +416,7 @@ UINT CALLBACK PrintHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
// Create and position the group box
|
||||
rect.SetRect (dlgRect.left, top, dlgRect.right-dlgRect.left+1, y-top+1);
|
||||
HWND grpBoxWnd = CreateGroupBox(hInst, hdlg, grp3, nsAutoString(NS_ConvertASCIItoUCS2("Print Frame")), rect);
|
||||
HWND grpBoxWnd = CreateGroupBox(hInst, hdlg, grp3, NS_LITERAL_STRING("Print Frame"), rect);
|
||||
if (grpBoxWnd == NULL) {
|
||||
Show(rad4Wnd, FALSE); // hide
|
||||
Show(rad5Wnd, FALSE); // hide
|
||||
|
|
|
@ -1044,14 +1044,14 @@ nsDeviceContextWin :: PrefChanged(const char* aPref, void* aClosure)
|
|||
}
|
||||
|
||||
char*
|
||||
nsDeviceContextWin :: GetACPString(const nsString& aStr)
|
||||
nsDeviceContextWin :: GetACPString(const nsAString& aStr)
|
||||
{
|
||||
int acplen = aStr.Length() * 2 + 1;
|
||||
char * acp = new char[acplen];
|
||||
if(acp)
|
||||
{
|
||||
int outlen = ::WideCharToMultiByte( CP_ACP, 0,
|
||||
aStr.get(), aStr.Length(),
|
||||
PromiseFlatString(aStr).get(), aStr.Length(),
|
||||
acp, acplen, NULL, NULL);
|
||||
if ( outlen > 0)
|
||||
acp[outlen] = '\0'; // null terminate
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
NS_IMETHOD EndPage(void);
|
||||
|
||||
// Static Helper Methods
|
||||
static char* GetACPString(const nsString& aStr);
|
||||
static char* GetACPString(const nsAString& aStr);
|
||||
|
||||
|
||||
protected:
|
||||
|
|
|
@ -669,8 +669,8 @@ nscolor white,black;
|
|||
aSurface->SetFont(*font);
|
||||
|
||||
// clear surface
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("white"), &white);
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("red"), &black);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("white"), &white);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("red"), &black);
|
||||
aSurface->SetColor(white);
|
||||
aSurface->FillRect(0,0,1000,1000);
|
||||
aSurface->SetColor(black);
|
||||
|
@ -709,8 +709,8 @@ nscolor white,black;
|
|||
|
||||
|
||||
// clear surface
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("white"), &white);
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("black"), &black);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("white"), &white);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("black"), &black);
|
||||
aSurface->SetColor(white);
|
||||
aSurface->FillRect(0,0,1000,1000);
|
||||
aSurface->SetColor(black);
|
||||
|
@ -763,14 +763,14 @@ nscolor white,black;
|
|||
aSurface->SetFont(*font);
|
||||
|
||||
// clear surface
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("white"), &white);
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("black"), &black);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("white"), &white);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("black"), &black);
|
||||
aSurface->SetColor(white);
|
||||
aSurface->FillRect(0,0,1000,1000);
|
||||
aSurface->SetColor(black);
|
||||
|
||||
aSurface->FillRect(20, 20, 100, 100);
|
||||
aSurface->DrawString(NS_ConvertASCIItoUCS2("This is a Rectangle\0"),20,5);
|
||||
aSurface->DrawString(NS_ConvertCASCIItoUCS2("This is a Rectangle\0"),20,5);
|
||||
|
||||
pointlist = new nsPoint[6];
|
||||
pointlist[0].x = 150;pointlist[0].y = 150;
|
||||
|
@ -897,13 +897,13 @@ char *str;
|
|||
if(aGenLoad == PR_TRUE)
|
||||
{
|
||||
MyBlendObserver *observer = new MyBlendObserver(aTheImage);
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("white"), &white);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("white"), &white);
|
||||
gImageReq = gImageGroup->GetImage(fileURL,observer,&white, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
MyObserver *observer = new MyObserver();
|
||||
NS_ColorNameToRGB(NS_ConvertASCIItoUCS2("white"), &white);
|
||||
NS_ColorNameToRGB(NS_LITERAL_STRING("white"), &white);
|
||||
gImageReq = gImageGroup->GetImage(fileURL,observer,&white, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ class nsIParser : public nsISupports {
|
|||
virtual PRBool IsComplete() =0;
|
||||
|
||||
virtual nsresult Parse(nsIURI* aURL,nsIRequestObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE, void* aKey=0,nsDTDMode aMode=eDTDMode_autodetect) = 0;
|
||||
virtual nsresult Parse(nsIInputStream& aStream, const nsString& aMimeType,PRBool aEnableVerify=PR_FALSE, void* aKey=0,nsDTDMode aMode=eDTDMode_autodetect) = 0;
|
||||
virtual nsresult Parse(nsIInputStream& aStream, const nsAReadableString& aMimeType,PRBool aEnableVerify=PR_FALSE, void* aKey=0,nsDTDMode aMode=eDTDMode_autodetect) = 0;
|
||||
virtual nsresult Parse(const nsAReadableString& aSourceBuffer,void* aKey,const nsAReadableString& aContentType,PRBool aEnableVerify,PRBool aLastCall,nsDTDMode aMode=eDTDMode_autodetect) = 0;
|
||||
|
||||
virtual nsresult Terminate(void) = 0;
|
||||
|
@ -238,7 +238,7 @@ class nsIParser : public nsISupports {
|
|||
void* aKey,
|
||||
nsVoidArray& aTagStack,
|
||||
PRUint32 anInsertPos,
|
||||
const nsString& aContentType,
|
||||
const nsAReadableString& aContentType,
|
||||
nsDTDMode aMode=eDTDMode_autodetect) = 0;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1614,7 +1614,7 @@ nsresult nsParser::Parse(nsIURI* aURL,nsIRequestObserver* aListener,PRBool aVeri
|
|||
* @param aStream is the i/o source
|
||||
* @return error code -- 0 if ok, non-zero if error.
|
||||
*/
|
||||
nsresult nsParser::Parse(nsIInputStream& aStream,const nsString& aMimeType,PRBool aVerifyEnabled, void* aKey,nsDTDMode aMode){
|
||||
nsresult nsParser::Parse(nsIInputStream& aStream,const nsAReadableString& aMimeType,PRBool aVerifyEnabled, void* aKey,nsDTDMode aMode){
|
||||
|
||||
mDTDVerification=aVerifyEnabled;
|
||||
nsresult result=NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -1760,7 +1760,7 @@ nsresult nsParser::ParseFragment(const nsAReadableString& aSourceBuffer,
|
|||
void* aKey,
|
||||
nsVoidArray& aTagStack,
|
||||
PRUint32 anInsertPos,
|
||||
const nsString& aMimeType,
|
||||
const nsAReadableString& aMimeType,
|
||||
nsDTDMode aMode){
|
||||
|
||||
nsresult result = NS_OK;
|
||||
|
|
|
@ -205,7 +205,7 @@ class nsParser : public nsIParser,
|
|||
* @param aStream is the i/o source
|
||||
* @return TRUE if all went well -- FALSE otherwise
|
||||
*/
|
||||
virtual nsresult Parse(nsIInputStream& aStream,const nsString& aMimeType,PRBool aEnableVerify=PR_FALSE,void* aKey=0,nsDTDMode aMode=eDTDMode_autodetect);
|
||||
virtual nsresult Parse(nsIInputStream& aStream,const nsAReadableString& aMimeType,PRBool aEnableVerify=PR_FALSE,void* aKey=0,nsDTDMode aMode=eDTDMode_autodetect);
|
||||
|
||||
/**
|
||||
* @update gess5/11/98
|
||||
|
@ -219,7 +219,7 @@ class nsParser : public nsIParser,
|
|||
void* aKey,
|
||||
nsVoidArray& aTagStack,
|
||||
PRUint32 anInsertPos,
|
||||
const nsString& aContentType,
|
||||
const nsAReadableString& aContentType,
|
||||
nsDTDMode aMode=eDTDMode_autodetect);
|
||||
|
||||
|
||||
|
|
|
@ -1182,7 +1182,7 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) {
|
|||
// Fix bug 40809
|
||||
nsAutoString theStr;
|
||||
aToken->GetSource(theStr);
|
||||
theStr.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"), NS_ConvertASCIItoUCS2("\n"));
|
||||
theStr.ReplaceSubstring(NS_LITERAL_STRING("\r\n").get(), NS_LITERAL_STRING("\n").get());
|
||||
theStr.ReplaceChar(kCR,kLF);
|
||||
result=WriteTag(mText,theStr,aToken->GetAttributeCount(),PR_TRUE);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ nsresult ParseData(char* anInputStream,char* anOutputStream) {
|
|||
sink->SetOutputStream(out);
|
||||
parser->RegisterDTD(dtd);
|
||||
parser->SetContentSink(sink);
|
||||
result = parser->Parse(stream, 0, NS_ConvertASCIItoUCS2("text/html"), PR_FALSE, PR_TRUE);
|
||||
result = parser->Parse(stream, 0, NS_LITERAL_STRING("text/html"), PR_FALSE, PR_TRUE);
|
||||
|
||||
PR_Close(out);
|
||||
}
|
||||
|
|
|
@ -480,7 +480,7 @@ NS_IMETHODIMP nsBidiUtilsImp::Conv_FE_06(const nsString aSrc, nsString & aDst)
|
|||
// Start Unreview Code
|
||||
PRUnichar *aSrcUnichars = (PRUnichar *)aSrc.get();
|
||||
PRUint32 i, size = aSrc.Length();
|
||||
aDst = NS_ConvertASCIItoUCS2("");
|
||||
aDst.Truncate();
|
||||
for (i=0;i<size;i++) { // i : Source
|
||||
aSrcUnichars[i];
|
||||
if (aSrcUnichars[i] == 0x0000)
|
||||
|
@ -516,7 +516,7 @@ NS_IMETHODIMP nsBidiUtilsImp::Conv_FE_06_WithReverse(const nsString aSrc, nsStri
|
|||
PRUnichar *aSrcUnichars = (PRUnichar *)aSrc.get();
|
||||
PRBool foundArabic = PR_FALSE;
|
||||
PRUint32 i,endArabic, beginArabic, size = aSrc.Length();
|
||||
aDst = NS_ConvertASCIItoUCS2("");
|
||||
aDst.Truncate();
|
||||
for (endArabic=0;endArabic<size;endArabic++) {
|
||||
if (aSrcUnichars[endArabic] == 0x0000)
|
||||
break; // no need to convert char after the NULL
|
||||
|
@ -573,7 +573,7 @@ nsString & aDst,PRUint32 aDir)
|
|||
// Start Unreview Code
|
||||
PRUnichar *aSrcUnichars = (PRUnichar *)aSrc.get();
|
||||
PRUint32 i,beginArabic, endArabic, size = aSrc.Length();
|
||||
aDst = NS_ConvertASCIItoUCS2("");
|
||||
aDst.Truncate();
|
||||
PRBool foundArabic = PR_FALSE;
|
||||
for (endArabic=0;endArabic<size;endArabic++) {
|
||||
if (aSrcUnichars[endArabic] == 0x0000)
|
||||
|
|
|
@ -839,9 +839,8 @@ mozJSComponentLoader::AttemptRegistration(nsIFile *component,
|
|||
rv = NS_GetServiceManager(getter_AddRefs(mgr));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
// this string can't come from a string bundle, because we don't have string
|
||||
// bundles yet.
|
||||
NS_ConvertASCIItoUCS2 statusMsg("Registering JS component ");
|
||||
// this string can't come from a string bundle, because we
|
||||
// don't have string bundles yet.
|
||||
NS_ConvertASCIItoUCS2 fileName("(no name)");
|
||||
|
||||
// get the file name
|
||||
|
@ -851,11 +850,14 @@ mozJSComponentLoader::AttemptRegistration(nsIFile *component,
|
|||
component->GetLeafName(getter_Copies(leafName));
|
||||
fileName.AssignWithConversion(leafName);
|
||||
}
|
||||
statusMsg.Append(fileName);
|
||||
|
||||
(void) observerService->NotifyObservers(mgr,
|
||||
// this string can't come from a string bundle, because we
|
||||
// don't have string bundles yet.
|
||||
(void) observerService->
|
||||
NotifyObservers(mgr,
|
||||
NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID,
|
||||
statusMsg.get());
|
||||
PromiseFlatString(NS_LITERAL_STRING("Registering JS component ") +
|
||||
fileName).get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -906,7 +908,7 @@ mozJSComponentLoader::UnregisterComponent(nsIFile *component)
|
|||
{
|
||||
(void) observerService->NotifyObservers(mgr,
|
||||
NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID,
|
||||
NS_ConvertASCIItoUCS2("Unregistering JS component").get());
|
||||
NS_LITERAL_STRING("Unregistering JS component").get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4393,7 +4393,7 @@ PresShell::DoCopy()
|
|||
nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(globalObject);
|
||||
if (domWindow)
|
||||
{
|
||||
domWindow->UpdateCommands(NS_ConvertASCIItoUCS2("clipboard"));
|
||||
domWindow->UpdateCommands(NS_LITERAL_STRING("clipboard"));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
* Get a printable from of the name of the frame type.
|
||||
* XXX This should be eliminated and we use GetFrameType() instead...
|
||||
*/
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const = 0;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const = 0;
|
||||
/**
|
||||
* Called to dump out regression data that describes the layout
|
||||
* of the frame and it's children, and so on. The format of the
|
||||
|
|
|
@ -1782,9 +1782,9 @@ nsComboboxControlFrame::GetFrameForPoint(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsComboboxControlFrame::GetFrameName(nsString& aResult) const
|
||||
nsComboboxControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("ComboboxControl", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("ComboboxControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ public:
|
|||
nsFramePaintLayer aWhichLayer,
|
||||
PRUint32 aFlags = 0);
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
||||
NS_IMETHOD FirstChild(nsIPresContext* aPresContext,
|
||||
|
|
|
@ -103,8 +103,8 @@ public:
|
|||
nsIFrame* aOldFrame,
|
||||
nsIFrame* aNewFrame);
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const {
|
||||
return MakeFrameName("FieldSet", aResult);
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -562,9 +562,9 @@ nsFileControlFrame::GetFrameForPoint(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsFileControlFrame::GetFrameName(nsString& aResult) const
|
||||
nsFileControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("FileControl", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("FileControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
nsReflowStatus& aStatus);
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight) { return NS_OK; };
|
||||
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, nsFramePaintLayer aWhichLayer, nsIFrame** aFrame);
|
||||
|
|
|
@ -170,9 +170,9 @@ nsGfxButtonControlFrame::GetCID()
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsGfxButtonControlFrame::GetFrameName(nsString& aResult) const
|
||||
nsGfxButtonControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("ButtonControl", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("ButtonControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
// nsFormControlFrame
|
||||
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight);
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ public:
|
|||
virtual ~nsGfxCheckboxControlFrame();
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const {
|
||||
return MakeFrameName("CheckboxControl", aResult);
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
// this should be protected, but VC6 is lame.
|
||||
|
|
|
@ -121,8 +121,8 @@ public:
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const {
|
||||
return MakeFrameName("ButtonControl", aResult);
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
return MakeFrameName(NS_LITERAL_STRING("ButtonControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -111,8 +111,8 @@ public:
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const {
|
||||
return MakeFrameName("ImageControl", aResult);
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
return MakeFrameName(NS_LITERAL_STRING("ImageControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -379,9 +379,9 @@ nsIsIndexFrame::KeyPress(nsIDOMEvent* aEvent)
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsIsIndexFrame::GetFrameName(nsString& aResult) const
|
||||
nsIsIndexFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("IsIndex", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("IsIndex"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ public:
|
|||
nsReflowStatus& aStatus);
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
|
|
|
@ -153,8 +153,8 @@ PRInt32 nsLegendFrame::GetAlign()
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsLegendFrame::GetFrameName(nsString& aResult) const
|
||||
nsLegendFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Legend", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Legend"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
PRUint32 aFlags = 0);
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
PRInt32 GetAlign();
|
||||
|
|
|
@ -2458,9 +2458,9 @@ nsListControlFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsListControlFrame::GetFrameName(nsString& aResult) const
|
||||
nsListControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("ListControl", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("ListControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ public:
|
|||
|
||||
#ifdef DEBUG
|
||||
// nsIFrameDebug
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
// nsIFormControlFrame
|
||||
|
|
|
@ -89,9 +89,9 @@ nsAreaFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsAreaFrame::GetFrameName(nsString& aResult) const
|
||||
nsAreaFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Area", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Area"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -465,9 +465,9 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::GetFrameName(nsString& aResult) const
|
||||
nsBlockFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Block", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Block"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD VerifyTree() const;
|
||||
#endif
|
||||
|
|
|
@ -153,9 +153,9 @@ nsBulletFrame::Init(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsBulletFrame::GetFrameName(nsString& aResult) const
|
||||
nsBulletFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Bullet", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Bullet"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
PRUint32 aFlags = 0);
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
// nsIHTMLReflow
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
nsIAtom* aListName,
|
||||
nsIFrame* aChildList);
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
||||
|
@ -105,9 +105,9 @@ nsFirstLetterFrame::nsFirstLetterFrame()
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsFirstLetterFrame::GetFrameName(nsString& aResult) const
|
||||
nsFirstLetterFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Letter", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Letter"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2271,30 +2271,28 @@ nsFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrame::GetFrameName(nsString& aResult) const
|
||||
nsFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Frame", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Frame"), aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFrame::MakeFrameName(const char* aType, nsString& aResult) const
|
||||
nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
||||
{
|
||||
aResult.AssignWithConversion(aType);
|
||||
aResult = aType;
|
||||
if (nsnull != mContent) {
|
||||
nsIAtom* tag;
|
||||
mContent->GetTag(tag);
|
||||
if ((tag != nsnull) && (tag != nsLayoutAtoms::textTagName)) {
|
||||
aResult.AppendWithConversion("(");
|
||||
nsAutoString buf;
|
||||
tag->ToString(buf);
|
||||
aResult.Append(buf);
|
||||
aResult.Append(NS_LITERAL_STRING("(") + buf + NS_LITERAL_STRING(")"));
|
||||
NS_RELEASE(tag);
|
||||
aResult.AppendWithConversion(")");
|
||||
}
|
||||
}
|
||||
char buf[40];
|
||||
PR_snprintf(buf, sizeof(buf), "(%d)", ContentIndexInContainer(this));
|
||||
aResult.AppendWithConversion(buf);
|
||||
aResult.Append(NS_ConvertASCIItoUCS2(buf));
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -255,7 +255,7 @@ public:
|
|||
NS_IMETHOD Scrolled(nsIView *aView);
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD DumpRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD VerifyTree() const;
|
||||
|
@ -432,7 +432,7 @@ public:
|
|||
*/
|
||||
virtual void DumpBaseRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
|
||||
|
||||
nsresult MakeFrameName(const char* aKind, nsString& aResult) const;
|
||||
nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
|
||||
|
||||
// Display Reflow Debugging
|
||||
static void* DisplayReflowEnter(nsIFrame* aFrame,
|
||||
|
|
|
@ -149,7 +149,7 @@ public:
|
|||
nsHTMLFrameOuterFrame();
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
// nsISupports
|
||||
|
@ -215,7 +215,7 @@ public:
|
|||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
@ -456,9 +456,9 @@ nsHTMLFrameOuterFrame::Paint(nsIPresContext* aPresContext,
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP nsHTMLFrameOuterFrame::GetFrameName(nsString& aResult) const
|
||||
NS_IMETHODIMP nsHTMLFrameOuterFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("FrameOuter", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("FrameOuter"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -908,9 +908,9 @@ nsHTMLFrameInnerFrame::OnSecurityChange(nsIWebProgress *aWebProgress,
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP nsHTMLFrameInnerFrame::GetFrameName(nsString& aResult) const
|
||||
NS_IMETHODIMP nsHTMLFrameInnerFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("FrameInner", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("FrameInner"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ nsHTMLFrameInnerFrame::DoLoadURL(nsIPresContext* aPresContext)
|
|||
GetURL(parentContent, url);
|
||||
url.Trim(" \t\n\r");
|
||||
if (url.IsEmpty()) // Load about:blank into a frame if not URL is specified (bug 35986)
|
||||
url = NS_ConvertASCIItoUCS2("about:blank");
|
||||
url = NS_LITERAL_STRING("about:blank");
|
||||
|
||||
// Make an absolute URL
|
||||
nsCOMPtr<nsIURI> baseURL;
|
||||
|
|
|
@ -112,7 +112,7 @@ class nsHTMLFramesetBorderFrame : public nsLeafFrame {
|
|||
|
||||
public:
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD HandleEvent(nsIPresContext* aPresContext,
|
||||
|
@ -1928,9 +1928,9 @@ nsHTMLFramesetBorderFrame::GetCursor(nsIPresContext* aPresContext,
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP nsHTMLFramesetBorderFrame::GetFrameName(nsString& aResult) const
|
||||
NS_IMETHODIMP nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("FramesetBorder", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("FramesetBorder"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -421,7 +421,9 @@ nsGfxScrollFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
|
|||
NS_ENSURE_TRUE(nodeInfoManager, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||
nodeInfoManager->GetNodeInfo(NS_ConvertASCIItoUCS2("scrollbar"), nsString(), NS_ConvertASCIItoUCS2("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"),
|
||||
nodeInfoManager->GetNodeInfo(NS_LITERAL_STRING("scrollbar"),
|
||||
NS_LITERAL_STRING(""),
|
||||
NS_LITERAL_STRING("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"),
|
||||
*getter_AddRefs(nodeInfo));
|
||||
|
||||
nsCOMPtr<nsIContent> content;
|
||||
|
@ -783,9 +785,9 @@ nsGfxScrollFrame::Release(void)
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsGfxScrollFrame::GetFrameName(nsString& aResult) const
|
||||
nsGfxScrollFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("GfxScroll", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("GfxScroll"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
virtual nsresult GetContentOf(nsIContent** aContent);
|
||||
|
|
|
@ -157,7 +157,7 @@ public:
|
|||
PRInt32 aHint);
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsIPresContext* aPresContext,
|
||||
|
@ -722,9 +722,9 @@ CanvasFrame::GetContentForEvent(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
CanvasFrame::GetFrameName(nsString& aResult) const
|
||||
CanvasFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Canvas", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Canvas"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
* Get a printable from of the name of the frame type.
|
||||
* XXX This should be eliminated and we use GetFrameType() instead...
|
||||
*/
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const = 0;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const = 0;
|
||||
/**
|
||||
* Called to dump out regression data that describes the layout
|
||||
* of the frame and it's children, and so on. The format of the
|
||||
|
|
|
@ -96,9 +96,9 @@ nsInlineFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsInlineFrame::GetFrameName(nsString& aResult) const
|
||||
nsInlineFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Inline", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Inline"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -911,9 +911,9 @@ nsFirstLineFrame::nsFirstLineFrame()
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsFirstLineFrame::GetFrameName(nsString& aResult) const
|
||||
nsFirstLineFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Line", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Line"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
NS_IMETHOD ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
|
@ -162,7 +162,7 @@ public:
|
|||
friend nsresult NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
#include "nsIPrintOptions.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsHTMLUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
static NS_DEFINE_CID(kPrintOptionsCID, NS_PRINTOPTIONS_CID);
|
||||
|
||||
// headers for plugin scriptability
|
||||
|
@ -649,9 +650,9 @@ nsObjectFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsObjectFrame::GetFrameName(nsString& aResult) const
|
||||
nsObjectFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("ObjectFrame", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("ObjectFrame"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1463,9 +1464,9 @@ nsObjectFrame::IsHidden() const
|
|||
// on the tag...
|
||||
// these |NS_ConvertASCIItoUCS2|s can't be |NS_LITERAL_STRING|s until |EqualsIgnoreCase| get's fixed
|
||||
if (hidden.Length() &&
|
||||
! hidden.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("false")) &&
|
||||
! hidden.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("no")) &&
|
||||
! hidden.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("off"))) {
|
||||
(Compare(hidden, NS_LITERAL_STRING("false"), nsCaseInsensitiveStringComparator()) != 0) &&
|
||||
(Compare(hidden, NS_LITERAL_STRING("no"), nsCaseInsensitiveStringComparator()) != 0) &&
|
||||
(Compare(hidden, NS_LITERAL_STRING("off"), nsCaseInsensitiveStringComparator()) != 0)) {
|
||||
// The <embed> or <applet> is hidden.
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
NS_IMETHOD Scrolled(nsIView *aView);
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
||||
|
|
|
@ -266,9 +266,9 @@ nsPageFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsPageFrame::GetFrameName(nsString& aResult) const
|
||||
nsPageFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Page", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Page"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
// Debugging
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
void SetDebugFD(FILE* aFD) { mDebugFD = aFD; }
|
||||
FILE * mDebugFD;
|
||||
#endif
|
||||
|
|
|
@ -119,9 +119,9 @@ nsPlaceholderFrame::Paint(nsIPresContext* aPresContext,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPlaceholderFrame::GetFrameName(nsString& aResult) const
|
||||
nsPlaceholderFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Placeholder", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Placeholder"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD IsEmpty(PRBool aIsQuirkMode, PRBool aIsPre, PRBool *aResult);
|
||||
|
|
|
@ -557,9 +557,9 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsSimplePageSequenceFrame::GetFrameName(nsString& aResult) const
|
||||
nsSimplePageSequenceFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("SimplePageSequence", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("SimplePageSequence"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
nscoord aHeight);
|
||||
#ifdef NS_DEBUG
|
||||
// Debugging
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SetDebugFD(FILE* aFD);
|
||||
FILE * mDebugFD;
|
||||
#endif
|
||||
|
|
|
@ -423,7 +423,7 @@ public:
|
|||
#ifdef DEBUG
|
||||
NS_IMETHOD List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD GetPosition(nsIPresContext* aCX,
|
||||
|
@ -5628,9 +5628,9 @@ nsTextFrame::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextFrame::GetFrameName(nsString& aResult) const
|
||||
nsTextFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Text", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Text"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
|
@ -632,9 +632,9 @@ ViewportFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
ViewportFrame::GetFrameName(nsString& aResult) const
|
||||
ViewportFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Viewport", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Viewport"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -89,9 +89,9 @@ nsAreaFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsAreaFrame::GetFrameName(nsString& aResult) const
|
||||
nsAreaFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Area", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Area"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -465,9 +465,9 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::GetFrameName(nsString& aResult) const
|
||||
nsBlockFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Block", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Block"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD VerifyTree() const;
|
||||
#endif
|
||||
|
|
|
@ -153,9 +153,9 @@ nsBulletFrame::Init(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsBulletFrame::GetFrameName(nsString& aResult) const
|
||||
nsBulletFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Bullet", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Bullet"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
PRUint32 aFlags = 0);
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
// nsIHTMLReflow
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
nsIAtom* aListName,
|
||||
nsIFrame* aChildList);
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
||||
|
@ -105,9 +105,9 @@ nsFirstLetterFrame::nsFirstLetterFrame()
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsFirstLetterFrame::GetFrameName(nsString& aResult) const
|
||||
nsFirstLetterFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Letter", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Letter"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2271,30 +2271,28 @@ nsFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrame::GetFrameName(nsString& aResult) const
|
||||
nsFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Frame", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Frame"), aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFrame::MakeFrameName(const char* aType, nsString& aResult) const
|
||||
nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
||||
{
|
||||
aResult.AssignWithConversion(aType);
|
||||
aResult = aType;
|
||||
if (nsnull != mContent) {
|
||||
nsIAtom* tag;
|
||||
mContent->GetTag(tag);
|
||||
if ((tag != nsnull) && (tag != nsLayoutAtoms::textTagName)) {
|
||||
aResult.AppendWithConversion("(");
|
||||
nsAutoString buf;
|
||||
tag->ToString(buf);
|
||||
aResult.Append(buf);
|
||||
aResult.Append(NS_LITERAL_STRING("(") + buf + NS_LITERAL_STRING(")"));
|
||||
NS_RELEASE(tag);
|
||||
aResult.AppendWithConversion(")");
|
||||
}
|
||||
}
|
||||
char buf[40];
|
||||
PR_snprintf(buf, sizeof(buf), "(%d)", ContentIndexInContainer(this));
|
||||
aResult.AppendWithConversion(buf);
|
||||
aResult.Append(NS_ConvertASCIItoUCS2(buf));
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -255,7 +255,7 @@ public:
|
|||
NS_IMETHOD Scrolled(nsIView *aView);
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD DumpRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD VerifyTree() const;
|
||||
|
@ -432,7 +432,7 @@ public:
|
|||
*/
|
||||
virtual void DumpBaseRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
|
||||
|
||||
nsresult MakeFrameName(const char* aKind, nsString& aResult) const;
|
||||
nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
|
||||
|
||||
// Display Reflow Debugging
|
||||
static void* DisplayReflowEnter(nsIFrame* aFrame,
|
||||
|
|
|
@ -421,7 +421,9 @@ nsGfxScrollFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
|
|||
NS_ENSURE_TRUE(nodeInfoManager, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||
nodeInfoManager->GetNodeInfo(NS_ConvertASCIItoUCS2("scrollbar"), nsString(), NS_ConvertASCIItoUCS2("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"),
|
||||
nodeInfoManager->GetNodeInfo(NS_LITERAL_STRING("scrollbar"),
|
||||
NS_LITERAL_STRING(""),
|
||||
NS_LITERAL_STRING("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"),
|
||||
*getter_AddRefs(nodeInfo));
|
||||
|
||||
nsCOMPtr<nsIContent> content;
|
||||
|
@ -783,9 +785,9 @@ nsGfxScrollFrame::Release(void)
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsGfxScrollFrame::GetFrameName(nsString& aResult) const
|
||||
nsGfxScrollFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("GfxScroll", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("GfxScroll"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
virtual nsresult GetContentOf(nsIContent** aContent);
|
||||
|
|
|
@ -157,7 +157,7 @@ public:
|
|||
PRInt32 aHint);
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsIPresContext* aPresContext,
|
||||
|
@ -722,9 +722,9 @@ CanvasFrame::GetContentForEvent(nsIPresContext* aPresContext,
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
CanvasFrame::GetFrameName(nsString& aResult) const
|
||||
CanvasFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Canvas", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Canvas"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -96,9 +96,9 @@ nsInlineFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsInlineFrame::GetFrameName(nsString& aResult) const
|
||||
nsInlineFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Inline", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Inline"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -911,9 +911,9 @@ nsFirstLineFrame::nsFirstLineFrame()
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsFirstLineFrame::GetFrameName(nsString& aResult) const
|
||||
nsFirstLineFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Line", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Line"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
NS_IMETHOD ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
|
||||
|
@ -162,7 +162,7 @@ public:
|
|||
friend nsresult NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
#include "nsIPrintOptions.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsHTMLUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
static NS_DEFINE_CID(kPrintOptionsCID, NS_PRINTOPTIONS_CID);
|
||||
|
||||
// headers for plugin scriptability
|
||||
|
@ -649,9 +650,9 @@ nsObjectFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsObjectFrame::GetFrameName(nsString& aResult) const
|
||||
nsObjectFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("ObjectFrame", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("ObjectFrame"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1463,9 +1464,9 @@ nsObjectFrame::IsHidden() const
|
|||
// on the tag...
|
||||
// these |NS_ConvertASCIItoUCS2|s can't be |NS_LITERAL_STRING|s until |EqualsIgnoreCase| get's fixed
|
||||
if (hidden.Length() &&
|
||||
! hidden.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("false")) &&
|
||||
! hidden.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("no")) &&
|
||||
! hidden.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("off"))) {
|
||||
(Compare(hidden, NS_LITERAL_STRING("false"), nsCaseInsensitiveStringComparator()) != 0) &&
|
||||
(Compare(hidden, NS_LITERAL_STRING("no"), nsCaseInsensitiveStringComparator()) != 0) &&
|
||||
(Compare(hidden, NS_LITERAL_STRING("off"), nsCaseInsensitiveStringComparator()) != 0)) {
|
||||
// The <embed> or <applet> is hidden.
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
NS_IMETHOD Scrolled(nsIView *aView);
|
||||
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
||||
|
|
|
@ -266,9 +266,9 @@ nsPageFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
nsPageFrame::GetFrameName(nsString& aResult) const
|
||||
nsPageFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Page", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Page"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
// Debugging
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
void SetDebugFD(FILE* aFD) { mDebugFD = aFD; }
|
||||
FILE * mDebugFD;
|
||||
#endif
|
||||
|
|
|
@ -119,9 +119,9 @@ nsPlaceholderFrame::Paint(nsIPresContext* aPresContext,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPlaceholderFrame::GetFrameName(nsString& aResult) const
|
||||
nsPlaceholderFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName("Placeholder", aResult);
|
||||
return MakeFrameName(NS_LITERAL_STRING("Placeholder"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD IsEmpty(PRBool aIsQuirkMode, PRBool aIsPre, PRBool *aResult);
|
||||
|
|
|
@ -4393,7 +4393,7 @@ PresShell::DoCopy()
|
|||
nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(globalObject);
|
||||
if (domWindow)
|
||||
{
|
||||
domWindow->UpdateCommands(NS_ConvertASCIItoUCS2("clipboard"));
|
||||
domWindow->UpdateCommands(NS_LITERAL_STRING("clipboard"));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче