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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 663203003: Add assert on frameView::wasViewportResized (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 2017
2018 sendResizeEventIfNeeded(); 2018 sendResizeEventIfNeeded();
2019 } 2019 }
2020 2020
2021 bool FrameView::wasViewportResized() 2021 bool FrameView::wasViewportResized()
2022 { 2022 {
2023 ASSERT(m_frame); 2023 ASSERT(m_frame);
2024 RenderView* renderView = this->renderView(); 2024 RenderView* renderView = this->renderView();
2025 if (!renderView) 2025 if (!renderView)
2026 return false; 2026 return false;
2027 ASSERT(renderView->style());
2027 return (layoutSize(IncludeScrollbars) != m_lastViewportSize || renderView->s tyle()->zoom() != m_lastZoomFactor); 2028 return (layoutSize(IncludeScrollbars) != m_lastViewportSize || renderView->s tyle()->zoom() != m_lastZoomFactor);
2028 } 2029 }
2029 2030
2030 void FrameView::sendResizeEventIfNeeded() 2031 void FrameView::sendResizeEventIfNeeded()
2031 { 2032 {
2032 ASSERT(m_frame); 2033 ASSERT(m_frame);
2033 2034
2034 RenderView* renderView = this->renderView(); 2035 RenderView* renderView = this->renderView();
2035 if (!renderView || renderView->document().printing()) 2036 if (!renderView || renderView->document().printing())
2036 return; 2037 return;
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
4003 return; 4004 return;
4004 4005
4005 ScrollableArea::setScrollOrigin(origin); 4006 ScrollableArea::setScrollOrigin(origin);
4006 4007
4007 // Update if the scroll origin changes, since our position will be different if the content size did not change. 4008 // Update if the scroll origin changes, since our position will be different if the content size did not change.
4008 if (updatePositionAtAll && updatePositionSynchronously) 4009 if (updatePositionAtAll && updatePositionSynchronously)
4009 updateScrollbars(scrollOffsetDouble()); 4010 updateScrollbars(scrollOffsetDouble());
4010 } 4011 }
4011 4012
4012 } // namespace blink 4013 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698