| Index: Source/core/rendering/RenderBlock.cpp
|
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
|
| index 2d0e66f81a8c87a706952ff95a8683d1e81f19b1..c6ea8cd72040263ac6e7ad8fc77bb39e50d70c96 100644
|
| --- a/Source/core/rendering/RenderBlock.cpp
|
| +++ b/Source/core/rendering/RenderBlock.cpp
|
| @@ -4219,21 +4219,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();
|
|
|