-
rniwa@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=116468 Reviewed by Andreas Kling. Source/WebCore: Retain the node pointer. Also bail out early if the node was not in the document since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise. Test: editing/selection/contains-node-crash.html * page/DOMSelection.cpp: (WebCore::DOMSelection::containsNode): * page/DOMSelection.h: (DOMSelection): LayoutTests: Add a regression test from https://chromium.googlesource.com/chromium/blink/+/40bb8089352b15dd034641b4c131111cd79b44f1. * editing/selection/contains-node-crash-expected.txt: Added. * editing/selection/contains-node-crash.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
886d1158