Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1526 | 1526 |
| 1527 if (view()->document().printing()) | 1527 if (view()->document().printing()) |
| 1528 return; // Don't invalidate paints if we're printing. | 1528 return; // Don't invalidate paints if we're printing. |
| 1529 | 1529 |
| 1530 // FIXME: really, we're in the paint invalidation phase here, and the follow ing queries are legal. | 1530 // FIXME: really, we're in the paint invalidation phase here, and the follow ing queries are legal. |
| 1531 // Until those states are fully fledged, I'll just disable the ASSERTS. | 1531 // Until those states are fully fledged, I'll just disable the ASSERTS. |
| 1532 DisableCompositingQueryAsserts disabler; | 1532 DisableCompositingQueryAsserts disabler; |
| 1533 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation(); | 1533 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation(); |
| 1534 LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInval idationContainer); | 1534 LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInval idationContainer); |
| 1535 invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationR ect, InvalidationPaint); | 1535 invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationR ect, InvalidationPaint); |
| 1536 if (paintInvalidationRect != previousPaintInvalidationRect()) | |
| 1537 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintI nvalidationRect(), InvalidationPaint); | |
|
Julien - ping for review
2014/07/15 00:58:31
I think we should only invalidate the previousPain
Xianzhu
2014/07/15 01:16:24
I tried that but layout test results showed under-
| |
| 1536 } | 1538 } |
| 1537 | 1539 |
| 1538 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb ject* paintInvalidationContainer) const | 1540 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb ject* paintInvalidationContainer) const |
| 1539 { | 1541 { |
| 1540 if (!paintInvalidationContainer) | 1542 if (!paintInvalidationContainer) |
| 1541 return computePaintInvalidationRect(paintInvalidationContainer); | 1543 return computePaintInvalidationRect(paintInvalidationContainer); |
| 1542 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont ainer->layer()); | 1544 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont ainer->layer()); |
| 1543 } | 1545 } |
| 1544 | 1546 |
| 1545 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const | 1547 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const |
| (...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3445 { | 3447 { |
| 3446 if (object1) { | 3448 if (object1) { |
| 3447 const WebCore::RenderObject* root = object1; | 3449 const WebCore::RenderObject* root = object1; |
| 3448 while (root->parent()) | 3450 while (root->parent()) |
| 3449 root = root->parent(); | 3451 root = root->parent(); |
| 3450 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3452 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3451 } | 3453 } |
| 3452 } | 3454 } |
| 3453 | 3455 |
| 3454 #endif | 3456 #endif |
| OLD | NEW |