summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderFlexibleBox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderFlexibleBox.cpp')
-rw-r--r--WebCore/rendering/RenderFlexibleBox.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/WebCore/rendering/RenderFlexibleBox.cpp b/WebCore/rendering/RenderFlexibleBox.cpp
index 841442b..2257d68 100644
--- a/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/WebCore/rendering/RenderFlexibleBox.cpp
@@ -185,6 +185,13 @@ void RenderFlexibleBox::computePreferredLogicalWidths()
m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
}
+ if (hasOverflowClip() && style()->overflowY() == OSCROLL) {
+ layer()->setHasVerticalScrollbar(true);
+ int scrollbarWidth = verticalScrollbarWidth();
+ m_maxPreferredLogicalWidth += scrollbarWidth;
+ m_minPreferredLogicalWidth += scrollbarWidth;
+ }
+
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
@@ -195,13 +202,9 @@ void RenderFlexibleBox::computePreferredLogicalWidths()
m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
}
- int toAdd = borderAndPaddingWidth();
-
- if (hasOverflowClip() && style()->overflowY() == OSCROLL)
- toAdd += verticalScrollbarWidth();
-
- m_minPreferredLogicalWidth += toAdd;
- m_maxPreferredLogicalWidth += toAdd;
+ int borderAndPadding = borderAndPaddingLogicalWidth();
+ m_minPreferredLogicalWidth += borderAndPadding;
+ m_maxPreferredLogicalWidth += borderAndPadding;
setPreferredLogicalWidthsDirty(false);
}
@@ -286,6 +289,8 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren, int /*pageHeight FIXM
statePusher.pop();
+ updateLayerTransform();
+
if (view()->layoutState()->m_pageHeight)
setPageY(view()->layoutState()->pageY(y()));