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

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

Issue 395463003: Invalidate previous paint rect in RenderObject::paintInvalidationForWholeRenderer() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 years, 4 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 | « LayoutTests/fast/repaint/remove-inline-layer-after-layout-expected.txt ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 if (!isRooted()) 1523 if (!isRooted())
1524 return; 1524 return;
1525 1525
1526 if (view()->document().printing()) 1526 if (view()->document().printing())
1527 return; // Don't invalidate paints if we're printing. 1527 return; // Don't invalidate paints if we're printing.
1528 1528
1529 // FIXME: really, we're in the paint invalidation phase here, and the follow ing queries are legal. 1529 // FIXME: really, we're in the paint invalidation phase here, and the follow ing queries are legal.
1530 // Until those states are fully fledged, I'll just disable the ASSERTS. 1530 // Until those states are fully fledged, I'll just disable the ASSERTS.
1531 DisableCompositingQueryAsserts disabler; 1531 DisableCompositingQueryAsserts disabler;
1532 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation(); 1532 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation();
1533
1534 // FIXME: We should invalidate only previousPaintInvalidationRect, but for n ow we invalidate both the previous
1535 // and current paint rects to meet the expectations of some callers in some cases (crbug.com/397555):
1536 // - transform style change without a layout - crbug.com/394004;
1537 // - some objects don't save previousPaintInvalidationRect - crbug.com/39413 3.
1533 LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInval idationContainer); 1538 LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInval idationContainer);
1534 invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationR ect, InvalidationPaint); 1539 invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationR ect, InvalidationPaint);
1540 if (paintInvalidationRect != previousPaintInvalidationRect())
1541 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintI nvalidationRect(), InvalidationPaint);
1535 } 1542 }
1536 1543
1537 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb ject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidatio nState) const 1544 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb ject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidatio nState) const
1538 { 1545 {
1539 if (!paintInvalidationContainer) 1546 if (!paintInvalidationContainer)
1540 return computePaintInvalidationRect(paintInvalidationContainer, paintInv alidationState); 1547 return computePaintInvalidationRect(paintInvalidationContainer, paintInv alidationState);
1541 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont ainer->layer(), paintInvalidationState); 1548 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont ainer->layer(), paintInvalidationState);
1542 } 1549 }
1543 1550
1544 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const 1551 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
3448 { 3455 {
3449 if (object1) { 3456 if (object1) {
3450 const blink::RenderObject* root = object1; 3457 const blink::RenderObject* root = object1;
3451 while (root->parent()) 3458 while (root->parent())
3452 root = root->parent(); 3459 root = root->parent();
3453 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3460 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3454 } 3461 }
3455 } 3462 }
3456 3463
3457 #endif 3464 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/remove-inline-layer-after-layout-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698