Accurately update Document node counts on disposing shadow roots.
commiteb9932430c3c05f7b38b7a8a8acdc0ffe3f7edd5
authorsigbjornf@opera.com <sigbjornf@opera.com>
Sun, 23 Aug 2015 23:34:27 +0000 (23 23:34 +0000)
committersigbjornf@opera.com <sigbjornf@opera.com>
Sun, 23 Aug 2015 23:34:27 +0000 (23 23:34 +0000)
tree07acf075dc40f65dc9a349248e1dac67632bce0d
parent3f50699a69260e13eb316e75b7a0babab6e9adb3
Accurately update Document node counts on disposing shadow roots.

When cleaning out a ShadowRoot's child Nodes as part of its disposal,
the child Nodes will in some cases not have other references than the
shadow root. If so, the Node will be summarily deleted without being
notified of it being removed from its DOM tree first. By calling its
removedFrom().

As a Document need to maintain an accurate attached node count, arrange
for the otherwise-unreferenced Node's document to be decremented.

R=
BUG=521520

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201044 bbb929c8-8fbe-4397-9dbb-9b2b20218538
third_party/WebKit/Source/core/dom/ContainerNode.cpp
third_party/WebKit/Source/core/dom/Document.cpp