Show
Ignore:
Timestamp:
01/11/07 04:21:22 (2 years ago)
Author:
hyatt
Message:

Fix two bugs in positionForCoordinates. (Make it work when you have a margin in between your border and
your first child block.)

Rewrite column rebalancing to have two modes: constrained and unconstrained. In unconstrained mode,
the system will dynamically rebalance as it loses space to breaks and compute a final intrinsic height
for the overall block. In constrained mode, columns flow into the fixed height block, and extra columns
spill out horizontally in the appropriate direction (RTL/LTR).

Make columns work properly with both LTR and RTL overflow blocks.

Initial column test suite coming soon now that the basic layout is right.

Reviewed by darin

  • rendering/RenderBlock.cpp: (WebCore:::RenderFlow): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::paintColumns): (WebCore::RenderBlock::lowestPosition): (WebCore::RenderBlock::rightmostPosition): (WebCore::RenderBlock::leftmostPosition): (WebCore::RenderBlock::hitTestColumns): (WebCore::RenderBlock::positionForCoordinates): (WebCore::RenderBlock::availableWidth): (WebCore::RenderBlock::calcColumnWidth): (WebCore::RenderBlock::layoutColumns): (WebCore::RenderBlock::adjustPointToColumnContents):
  • rendering/RenderBlock.h: (WebCore::RenderBlock::hasColumns):
Files:
1 modified

Legend:

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

    r18758 r18762  
    281281    void clearTruncation(); 
    282282 
    283     virtual bool hasColumns() const { return m_columnCount > 1; } 
     283    virtual bool hasColumns() const { return m_desiredColumnCount > 1; } 
    284284    void adjustRectForColumns(IntRect&) const; 
    285285private: 
     
    296296    int columnGap() const; 
    297297    void calcColumnWidth(); 
    298     void layoutColumns(); 
     298    int layoutColumns(int endOfContent = -1); 
    299299 
    300300protected: 
     
    462462     
    463463    // Column information. 
    464     int m_columnWidth; 
    465     unsigned m_columnCount; 
     464    int m_desiredColumnWidth; 
     465    unsigned m_desiredColumnCount; 
    466466    Vector<IntRect>* m_columnRects; 
    467467};