From 313afdd35b7cbc84816af63f227081b34cec4a47 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Thu, 15 Jul 1999 19:28:12 +0000 Subject: [PATCH] a tiny bit of extra debug output, not enabled by default --- layout/base/src/nsRangeList.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/layout/base/src/nsRangeList.cpp b/layout/base/src/nsRangeList.cpp index 728ff81bc6ed..be097c1d2e3d 100644 --- a/layout/base/src/nsRangeList.cpp +++ b/layout/base/src/nsRangeList.cpp @@ -2273,7 +2273,30 @@ nsRangeList::Extend(nsIDOMNode* aParentNode, PRInt32 aOffset, SelectionType aTyp else if (NS_FAILED(mAnchorFocusRange[aType]->SetEnd(endNode,endOffset))) return NS_ERROR_FAILURE;//??? /*end hack*/ + ScrollIntoView(aType); + +#ifdef DEBUG_SELECTION + if (aParentNode) + { + nsCOMPtrcontent; + content = do_QueryInterface(aParentNode); + nsIAtom *tag; + content->GetTag(tag); + if (tag) + { + nsString tagString; + tag->ToString(tagString); + char * tagCString = tagString.ToNewCString(); + printf ("Sel. Extend to %p %s %d\n", content, tagCString, aOffset); + delete [] tagCString; + } + } + else { + printf ("Sel. Extend set to null parent.\n"); + } +#endif + return NotifySelectionListeners(); }