| 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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 { | 1399 { |
| 1400 // First check for InvalidationLocationChange to avoid it from being hidden
by other | 1400 // First check for InvalidationLocationChange to avoid it from being hidden
by other |
| 1401 // invalidation reasons because we'll need to force check for paint invalida
tion for | 1401 // invalidation reasons because we'll need to force check for paint invalida
tion for |
| 1402 // children when location of this object changed. | 1402 // children when location of this object changed. |
| 1403 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) | 1403 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) |
| 1404 return PaintInvalidationLocationChange; | 1404 return PaintInvalidationLocationChange; |
| 1405 | 1405 |
| 1406 if (shouldDoFullPaintInvalidation()) | 1406 if (shouldDoFullPaintInvalidation()) |
| 1407 return m_bitfields.fullPaintInvalidationReason(); | 1407 return m_bitfields.fullPaintInvalidationReason(); |
| 1408 | 1408 |
| 1409 // The focus ring may change because of position change of descendants. For
simplicity, | 1409 // The outline may change shape because of position change of descendants. F
or simplicity, |
| 1410 // just force full paint invalidation if this object is marked for checking
paint invalidation | 1410 // just force full paint invalidation if this object is marked for checking
paint invalidation |
| 1411 // for any reason. | 1411 // for any reason. |
| 1412 // TODO(wangxianzhu): extend this to all outlines. | 1412 if (styleRef().hasOutline()) |
| 1413 if (styleRef().outlineStyleIsAuto()) | |
| 1414 return PaintInvalidationOutline; | 1413 return PaintInvalidationOutline; |
| 1415 | 1414 |
| 1416 // If the bounds are the same then we know that none of the statements below | 1415 // If the bounds are the same then we know that none of the statements below |
| 1417 // can match, so we can early out since we will not need to do any | 1416 // can match, so we can early out since we will not need to do any |
| 1418 // invalidation. | 1417 // invalidation. |
| 1419 if (oldBounds == newBounds) | 1418 if (oldBounds == newBounds) |
| 1420 return PaintInvalidationNone; | 1419 return PaintInvalidationNone; |
| 1421 | 1420 |
| 1422 // If we shifted, we don't know the exact reason so we are conservative and
trigger a full invalidation. Shifting could | 1421 // If we shifted, we don't know the exact reason so we are conservative and
trigger a full invalidation. Shifting could |
| 1423 // be caused by some layout property (left / top) or some in-flow layoutObje
ct inserted / removed before us in the tree. | 1422 // be caused by some layout property (left / top) or some in-flow layoutObje
ct inserted / removed before us in the tree. |
| (...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3405 const blink::LayoutObject* root = object1; | 3404 const blink::LayoutObject* root = object1; |
| 3406 while (root->parent()) | 3405 while (root->parent()) |
| 3407 root = root->parent(); | 3406 root = root->parent(); |
| 3408 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3407 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3409 } else { | 3408 } else { |
| 3410 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3409 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3411 } | 3410 } |
| 3412 } | 3411 } |
| 3413 | 3412 |
| 3414 #endif | 3413 #endif |
| OLD | NEW |