[CSSRegions] Assertion failure in Node::detach (!renderer || renderer->inRenderFlowThread())
https://bugs.webkit.org/show_bug.cgi?id=104517

Patch by Mihai Maerean <mmaerean@adobe.com> on 2013-02-06
Reviewed by Julien Chaffraix.

Source/WebCore:

The RenderObject::inRenderFlowThread bit could have become disconnected from the fact that the RenderObject
has (or not) an enclosing RenderFlowThread.
The cause of this was that, when setting or removing the parent of a RenderObject, the inRenderFlowThread flags
wasn't being set/reset for the children too.
This is now fixed by calling the new setInRenderFlowThreadIncludingDescendants.

The ASSERT was hit for anonymous blocks when detaching the document.

Test: fast/regions/detaching-regions-with-anonymous-blocks.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::setInRenderFlowThreadRecursive):
(WebCore):
* rendering/RenderObject.h:
(WebCore::RenderObject::setParent):
(RenderObject):

LayoutTests:

The test adds an anonymous block in a region and detaches the body of document. The ASSERT is not hit anymore.

* fast/regions/detaching-regions-with-anonymous-blocks-expected.txt: Added.
* fast/regions/detaching-regions-with-anonymous-blocks.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141982 268f45cc-cd09-0410-ab3c-d52691b4dbfc