Title: [112113] trunk
Revision
112113
Author
[email protected]
Date
2012-03-26 09:46:17 -0700 (Mon, 26 Mar 2012)

Log 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.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (112112 => 112113)


--- trunk/LayoutTests/ChangeLog	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/ChangeLog	2012-03-26 16:46:17 UTC (rev 112113)
@@ -1,3 +1,28 @@
+2012-03-26  Julien Chaffraix  <[email protected]>
+
+        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  <[email protected]>
 
         Supersede t1504-c543-txt-decor-00-d-g.html with c543-txt-decor-000.html

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (112112 => 112113)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-03-26 16:46:17 UTC (rev 112113)
@@ -4085,8 +4085,7 @@
 // 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-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

Modified: trunk/LayoutTests/platform/chromium-linux/fast/table/colspanMinWidth-vertical-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt (112112 => 112113)


--- trunk/LayoutTests/platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/chromium-win/fast/table/colspanMinWidth-vertical-expected.txt	2012-03-26 16:46:17 UTC (rev 112113)
@@ -18,6 +18,6 @@
                   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

Modified: trunk/LayoutTests/platform/efl/Skipped (112112 => 112113)


--- trunk/LayoutTests/platform/efl/Skipped	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/efl/Skipped	2012-03-26 16:46:17 UTC (rev 112113)
@@ -2694,3 +2694,6 @@
 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

Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (112112 => 112113)


--- trunk/LayoutTests/platform/efl/test_expectations.txt	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt	2012-03-26 16:46:17 UTC (rev 112113)
@@ -153,8 +153,6 @@
 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

Modified: trunk/LayoutTests/platform/gtk/Skipped (112112 => 112113)


--- trunk/LayoutTests/platform/gtk/Skipped	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/gtk/Skipped	2012-03-26 16:46:17 UTC (rev 112113)
@@ -1626,3 +1626,6 @@
 
 # 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

Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (112112 => 112113)


--- trunk/LayoutTests/platform/gtk/test_expectations.txt	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt	2012-03-26 16:46:17 UTC (rev 112113)
@@ -107,8 +107,6 @@
 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

Modified: trunk/LayoutTests/platform/mac/Skipped (112112 => 112113)


--- trunk/LayoutTests/platform/mac/Skipped	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/mac/Skipped	2012-03-26 16:46:17 UTC (rev 112113)
@@ -565,10 +565,6 @@
 # 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 @@
 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

Modified: trunk/LayoutTests/platform/qt/Skipped (112112 => 112113)


--- trunk/LayoutTests/platform/qt/Skipped	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-03-26 16:46:17 UTC (rev 112113)
@@ -2093,6 +2093,8 @@
 # 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/
 # ============================================================================= #

Modified: trunk/LayoutTests/platform/win/Skipped (112112 => 112113)


--- trunk/LayoutTests/platform/win/Skipped	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/LayoutTests/platform/win/Skipped	2012-03-26 16:46:17 UTC (rev 112113)
@@ -1853,9 +1853,6 @@
 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 @@
 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

Modified: trunk/Source/WebCore/ChangeLog (112112 => 112113)


--- trunk/Source/WebCore/ChangeLog	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/Source/WebCore/ChangeLog	2012-03-26 16:46:17 UTC (rev 112113)
@@ -1,3 +1,23 @@
+2012-03-26  Julien Chaffraix  <[email protected]>
+
+        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  <[email protected]>
 
         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}

Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (112112 => 112113)


--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2012-03-26 16:43:20 UTC (rev 112112)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2012-03-26 16:46:17 UTC (rev 112113)
@@ -213,14 +213,8 @@
     // and type=search if the text height is taller than the contentHeight()
     // because of compability.
 
-    LayoutUnit oldHeight = height();
-    computeLogicalHeight();
+    RenderBlock::layoutBlock(false);
 
-    LayoutUnit oldWidth = width();
-    computeLogicalWidth();
-
-    bool relayoutChildren = oldHeight != height() || oldWidth != width();
-
     RenderBox* innerTextRenderer = innerTextElement()->renderBox();
     ASSERT(innerTextRenderer);
     RenderBox* innerBlockRenderer = innerBlockElement() ? innerBlockElement()->renderBox() : 0;
@@ -234,7 +228,8 @@
     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 @@
         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();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to