Fix an assertion failure in Range::textNodeSplit by Text::splitText.

Range::textNodeSplit is called in Text::splitText, and it assumes the next sibling
node is still a Text node. A DOM mutation event handler can break this assumption.

We had better postpone DOM mutation events dispatched in Node::insertBefore
until exiting splitText to avoid inconsistent Range state.

BUG=240163
TEST=automated.

Review URL: https://chromiumcodereview.appspot.com/14629026

git-svn-id: svn://svn.chromium.org/blink/trunk@150493 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed