Review of attachment 546015:
-----------------------------------------------------------------
r+ with that fixed
::: layout/generic/nsFrame.cpp
@@ +2663,5 @@
> +
> + // We should set minimum scroll speed same as the on-edge scrolling speed.
> + // E.g., while mouse cursor is on the edge, scrolling speed is always same.
> + // However, when the user moves 1px outside of the selection root element,
> + // the scrolling speed is slow down. We should avoid this strange behavior.
Remove the last two lines of this comment, since they're confusing; it sounds like you're describing something that actually happens with this patch applied.
@@ +2666,5 @@
> + // However, when the user moves 1px outside of the selection root element,
> + // the scrolling speed is slow down. We should avoid this strange behavior.
> + nsPoint currentScrollPos = scrollableFrame->GetScrollPosition();
> + nsRect visibleRectOfScrolledFrame = scrollableFrame->GetScrollPortRect();
> + visibleRectOfScrolledFrame.MoveTo(currentScrollPos);
This should be scrollableFrame->GetScrollPortRect() + curentScrollPos, right?
Comment on attachment 546015
Patch v3.1
Review of attachment 546015: ------- ------- ------- ------- ------- ------- ------- ------- --
-------
r+ with that fixed
::: layout/ generic/ nsFrame. cpp
@@ +2663,5 @@
> +
> + // We should set minimum scroll speed same as the on-edge scrolling speed.
> + // E.g., while mouse cursor is on the edge, scrolling speed is always same.
> + // However, when the user moves 1px outside of the selection root element,
> + // the scrolling speed is slow down. We should avoid this strange behavior.
Remove the last two lines of this comment, since they're confusing; it sounds like you're describing something that actually happens with this patch applied.
@@ +2666,5 @@ ->GetScrollPosi tion(); rolledFrame = scrollableFrame ->GetScrollPort Rect(); rolledFrame. MoveTo( currentScrollPo s);
> + // However, when the user moves 1px outside of the selection root element,
> + // the scrolling speed is slow down. We should avoid this strange behavior.
> + nsPoint currentScrollPos = scrollableFrame
> + nsRect visibleRectOfSc
> + visibleRectOfSc
This should be scrollableFrame ->GetScrollPort Rect() + curentScrollPos, right?