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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 1603613002: Refuse to paginate if page height is 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/LayoutTests/printing/viewport-size-dependant-iframe-with-multicol-crash-expected.txt ('k') | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool LayoutView::doingFullPaintInvalidation() const 231 bool LayoutView::doingFullPaintInvalidation() const
232 { 232 {
233 return m_frameView->needsFullPaintInvalidation(); 233 return m_frameView->needsFullPaintInvalidation();
234 } 234 }
235 235
236 void LayoutView::layout() 236 void LayoutView::layout()
237 { 237 {
238 if (!document().paginated()) 238 if (!document().paginated())
239 setPageLogicalHeight(0); 239 setPageLogicalHeight(0);
240 240
241 if (shouldUsePrintingLayout()) { 241 if (pageLogicalHeight() && shouldUsePrintingLayout()) {
242 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth() ; 242 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth() ;
243 if (!m_fragmentationContext) 243 if (!m_fragmentationContext)
244 m_fragmentationContext = adoptPtr(new ViewFragmentationContext(*this )); 244 m_fragmentationContext = adoptPtr(new ViewFragmentationContext(*this ));
245 } else if (m_fragmentationContext) { 245 } else if (m_fragmentationContext) {
246 m_fragmentationContext.clear(); 246 m_fragmentationContext.clear();
247 } 247 }
248 248
249 SubtreeLayoutScope layoutScope(*this); 249 SubtreeLayoutScope layoutScope(*this);
250 250
251 LayoutRect oldLayoutOverflowRect = layoutOverflowRect(); 251 LayoutRect oldLayoutOverflowRect = layoutOverflowRect();
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 } 998 }
999 999
1000 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect ) 1000 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect )
1001 { 1001 {
1002 for (auto& media : m_mediaForPositionNotification) { 1002 for (auto& media : m_mediaForPositionNotification) {
1003 media->notifyPositionMayHaveChanged(visibleRect); 1003 media->notifyPositionMayHaveChanged(visibleRect);
1004 } 1004 }
1005 } 1005 }
1006 1006
1007 } // namespace blink 1007 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/viewport-size-dependant-iframe-with-multicol-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698