LayoutTests:

        Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
        REGRESSION: Read only input text field renders at the wrong height when value attribute is not present

        * fast/forms/input-readonly-empty-expected.checksum: Added.
        * fast/forms/input-readonly-empty-expected.png: Added.
        * fast/forms/input-readonly-empty-expected.txt: Added.
        * fast/forms/input-readonly-empty.html: Added.

WebCore:

        Reviewed by Hyatt.

        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
        REGRESSION: Read only input text field renders at the wrong height when value attribute is not present

        Test: fast/forms/input-readonly-empty.html

        * rendering/RenderBlock.h: Added hasLineIfEmpty.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::hasLineIfEmpty): Added.  Checks for rootEditableElement as well as 
         a shadowNode who has an input element as a parent.
        (WebCore::RenderBlock::getBaselineOfLastLineBox): Calls hasLineIfEmpty instead of just checking for the rootEditableElement.
        * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index 978a635..2b2feac 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -1722,7 +1722,7 @@
             repaintRect.intersect(IntRect(0, 0, m_width, m_height));
     }
 
-    if (!firstLineBox() && element() && element()->isContentEditable() && element()->rootEditableElement() == element())
+    if (!firstLineBox() && hasLineIfEmpty())
         m_height += lineHeight(true);
 
     // See if we have any lines that spill out of our block.  If we do, then we will possibly need to