Changeset 60060 in webkit


Ignore:
Timestamp:
May 23, 2010 9:39:24 PM (14 years ago)
Author:
morrita@google.com
Message:

2010-05-23 MORITA Hajime <morrita@google.com>

Reviewed by Kent Tamura.

Textarea shouldn't grow when you type.
https://bugs.webkit.org/show_bug.cgi?id=32077

Add test for the case with various type of properties for vertical box size.
including height, min-height, max-height, padding-top/bottom, margin-top/bottom.

  • fast/forms/script-tests/textarea-percentage-dimensions.js: Added. (heightChanged):
  • fast/forms/textarea-percentage-dimensions-expected.txt: Added.
  • fast/forms/textarea-percentage-dimensions.html: Added.

2010-05-23 MORITA Hajime <morrita@google.com>

Reviewed by Kent Tamura.

Textarea shouldn't grow when you type.
https://bugs.webkit.org/show_bug.cgi?id=32077

<textarea> with percent-specified, height-related properties did
cause partial-layout rooted from the renderer, that resulted
different box height between full-layout and partial-layout. This
is because calcHeight() assumes that the layout calculation of the
RenderBlock's parent is ongoing. But this assumption is violated
when the RenderBlock is root of the layout calculation.

So we prevent such <textarea>'s RenderObjects from being layout
root.

Test: fast/forms/textarea-percentage-dimensions.html

  • rendering/RenderObject.h: (WebCore::objectIsRelayoutBoundary):
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r60059 r60060  
     12010-05-23  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Textarea shouldn't grow when you type.
     6        https://bugs.webkit.org/show_bug.cgi?id=32077
     7
     8        Add test for the case with various type of properties for vertical box size.
     9        including height, min-height, max-height, padding-top/bottom, margin-top/bottom.
     10       
     11        * fast/forms/script-tests/textarea-percentage-dimensions.js: Added.
     12        (heightChanged):
     13        * fast/forms/textarea-percentage-dimensions-expected.txt: Added.
     14        * fast/forms/textarea-percentage-dimensions.html: Added.
     15
    1162010-05-23  Tony Chang  <tony@chromium.org>
    217
  • trunk/WebCore/ChangeLog

    r60057 r60060  
     12010-05-23  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Textarea shouldn't grow when you type.
     6        https://bugs.webkit.org/show_bug.cgi?id=32077
     7
     8        <textarea> with percent-specified, height-related properties did
     9        cause partial-layout rooted from the renderer, that resulted
     10        different box height between full-layout and partial-layout. This
     11        is because calcHeight() assumes that the layout calculation of the
     12        RenderBlock's parent is ongoing. But this assumption is violated
     13        when the RenderBlock is root of the layout calculation.
     14       
     15        So we prevent such <textarea>'s RenderObjects from being layout
     16        root.
     17
     18        Test: fast/forms/textarea-percentage-dimensions.html
     19
     20        * rendering/RenderObject.h:
     21        (WebCore::objectIsRelayoutBoundary):
     22
    1232010-05-23  Sam Weinig  <sam@webkit.org>
    224
  • trunk/WebCore/rendering/RenderObject.h

    r60013 r60060  
    976976    // FIXME: In future it may be possible to broaden this condition in order to improve performance.
    977977    // Table cells are excluded because even when their CSS height is fixed, their height()
    978     // may depend on their contents.
    979     return obj->isTextControl()
    980         || (obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->style()->height().isIntrinsicOrAuto() && !obj->style()->height().isPercent() && !obj->isTableCell())
     978    // may also depend on their contents.
     979    bool hasContentsDependHeight = ((obj->style()->height().isIntrinsicOrAuto() || obj->style()->height().isPercent())
     980                                 || (obj->style()->minHeight().isIntrinsicOrAuto() || obj->style()->minHeight().isPercent())
     981                                 || (obj->style()->maxHeight().isIntrinsicOrAuto() || obj->style()->maxHeight().isPercent()));
     982
     983    return !hasContentsDependHeight
     984           && (obj->isTextControl()
     985               || (obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->isTableCell() && !hasContentsDependHeight)
    981986#if ENABLE(SVG)
    982            || obj->isSVGRoot()
    983 #endif
    984            ;
     987               || obj->isSVGRoot()
     988#endif
     989               );
    985990}
    986991
Note: See TracChangeset for help on using the changeset viewer.