[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
elements
https://bugs.webkit.org/show_bug.cgi?id=21870

Attachment 24670: Patch
https://bugs.webkit.org/attachment.cgi?id=24670&action=edit

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

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
events.

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


More information about the webkit-reviews mailing list