Fix the line truncation function for Emerson so that at the far left setting of...
[WebKit-https.git] / WebCore / khtml / rendering / render_block.cpp
index b3a7a233ff28496056183e828b9900263044c54e..e58860ac00663b680f21d41475cb4672c2de8616 100644 (file)
@@ -2881,13 +2881,19 @@ int getHeightForLineCount(RenderBlock* block, int l, bool includeBottom, int& co
             }
         }
         else {
+            RenderObject* normalFlowChildWithoutLines = 0;
             for (RenderObject* obj = block->firstChild(); obj; obj = obj->nextSibling()) {
                 if (shouldCheckLines(obj)) {
                     int result = getHeightForLineCount(static_cast<RenderBlock*>(obj), l, false, count);
                     if (result != -1)
                         return result + obj->yPos() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : 0);
                 }
+                else if (!obj->isFloatingOrPositioned() && !obj->isCompact() && !obj->isRunIn())
+                    normalFlowChildWithoutLines = obj;
             }
+            if (normalFlowChildWithoutLines && l == 0)
+                return normalFlowChildWithoutLines->yPos() + normalFlowChildWithoutLines->height() + 
+                    (includeBottom ? (block->borderBottom() + block->paddingBottom()) : 0);
         }
     }