Changeset 69735 in webkit


Ignore:
Timestamp:
Oct 13, 2010 9:55:34 PM (14 years ago)
Author:
inferno@chromium.org
Message:

2010-10-12 Abhishek Arya <inferno@chromium.org>

Reviewed by Darin Adler.

Prevent block logical height of a root inline box from overflowing by clamping it
at INT_MAX. Otherwise, we will not be able to properly dirty the set of lines during
removal a floating object.
https://bugs.webkit.org/show_bug.cgi?id=45611

Test: fast/overflow/overflow-block-logical-height-crash.html

  • rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::alignBoxesInBlockDirection):

2010-10-12 Abhishek Arya <inferno@chromium.org>

Reviewed by Darin Adler.

Tests that overflowing the block logical height of a root inline box does not result in crash.
https://bugs.webkit.org/show_bug.cgi?id=45611

  • fast/overflow/overflow-block-logical-height-crash-expected.txt: Added.
  • fast/overflow/overflow-block-logical-height-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69727 r69735  
     12010-10-12  Abhishek Arya  <inferno@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Tests that overflowing the block logical height of a root inline box does not result in crash.
     6        https://bugs.webkit.org/show_bug.cgi?id=45611
     7
     8        * fast/overflow/overflow-block-logical-height-crash-expected.txt: Added.
     9        * fast/overflow/overflow-block-logical-height-crash.html: Added.
     10
    1112010-09-23  James Robinson  <jamesr@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r69727 r69735  
     12010-10-12  Abhishek Arya  <inferno@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Prevent block logical height of a root inline box from overflowing by clamping it
     6        at INT_MAX. Otherwise, we will not be able to properly dirty the set of lines during
     7        removal a floating object.
     8        https://bugs.webkit.org/show_bug.cgi?id=45611       
     9
     10        Test: fast/overflow/overflow-block-logical-height-crash.html
     11
     12        * rendering/RootInlineBox.cpp:
     13        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
     14
    1152010-10-13  James Robinson  <jamesr@chromium.org>
    216
  • trunk/WebCore/rendering/RootInlineBox.cpp

    r69228 r69735  
    242242    computeBlockDirectionOverflow(lineTop, lineBottom, noQuirksMode, textBoxDataMap);
    243243    setLineTopBottomPositions(lineTop, lineBottom);
    244    
    245     heightOfBlock += maxHeight;
     244
     245    // Detect integer overflow.
     246    if (heightOfBlock > numeric_limits<int>::max() - maxHeight)
     247        return numeric_limits<int>::max();
     248
     249    heightOfBlock = heightOfBlock + maxHeight;
    246250   
    247251    return heightOfBlock;
Note: See TracChangeset for help on using the changeset viewer.