Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 10155016: Merge 112973 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/runin/select-runin-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlock.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlock.cpp (revision 114944)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -1776,14 +1776,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())
@@ -1805,7 +1813,6 @@
children()->removeChildNode(this, blockRunIn);
// Create an inline.
- Node* runInNode = blockRunIn->node();
RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? runInNode : document());
inlineRunIn->setStyle(blockRunIn->style());
« no previous file with comments | « LayoutTests/fast/runin/select-runin-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698