DescriptionMake rendersInDifferentPosition() to work with AfterAnchor and AfterChildren positions properly
This patch makes |rendersInDifferentPosition()| in |PositionAlgorithm<Strategy>|
to work |AfterAnchor| and |AfterChildren| by replacing comparisons between
|m_offset| and |deprecatedEditingOffset()| to comparing
|deprecatedEditingOffset()|.
Comparing |m_offset| and |deprecatedEditingOffset()| works fine positions
other than |AfterAnchor| and |AfterChildren|, because |m_offset| is zero for
|BeforeAnchor| and |BeforeChild|, they are identical |OffsetInAnchor| postions
with |m_offset| is zero.
It seems comparing |m_offset| and |deprecatedEditingOffset()| are introduced
by accident in https://chromium.googlesource.com/chromium/blink/+/d2a689809b0464553b8c2fb5934c22acc6ab6047
which replace |pos.m_offset| but not |this->m_offset|.
This patch is inspired by a review comment in http://crrev.com/1270023002,
which suggested not to keep this buggy code.
This patch is a preparation of untemplatizing |rendersInDifferentPosition()|
by removing member reference and templatizing |VisiblePosition| class.
BUG=510337
TEST=n/a; no behavior changes
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200145
Patch Set 1 : 2015-08-06T13:43:05 #
Messages
Total messages: 8 (2 generated)
|