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

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

Issue 176953008: Include the outline into the visual overflow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed dumb bug caught by Mac. 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 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after
3269 // FIXME: Could eliminate the isRoot() check if we fix background painting s o that the RenderView 3269 // FIXME: Could eliminate the isRoot() check if we fix background painting s o that the RenderView
3270 // paints the root's background. 3270 // paints the root's background.
3271 if (isRootLayer() || renderer()->isRoot()) 3271 if (isRootLayer() || renderer()->isRoot())
3272 return true; 3272 return true;
3273 3273
3274 // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we 3274 // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we
3275 // can go ahead and return true. 3275 // can go ahead and return true.
3276 RenderView* view = renderer()->view(); 3276 RenderView* view = renderer()->view();
3277 ASSERT(view); 3277 ASSERT(view);
3278 if (view && !renderer()->isRenderInline()) { 3278 if (view && !renderer()->isRenderInline()) {
3279 LayoutRect b = layerBounds; 3279 if (layerBounds.intersects(damageRect))
3280 b.inflate(view->maximalOutlineSize());
3281 if (b.intersects(damageRect))
3282 return true; 3280 return true;
3283 } 3281 }
3284 3282
3285 // Otherwise we need to compute the bounding box of this single layer and se e if it intersects 3283 // Otherwise we need to compute the bounding box of this single layer and se e if it intersects
3286 // the damage rect. 3284 // the damage rect.
3287 return boundingBox(rootLayer, 0, offsetFromRoot).intersects(damageRect); 3285 return boundingBox(rootLayer, 0, offsetFromRoot).intersects(damageRect);
3288 } 3286 }
3289 3287
3290 LayoutRect RenderLayer::localBoundingBox(CalculateLayerBoundsFlags flags) const 3288 LayoutRect RenderLayer::localBoundingBox(CalculateLayerBoundsFlags flags) const
3291 { 3289 {
(...skipping 28 matching lines...) Expand all
3320 box->flipForWritingMode(result); // The mask clip rect is in physica l coordinates, so we have to flip, since localBoundingBox is not. 3318 box->flipForWritingMode(result); // The mask clip rect is in physica l coordinates, so we have to flip, since localBoundingBox is not.
3321 } else { 3319 } else {
3322 LayoutRect bbox = box->borderBoxRect(); 3320 LayoutRect bbox = box->borderBoxRect();
3323 result = bbox; 3321 result = bbox;
3324 LayoutRect overflowRect = box->visualOverflowRect(); 3322 LayoutRect overflowRect = box->visualOverflowRect();
3325 if (bbox != overflowRect) 3323 if (bbox != overflowRect)
3326 result.unite(overflowRect); 3324 result.unite(overflowRect);
3327 } 3325 }
3328 } 3326 }
3329 3327
3330 RenderView* view = renderer()->view(); 3328 ASSERT(renderer()->view());
3331 ASSERT(view);
3332 if (view)
3333 result.inflate(view->maximalOutlineSize()); // Used to apply a fudge fac tor to dirty-rect checks on blocks/tables.
3334 3329
3335 return result; 3330 return result;
3336 } 3331 }
3337 3332
3338 LayoutRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer, CalculateL ayerBoundsFlags flags, const LayoutPoint* offsetFromRoot) const 3333 LayoutRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer, CalculateL ayerBoundsFlags flags, const LayoutPoint* offsetFromRoot) const
3339 { 3334 {
3340 LayoutRect result = localBoundingBox(flags); 3335 LayoutRect result = localBoundingBox(flags);
3341 if (renderer()->isBox()) 3336 if (renderer()->isBox())
3342 renderBox()->flipForWritingMode(result); 3337 renderBox()->flipForWritingMode(result);
3343 else 3338 else
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 } 4058 }
4064 } 4059 }
4065 4060
4066 void showLayerTree(const WebCore::RenderObject* renderer) 4061 void showLayerTree(const WebCore::RenderObject* renderer)
4067 { 4062 {
4068 if (!renderer) 4063 if (!renderer)
4069 return; 4064 return;
4070 showLayerTree(renderer->enclosingLayer()); 4065 showLayerTree(renderer->enclosingLayer());
4071 } 4066 }
4072 #endif 4067 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderDetailsMarker.cpp ('k') | Source/core/rendering/RenderLineBoxList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698