2007-02-18 Mitz Pettel <mitz@webkit.org>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Feb 2007 16:15:07 +0000 (16:15 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Feb 2007 16:15:07 +0000 (16:15 +0000)
commit49cbfecc83591fc593b7aa0040f63d0fe5376a2a
tree7d8e315eec0052890d414b6880626819c587210e
parente3852869647e62e8c485eefc8825f85e39969d05
2007-02-18  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12123
          REGRESSION: Incomplete repaint of floats' overflows

        Tests: fast/repaint/float-overflow.html
               fast/repaint/float-overflow-right.html
               fast/repaint/table-cell-vertical-overflow.html

        - fix http://bugs.webkit.org/show_bug.cgi?id=10116
          REGRESSION: Menu item drawn 2 pixels short on WWDC 2006 Attendee Site

        Reflected in existing test results.

        Unified floats and overflow for the purposes of painting and hit-testing.
        Overhanging and overflowing floats are now factored into a block's overflow
        unless their painting has been propagated to an ancestor.

        Changed table cells to no longer expand to enclose overflow, thus making
        it purely "visual overflow", having no effect on layout in WebCore. It
        still determines scrolling dimensions.

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::placeBoxesHorizontally): Include inline blocks'
        horizontal overflow in the inline box's dimensions.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock): Removed the expand to enclose overflows
        behavior. Added code to add this block's floats (and their overflow) to its
        overflow rect if it is not in a block formatting context. Otherwise, the
        inclusion of floats in the overflow is deferred until this block's parent
        examines its floats and possibly adopts overhanging floats.
        (WebCore::RenderBlock::layoutBlockChildren):
        (WebCore::RenderBlock::paint):
        (WebCore::RenderBlock::floatRect): Made non-virtual and changed to return an empty
        rect if there are no floats or the floats are clipped, instead of returning the border
        box.
        (WebCore::RenderBlock::addOverhangingFloats): Any floats of the child that
        are not to be painted by the parent are added to the child's overflow rect.
        (WebCore::RenderBlock::addVisualOverflow): Added. Adjusts the overflow
        bounds to include the given rect.
        (WebCore::RenderBlock::nodeAtPoint):
        * rendering/RenderBlock.h:
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutBlock):
        (WebCore::RenderFlexibleBox::layoutHorizontalBox): After placing a normal
        child, add its floats to its overflow, since painting of floats does not
        propagate to flexible boxes.
        (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto.
        * rendering/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::layout):
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::layout):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::layout):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::absoluteBoundingBox):
        * rendering/RenderLayer.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::expandsToEncloseOverhangingFloats):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::layout):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::layout):
        * rendering/RenderTable.h: Removed the override of overflowHeight() since now tables can have
        vertical overflow.
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paint): Made sure that overflow is repainted.
        * rendering/RenderTableCell.h:
        (WebCore::RenderTableCell::expandsToEncloseOverhangingFloats): Removed.
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::RenderTableSection):
        (WebCore::RenderTableSection::layoutRows): Factor in vertical overflow from cells.
        (WebCore::RenderTableSection::paint):
        * rendering/RenderTableSection.h:
        (WebCore::RenderTableSection::overflowHeight):
        (WebCore::RenderTableSection::overflowTop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
140 files changed:
LayoutTests/ChangeLog
LayoutTests/css1/formatting_model/inline_elements-expected.checksum
LayoutTests/css1/formatting_model/inline_elements-expected.png
LayoutTests/css1/formatting_model/inline_elements-expected.txt
LayoutTests/css2.1/t0905-c414-flt-00-d-expected.txt
LayoutTests/css2.1/t0905-c414-flt-01-d-g-expected.txt
LayoutTests/css2.1/t0905-c414-flt-02-c-expected.txt
LayoutTests/css2.1/t0905-c414-flt-03-c-expected.txt
LayoutTests/css2.1/t0905-c414-flt-04-c-expected.txt
LayoutTests/css2.1/t0905-c414-flt-wrap-01-d-g-expected.txt
LayoutTests/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt
LayoutTests/css2.1/t0905-c5525-fltwidth-02-c-g-expected.txt
LayoutTests/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt
LayoutTests/css2.1/t090501-c414-flt-02-d-g-expected.txt
LayoutTests/css2.1/t090501-c414-flt-03-b-g-expected.txt
LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.txt
LayoutTests/fast/block/float/008-expected.txt
LayoutTests/fast/block/float/013-expected.checksum
LayoutTests/fast/block/float/013-expected.txt
LayoutTests/fast/block/float/029-expected.txt
LayoutTests/fast/block/float/031-expected.txt
LayoutTests/fast/block/float/float-in-float-painting-expected.txt
LayoutTests/fast/block/margin-collapse/059-expected.checksum
LayoutTests/fast/block/margin-collapse/059-expected.png
LayoutTests/fast/block/margin-collapse/059-expected.txt
LayoutTests/fast/block/margin-collapse/062-expected.txt
LayoutTests/fast/block/margin-collapse/063-expected.txt
LayoutTests/fast/box-shadow/basic-shadows-expected.txt
LayoutTests/fast/forms/floating-textfield-relayout-expected.checksum
LayoutTests/fast/forms/floating-textfield-relayout-expected.txt
LayoutTests/fast/lists/003-expected.txt
LayoutTests/fast/media/mq-relative-constraints-08-expected.txt
LayoutTests/fast/multicol/float-multicol-expected.txt
LayoutTests/fast/repaint/float-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow-right-expected.checksum [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow-right-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow-right-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow-right.html [new file with mode: 0644]
LayoutTests/fast/repaint/float-overflow.html [new file with mode: 0644]
LayoutTests/fast/repaint/table-cell-vertical-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/fast/repaint/table-cell-vertical-overflow-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/table-cell-vertical-overflow-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/table-cell-vertical-overflow.html [new file with mode: 0644]
LayoutTests/fast/table/009-expected.checksum
LayoutTests/fast/table/009-expected.png
LayoutTests/fast/table/009-expected.txt
LayoutTests/fast/text/whitespace/012-expected.txt
LayoutTests/tables/mozilla/bugs/bug120364-expected.txt
LayoutTests/tables/mozilla/bugs/bug196870-expected.checksum
LayoutTests/tables/mozilla/bugs/bug196870-expected.png
LayoutTests/tables/mozilla/bugs/bug196870-expected.txt
LayoutTests/tables/mozilla/bugs/bug45055-2-expected.txt
LayoutTests/tables/mozilla/bugs/bug72359-expected.txt
LayoutTests/tables/mozilla/marvin/x_table_align_left-expected.txt
LayoutTests/tables/mozilla/marvin/x_table_align_right-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_caption-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_caption_left-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_caption_right-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_caption_top-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_row-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_row-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_row-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_table-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_table-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_table-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_table-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_table-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_table-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_tbody-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_tbody-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_tbody-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_tr-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_tr-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_hidden_tr-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_cell-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_cell-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_cell-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_cell_sibling-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_cell_sibling-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_cell_sibling-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_row-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_row-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_row-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_row_sibling-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_row_sibling-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_row_sibling-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_table-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_table-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_table-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_table_caption-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_table_caption-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_table_caption-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_tbody-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_tbody-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_tbody-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_tbody_sibling-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_tbody_sibling-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_style_reflow_tbody_sibling-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_align_right-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_align_right-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_align_right-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_bottom-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_bottom-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_bottom-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_middle-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_middle-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_middle-expected.txt
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_top-expected.checksum
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_top-expected.png
LayoutTests/tables/mozilla_expected_failures/marvin/table_overflow_td_valign_top-expected.txt
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/rendering/InlineFlowBox.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderForeignObject.cpp
WebCore/rendering/RenderHTMLCanvas.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderPath.cpp
WebCore/rendering/RenderSVGContainer.cpp
WebCore/rendering/RenderSVGText.cpp
WebCore/rendering/RenderTable.cpp
WebCore/rendering/RenderTable.h
WebCore/rendering/RenderTableCell.cpp
WebCore/rendering/RenderTableCell.h
WebCore/rendering/RenderTableSection.cpp
WebCore/rendering/RenderTableSection.h