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

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

Issue 208203002: Don't rely on values computed as a side effect of paint. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
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 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3264 rect.move(-box->scrolledContentOffset()); 3264 rect.move(-box->scrolledContentOffset());
3265 if (!scrollableArea()->usesCompositedScrolling()) 3265 if (!scrollableArea()->usesCompositedScrolling())
3266 rect.intersect(box->overflowClipRect(LayoutPoint())); 3266 rect.intersect(box->overflowClipRect(LayoutPoint()));
3267 } 3267 }
3268 if (renderer()->hasClip()) 3268 if (renderer()->hasClip())
3269 rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint())); 3269 rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint()));
3270 if (!rect.isEmpty()) 3270 if (!rect.isEmpty())
3271 renderer()->repaintRectangle(rect); 3271 renderer()->repaintRectangle(rect);
3272 } 3272 }
3273 3273
3274 bool RenderLayer::hasBlockSelectionGapBounds() const
3275 {
3276 return !m_blockSelectionGapsBounds.isEmpty();
3277 }
3278
3279 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo utRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromR oot) const 3274 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo utRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromR oot) const
3280 { 3275 {
3281 // Always examine the canvas and the root. 3276 // Always examine the canvas and the root.
3282 // FIXME: Could eliminate the isRoot() check if we fix background painting s o that the RenderView 3277 // FIXME: Could eliminate the isRoot() check if we fix background painting s o that the RenderView
3283 // paints the root's background. 3278 // paints the root's background.
3284 if (isRootLayer() || renderer()->isRoot()) 3279 if (isRootLayer() || renderer()->isRoot())
3285 return true; 3280 return true;
3286 3281
3287 // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we 3282 // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we
3288 // can go ahead and return true. 3283 // can go ahead and return true.
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4079 } 4074 }
4080 } 4075 }
4081 4076
4082 void showLayerTree(const WebCore::RenderObject* renderer) 4077 void showLayerTree(const WebCore::RenderObject* renderer)
4083 { 4078 {
4084 if (!renderer) 4079 if (!renderer)
4085 return; 4080 return;
4086 showLayerTree(renderer->enclosingLayer()); 4081 showLayerTree(renderer->enclosingLayer());
4087 } 4082 }
4088 #endif 4083 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698