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

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

Issue 2014483003: Rename OwnPtr::clear() to reset() in core/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void LayoutView::layout() 244 void LayoutView::layout()
245 { 245 {
246 if (!document().paginated()) 246 if (!document().paginated())
247 setPageLogicalHeight(LayoutUnit()); 247 setPageLogicalHeight(LayoutUnit());
248 248
249 if (pageLogicalHeight() && shouldUsePrintingLayout()) { 249 if (pageLogicalHeight() && shouldUsePrintingLayout()) {
250 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth() ; 250 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth() ;
251 if (!m_fragmentationContext) 251 if (!m_fragmentationContext)
252 m_fragmentationContext = adoptPtr(new ViewFragmentationContext(*this )); 252 m_fragmentationContext = adoptPtr(new ViewFragmentationContext(*this ));
253 } else if (m_fragmentationContext) { 253 } else if (m_fragmentationContext) {
254 m_fragmentationContext.clear(); 254 m_fragmentationContext.reset();
255 } 255 }
256 256
257 SubtreeLayoutScope layoutScope(*this); 257 SubtreeLayoutScope layoutScope(*this);
258 258
259 LayoutRect oldLayoutOverflowRect = layoutOverflowRect(); 259 LayoutRect oldLayoutOverflowRect = layoutOverflowRect();
260 260
261 // Use calcWidth/Height to get the new width/height, since this will take th e full page zoom factor into account. 261 // Use calcWidth/Height to get the new width/height, since this will take th e full page zoom factor into account.
262 bool relayoutChildren = !shouldUsePrintingLayout() && (!m_frameView 262 bool relayoutChildren = !shouldUsePrintingLayout() && (!m_frameView
263 || logicalWidth() != viewLogicalWidthForBoxSizing() 263 || logicalWidth() != viewLogicalWidthForBoxSizing()
264 || logicalHeight() != viewLogicalHeightForBoxSizing()); 264 || logicalHeight() != viewLogicalHeightForBoxSizing());
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 return frameView() ? frameView()->viewportSizeForViewportUnits() : FloatSize (); 990 return frameView() ? frameView()->viewportSizeForViewportUnits() : FloatSize ();
991 } 991 }
992 992
993 void LayoutView::willBeDestroyed() 993 void LayoutView::willBeDestroyed()
994 { 994 {
995 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. 995 // TODO(wangxianzhu): This is a workaround of crbug.com/570706.
996 // Should find and fix the root cause. 996 // Should find and fix the root cause.
997 if (PaintLayer* layer = this->layer()) 997 if (PaintLayer* layer = this->layer())
998 layer->setNeedsRepaint(); 998 layer->setNeedsRepaint();
999 LayoutBlockFlow::willBeDestroyed(); 999 LayoutBlockFlow::willBeDestroyed();
1000 m_compositor.clear(); 1000 m_compositor.reset();
1001 } 1001 }
1002 1002
1003 void LayoutView::registerMediaForPositionChangeNotification(LayoutMedia& media) 1003 void LayoutView::registerMediaForPositionChangeNotification(LayoutMedia& media)
1004 { 1004 {
1005 if (!m_mediaForPositionNotification.contains(&media)) 1005 if (!m_mediaForPositionNotification.contains(&media))
1006 m_mediaForPositionNotification.append(&media); 1006 m_mediaForPositionNotification.append(&media);
1007 } 1007 }
1008 1008
1009 void LayoutView::unregisterMediaForPositionChangeNotification(LayoutMedia& media ) 1009 void LayoutView::unregisterMediaForPositionChangeNotification(LayoutMedia& media )
1010 { 1010 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should 1042 // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should
1043 // be handled by the ViewportScrollCallback. 1043 // be handled by the ViewportScrollCallback.
1044 1044
1045 if (!frameView()) 1045 if (!frameView())
1046 return ScrollResult(false, false, delta.width(), delta.height()); 1046 return ScrollResult(false, false, delta.width(), delta.height());
1047 1047
1048 return frameView()->getScrollableArea()->userScroll(granularity, delta); 1048 return frameView()->getScrollableArea()->userScroll(granularity, delta);
1049 } 1049 }
1050 1050
1051 } // namespace blink 1051 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698