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

Unified Diff: Source/core/page/FrameView.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
Index: Source/core/page/FrameView.cpp
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index a369ca46cebbc67fa6798531fedb145f5e0c648e..8b49e72e85fb4779102f35c3015e2091e925e01c 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -1021,7 +1021,7 @@ void FrameView::layout(bool allowSubtree)
m_firstLayout = false;
m_firstLayoutCallbackPending = true;
- m_lastViewportSize = visibleContentRect(IncludeScrollbars).size();
+ m_lastViewportSize = layoutSizeIncludingScrollbars();
kenneth.r.christiansen 2013/05/06 19:50:51 The layout size doesn't include scrollbars. That s
m_lastZoomFactor = root->style()->zoom();
// Set the initial vMode to AlwaysOn if we're auto.
@@ -2314,8 +2314,7 @@ void FrameView::performPostLayoutTasks()
// call above.
renderView = this->renderView();
if (renderView && !renderView->printing()) {
- IntSize currentSize;
- currentSize = visibleContentRect(IncludeScrollbars).size();
+ IntSize currentSize = layoutSizeIncludingScrollbars();
float currentZoomFactor = renderView->style()->zoom();
bool resized = !m_firstLayout && (currentSize != m_lastViewportSize || currentZoomFactor != m_lastZoomFactor);
m_lastViewportSize = currentSize;

Powered by Google App Engine
This is Rietveld 408576698