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: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 418483004: Fix scrollbar damage accumulation issue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/platform/scroll/ScrollableArea.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height()); 198 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height());
199 199
200 if (scrollRect.isEmpty()) 200 if (scrollRect.isEmpty())
201 return; 201 return;
202 202
203 LayoutRect repaintRect = scrollRect; 203 LayoutRect repaintRect = scrollRect;
204 box().flipForWritingMode(repaintRect); 204 box().flipForWritingMode(repaintRect);
205 205
206 IntRect intRect = pixelSnappedIntRect(repaintRect); 206 IntRect intRect = pixelSnappedIntRect(repaintRect);
207 207
208 if (box().frameView()->isInPerformLayout()) { 208 if (box().frameView()->isInPerformLayout())
209 if (scrollbar == m_vBar.get()) { 209 addScrollbarDamage(scrollbar, intRect);
210 m_verticalBarDamage = intRect; 210 else
211 m_hasVerticalBarDamage = true;
212 } else {
213 m_horizontalBarDamage = intRect;
214 m_hasHorizontalBarDamage = true;
215 }
216
217 } else {
218 box().invalidatePaintRectangle(intRect); 211 box().invalidatePaintRectangle(intRect);
219 }
220 } 212 }
221 213
222 void RenderLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect) 214 void RenderLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect)
223 { 215 {
224 if (GraphicsLayer* layer = layerForScrollCorner()) { 216 if (GraphicsLayer* layer = layerForScrollCorner()) {
225 layer->setNeedsDisplayInRect(rect); 217 layer->setNeedsDisplayInRect(rect);
226 return; 218 return;
227 } 219 }
228 220
229 if (m_scrollCorner) 221 if (m_scrollCorner)
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 1459 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
1468 { 1460 {
1469 // We only want to track the topmost scroll child for scrollable areas with 1461 // We only want to track the topmost scroll child for scrollable areas with
1470 // overlay scrollbars. 1462 // overlay scrollbars.
1471 if (!hasOverlayScrollbars()) 1463 if (!hasOverlayScrollbars())
1472 return; 1464 return;
1473 m_nextTopmostScrollChild = scrollChild; 1465 m_nextTopmostScrollChild = scrollChild;
1474 } 1466 }
1475 1467
1476 } // Namespace WebCore 1468 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/platform/scroll/ScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698