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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2823853003: [TEST] Do not add Scrollbar as child of FrameView. (Closed)
Patch Set: Created 3 years, 8 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/Source/core/frame/FrameView.h ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 } else { 1993 } else {
1994 ScrollbarControlSize scrollbar_size = kRegularScrollbar; 1994 ScrollbarControlSize scrollbar_size = kRegularScrollbar;
1995 if (style_source.StyleRef().HasAppearance()) { 1995 if (style_source.StyleRef().HasAppearance()) {
1996 scrollbar_size = LayoutTheme::GetTheme().ScrollbarControlSizeForPart( 1996 scrollbar_size = LayoutTheme::GetTheme().ScrollbarControlSizeForPart(
1997 style_source.StyleRef().Appearance()); 1997 style_source.StyleRef().Appearance());
1998 } 1998 }
1999 scrollbar = Scrollbar::Create( 1999 scrollbar = Scrollbar::Create(
2000 ScrollableArea(), orientation, scrollbar_size, 2000 ScrollableArea(), orientation, scrollbar_size,
2001 &ScrollableArea()->Box().GetFrame()->GetPage()->GetChromeClient()); 2001 &ScrollableArea()->Box().GetFrame()->GetPage()->GetChromeClient());
2002 } 2002 }
2003 ScrollableArea()->Box().GetDocument().View()->AddChild(scrollbar);
2004 return scrollbar; 2003 return scrollbar;
2005 } 2004 }
2006 2005
2007 void PaintLayerScrollableArea::ScrollbarManager::DestroyScrollbar( 2006 void PaintLayerScrollableArea::ScrollbarManager::DestroyScrollbar(
2008 ScrollbarOrientation orientation) { 2007 ScrollbarOrientation orientation) {
2009 Member<Scrollbar>& scrollbar = 2008 Member<Scrollbar>& scrollbar =
2010 orientation == kHorizontalScrollbar ? h_bar_ : v_bar_; 2009 orientation == kHorizontalScrollbar ? h_bar_ : v_bar_;
2011 DCHECK(orientation == kHorizontalScrollbar ? !h_bar_is_attached_ 2010 DCHECK(orientation == kHorizontalScrollbar ? !h_bar_is_attached_
2012 : !v_bar_is_attached_); 2011 : !v_bar_is_attached_);
2013 if (!scrollbar) 2012 if (!scrollbar)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 2132
2134 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2133 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2135 ClampScrollableAreas() { 2134 ClampScrollableAreas() {
2136 for (auto& scrollable_area : *needs_clamp_) 2135 for (auto& scrollable_area : *needs_clamp_)
2137 scrollable_area->ClampScrollOffsetAfterOverflowChange(); 2136 scrollable_area->ClampScrollOffsetAfterOverflowChange();
2138 delete needs_clamp_; 2137 delete needs_clamp_;
2139 needs_clamp_ = nullptr; 2138 needs_clamp_ = nullptr;
2140 } 2139 }
2141 2140
2142 } // namespace blink 2141 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698