Bug 1404854 Part 2 - Move adding mOffsetYToCaretLogicalPosition into DragCaretInternal(). r=mtseng

MozReview-Commit-ID: 1hKB7V4JSZo

--HG--
extra : rebase_source : 20cbd21ce12f60c47e16d2bbeac47e2038a3a207
This commit is contained in:
Ting-Yu Lin 2017-10-06 17:39:56 +08:00
Родитель 2c85997e86
Коммит 6a312878b3
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -510,8 +510,7 @@ AccessibleCaretManager::DragCaret(const nsPoint& aPoint)
return NS_ERROR_NULL_POINTER;
}
nsPoint point(aPoint.x, aPoint.y + mOffsetYToCaretLogicalPosition);
DragCaretInternal(point);
DragCaretInternal(aPoint);
UpdateCarets();
return NS_OK;
}
@ -1219,7 +1218,8 @@ AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint)
nsIFrame* rootFrame = mPresShell->GetRootFrame();
MOZ_ASSERT(rootFrame, "We need root frame to compute caret dragging!");
nsPoint point = AdjustDragBoundary(aPoint);
nsPoint point = AdjustDragBoundary(
nsPoint(aPoint.x, aPoint.y + mOffsetYToCaretLogicalPosition));
// Find out which content we point to
nsIFrame* ptFrame = nsLayoutUtils::GetFrameForPoint(