| 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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRe
ct, PaintInvalidationIncremental); | 1569 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRe
ct, PaintInvalidationIncremental); |
| 1570 } else if (deltaBottom < 0) { | 1570 } else if (deltaBottom < 0) { |
| 1571 LayoutRect invalidationRect(oldBounds.x(), newBounds.maxY(), oldBounds.w
idth(), -deltaBottom); | 1571 LayoutRect invalidationRect(oldBounds.x(), newBounds.maxY(), oldBounds.w
idth(), -deltaBottom); |
| 1572 adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInva
lidationContainer); | 1572 adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInva
lidationContainer); |
| 1573 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRe
ct, PaintInvalidationIncremental); | 1573 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRe
ct, PaintInvalidationIncremental); |
| 1574 } | 1574 } |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 void LayoutObject::fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalid
ationContainer, PaintInvalidationReason invalidationReason, const LayoutRect& ol
dBounds, const LayoutRect& newBounds) | 1577 void LayoutObject::fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalid
ationContainer, PaintInvalidationReason invalidationReason, const LayoutRect& ol
dBounds, const LayoutRect& newBounds) |
| 1578 { | 1578 { |
| 1579 // Otherwise do full paint invalidation. | 1579 // The following logic avoids invalidating twice if one set of bounds contai
ns the other. |
| 1580 LayoutRect invalidationRect = oldBounds; | 1580 if (!newBounds.contains(oldBounds)) { |
| 1581 LayoutRect invalidationRect = oldBounds; |
| 1582 adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInva
lidationContainer); |
| 1583 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRe
ct, invalidationReason); |
| 1584 |
| 1585 if (oldBounds.contains(newBounds)) |
| 1586 return; |
| 1587 } |
| 1588 |
| 1589 LayoutRect invalidationRect = newBounds; |
| 1581 adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInvalida
tionContainer); | 1590 adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInvalida
tionContainer); |
| 1582 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRect,
invalidationReason); | 1591 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRect,
invalidationReason); |
| 1583 if (newBounds != oldBounds) { | |
| 1584 invalidationRect = newBounds; | |
| 1585 adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInva
lidationContainer); | |
| 1586 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRe
ct, invalidationReason); | |
| 1587 } | |
| 1588 } | 1592 } |
| 1589 | 1593 |
| 1590 void LayoutObject::invalidatePaintForOverflow() | 1594 void LayoutObject::invalidatePaintForOverflow() |
| 1591 { | 1595 { |
| 1592 } | 1596 } |
| 1593 | 1597 |
| 1594 void LayoutObject::invalidatePaintForOverflowIfNeeded() | 1598 void LayoutObject::invalidatePaintForOverflowIfNeeded() |
| 1595 { | 1599 { |
| 1596 if (shouldInvalidateOverflowForPaint()) | 1600 if (shouldInvalidateOverflowForPaint()) |
| 1597 invalidatePaintForOverflow(); | 1601 invalidatePaintForOverflow(); |
| (...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3674 const blink::LayoutObject* root = object1; | 3678 const blink::LayoutObject* root = object1; |
| 3675 while (root->parent()) | 3679 while (root->parent()) |
| 3676 root = root->parent(); | 3680 root = root->parent(); |
| 3677 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3681 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3678 } else { | 3682 } else { |
| 3679 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3683 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3680 } | 3684 } |
| 3681 } | 3685 } |
| 3682 | 3686 |
| 3683 #endif | 3687 #endif |
| OLD | NEW |