editing/firstPositionInNode-crash.html in crashing in Debug
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Oct 2019 23:29:25 +0000 (23:29 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Oct 2019 23:29:25 +0000 (23:29 +0000)
commit9116660567d8b7127d26e17a47a9a56f19541057
treec492c09e41f5d8a8a6e5d5a6b780589847fdf0d5
parent017e990a10ae582a60d46dab1481bf1809cd8ff4
editing/firstPositionInNode-crash.html in crashing in Debug
https://bugs.webkit.org/show_bug.cgi?id=203520

Reviewed by Ryosuke Niwa.

If positionInParentBeforeNode / positionInParentAfterNode on a node and editingIgnoresContent()
returns true for this node's parent, keep traversing ancestors until we find one for which
editingIgnoresContent() returns false.

No new tests, covered by editing/firstPositionInNode-crash.html.

* dom/Position.cpp:
(WebCore::positionInParentBeforeNode):
(WebCore::positionInParentAfterNode):
* dom/Position.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/Position.h