WebCore:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2007 17:57:59 +0000 (17:57 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2007 17:57:59 +0000 (17:57 +0000)
commit2319da184f724d229d7553c66f877ba982917acb
tree99250caa8fd74c34c08fcf150acd2696cd23af01
parent5ff2f006d4112b868886f5ad3e0c39139d2f0f7c
WebCore:

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15010
          <rdar://problem/5423956> REGRESSION (r25000-r25065): Table rendering broken by a recent nightly

        Test: fast/table/max-width-integer-overflow.html

        Avoid integer overflows when dealing with maximum widths by
        1) using floating point arithmetic when summing or multiplying column max widths
        2) capping max widths at INT_MAX / 2

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcPrefWidths):
        (WebCore::AutoTableLayout::calcEffectiveWidth):
        (WebCore::AutoTableLayout::layout):

LayoutTests:

        Reviewed by Darin.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15010
          <rdar://problem/5423956> REGRESSION (r25000-r25065): Table rendering broken by a recent nightly

        * fast/table/max-width-integer-overflow.html: Added.
        * platform/mac/fast/table: Added.
        * platform/mac/fast/table/max-width-integer-overflow-expected.checksum: Added.
        * platform/mac/fast/table/max-width-integer-overflow-expected.png: Added.
        * platform/mac/fast/table/max-width-integer-overflow-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/table/max-width-integer-overflow.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/AutoTableLayout.cpp