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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1536 | 1536 |
1537 // TODO(wangxianzhu): We may avoid subtree paint invalidation on CSS clip | 1537 // TODO(wangxianzhu): We may avoid subtree paint invalidation on CSS clip |
1538 // change for SPv2. | 1538 // change for SPv2. |
1539 if (diff.CssClipChanged()) | 1539 if (diff.CssClipChanged()) |
1540 diff.SetNeedsPaintInvalidationSubtree(); | 1540 diff.SetNeedsPaintInvalidationSubtree(); |
1541 | 1541 |
1542 // Optimization: for decoration/color property changes, invalidation is only | 1542 // Optimization: for decoration/color property changes, invalidation is only |
1543 // needed if we have style or text affected by these properties. | 1543 // needed if we have style or text affected by these properties. |
1544 if (diff.TextDecorationOrColorChanged() && | 1544 if (diff.TextDecorationOrColorChanged() && |
1545 !diff.NeedsFullPaintInvalidation()) { | 1545 !diff.NeedsFullPaintInvalidation()) { |
1546 if (Style()->HasBorder() || Style()->HasOutline() || | 1546 if (Style()->HasBorderColorReferencingCurrentColor() || |
wkorman
2017/04/24 22:05:41
Could add unit tests for this, BorderData, and Com
Xianzhu
2017/04/24 22:36:48
Added ComputedStyleTest.HasOutlineWithCurrentColor
| |
1547 Style()->IsOutlineColorCurrentColor() || | |
1547 Style()->HasBackgroundRelatedColorReferencingCurrentColor() || | 1548 Style()->HasBackgroundRelatedColorReferencingCurrentColor() || |
1548 // Skip any text nodes that do not contain text boxes. Whitespace cannot | 1549 // Skip any text nodes that do not contain text boxes. Whitespace cannot |
1549 // be skipped or we will miss invalidating decorations (e.g., | 1550 // be skipped or we will miss invalidating decorations (e.g., |
1550 // underlines). | 1551 // underlines). |
1551 (IsText() && !IsBR() && ToLayoutText(this)->HasTextBoxes()) || | 1552 (IsText() && !IsBR() && ToLayoutText(this)->HasTextBoxes()) || |
1552 (IsSVG() && Style()->SvgStyle().IsFillColorCurrentColor()) || | 1553 (IsSVG() && Style()->SvgStyle().IsFillColorCurrentColor()) || |
1553 (IsSVG() && Style()->SvgStyle().IsStrokeColorCurrentColor()) || | 1554 (IsSVG() && Style()->SvgStyle().IsStrokeColorCurrentColor()) || |
1554 IsListMarker()) | 1555 IsListMarker()) |
1555 diff.SetNeedsPaintInvalidationObject(); | 1556 diff.SetNeedsPaintInvalidationObject(); |
1556 } | 1557 } |
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3653 const blink::LayoutObject* root = object1; | 3654 const blink::LayoutObject* root = object1; |
3654 while (root->Parent()) | 3655 while (root->Parent()) |
3655 root = root->Parent(); | 3656 root = root->Parent(); |
3656 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3657 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3657 } else { | 3658 } else { |
3658 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3659 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3659 } | 3660 } |
3660 } | 3661 } |
3661 | 3662 |
3662 #endif | 3663 #endif |
OLD | NEW |