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

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

Issue 842113005: Delete a bunch of noop paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix comment 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/RenderLayerScrollableArea.h ('k') | sky/engine/platform/HostWindow.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
110 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co nst IntRect& rect)
111 {
112 IntRect scrollRect = rect;
113 // If we are not yet inserted into the tree, there is no need to issue paint invaldiations.
114 if (!box().parent())
115 return;
116
117 if (scrollbar == m_vBar.get())
118 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo p());
119 else
120 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height());
121
122 if (scrollRect.isEmpty())
123 return;
124
125 IntRect intRect = pixelSnappedIntRect(scrollRect);
126
127 if (box().frameView()->isInPerformLayout())
128 addScrollbarDamage(scrollbar, intRect);
129 }
130
131 bool RenderLayerScrollableArea::isActive() const 109 bool RenderLayerScrollableArea::isActive() const
132 { 110 {
133 Page* page = box().frame()->page(); 111 Page* page = box().frame()->page();
134 return page && page->focusController().isActive(); 112 return page && page->focusController().isActive();
135 } 113 }
136 114
137 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne ss) 115 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne ss)
138 { 116 {
139 if (style->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) 117 if (style->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
140 return minX + style->borderLeftWidth(); 118 return minX + style->borderLeftWidth();
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 733 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
756 { 734 {
757 // We only want to track the topmost scroll child for scrollable areas with 735 // We only want to track the topmost scroll child for scrollable areas with
758 // overlay scrollbars. 736 // overlay scrollbars.
759 if (!hasOverlayScrollbars()) 737 if (!hasOverlayScrollbars())
760 return; 738 return;
761 m_nextTopmostScrollChild = scrollChild; 739 m_nextTopmostScrollChild = scrollChild;
762 } 740 }
763 741
764 } // namespace blink 742 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerScrollableArea.h ('k') | sky/engine/platform/HostWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698