[editing] Fix DCHECK failure in ToPositionInFlatTree
A Shadow DOM V0 insertion point can't participate in the flat tree, so attempting to convert a Position with such an anchor node into a PositionInFlatTree used to produce a DCHECK failure. This patch makes ToPositionInFlatTree use a position with the parent node, if the given one is a V0 insertion point. Bug: 1151536 Test=PositionTest.ToPositionInFlatTreeWithV0InsertionPoint1 Test=PositionTest.ToPositionInFlatTreeWithV0InsertionPoint2 Test=PositionTest.ToPositionInFlatTreeWithV0InsertionPoint3 Change-Id: I2d823294ed092ceb7dca4cd708fd75eca5a55f92 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551131 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#830527}
Showing
Please register or sign in to comment