Commit cd04e4d6 authored by hyatt's avatar hyatt

Fix two bugs in positionForCoordinates. (Make it work when you have a...

        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):



git-svn-id: svn://svn.chromium.org/blink/trunk@18762 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9ec8e5b5
2007-01-11 David Hyatt <hyatt@apple.com>
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):
2007-01-10 Rob Buis <buis@kde.org>
Reviewed by Eric.
......
......@@ -280,7 +280,7 @@ public:
int heightForLineCount(int);
void clearTruncation();
virtual bool hasColumns() const { return m_columnCount > 1; }
virtual bool hasColumns() const { return m_desiredColumnCount > 1; }
void adjustRectForColumns(IntRect&) const;
private:
void adjustPointToColumnContents(IntPoint&) const;
......@@ -295,7 +295,7 @@ private:
int columnGap() const;
void calcColumnWidth();
void layoutColumns();
int layoutColumns(int endOfContent = -1);
protected:
struct FloatingObject {
......@@ -461,8 +461,8 @@ private:
int m_tabWidth;
// Column information.
int m_columnWidth;
unsigned m_columnCount;
int m_desiredColumnWidth;
unsigned m_desiredColumnCount;
Vector<IntRect>* m_columnRects;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment