[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 18:19:53 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 47a653de54367b0dc481afcafc70f7ac4652992b
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 5 06:09:23 2010 +0000
2010-03-04 Garret Kelly <gdk at chromium.org>
Reviewed by Darin Fisher.
Changing private members from PlatformTouchEvent and PlatformTouchPoint
to be protected, so that Chromium's PlatformTouchEventBuilder and
PlatformTouchPointBuilder can access them. Exercised by the
fast/events/touch tests.
https://bugs.webkit.org/show_bug.cgi?id=35760
* platform/PlatformTouchEvent.h:
(WebCore::PlatformTouchEvent::~PlatformTouchEvent):
* platform/PlatformTouchPoint.h:
(WebCore::PlatformTouchPoint::~PlatformTouchPoint):
2010-03-04 Garret Kelly <gdk at chromium.org>
Reviewed by Darin Fisher.
Adding PlatformTouchEventBuilder and PlatformTouchPointBuilder for
converting Chromium WebTouchEvent and WebTouchPoint types to
corresponding WebCore types.
https://bugs.webkit.org/show_bug.cgi?id=35760
* src/WebInputEventConversion.cpp:
(WebKit::toPlatformTouchEventType):
(WebKit::toPlatformTouchPointState):
(WebKit::PlatformTouchPointBuilder::PlatformTouchPointBuilder):
(WebKit::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
* src/WebInputEventConversion.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 14c6b51..11f333c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-03-04 Garret Kelly <gdk at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Changing private members from PlatformTouchEvent and PlatformTouchPoint
+ to be protected, so that Chromium's PlatformTouchEventBuilder and
+ PlatformTouchPointBuilder can access them. Exercised by the
+ fast/events/touch tests.
+ https://bugs.webkit.org/show_bug.cgi?id=35760
+
+ * platform/PlatformTouchEvent.h:
+ (WebCore::PlatformTouchEvent::~PlatformTouchEvent):
+ * platform/PlatformTouchPoint.h:
+ (WebCore::PlatformTouchPoint::~PlatformTouchPoint):
+
2010-03-04 Fumitoshi Ukai <ukai at chromium.org>
Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index 0d2d035..45edd00 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -67,7 +67,7 @@ public:
bool shiftKey() const { return m_shiftKey; }
bool metaKey() const { return m_metaKey; }
-private:
+protected:
TouchEventType m_type;
Vector<PlatformTouchPoint> m_touchPoints;
bool m_ctrlKey;
diff --git a/WebCore/platform/PlatformTouchPoint.h b/WebCore/platform/PlatformTouchPoint.h
index d4f855e..c87d066 100644
--- a/WebCore/platform/PlatformTouchPoint.h
+++ b/WebCore/platform/PlatformTouchPoint.h
@@ -55,7 +55,7 @@ public:
IntPoint screenPos() const { return m_screenPos; }
IntPoint pos() const { return m_pos; }
-private:
+protected:
unsigned m_id;
State m_state;
IntPoint m_screenPos;
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 955a40f..180f9bd 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2010-03-04 Garret Kelly <gdk at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Adding PlatformTouchEventBuilder and PlatformTouchPointBuilder for
+ converting Chromium WebTouchEvent and WebTouchPoint types to
+ corresponding WebCore types.
+ https://bugs.webkit.org/show_bug.cgi?id=35760
+
+ * src/WebInputEventConversion.cpp:
+ (WebKit::toPlatformTouchEventType):
+ (WebKit::toPlatformTouchPointState):
+ (WebKit::PlatformTouchPointBuilder::PlatformTouchPointBuilder):
+ (WebKit::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
+ * src/WebInputEventConversion.h:
+
2010-03-04 John Gregg <johnnyg at google.com>
Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/src/WebInputEventConversion.cpp b/WebKit/chromium/src/WebInputEventConversion.cpp
index 147f88b..2406e4a 100644
--- a/WebKit/chromium/src/WebInputEventConversion.cpp
+++ b/WebKit/chromium/src/WebInputEventConversion.cpp
@@ -168,6 +168,63 @@ bool PlatformKeyboardEventBuilder::isCharacterKey() const
return true;
}
+#if ENABLE(TOUCH_EVENTS)
+static inline TouchEventType toPlatformTouchEventType(const WebInputEvent::Type type)
+{
+ switch (type) {
+ case WebInputEvent::TouchStart:
+ return TouchStart;
+ case WebInputEvent::TouchMove:
+ return TouchMove;
+ case WebInputEvent::TouchEnd:
+ return TouchEnd;
+ case WebInputEvent::TouchCancel:
+ return TouchCancel;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+}
+
+static inline PlatformTouchPoint::State toPlatformTouchPointState(const WebTouchPoint::State state)
+{
+ switch (state) {
+ case WebTouchPoint::StateReleased:
+ return PlatformTouchPoint::TouchReleased;
+ case WebTouchPoint::StatePressed:
+ return PlatformTouchPoint::TouchPressed;
+ case WebTouchPoint::StateMoved:
+ return PlatformTouchPoint::TouchMoved;
+ case WebTouchPoint::StateStationary:
+ return PlatformTouchPoint::TouchStationary;
+ case WebTouchPoint::StateCancelled:
+ return PlatformTouchPoint::TouchCancelled;
+ case WebTouchPoint::StateUndefined:
+ ASSERT_NOT_REACHED();
+ }
+}
+
+PlatformTouchPointBuilder::PlatformTouchPointBuilder(Widget* widget, const WebTouchPoint& point)
+{
+ m_id = point.id;
+ m_state = toPlatformTouchPointState(point.state);
+ m_pos = widget->convertFromContainingWindow(point.position);
+ m_screenPos = point.screenPosition;
+}
+
+PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTouchEvent& event)
+{
+ m_type = toPlatformTouchEventType(event.type);
+ m_ctrlKey = event.modifiers & WebInputEvent::ControlKey;
+ m_altKey = event.modifiers & WebInputEvent::AltKey;
+ m_shiftKey = event.modifiers & WebInputEvent::ShiftKey;
+ m_metaKey = event.modifiers & WebInputEvent::MetaKey;
+
+ m_touchPoints.resize(event.touchPointsLength);
+ for (int i = 0; i < event.touchPointsLength; ++i)
+ m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touchPoints[i]));
+}
+#endif
+
static int getWebInputModifiers(const UIEventWithKeyState& event)
{
int modifiers = 0;
diff --git a/WebKit/chromium/src/WebInputEventConversion.h b/WebKit/chromium/src/WebInputEventConversion.h
index 4c9cf82..bf8bb23 100644
--- a/WebKit/chromium/src/WebInputEventConversion.h
+++ b/WebKit/chromium/src/WebInputEventConversion.h
@@ -37,6 +37,7 @@
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
+#include "PlatformTouchEvent.h"
#include "PlatformWheelEvent.h"
namespace WebCore {
@@ -72,6 +73,18 @@ public:
bool isCharacterKey() const;
};
+#if ENABLE(TOUCH_EVENTS)
+class PlatformTouchPointBuilder : public WebCore::PlatformTouchPoint {
+public:
+ PlatformTouchPointBuilder(WebCore::Widget*, const WebTouchPoint&);
+};
+
+class PlatformTouchEventBuilder : public WebCore::PlatformTouchEvent {
+public:
+ PlatformTouchEventBuilder(WebCore::Widget*, const WebTouchEvent&);
+};
+#endif
+
// Converts a WebCore::MouseEvent to a corresponding WebMouseEvent. view is
// the ScrollView corresponding to the event. Returns true if successful.
// NOTE: This is only implemented for mousemove, mouseover, mouseout,
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list