Use IsValidFor instead of IsConnected in DeleteSelectionCommand
IsConnected checks if the anchor node is connected in DOM/FLAT tree, while IsValidFor check if the position is in the same document. HandleGeneralDelete can cause DOM mutation and hence can move out of the document. Therefore we should use IsValidFor. This CL changes IsConnected to IsValidFor to cover all the scenarios. Bug: 794282 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I72268bfe1e275e40768aaf7f8e875e20b99f6460 Reviewed-on: https://chromium-review.googlesource.com/c/1286242Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Tanvir Rizvi <tanvir.rizvi@samsung.com> Cr-Commit-Position: refs/heads/master@{#600672}
Showing
Please register or sign in to comment