Update distribution between a mouseup event dispatching and a click event dispatching to avoid dirty distribution.

Since a mouseup (or mousedown) event listener can make the distribution dirty, we have to update distribution
before calling Node::commonAncestor(). Unless that, we could hit ASSERT in NodeRenderingTravesal::parent() due to the dirty distribution.

TEST=manually tested using the case in the bug, in addition to the new layout test
BUG=417064

Review URL: https://codereview.chromium.org/645543002

git-svn-id: svn://svn.chromium.org/blink/trunk@183513 bbb929c8-8fbe-4397-9dbb-9b2b20218538