REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 16:46:17 +0000 (16:46 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 16:46:17 +0000 (16:46 +0000)
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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/fast/table/colspanMinWidth-vertical-expected.png
LayoutTests/platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/efl/Skipped
LayoutTests/platform/efl/test_expectations.txt
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/gtk/test_expectations.txt
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTextControlSingleLine.cpp

index 632f831..df84d64 100644 (file)
@@ -1,3 +1,28 @@
+2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=80531
+
+        Reviewed by Ojan Vafai.
+
+        * 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.
+
 2012-03-26  SravanKumar Sandela  <ssandela@innominds.com>
 
         Supersede t1504-c543-txt-decor-00-d-g.html with c543-txt-decor-000.html
index 3399396..769986e 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/table/colspanMinWidth-vertical-expected.png and b/LayoutTests/platform/chromium-linux/fast/table/colspanMinWidth-vertical-expected.png differ
index b93d0e4..6b47197 100644 (file)
@@ -18,6 +18,6 @@ layer at (0,0) size 800x600
                   RenderTableRow {TR} at (0,2) size 28x169
                     RenderTableCell {TD} at (2,15) size 28x-24 [bgcolor=#FF00FF] [r=0 c=0 rs=1 cs=1]
                     RenderTableCell {TD} at (2,6) size 28x161 [bgcolor=#FFFF00] [r=0 c=1 rs=1 cs=1]
-                      RenderTextControl {INPUT} at (3,3) size 22x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-                        RenderBlock {DIV} at (2,-64) size 18x149
+                      RenderTextControl {INPUT} at (3,3) size 22x155 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+                        RenderBlock {DIV} at (2,70) size 18x16
                       RenderText {#text} at (0,0) size 0x0
index 67122ad..9915788 100644 (file)
@@ -4085,8 +4085,7 @@ BUGWK75568 SLOW MAC RELEASE : fast/text/textIteratorNilRenderer.html = IMAGE PAS
 // The change should only be layer removal.
 BUGWK75568 : fast/events/mouse-relative-position.html = TEXT
 
-BUGWK80531 : fast/repaint/search-field-cancel.html = TEXT IMAGE+TEXT
-BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
+BUGWK80531 : fast/repaint/search-field-cancel.html = TEXT IMAGE+TEXT IMAGE
 
 // Started failing (returning an empty render tree) at
 // http://trac.webkit.org/changeset/110262; flaky in debug.
@@ -4587,3 +4586,7 @@ BUGWK82122 SNOWLEOPARD : css3/selectors3/xml/css3-modsel-99b.xml = TEXT PASS
 BUGWK82122 SNOWLEOPARD : css3/selectors3/xml/css3-modsel-99.xml = TEXT PASS
 BUGWK82122 SNOWLEOPARD : css3/selectors3/xml/css3-modsel-9.xml = TEXT PASS
 
+// Needs a rebaseline after the bug.
+// The inner <input> should now grow to take the full cell's height.
+BUGWK80531 WIN : fast/table/colspanMinWidth-vertical.html = IMAGE
+BUGWK80531 MAC : fast/table/colspanMinWidth-vertical.html = IMAGE+TEXT
index 4bc1735..97ab7d7 100644 (file)
@@ -2694,3 +2694,6 @@ fast/css/color-correction-on-backgrounds.html
 fast/css/color-correction-on-box-shadow.html
 fast/css/color-correction-on-text-shadow.html
 fast/css/color-correction-untagged-images.html
+
+# The inner <input> should now grow to take the full cell's height.
+fast/table/colspanMinWidth-vertical.html
index e6e0068..90c1e24 100644 (file)
@@ -153,8 +153,6 @@ BUGWK75568 : fast/table/spanOverlapRepaint.html = TEXT
 BUGWK75568 : fast/table/text-field-baseline.html = TEXT
 BUGWK75568 : tables/mozilla/bugs/bug1188.html = TEXT
 
-BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
-
 // Temporary: generate platform specific IETestCenter results, then
 // remove when bots produce reference.
 BUGWK81936 : ietestcenter/css3/text/textshadow-001.htm = FAIL MISSING
index a9052b9..fcd5513 100644 (file)
@@ -1626,3 +1626,6 @@ inspector/debugger/snippets-model.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=82020
 plugins/netscape-dom-access-and-reload.html
+
+# The inner <input> should now grow to take the full cell's height.
+fast/table/colspanMinWidth-vertical.html
index 49d8474..33ae356 100644 (file)
@@ -107,8 +107,6 @@ BUGWK76639 : fast/table/multiple-captions-crash3.html = IMAGE FAIL
 BUGWK79756 : css3/flexbox/inline-flexbox.html = IMAGE FAIL
 BUGWK79757 : fast/selectors/selection-window-inactive.html = IMAGE FAIL
 
-BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
-
 // Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
 BUGWK78412 : tables/mozilla/bugs/bug2123.html = TEXT
 BUGWK78412 : tables/mozilla/bugs/bug2509.html = TEXT
index 91433e2..9b9109a 100644 (file)
@@ -565,10 +565,6 @@ fast/dom/navigator-vibration.html
 # https://bugs.webkit.org/show_bug.cgi?id=78801
 touchadjustment
 
-# http:///webkit.org/b/80531
-# REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
-fast/forms/textfield-overflow.html
-
 # canvas/philip/tests/2d.line.cap.round.html fails on Mac Lion WK1
 # https://bugs.webkit.org/show_bug.cgi?id=81289
 # <rdar://problem/11059777>
@@ -625,3 +621,6 @@ tables/mozilla_expected_failures/bugs/bug7243.html
 fast/repaint/scroll-inside-table-cell.html
 fast/repaint/scroll-relative-table-inside-table-cell.html
 fast/table/cell-pref-width-invalidation.html
+
+# The inner <input> should now grow to take the full cell's height.
+fast/table/colspanMinWidth-vertical.html
index 1166988..4ddc6e6 100644 (file)
@@ -2093,6 +2093,8 @@ tables/mozilla/bugs/bug27038-2.html
 # Needs a rebaseline, caused by https://bugs.webkit.org/show_bug.cgi?id=43022
 tables/mozilla_expected_failures/bugs/bug85016.html
 
+# The inner <input> should now grow to take the full cell's height.
+fast/table/colspanMinWidth-vertical.html
 # ============================================================================= #
 # Failed canvas tests from http://philip.html5.org/tests/canvas/suite/tests/
 # ============================================================================= #
index 1ed96f9..d662775 100644 (file)
@@ -1853,9 +1853,6 @@ fast/table/spanOverlapRepaint.html
 fast/table/text-field-baseline.html
 tables/mozilla/bugs/bug1188.html
 
-# Bug 80531
-fast/forms/textfield-overflow.html
-
 # https://bugs.webkit.org/show_bug.cgi?id=43022
 tables/mozilla_expected_failures/bugs/bug85016.html
 
@@ -1873,3 +1870,6 @@ tables/mozilla_expected_failures/bugs/bug7243.html
 fast/repaint/scroll-inside-table-cell.html
 fast/repaint/scroll-relative-table-inside-table-cell.html
 fast/table/cell-pref-width-invalidation.html
+
+# The inner <input> should now grow to take the full cell's height.
+fast/table/colspanMinWidth-vertical.html
index 35c1665..1de1485 100644 (file)
@@ -1,3 +1,23 @@
+2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=80531
+
+        Reviewed by Ojan Vafai.
+
+        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.
+
 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
 
         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
index 3feceda..a3c128e 100644 (file)
@@ -213,13 +213,7 @@ void RenderTextControlSingleLine::layout()
     // and type=search if the text height is taller than the contentHeight()
     // because of compability.
 
-    LayoutUnit oldHeight = height();
-    computeLogicalHeight();
-
-    LayoutUnit oldWidth = width();
-    computeLogicalWidth();
-
-    bool relayoutChildren = oldHeight != height() || oldWidth != width();
+    RenderBlock::layoutBlock(false);
 
     RenderBox* innerTextRenderer = innerTextElement()->renderBox();
     ASSERT(innerTextRenderer);
@@ -234,7 +228,8 @@ void RenderTextControlSingleLine::layout()
     LayoutUnit heightLimit = (inputElement()->isSearchField() || !container) ? height() : contentHeight();
     if (currentHeight > heightLimit) {
         if (desiredHeight != currentHeight)
-            relayoutChildren = true;
+            setNeedsLayout(true, false);
+
         innerTextRenderer->style()->setHeight(Length(desiredHeight, Fixed));
         m_desiredInnerTextHeight = desiredHeight;
         if (innerBlockRenderer)
@@ -246,15 +241,17 @@ void RenderTextControlSingleLine::layout()
         LayoutUnit containerHeight = containerRenderer->height();
         if (containerHeight > heightLimit) {
             containerRenderer->style()->setHeight(Length(heightLimit, Fixed));
-            relayoutChildren = true;
+            setNeedsLayout(true, false);
         } else if (containerRenderer->height() < contentHeight()) {
             containerRenderer->style()->setHeight(Length(contentHeight(), Fixed));
-            relayoutChildren = true;
+            setNeedsLayout(true, false);
         } else
             containerRenderer->style()->setHeight(Length(containerHeight, Fixed));
     }
 
-    RenderBlock::layoutBlock(relayoutChildren);
+    // If we need another layout pass, we have changed one of children's height so we need to relayout them.
+    if (needsLayout())
+        RenderBlock::layoutBlock(true);
 
     // Center the child block vertically
     currentHeight = innerTextRenderer->height();