12012-02-26 MORITA Hajime <morrita@google.com>
2
3 Removing <ul>, <li> inside shadow DOM triggers assertion in updateListMarkerNumbers
4 https://bugs.webkit.org/show_bug.cgi?id=72440
5
6 Reviewed by NOBODY (OOPS!).
7
8 This problem was caused by the inconsistent detach order of DOM tree where
9 Element::detach() called ContainerNode::detach() before shadow tree is detached.
10 This resulted the renderer of the element being destroyed even if its children,
11 each of which came from an element in the shadow tree, are alive.
12 In principle, child renderers should be destroyed before its parent.
13
14 This change aligns the detach order with the attach order. The shadow tree is
15 now deatched before parent's ContainerNode::detach() is called.
16
17 Test: fast/dom/shadow/shadow-ul-li.html
18
19 * dom/Element.cpp:
20 (WebCore::Element::detach):
21