Use physical coordinates for caret rect

By making caret rects using PhysicalRect, we avoid back-and-forth
flipping for LayoutNG which was to adapt to legacy, and make it clear
of caret rect's coordinate space.

Temporary flippings are added before some mapping functions which still
require flipped blocks direction. They will be removed soon when we
make all mapping functions use pure physical coordinates.

Change-Id: Ia8ccd5ca5ae1ca360822637c8946ae4809b4ca79
Reviewed-by: Yoshifumi Inoue <>
Commit-Queue: Xianzhu Wang <>
Cr-Commit-Position: refs/heads/master@{#661365}
13 files changed