Changeset 133037 in webkit


Ignore:
Timestamp:
Oct 31, 2012 9:32:28 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Table with percentage column widths doesn't scale to fill the entire width of a table containing it
https://bugs.webkit.org/show_bug.cgi?id=11645

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-10-31
Reviewed by Julien Chaffraix.

Source/WebCore:

When the inner (or nested) table has auto width and column(s) with
percent width, we should scale our column(s) to the width of the
containing table (unless it has auto width).

Test: fast/table/scale-nested-percent-width-cols.html

  • rendering/AutoTableLayout.cpp:

(WebCore::shouldScaleColumns):
If the containing table width was of percent type, we were disallowing
our inner or nested table's column from scaling to the size of the parent
table. We should prohibit the scaling of the nested table columns only
if the parent table has auto width.

LayoutTests:

  • fast/table/scale-nested-percent-width-cols-expected.html: Added.
  • fast/table/scale-nested-percent-width-cols.html: Added.

Added a ref test verifying that our nested (auto width) table's columns
are scaled and sized appropriately if the containing table has
percent width.

  • platform/chromium/TestExpectations:
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:

Added an entry for fast/table/025.html for these ports. It would need
rebaselining as a result of this fix.

  • platform/qt/fast/table/025-expected.png:
  • platform/qt/fast/table/025-expected.txt:

Modified expected results for the existing test on qt port.

In the given test, our innermost nested table has auto width and consits
of three table cells with percent width specified for the first and the
third cells. Its containing table on the other hand is a percent width
table.

Previously, we were not scaling our inner table's column(s) from expanding
to the width of the containing table if it had percent width type. Because
of this our first and last table cells in the innermost table were being
rendered only with the minimum width (4px).

Post this fix, since now our inner table columns shall scale, the first and
the last table cell would thus expand in width (41px each) and hence the
change in the column and the table dimensions.

Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r133034 r133037  
     12012-10-31  Arpita Bahuguna  <arpitabahuguna@gmail.com>
     2
     3        Table with percentage column widths doesn't scale to fill the entire width of a table containing it
     4        https://bugs.webkit.org/show_bug.cgi?id=11645
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        * fast/table/scale-nested-percent-width-cols-expected.html: Added.
     9        * fast/table/scale-nested-percent-width-cols.html: Added.
     10        Added a ref test verifying that our nested (auto width) table's columns
     11        are scaled and sized appropriately if the containing table has
     12        percent width.
     13
     14        * platform/chromium/TestExpectations:
     15        * platform/efl/TestExpectations:
     16        * platform/gtk/TestExpectations:
     17        * platform/mac/TestExpectations:
     18        * platform/win/TestExpectations:
     19        Added an entry for fast/table/025.html for these ports. It would need
     20        rebaselining as a result of this fix.
     21
     22        * platform/qt/fast/table/025-expected.png:
     23        * platform/qt/fast/table/025-expected.txt:
     24        Modified expected results for the existing test on qt port.
     25
     26        In the given test, our innermost nested table has auto width and consits
     27        of three table cells with percent width specified for the first and the
     28        third cells. Its containing table on the other hand is a percent width
     29        table.
     30
     31        Previously, we were not scaling our inner table's column(s) from expanding
     32        to the width of the containing table if it had percent width type. Because
     33        of this our first and last table cells in the innermost table were being
     34        rendered only with the minimum width (4px).
     35
     36        Post this fix, since now our inner table columns shall scale, the first and
     37        the last table cell would thus expand in width (41px each) and hence the
     38        change in the column and the table dimensions.
     39
    1402012-10-31  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
    241
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r133002 r133037  
    40034003webkit.org/b/98275 media/event-queue-crash.html [ Skip ]
    40044004
     4005# Requires rebaselining after https://bugs.webkit.org/show_bug.cgi?id=11645
     4006webkit.org/b/11645 fast/table/025.html [ Failure ]
     4007
    40054008# These are real failues due to 95121.
    40064009# This is spilling caused by LANCZOS3 scaling algorithm that samples outside the source rect.
  • trunk/LayoutTests/platform/efl/TestExpectations

    r133034 r133037  
    16311631Bug(EFL) editing/pasteboard/emacs-ctrl-k-y-001.html [ Missing ]
    16321632
     1633# Requires rebaselining after https://bugs.webkit.org/show_bug.cgi?id=11645
     1634webkit.org/b/11645 fast/table/025.html [ Failure ]
     1635
    16331636# Cairo 1.12.4 regressions
    16341637webkit.org/b/99189 fast/backgrounds/background-leakage-transforms.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r133030 r133037  
    14101410webkit.org/b/98613 css3/masking/clip-path-reference.html [ ImageOnlyFailure ]
    14111411
     1412# Requires rebaselining after https://bugs.webkit.org/show_bug.cgi?id=11645
     1413webkit.org/b/11645 fast/table/025.html [ Failure ]
     1414
    14121415# New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
    14131416webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
  • trunk/LayoutTests/platform/mac/TestExpectations

    r133030 r133037  
    13191319webkit.org/b/27684 compositing/text-on-scaled-surface.html [ ImageOnlyFailure ]
    13201320
     1321# Requires rebaselining after https://bugs.webkit.org/show_bug.cgi?id=11645
     1322webkit.org/b/11645 fast/table/025.html [ Failure ]
     1323
    13211324# Asserts in MessagePort::contextDestroyed, but the assert usually gets attributed to later tests.
    13221325webkit.org/b/94458 fast/events/message-port-constructor-for-deleted-document.html
  • trunk/LayoutTests/platform/qt/fast/table/025-expected.txt

    r122985 r133037  
    1515                  RenderTableRow {TR} at (0,2) size 332x31
    1616                    RenderTableCell {TD} at (2,2) size 328x31 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
    17                       RenderTable {TABLE} at (2,2) size 250x27
    18                         RenderTableSection {TBODY} at (0,0) size 250x27
    19                           RenderTableRow {TR} at (0,2) size 250x23
    20                             RenderTableCell {TD} at (2,11) size 4x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
    21                             RenderTableCell {TD} at (8,2) size 234x23 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=2]
     17                      RenderTable {TABLE} at (2,2) size 324x27
     18                        RenderTableSection {TBODY} at (0,0) size 324x27
     19                          RenderTableRow {TR} at (0,2) size 324x23
     20                            RenderTableCell {TD} at (2,11) size 41x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
     21                            RenderTableCell {TD} at (45,2) size 234x23 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=2]
    2222                              RenderImage {IMG} at (2,2) size 21x15 [bgcolor=#800080]
    2323                              RenderText {#text} at (23,2) size 4x19
     
    3636                              RenderText {#text} at (228,2) size 4x19
    3737                                text run at (228,2) width 4: " "
    38                             RenderTableCell {TD} at (244,11) size 4x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
     38                            RenderTableCell {TD} at (281,11) size 41x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
    3939            RenderTableCell {TD} at (548,0) size 236x42 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=2 rs=1 cs=1]
    4040              RenderTable {TABLE} at (4,4) size 228x34
     
    6060                  RenderTableRow {TR} at (0,2) size 321x31
    6161                    RenderTableCell {TD} at (2,2) size 317x31 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
    62                       RenderTable {TABLE} at (2,2) size 250x27
    63                         RenderTableSection {TBODY} at (0,0) size 250x27
    64                           RenderTableRow {TR} at (0,2) size 250x23
    65                             RenderTableCell {TD} at (2,11) size 4x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
    66                             RenderTableCell {TD} at (8,2) size 234x23 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=2]
     62                      RenderTable {TABLE} at (2,2) size 313x27
     63                        RenderTableSection {TBODY} at (0,0) size 313x27
     64                          RenderTableRow {TR} at (0,2) size 313x23
     65                            RenderTableCell {TD} at (2,11) size 35x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
     66                            RenderTableCell {TD} at (39,2) size 234x23 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=2]
    6767                              RenderImage {IMG} at (2,2) size 21x15 [bgcolor=#800080]
    6868                              RenderText {#text} at (23,2) size 4x19
     
    8181                              RenderText {#text} at (228,2) size 4x19
    8282                                text run at (228,2) width 4: " "
    83                             RenderTableCell {TD} at (244,11) size 4x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
     83                            RenderTableCell {TD} at (275,11) size 36x4 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
    8484            RenderTableCell {TD} at (548,0) size 236x42 [bgcolor=#FFA500] [border: (1px solid #000000)] [r=0 c=2 rs=1 cs=1]
    8585              RenderTable {TABLE} at (4,4) size 228x34
  • trunk/LayoutTests/platform/win/TestExpectations

    r133030 r133037  
    23582358http/tests/inspector/stacktraces
    23592359
     2360# Requires rebaselining after https://bugs.webkit.org/show_bug.cgi?id=11645
     2361webkit.org/b/11645 fast/table/025.html [ Failure ]
     2362
    23602363# HIDDEN_PAGE_DOM_TIMER_THROTTLING is disabled
    23612364fast/dom/timer-throttling-hidden-page.html
  • trunk/Source/WebCore/ChangeLog

    r133033 r133037  
     12012-10-31  Arpita Bahuguna  <arpitabahuguna@gmail.com>
     2
     3        Table with percentage column widths doesn't scale to fill the entire width of a table containing it
     4        https://bugs.webkit.org/show_bug.cgi?id=11645
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        When the inner (or nested) table has auto width and column(s) with
     9        percent width, we should scale our column(s) to the width of the
     10        containing table (unless it has auto width).
     11
     12        Test: fast/table/scale-nested-percent-width-cols.html
     13
     14        * rendering/AutoTableLayout.cpp:
     15        (WebCore::shouldScaleColumns):
     16        If the containing table width was of percent type, we were disallowing
     17        our inner or nested table's column from scaling to the size of the parent
     18        table. We should prohibit the scaling of the nested table columns only
     19        if the parent table has auto width.
     20
    1212012-10-31  Ian Vollick  <vollick@chromium.org>
    222
  • trunk/Source/WebCore/rendering/AutoTableLayout.cpp

    r132641 r133037  
    197197            if (cb && cb->isTableCell() &&
    198198                (cb->style()->width().isAuto() || cb->style()->width().isPercent())) {
    199                 if (tw.isPercent())
     199                RenderTableCell* cell = toRenderTableCell(cb);
     200                if (cell->colSpan() > 1 || cell->table()->style()->width().isAuto())
    200201                    scale = false;
    201                 else {
    202                     RenderTableCell* cell = toRenderTableCell(cb);
    203                     if (cell->colSpan() > 1 || cell->table()->style()->width().isAuto())
    204                         scale = false;
    205                     else
    206                         table = cell->table();
    207                 }
     202                else
     203                    table = cell->table();
    208204            }
    209205        }
Note: See TracChangeset for help on using the changeset viewer.