diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-12 09:27:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-12 09:27:39 +0200 |
commit | 3749d61e1f7a59f5ec5067e560af1eb610c82015 (patch) | |
tree | 73dc228333948738bbe02976cacca8cd382bc978 /Source/WebCore/rendering/RenderGrid.cpp | |
parent | b32b4dcd9a51ab8de6afc53d9e17f8707e1f7a5e (diff) | |
download | qtwebkit-3749d61e1f7a59f5ec5067e560af1eb610c82015.tar.gz |
Imported WebKit commit a77350243e054f3460d1137301d8b3faee3d2052 (http://svn.webkit.org/repository/webkit/trunk@125365)
New snapshot with build fixes for latest API changes in Qt and all WK1 Win MSVC fixes upstream
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(); |