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()) || | |
yosin_UTC9
2017/01/31 20:12:58
Finally, You did it! (^_^)b
My approach[1] was re
| |
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 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3492 const blink::LayoutObject* root = object1; | 3490 const blink::LayoutObject* root = object1; |
3493 while (root->parent()) | 3491 while (root->parent()) |
3494 root = root->parent(); | 3492 root = root->parent(); |
3495 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3493 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3496 } else { | 3494 } else { |
3497 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3495 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3498 } | 3496 } |
3499 } | 3497 } |
3500 | 3498 |
3501 #endif | 3499 #endif |
OLD | NEW |