| 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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 | 1535 |
| 1536 // Optimization: for decoration/color property changes, invalidation is only | 1536 // Optimization: for decoration/color property changes, invalidation is only |
| 1537 // needed if we have style or text affected by these properties. | 1537 // needed if we have style or text affected by these properties. |
| 1538 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { | 1538 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { |
| 1539 if (style()->hasBorder() || style()->hasOutline() || | 1539 if (style()->hasBorder() || style()->hasOutline() || |
| 1540 style()->hasBackgroundRelatedColorReferencingCurrentColor() | 1540 style()->hasBackgroundRelatedColorReferencingCurrentColor() |
| 1541 // Skip any text nodes that do not contain text boxes. Whitespace cannot | 1541 // Skip any text nodes that do not contain text boxes. Whitespace cannot |
| 1542 // be skipped or we will miss invalidating decorations (e.g., | 1542 // be skipped or we will miss invalidating decorations (e.g., |
| 1543 // underlines). | 1543 // underlines). |
| 1544 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) | 1544 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) |
| 1545 // Caret is painted in text color. | 1545 #if 0 |
| 1546 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) || | 1546 // TODO(yosin): Do we really need to invalidate |LayoutBlock| if |
| 1547 (isSVG() && style()->svgStyle().isFillColorCurrentColor()) || | 1547 // it has caret? Caret rect invalidation should be done by |
| 1548 // |CaretBase| class. Also, we don't know caret position until |
| 1549 // layout finished, so we can't check whether this |LayoutBlock| |
| 1550 // has caret or not here. |
| 1551 // Caret is painted in text color. |
| 1552 // See http://crrev.com/1381353003 |
| 1553 // Test: paint/invalidation/caret-color.html |
| 1554 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) |
| 1555 #endif |
| 1556 || (isSVG() && style()->svgStyle().isFillColorCurrentColor()) || |
| 1548 (isSVG() && style()->svgStyle().isStrokeColorCurrentColor()) || | 1557 (isSVG() && style()->svgStyle().isStrokeColorCurrentColor()) || |
| 1549 isListMarker()) | 1558 isListMarker()) |
| 1550 diff.setNeedsPaintInvalidationObject(); | 1559 diff.setNeedsPaintInvalidationObject(); |
| 1551 } | 1560 } |
| 1552 | 1561 |
| 1553 // The answer to layerTypeRequired() for plugins, iframes, and canvas can | 1562 // The answer to layerTypeRequired() for plugins, iframes, and canvas can |
| 1554 // change without the actual style changing, since it depends on whether we | 1563 // change without the actual style changing, since it depends on whether we |
| 1555 // decide to composite these elements. When the/ layer status of one of these | 1564 // decide to composite these elements. When the/ layer status of one of these |
| 1556 // elements changes, we need to force a layout. | 1565 // elements changes, we need to force a layout. |
| 1557 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { | 1566 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { |
| (...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 const blink::LayoutObject* root = object1; | 3517 const blink::LayoutObject* root = object1; |
| 3509 while (root->parent()) | 3518 while (root->parent()) |
| 3510 root = root->parent(); | 3519 root = root->parent(); |
| 3511 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3520 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3512 } else { | 3521 } else { |
| 3513 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3522 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3514 } | 3523 } |
| 3515 } | 3524 } |
| 3516 | 3525 |
| 3517 #endif | 3526 #endif |
| OLD | NEW |