Test Selection debug menu item was horked in Composer; b=146424, r=neil@parkwaycc.co.uk, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122216 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
cb6d4ae8ad
commit
da45b23bb4
@ -84,12 +84,24 @@ function EditorTestSelection()
|
||||
|
||||
dump("Selection contains:\n");
|
||||
// 3rd param = column to wrap
|
||||
dump(selection.toStringWithFormat("text/plain",
|
||||
dump(selection.QueryInterface(Components.interfaces.nsISelectionPrivate).toStringWithFormat("text/plain",
|
||||
3, // OutputFormatted & gOutputSelectionOnly
|
||||
0) + "\n");
|
||||
|
||||
var output;
|
||||
|
||||
dump("====== Selection as node and offsets==========\n");
|
||||
dump("rangeCount = " + selection.rangeCount + "\n");
|
||||
for (i = 0; i < selection.rangeCount; i++)
|
||||
{
|
||||
var range = selection.getRangeAt(i);
|
||||
if (range)
|
||||
{
|
||||
dump("Range "+i+": StartParent="+range.startContainer.nodeName+", offset="+range.startOffset+"\n");
|
||||
dump("Range "+i+": EndParent="+range.endContainer.nodeName+", offset="+range.endOffset+"\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
dump("====== Selection as unformatted text ==========\n");
|
||||
output = editorShell.GetContentsAs("text/plain", 1);
|
||||
dump(output + "\n\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user