Index: Source/core/platform/ScrollView.cpp |
diff --git a/Source/core/platform/ScrollView.cpp b/Source/core/platform/ScrollView.cpp |
index 79dd29b7de9d91771665bda1a87fdbfa2f709ac0..405b588c521080a59346124d98c7cfcf6b2d6aaa 100644 |
--- a/Source/core/platform/ScrollView.cpp |
+++ b/Source/core/platform/ScrollView.cpp |
@@ -50,6 +50,7 @@ ScrollView::ScrollView() |
, m_updateScrollbarsPass(0) |
, m_drawPanScrollIcon(false) |
, m_useFixedLayout(false) |
+ , m_fixedLayoutSizeLock(false) |
, m_paintsEntireContents(false) |
, m_clipsRepaints(true) |
{ |
@@ -205,13 +206,14 @@ IntSize ScrollView::unscaledVisibleContentSize(VisibleContentRectIncludesScrollb |
IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scollbarInclusion) const |
{ |
FloatSize visibleContentSize = unscaledVisibleContentSize(scollbarInclusion); |
- visibleContentSize.scale(1 / visibleContentScaleFactor()); |
+ if (!m_fixedLayoutSizeLock) |
+ visibleContentSize.scale(1 / visibleContentScaleFactor()); |
return IntRect(IntPoint(m_scrollOffset), expandedIntSize(visibleContentSize)); |
} |
IntSize ScrollView::layoutSize(VisibleContentRectIncludesScrollbars scrollbarInclusion) const |
{ |
- return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? unscaledVisibleContentSize(scrollbarInclusion) : m_fixedLayoutSize; |
+ return m_fixedLayoutSize.isZero() || !m_useFixedLayout ? unscaledVisibleContentSize(scrollbarInclusion) : m_fixedLayoutSize; |
} |
IntSize ScrollView::fixedLayoutSize() const |
@@ -221,6 +223,8 @@ IntSize ScrollView::fixedLayoutSize() const |
void ScrollView::setFixedLayoutSize(const IntSize& newSize) |
{ |
+ if (m_fixedLayoutSizeLock) |
+ return; |
if (fixedLayoutSize() == newSize) |
return; |
m_fixedLayoutSize = newSize; |
@@ -243,6 +247,16 @@ void ScrollView::setUseFixedLayout(bool enable) |
contentsResized(); |
} |
+void ScrollView::setFixedLayoutSizeLock(bool enable) |
+{ |
+ m_fixedLayoutSizeLock = enable; |
+} |
+ |
+bool ScrollView::fixedLayoutSizeLock() const |
+{ |
+ return m_fixedLayoutSizeLock; |
+} |
+ |
IntSize ScrollView::contentsSize() const |
{ |
return m_contentsSize; |