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

Side by Side Diff: Source/WebCore/rendering/RenderLayer.cpp

Issue 10442005: Merge 116476 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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 | « Source/WebCore/rendering/RenderBox.cpp ('k') | Source/WebCore/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 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
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 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 if (m_resizer) 2187 if (m_resizer)
2188 m_resizer->repaintRectangle(rect); 2188 m_resizer->repaintRectangle(rect);
2189 } 2189 }
2190 2190
2191 PassRefPtr<Scrollbar> RenderLayer::createScrollbar(ScrollbarOrientation orientat ion) 2191 PassRefPtr<Scrollbar> RenderLayer::createScrollbar(ScrollbarOrientation orientat ion)
2192 { 2192 {
2193 RefPtr<Scrollbar> widget; 2193 RefPtr<Scrollbar> widget;
2194 RenderObject* actualRenderer = renderer()->node() ? renderer()->node()->shad owAncestorNode()->renderer() : renderer(); 2194 RenderObject* actualRenderer = renderer()->node() ? renderer()->node()->shad owAncestorNode()->renderer() : renderer();
2195 bool hasCustomScrollbarStyle = actualRenderer->isBox() && actualRenderer->st yle()->hasPseudoStyle(SCROLLBAR); 2195 bool hasCustomScrollbarStyle = actualRenderer->isBox() && actualRenderer->st yle()->hasPseudoStyle(SCROLLBAR);
2196 if (hasCustomScrollbarStyle) 2196 if (hasCustomScrollbarStyle)
2197 widget = RenderScrollbar::createCustomScrollbar(this, orientation, toRen derBox(actualRenderer)); 2197 widget = RenderScrollbar::createCustomScrollbar(this, orientation, actua lRenderer->node());
2198 else { 2198 else {
2199 widget = Scrollbar::createNativeScrollbar(this, orientation, RegularScro llbar); 2199 widget = Scrollbar::createNativeScrollbar(this, orientation, RegularScro llbar);
2200 if (orientation == HorizontalScrollbar) 2200 if (orientation == HorizontalScrollbar)
2201 didAddHorizontalScrollbar(widget.get()); 2201 didAddHorizontalScrollbar(widget.get());
2202 else 2202 else
2203 didAddVerticalScrollbar(widget.get()); 2203 didAddVerticalScrollbar(widget.get());
2204 } 2204 }
2205 renderer()->document()->view()->addChild(widget.get()); 2205 renderer()->document()->view()->addChild(widget.get());
2206 return widget.release(); 2206 return widget.release();
2207 } 2207 }
2208 2208
2209 void RenderLayer::destroyScrollbar(ScrollbarOrientation orientation) 2209 void RenderLayer::destroyScrollbar(ScrollbarOrientation orientation)
2210 { 2210 {
2211 RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar; 2211 RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar;
2212 if (scrollbar) { 2212 if (scrollbar) {
2213 if (scrollbar->isCustomScrollbar()) 2213 if (orientation == HorizontalScrollbar)
2214 toRenderScrollbar(scrollbar.get())->clearOwningRenderer(); 2214 willRemoveHorizontalScrollbar(scrollbar.get());
2215 else { 2215 else
2216 if (orientation == HorizontalScrollbar) 2216 willRemoveVerticalScrollbar(scrollbar.get());
2217 willRemoveHorizontalScrollbar(scrollbar.get());
2218 else
2219 willRemoveVerticalScrollbar(scrollbar.get());
2220 }
2221 2217
2222 scrollbar->removeFromParent(); 2218 scrollbar->removeFromParent();
2223 scrollbar->disconnectFromScrollableArea(); 2219 scrollbar->disconnectFromScrollableArea();
2224 scrollbar = 0; 2220 scrollbar = 0;
2225 } 2221 }
2226 } 2222 }
2227 2223
2228 bool RenderLayer::scrollsOverflow() const 2224 bool RenderLayer::scrollsOverflow() const
2229 { 2225 {
2230 if (!renderer()->isBox()) 2226 if (!renderer()->isBox())
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after
4948 } 4944 }
4949 } 4945 }
4950 4946
4951 void showLayerTree(const WebCore::RenderObject* renderer) 4947 void showLayerTree(const WebCore::RenderObject* renderer)
4952 { 4948 {
4953 if (!renderer) 4949 if (!renderer)
4954 return; 4950 return;
4955 showLayerTree(renderer->enclosingLayer()); 4951 showLayerTree(renderer->enclosingLayer());
4956 } 4952 }
4957 #endif 4953 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | Source/WebCore/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698