2009-02-24 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Darin Adler

        https://bugs.webkit.org/show_bug.cgi?id=24135

        Round the FloatPoint returned by absoluteToLocal(), rather than
        truncating it.

        * dom/MouseRelatedEvent.cpp:
        (WebCore::MouseRelatedEvent::receivedTarget):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a735a28b
2009-02-24 Simon Fraser <simon.fraser@apple.com>
Reviewed by Darin Adler
https://bugs.webkit.org/show_bug.cgi?id=24135
Fix test now that offsetX/offsetY get rounded, rather than truncated.
* fast/events/offsetX-offsetY.html:
2009-02-24 Beth Dakin <bdakin@apple.com>
Reviewed by Sam Weinig.
......
......@@ -39,7 +39,7 @@
dispatchEvent(36, 272, 'with-bordertopextra', 4, 4);
// dispatchEvent(639, 316, 'in-columns', 173, -172); // This is buggy. See https://bugs.webkit.org/show_bug.cgi?id=21993
dispatchEvent(563, 410, 'inside-overflow', 7, 6);
dispatchEvent(112, 369, 'transformed', 11, 15);
dispatchEvent(112, 369, 'transformed', 11, 16);
if (window.layoutTestController)
layoutTestController.notifyDone();
......
2009-02-24 Simon Fraser <simon.fraser@apple.com>
Reviewed by Darin Adler
https://bugs.webkit.org/show_bug.cgi?id=24135
Round the FloatPoint returned by absoluteToLocal(), rather than
truncating it.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::receivedTarget):
2009-02-24 Beth Dakin <bdakin@apple.com>
Reviewed by Sam Weinig.
......@@ -133,9 +133,9 @@ void MouseRelatedEvent::receivedTarget()
// Adjust offsetX/Y to be relative to the target's position.
if (!isSimulated()) {
if (RenderObject* r = targ->renderer()) {
FloatPoint absPos = r->absoluteToLocal(FloatPoint(m_pageX, m_pageY), false, true);
m_offsetX = absPos.x();
m_offsetY = absPos.y();
IntPoint localPos = roundedIntPoint(r->absoluteToLocal(FloatPoint(m_pageX, m_pageY), false, true));
m_offsetX = localPos.x();
m_offsetY = localPos.y();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment