Can we share code with `Browser.calculateMouseEvent`?