Commit f3449e0d authored by schenney@chromium.org's avatar schenney@chromium.org

Add a null check for the target node in page_click_tracker.

Events arising from clicks on instance elements in SVG <use> trees may have their
target changed when the instance tree is rebuilt during event processing. In this
case the toNode() call will return NULL for the target.

BUG=171363

Review URL: https://chromiumcodereview.appspot.com/12248003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182049 0039d316-1c4b-4281-b951-d872f2087c98
parent fe1ef4a8
......@@ -132,6 +132,10 @@ void PageClickTracker::handleEvent(const WebDOMEvent& event) {
// We'll get a notification once the mouse event has been processed
// (DidHandleMouseEvent), we'll notify the listener at that point.
WebNode node = mouse_event.target();
if (node.isNull())
// Node may be null if the target was an SVG instance element from a <use>
// tree and the tree has been rebuilt due to an earlier event.
return;
HandleTextFieldMaybeLosingFocus(node);
......
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