Skip to content

Commit

Permalink
WebKit roll to 94745 with touch patch by abarth
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100125 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
loislo@chromium.org committed Sep 8, 2011
1 parent 9fb225f commit ddf28e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vars = {
"googlecode_url": "http://%s.googlecode.com/svn",
"webkit_trunk": "http://svn.webkit.org/repository/webkit/trunk",
"nacl_trunk": "http://src.chromium.org/native_client/trunk",
"webkit_revision": "94678",
"webkit_revision": "94745",
"chromium_git": "http://git.chromium.org/git",
"swig_revision": "69281",
"nacl_revision": "6641",
Expand Down
26 changes: 13 additions & 13 deletions chrome/browser/renderer_host/render_widget_host_view_views_touch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ ui::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(
switch (event.type()) {
case ui::ET_TOUCH_PRESSED:
// Add a new touch point.
if (touch_event_.touchPointsLength <
WebTouchEvent::touchPointsLengthCap) {
point = &touch_event_.touchPoints[touch_event_.touchPointsLength++];
if (touch_event_.touchesLength <
WebTouchEvent::touchesLengthCap) {
point = &touch_event_.touches[touch_event_.touchesLength++];
point->id = event.identity();

if (touch_event_.touchPointsLength == 1) {
if (touch_event_.touchesLength == 1) {
// A new touch sequence has started.
status = ui::TOUCH_STATUS_START;

Expand All @@ -114,8 +114,8 @@ ui::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(
// _PRESSED event. So find that.
// At the moment, only a maximum of 4 touch-points are allowed. So a
// simple loop should be sufficient.
for (int i = 0; i < touch_event_.touchPointsLength; ++i) {
point = touch_event_.touchPoints + i;
for (int i = 0; i < touch_event_.touchesLength; ++i) {
point = touch_event_.touches + i;
if (point->id == event.identity()) {
break;
}
Expand Down Expand Up @@ -149,8 +149,8 @@ ui::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(
UpdateTouchPointPosition(&event, GetMirroredPosition(), point);

// Mark the rest of the points as stationary.
for (int i = 0; i < touch_event_.touchPointsLength; ++i) {
WebKit::WebTouchPoint* iter = touch_event_.touchPoints + i;
for (int i = 0; i < touch_event_.touchesLength; ++i) {
WebKit::WebTouchPoint* iter = touch_event_.touches + i;
if (iter != point) {
iter->state = WebKit::WebTouchPoint::StateStationary;
}
Expand All @@ -165,13 +165,13 @@ ui::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(

// If the touch was released, then remove it from the list of touch points.
if (event.type() == ui::ET_TOUCH_RELEASED) {
--touch_event_.touchPointsLength;
for (int i = point - touch_event_.touchPoints;
i < touch_event_.touchPointsLength;
--touch_event_.touchesLength;
for (int i = point - touch_event_.touches;
i < touch_event_.touchesLength;
++i) {
touch_event_.touchPoints[i] = touch_event_.touchPoints[i + 1];
touch_event_.touches[i] = touch_event_.touches[i + 1];
}
if (touch_event_.touchPointsLength == 0)
if (touch_event_.touchesLength == 0)
status = ui::TOUCH_STATUS_END;
} else if (event.type() == ui::ET_TOUCH_CANCELLED) {
status = ui::TOUCH_STATUS_CANCEL;
Expand Down

0 comments on commit ddf28e3

Please sign in to comment.