| 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. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 | 1507 |
| 1508 // TODO(wangxianzhu): We may avoid subtree paint invalidation on CSS clip | 1508 // TODO(wangxianzhu): We may avoid subtree paint invalidation on CSS clip |
| 1509 // change for SPv2. | 1509 // change for SPv2. |
| 1510 if (diff.cssClipChanged()) | 1510 if (diff.cssClipChanged()) |
| 1511 diff.setNeedsPaintInvalidationSubtree(); | 1511 diff.setNeedsPaintInvalidationSubtree(); |
| 1512 | 1512 |
| 1513 // Optimization: for decoration/color property changes, invalidation is only | 1513 // Optimization: for decoration/color property changes, invalidation is only |
| 1514 // needed if we have style or text affected by these properties. | 1514 // needed if we have style or text affected by these properties. |
| 1515 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { | 1515 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { |
| 1516 if (style()->hasBorder() || style()->hasOutline() || | 1516 if (style()->hasBorder() || style()->hasOutline() || |
| 1517 style()->hasBackgroundRelatedColorReferencingCurrentColor() | 1517 style()->hasBackgroundRelatedColorReferencingCurrentColor() || |
| 1518 // Skip any text nodes that do not contain text boxes. Whitespace cannot | 1518 // Skip any text nodes that do not contain text boxes. Whitespace cannot |
| 1519 // be skipped or we will miss invalidating decorations (e.g., | 1519 // be skipped or we will miss invalidating decorations (e.g., |
| 1520 // underlines). | 1520 // underlines). |
| 1521 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) | 1521 (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) || |
| 1522 // Caret is painted in text color. | |
| 1523 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) || | |
| 1524 (isSVG() && style()->svgStyle().isFillColorCurrentColor()) || | 1522 (isSVG() && style()->svgStyle().isFillColorCurrentColor()) || |
| 1525 (isSVG() && style()->svgStyle().isStrokeColorCurrentColor()) || | 1523 (isSVG() && style()->svgStyle().isStrokeColorCurrentColor()) || |
| 1526 isListMarker()) | 1524 isListMarker()) |
| 1527 diff.setNeedsPaintInvalidationObject(); | 1525 diff.setNeedsPaintInvalidationObject(); |
| 1528 } | 1526 } |
| 1529 | 1527 |
| 1530 // The answer to layerTypeRequired() for plugins, iframes, and canvas can | 1528 // The answer to layerTypeRequired() for plugins, iframes, and canvas can |
| 1531 // change without the actual style changing, since it depends on whether we | 1529 // change without the actual style changing, since it depends on whether we |
| 1532 // decide to composite these elements. When the/ layer status of one of these | 1530 // decide to composite these elements. When the/ layer status of one of these |
| 1533 // elements changes, we need to force a layout. | 1531 // elements changes, we need to force a layout. |
| (...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3499 const blink::LayoutObject* root = object1; | 3497 const blink::LayoutObject* root = object1; |
| 3500 while (root->parent()) | 3498 while (root->parent()) |
| 3501 root = root->parent(); | 3499 root = root->parent(); |
| 3502 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3500 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3503 } else { | 3501 } else { |
| 3504 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3502 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3505 } | 3503 } |
| 3506 } | 3504 } |
| 3507 | 3505 |
| 3508 #endif | 3506 #endif |
| OLD | NEW |