Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1473)

Unified Diff: Source/core/platform/ScrollView.cpp

Issue 14766010: Clarify the size of a document view (a.k.a layout size) that causes FrameView to emit the resize ev… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add new test: fast/events/resize-events-count.html Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/core/platform/ScrollView.h ('K') | « Source/core/platform/ScrollView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/ScrollView.cpp
diff --git a/Source/core/platform/ScrollView.cpp b/Source/core/platform/ScrollView.cpp
index 02fd24e5640257213b8e784a2353a7870f6221c2..141cf8afb0194d5568e4d68368d5ff934221544f 100644
--- a/Source/core/platform/ScrollView.cpp
+++ b/Source/core/platform/ScrollView.cpp
@@ -219,7 +219,20 @@ IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scol
IntSize ScrollView::layoutSize() const
{
- return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? unscaledVisibleContentSize(ExcludeScrollbars) : m_fixedLayoutSize;
+ if (m_useFixedLayout) {
+ ASSERT(!m_fixedLayoutSize.isEmpty());
+ return m_fixedLayoutSize;
+ }
+ return unscaledVisibleContentSize(ExcludeScrollbars);
+}
+
+IntSize ScrollView::layoutSizeIncludingScrollbars() const
+{
+ if (m_useFixedLayout) {
+ ASSERT(!m_fixedLayoutSize.isEmpty());
+ return m_fixedLayoutSize;
+ }
+ return unscaledVisibleContentSize(IncludeScrollbars);
}
IntSize ScrollView::fixedLayoutSize() const
« Source/core/platform/ScrollView.h ('K') | « Source/core/platform/ScrollView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698