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 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 if (!fullRepaint) { | 1511 if (!fullRepaint) { |
1512 // This ASSERT fails due to animations. See https://bugs.webkit.org/sho
w_bug.cgi?id=37048 | 1512 // This ASSERT fails due to animations. See https://bugs.webkit.org/sho
w_bug.cgi?id=37048 |
1513 // ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBound
sForRepaint(repaintContainer)); | 1513 // ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBound
sForRepaint(repaintContainer)); |
1514 newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBo
undsForRepaint(repaintContainer); | 1514 newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBo
undsForRepaint(repaintContainer); |
1515 | 1515 |
1516 if ((hasOutline() && newOutlineBox.location() != oldOutlineBox.location(
)) | 1516 if ((hasOutline() && newOutlineBox.location() != oldOutlineBox.location(
)) |
1517 || (mustRepaintBackgroundOrBorder() && (newBounds != oldBounds || (h
asOutline() && newOutlineBox != oldOutlineBox)))) | 1517 || (mustRepaintBackgroundOrBorder() && (newBounds != oldBounds || (h
asOutline() && newOutlineBox != oldOutlineBox)))) |
1518 fullRepaint = true; | 1518 fullRepaint = true; |
1519 } | 1519 } |
1520 | 1520 |
1521 // If there is no intersection between the old and the new bounds, invalidat
ing | 1521 // If we shifted, we don't know the exact reason so we are conservative and
trigger a full invalidation. Shifting could |
1522 // the difference is more expensive than just doing a full repaint. | 1522 // be caused by some layout property (left / top) or some in-flow renderer i
nserted / removed before us in the tree. |
1523 if (!fullRepaint && !newBounds.intersects(oldBounds)) | 1523 if (!fullRepaint && newBounds.location() != oldBounds.location()) |
1524 fullRepaint = true; | 1524 fullRepaint = true; |
1525 | 1525 |
1526 if (!repaintContainer) | 1526 if (!repaintContainer) |
1527 repaintContainer = v; | 1527 repaintContainer = v; |
1528 | 1528 |
1529 if (fullRepaint) { | 1529 if (fullRepaint) { |
1530 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds)); | 1530 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds)); |
1531 if (newBounds != oldBounds) | 1531 if (newBounds != oldBounds) |
1532 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBound
s)); | 1532 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBound
s)); |
1533 return true; | 1533 return true; |
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3408 { | 3408 { |
3409 if (object1) { | 3409 if (object1) { |
3410 const WebCore::RenderObject* root = object1; | 3410 const WebCore::RenderObject* root = object1; |
3411 while (root->parent()) | 3411 while (root->parent()) |
3412 root = root->parent(); | 3412 root = root->parent(); |
3413 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3413 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3414 } | 3414 } |
3415 } | 3415 } |
3416 | 3416 |
3417 #endif | 3417 #endif |
OLD | NEW |