Changeset 147019 in webkit


Ignore:
Timestamp:
Mar 27, 2013 4:49:48 PM (11 years ago)
Author:
robert@webkit.org
Message:

Growing a position:absolute element in a position:relative one in a table does not update scrollHeight
https://bugs.webkit.org/show_bug.cgi?id=111977

Reviewed by David Hyatt.

Source/WebCore:

During simplified layout tables still need to know about overflow from positioned objects in any of
their cells.

Test: fast/table/cell-overflow-simplified-layout.html

  • rendering/RenderBlock.h:

(RenderBlock):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::simplifiedNormalFlowLayout):
(WebCore):

  • rendering/RenderTable.h:
  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::layoutRows):
(WebCore):
(WebCore::RenderTableSection::computeOverflowFromCells):

  • rendering/RenderTableSection.h:

(RenderTableSection):

LayoutTests:

  • fast/table/cell-overflow-simplified-layout-expected.html: Added.
  • fast/table/cell-overflow-simplified-layout.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147018 r147019  
     12013-03-27  Robert Hogan  <robert@webkit.org>
     2
     3        Growing a position:absolute element in a position:relative one in a table does not update scrollHeight
     4        https://bugs.webkit.org/show_bug.cgi?id=111977
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/table/cell-overflow-simplified-layout-expected.html: Added.
     9        * fast/table/cell-overflow-simplified-layout.html: Added.
     10
    1112013-03-22  Geoffrey Garen  <ggaren@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r147018 r147019  
     12013-03-27  Robert Hogan  <robert@webkit.org>
     2
     3        Growing a position:absolute element in a position:relative one in a table does not update scrollHeight
     4        https://bugs.webkit.org/show_bug.cgi?id=111977
     5
     6        Reviewed by David Hyatt.
     7
     8        During simplified layout tables still need to know about overflow from positioned objects in any of
     9        their cells.
     10
     11        Test: fast/table/cell-overflow-simplified-layout.html
     12
     13        * rendering/RenderBlock.h:
     14        (RenderBlock):
     15        * rendering/RenderTable.cpp:
     16        (WebCore::RenderTable::simplifiedNormalFlowLayout):
     17        (WebCore):
     18        * rendering/RenderTable.h:
     19        * rendering/RenderTableSection.cpp:
     20        (WebCore::RenderTableSection::layoutRows):
     21        (WebCore):
     22        (WebCore::RenderTableSection::computeOverflowFromCells):
     23        * rendering/RenderTableSection.h:
     24        (RenderTableSection):
     25
    1262013-03-22  Geoffrey Garen  <ggaren@apple.com>
    227
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r146377 r147019  
    547547   
    548548    bool simplifiedLayout();
    549     void simplifiedNormalFlowLayout();
     549    virtual void simplifiedNormalFlowLayout();
    550550
    551551    void setDesiredColumnCountAndWidth(int, LayoutUnit);
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r145424 r147019  
    380380    // However our current distribution algorithm does not round properly and thus we can have some remaining height.
    381381    // ASSERT(!topSection() || !extraLogicalHeight);
     382}
     383
     384void RenderTable::simplifiedNormalFlowLayout()
     385{
     386    for (RenderTableSection* section = topSection(); section; section = sectionBelow(section)) {
     387        section->layoutIfNeeded();
     388        section->computeOverflowFromCells();
     389    }
    382390}
    383391
  • trunk/Source/WebCore/rendering/RenderTable.h

    r145424 r147019  
    265265protected:
    266266    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
     267    virtual void simplifiedNormalFlowLayout();
    267268
    268269private:
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r145305 r147019  
    637637    setLogicalHeight(m_rowPos[totalRows]);
    638638
     639    computeOverflowFromCells(totalRows, nEffCols);
     640
     641    statePusher.pop();
     642}
     643
     644void RenderTableSection::computeOverflowFromCells()
     645{
     646    unsigned totalRows = m_grid.size();
     647    unsigned nEffCols = table()->numEffCols();
     648    computeOverflowFromCells(totalRows, nEffCols);
     649}
     650
     651void RenderTableSection::computeOverflowFromCells(unsigned totalRows, unsigned nEffCols)
     652{
    639653    unsigned totalCellsCount = nEffCols * totalRows;
    640654    int maxAllowedOverflowingCellsCount = totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell ? 0 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount;
     
    669683
    670684    ASSERT(hasOverflowingCell == this->hasOverflowingCell());
    671 
    672     statePusher.pop();
    673685}
    674686
  • trunk/Source/WebCore/rendering/RenderTableSection.h

    r144727 r147019  
    8080    int calcRowLogicalHeight();
    8181    void layoutRows();
     82    void computeOverflowFromCells();
    8283
    8384    RenderTable* table() const { return toRenderTable(parent()); }
     
    233234
    234235    bool hasOverflowingCell() const { return m_overflowingCells.size() || m_forceSlowPaintPathWithOverflowingCell; }
     236    void computeOverflowFromCells(unsigned totalRows, unsigned nEffCols);
    235237
    236238    CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); }
Note: See TracChangeset for help on using the changeset viewer.