Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1195)

Issue 1272973002: Make rendersInDifferentPosition() to work with AfterAnchor and AfterChildren positions properly (Closed)

Created:
5 years, 4 months ago by yosin_UTC9
Modified:
5 years, 4 months ago
Reviewers:
tkent, yoichio
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -2 lines) Patch
M Source/core/dom/Position.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/dom/PositionTest.cpp View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
yosin_UTC9
PTAL
5 years, 4 months ago (2015-08-06 05:44:53 UTC) #2
yosin_UTC9
ping...
5 years, 4 months ago (2015-08-07 01:51:51 UTC) #3
yoichio
lgtm
5 years, 4 months ago (2015-08-07 02:13:37 UTC) #4
tkent
lgtm
5 years, 4 months ago (2015-08-07 02:19:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272973002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272973002/1
5 years, 4 months ago (2015-08-07 04:56:10 UTC) #7
commit-bot: I haz the power
5 years, 4 months ago (2015-08-07 05:16:03 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200145

Powered by Google App Engine
This is Rietveld 408576698