Changeset 109503 in webkit


Ignore:
Timestamp:
Mar 1, 2012 9:43:01 PM (12 years ago)
Author:
tkent@chromium.org
Message:

REGRESSION(90089): Input type='search' text shakes up and down when the style is changed.
https://bugs.webkit.org/show_bug.cgi?id=79445

Reviewed by Dimitri Glazkov.

Source/WebCore:

If the inner text height of a search field is smaller than the
content box height of the <input>, the height of the container
element should be same as the content box height.

When the element style is changed, the RenderStyle height of the
container element is cleared, but the renderer height of the
container element remains. We had a bug that layout() didn't set
the RenderStyle height in a case that the renderer height was the
desired height. It shrunk the renderer height as the result of
layout for children.

Tests: fast/forms/search/search-shaking-text.html

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):
Always set the RenderStyle height explicitly.

LayoutTests:

  • fast/forms/search/search-shaking-text-expected.html: Added.
  • fast/forms/search/search-shaking-text.html: Added.
  • platform/chromium/test_expectations.txt: This change might need a rebaseline of fast/repaint/search-field-cancel.html
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109501 r109503  
     12012-03-01  Kent Tamura  <tkent@chromium.org>
     2
     3        REGRESSION(90089): Input type='search' text shakes up and down when the style is changed.
     4        https://bugs.webkit.org/show_bug.cgi?id=79445
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        * fast/forms/search/search-shaking-text-expected.html: Added.
     9        * fast/forms/search/search-shaking-text.html: Added.
     10        * platform/chromium/test_expectations.txt:
     11         This change might need a rebaseline of fast/repaint/search-field-cancel.html
     12
    1132012-03-01  Kentaro Hara  <haraken@chromium.org>
    214
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r109492 r109503  
    42614261BUGWK78902 : svg/zoom/page/zoom-mask-with-percentages.svg = TEXT IMAGE IMAGE+TEXT PASS
    42624262
     4263BUGWK79445 LINUX WIN : fast/repaint/search-field-cancel.html = FAIL
     4264
    42634265// Need rebaselining.
    42644266BUGWK69210 MAC : fast/encoding/utf-16-big-endian.html = IMAGE+TEXT
  • trunk/Source/WebCore/ChangeLog

    r109502 r109503  
     12012-03-01  Kent Tamura  <tkent@chromium.org>
     2
     3        REGRESSION(90089): Input type='search' text shakes up and down when the style is changed.
     4        https://bugs.webkit.org/show_bug.cgi?id=79445
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        If the inner text height of a search field is smaller than the
     9        content box height of the <input>, the height of the container
     10        element should be same as the content box height.
     11
     12        When the element style is changed, the RenderStyle height of the
     13        container element is cleared, but the renderer height of the
     14        container element remains. We had a bug that layout() didn't set
     15        the RenderStyle height in a case that the renderer height was the
     16        desired height. It shrunk the renderer height as the result of
     17        layout for children.
     18
     19        Tests: fast/forms/search/search-shaking-text.html
     20
     21        * rendering/RenderTextControlSingleLine.cpp:
     22        (WebCore::RenderTextControlSingleLine::layout):
     23        Always set the RenderStyle height explicitly.
     24
    1252012-03-01  Kentaro Hara  <haraken@chromium.org>
    226
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r108382 r109503  
    251251            containerRenderer->style()->setHeight(Length(contentHeight(), Fixed));
    252252            relayoutChildren = true;
    253         }
     253        } else
     254            containerRenderer->style()->setHeight(Length(containerHeight, Fixed));
    254255    }
    255256
Note: See TracChangeset for help on using the changeset viewer.