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

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

Issue 65573002: Remove Scrollbar dependency on AXObjectCache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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/core/platform/Scrollbar.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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 PassRefPtr<Scrollbar> RenderLayerScrollableArea::createScrollbar(ScrollbarOrient ation orientation) 763 PassRefPtr<Scrollbar> RenderLayerScrollableArea::createScrollbar(ScrollbarOrient ation orientation)
764 { 764 {
765 RefPtr<Scrollbar> widget; 765 RefPtr<Scrollbar> widget;
766 RenderObject* actualRenderer = rendererForScrollbar(m_box); 766 RenderObject* actualRenderer = rendererForScrollbar(m_box);
767 bool hasCustomScrollbarStyle = actualRenderer->isBox() && actualRenderer->st yle()->hasPseudoStyle(SCROLLBAR); 767 bool hasCustomScrollbarStyle = actualRenderer->isBox() && actualRenderer->st yle()->hasPseudoStyle(SCROLLBAR);
768 if (hasCustomScrollbarStyle) { 768 if (hasCustomScrollbarStyle) {
769 widget = RenderScrollbar::createCustomScrollbar(this, orientation, actua lRenderer->node()); 769 widget = RenderScrollbar::createCustomScrollbar(this, orientation, actua lRenderer->node());
770 } else { 770 } else {
771 widget = Scrollbar::create(this, orientation, RegularScrollbar); 771 widget = Scrollbar::create(this, orientation, RegularScrollbar);
772 if (orientation == HorizontalScrollbar) 772 if (orientation == HorizontalScrollbar)
773 didAddHorizontalScrollbar(widget.get()); 773 didAddScrollbar(widget.get(), HorizontalScrollbar);
774 else 774 else
775 didAddVerticalScrollbar(widget.get()); 775 didAddScrollbar(widget.get(), VerticalScrollbar);
776 } 776 }
777 m_box->document().view()->addChild(widget.get()); 777 m_box->document().view()->addChild(widget.get());
778 return widget.release(); 778 return widget.release();
779 } 779 }
780 780
781 void RenderLayerScrollableArea::destroyScrollbar(ScrollbarOrientation orientatio n) 781 void RenderLayerScrollableArea::destroyScrollbar(ScrollbarOrientation orientatio n)
782 { 782 {
783 RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar; 783 RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar;
784 if (!scrollbar) 784 if (!scrollbar)
785 return; 785 return;
786 786
787 if (!scrollbar->isCustomScrollbar()) { 787 if (!scrollbar->isCustomScrollbar())
788 if (orientation == HorizontalScrollbar) 788 willRemoveScrollbar(scrollbar.get(), orientation);
789 willRemoveHorizontalScrollbar(scrollbar.get());
790 else
791 willRemoveVerticalScrollbar(scrollbar.get());
792 }
793 789
794 scrollbar->removeFromParent(); 790 scrollbar->removeFromParent();
795 scrollbar->disconnectFromScrollableArea(); 791 scrollbar->disconnectFromScrollableArea();
796 scrollbar = 0; 792 scrollbar = 0;
797 } 793 }
798 794
799 void RenderLayerScrollableArea::setHasHorizontalScrollbar(bool hasScrollbar) 795 void RenderLayerScrollableArea::setHasHorizontalScrollbar(bool hasScrollbar)
800 { 796 {
801 if (hasScrollbar == hasHorizontalScrollbar()) 797 if (hasScrollbar == hasHorizontalScrollbar())
802 return; 798 return;
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) 1465 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode)
1470 { 1466 {
1471 if (m_forceNeedsCompositedScrolling == mode) 1467 if (m_forceNeedsCompositedScrolling == mode)
1472 return; 1468 return;
1473 1469
1474 m_forceNeedsCompositedScrolling = mode; 1470 m_forceNeedsCompositedScrolling = mode;
1475 layer()->didUpdateNeedsCompositedScrolling(); 1471 layer()->didUpdateNeedsCompositedScrolling();
1476 } 1472 }
1477 1473
1478 } // Namespace WebCore 1474 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/Scrollbar.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698