Commit b24859d8 authored by Scott Little's avatar Scott Little Committed by Commit Bot

Revert "Make touchevent timestamp update on every non Stationary touch points"

This reverts commit 2131ec3a.

Reason for revert: Seems to have broken WebKit Linux Leak build.

https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20Leak
https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20Leak/2981

Original change's description:
> Make touchevent timestamp update on every non Stationary touch points
> 
> Touch event's timestamp is set from the |first_touch_pointer_event|'s
> timestamp. But in the case that this touch point is not changing but
> the others changed, this timestamp is not the latest pointerevent's
> timestamp.
> This CL changes it to use the the latest timestamp of the pointerevents
> in |touch_attribute_map|.
> 
> Bug: 973545
> Change-Id: I08be3f58e886f40eca17d515b36ec3a6424a38ef
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1705051
> Reviewed-by: David Bokan <bokan@chromium.org>
> Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
> Commit-Queue: Ella Ge <eirage@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#685612}

TBR=bokan@chromium.org,nzolghadr@chromium.org,eirage@chromium.org

Change-Id: Id5a4657d566006597c9b6db06e3736240899e8ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 973545
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746789Reviewed-by: default avatarScott Little <sclittle@chromium.org>
Commit-Queue: Scott Little <sclittle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685638}
parent a9813b3c
......@@ -244,10 +244,6 @@ WebCoalescedInputEvent TouchEventManager::GenerateWebCoalescedInputEvent() {
event.touches[event.touches_length++] =
CreateWebTouchPointFromWebPointerEvent(touch_pointer_event,
touch_point_attribute->stale_);
if (!touch_point_attribute->stale_) {
event.SetTimeStamp(std::max(event.TimeStamp(),
touch_point_attribute->event_.TimeStamp()));
}
// Only change the touch event type from move. So if we have two pointers
// in up and down state we just set the touch event type to the first one
......
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/testdriver.js"></script>
<script src="../../../resources/testdriver-vendor.js"></script>
<script src="../../../external/wpt/resources/testdriver-actions.js"></script>
<div id="target" style="position:absolute; left:0px; right:0px; width:100%; height:100%; background:green">Target</div>
<script>
var last_event = null;
function handleTouchEvents(e) {
if (last_event) {
t.step(function () {
assert_greater_than(e.timeStamp, last_event.timeStamp)
});
}
last_event = e;
}
function endTest(e) {
if (!e.touches.length) {
t.done();
}
}
let t = async_test("Test touch event timestamp with multiple finger.");
target.addEventListener("touchstart", handleTouchEvents);
target.addEventListener("touchmove", handleTouchEvents);
target.addEventListener("touchend", endTest);
new test_driver.Actions()
.addPointer("pointer1", "touch")
.addPointer("pointer2", "touch")
.pointerMove(0, 0, {origin: target, sourceName: "pointer1"})
.pointerDown({sourceName: "pointer1"})
.pointerMove(10, 10, {origin: target, sourceName: "pointer1"})
.pointerMove(10, 10, {origin: target, sourceName: "pointer2"})
.pointerDown({sourceName: "pointer2"})
.addTick()
.pointerMove(20, 20, {origin: target, sourceName: "pointer2"})
.addTick()
.pointerMove(30, 30, {origin: target, sourceName: "pointer1"})
.addTick()
.pointerMove(40, 40, {origin: target, sourceName: "pointer2"})
.addTick()
.pointerUp({sourceName: "pointer2"})
.pointerUp({sourceName: "pointer1"})
.send();
</script>
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