There are two problems with the way the resize control tracks the mouse: 1) It does not take into account the point within the resize control where dragging started, always behaving as if the user is dragging the bottom-right pixel of the control. 2) It messes up when there are borders or padding. I am going to attach a patch that includes a test case.
Created attachment 8969 [details] Proposed fix
Comment on attachment 8969 [details] Proposed fix This is still off by 1 for textareas the first time you resize them.
Created attachment 8977 [details] Proposed fix Fixed problems in the previous version. Added code to lift the intrinsic margins into the style, to prevent textareas from jumping when you first resize them.
Forgot to mention that the new patch has another couple of cases in the test.
Comment on attachment 8977 [details] Proposed fix An offset should be an IntSize, not an IntPoint. If this was an IntSize, then this: + currentPoint.move(offsetFromResizeCorner.x(), offsetFromResizeCorner.y()); would be: currentPoint += offsetFromResizeCorner; This otherwise looks good to me. I think I'm going to mark it review+ -- if you decide to do a new patch with IntSize, then you can clear the review flag on this one.
Comment on attachment 8977 [details] Proposed fix Going to change the offset to IntSize.
Created attachment 8996 [details] Patch Changed the offset into an IntSize.
Comment on attachment 8996 [details] Patch r=me
Committed revision 15014.