Unschedule the SVG filter layer update hack after detaching children
This patch fixes a crash where an element is scheduled for an update
while being detached.
When an element is being detached it would clear the update flag then
detach its children. This is problematic because children can set the
update flag on elements during detach (which is expected). If a child
sets an element as needing an update while that element is being
detached, we'll end up with a detached element that needs a filter update
which can make Document::dirtyElementsForLayerUpdate angry.
When scheduling, we check that an element does not need an attach
(which would handle the filter layer update) before actually scheduling.
This patch moves unscheduling after the element is in a needsAttach state.
Looking forward to removing this hack entirely..
R=esprehn
BUG=429666
Review URL: https://codereview.chromium.org/742693002
git-svn-id: svn://svn.chromium.org/blink/trunk@185670 bbb929c8-8fbe-4397-9dbb-9b2b20218538