diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderGrid.cpp')
-rw-r--r-- | Source/WebCore/rendering/RenderGrid.cpp | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/Source/WebCore/rendering/RenderGrid.cpp b/Source/WebCore/rendering/RenderGrid.cpp index b4d2a0c08..6a4519d1f 100644 --- a/Source/WebCore/rendering/RenderGrid.cpp +++ b/Source/WebCore/rendering/RenderGrid.cpp @@ -80,13 +80,6 @@ void RenderGrid::layoutBlock(bool relayoutChildren, LayoutUnit) m_overflow.clear(); - if (scrollsOverflow()) { - if (style()->overflowX() == OSCROLL) - layer()->setHasHorizontalScrollbar(true); - if (style()->overflowY() == OSCROLL) - layer()->setHasVerticalScrollbar(true); - } - layoutGridItems(); LayoutUnit oldClientAfterEdge = clientLogicalBottom(); @@ -114,6 +107,35 @@ void RenderGrid::layoutBlock(bool relayoutChildren, LayoutUnit) setNeedsLayout(false); } +void RenderGrid::computePreferredLogicalWidths() +{ + ASSERT(preferredLogicalWidthsDirty()); + + m_minPreferredLogicalWidth = 0; + m_maxPreferredLogicalWidth = 0; + + // FIXME: We don't take our own logical width into account. + + const Vector<Length>& trackStyles = style()->gridColumns(); + + for (size_t i = 0; i < trackStyles.size(); ++i) { + Length trackLength = trackStyles[i]; + if (!trackLength.isFixed()) { + notImplemented(); + continue; + } + + m_minPreferredLogicalWidth += trackLength.intValue(); + m_maxPreferredLogicalWidth += trackLength.intValue(); + } + + // FIXME: We should account for min / max logical width. + + // FIXME: Include borders and paddings in inline direction. + + setPreferredLogicalWidthsDirty(false); +} + void RenderGrid::computedUsedBreadthOfGridTracks(TrackSizingDirection direction, Vector<GridTrack>& tracks) { const Vector<Length>& trackStyles = (direction == ForColumns) ? style()->gridColumns() : style()->gridRows(); |