| Index: Source/WebCore/rendering/RenderBlock.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderBlock.cpp (revision 114946)
|
| +++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
|
| @@ -1851,14 +1851,22 @@
|
| // block.
|
| if (!child->isRunIn() || !child->childrenInline())
|
| return false;
|
| +
|
| // FIXME: We don't handle non-block elements with run-in for now.
|
| if (!child->isRenderBlock())
|
| - return false;
|
| + return false;
|
| +
|
| // Run-in child shouldn't intrude into the sibling block if it is part of a
|
| // continuation chain. In that case, treat it as a normal block.
|
| if (child->isElementContinuation() || child->virtualContinuation())
|
| return false;
|
|
|
| + // Check if this node is allowed to run-in. E.g. <select> expects its renderer to
|
| + // be a RenderListBox or RenderMenuList, and hence cannot be a RenderInline run-in.
|
| + Node* runInNode = child->node();
|
| + if (runInNode && runInNode->hasTagName(selectTag))
|
| + return false;
|
| +
|
| RenderBlock* blockRunIn = toRenderBlock(child);
|
| RenderObject* curr = blockRunIn->nextSibling();
|
| if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRunIn() || curr->isAnonymous() || curr->isFloatingOrPositioned())
|
| @@ -1880,7 +1888,6 @@
|
| children()->removeChildNode(this, blockRunIn);
|
|
|
| // Create an inline.
|
| - Node* runInNode = blockRunIn->node();
|
| RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? runInNode : document());
|
| inlineRunIn->setStyle(blockRunIn->style());
|
|
|
|
|