Flip vertical-rl coordinates for Legacy compat

Bug: vertical-rl block layout looked identical to vertical-lr

Cause: LegacyLayout expects vertical-rl coordinates to be flipped @#$@$@!

Fix: Flip coordinates of vertical-rl blocks before setting X/Y

Personally, I'd love to eliminate legacy flipping, but it sounds like it'll be a boatload of work.

For context, here is what I've learned from kojii:
>>>>>
In legacy, we layout as if it's vertical-lr, then flip X. Ojan wanted to eliminate this flipping, because it's a source of bugs for paint and make code harder to read, since we need to apply different logic depending on whether the code runs before the flip and after the flip. Walter tried to do this before but it was too much work.

From you question, I guess we haven't come up with the strategy how to handle this?

I can only think two options:
Flip as the legacy does.
Allow block progression to grow in negative direction. We still don't know the right position before layout, so we need to shift after the layout.
#2 is cleaner and can eliminate flipping, but we need to allow block progression to grow in negative direction. I haven't really given enough thoughts which is better.
<<<<<
BUG=635619

Review-Url: https://codereview.chromium.org/2709103010
Cr-Commit-Position: refs/heads/master@{#453009}
1 file changed