nsresult nsCoreUtils::ScrollSubstringTo(nsIFrame* aFrame, nsRange* aRange, uint32_t aScrollType) { nsIPresShell::ScrollAxis vertical, horizontal; ConvertScrollTypeToPercents(aScrollType, &vertical, &horizontal); return ScrollSubstringTo(aFrame, aRange, vertical, horizontal); }
void nsCoreUtils::ScrollTo(nsIPresShell* aPresShell, nsIContent* aContent, uint32_t aScrollType) { nsIPresShell::ScrollAxis vertical, horizontal; ConvertScrollTypeToPercents(aScrollType, &vertical, &horizontal); aPresShell->ScrollContentIntoView(aContent, vertical, horizontal, nsIPresShell::SCROLL_OVERFLOW_HIDDEN); }
nsresult nsCoreUtils::ScrollSubstringTo(nsIFrame *aFrame, nsIDOMNode *aStartNode, PRInt32 aStartIndex, nsIDOMNode *aEndNode, PRInt32 aEndIndex, PRUint32 aScrollType) { PRInt16 vPercent, hPercent; ConvertScrollTypeToPercents(aScrollType, &vPercent, &hPercent); return ScrollSubstringTo(aFrame, aStartNode, aStartIndex, aEndNode, aEndIndex, vPercent, hPercent); }