Show
Ignore:
Timestamp:
02/18/07 08:15:07 (23 months ago)
Author:
ap
Message:

2007-02-18 Mitz Pettel <mitz@webkit.org>

Reviewed by Hyatt.

Tests: fast/repaint/float-overflow.html

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

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):
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/rendering/RenderTable.h

    r18637 r19696  
    9999 
    100100    // overrides 
    101     virtual int overflowHeight(bool includeInterior = true) const { return height(); } 
    102101    virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0); 
    103102    virtual void paint(PaintInfo&, int tx, int ty);