Commit 82f3ef43 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Fix DCHECK in LocatedEventRetargeter.

The wrong version of this DCHECK slipped by in b2270914

Bug: 640365
Change-Id: I9e1922c537851be269f483e98878bb2d200e9260
Reviewed-on: https://chromium-review.googlesource.com/1187712Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585877}
parent 2c731c0f
...@@ -54,11 +54,10 @@ class LocatedEventRetargeter : public ui::EventRewriter { ...@@ -54,11 +54,10 @@ class LocatedEventRetargeter : public ui::EventRewriter {
if (!event.IsLocatedEvent()) if (!event.IsLocatedEvent())
return ui::EVENT_REWRITE_CONTINUE; return ui::EVENT_REWRITE_CONTINUE;
// Before being sent to the rewriters, the event is already cloned which
// strips its EventTarget. The only goal of this EventRewriter is to null
// the target, so there's no need to do anything extra here.
DCHECK(!event.target());
*rewritten_event = ui::Event::Clone(event); *rewritten_event = ui::Event::Clone(event);
// Cloning strips the EventTarget. The only goal of this EventRewriter is to
// null the target, so there's no need to do anything extra here.
DCHECK(!(*rewritten_event)->target());
return ui::EVENT_REWRITE_REWRITTEN; return ui::EVENT_REWRITE_REWRITTEN;
} }
......
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