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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 { 817 {
818 RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar; 818 RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar;
819 if (!scrollbar) 819 if (!scrollbar)
820 return; 820 return;
821 821
822 if (!scrollbar->isCustomScrollbar()) 822 if (!scrollbar->isCustomScrollbar())
823 willRemoveScrollbar(scrollbar.get(), orientation); 823 willRemoveScrollbar(scrollbar.get(), orientation);
824 824
825 scrollbar->removeFromParent(); 825 scrollbar->removeFromParent();
826 scrollbar->disconnectFromScrollableArea(); 826 scrollbar->disconnectFromScrollableArea();
827 scrollbar = 0; 827 scrollbar = nullptr;
828 } 828 }
829 829
830 void RenderLayerScrollableArea::setHasHorizontalScrollbar(bool hasScrollbar) 830 void RenderLayerScrollableArea::setHasHorizontalScrollbar(bool hasScrollbar)
831 { 831 {
832 if (hasScrollbar == hasHorizontalScrollbar()) 832 if (hasScrollbar == hasHorizontalScrollbar())
833 return; 833 return;
834 834
835 if (hasScrollbar) 835 if (hasScrollbar)
836 m_hBar = createScrollbar(HorizontalScrollbar); 836 m_hBar = createScrollbar(HorizontalScrollbar);
837 else 837 else
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 { 930 {
931 if (FrameView* frameView = m_box->view()->frameView()) 931 if (FrameView* frameView = m_box->view()->frameView())
932 return frameView->containsScrollableArea(this); 932 return frameView->containsScrollableArea(this);
933 933
934 return false; 934 return false;
935 } 935 }
936 936
937 void RenderLayerScrollableArea::updateScrollCornerStyle() 937 void RenderLayerScrollableArea::updateScrollCornerStyle()
938 { 938 {
939 RenderObject* actualRenderer = rendererForScrollbar(m_box); 939 RenderObject* actualRenderer = rendererForScrollbar(m_box);
940 RefPtr<RenderStyle> corner = m_box->hasOverflowClip() ? actualRenderer->getU ncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), actualRenderer->style() ) : PassRefPtr<RenderStyle>(0); 940 RefPtr<RenderStyle> corner = m_box->hasOverflowClip() ? actualRenderer->getU ncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), actualRenderer->style() ) : PassRefPtr<RenderStyle>(nullptr);
941 if (corner) { 941 if (corner) {
942 if (!m_scrollCorner) { 942 if (!m_scrollCorner) {
943 m_scrollCorner = RenderScrollbarPart::createAnonymous(&m_box->docume nt()); 943 m_scrollCorner = RenderScrollbarPart::createAnonymous(&m_box->docume nt());
944 m_scrollCorner->setParent(m_box); 944 m_scrollCorner->setParent(m_box);
945 } 945 }
946 m_scrollCorner->setStyle(corner.release()); 946 m_scrollCorner->setStyle(corner.release());
947 } else if (m_scrollCorner) { 947 } else if (m_scrollCorner) {
948 m_scrollCorner->destroy(); 948 m_scrollCorner->destroy();
949 m_scrollCorner = 0; 949 m_scrollCorner = 0;
950 } 950 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 return; 1195 return;
1196 if (m_box->canResize()) 1196 if (m_box->canResize())
1197 frameView->addResizerArea(m_box); 1197 frameView->addResizerArea(m_box);
1198 else 1198 else
1199 frameView->removeResizerArea(m_box); 1199 frameView->removeResizerArea(m_box);
1200 } 1200 }
1201 1201
1202 void RenderLayerScrollableArea::updateResizerStyle() 1202 void RenderLayerScrollableArea::updateResizerStyle()
1203 { 1203 {
1204 RenderObject* actualRenderer = rendererForScrollbar(m_box); 1204 RenderObject* actualRenderer = rendererForScrollbar(m_box);
1205 RefPtr<RenderStyle> resizer = m_box->hasOverflowClip() ? actualRenderer->get UncachedPseudoStyle(PseudoStyleRequest(RESIZER), actualRenderer->style()) : Pass RefPtr<RenderStyle>(0); 1205 RefPtr<RenderStyle> resizer = m_box->hasOverflowClip() ? actualRenderer->get UncachedPseudoStyle(PseudoStyleRequest(RESIZER), actualRenderer->style()) : Pass RefPtr<RenderStyle>(nullptr);
1206 if (resizer) { 1206 if (resizer) {
1207 if (!m_resizer) { 1207 if (!m_resizer) {
1208 m_resizer = RenderScrollbarPart::createAnonymous(&m_box->document()) ; 1208 m_resizer = RenderScrollbarPart::createAnonymous(&m_box->document()) ;
1209 m_resizer->setParent(m_box); 1209 m_resizer->setParent(m_box);
1210 } 1210 }
1211 m_resizer->setStyle(resizer.release()); 1211 m_resizer->setStyle(resizer.release());
1212 } else if (m_resizer) { 1212 } else if (m_resizer) {
1213 m_resizer->destroy(); 1213 m_resizer->destroy();
1214 m_resizer = 0; 1214 m_resizer = 0;
1215 } 1215 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) 1500 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode)
1501 { 1501 {
1502 if (m_forceNeedsCompositedScrolling == mode) 1502 if (m_forceNeedsCompositedScrolling == mode)
1503 return; 1503 return;
1504 1504
1505 m_forceNeedsCompositedScrolling = mode; 1505 m_forceNeedsCompositedScrolling = mode;
1506 layer()->didUpdateNeedsCompositedScrolling(); 1506 layer()->didUpdateNeedsCompositedScrolling();
1507 } 1507 }
1508 1508
1509 } // Namespace WebCore 1509 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698