Changeset 117271 in webkit


Ignore:
Timestamp:
May 16, 2012 5:53:28 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

"border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border
https://bugs.webkit.org/show_bug.cgi?id=67877

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-05-16
Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/css/table-collapsed-borders.html

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::computeCollapsedBeforeBorder):
When getting the previous row group's after border, pass SkipEmptySections as the second param
to the RenderTable::sectionAbove() call. Thus if the currSection is the top most section of the
table passing SkipEmptySections to sectionAbove() would return null which should be the expected
behavior.

(WebCore::RenderTableCell::computeCollapsedAfterBorder):
When getting the following row group's before border, pass SkipEmptySections as the second param
to the RenderTable::sectionBelow() call. Thus if the currSection is the bottom most section of the
table passing SkipEmptySections to sectionBelow() would return null which should be the expected
behavior.

LayoutTests:

  • fast/css/table-collapsed-borders-expected.html: Added.
  • fast/css/table-collapsed-borders.html: Added.

Added new reftest for testing table with collapsed borders.

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117269 r117271  
     12012-05-16  Arpita Bahuguna  <arpitabahuguna@gmail.com>
     2
     3        "border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border
     4        https://bugs.webkit.org/show_bug.cgi?id=67877
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/css/table-collapsed-borders-expected.html: Added.
     9        * fast/css/table-collapsed-borders.html: Added.
     10        Added new reftest for testing table with collapsed borders.
     11
    1122012-05-16  Vsevolod Vlasov  <vsevik@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r117270 r117271  
     12012-05-16  Arpita Bahuguna  <arpitabahuguna@gmail.com>
     2
     3        "border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border
     4        https://bugs.webkit.org/show_bug.cgi?id=67877
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Test: fast/css/table-collapsed-borders.html
     9
     10        * rendering/RenderTableCell.cpp:
     11        (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
     12        When getting the previous row group's after border, pass SkipEmptySections as the second param
     13        to the RenderTable::sectionAbove() call. Thus if the currSection is the top most section of the
     14        table passing SkipEmptySections to sectionAbove() would return null which should be the expected
     15        behavior.
     16
     17        (WebCore::RenderTableCell::computeCollapsedAfterBorder):
     18        When getting the following row group's before border, pass SkipEmptySections as the second param
     19        to the RenderTable::sectionBelow() call. Thus if the currSection is the bottom most section of the
     20        table passing SkipEmptySections to sectionBelow() would return null which should be the expected
     21        behavior.
     22
    1232012-05-16  Pavel Feldman  <pfeldman@chromium.org>
    224
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r116174 r117271  
    605605       
    606606        // (6) Previous row group's after border.
    607         currSection = table->sectionAbove(currSection);
     607        currSection = table->sectionAbove(currSection, SkipEmptySections);
    608608        if (currSection) {
    609609            result = chooseBorder(CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->style()->visitedDependentColor(afterColorProperty) : Color(), BROWGROUP), result);
     
    683683       
    684684        // (6) Following row group's before border.
    685         currSection = table->sectionBelow(currSection);
     685        currSection = table->sectionBelow(currSection, SkipEmptySections);
    686686        if (currSection) {
    687687            result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->style()->visitedDependentColor(beforeColorProperty) : Color(), BROWGROUP));
Note: See TracChangeset for help on using the changeset viewer.