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

Side by Side Diff: sky/engine/core/rendering/RenderLayerScrollableArea.cpp

Issue 845093002: Delete an assortment of unneeded paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/rendering/RenderLayer.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 destroyScrollbar(VerticalScrollbar); 99 destroyScrollbar(VerticalScrollbar);
100 } 100 }
101 101
102 HostWindow* RenderLayerScrollableArea::hostWindow() const 102 HostWindow* RenderLayerScrollableArea::hostWindow() const
103 { 103 {
104 if (Page* page = box().frame()->page()) 104 if (Page* page = box().frame()->page())
105 return &page->chrome(); 105 return &page->chrome();
106 return nullptr; 106 return nullptr;
107 } 107 }
108 108
109 // FIXME(sky): Remove
109 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co nst IntRect& rect) 110 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co nst IntRect& rect)
110 { 111 {
111 IntRect scrollRect = rect; 112 IntRect scrollRect = rect;
112 // If we are not yet inserted into the tree, there is no need to issue paint invaldiations. 113 // If we are not yet inserted into the tree, there is no need to issue paint invaldiations.
113 if (!box().parent()) 114 if (!box().parent())
114 return; 115 return;
115 116
116 if (scrollbar == m_vBar.get()) 117 if (scrollbar == m_vBar.get())
117 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo p()); 118 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo p());
118 else 119 else
119 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height()); 120 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height());
120 121
121 if (scrollRect.isEmpty()) 122 if (scrollRect.isEmpty())
122 return; 123 return;
123 124
124 IntRect intRect = pixelSnappedIntRect(scrollRect); 125 IntRect intRect = pixelSnappedIntRect(scrollRect);
125 126
126 if (box().frameView()->isInPerformLayout()) 127 if (box().frameView()->isInPerformLayout())
127 addScrollbarDamage(scrollbar, intRect); 128 addScrollbarDamage(scrollbar, intRect);
128 else
129 box().invalidatePaintRectangle(intRect);
130 } 129 }
131 130
132 bool RenderLayerScrollableArea::isActive() const 131 bool RenderLayerScrollableArea::isActive() const
133 { 132 {
134 Page* page = box().frame()->page(); 133 Page* page = box().frame()->page();
135 return page && page->focusController().isActive(); 134 return page && page->focusController().isActive();
136 } 135 }
137 136
138 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne ss) 137 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne ss)
139 { 138 {
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 758 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
760 { 759 {
761 // We only want to track the topmost scroll child for scrollable areas with 760 // We only want to track the topmost scroll child for scrollable areas with
762 // overlay scrollbars. 761 // overlay scrollbars.
763 if (!hasOverlayScrollbars()) 762 if (!hasOverlayScrollbars())
764 return; 763 return;
765 m_nextTopmostScrollChild = scrollChild; 764 m_nextTopmostScrollChild = scrollChild;
766 } 765 }
767 766
768 } // namespace blink 767 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698