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(); }