Chromium Code Reviews| 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 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1727 } | 1727 } |
| 1728 | 1728 |
| 1729 // If backdrop filter changed, and the layer does not paint into its own sep arate backing or it paints with filters, then we need to invalidate paints. | 1729 // If backdrop filter changed, and the layer does not paint into its own sep arate backing or it paints with filters, then we need to invalidate paints. |
| 1730 if (diff.backdropFilterChanged() && hasLayer()) { | 1730 if (diff.backdropFilterChanged() && hasLayer()) { |
| 1731 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer(); | 1731 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer(); |
| 1732 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithBackdropFilters()) | 1732 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithBackdropFilters()) |
| 1733 diff.setNeedsPaintInvalidationLayer(); | 1733 diff.setNeedsPaintInvalidationLayer(); |
| 1734 } | 1734 } |
| 1735 | 1735 |
| 1736 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { | 1736 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { |
| 1737 if (style()->hasBorder() || style()->hasOutline() | 1737 if (isText() || style()->hasBorder() || style()->hasOutline() || style() ->isBackgroundColorCurrentColor()) |
|
chrishtr
2015/09/11 16:49:19
Add a comment about why we're whitelisting only ce
| |
| 1738 || style()->isBackgroundColorCurrentColor() | |
| 1739 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) | |
| 1740 diff.setNeedsPaintInvalidationObject(); | 1738 diff.setNeedsPaintInvalidationObject(); |
| 1741 } | 1739 } |
| 1742 | 1740 |
| 1743 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual | 1741 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual |
| 1744 // style changing, since it depends on whether we decide to composite these elements. When the | 1742 // style changing, since it depends on whether we decide to composite these elements. When the |
| 1745 // layer status of one of these elements changes, we need to force a layout. | 1743 // layer status of one of these elements changes, we need to force a layout. |
| 1746 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { | 1744 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { |
| 1747 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer; | 1745 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer; |
| 1748 if (hasLayer() != requiresLayer) | 1746 if (hasLayer() != requiresLayer) |
| 1749 diff.setNeedsFullLayout(); | 1747 diff.setNeedsFullLayout(); |
| (...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3407 const blink::LayoutObject* root = object1; | 3405 const blink::LayoutObject* root = object1; |
| 3408 while (root->parent()) | 3406 while (root->parent()) |
| 3409 root = root->parent(); | 3407 root = root->parent(); |
| 3410 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3408 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3411 } else { | 3409 } else { |
| 3412 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3410 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3413 } | 3411 } |
| 3414 } | 3412 } |
| 3415 | 3413 |
| 3416 #endif | 3414 #endif |
| OLD | NEW |