Add DCHECK for Before/After position
This patch adds |DCHECK()| to narrow down the case of returning null from |Position::ComputeContainerNode()| for helping to search the root cause of the bug[1] caused by |ComputeContainerNode()| returning null for non-null position. This patch also changes tests using before/after position of shadow root. Node: document and document fragment, including shadow root, can not be an anchor node of before/after position, since these position can not be represent by RangeBoundaryPoint == container node with offset of child. [1] https://crbug.com/882592 SelectionEditor should not call Node::ContainsIncludingHostElements() with null Bug: 882592, 889737 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I9c7b0c8ad1c97d20a9080aa9baddea69faf805c5 Reviewed-on: https://chromium-review.googlesource.com/1248361Reviewed-by:Kent Tamura <tkent@chromium.org> Reviewed-by:
Yoichi Osato <yoichio@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#594636}
Showing
Please register or sign in to comment