[webkit-reviews] review requested: [Bug 21870] [Transforms] event.offsetX and offsetY are wrong for transformed elements : [Attachment 24670] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 24 23:03:37 PDT 2008

Simon Fraser <simon.fraser at apple.com> has asked  for review:
Bug 21870: [Transforms] event.offsetX and offsetY are wrong for transformed

Attachment 24670: Patch

------- Additional Comments from Simon Fraser <simon.fraser at apple.com>
Add two new methods to RenderObject:
+    virtual bool objectPointToAbsoluteCoords(FloatPoint&, bool fixed = false)
+    virtual bool absolutePointToObjectCoords(FloatPoint&, bool fixed = false)

which map points between RenderObject and absolute coords taking transforms
into account.

Factor some RenderBox code into a new offsetFromContainer() method, now called
in 3 places.

Call absolutePointToObjectCoords() when setting offsetX, offsetY in mouse

Add some comments, and a convenience expand() method on IntSize.

More information about the webkit-reviews mailing list