Bug 1174600 - Fix first AccessibleCarets jumps to top of the screen when dragging. r=mtseng

When the second AccessibleCaret is out of scrollport, its logical
position becomes (0, 0). Therefore we should adjust the dragging point
for first AccessibleCaret only if dragDownBoundaryY > 0.
This commit is contained in:
Ting-Yu Lin 2015-06-14 22:40:00 +08:00
parent 59af1911ea
commit d4de804756

View File

@ -831,7 +831,7 @@ AccessibleCaretManager::AdjustDragBoundary(const nsPoint& aPoint) const
if (GetCaretMode() == CaretMode::Selection) {
if (mActiveCaret == mFirstCaret.get()) {
nscoord dragDownBoundaryY = mSecondCaret->LogicalPosition().y;
if (adjustedPoint.y > dragDownBoundaryY) {
if (dragDownBoundaryY > 0 && adjustedPoint.y > dragDownBoundaryY) {
adjustedPoint.y = dragDownBoundaryY;
}
} else {