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 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 } | 1790 } |
1791 | 1791 |
1792 // Optimization: for decoration/color property changes, invalidation is only
needed if we have style or text affected by these properties. | 1792 // Optimization: for decoration/color property changes, invalidation is only
needed if we have style or text affected by these properties. |
1793 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { | 1793 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { |
1794 if (style()->hasBorder() || style()->hasOutline() | 1794 if (style()->hasBorder() || style()->hasOutline() |
1795 || style()->isBackgroundColorCurrentColor() | 1795 || style()->isBackgroundColorCurrentColor() |
1796 // Skip any text nodes that do not contain text boxes. Whitespace ca
nnot be | 1796 // Skip any text nodes that do not contain text boxes. Whitespace ca
nnot be |
1797 // skipped or we will miss invalidating decorations (e.g., underline
s). | 1797 // skipped or we will miss invalidating decorations (e.g., underline
s). |
1798 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) | 1798 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) |
1799 // Caret is painted in text color. | 1799 // Caret is painted in text color. |
1800 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret())) | 1800 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) |
| 1801 || (isSVG() && style()->svgStyle().isFillColorCurrentColor()) |
| 1802 || (isSVG() && style()->svgStyle().isStrokeColorCurrentColor())) |
1801 diff.setNeedsPaintInvalidationObject(); | 1803 diff.setNeedsPaintInvalidationObject(); |
1802 } | 1804 } |
1803 | 1805 |
1804 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch
ange without the actual | 1806 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch
ange without the actual |
1805 // style changing, since it depends on whether we decide to composite these
elements. When the | 1807 // style changing, since it depends on whether we decide to composite these
elements. When the |
1806 // layer status of one of these elements changes, we need to force a layout. | 1808 // layer status of one of these elements changes, we need to force a layout. |
1807 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { | 1809 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { |
1808 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() !
= NoPaintLayer; | 1810 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() !
= NoPaintLayer; |
1809 if (hasLayer() != requiresLayer) | 1811 if (hasLayer() != requiresLayer) |
1810 diff.setNeedsFullLayout(); | 1812 diff.setNeedsFullLayout(); |
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3488 const blink::LayoutObject* root = object1; | 3490 const blink::LayoutObject* root = object1; |
3489 while (root->parent()) | 3491 while (root->parent()) |
3490 root = root->parent(); | 3492 root = root->parent(); |
3491 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3493 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3492 } else { | 3494 } else { |
3493 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3495 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3494 } | 3496 } |
3495 } | 3497 } |
3496 | 3498 |
3497 #endif | 3499 #endif |
OLD | NEW |