Simplify and share selection rect snapping logic

Simplify the logic for pixel snapping a selection rect and share the
implementation across the simple and complex text paths.

BUG=366705
R=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172669 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Include event type name in tracing output for EventDispatcher

R=ojan

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

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