Changeset 24599 in webkit


Ignore:
Timestamp:
Jul 24, 2007 12:03:00 PM (17 years ago)
Author:
bdakin
Message:

LayoutTests:

Reviewed by Darin.

Tests for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION:
ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
column-width

  • fast/multicol/negativeColumnWidth-expected.checksum: Added.
  • fast/multicol/negativeColumnWidth-expected.png: Added.
  • fast/multicol/negativeColumnWidth-expected.txt: Added.
  • fast/multicol/negativeColumnWidth.html: Added.
  • fast/multicol/zeroColumnCount-expected.checksum: Added.
  • fast/multicol/zeroColumnCount-expected.png: Added.
  • fast/multicol/zeroColumnCount-expected.txt: Added.
  • fast/multicol/zeroColumnCount.html: Added.

WebCore:

Reviewed by Darin.

Fix for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION:
ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
column-width

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcColumnWidth): Make 1 the minimum value for column-width and column-count. Since the spec does not address what to do with negative values for these properties, we are patching the rendering code instead of the parser.
Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24582 r24599  
     12007-07-24  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        Tests for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION:
     6        ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
     7        column-width
     8        - and -
     9        http://bugs.webkit.org/show_bug.cgi?id=14718 REGRESSION: ASSERTION
     10        FAILED: i < size() in Vector.h:401 on zero -webkit-column-count
     11
     12        * fast/multicol/negativeColumnWidth-expected.checksum: Added.
     13        * fast/multicol/negativeColumnWidth-expected.png: Added.
     14        * fast/multicol/negativeColumnWidth-expected.txt: Added.
     15        * fast/multicol/negativeColumnWidth.html: Added.
     16        * fast/multicol/zeroColumnCount-expected.checksum: Added.
     17        * fast/multicol/zeroColumnCount-expected.png: Added.
     18        * fast/multicol/zeroColumnCount-expected.txt: Added.
     19        * fast/multicol/zeroColumnCount.html: Added.
     20
    1212007-07-24  Mitz Pettel  <mitz@webkit.org>
    222
  • trunk/WebCore/ChangeLog

    r24596 r24599  
     12007-07-24  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        Fix for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION:
     6        ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
     7        column-width
     8        - and -
     9        http://bugs.webkit.org/show_bug.cgi?id=14718 REGRESSION: ASSERTION
     10        FAILED: i < size() in Vector.h:401 on zero -webkit-column-count
     11
     12        * rendering/RenderBlock.cpp:
     13        (WebCore::RenderBlock::calcColumnWidth): Make 1 the minimum value
     14        for column-width and column-count. Since the spec does not address
     15        what to do with negative values for these properties, we are
     16        patching the rendering code instead of the parser.
     17
    1182007-07-24  Anders Carlsson  <andersca@apple.com>
    219
  • trunk/WebCore/rendering/RenderBlock.cpp

    r24538 r24599  
    31213121    int availWidth = desiredColumnWidth;
    31223122    int colGap = columnGap();
     3123    int colWidth = max(1, static_cast<int>(style()->columnWidth()));
     3124    int colCount = max(1, static_cast<int>(style()->columnCount()));
    31233125
    31243126    if (style()->hasAutoColumnWidth()) {
    3125         int colCount = style()->columnCount();
    31263127        if ((colCount - 1) * colGap < availWidth) {
    31273128            desiredColumnCount = colCount;
     
    31323133        }
    31333134    } else if (style()->hasAutoColumnCount()) {
    3134         int colWidth = static_cast<int>(style()->columnWidth());
    31353135        if (colWidth < availWidth) {
    31363136            desiredColumnCount = (availWidth + colGap) / (colWidth + colGap);
     
    31393139    } else {
    31403140        // Both are set.
    3141         int colWidth = static_cast<int>(style()->columnWidth());
    3142         int colCount = style()->columnCount();
    3143    
    31443141        if (colCount * colWidth + (colCount - 1) * colGap <= availWidth) {
    31453142            desiredColumnCount = colCount;
Note: See TracChangeset for help on using the changeset viewer.