mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1050001 - Remove #ifdef DEBUG_username
lines in editor/. r=ehsan
This commit is contained in:
parent
bc031a9a09
commit
483b5a000b
@ -2323,9 +2323,6 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode)
|
||||
}
|
||||
} else {
|
||||
// Do we ever get here?
|
||||
#if DEBUG_cmanske
|
||||
printf("Attribute in sourceAttribute has empty value in nsEditor::CloneAttributes()\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1135,10 +1135,6 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable
|
||||
nsAutoString flavor;
|
||||
flavor.AssignWithConversion(bestFlavor);
|
||||
nsAutoString stuffToPaste;
|
||||
#ifdef DEBUG_clipboard
|
||||
printf("Got flavor [%s]\n", bestFlavor.get());
|
||||
#endif
|
||||
|
||||
bool isSafe = IsSafeToInsertData(aSourceDoc);
|
||||
|
||||
if (0 == nsCRT::strcmp(bestFlavor, kFileMime) ||
|
||||
@ -1646,9 +1642,6 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation(int32_t aSelectionType)
|
||||
|
||||
if (flav && 0 == nsCRT::strcmp(flav, kUnicodeMime))
|
||||
{
|
||||
#ifdef DEBUG_clipboard
|
||||
printf("Got flavor [%s]\n", flav);
|
||||
#endif
|
||||
nsCOMPtr<nsISupportsString> textDataObj = do_QueryInterface(genericDataObj);
|
||||
if (textDataObj && len > 0)
|
||||
{
|
||||
@ -1732,11 +1725,6 @@ nsHTMLEditor::InsertTextWithQuotations(const nsAString &aStringToInsert)
|
||||
// inserting from curHunk to lineStart then returning.
|
||||
const nsAString &curHunk = Substring(hunkStart, lineStart);
|
||||
nsCOMPtr<nsIDOMNode> dummyNode;
|
||||
#ifdef DEBUG_akkana_verbose
|
||||
printf("==== Inserting text as %squoted: ---\n%s---\n",
|
||||
curHunkIsQuoted ? "" : "non-",
|
||||
NS_LossyConvertUTF16toASCII(curHunk).get());
|
||||
#endif
|
||||
if (curHunkIsQuoted)
|
||||
rv = InsertAsPlaintextQuotation(curHunk, false,
|
||||
getter_AddRefs(dummyNode));
|
||||
|
@ -1553,16 +1553,6 @@ nsHTMLEditor::InsertElementAtSelection(nsIDOMElement* aElement, bool aDeleteSele
|
||||
// XXX: ERROR_HANDLING bad XPCOM usage
|
||||
if (NS_SUCCEEDED(res) && NS_SUCCEEDED(selection->GetAnchorOffset(&offsetForInsert)) && parentSelectedNode)
|
||||
{
|
||||
#ifdef DEBUG_cmanske
|
||||
{
|
||||
nsAutoString name;
|
||||
parentSelectedNode->GetNodeName(name);
|
||||
printf("InsertElement: Anchor node of selection: ");
|
||||
wprintf(name.get());
|
||||
printf(" Offset: %d\n", offsetForInsert);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Adjust position based on the node we are going to insert.
|
||||
NormalizeEOLInsertPosition(node, address_of(parentSelectedNode), &offsetForInsert);
|
||||
|
||||
|
@ -126,10 +126,7 @@ nsHTMLURIRefObject::GetNextURI(nsAString & aURI)
|
||||
NS_ENSURE_TRUE(mAttributeCnt, NS_ERROR_FAILURE);
|
||||
mCurAttrIndex = 0;
|
||||
}
|
||||
#ifdef DEBUG_akkana
|
||||
printf("Looking at tag '%s'\n",
|
||||
NS_LossyConvertUTF16toASCII(tagName).get());
|
||||
#endif
|
||||
|
||||
while (mCurAttrIndex < mAttributeCnt)
|
||||
{
|
||||
nsCOMPtr<nsIDOMAttr> attrNode;
|
||||
@ -141,10 +138,6 @@ nsHTMLURIRefObject::GetNextURI(nsAString & aURI)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// href >> A, AREA, BASE, LINK
|
||||
#ifdef DEBUG_akkana
|
||||
printf("Trying to match attribute '%s'\n",
|
||||
NS_LossyConvertUTF16toASCII(curAttr).get());
|
||||
#endif
|
||||
if (MATCHES(curAttr, "href"))
|
||||
{
|
||||
if (!MATCHES(tagName, "a") && !MATCHES(tagName, "area")
|
||||
@ -248,9 +241,6 @@ nsHTMLURIRefObject::RewriteAllURIs(const nsAString & aOldPat,
|
||||
const nsAString & aNewPat,
|
||||
bool aMakeRel)
|
||||
{
|
||||
#ifdef DEBUG_akkana
|
||||
printf("Can't rewrite URIs yet\n");
|
||||
#endif
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
@ -349,9 +349,7 @@ nsHTMLEditor::GetNextRow(nsIDOMNode* aCurrentRowNode, nsIDOMNode **aRowNode)
|
||||
NS_ADDREF(*aRowNode);
|
||||
return NS_OK;
|
||||
}
|
||||
#ifdef DEBUG_cmanske
|
||||
printf("GetNextRow: firstChild of row's parent's sibling is not a TR!\n");
|
||||
#endif
|
||||
|
||||
// We arrive here only if a table section has no children
|
||||
// or first child of section is not a row (bad HTML or more "_moz_text" nodes!)
|
||||
// So look for another section sibling
|
||||
@ -457,11 +455,6 @@ nsHTMLEditor::InsertTableColumn(int32_t aNumber, bool aAfter)
|
||||
nsCOMPtr<nsIDOMNode> rowNode;
|
||||
for ( rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||
{
|
||||
#ifdef DEBUG_cmanske
|
||||
if (rowIndex == rowCount-1)
|
||||
printf(" ***InsertTableColumn: Inserting cell at last row: %d\n", rowIndex);
|
||||
#endif
|
||||
|
||||
if (startColIndex < colCount)
|
||||
{
|
||||
// We are inserting before an existing column
|
||||
@ -3023,10 +3016,6 @@ nsHTMLEditor::GetNextSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell)
|
||||
|
||||
// We found a selected cell
|
||||
if (*aCell) break;
|
||||
#ifdef DEBUG_cmanske
|
||||
else
|
||||
printf("GetNextSelectedCell: Collapsed range found\n");
|
||||
#endif
|
||||
|
||||
// If we didn't find a cell, continue to next range in selection
|
||||
}
|
||||
@ -3091,9 +3080,6 @@ nsHTMLEditor::SetSelectionAfterTableEdit(nsIDOMElement* aTable, int32_t aRow, in
|
||||
|
||||
if (!selection)
|
||||
{
|
||||
#ifdef DEBUG_cmanske
|
||||
printf("Selection not found after table manipulation!\n");
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -171,20 +171,8 @@ nsInternetCiter::Rewrap(const nsAString& aInString,
|
||||
uint32_t citeLevel = 0;
|
||||
const nsPromiseFlatString &tString = PromiseFlatString(aInString);
|
||||
length = tString.Length();
|
||||
#ifdef DEBUG_wrapping
|
||||
int loopcount = 0;
|
||||
#endif
|
||||
while (posInString < length)
|
||||
{
|
||||
#ifdef DEBUG_wrapping
|
||||
printf("Outer loop: '%s'\n",
|
||||
NS_LossyConvertUTF16toASCII(Substring(tString, posInString,
|
||||
length-posInString)).get());
|
||||
printf("out string is now: '%s'\n",
|
||||
NS_LossyConvertUTF16toASCII(aOutString).get());
|
||||
|
||||
#endif
|
||||
|
||||
// Get the new cite level here since we're at the beginning of a line
|
||||
uint32_t newCiteLevel = 0;
|
||||
while (posInString < length && tString[posInString] == gt)
|
||||
@ -265,15 +253,6 @@ nsInternetCiter::Rewrap(const nsAString& aInString,
|
||||
// over this line of the input string to get all of it:
|
||||
while ((int32_t)posInString < nextNewline)
|
||||
{
|
||||
#ifdef DEBUG_wrapping
|
||||
if (++loopcount > 1000)
|
||||
NS_ASSERTION(false, "possible infinite loop in nsInternetCiter\n");
|
||||
|
||||
printf("Inner loop: '%s'\n",
|
||||
NS_LossyConvertUTF16toASCII(Substring(tString, posInString,
|
||||
nextNewline-posInString)).get());
|
||||
#endif
|
||||
|
||||
// Skip over initial spaces:
|
||||
while ((int32_t)posInString < nextNewline
|
||||
&& nsCRT::IsAsciiSpace(tString[posInString]))
|
||||
@ -341,9 +320,6 @@ nsInternetCiter::Rewrap(const nsAString& aInString,
|
||||
// breaker. Just break the line, hard.
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
#ifdef DEBUG_akkana
|
||||
printf("nsInternetCiter: LineBreaker not working -- breaking hard\n");
|
||||
#endif
|
||||
breakPt = eol;
|
||||
}
|
||||
|
||||
@ -380,17 +356,8 @@ nsInternetCiter::Rewrap(const nsAString& aInString,
|
||||
BreakLine(aOutString, outStringCol, citeLevel);
|
||||
|
||||
} // end inner loop within one line of aInString
|
||||
#ifdef DEBUG_wrapping
|
||||
printf("---------\nEnd inner loop: out string is now '%s'\n-----------\n",
|
||||
NS_LossyConvertUTF16toASCII(aOutString).get());
|
||||
#endif
|
||||
} // end outer loop over lines of aInString
|
||||
|
||||
#ifdef DEBUG_wrapping
|
||||
printf("Final out string is now: '%s'\n",
|
||||
NS_LossyConvertUTF16toASCII(aOutString).get());
|
||||
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1363,14 +1363,9 @@ nsPlaintextEditor::PasteAsQuotation(int32_t aSelectionType)
|
||||
&len);
|
||||
if (NS_FAILED(rv) || !flav)
|
||||
{
|
||||
#ifdef DEBUG_akkana
|
||||
printf("PasteAsPlaintextQuotation: GetAnyTransferData failed, %d\n", rv);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
#ifdef DEBUG_clipboard
|
||||
printf("Got flavor [%s]\n", flav);
|
||||
#endif
|
||||
|
||||
if (0 == nsCRT::strcmp(flav, kUnicodeMime) ||
|
||||
0 == nsCRT::strcmp(flav, kMozTextInternal))
|
||||
{
|
||||
@ -1479,10 +1474,6 @@ nsPlaintextEditor::Rewrap(bool aRespectNewlines)
|
||||
if (wrapCol <= 0)
|
||||
wrapCol = 72;
|
||||
|
||||
#ifdef DEBUG_akkana
|
||||
printf("nsPlaintextEditor::Rewrap to %ld columns\n", (long)wrapCol);
|
||||
#endif
|
||||
|
||||
nsAutoString current;
|
||||
bool isCollapsed;
|
||||
rv = SharedOutputString(nsIDocumentEncoder::OutputFormatted
|
||||
@ -1505,10 +1496,6 @@ nsPlaintextEditor::Rewrap(bool aRespectNewlines)
|
||||
NS_IMETHODIMP
|
||||
nsPlaintextEditor::StripCites()
|
||||
{
|
||||
#ifdef DEBUG_akkana
|
||||
printf("nsPlaintextEditor::StripCites()\n");
|
||||
#endif
|
||||
|
||||
nsAutoString current;
|
||||
bool isCollapsed;
|
||||
nsresult rv = SharedOutputString(nsIDocumentEncoder::OutputFormatted,
|
||||
|
@ -3711,44 +3711,6 @@ nsTextServicesDocument::FindWordBounds(nsTArray<OffsetEntry*> *aOffsetTable,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_kin
|
||||
void
|
||||
nsTextServicesDocument::PrintOffsetTable()
|
||||
{
|
||||
OffsetEntry *entry;
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < mOffsetTable.Length(); i++)
|
||||
{
|
||||
entry = mOffsetTable[i];
|
||||
printf("ENTRY %4d: %p %c %c %4d %4d %4d\n",
|
||||
i, entry->mNode, entry->mIsValid ? 'V' : 'N',
|
||||
entry->mIsInsertedText ? 'I' : 'B',
|
||||
entry->mNodeOffset, entry->mStrOffset, entry->mLength);
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
void
|
||||
nsTextServicesDocument::PrintContentNode(nsIContent *aContent)
|
||||
{
|
||||
nsString tmpStr, str;
|
||||
|
||||
aContent->Tag()->ToString(tmpStr);
|
||||
printf("%s", NS_LossyConvertUTF16toASCII(tmpStr).get());
|
||||
|
||||
if (nsIDOMNode::TEXT_NODE == aContent->NodeType())
|
||||
{
|
||||
aContent->AppendTextTo(str);
|
||||
printf(": \"%s\"", NS_LossyConvertUTF16toASCII(str).get());
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::WillInsertNode(nsIDOMNode *aNode,
|
||||
nsIDOMNode *aParent,
|
||||
|
@ -224,11 +224,6 @@ private:
|
||||
int32_t *aWordStartOffset,
|
||||
nsIDOMNode **aWordEndNode,
|
||||
int32_t *aWordEndOffset);
|
||||
|
||||
#ifdef DEBUG_kin
|
||||
void PrintOffsetTable();
|
||||
void PrintContentNode(nsIContent *aContent);
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // nsTextServicesDocument_h__
|
||||
|
Loading…
Reference in New Issue
Block a user