summaryrefslogtreecommitdiffstats
path: root/content/port
diff options
context:
space:
mode:
Diffstat (limited to 'content/port')
-rw-r--r--content/port/browser/event_with_latency_info.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/content/port/browser/event_with_latency_info.h b/content/port/browser/event_with_latency_info.h
index d746ce2..c0da186 100644
--- a/content/port/browser/event_with_latency_info.h
+++ b/content/port/browser/event_with_latency_info.h
@@ -36,7 +36,12 @@ class EventWithLatencyInfo {
void CoalesceWith(const EventWithLatencyInfo& other) {
WebInputEventTraits::Coalesce(other.event, &event);
- latency.MergeWith(other.latency);
+ // When coalescing two input events, we keep the oldest LatencyInfo
+ // for Telemetry latency test since it will represent the longest
+ // latency.
+ if (other.latency.trace_id >= 0 &&
+ (latency.trace_id < 0 || other.latency.trace_id < latency.trace_id))
+ latency = other.latency;
}
};