| 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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |