Changeset 112113 in webkit


Ignore:
Timestamp:
Mar 26, 2012 9:46:17 AM (12 years ago)
Author:
jchaffraix@webkit.org
Message:

REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
https://bugs.webkit.org/show_bug.cgi?id=80531

Reviewed by Ojan Vafai.

Source/WebCore:

Tested by fast/forms/textfield-overflow.html (re-enabled after this change).

The existing code would happily query layout information before calling layout (FTW!).
The solution is to properly layout our object, then modify some dimensions as needed while
marking ourself as needing layout and then layouting again.

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):
Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:

  • layoutBlock handles automatically logical height changes.
  • we were not modifying the logical width between layouts so we don't need to force a

child relayout in this case.

LayoutTests:

  • platform/chromium-linux/fast/table/colspanMinWidth-vertical-expected.png:
  • platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt:

This is a progression. The <input> now takes the full cell's space instead of
being shrunk.

  • platform/efl/Skipped:
  • platform/efl/test_expectations.txt:
  • platform/gtk/Skipped:
  • platform/gtk/test_expectations.txt:
  • platform/mac/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:

Re-enable fast/forms/textfield-overflow.html as it should be passing.
Also disabled colspanMinWidth-vertical.html on platforms without a rebaseline.

  • platform/chromium/test_expectations.txt:

Ditto and marked fast/repaint/search-field-cancel.html as failing image only.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112112 r112113  
     12012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=80531
     5
     6        Reviewed by Ojan Vafai.
     7
     8        * platform/chromium-linux/fast/table/colspanMinWidth-vertical-expected.png:
     9        * platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt:
     10        This is a progression. The <input> now takes the full cell's space instead of
     11        being shrunk.
     12
     13        * platform/efl/Skipped:
     14        * platform/efl/test_expectations.txt:
     15        * platform/gtk/Skipped:
     16        * platform/gtk/test_expectations.txt:
     17        * platform/mac/Skipped:
     18        * platform/qt/Skipped:
     19        * platform/win/Skipped:
     20        Re-enable fast/forms/textfield-overflow.html as it should be passing.
     21        Also disabled colspanMinWidth-vertical.html on platforms without a rebaseline.
     22
     23        * platform/chromium/test_expectations.txt:
     24        Ditto and marked fast/repaint/search-field-cancel.html as failing image only.
     25
    1262012-03-26  SravanKumar Sandela  <ssandela@innominds.com>
    227
  • trunk/LayoutTests/platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt

    r110179 r112113  
    1919                    RenderTableCell {TD} at (2,15) size 28x-24 [bgcolor=#FF00FF] [r=0 c=0 rs=1 cs=1]
    2020                    RenderTableCell {TD} at (2,6) size 28x161 [bgcolor=#FFFF00] [r=0 c=1 rs=1 cs=1]
    21                       RenderTextControl {INPUT} at (3,3) size 22x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    22                         RenderBlock {DIV} at (2,-64) size 18x149
     21                      RenderTextControl {INPUT} at (3,3) size 22x155 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     22                        RenderBlock {DIV} at (2,70) size 18x16
    2323                      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r112067 r112113  
    40864086BUGWK75568 : fast/events/mouse-relative-position.html = TEXT
    40874087
    4088 BUGWK80531 : fast/repaint/search-field-cancel.html = TEXT IMAGE+TEXT
    4089 BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
     4088BUGWK80531 : fast/repaint/search-field-cancel.html = TEXT IMAGE+TEXT IMAGE
    40904089
    40914090// Started failing (returning an empty render tree) at
     
    45884587BUGWK82122 SNOWLEOPARD : css3/selectors3/xml/css3-modsel-9.xml = TEXT PASS
    45894588
     4589// Needs a rebaseline after the bug.
     4590// The inner <input> should now grow to take the full cell's height.
     4591BUGWK80531 WIN : fast/table/colspanMinWidth-vertical.html = IMAGE
     4592BUGWK80531 MAC : fast/table/colspanMinWidth-vertical.html = IMAGE+TEXT
  • trunk/LayoutTests/platform/efl/Skipped

    r112055 r112113  
    26952695fast/css/color-correction-on-text-shadow.html
    26962696fast/css/color-correction-untagged-images.html
     2697
     2698# The inner <input> should now grow to take the full cell's height.
     2699fast/table/colspanMinWidth-vertical.html
  • trunk/LayoutTests/platform/efl/test_expectations.txt

    r111910 r112113  
    154154BUGWK75568 : tables/mozilla/bugs/bug1188.html = TEXT
    155155
    156 BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
    157 
    158156// Temporary: generate platform specific IETestCenter results, then
    159157// remove when bots produce reference.
  • trunk/LayoutTests/platform/gtk/Skipped

    r112058 r112113  
    16271627# https://bugs.webkit.org/show_bug.cgi?id=82020
    16281628plugins/netscape-dom-access-and-reload.html
     1629
     1630# The inner <input> should now grow to take the full cell's height.
     1631fast/table/colspanMinWidth-vertical.html
  • trunk/LayoutTests/platform/gtk/test_expectations.txt

    r111910 r112113  
    108108BUGWK79757 : fast/selectors/selection-window-inactive.html = IMAGE FAIL
    109109
    110 BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
    111 
    112110// Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
    113111BUGWK78412 : tables/mozilla/bugs/bug2123.html = TEXT
  • trunk/LayoutTests/platform/mac/Skipped

    r111919 r112113  
    566566touchadjustment
    567567
    568 # http:///webkit.org/b/80531
    569 # REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
    570 fast/forms/textfield-overflow.html
    571 
    572568# canvas/philip/tests/2d.line.cap.round.html fails on Mac Lion WK1
    573569# https://bugs.webkit.org/show_bug.cgi?id=81289
     
    626622fast/repaint/scroll-relative-table-inside-table-cell.html
    627623fast/table/cell-pref-width-invalidation.html
     624
     625# The inner <input> should now grow to take the full cell's height.
     626fast/table/colspanMinWidth-vertical.html
  • trunk/LayoutTests/platform/qt/Skipped

    r112107 r112113  
    20942094tables/mozilla_expected_failures/bugs/bug85016.html
    20952095
     2096# The inner <input> should now grow to take the full cell's height.
     2097fast/table/colspanMinWidth-vertical.html
    20962098# ============================================================================= #
    20972099# Failed canvas tests from http://philip.html5.org/tests/canvas/suite/tests/
  • trunk/LayoutTests/platform/win/Skipped

    r112055 r112113  
    18541854tables/mozilla/bugs/bug1188.html
    18551855
    1856 # Bug 80531
    1857 fast/forms/textfield-overflow.html
    1858 
    18591856# https://bugs.webkit.org/show_bug.cgi?id=43022
    18601857tables/mozilla_expected_failures/bugs/bug85016.html
     
    18741871fast/repaint/scroll-relative-table-inside-table-cell.html
    18751872fast/table/cell-pref-width-invalidation.html
     1873
     1874# The inner <input> should now grow to take the full cell's height.
     1875fast/table/colspanMinWidth-vertical.html
  • trunk/Source/WebCore/ChangeLog

    r112110 r112113  
     12012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=80531
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
     9
     10        The existing code would happily query layout information before calling layout (FTW!).
     11        The solution is to properly layout our object, then modify some dimensions as needed while
     12        marking ourself as needing layout and then layouting again.
     13
     14        * rendering/RenderTextControlSingleLine.cpp:
     15        (WebCore::RenderTextControlSingleLine::layout):
     16        Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
     17        - layoutBlock handles automatically logical height changes.
     18        - we were not modifying the logical width between layouts so we don't need to force a
     19        child relayout in this case.
     20
    1212012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
    222
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r111660 r112113  
    214214    // because of compability.
    215215
    216     LayoutUnit oldHeight = height();
    217     computeLogicalHeight();
    218 
    219     LayoutUnit oldWidth = width();
    220     computeLogicalWidth();
    221 
    222     bool relayoutChildren = oldHeight != height() || oldWidth != width();
     216    RenderBlock::layoutBlock(false);
    223217
    224218    RenderBox* innerTextRenderer = innerTextElement()->renderBox();
     
    235229    if (currentHeight > heightLimit) {
    236230        if (desiredHeight != currentHeight)
    237             relayoutChildren = true;
     231            setNeedsLayout(true, false);
     232
    238233        innerTextRenderer->style()->setHeight(Length(desiredHeight, Fixed));
    239234        m_desiredInnerTextHeight = desiredHeight;
     
    247242        if (containerHeight > heightLimit) {
    248243            containerRenderer->style()->setHeight(Length(heightLimit, Fixed));
    249             relayoutChildren = true;
     244            setNeedsLayout(true, false);
    250245        } else if (containerRenderer->height() < contentHeight()) {
    251246            containerRenderer->style()->setHeight(Length(contentHeight(), Fixed));
    252             relayoutChildren = true;
     247            setNeedsLayout(true, false);
    253248        } else
    254249            containerRenderer->style()->setHeight(Length(containerHeight, Fixed));
    255250    }
    256251
    257     RenderBlock::layoutBlock(relayoutChildren);
     252    // If we need another layout pass, we have changed one of children's height so we need to relayout them.
     253    if (needsLayout())
     254        RenderBlock::layoutBlock(true);
    258255
    259256    // Center the child block vertically
Note: See TracChangeset for help on using the changeset viewer.