https://bugs.webkit.org/show_bug.cgi?id=77986
Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-02-07
Reviewed by Kenneth Rohde Christiansen.
* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
(WebPlatformTouchPoint):
(WebKit::WebPlatformTouchPoint::radius):
(WebKit::WebPlatformTouchPoint::rotationAngle):
(WebKit::WebPlatformTouchPoint::force):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
* Shared/WebPlatformTouchPoint.cpp:
(WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106949
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-07 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Encode radius, force and rotationAngle in WebPlatformTouchPoint.
+ https://bugs.webkit.org/show_bug.cgi?id=77986
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Shared/WebEvent.h:
+ (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
+ (WebPlatformTouchPoint):
+ (WebKit::WebPlatformTouchPoint::radius):
+ (WebKit::WebPlatformTouchPoint::rotationAngle):
+ (WebKit::WebPlatformTouchPoint::force):
+ * Shared/WebEventConversion.cpp:
+ (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
+ * Shared/WebPlatformTouchPoint.cpp:
+ (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
+ (WebKit::WebPlatformTouchPoint::encode):
+ (WebKit::WebPlatformTouchPoint::decode):
+
2012-02-07 Andras Becsi <andras.becsi@nokia.com>
[Qt] [WK2] Fix the debug build after r106920
/*
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
TouchCancelled
};
- WebPlatformTouchPoint() { }
+ WebPlatformTouchPoint() : m_rotationAngle(0.0), m_force(0.0) { }
WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position);
+ WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position, const WebCore::IntSize& radius, float rotationAngle = 0.0, float force = 0.0);
+
uint32_t id() const { return m_id; }
TouchPointState state() const { return static_cast<TouchPointState>(m_state); }
const WebCore::IntPoint& screenPosition() const { return m_screenPosition; }
const WebCore::IntPoint& position() const { return m_position; }
-
+ const WebCore::IntSize& radius() const { return m_radius; }
+ float rotationAngle() const { return m_rotationAngle; }
+ float force() const { return m_force; }
+
void setState(TouchPointState state) { m_state = state; }
void encode(CoreIPC::ArgumentEncoder*) const;
uint32_t m_state;
WebCore::IntPoint m_screenPosition;
WebCore::IntPoint m_position;
-
+ WebCore::IntSize m_radius;
+ float m_rotationAngle;
+ float m_force;
};
// FIXME: Move this class to its own header file.
m_screenPos = webTouchPoint.screenPosition();
m_pos = webTouchPoint.position();
+ m_radiusX = webTouchPoint.radius().width();
+ m_radiusY = webTouchPoint.radius().height();
+ m_force = webTouchPoint.force();
+ m_rotationAngle = webTouchPoint.rotationAngle();
}
};
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
, m_state(state)
, m_screenPosition(screenPosition)
, m_position(position)
+ , m_rotationAngle(0.0)
+ , m_force(0.0)
+{
+}
+
+WebPlatformTouchPoint::WebPlatformTouchPoint(unsigned id, TouchPointState state, const IntPoint& screenPosition, const IntPoint& position, const WebCore::IntSize& radius, float rotationAngle, float force)
+ : m_id(id)
+ , m_state(state)
+ , m_screenPosition(screenPosition)
+ , m_position(position)
+ , m_radius(radius)
+ , m_rotationAngle(rotationAngle)
+ , m_force(force)
{
}
void WebPlatformTouchPoint::encode(CoreIPC::ArgumentEncoder* encoder) const
{
- encoder->encode(CoreIPC::In(m_id, m_state, m_screenPosition, m_position));
+ encoder->encode(CoreIPC::In(m_id, m_state, m_screenPosition, m_position, m_radius, m_rotationAngle, m_force));
}
bool WebPlatformTouchPoint::decode(CoreIPC::ArgumentDecoder* decoder, WebPlatformTouchPoint& t)
{
- return decoder->decode(CoreIPC::Out(t.m_id, t.m_state, t.m_screenPosition, t.m_position));
+ return decoder->decode(CoreIPC::Out(t.m_id, t.m_state, t.m_screenPosition, t.m_position, t.m_radius, t.m_rotationAngle, t.m_force));
}
} // namespace WebKit