Changeset 104140 in webkit


Ignore:
Timestamp:
Jan 5, 2012 4:23:43 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

WebKit adds vertical paddings and borders to the fixed width of CSS tables
https://bugs.webkit.org/show_bug.cgi?id=74955

Patch by Max Vujovic <mvujovic@adobe.com> on 2012-01-05
Reviewed by Julien Chaffraix.

Source/WebCore:

Test: fast/table/css-table-width.html

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::computeLogicalWidth):

Changed the width calculation for CSS tables to take into account horizontal
paddings and borders instead of vertical paddings and borders.

LayoutTests:

Added tests to check that the fixed width style is applied correctly to
CSS tables with respect to table paddings and borders.

  • fast/table/css-table-width-expected.txt: Added.
  • fast/table/css-table-width.html: Added.
  • fast/table/script-tests/css-table-width.js: Added.

(computeCSSTableOffsetWidth):
(computeCSSTableOffsetHeight):
(computeCSSTableProperty):

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r104138 r104140  
     12012-01-05  Max Vujovic  <mvujovic@adobe.com>
     2
     3        WebKit adds vertical paddings and borders to the fixed width of CSS tables
     4        https://bugs.webkit.org/show_bug.cgi?id=74955
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Added tests to check that the fixed width style is applied correctly to
     9        CSS tables with respect to table paddings and borders.
     10
     11        * fast/table/css-table-width-expected.txt: Added.
     12        * fast/table/css-table-width.html: Added.
     13        * fast/table/script-tests/css-table-width.js: Added.
     14        (computeCSSTableOffsetWidth):
     15        (computeCSSTableOffsetHeight):
     16        (computeCSSTableProperty):
     17
    1182012-01-05  Csaba Osztrogonác  <ossy@webkit.org>
    219
  • trunk/Source/WebCore/ChangeLog

    r104139 r104140  
     12012-01-05  Max Vujovic  <mvujovic@adobe.com>
     2
     3        WebKit adds vertical paddings and borders to the fixed width of CSS tables
     4        https://bugs.webkit.org/show_bug.cgi?id=74955
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Test: fast/table/css-table-width.html
     9
     10        * rendering/RenderTable.cpp:
     11        (WebCore::RenderTable::computeLogicalWidth):
     12
     13            Changed the width calculation for CSS tables to take into account horizontal
     14            paddings and borders instead of vertical paddings and borders.
     15
    1162012-01-05  Peter Beverloo  <peter@chromium.org>
    217
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r103875 r104140  
    234234        LayoutUnit borders = 0;
    235235        if (logicalWidthType != Percent && (!node() || !node()->hasTagName(tableTag))) {
    236             bool collapsing = collapseBorders();
    237             LayoutUnit borderAndPaddingBefore = borderBefore() + (collapsing ? 0 : paddingBefore());
    238             LayoutUnit borderAndPaddingAfter = borderAfter() + (collapsing ? 0 : paddingAfter());
    239             borders = borderAndPaddingBefore + borderAndPaddingAfter;
    240         }
     236            recalcBordersInRowDirection();
     237            borders = borderStart() + borderEnd() + (collapseBorders() ? 0 : paddingStart() + paddingEnd());
     238         }
    241239        setLogicalWidth(style()->logicalWidth().calcMinValue(containerWidthInInlineDirection) + borders);
    242240        setLogicalWidth(max(minPreferredLogicalWidth(), logicalWidth()));
Note: See TracChangeset for help on using the changeset viewer.