Bug 798867 - Use the content offset that GetFrameForNodeOffset returns. r=roc

This commit is contained in:
Mats Palmgren 2012-11-08 17:09:38 +01:00
Родитель ddad154fe9
Коммит bcece6a3cb
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -2876,11 +2876,10 @@ nsFrame::SelectByTypeAtPoint(nsPresContext* aPresContext,
if (!offsets.content)
return NS_ERROR_FAILURE;
nsIFrame* theFrame;
int32_t offset;
const nsFrameSelection* frameSelection =
PresContext()->GetPresShell()->ConstFrameSelection();
theFrame = frameSelection->
nsIFrame* theFrame = frameSelection->
GetFrameForNodeOffset(offsets.content, offsets.offset,
nsFrameSelection::HINT(offsets.associateWithNext),
&offset);
@ -2889,7 +2888,7 @@ nsFrame::SelectByTypeAtPoint(nsPresContext* aPresContext,
nsFrame* frame = static_cast<nsFrame*>(theFrame);
return frame->PeekBackwardAndForward(aBeginAmountType, aEndAmountType,
offsets.offset, aPresContext,
offset, aPresContext,
aBeginAmountType != eSelectWord,
aSelectFlags);
}