Commit f433ac52 authored by Nicolás Peña Moreno's avatar Nicolás Peña Moreno Committed by Commit Bot

[EventTiming] Allow only observing first input

This CL adds a check needed to properly produce first input
events when the PerformanceObserver is only observing
'firstInput' but not 'event'.

Bug: 898484

Change-Id: I8331b0c174a51db65a9388d67054dfbf5a7ecfba
Reviewed-on: https://chromium-review.googlesource.com/c/1296689Reviewed-by: default avatarSteve Kobes <skobes@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602342}
parent fc411e68
...@@ -37,7 +37,8 @@ void EventTiming::WillDispatchEvent(const Event& event) { ...@@ -37,7 +37,8 @@ void EventTiming::WillDispatchEvent(const Event& event) {
// dispatched. // dispatched.
if ((performance_->ShouldBufferEventTiming() && if ((performance_->ShouldBufferEventTiming() &&
!performance_->IsEventTimingBufferFull()) || !performance_->IsEventTimingBufferFull()) ||
performance_->HasObserverFor(PerformanceEntry::kEvent)) { performance_->HasObserverFor(PerformanceEntry::kEvent)
|| performance_->HasObserverFor(PerformanceEntry::kFirstInput)) {
processing_start_ = CurrentTimeTicks(); processing_start_ = CurrentTimeTicks();
finished_will_dispatch_event_ = true; finished_will_dispatch_event_ = true;
} }
......
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