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-on: https://chromium-review.googlesource.com/c/chromium/src/+/1619042
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661365}
13 files changed