Changeset 13988 in webkit


Ignore:
Timestamp:
Apr 20, 2006 3:22:14 PM (18 years ago)
Author:
adele
Message:

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.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r13986 r13988  
     12006-04-20  Adele Peterson  <adele@apple.com>
     2
     3        Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
     4        REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
     5
     6        * fast/forms/input-readonly-empty-expected.checksum: Added.
     7        * fast/forms/input-readonly-empty-expected.png: Added.
     8        * fast/forms/input-readonly-empty-expected.txt: Added.
     9        * fast/forms/input-readonly-empty.html: Added.
     10
    1112006-04-19  Adele Peterson  <adele@apple.com>
    212
  • trunk/WebCore/ChangeLog

    r13987 r13988  
     12006-04-20  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Hyatt.
     4
     5        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
     6        REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
     7
     8        Test: fast/forms/input-readonly-empty.html
     9
     10        * rendering/RenderBlock.h: Added hasLineIfEmpty.
     11        * rendering/RenderBlock.cpp:
     12        (WebCore::RenderBlock::hasLineIfEmpty): Added.  Checks for rootEditableElement as well as
     13         a shadowNode who has an input element as a parent.
     14        (WebCore::RenderBlock::getBaselineOfLastLineBox): Calls hasLineIfEmpty instead of just checking for the rootEditableElement.
     15        * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): ditto.
     16
    1172006-04-20  Darin Adler  <darin@apple.com>
    218
  • trunk/WebCore/rendering/RenderBlock.cpp

    r13911 r13988  
    31923192}
    31933193
     3194bool RenderBlock::hasLineIfEmpty() const
     3195{
     3196    return element() && (element()->isContentEditable() && element()->rootEditableElement() == element() ||
     3197                         element()->isShadowNode() && element()->shadowParentNode()->hasTagName(inputTag));
     3198}
     3199
    31943200short RenderBlock::lineHeight(bool b, bool isRootLineBox) const
    31953201{
     
    32603266
    32613267    if (childrenInline()) {
    3262         if (!firstLineBox() && element() && element()->isContentEditable() && element()->rootEditableElement() == element())
     3268        if (!firstLineBox() && hasLineIfEmpty())
    32633269            return RenderFlow::baselinePosition(true) + borderTop() + paddingTop();
    32643270        if (m_lastLineBox)
  • trunk/WebCore/rendering/RenderBlock.h

    r13859 r13988  
    277277    Position positionForRenderer(RenderObject *renderer, bool start=true) const;
    278278   
     279    bool hasLineIfEmpty() const;
     280   
    279281protected:
    280282    struct FloatingObject {
  • trunk/WebCore/rendering/bidi.cpp

    r13971 r13988  
    17231723    }
    17241724
    1725     if (!firstLineBox() && element() && element()->isContentEditable() && element()->rootEditableElement() == element())
     1725    if (!firstLineBox() && hasLineIfEmpty())
    17261726        m_height += lineHeight(true);
    17271727
Note: See TracChangeset for help on using the changeset viewer.