| Index: Source/core/rendering/RenderBlock.cpp
|
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
|
| index 1c0c79231d9cd6121504a667ced1cfb79d76db6d..0c49fcb0e7e603fc40180ac2d2795519e84c35c6 100644
|
| --- a/Source/core/rendering/RenderBlock.cpp
|
| +++ b/Source/core/rendering/RenderBlock.cpp
|
| @@ -4218,21 +4218,21 @@ static bool shouldCheckLines(RenderObject* obj)
|
| static int getHeightForLineCount(RenderBlock* block, int l, bool includeBottom, int& count)
|
| {
|
| if (block->style()->visibility() == VISIBLE) {
|
| - if (block->childrenInline()) {
|
| - for (RootInlineBox* box = block->firstRootBox(); box; box = box->nextRootBox()) {
|
| + if (block->isRenderBlockFlow() && block->childrenInline()) {
|
| + for (RootInlineBox* box = toRenderBlockFlow(block)->firstRootBox(); box; box = box->nextRootBox()) {
|
| if (++count == l)
|
| return box->lineBottom() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : LayoutUnit());
|
| }
|
| - }
|
| - else {
|
| + } else {
|
| RenderBox* normalFlowChildWithoutLines = 0;
|
| for (RenderBox* obj = block->firstChildBox(); obj; obj = obj->nextSiblingBox()) {
|
| if (shouldCheckLines(obj)) {
|
| int result = getHeightForLineCount(toRenderBlock(obj), l, false, count);
|
| if (result != -1)
|
| return result + obj->y() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : LayoutUnit());
|
| - } else if (!obj->isFloatingOrOutOfFlowPositioned())
|
| + } else if (!obj->isFloatingOrOutOfFlowPositioned()) {
|
| normalFlowChildWithoutLines = obj;
|
| + }
|
| }
|
| if (normalFlowChildWithoutLines && l == 0)
|
| return normalFlowChildWithoutLines->y() + normalFlowChildWithoutLines->height();
|
|
|