DescriptionUntangle multicol coordinate space conversion from offsetFromContainer().
The various offsetFromContainer() implementations used to convert from flow
thread coordinates to visual coordinates if the container was a flow thread.
That works when mapping a position relatively to some ancestor, but not when
mapping a position relatively to some descendant. Put differently: It works
fine when walking upwards in a tree, but not so fine when walking it downwards
(we need the opposite operation in that case; convert from visual to flow
thread coordinates). That was the reason for some mess in mapAncestorToLocal(),
since we had to cancel out the shenanigans carried out by
offsetFromContainer().
So, instead, perform this flowthread-to-visual coordinate space conversion
where we need it, and don't cause trouble for those who don't need it.
No behavior changes intended. This is also why we're keeping this coordinate
space conversion in CaretBase for now, even if it's wrong (see bug 596070).
Simply removing that *now* wouldn't fix the bug anyway, just alter it (probably
for the better, but who knows -- still buggy). A proper fix will land shortly.
BUG=568492
R=leviw@chromium.org
Committed: https://crrev.com/4daee13be8513a6130f1111e7cd4d573329a70c5
Cr-Commit-Position: refs/heads/master@{#382153}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Address code review comment. #Messages
Total messages: 10 (4 generated)
|