Don't call Document::nodeWillRemoved() with a node in different document

This patch changes |ContainerNode::willRemoveChild()| not to call
|Document::nodeWillRemoved()| for a node in different document since we
assume |Document::nodeWillRemoved()| will be called for owner document.

This situation can be happened when DOM mutation event handler moves
a removing node to another document via |dispatchChildRemovalEvents()| call in
|ContainerNode::willRemoveChild()| at L439.

BUG=477584
TEST=LayoutTests/fast/dom/Range/range-dom-node-removed-assert.html

Review URL: https://codereview.chromium.org/1297593004

git-svn-id: svn://svn.chromium.org/blink/trunk@200791 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed
tree: 8e55a2fa52ee766f70c7ede768f0129d5dcba155
  1. third_party/