right now, ViewportMetrics is needed only for mouse and touch events, so it would be cool to only attach these listeners if those events are bound. definitely fine if we do that in another diff though.